@peculiar/certificates-viewer 4.6.0 → 4.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/components/attribute-certificate-viewer.js +2 -2
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/button-menu.js +1 -1
  4. package/components/button.js +3 -1
  5. package/components/button.js.map +1 -1
  6. package/components/certificate-chain-viewer.js +2 -2
  7. package/components/certificate-chain-viewer.js.map +1 -1
  8. package/components/certificate-viewer.js +2 -2
  9. package/components/certificate-viewer.js.map +1 -1
  10. package/components/circular-progress.js +1 -1
  11. package/components/crl-viewer.js +2 -2
  12. package/components/crl-viewer.js.map +1 -1
  13. package/components/csr-viewer.js +2 -2
  14. package/components/csr-viewer.js.map +1 -1
  15. package/components/download.js +3286 -3079
  16. package/components/download.js.map +1 -1
  17. package/components/highlight-words.js +1 -1
  18. package/components/index.js +1 -1
  19. package/components/miscellaneous.js.map +1 -1
  20. package/components/peculiar-certificate-decoder.js +2 -2
  21. package/components/peculiar-certificate-decoder.js.map +1 -1
  22. package/components/peculiar-certificates-viewer.js +1 -1
  23. package/components/peculiar-text-hider.js +1 -1
  24. package/dist/cjs/{actions-Dl4HXXlI.js → actions-ByC9jQU-.js} +3 -3
  25. package/dist/cjs/{actions-Dl4HXXlI.js.map → actions-ByC9jQU-.js.map} +1 -1
  26. package/dist/cjs/{arrow_top-DBMPHVlB.js → arrow_top-Cw9KN115.js} +3 -3
  27. package/dist/cjs/{arrow_top-DBMPHVlB.js.map → arrow_top-Cw9KN115.js.map} +1 -1
  28. package/dist/cjs/{button-B0CduHSE.js → button-C8EWG_-r.js} +6 -4
  29. package/dist/cjs/button-C8EWG_-r.js.map +1 -0
  30. package/dist/cjs/{certification_request-DaJSDP3R.js → certification_request-CxHe71zR.js} +3288 -3081
  31. package/dist/cjs/certification_request-CxHe71zR.js.map +1 -0
  32. package/dist/cjs/{cross-pi7K0cHC.js → cross-3DqhA0G_.js} +3 -3
  33. package/dist/cjs/{cross-pi7K0cHC.js.map → cross-3DqhA0G_.js.map} +1 -1
  34. package/dist/cjs/{download-D9skkVoT.js → download-DQP0KR4o.js} +3 -3
  35. package/dist/cjs/{download-D9skkVoT.js.map → download-DQP0KR4o.js.map} +1 -1
  36. package/dist/cjs/{index-BO3rFndV.js → index-uHmGhObe.js} +430 -157
  37. package/dist/cjs/index-uHmGhObe.js.map +1 -0
  38. package/dist/cjs/index.cjs.js +9 -9
  39. package/dist/cjs/{link-kgbgxxVh.js → link-Cgh8wnbs.js} +4 -4
  40. package/dist/cjs/{link-kgbgxxVh.js.map → link-Cgh8wnbs.js.map} +1 -1
  41. package/dist/cjs/loader.cjs.js +3 -4
  42. package/dist/cjs/loader.cjs.js.map +1 -1
  43. package/dist/cjs/{miscellaneous-Ce9aGjKB.js → miscellaneous-DeBEwLDy.js} +7 -7
  44. package/dist/cjs/miscellaneous-DeBEwLDy.js.map +1 -0
  45. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +1 -1
  46. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js +12 -12
  47. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +1 -1
  48. package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +3 -3
  49. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +6 -6
  50. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  51. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  52. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +8 -8
  53. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  54. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
  55. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +7 -7
  56. package/dist/cjs/peculiar-text-hider.cjs.entry.js +3 -3
  57. package/dist/cjs/peculiar.cjs.js +4 -5
  58. package/dist/cjs/peculiar.cjs.js.map +1 -1
  59. package/dist/cjs/{pkcs10_certificate_request-D13Ssi7Z.js → pkcs10_certificate_request-CHMDxe2Z.js} +3 -3
  60. package/dist/cjs/{pkcs10_certificate_request-D13Ssi7Z.js.map → pkcs10_certificate_request-CHMDxe2Z.js.map} +1 -1
  61. package/dist/cjs/{x509_certificate-h5GZArG6.js → x509_certificate-CzplJQ0X.js} +3 -3
  62. package/dist/cjs/{x509_certificate-h5GZArG6.js.map → x509_certificate-CzplJQ0X.js.map} +1 -1
  63. package/dist/cjs/{x509_crl-CDPt6P1z.js → x509_crl-B7kFbLDV.js} +4 -4
  64. package/dist/cjs/{x509_crl-CDPt6P1z.js.map → x509_crl-B7kFbLDV.js.map} +1 -1
  65. package/dist/collection/collection-manifest.json +1 -1
  66. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +7 -7
  67. package/dist/collection/components/button-menu/button-menu.js +1 -0
  68. package/dist/collection/components/button-menu/button-menu.js.map +1 -1
  69. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.css +3 -0
  70. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js +2 -1
  71. package/dist/collection/components/certificate-chain-viewer/certificate-chain-viewer.js.map +1 -1
  72. package/dist/collection/components/certificate-decoder/certificate-decoder.js +2 -1
  73. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  74. package/dist/collection/components/certificate-viewer/certificate-viewer.css +3 -0
  75. package/dist/collection/components/certificate-viewer/certificate-viewer.js +8 -8
  76. package/dist/collection/components/certificates-viewer/certificates-viewer.js +4 -3
  77. package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -1
  78. package/dist/collection/components/circular-progress/circular-progress.js +2 -2
  79. package/dist/collection/components/crl-viewer/crl-viewer.js +6 -6
  80. package/dist/collection/components/csr-viewer/csr-viewer.js +5 -5
  81. package/dist/collection/components/highlight-words/highlight-words.js +1 -1
  82. package/dist/collection/components/typography/typography.js +1 -1
  83. package/dist/collection/components/typography/typography.js.map +1 -1
  84. package/dist/esm/{actions-DzoPRObK.js → actions-BOY2Tl0T.js} +3 -3
  85. package/dist/esm/{actions-DzoPRObK.js.map → actions-BOY2Tl0T.js.map} +1 -1
  86. package/dist/esm/{arrow_top-CF9pv-tQ.js → arrow_top-DL0RWe4n.js} +3 -3
  87. package/dist/{esm-es5/arrow_top-CF9pv-tQ.js.map → esm/arrow_top-DL0RWe4n.js.map} +1 -1
  88. package/dist/esm/{button-Do0R_8PZ.js → button-Bbh7MwG6.js} +6 -4
  89. package/dist/esm/button-Bbh7MwG6.js.map +1 -0
  90. package/dist/esm/{certification_request-DazysL_f.js → certification_request-PeMaLTUD.js} +3288 -3081
  91. package/dist/esm/certification_request-PeMaLTUD.js.map +1 -0
  92. package/dist/esm/{cross-DdCuR1F2.js → cross-G84H_-QL.js} +3 -3
  93. package/dist/{esm-es5/cross-DdCuR1F2.js.map → esm/cross-G84H_-QL.js.map} +1 -1
  94. package/dist/esm/{download-Cqfc-Sxf.js → download-ykcxSgxU.js} +3 -3
  95. package/dist/esm/{download-Cqfc-Sxf.js.map → download-ykcxSgxU.js.map} +1 -1
  96. package/dist/esm/{index-DDDrq3In.js → index-CwgZaF40.js} +430 -158
  97. package/dist/esm/index-CwgZaF40.js.map +1 -0
  98. package/dist/esm/index.js +9 -9
  99. package/dist/esm/{link-qg3yKAoS.js → link-CGURvKy1.js} +4 -4
  100. package/dist/esm/{link-qg3yKAoS.js.map → link-CGURvKy1.js.map} +1 -1
  101. package/dist/esm/loader.js +3 -4
  102. package/dist/esm/loader.js.map +1 -1
  103. package/dist/esm/{miscellaneous-BJPX0Hs_.js → miscellaneous-bVeJt-6m.js} +7 -7
  104. package/dist/esm/miscellaneous-bVeJt-6m.js.map +1 -0
  105. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
  106. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js +12 -12
  107. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  108. package/dist/esm/peculiar-button-menu_3.entry.js +3 -3
  109. package/dist/esm/peculiar-certificate-decoder.entry.js +6 -6
  110. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  111. package/dist/esm/peculiar-certificate-viewer.entry.js +8 -8
  112. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  113. package/dist/esm/peculiar-certificates-viewer.entry.js +7 -7
  114. package/dist/esm/peculiar-text-hider.entry.js +3 -3
  115. package/dist/esm/peculiar.js +4 -5
  116. package/dist/esm/peculiar.js.map +1 -1
  117. package/dist/esm/{pkcs10_certificate_request-SQcYKma2.js → pkcs10_certificate_request-CK8FH47X.js} +3 -3
  118. package/dist/{esm-es5/pkcs10_certificate_request-SQcYKma2.js.map → esm/pkcs10_certificate_request-CK8FH47X.js.map} +1 -1
  119. package/dist/esm/{x509_certificate-Dmgw53TR.js → x509_certificate-CEEWtU_T.js} +3 -3
  120. package/dist/{esm-es5/x509_certificate-Dmgw53TR.js.map → esm/x509_certificate-CEEWtU_T.js.map} +1 -1
  121. package/dist/esm/{x509_crl-B5TRu79b.js → x509_crl-BcZd9KVn.js} +4 -4
  122. package/dist/{esm-es5/x509_crl-B5TRu79b.js.map → esm/x509_crl-BcZd9KVn.js.map} +1 -1
  123. package/dist/esm-es5/{actions-DzoPRObK.js → actions-BOY2Tl0T.js} +2 -2
  124. package/dist/esm-es5/{actions-DzoPRObK.js.map → actions-BOY2Tl0T.js.map} +1 -1
  125. package/dist/esm-es5/{arrow_top-CF9pv-tQ.js → arrow_top-DL0RWe4n.js} +2 -2
  126. package/dist/{esm/arrow_top-CF9pv-tQ.js.map → esm-es5/arrow_top-DL0RWe4n.js.map} +1 -1
  127. package/dist/esm-es5/button-Bbh7MwG6.js +19 -0
  128. package/dist/esm-es5/button-Bbh7MwG6.js.map +1 -0
  129. package/dist/esm-es5/{certification_request-DazysL_f.js → certification_request-PeMaLTUD.js} +14 -14
  130. package/dist/esm-es5/certification_request-PeMaLTUD.js.map +1 -0
  131. package/dist/esm-es5/{cross-DdCuR1F2.js → cross-G84H_-QL.js} +2 -2
  132. package/dist/{esm/cross-DdCuR1F2.js.map → esm-es5/cross-G84H_-QL.js.map} +1 -1
  133. package/dist/esm-es5/{download-Cqfc-Sxf.js → download-ykcxSgxU.js} +2 -2
  134. package/dist/esm-es5/{download-Cqfc-Sxf.js.map → download-ykcxSgxU.js.map} +1 -1
  135. package/dist/esm-es5/index-CwgZaF40.js +6 -0
  136. package/dist/esm-es5/index-CwgZaF40.js.map +1 -0
  137. package/dist/esm-es5/index.js +1 -1
  138. package/dist/esm-es5/{link-qg3yKAoS.js → link-CGURvKy1.js} +3 -3
  139. package/dist/esm-es5/{link-qg3yKAoS.js.map → link-CGURvKy1.js.map} +1 -1
  140. package/dist/esm-es5/loader.js +2 -2
  141. package/dist/esm-es5/loader.js.map +1 -1
  142. package/dist/esm-es5/{miscellaneous-BJPX0Hs_.js → miscellaneous-bVeJt-6m.js} +2 -2
  143. package/dist/esm-es5/miscellaneous-bVeJt-6m.js.map +1 -0
  144. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +1 -1
  145. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js +2 -2
  146. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +1 -1
  147. package/dist/esm-es5/peculiar-button-menu_3.entry.js +1 -1
  148. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  149. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  150. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  151. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  152. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  153. package/dist/esm-es5/peculiar-text-hider.entry.js +1 -1
  154. package/dist/esm-es5/peculiar.js +2 -2
  155. package/dist/esm-es5/peculiar.js.map +1 -1
  156. package/dist/esm-es5/{pkcs10_certificate_request-SQcYKma2.js → pkcs10_certificate_request-CK8FH47X.js} +2 -2
  157. package/dist/{esm/pkcs10_certificate_request-SQcYKma2.js.map → esm-es5/pkcs10_certificate_request-CK8FH47X.js.map} +1 -1
  158. package/dist/esm-es5/{x509_certificate-Dmgw53TR.js → x509_certificate-CEEWtU_T.js} +2 -2
  159. package/dist/{esm/x509_certificate-Dmgw53TR.js.map → esm-es5/x509_certificate-CEEWtU_T.js.map} +1 -1
  160. package/dist/esm-es5/{x509_crl-B5TRu79b.js → x509_crl-BcZd9KVn.js} +4 -4
  161. package/dist/{esm/x509_crl-B5TRu79b.js.map → esm-es5/x509_crl-BcZd9KVn.js.map} +1 -1
  162. package/dist/peculiar/index.esm.js +1 -1
  163. package/dist/peculiar/loader.esm.js.map +1 -1
  164. package/dist/peculiar/p-00d6f11f.system.entry.js +111 -0
  165. package/dist/peculiar/p-00d6f11f.system.entry.js.map +1 -0
  166. package/dist/peculiar/{p-218364f2.entry.js → p-0de4837d.entry.js} +2 -2
  167. package/dist/peculiar/p-0de4837d.entry.js.map +1 -0
  168. package/dist/peculiar/{p-16aa5600.system.entry.js → p-14fcbc5c.system.entry.js} +2 -2
  169. package/dist/peculiar/p-14fcbc5c.system.entry.js.map +1 -0
  170. package/dist/peculiar/{p-7b0e7f43.entry.js → p-27ae6a3a.entry.js} +2 -2
  171. package/dist/peculiar/{p-ab6a8a44.entry.js → p-315805ce.entry.js} +2 -2
  172. package/dist/peculiar/p-315805ce.entry.js.map +1 -0
  173. package/dist/peculiar/{p-5b843427.entry.js → p-5479a530.entry.js} +2 -2
  174. package/dist/peculiar/{p-52444a44.system.entry.js → p-591a9019.system.entry.js} +2 -2
  175. package/dist/peculiar/p-591a9019.system.entry.js.map +1 -0
  176. package/dist/peculiar/{p-a3c0f753.system.entry.js → p-607d08e8.system.entry.js} +2 -2
  177. package/dist/peculiar/{p-44648a8e.system.entry.js → p-84f69023.system.entry.js} +2 -2
  178. package/dist/peculiar/{p-15c2b820.entry.js → p-9d9f24bd.entry.js} +2 -2
  179. package/dist/peculiar/{p-Cm-ylIxb.system.js → p-B4PdAFCr.system.js} +4 -4
  180. package/dist/peculiar/p-B4PdAFCr.system.js.map +1 -0
  181. package/dist/peculiar/p-BGASC3UX.system.js +5 -0
  182. package/dist/peculiar/p-BGASC3UX.system.js.map +1 -0
  183. package/dist/peculiar/{p-BcFnjn1R.system.js.map → p-BaebEpW0.system.js.map} +1 -1
  184. package/dist/peculiar/{p-B2YrZuK2.system.js → p-Bi5mjeeg.system.js} +2 -2
  185. package/dist/peculiar/{p-B2YrZuK2.system.js.map → p-Bi5mjeeg.system.js.map} +1 -1
  186. package/dist/peculiar/{p-CDh6shXP.system.js → p-BipKYW6e.system.js} +8 -8
  187. package/dist/peculiar/p-BipKYW6e.system.js.map +1 -0
  188. package/dist/peculiar/{p-wYK0iVYg.system.js → p-Bknpl7EO.system.js} +3 -3
  189. package/dist/peculiar/{p-wYK0iVYg.system.js.map → p-Bknpl7EO.system.js.map} +1 -1
  190. package/dist/peculiar/p-BloT0Xj9.system.js.map +1 -0
  191. package/dist/peculiar/p-BypepohK.system.js.map +1 -0
  192. package/dist/peculiar/{p-DRoyzOgk.system.js → p-C9sY8yng.system.js} +2 -2
  193. package/dist/peculiar/{p-DRoyzOgk.system.js.map → p-C9sY8yng.system.js.map} +1 -1
  194. package/dist/peculiar/{p-CJro0Exb.js → p-CGRNSrHk.js} +43 -43
  195. package/dist/peculiar/p-CGRNSrHk.js.map +1 -0
  196. package/dist/peculiar/{p-DhdG07f8.js → p-CHnDlTqM.js} +2 -2
  197. package/dist/peculiar/{p-DhdG07f8.js.map → p-CHnDlTqM.js.map} +1 -1
  198. package/dist/peculiar/{p-YHrZ3f_s.system.js → p-CZwhKPgb.system.js} +2 -2
  199. package/dist/peculiar/p-CZwhKPgb.system.js.map +1 -0
  200. package/dist/peculiar/{p-BA8os2l6.system.js.map → p-CbJQZ9Hh.system.js.map} +1 -1
  201. package/dist/peculiar/{p-BBgwMHRZ.system.js → p-CdS84qJs.system.js} +5 -5
  202. package/dist/peculiar/{p-BBgwMHRZ.system.js.map → p-CdS84qJs.system.js.map} +1 -1
  203. package/dist/peculiar/{p-BmIps4bV.system.js → p-CezfC5i1.system.js} +41 -41
  204. package/dist/peculiar/p-CezfC5i1.system.js.map +1 -0
  205. package/dist/peculiar/{p-0HZUc9Ix.js → p-CjWRKsN-.js} +2 -2
  206. package/dist/peculiar/{p-0HZUc9Ix.js.map → p-CjWRKsN-.js.map} +1 -1
  207. package/dist/peculiar/{p-CkwiD_ia.js → p-CutTi-2B.js} +4 -4
  208. package/dist/peculiar/p-CutTi-2B.js.map +1 -0
  209. package/dist/peculiar/p-CwgZaF40.js +6 -0
  210. package/dist/peculiar/p-CwgZaF40.js.map +1 -0
  211. package/dist/peculiar/{p-DzItK48Y.js → p-D1eNnGDF.js} +4 -4
  212. package/dist/peculiar/{p-DzItK48Y.js.map → p-D1eNnGDF.js.map} +1 -1
  213. package/dist/peculiar/{p-BP2bmYR2.system.js → p-D8xU284r.system.js} +3 -3
  214. package/dist/peculiar/{p-BP2bmYR2.system.js.map → p-D8xU284r.system.js.map} +1 -1
  215. package/dist/peculiar/p-DKl0YViA.system.js +6 -0
  216. package/dist/peculiar/p-DKl0YViA.system.js.map +1 -0
  217. package/dist/peculiar/{p-CEHpBNWe.js → p-DMZr5ztF.js} +3 -3
  218. package/dist/peculiar/{p-CEHpBNWe.js.map → p-DMZr5ztF.js.map} +1 -1
  219. package/dist/peculiar/{p-BKKflyKt.system.js → p-DRvp86xt.system.js} +5 -5
  220. package/dist/peculiar/{p-BKKflyKt.system.js.map → p-DRvp86xt.system.js.map} +1 -1
  221. package/dist/peculiar/{p-DkAhB3Vy.js → p-DanjeXNk.js} +2 -2
  222. package/dist/peculiar/{p-DkAhB3Vy.js.map → p-DanjeXNk.js.map} +1 -1
  223. package/dist/peculiar/{p-3zhoLQno.js → p-DrmgUhyv.js} +4 -4
  224. package/dist/peculiar/{p-3zhoLQno.js.map → p-DrmgUhyv.js.map} +1 -1
  225. package/dist/peculiar/p-ITVWR0oT.system.js.map +1 -0
  226. package/dist/peculiar/{p-BBZwtkNN.system.js → p-J1t5v5N3.system.js} +4 -4
  227. package/dist/peculiar/{p-BBZwtkNN.system.js.map → p-J1t5v5N3.system.js.map} +1 -1
  228. package/dist/peculiar/{p-BHBizfwo.js → p-JyD6URnB.js} +3 -3
  229. package/dist/peculiar/{p-BHBizfwo.js.map → p-JyD6URnB.js.map} +1 -1
  230. package/dist/peculiar/{p-D13P_msn.system.js.map → p-N3w4Sc5c.system.js.map} +1 -1
  231. package/dist/peculiar/{p-BOSH9vjy.system.js → p-NnCM1ETy.system.js} +3 -3
  232. package/dist/peculiar/{p-BOSH9vjy.system.js.map → p-NnCM1ETy.system.js.map} +1 -1
  233. package/dist/peculiar/{p-DazysL_f.js → p-PeMaLTUD.js} +7 -7
  234. package/dist/peculiar/p-PeMaLTUD.js.map +1 -0
  235. package/dist/peculiar/{p-CeKqQ13Z.js → p-ZT6tVIen.js} +4 -4
  236. package/dist/peculiar/{p-CeKqQ13Z.js.map → p-ZT6tVIen.js.map} +1 -1
  237. package/dist/peculiar/p-c8b3766a.entry.js +110 -0
  238. package/dist/peculiar/p-c8b3766a.entry.js.map +1 -0
  239. package/dist/peculiar/{p-d16ddef8.system.entry.js → p-de857304.system.entry.js} +2 -2
  240. package/dist/peculiar/{p--Pej0I-A.system.js.map → p-eziSY5IJ.system.js.map} +1 -1
  241. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +1 -1
  242. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  243. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
  244. package/dist/peculiar/peculiar.esm.js +1 -1
  245. package/dist/peculiar/peculiar.esm.js.map +1 -1
  246. package/dist/peculiar/peculiar.js +1 -1
  247. package/dist/types/components/typography/typography.d.ts +2 -1
  248. package/dist/types/components.d.ts +26 -0
  249. package/dist/types/stencil-public-runtime.d.ts +34 -6
  250. package/hydrate/index.d.ts +38 -24
  251. package/hydrate/index.js +4281 -3311
  252. package/hydrate/index.mjs +4280 -3312
  253. package/package.json +32 -33
  254. package/dist/cjs/app-globals-BOZYdIuK.js +0 -11
  255. package/dist/cjs/app-globals-BOZYdIuK.js.map +0 -1
  256. package/dist/cjs/button-B0CduHSE.js.map +0 -1
  257. package/dist/cjs/certification_request-DaJSDP3R.js.map +0 -1
  258. package/dist/cjs/index-BO3rFndV.js.map +0 -1
  259. package/dist/cjs/miscellaneous-Ce9aGjKB.js.map +0 -1
  260. package/dist/esm/app-globals-zVR349KA.js +0 -9
  261. package/dist/esm/app-globals-zVR349KA.js.map +0 -1
  262. package/dist/esm/button-Do0R_8PZ.js.map +0 -1
  263. package/dist/esm/certification_request-DazysL_f.js.map +0 -1
  264. package/dist/esm/index-DDDrq3In.js.map +0 -1
  265. package/dist/esm/miscellaneous-BJPX0Hs_.js.map +0 -1
  266. package/dist/esm-es5/app-globals-zVR349KA.js +0 -5
  267. package/dist/esm-es5/app-globals-zVR349KA.js.map +0 -1
  268. package/dist/esm-es5/button-Do0R_8PZ.js +0 -19
  269. package/dist/esm-es5/button-Do0R_8PZ.js.map +0 -1
  270. package/dist/esm-es5/certification_request-DazysL_f.js.map +0 -1
  271. package/dist/esm-es5/index-DDDrq3In.js +0 -6
  272. package/dist/esm-es5/index-DDDrq3In.js.map +0 -1
  273. package/dist/esm-es5/miscellaneous-BJPX0Hs_.js.map +0 -1
  274. package/dist/peculiar/p-16aa5600.system.entry.js.map +0 -1
  275. package/dist/peculiar/p-1cbb0d6b.entry.js +0 -110
  276. package/dist/peculiar/p-1cbb0d6b.entry.js.map +0 -1
  277. package/dist/peculiar/p-218364f2.entry.js.map +0 -1
  278. package/dist/peculiar/p-52444a44.system.entry.js.map +0 -1
  279. package/dist/peculiar/p-BAB4EyrL.system.js.map +0 -1
  280. package/dist/peculiar/p-BFenL1ap.system.js +0 -6
  281. package/dist/peculiar/p-BFenL1ap.system.js.map +0 -1
  282. package/dist/peculiar/p-BmIps4bV.system.js.map +0 -1
  283. package/dist/peculiar/p-CDh6shXP.system.js.map +0 -1
  284. package/dist/peculiar/p-CJro0Exb.js.map +0 -1
  285. package/dist/peculiar/p-CWs-Ocvt.system.js.map +0 -1
  286. package/dist/peculiar/p-CkwiD_ia.js.map +0 -1
  287. package/dist/peculiar/p-Cm-ylIxb.system.js.map +0 -1
  288. package/dist/peculiar/p-CwlxH4oM.system.js +0 -5
  289. package/dist/peculiar/p-CwlxH4oM.system.js.map +0 -1
  290. package/dist/peculiar/p-D5BWI7FK.system.js +0 -5
  291. package/dist/peculiar/p-D5BWI7FK.system.js.map +0 -1
  292. package/dist/peculiar/p-DDDrq3In.js +0 -6
  293. package/dist/peculiar/p-DDDrq3In.js.map +0 -1
  294. package/dist/peculiar/p-DJRm54BZ.system.js.map +0 -1
  295. package/dist/peculiar/p-DazysL_f.js.map +0 -1
  296. package/dist/peculiar/p-YHrZ3f_s.system.js.map +0 -1
  297. package/dist/peculiar/p-ab6a8a44.entry.js.map +0 -1
  298. package/dist/peculiar/p-d9013293.system.entry.js +0 -111
  299. package/dist/peculiar/p-d9013293.system.entry.js.map +0 -1
  300. package/dist/peculiar/p-zVR349KA.js +0 -5
  301. package/dist/peculiar/p-zVR349KA.js.map +0 -1
  302. /package/dist/peculiar/{p-7b0e7f43.entry.js.map → p-27ae6a3a.entry.js.map} +0 -0
  303. /package/dist/peculiar/{p-5b843427.entry.js.map → p-5479a530.entry.js.map} +0 -0
  304. /package/dist/peculiar/{p-a3c0f753.system.entry.js.map → p-607d08e8.system.entry.js.map} +0 -0
  305. /package/dist/peculiar/{p-44648a8e.system.entry.js.map → p-84f69023.system.entry.js.map} +0 -0
  306. /package/dist/peculiar/{p-15c2b820.entry.js.map → p-9d9f24bd.entry.js.map} +0 -0
  307. /package/dist/peculiar/{p-d16ddef8.system.entry.js.map → p-de857304.system.entry.js.map} +0 -0
@@ -1,4 +1,4 @@
1
- var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function r(){this.constructor=t}t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,i,r){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):n(e.value).then(a,s)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,n,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(i=0)),i)try{if(r=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(s[0]===6&&i.label<o[1]){i.label=o[1];o=s;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(s);break}if(o[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];n=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(e,t){var i={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)i[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,r=Object.getOwnPropertySymbols(e);n<r.length;n++){if(t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n]))i[r[n]]=e[r[n]]}return i};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var r=0,n=t.length,o;r<n;r++){if(o||!(r in t)){if(!o)o=Array.prototype.slice.call(t,0,r);o[r]=t[r]}}return e.concat(o||Array.prototype.slice.call(t))};var _e;
1
+ var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,r,i){function n(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i["throw"](e))}catch(e){o(e)}}function c(e){e.done?r(e.value):n(e.value).then(a,s)}c((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,n,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return c([e,t])}}function c(s){if(i)throw new TypeError("Generator is already executing.");while(a&&(a=0,s[0]&&(r=0)),r)try{if(i=1,n&&(o=s[0]&2?n["return"]:s[0]?n["throw"]||((o=n["return"])&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;if(n=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:r.label++;return{value:s[1],done:false};case 5:r.label++;n=s[1];s=[0];continue;case 7:s=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){r.label=s[1];break}if(s[0]===6&&r.label<o[1]){r.label=o[1];o=s;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(s);break}if(o[2])r.ops.pop();r.trys.pop();continue}s=t.call(e,r)}catch(e){s=[6,e];n=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __rest=this&&this.__rest||function(e,t){var r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0)r[i]=e[i];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++){if(t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n]))r[i[n]]=e[i[n]]}return r};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||Array.prototype.slice.call(t))};var _e;
2
2
  /*!
3
3
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
4
4
  */
@@ -8,7 +8,7 @@ var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setP
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */function downloadFromBuffer(e,t,i,r){if(r===void 0){r="application/octet-stream"}var n=new Blob([e],{type:r});if(navigator.msSaveBlob){navigator.msSaveBlob(n,"".concat(t,".").concat(i));return new Promise((function(e){setTimeout(e,100)}))}var o=window.URL.createObjectURL(n);var a=document.createElement("a");var s=document.createElement("iframe");a.style.display="none";s.style.display="none";s.name=o;document.body.appendChild(s);a.href=o;a.target=o;a.download="".concat(t,".").concat(i);document.body.appendChild(a);a.dispatchEvent(new MouseEvent("click"));document.body.removeChild(a);return new Promise((function(e){setTimeout((function(){document.body.removeChild(s);e()}),100)}))}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}var build={};
11
+ */function downloadFromBuffer(e,t,r,i){if(i===void 0){i="application/octet-stream"}var n=new Blob([e],{type:i});if(navigator.msSaveBlob){navigator.msSaveBlob(n,"".concat(t,".").concat(r));return new Promise((function(e){setTimeout(e,100)}))}var o=window.URL.createObjectURL(n);var a=document.createElement("a");var s=document.createElement("iframe");a.style.display="none";s.style.display="none";s.name=o;document.body.appendChild(s);a.href=o;a.target=o;a.download="".concat(t,".").concat(r);document.body.appendChild(a);a.dispatchEvent(new MouseEvent("click"));document.body.removeChild(a);return new Promise((function(e){setTimeout((function(){document.body.removeChild(s);e()}),100)}))}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}var build={};
12
12
  /*!
13
13
  * MIT License
14
14
  *
@@ -32,7 +32,7 @@ var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setP
32
32
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
33
  * SOFTWARE.
34
34
  *
35
- */var hasRequiredBuild;function requireBuild(){if(hasRequiredBuild)return build;hasRequiredBuild=1;var e="[object ArrayBuffer]";var t=function(){function t(){}t.isArrayBuffer=function(t){return Object.prototype.toString.call(t)===e};t.toArrayBuffer=function(e){if(this.isArrayBuffer(e)){return e}if(e.byteLength===e.buffer.byteLength){return e.buffer}if(e.byteOffset===0&&e.byteLength===e.buffer.byteLength){return e.buffer}return this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer};t.toUint8Array=function(e){return this.toView(e,Uint8Array)};t.toView=function(e,t){if(e.constructor===t){return e}if(this.isArrayBuffer(e)){return new t(e)}if(this.isArrayBufferView(e)){return new t(e.buffer,e.byteOffset,e.byteLength)}throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")};t.isBufferSource=function(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)};t.isArrayBufferView=function(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)};t.isEqual=function(e,i){var r=t.toUint8Array(e);var n=t.toUint8Array(i);if(r.length!==n.byteLength){return false}for(var o=0;o<r.length;o++){if(r[o]!==n[o]){return false}}return true};t.concat=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var i;if(Array.isArray(e[0])&&!(e[1]instanceof Function)){i=e[0]}else if(Array.isArray(e[0])&&e[1]instanceof Function){i=e[0]}else{if(e[e.length-1]instanceof Function){i=e.slice(0,e.length-1)}else{i=e}}var r=0;for(var n=0,o=i;n<o.length;n++){var a=o[n];r+=a.byteLength}var s=new Uint8Array(r);var c=0;for(var u=0,p=i;u<p.length;u++){var a=p[u];var f=this.toUint8Array(a);s.set(f,c);c+=f.length}if(e[e.length-1]instanceof Function){return this.toView(s,e[e.length-1])}return s.buffer};return t}();var i="string";var r=/^[0-9a-f\s]+$/i;var n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;var o=/^[a-zA-Z0-9-_]+$/;var a=function(){function e(){}e.fromString=function(e){var t=unescape(encodeURIComponent(e));var i=new Uint8Array(t.length);for(var r=0;r<t.length;r++){i[r]=t.charCodeAt(r)}return i.buffer};e.toString=function(e){var i=t.toUint8Array(e);var r="";for(var n=0;n<i.length;n++){r+=String.fromCharCode(i[n])}var o=decodeURIComponent(escape(r));return o};return e}();var s=function(){function e(){}e.toString=function(e,i){if(i===void 0){i=false}var r=t.toArrayBuffer(e);var n=new DataView(r);var o="";for(var a=0;a<r.byteLength;a+=2){var s=n.getUint16(a,i);o+=String.fromCharCode(s)}return o};e.fromString=function(e,t){if(t===void 0){t=false}var i=new ArrayBuffer(e.length*2);var r=new DataView(i);for(var n=0;n<e.length;n++){r.setUint16(n*2,e.charCodeAt(n),t)}return i};return e}();var c=function(){function e(){}e.isHex=function(e){return typeof e===i&&r.test(e)};e.isBase64=function(e){return typeof e===i&&n.test(e)};e.isBase64Url=function(e){return typeof e===i&&o.test(e)};e.ToString=function(e,i){if(i===void 0){i="utf8"}var r=t.toUint8Array(e);switch(i.toLowerCase()){case"utf8":return this.ToUtf8String(r);case"binary":return this.ToBinary(r);case"hex":return this.ToHex(r);case"base64":return this.ToBase64(r);case"base64url":return this.ToBase64Url(r);case"utf16le":return s.toString(r,true);case"utf16":case"utf16be":return s.toString(r);default:throw new Error("Unknown type of encoding '".concat(i,"'"))}};e.FromString=function(e,t){if(t===void 0){t="utf8"}if(!e){return new ArrayBuffer(0)}switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return s.fromString(e,true);case"utf16":case"utf16be":return s.fromString(e);default:throw new Error("Unknown type of encoding '".concat(t,"'"))}};e.ToBase64=function(e){var i=t.toUint8Array(e);if(typeof btoa!=="undefined"){var r=this.ToString(i,"binary");return btoa(r)}else{return Buffer.from(i).toString("base64")}};e.FromBase64=function(t){var i=this.formatString(t);if(!i){return new ArrayBuffer(0)}if(!e.isBase64(i)){throw new TypeError("Argument 'base64Text' is not Base64 encoded")}if(typeof atob!=="undefined"){return this.FromBinary(atob(i))}else{return new Uint8Array(Buffer.from(i,"base64")).buffer}};e.FromBase64Url=function(t){var i=this.formatString(t);if(!i){return new ArrayBuffer(0)}if(!e.isBase64Url(i)){throw new TypeError("Argument 'base64url' is not Base64Url encoded")}return this.FromBase64(this.Base64Padding(i.replace(/\-/g,"+").replace(/\_/g,"/")))};e.ToBase64Url=function(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")};e.FromUtf8String=function(t,i){if(i===void 0){i=e.DEFAULT_UTF8_ENCODING}switch(i){case"ascii":return this.FromBinary(t);case"utf8":return a.fromString(t);case"utf16":case"utf16be":return s.fromString(t);case"utf16le":case"usc2":return s.fromString(t,true);default:throw new Error("Unknown type of encoding '".concat(i,"'"))}};e.ToUtf8String=function(t,i){if(i===void 0){i=e.DEFAULT_UTF8_ENCODING}switch(i){case"ascii":return this.ToBinary(t);case"utf8":return a.toString(t);case"utf16":case"utf16be":return s.toString(t);case"utf16le":case"usc2":return s.toString(t,true);default:throw new Error("Unknown type of encoding '".concat(i,"'"))}};e.FromBinary=function(e){var t=e.length;var i=new Uint8Array(t);for(var r=0;r<t;r++){i[r]=e.charCodeAt(r)}return i.buffer};e.ToBinary=function(e){var i=t.toUint8Array(e);var r="";for(var n=0;n<i.length;n++){r+=String.fromCharCode(i[n])}return r};e.ToHex=function(e){var i=t.toUint8Array(e);var r="";var n=i.length;for(var o=0;o<n;o++){var a=i[o];if(a<16){r+="0"}r+=a.toString(16)}return r};e.FromHex=function(t){var i=this.formatString(t);if(!i){return new ArrayBuffer(0)}if(!e.isHex(i)){throw new TypeError("Argument 'hexString' is not HEX encoded")}if(i.length%2){i="0".concat(i)}var r=new Uint8Array(i.length/2);for(var n=0;n<i.length;n=n+2){var o=i.slice(n,n+2);r[n/2]=parseInt(o,16)}return r.buffer};e.ToUtf16String=function(e,t){if(t===void 0){t=false}return s.toString(e,t)};e.FromUtf16String=function(e,t){if(t===void 0){t=false}return s.fromString(e,t)};e.Base64Padding=function(e){var t=4-e.length%4;if(t<4){for(var i=0;i<t;i++){e+="="}}return e};e.formatString=function(e){return(e===null||e===void 0?void 0:e.replace(/[\n\r\t ]/g,""))||""};return e}();c.DEFAULT_UTF8_ENCODING="utf8";function u(e){var t=[];for(var i=1;i<arguments.length;i++){t[i-1]=arguments[i]}var r=arguments[0];for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var a in o){r[a]=o[a]}}return r}function p(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var i=e.map((function(e){return e.byteLength})).reduce((function(e,t){return e+t}));var r=new Uint8Array(i);var n=0;e.map((function(e){return new Uint8Array(e)})).forEach((function(e){for(var t=0,i=e;t<i.length;t++){var o=i[t];r[n++]=o}}));return r.buffer}function f(e,t){if(!(e&&t)){return false}if(e.byteLength!==t.byteLength){return false}var i=new Uint8Array(e);var r=new Uint8Array(t);for(var n=0;n<e.byteLength;n++){if(i[n]!==r[n]){return false}}return true}build.BufferSourceConverter=t;build.Convert=c;build.assign=u;build.combine=p;build.isEqual=f;return build}var buildExports=requireBuild();
35
+ */var hasRequiredBuild;function requireBuild(){if(hasRequiredBuild)return build;hasRequiredBuild=1;var e="[object ArrayBuffer]";var t=function(){function t(){}t.isArrayBuffer=function(t){return Object.prototype.toString.call(t)===e};t.toArrayBuffer=function(e){if(this.isArrayBuffer(e)){return e}if(e.byteLength===e.buffer.byteLength){return e.buffer}if(e.byteOffset===0&&e.byteLength===e.buffer.byteLength){return e.buffer}return this.toUint8Array(e.buffer).slice(e.byteOffset,e.byteOffset+e.byteLength).buffer};t.toUint8Array=function(e){return this.toView(e,Uint8Array)};t.toView=function(e,t){if(e.constructor===t){return e}if(this.isArrayBuffer(e)){return new t(e)}if(this.isArrayBufferView(e)){return new t(e.buffer,e.byteOffset,e.byteLength)}throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")};t.isBufferSource=function(e){return this.isArrayBufferView(e)||this.isArrayBuffer(e)};t.isArrayBufferView=function(e){return ArrayBuffer.isView(e)||e&&this.isArrayBuffer(e.buffer)};t.isEqual=function(e,r){var i=t.toUint8Array(e);var n=t.toUint8Array(r);if(i.length!==n.byteLength){return false}for(var o=0;o<i.length;o++){if(i[o]!==n[o]){return false}}return true};t.concat=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r;if(Array.isArray(e[0])&&!(e[1]instanceof Function)){r=e[0]}else if(Array.isArray(e[0])&&e[1]instanceof Function){r=e[0]}else{if(e[e.length-1]instanceof Function){r=e.slice(0,e.length-1)}else{r=e}}var i=0;for(var n=0,o=r;n<o.length;n++){var a=o[n];i+=a.byteLength}var s=new Uint8Array(i);var c=0;for(var u=0,p=r;u<p.length;u++){var a=p[u];var f=this.toUint8Array(a);s.set(f,c);c+=f.length}if(e[e.length-1]instanceof Function){return this.toView(s,e[e.length-1])}return s.buffer};return t}();var r="string";var i=/^[0-9a-f\s]+$/i;var n=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;var o=/^[a-zA-Z0-9-_]+$/;var a=function(){function e(){}e.fromString=function(e){var t=unescape(encodeURIComponent(e));var r=new Uint8Array(t.length);for(var i=0;i<t.length;i++){r[i]=t.charCodeAt(i)}return r.buffer};e.toString=function(e){var r=t.toUint8Array(e);var i="";for(var n=0;n<r.length;n++){i+=String.fromCharCode(r[n])}var o=decodeURIComponent(escape(i));return o};return e}();var s=function(){function e(){}e.toString=function(e,r){if(r===void 0){r=false}var i=t.toArrayBuffer(e);var n=new DataView(i);var o="";for(var a=0;a<i.byteLength;a+=2){var s=n.getUint16(a,r);o+=String.fromCharCode(s)}return o};e.fromString=function(e,t){if(t===void 0){t=false}var r=new ArrayBuffer(e.length*2);var i=new DataView(r);for(var n=0;n<e.length;n++){i.setUint16(n*2,e.charCodeAt(n),t)}return r};return e}();var c=function(){function e(){}e.isHex=function(e){return typeof e===r&&i.test(e)};e.isBase64=function(e){return typeof e===r&&n.test(e)};e.isBase64Url=function(e){return typeof e===r&&o.test(e)};e.ToString=function(e,r){if(r===void 0){r="utf8"}var i=t.toUint8Array(e);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(i);case"binary":return this.ToBinary(i);case"hex":return this.ToHex(i);case"base64":return this.ToBase64(i);case"base64url":return this.ToBase64Url(i);case"utf16le":return s.toString(i,true);case"utf16":case"utf16be":return s.toString(i);default:throw new Error("Unknown type of encoding '".concat(r,"'"))}};e.FromString=function(e,t){if(t===void 0){t="utf8"}if(!e){return new ArrayBuffer(0)}switch(t.toLowerCase()){case"utf8":return this.FromUtf8String(e);case"binary":return this.FromBinary(e);case"hex":return this.FromHex(e);case"base64":return this.FromBase64(e);case"base64url":return this.FromBase64Url(e);case"utf16le":return s.fromString(e,true);case"utf16":case"utf16be":return s.fromString(e);default:throw new Error("Unknown type of encoding '".concat(t,"'"))}};e.ToBase64=function(e){var r=t.toUint8Array(e);if(typeof btoa!=="undefined"){var i=this.ToString(r,"binary");return btoa(i)}else{return Buffer.from(r).toString("base64")}};e.FromBase64=function(t){var r=this.formatString(t);if(!r){return new ArrayBuffer(0)}if(!e.isBase64(r)){throw new TypeError("Argument 'base64Text' is not Base64 encoded")}if(typeof atob!=="undefined"){return this.FromBinary(atob(r))}else{return new Uint8Array(Buffer.from(r,"base64")).buffer}};e.FromBase64Url=function(t){var r=this.formatString(t);if(!r){return new ArrayBuffer(0)}if(!e.isBase64Url(r)){throw new TypeError("Argument 'base64url' is not Base64Url encoded")}return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))};e.ToBase64Url=function(e){return this.ToBase64(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")};e.FromUtf8String=function(t,r){if(r===void 0){r=e.DEFAULT_UTF8_ENCODING}switch(r){case"ascii":return this.FromBinary(t);case"utf8":return a.fromString(t);case"utf16":case"utf16be":return s.fromString(t);case"utf16le":case"usc2":return s.fromString(t,true);default:throw new Error("Unknown type of encoding '".concat(r,"'"))}};e.ToUtf8String=function(t,r){if(r===void 0){r=e.DEFAULT_UTF8_ENCODING}switch(r){case"ascii":return this.ToBinary(t);case"utf8":return a.toString(t);case"utf16":case"utf16be":return s.toString(t);case"utf16le":case"usc2":return s.toString(t,true);default:throw new Error("Unknown type of encoding '".concat(r,"'"))}};e.FromBinary=function(e){var t=e.length;var r=new Uint8Array(t);for(var i=0;i<t;i++){r[i]=e.charCodeAt(i)}return r.buffer};e.ToBinary=function(e){var r=t.toUint8Array(e);var i="";for(var n=0;n<r.length;n++){i+=String.fromCharCode(r[n])}return i};e.ToHex=function(e){var r=t.toUint8Array(e);var i="";var n=r.length;for(var o=0;o<n;o++){var a=r[o];if(a<16){i+="0"}i+=a.toString(16)}return i};e.FromHex=function(t){var r=this.formatString(t);if(!r){return new ArrayBuffer(0)}if(!e.isHex(r)){throw new TypeError("Argument 'hexString' is not HEX encoded")}if(r.length%2){r="0".concat(r)}var i=new Uint8Array(r.length/2);for(var n=0;n<r.length;n=n+2){var o=r.slice(n,n+2);i[n/2]=parseInt(o,16)}return i.buffer};e.ToUtf16String=function(e,t){if(t===void 0){t=false}return s.toString(e,t)};e.FromUtf16String=function(e,t){if(t===void 0){t=false}return s.fromString(e,t)};e.Base64Padding=function(e){var t=4-e.length%4;if(t<4){for(var r=0;r<t;r++){e+="="}}return e};e.formatString=function(e){return(e===null||e===void 0?void 0:e.replace(/[\n\r\t ]/g,""))||""};return e}();c.DEFAULT_UTF8_ENCODING="utf8";function u(e){var t=[];for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}var i=arguments[0];for(var n=1;n<arguments.length;n++){var o=arguments[n];for(var a in o){i[a]=o[a]}}return i}function p(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=e.map((function(e){return e.byteLength})).reduce((function(e,t){return e+t}));var i=new Uint8Array(r);var n=0;e.map((function(e){return new Uint8Array(e)})).forEach((function(e){for(var t=0,r=e;t<r.length;t++){var o=r[t];i[n++]=o}}));return i.buffer}function f(e,t){if(!(e&&t)){return false}if(e.byteLength!==t.byteLength){return false}var r=new Uint8Array(e);var i=new Uint8Array(t);for(var n=0;n<e.byteLength;n++){if(r[n]!==i[n]){return false}}return true}build.BufferSourceConverter=t;build.Convert=c;build.assign=u;build.combine=p;build.isEqual=f;return build}var buildExports=requireBuild();
36
36
  /**
37
37
  * @license
38
38
  * Copyright (c) Peculiar Ventures, LLC.
@@ -42,7 +42,7 @@ var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setP
42
42
  */var Download=function(){function e(){}return e}();Download.cert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-cert")}};Download.attrCert={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"cer","application/pkix-attr-cert")},asDER:function(e,t){downloadFromBuffer(e,t,"cer","application/pkix-attr-cert")}};Download.csr={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"csr","application/pkcs10")},asDER:function(e,t){downloadFromBuffer(e,t,"csr","application/pkcs10")}};Download.crl={asPEM:function(e,t){downloadFromBuffer(buildExports.Convert.FromString(e),t,"crl","application/pkix-crl")},asDER:function(e,t){downloadFromBuffer(e,t,"crl","application/pkix-crl")}};
43
43
  /*!
44
44
  Copyright (c) Peculiar Ventures, LLC
45
- */function utilFromBase(e,t){var i=0;if(e.length===1){return e[0]}for(var r=e.length-1;r>=0;r--){i+=e[e.length-1-r]*Math.pow(2,t*r)}return i}function utilToBase(e,t,i){if(i===void 0){i=-1}var r=i;var n=e;var o=0;var a=Math.pow(2,t);for(var s=1;s<8;s++){if(e<a){var c=void 0;if(r<0){c=new ArrayBuffer(s);o=s}else{if(r<s){return new ArrayBuffer(0)}c=new ArrayBuffer(r);o=r}var u=new Uint8Array(c);for(var p=s-1;p>=0;p--){var f=Math.pow(2,p*t);u[o-p-1]=Math.floor(n/f);n-=u[o-p-1]*f}return c}a*=Math.pow(2,t)}return new ArrayBuffer(0)}function utilConcatView(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var i=0;var r=0;for(var n=0,o=e;n<o.length;n++){var a=o[n];i+=a.length}var s=new ArrayBuffer(i);var c=new Uint8Array(s);for(var u=0,p=e;u<p.length;u++){var a=p[u];c.set(a,r);r+=a.length}return c}function utilDecodeTC(){var e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){var t=e[0]===255&&e[1]&128;var i=e[0]===0&&(e[1]&128)===0;if(t||i){this.warnings.push("Needlessly long format")}}var r=new ArrayBuffer(this.valueHex.byteLength);var n=new Uint8Array(r);for(var o=0;o<this.valueHex.byteLength;o++){n[o]=0}n[0]=e[0]&128;var a=utilFromBase(n,8);var s=new ArrayBuffer(this.valueHex.byteLength);var c=new Uint8Array(s);for(var u=0;u<this.valueHex.byteLength;u++){c[u]=e[u]}c[0]&=127;var p=utilFromBase(c,8);return p-a}function utilEncodeTC(e){var t=e<0?e*-1:e;var i=128;for(var r=1;r<8;r++){if(t<=i){if(e<0){var n=i-t;var o=utilToBase(n,8,r);var a=new Uint8Array(o);a[0]|=128;return o}var s=utilToBase(t,8,r);var c=new Uint8Array(s);if(c[0]&128){var u=s.slice(0);var p=new Uint8Array(u);s=new ArrayBuffer(s.byteLength+1);c=new Uint8Array(s);for(var f=0;f<u.byteLength;f++){c[f+1]=p[f]}c[0]=0}return s}i*=Math.pow(2,8)}return new ArrayBuffer(0)}function isEqualBuffer(e,t){if(e.byteLength!==t.byteLength){return false}var i=new Uint8Array(e);var r=new Uint8Array(t);for(var n=0;n<i.length;n++){if(i[n]!==r[n]){return false}}return true}function padNumber(e,t){var i=e.toString(10);if(t<i.length){return""}var r=t-i.length;var n=new Array(r);for(var o=0;o<r;o++){n[o]="0"}var a=n.join("");return a.concat(i)}
45
+ */function utilFromBase(e,t){var r=0;if(e.length===1){return e[0]}for(var i=e.length-1;i>=0;i--){r+=e[e.length-1-i]*Math.pow(2,t*i)}return r}function utilToBase(e,t,r){if(r===void 0){r=-1}var i=r;var n=e;var o=0;var a=Math.pow(2,t);for(var s=1;s<8;s++){if(e<a){var c=void 0;if(i<0){c=new ArrayBuffer(s);o=s}else{if(i<s){return new ArrayBuffer(0)}c=new ArrayBuffer(i);o=i}var u=new Uint8Array(c);for(var p=s-1;p>=0;p--){var f=Math.pow(2,p*t);u[o-p-1]=Math.floor(n/f);n-=u[o-p-1]*f}return c}a*=Math.pow(2,t)}return new ArrayBuffer(0)}function utilConcatView(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}var r=0;var i=0;for(var n=0,o=e;n<o.length;n++){var a=o[n];r+=a.length}var s=new ArrayBuffer(r);var c=new Uint8Array(s);for(var u=0,p=e;u<p.length;u++){var a=p[u];c.set(a,i);i+=a.length}return c}function utilDecodeTC(){var e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){var t=e[0]===255&&e[1]&128;var r=e[0]===0&&(e[1]&128)===0;if(t||r){this.warnings.push("Needlessly long format")}}var i=new ArrayBuffer(this.valueHex.byteLength);var n=new Uint8Array(i);for(var o=0;o<this.valueHex.byteLength;o++){n[o]=0}n[0]=e[0]&128;var a=utilFromBase(n,8);var s=new ArrayBuffer(this.valueHex.byteLength);var c=new Uint8Array(s);for(var u=0;u<this.valueHex.byteLength;u++){c[u]=e[u]}c[0]&=127;var p=utilFromBase(c,8);return p-a}function utilEncodeTC(e){var t=e<0?e*-1:e;var r=128;for(var i=1;i<8;i++){if(t<=r){if(e<0){var n=r-t;var o=utilToBase(n,8,i);var a=new Uint8Array(o);a[0]|=128;return o}var s=utilToBase(t,8,i);var c=new Uint8Array(s);if(c[0]&128){var u=s.slice(0);var p=new Uint8Array(u);s=new ArrayBuffer(s.byteLength+1);c=new Uint8Array(s);for(var f=0;f<u.byteLength;f++){c[f+1]=p[f]}c[0]=0}return s}r*=Math.pow(2,8)}return new ArrayBuffer(0)}function isEqualBuffer(e,t){if(e.byteLength!==t.byteLength){return false}var r=new Uint8Array(e);var i=new Uint8Array(t);for(var n=0;n<r.length;n++){if(r[n]!==i[n]){return false}}return true}function padNumber(e,t){var r=e.toString(10);if(t<r.length){return""}var i=t-r.length;var n=new Array(i);for(var o=0;o<i;o++){n[o]="0"}var a=n.join("");return a.concat(r)}
46
46
  /*!
47
47
  * Copyright (c) 2014, GMO GlobalSign
48
48
  * Copyright (c) 2015-2022, Peculiar Ventures
@@ -75,21 +75,21 @@ var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setP
75
75
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
76
76
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
77
77
  *
78
- */function assertBigInt(){if(typeof BigInt==="undefined"){throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}}function concat(e){var t=0;var i=0;for(var r=0;r<e.length;r++){var n=e[r];t+=n.byteLength}var o=new Uint8Array(t);for(var r=0;r<e.length;r++){var n=e[r];o.set(new Uint8Array(n),i);i+=n.byteLength}return o.buffer}function checkBufferParams(e,t,i,r){if(!(t instanceof Uint8Array)){e.error="Wrong parameter: inputBuffer must be 'Uint8Array'";return false}if(!t.byteLength){e.error="Wrong parameter: inputBuffer has zero length";return false}if(i<0){e.error="Wrong parameter: inputOffset less than zero";return false}if(r<0){e.error="Wrong parameter: inputLength less than zero";return false}if(t.byteLength-i-r<0){e.error="End of input reached before message was fully decoded (inconsistent offset and length values)";return false}return true}var ViewWriter=function(){function e(){this.items=[]}e.prototype.write=function(e){this.items.push(e)};e.prototype.final=function(){return concat(this.items)};return e}();var powers2=[new Uint8Array([1])];var digitsString="0123456789";var NAME="name";var VALUE_HEX_VIEW="valueHexView";var IS_HEX_ONLY="isHexOnly";var ID_BLOCK="idBlock";var TAG_CLASS="tagClass";var TAG_NUMBER="tagNumber";var IS_CONSTRUCTED="isConstructed";var FROM_BER="fromBER";var TO_BER="toBER";var LOCAL="local";var EMPTY_STRING="";var EMPTY_BUFFER=new ArrayBuffer(0);var EMPTY_VIEW=new Uint8Array(0);var END_OF_CONTENT_NAME="EndOfContent";var OCTET_STRING_NAME="OCTET STRING";var BIT_STRING_NAME="BIT STRING";function HexBlock(e){var t;return t=function(e){__extends(t,e);function t(){var t=[];for(var i=0;i<arguments.length;i++){t[i]=arguments[i]}var r;var n=e.apply(this,t)||this;var o=t[0]||{};n.isHexOnly=(r=o.isHexOnly)!==null&&r!==void 0?r:false;n.valueHexView=o.valueHex?buildExports.BufferSourceConverter.toUint8Array(o.valueHex):EMPTY_VIEW;return n}Object.defineProperty(t.prototype,"valueHex",{get:function(){return this.valueHexView.slice().buffer},set:function(e){this.valueHexView=new Uint8Array(e)},enumerable:false,configurable:true});t.prototype.fromBER=function(e,t,i){var r=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!checkBufferParams(this,r,t,i)){return-1}var n=t+i;this.valueHexView=r.subarray(t,n);if(!this.valueHexView.length){this.warnings.push("Zero buffer length");return t}this.blockLength=i;return n};t.prototype.toBER=function(e){if(e===void 0){e=false}if(!this.isHexOnly){this.error="Flag 'isHexOnly' is not set, abort";return EMPTY_BUFFER}if(e){return new ArrayBuffer(this.valueHexView.byteLength)}return this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isHexOnly:this.isHexOnly,valueHex:buildExports.Convert.ToHex(this.valueHexView)})};return t}(e),t.NAME="hexBlock",t}var LocalBaseBlock=function(){function e(e){var t=e===void 0?{}:e,i=t.blockLength,r=i===void 0?0:i,n=t.error,o=n===void 0?EMPTY_STRING:n,a=t.warnings,s=a===void 0?[]:a,c=t.valueBeforeDecode,u=c===void 0?EMPTY_VIEW:c;this.blockLength=r;this.error=o;this.warnings=s;this.valueBeforeDecodeView=buildExports.BufferSourceConverter.toUint8Array(u)}e.blockName=function(){return this.NAME};Object.defineProperty(e.prototype,"valueBeforeDecode",{get:function(){return this.valueBeforeDecodeView.slice().buffer},set:function(e){this.valueBeforeDecodeView=new Uint8Array(e)},enumerable:false,configurable:true});e.prototype.toJSON=function(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:buildExports.Convert.ToHex(this.valueBeforeDecodeView)}};return e}();LocalBaseBlock.NAME="baseBlock";var ValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBER=function(e,t,i){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")};t.prototype.toBER=function(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")};return t}(LocalBaseBlock);ValueBlock.NAME="valueBlock";var LocalIdentificationBlock=function(e){__extends(t,e);function t(t){var i=t===void 0?{}:t,r=i.idBlock,n=r===void 0?{}:r;var o,a,s,c;var u=e.call(this)||this;if(n){u.isHexOnly=(o=n.isHexOnly)!==null&&o!==void 0?o:false;u.valueHexView=n.valueHex?buildExports.BufferSourceConverter.toUint8Array(n.valueHex):EMPTY_VIEW;u.tagClass=(a=n.tagClass)!==null&&a!==void 0?a:-1;u.tagNumber=(s=n.tagNumber)!==null&&s!==void 0?s:-1;u.isConstructed=(c=n.isConstructed)!==null&&c!==void 0?c:false}else{u.tagClass=-1;u.tagNumber=-1;u.isConstructed=false}return u}t.prototype.toBER=function(e){if(e===void 0){e=false}var t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:this.error="Unknown tag class";return EMPTY_BUFFER}if(this.isConstructed)t|=32;if(this.tagNumber<31&&!this.isHexOnly){var i=new Uint8Array(1);if(!e){var r=this.tagNumber;r&=31;t|=r;i[0]=t}return i.buffer}if(!this.isHexOnly){var n=utilToBase(this.tagNumber,7);var o=new Uint8Array(n);var a=n.byteLength;var s=new Uint8Array(a+1);s[0]=t|31;if(!e){for(var c=0;c<a-1;c++)s[c+1]=o[c]|128;s[a]=o[a-1]}return s.buffer}var u=new Uint8Array(this.valueHexView.byteLength+1);u[0]=t|31;if(!e){var p=this.valueHexView;for(var c=0;c<p.length-1;c++)u[c+1]=p[c]|128;u[this.valueHexView.byteLength]=p[p.length-1]}return u.buffer};t.prototype.fromBER=function(e,t,i){var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i)){return-1}var n=r.subarray(t,t+i);if(n.length===0){this.error="Zero buffer length";return-1}var o=n[0]&192;switch(o){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:this.error="Unknown tag class";return-1}this.isConstructed=(n[0]&32)===32;this.isHexOnly=false;var a=n[0]&31;if(a!==31){this.tagNumber=a;this.blockLength=1}else{var s=1;var c=this.valueHexView=new Uint8Array(255);var u=255;while(n[s]&128){c[s-1]=n[s]&127;s++;if(s>=n.length){this.error="End of input reached before message was fully decoded";return-1}if(s===u){u+=255;var p=new Uint8Array(u);for(var f=0;f<c.length;f++)p[f]=c[f];c=this.valueHexView=new Uint8Array(u)}}this.blockLength=s+1;c[s-1]=n[s]&127;var d=new Uint8Array(s);for(var f=0;f<s;f++)d[f]=c[f];c=this.valueHexView=new Uint8Array(s);c.set(d);if(this.blockLength<=9)this.tagNumber=utilFromBase(c,7);else{this.isHexOnly=true;this.warnings.push("Tag too long, represented as hex-coded")}}if(this.tagClass===1&&this.isConstructed){switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:this.error="Constructed encoding used for primitive type";return-1}}return t+this.blockLength};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed})};return t}(HexBlock(LocalBaseBlock));LocalIdentificationBlock.NAME="identificationBlock";var LocalLengthBlock=function(e){__extends(t,e);function t(t){var i=t===void 0?{}:t,r=i.lenBlock,n=r===void 0?{}:r;var o,a,s;var c=e.call(this)||this;c.isIndefiniteForm=(o=n.isIndefiniteForm)!==null&&o!==void 0?o:false;c.longFormUsed=(a=n.longFormUsed)!==null&&a!==void 0?a:false;c.length=(s=n.length)!==null&&s!==void 0?s:0;return c}t.prototype.fromBER=function(e,t,i){var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i)){return-1}var n=r.subarray(t,t+i);if(n.length===0){this.error="Zero buffer length";return-1}if(n[0]===255){this.error="Length block 0xFF is reserved by standard";return-1}this.isIndefiniteForm=n[0]===128;if(this.isIndefiniteForm){this.blockLength=1;return t+this.blockLength}this.longFormUsed=!!(n[0]&128);if(this.longFormUsed===false){this.length=n[0];this.blockLength=1;return t+this.blockLength}var o=n[0]&127;if(o>8){this.error="Too big integer";return-1}if(o+1>n.length){this.error="End of input reached before message was fully decoded";return-1}var a=t+1;var s=r.subarray(a,a+o);if(s[o-1]===0)this.warnings.push("Needlessly long encoded length");this.length=utilFromBase(s,8);if(this.longFormUsed&&this.length<=127)this.warnings.push("Unnecessary usage of long length form");this.blockLength=o+1;return t+this.blockLength};t.prototype.toBER=function(e){if(e===void 0){e=false}var t;var i;if(this.length>127)this.longFormUsed=true;if(this.isIndefiniteForm){t=new ArrayBuffer(1);if(e===false){i=new Uint8Array(t);i[0]=128}return t}if(this.longFormUsed){var r=utilToBase(this.length,8);if(r.byteLength>127){this.error="Too big length";return EMPTY_BUFFER}t=new ArrayBuffer(r.byteLength+1);if(e)return t;var n=new Uint8Array(r);i=new Uint8Array(t);i[0]=r.byteLength|128;for(var o=0;o<r.byteLength;o++)i[o+1]=n[o];return t}t=new ArrayBuffer(1);if(e===false){i=new Uint8Array(t);i[0]=this.length}return t};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length})};return t}(LocalBaseBlock);LocalLengthBlock.NAME="lengthBlock";var typeStore={};var BaseBlock=function(e){__extends(t,e);function t(t,i){if(t===void 0){t={}}var r=this;var n=t.name,o=n===void 0?EMPTY_STRING:n,a=t.optional,s=a===void 0?false:a,c=t.primitiveSchema,u=__rest(t,["name","optional","primitiveSchema"]);r=e.call(this,u)||this;r.name=o;r.optional=s;if(c){r.primitiveSchema=c}r.idBlock=new LocalIdentificationBlock(u);r.lenBlock=new LocalLengthBlock(u);r.valueBlock=i?new i(u):new ValueBlock(u);return r}t.prototype.fromBER=function(e,t,i){var r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);if(r===-1){this.error=this.valueBlock.error;return r}if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return r};t.prototype.toBER=function(e,t){var i=t||new ViewWriter;if(!t){prepareIndefiniteForm(this)}var r=this.idBlock.toBER(e);i.write(r);if(this.lenBlock.isIndefiniteForm){i.write(new Uint8Array([128]).buffer);this.valueBlock.toBER(e,i);i.write(new ArrayBuffer(2))}else{var n=this.valueBlock.toBER(e);this.lenBlock.length=n.byteLength;var o=this.lenBlock.toBER(e);i.write(o);i.write(n)}if(!t){return i.final()}return EMPTY_BUFFER};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional});if(this.primitiveSchema)t.primitiveSchema=this.primitiveSchema.toJSON();return t};t.prototype.toString=function(e){if(e===void 0){e="ascii"}if(e==="ascii"){return this.onAsciiEncoding()}return buildExports.Convert.ToHex(this.toBER())};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(buildExports.Convert.ToHex(this.valueBlock.valueBeforeDecodeView))};t.prototype.isEqual=function(e){if(this===e){return true}if(!(e instanceof this.constructor)){return false}var t=this.toBER();var i=e.toBER();return isEqualBuffer(t,i)};return t}(LocalBaseBlock);BaseBlock.NAME="BaseBlock";function prepareIndefiniteForm(e){if(e instanceof typeStore.Constructed){for(var t=0,i=e.valueBlock.value;t<i.length;t++){var r=i[t];if(prepareIndefiniteForm(r)){e.lenBlock.isIndefiniteForm=true}}}return!!e.lenBlock.isIndefiniteForm}var BaseStringBlock=function(e){__extends(t,e);function t(t,i){if(t===void 0){t={}}var r=this;var n=t.value,o=n===void 0?EMPTY_STRING:n,a=__rest(t,["value"]);r=e.call(this,a,i)||this;if(o){r.fromString(o)}return r}t.prototype.getValue=function(){return this.valueBlock.value};t.prototype.setValue=function(e){this.valueBlock.value=e};t.prototype.fromBER=function(e,t,i){var r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);if(r===-1){this.error=this.valueBlock.error;return r}this.fromBuffer(this.valueBlock.valueHexView);if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return r};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : '").concat(this.valueBlock.value,"'")};return t}(BaseBlock);BaseStringBlock.NAME="BaseStringBlock";var LocalPrimitiveValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.isHexOnly,n=r===void 0?true:r,o=__rest(t,["isHexOnly"]);i=e.call(this,o)||this;i.isHexOnly=n;return i}return t}(HexBlock(ValueBlock));LocalPrimitiveValueBlock.NAME="PrimitiveValueBlock";var _a$w;var Primitive=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalPrimitiveValueBlock)||this;i.idBlock.isConstructed=false;return i}return t}(BaseBlock);_a$w=Primitive;(function(){typeStore.Primitive=_a$w})();Primitive.NAME="PRIMITIVE";function localChangeType(e,t){if(e instanceof t){return e}var i=new t;i.idBlock=e.idBlock;i.lenBlock=e.lenBlock;i.warnings=e.warnings;i.valueBeforeDecodeView=e.valueBeforeDecodeView;return i}function localFromBER(e,t,i){if(t===void 0){t=0}if(i===void 0){i=e.length}var r=t;var n=new BaseBlock({},ValueBlock);var o=new LocalBaseBlock;if(!checkBufferParams(o,e,t,i)){n.error=o.error;return{offset:-1,result:n}}var a=e.subarray(t,t+i);if(!a.length){n.error="Zero buffer length";return{offset:-1,result:n}}var s=n.idBlock.fromBER(e,t,i);if(n.idBlock.warnings.length){n.warnings.concat(n.idBlock.warnings)}if(s===-1){n.error=n.idBlock.error;return{offset:-1,result:n}}t=s;i-=n.idBlock.blockLength;s=n.lenBlock.fromBER(e,t,i);if(n.lenBlock.warnings.length){n.warnings.concat(n.lenBlock.warnings)}if(s===-1){n.error=n.lenBlock.error;return{offset:-1,result:n}}t=s;i-=n.lenBlock.blockLength;if(!n.idBlock.isConstructed&&n.lenBlock.isIndefiniteForm){n.error="Indefinite length form used for primitive encoding form";return{offset:-1,result:n}}var c=BaseBlock;switch(n.idBlock.tagClass){case 1:if(n.idBlock.tagNumber>=37&&n.idBlock.isHexOnly===false){n.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard";return{offset:-1,result:n}}switch(n.idBlock.tagNumber){case 0:if(n.idBlock.isConstructed&&n.lenBlock.length>0){n.error="Type [UNIVERSAL 0] is reserved";return{offset:-1,result:n}}c=typeStore.EndOfContent;break;case 1:c=typeStore.Boolean;break;case 2:c=typeStore.Integer;break;case 3:c=typeStore.BitString;break;case 4:c=typeStore.OctetString;break;case 5:c=typeStore.Null;break;case 6:c=typeStore.ObjectIdentifier;break;case 10:c=typeStore.Enumerated;break;case 12:c=typeStore.Utf8String;break;case 13:c=typeStore.RelativeObjectIdentifier;break;case 14:c=typeStore.TIME;break;case 15:n.error="[UNIVERSAL 15] is reserved by ASN.1 standard";return{offset:-1,result:n};case 16:c=typeStore.Sequence;break;case 17:c=typeStore.Set;break;case 18:c=typeStore.NumericString;break;case 19:c=typeStore.PrintableString;break;case 20:c=typeStore.TeletexString;break;case 21:c=typeStore.VideotexString;break;case 22:c=typeStore.IA5String;break;case 23:c=typeStore.UTCTime;break;case 24:c=typeStore.GeneralizedTime;break;case 25:c=typeStore.GraphicString;break;case 26:c=typeStore.VisibleString;break;case 27:c=typeStore.GeneralString;break;case 28:c=typeStore.UniversalString;break;case 29:c=typeStore.CharacterString;break;case 30:c=typeStore.BmpString;break;case 31:c=typeStore.DATE;break;case 32:c=typeStore.TimeOfDay;break;case 33:c=typeStore.DateTime;break;case 34:c=typeStore.Duration;break;default:{var u=n.idBlock.isConstructed?new typeStore.Constructed:new typeStore.Primitive;u.idBlock=n.idBlock;u.lenBlock=n.lenBlock;u.warnings=n.warnings;n=u}}break;case 2:case 3:case 4:default:{c=n.idBlock.isConstructed?typeStore.Constructed:typeStore.Primitive}}n=localChangeType(n,c);s=n.fromBER(e,t,n.lenBlock.isIndefiniteForm?i:n.lenBlock.length);n.valueBeforeDecodeView=e.subarray(r,r+n.blockLength);return{offset:s,result:n}}function fromBER(e){if(!e.byteLength){var t=new BaseBlock({},ValueBlock);t.error="Input buffer has zero length";return{offset:-1,result:t}}return localFromBER(buildExports.BufferSourceConverter.toUint8Array(e).slice(),0,e.byteLength)}function checkLen(e,t){if(e){return 1}return t}var LocalConstructedValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=r===void 0?[]:r,o=t.isIndefiniteForm,a=o===void 0?false:o,s=__rest(t,["value","isIndefiniteForm"]);i=e.call(this,s)||this;i.value=n;i.isIndefiniteForm=a;return i}t.prototype.fromBER=function(e,t,i){var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i)){return-1}this.valueBeforeDecodeView=r.subarray(t,t+i);if(this.valueBeforeDecodeView.length===0){this.warnings.push("Zero buffer length");return t}var n=t;while(checkLen(this.isIndefiniteForm,i)>0){var o=localFromBER(r,n,i);if(o.offset===-1){this.error=o.result.error;this.warnings.concat(o.result.warnings);return-1}n=o.offset;this.blockLength+=o.result.blockLength;i-=o.result.blockLength;this.value.push(o.result);if(this.isIndefiniteForm&&o.result.constructor.NAME===END_OF_CONTENT_NAME){break}}if(this.isIndefiniteForm){if(this.value[this.value.length-1].constructor.NAME===END_OF_CONTENT_NAME){this.value.pop()}else{this.warnings.push("No EndOfContent block encoded")}}return n};t.prototype.toBER=function(e,t){var i=t||new ViewWriter;for(var r=0;r<this.value.length;r++){this.value[r].toBER(e,i)}if(!t){return i.final()}return EMPTY_BUFFER};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{isIndefiniteForm:this.isIndefiniteForm,value:[]});for(var i=0,r=this.value;i<r.length;i++){var n=r[i];t.value.push(n.toJSON())}return t};return t}(ValueBlock);LocalConstructedValueBlock.NAME="ConstructedValueBlock";var _a$v;var Constructed=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalConstructedValueBlock)||this;i.idBlock.isConstructed=true;return i}t.prototype.fromBER=function(e,t,i){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;var r=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);if(r===-1){this.error=this.valueBlock.error;return r}if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return r};t.prototype.onAsciiEncoding=function(){var e=[];for(var t=0,i=this.valueBlock.value;t<i.length;t++){var r=i[t];e.push(r.toString("ascii").split("\n").map((function(e){return" ".concat(e)})).join("\n"))}var n=this.idBlock.tagClass===3?"[".concat(this.idBlock.tagNumber,"]"):this.constructor.NAME;return e.length?"".concat(n," :\n").concat(e.join("\n")):"".concat(n," :")};return t}(BaseBlock);_a$v=Constructed;(function(){typeStore.Constructed=_a$v})();Constructed.NAME="CONSTRUCTED";var LocalEndOfContentValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBER=function(e,t,i){return t};t.prototype.toBER=function(e){return EMPTY_BUFFER};return t}(ValueBlock);LocalEndOfContentValueBlock.override="EndOfContentValueBlock";var _a$u;var EndOfContent=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalEndOfContentValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=0;return i}return t}(BaseBlock);_a$u=EndOfContent;(function(){typeStore.EndOfContent=_a$u})();EndOfContent.NAME=END_OF_CONTENT_NAME;var _a$t;var Null=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,ValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=5;return i}t.prototype.fromBER=function(e,t,i){if(this.lenBlock.length>0)this.warnings.push("Non-zero length of value block for Null type");if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;this.blockLength+=i;if(t+i>e.byteLength){this.error="End of input reached before message was fully decoded (inconsistent offset and length values)";return-1}return t+i};t.prototype.toBER=function(e,t){var i=new ArrayBuffer(2);if(!e){var r=new Uint8Array(i);r[0]=5;r[1]=0}if(t){t.write(i)}return i};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME)};return t}(BaseBlock);_a$t=Null;(function(){typeStore.Null=_a$t})();Null.NAME="NULL";var LocalBooleanValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=__rest(t,["value"]);i=e.call(this,n)||this;if(n.valueHex){i.valueHexView=buildExports.BufferSourceConverter.toUint8Array(n.valueHex)}else{i.valueHexView=new Uint8Array(1)}if(r){i.value=r}return i}Object.defineProperty(t.prototype,"value",{get:function(){for(var e=0,t=this.valueHexView;e<t.length;e++){var i=t[e];if(i>0){return true}}return false},set:function(e){this.valueHexView[0]=e?255:0},enumerable:false,configurable:true});t.prototype.fromBER=function(e,t,i){var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i)){return-1}this.valueHexView=r.subarray(t,t+i);if(i>1)this.warnings.push("Boolean value encoded in more then 1 octet");this.isHexOnly=true;utilDecodeTC.call(this);this.blockLength=i;return t+i};t.prototype.toBER=function(){return this.valueHexView.slice()};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.value})};return t}(HexBlock(ValueBlock));LocalBooleanValueBlock.NAME="BooleanValueBlock";var _a$s;var Boolean=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalBooleanValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=1;return i}t.prototype.getValue=function(){return this.valueBlock.value};t.prototype.setValue=function(e){this.valueBlock.value=e};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.getValue)};return t}(BaseBlock);_a$s=Boolean;(function(){typeStore.Boolean=_a$s})();Boolean.NAME="BOOLEAN";var LocalOctetStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.isConstructed,n=r===void 0?false:r,o=__rest(t,["isConstructed"]);i=e.call(this,o)||this;i.isConstructed=n;return i}t.prototype.fromBER=function(t,i,r){var n=0;if(this.isConstructed){this.isHexOnly=false;n=LocalConstructedValueBlock.prototype.fromBER.call(this,t,i,r);if(n===-1)return n;for(var o=0;o<this.value.length;o++){var a=this.value[o].constructor.NAME;if(a===END_OF_CONTENT_NAME){if(this.isIndefiniteForm)break;else{this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only";return-1}}if(a!==OCTET_STRING_NAME){this.error="OCTET STRING may consists of OCTET STRINGs only";return-1}}}else{this.isHexOnly=true;n=e.prototype.fromBER.call(this,t,i,r);this.blockLength=r}return n};t.prototype.toBER=function(e,t){if(this.isConstructed)return LocalConstructedValueBlock.prototype.toBER.call(this,e,t);return e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isConstructed:this.isConstructed})};return t}(HexBlock(LocalConstructedValueBlock));LocalOctetStringValueBlock.NAME="OctetStringValueBlock";var _a$r;var OctetString$1=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.idBlock,n=r===void 0?{}:r,o=t.lenBlock,a=o===void 0?{}:o,s=__rest(t,["idBlock","lenBlock"]);var c,u;(c=s.isConstructed)!==null&&c!==void 0?c:s.isConstructed=!!((u=s.value)===null||u===void 0?void 0:u.length);i=e.call(this,__assign({idBlock:__assign({isConstructed:s.isConstructed},n),lenBlock:__assign(__assign({},a),{isIndefiniteForm:!!s.isIndefiniteForm})},s),LocalOctetStringValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=4;return i}t.prototype.fromBER=function(t,i,r){this.valueBlock.isConstructed=this.idBlock.isConstructed;this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;if(r===0){if(this.idBlock.error.length===0)this.blockLength+=this.idBlock.blockLength;if(this.lenBlock.error.length===0)this.blockLength+=this.lenBlock.blockLength;return i}if(!this.valueBlock.isConstructed){var n=t instanceof ArrayBuffer?new Uint8Array(t):t;var o=n.subarray(i,i+r);try{if(o.byteLength){var a=localFromBER(o,0,o.byteLength);if(a.offset!==-1&&a.offset===r){this.valueBlock.value=[a.result]}}}catch(e){}}return e.prototype.fromBER.call(this,t,i,r)};t.prototype.onAsciiEncoding=function(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length){return Constructed.prototype.onAsciiEncoding.call(this)}return"".concat(this.constructor.NAME," : ").concat(buildExports.Convert.ToHex(this.valueBlock.valueHexView))};t.prototype.getValue=function(){if(!this.idBlock.isConstructed){return this.valueBlock.valueHexView.slice().buffer}var e=[];for(var i=0,r=this.valueBlock.value;i<r.length;i++){var n=r[i];if(n instanceof t){e.push(n.valueBlock.valueHexView)}}return buildExports.BufferSourceConverter.concat(e)};return t}(BaseBlock);_a$r=OctetString$1;(function(){typeStore.OctetString=_a$r})();OctetString$1.NAME=OCTET_STRING_NAME;var LocalBitStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.unusedBits,n=r===void 0?0:r,o=t.isConstructed,a=o===void 0?false:o,s=__rest(t,["unusedBits","isConstructed"]);i=e.call(this,s)||this;i.unusedBits=n;i.isConstructed=a;i.blockLength=i.valueHexView.byteLength;return i}t.prototype.fromBER=function(e,t,i){if(!i){return t}var r=-1;if(this.isConstructed){r=LocalConstructedValueBlock.prototype.fromBER.call(this,e,t,i);if(r===-1)return r;for(var n=0,o=this.value;n<o.length;n++){var a=o[n];var s=a.constructor.NAME;if(s===END_OF_CONTENT_NAME){if(this.isIndefiniteForm)break;else{this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only";return-1}}if(s!==BIT_STRING_NAME){this.error="BIT STRING may consists of BIT STRINGs only";return-1}var c=a.valueBlock;if(this.unusedBits>0&&c.unusedBits>0){this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only';return-1}this.unusedBits=c.unusedBits}return r}var u=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,u,t,i)){return-1}var p=u.subarray(t,t+i);this.unusedBits=p[0];if(this.unusedBits>7){this.error="Unused bits for BitString must be in range 0-7";return-1}if(!this.unusedBits){var f=p.subarray(1);try{if(f.byteLength){var d=localFromBER(f,0,f.byteLength);if(d.offset!==-1&&d.offset===i-1){this.value=[d.result]}}}catch(e){}}this.valueHexView=p.subarray(1);this.blockLength=p.length;return t+i};t.prototype.toBER=function(e,t){if(this.isConstructed){return LocalConstructedValueBlock.prototype.toBER.call(this,e,t)}if(e){return new ArrayBuffer(this.valueHexView.byteLength+1)}if(!this.valueHexView.byteLength){return EMPTY_BUFFER}var i=new Uint8Array(this.valueHexView.length+1);i[0]=this.unusedBits;i.set(this.valueHexView,1);return i.buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{unusedBits:this.unusedBits,isConstructed:this.isConstructed})};return t}(HexBlock(LocalConstructedValueBlock));LocalBitStringValueBlock.NAME="BitStringValueBlock";var _a$q;var BitString$1=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.idBlock,n=r===void 0?{}:r,o=t.lenBlock,a=o===void 0?{}:o,s=__rest(t,["idBlock","lenBlock"]);var c,u;(c=s.isConstructed)!==null&&c!==void 0?c:s.isConstructed=!!((u=s.value)===null||u===void 0?void 0:u.length);i=e.call(this,__assign({idBlock:__assign({isConstructed:s.isConstructed},n),lenBlock:__assign(__assign({},a),{isIndefiniteForm:!!s.isIndefiniteForm})},s),LocalBitStringValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=3;return i}t.prototype.fromBER=function(t,i,r){this.valueBlock.isConstructed=this.idBlock.isConstructed;this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;return e.prototype.fromBER.call(this,t,i,r)};t.prototype.onAsciiEncoding=function(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length){return Constructed.prototype.onAsciiEncoding.call(this)}else{var e=[];var t=this.valueBlock.valueHexView;for(var i=0,r=t;i<r.length;i++){var n=r[i];e.push(n.toString(2).padStart(8,"0"))}var o=e.join("");return"".concat(this.constructor.NAME," : ").concat(o.substring(0,o.length-this.valueBlock.unusedBits))}};return t}(BaseBlock);_a$q=BitString$1;(function(){typeStore.BitString=_a$q})();BitString$1.NAME=BIT_STRING_NAME;var _a$p;function viewAdd(e,t){var i=new Uint8Array([0]);var r=new Uint8Array(e);var n=new Uint8Array(t);var o=r.slice(0);var a=o.length-1;var s=n.slice(0);var c=s.length-1;var u=0;var p=c<a?a:c;var f=0;for(var d=p;d>=0;d--,f++){switch(true){case f<s.length:u=o[a-f]+s[c-f]+i[0];break;default:u=o[a-f]+i[0]}i[0]=u/10;switch(true){case f>=o.length:o=utilConcatView(new Uint8Array([u%10]),o);break;default:o[a-f]=u%10}}if(i[0]>0)o=utilConcatView(i,o);return o}function power2(e){if(e>=powers2.length){for(var t=powers2.length;t<=e;t++){var i=new Uint8Array([0]);var r=powers2[t-1].slice(0);for(var n=r.length-1;n>=0;n--){var o=new Uint8Array([(r[n]<<1)+i[0]]);i[0]=o[0]/10;r[n]=o[0]%10}if(i[0]>0)r=utilConcatView(i,r);powers2.push(r)}}return powers2[e]}function viewSub(e,t){var i=0;var r=new Uint8Array(e);var n=new Uint8Array(t);var o=r.slice(0);var a=o.length-1;var s=n.slice(0);var c=s.length-1;var u;var p=0;for(var f=c;f>=0;f--,p++){u=o[a-p]-s[c-p]-i;switch(true){case u<0:i=1;o[a-p]=u+10;break;default:i=0;o[a-p]=u}}if(i>0){for(var f=a-c+1;f>=0;f--,p++){u=o[a-p]-i;if(u<0){i=1;o[a-p]=u+10}else{i=0;o[a-p]=u;break}}}return o.slice()}var LocalIntegerValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=__rest(t,["value"]);i=e.call(this,n)||this;i._valueDec=0;if(n.valueHex){i.setValueHex()}if(r!==undefined){i.valueDec=r}return i}t.prototype.setValueHex=function(){if(this.valueHexView.length>=4){this.warnings.push("Too big Integer for decoding, hex only");this.isHexOnly=true;this._valueDec=0}else{this.isHexOnly=false;if(this.valueHexView.length>0){this._valueDec=utilDecodeTC.call(this)}}};Object.defineProperty(t.prototype,"valueDec",{get:function(){return this._valueDec},set:function(e){this._valueDec=e;this.isHexOnly=false;this.valueHexView=new Uint8Array(utilEncodeTC(e))},enumerable:false,configurable:true});t.prototype.fromDER=function(e,t,i,r){if(r===void 0){r=0}var n=this.fromBER(e,t,i);if(n===-1)return n;var o=this.valueHexView;if(o[0]===0&&(o[1]&128)!==0){this.valueHexView=o.subarray(1)}else{if(r!==0){if(o.length<r){if(r-o.length>1)r=o.length+1;this.valueHexView=o.subarray(r-o.length)}}}return n};t.prototype.toDER=function(e){if(e===void 0){e=false}var t=this.valueHexView;switch(true){case(t[0]&128)!==0:{var i=new Uint8Array(this.valueHexView.length+1);i[0]=0;i.set(t,1);this.valueHexView=i}break;case t[0]===0&&(t[1]&128)===0:{this.valueHexView=this.valueHexView.subarray(1)}break}return this.toBER(e)};t.prototype.fromBER=function(t,i,r){var n=e.prototype.fromBER.call(this,t,i,r);if(n===-1){return n}this.setValueHex();return n};t.prototype.toBER=function(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec})};t.prototype.toString=function(){var e=this.valueHexView.length*8-1;var t=new Uint8Array(this.valueHexView.length*8/3);var i=0;var r;var n=this.valueHexView;var o="";var a=false;for(var s=n.byteLength-1;s>=0;s--){r=n[s];for(var c=0;c<8;c++){if((r&1)===1){switch(i){case e:t=viewSub(power2(i),t);o="-";break;default:t=viewAdd(t,power2(i))}}i++;r>>=1}}for(var c=0;c<t.length;c++){if(t[c])a=true;if(a)o+=digitsString.charAt(t[c])}if(a===false)o+=digitsString.charAt(0);return o};return t}(HexBlock(ValueBlock));_a$p=LocalIntegerValueBlock;LocalIntegerValueBlock.NAME="IntegerValueBlock";(function(){Object.defineProperty(_a$p.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e);this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}})})();var _a$o;var Integer=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalIntegerValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=2;return i}t.prototype.toBigInt=function(){assertBigInt();return BigInt(this.valueBlock.toString())};t.fromBigInt=function(e){assertBigInt();var i=BigInt(e);var r=new ViewWriter;var n=i.toString(16).replace(/^-/,"");var o=new Uint8Array(buildExports.Convert.FromHex(n));if(i<0){var a=new Uint8Array(o.length+(o[0]&128?1:0));a[0]|=128;var s=BigInt("0x".concat(buildExports.Convert.ToHex(a)));var c=s+i;var u=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromHex(c.toString(16)));u[0]|=128;r.write(u)}else{if(o[0]&128){r.write(new Uint8Array([0]))}r.write(o)}var p=new t({valueHex:r.final()});return p};t.prototype.convertToDER=function(){var e=new t({valueHex:this.valueBlock.valueHexView});e.valueBlock.toDER();return e};t.prototype.convertFromDER=function(){return new t({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString())};return t}(BaseBlock);_a$o=Integer;(function(){typeStore.Integer=_a$o})();Integer.NAME="INTEGER";var _a$n;var Enumerated=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=10;return i}return t}(Integer);_a$n=Enumerated;(function(){typeStore.Enumerated=_a$n})();Enumerated.NAME="ENUMERATED";var LocalSidValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.valueDec,n=r===void 0?-1:r,o=t.isFirstSid,a=o===void 0?false:o,s=__rest(t,["valueDec","isFirstSid"]);i=e.call(this,s)||this;i.valueDec=n;i.isFirstSid=a;return i}t.prototype.fromBER=function(e,t,i){if(!i){return t}var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i)){return-1}var n=r.subarray(t,t+i);this.valueHexView=new Uint8Array(i);for(var o=0;o<i;o++){this.valueHexView[o]=n[o]&127;this.blockLength++;if((n[o]&128)===0)break}var a=new Uint8Array(this.blockLength);for(var o=0;o<this.blockLength;o++){a[o]=this.valueHexView[o]}this.valueHexView=a;if((n[this.blockLength-1]&128)!==0){this.error="End of input reached before message was fully decoded";return-1}if(this.valueHexView[0]===0)this.warnings.push("Needlessly long format of SID encoding");if(this.blockLength<=8)this.valueDec=utilFromBase(this.valueHexView,7);else{this.isHexOnly=true;this.warnings.push("Too big SID for decoding, hex only")}return t+this.blockLength};Object.defineProperty(t.prototype,"valueBigInt",{set:function(e){assertBigInt();var t=BigInt(e).toString(2);while(t.length%7){t="0"+t}var i=new Uint8Array(t.length/7);for(var r=0;r<i.length;r++){i[r]=parseInt(t.slice(r*7,r*7+7),2)+(r+1<i.length?128:0)}this.fromBER(i.buffer,0,i.length)},enumerable:false,configurable:true});t.prototype.toBER=function(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);var t=this.valueHexView;var i=new Uint8Array(this.blockLength);for(var r=0;r<this.blockLength-1;r++)i[r]=t[r]|128;i[this.blockLength-1]=t[this.blockLength-1];return i.buffer}var n=utilToBase(this.valueDec,7);if(n.byteLength===0){this.error="Error during encoding SID value";return EMPTY_BUFFER}var o=new Uint8Array(n.byteLength);if(!e){var a=new Uint8Array(n);var s=n.byteLength-1;for(var r=0;r<s;r++)o[r]=a[r]|128;o[s]=a[s]}return o};t.prototype.toString=function(){var e="";if(this.isHexOnly)e=buildExports.Convert.ToHex(this.valueHexView);else{if(this.isFirstSid){var t=this.valueDec;if(this.valueDec<=39)e="0.";else{if(this.valueDec<=79){e="1.";t-=40}else{e="2.";t-=80}}e+=t.toString()}else e=this.valueDec.toString()}return e};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec,isFirstSid:this.isFirstSid})};return t}(HexBlock(ValueBlock));LocalSidValueBlock.NAME="sidBlock";var LocalObjectIdentifierValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=r===void 0?EMPTY_STRING:r,o=__rest(t,["value"]);i=e.call(this,o)||this;i.value=[];if(n){i.fromString(n)}return i}t.prototype.fromBER=function(e,t,i){var r=t;while(i>0){var n=new LocalSidValueBlock;r=n.fromBER(e,r,i);if(r===-1){this.blockLength=0;this.error=n.error;return r}if(this.value.length===0)n.isFirstSid=true;this.blockLength+=n.blockLength;i-=n.blockLength;this.value.push(n)}return r};t.prototype.toBER=function(e){var t=[];for(var i=0;i<this.value.length;i++){var r=this.value[i].toBER(e);if(r.byteLength===0){this.error=this.value[i].error;return EMPTY_BUFFER}t.push(r)}return concat(t)};t.prototype.fromString=function(e){this.value=[];var t=0;var i=0;var r="";var n=false;do{i=e.indexOf(".",t);if(i===-1)r=e.substring(t);else r=e.substring(t,i);t=i+1;if(n){var o=this.value[0];var a=0;switch(o.valueDec){case 0:break;case 1:a=40;break;case 2:a=80;break;default:this.value=[];return}var s=parseInt(r,10);if(isNaN(s))return;o.valueDec=s+a;n=false}else{var o=new LocalSidValueBlock;if(r>Number.MAX_SAFE_INTEGER){assertBigInt();var c=BigInt(r);o.valueBigInt=c}else{o.valueDec=parseInt(r,10);if(isNaN(o.valueDec))return}if(!this.value.length){o.isFirstSid=true;n=true}this.value.push(o)}}while(i!==-1)};t.prototype.toString=function(){var e="";var t=false;for(var i=0;i<this.value.length;i++){t=this.value[i].isHexOnly;var r=this.value[i].toString();if(i!==0)e="".concat(e,".");if(t){r="{".concat(r,"}");if(this.value[i].isFirstSid)e="2.{".concat(r," - 80}");else e+=r}else e+=r}return e};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{value:this.toString(),sidArray:[]});for(var i=0;i<this.value.length;i++){t.sidArray.push(this.value[i].toJSON())}return t};return t}(ValueBlock);LocalObjectIdentifierValueBlock.NAME="ObjectIdentifierValueBlock";var _a$m;var ObjectIdentifier=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalObjectIdentifierValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=6;return i}t.prototype.getValue=function(){return this.valueBlock.toString()};t.prototype.setValue=function(e){this.valueBlock.fromString(e)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.getValue()})};return t}(BaseBlock);_a$m=ObjectIdentifier;(function(){typeStore.ObjectIdentifier=_a$m})();ObjectIdentifier.NAME="OBJECT IDENTIFIER";var LocalRelativeSidValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.valueDec,n=r===void 0?0:r,o=__rest(t,["valueDec"]);i=e.call(this,o)||this;i.valueDec=n;return i}t.prototype.fromBER=function(e,t,i){if(i===0)return t;var r=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,r,t,i))return-1;var n=r.subarray(t,t+i);this.valueHexView=new Uint8Array(i);for(var o=0;o<i;o++){this.valueHexView[o]=n[o]&127;this.blockLength++;if((n[o]&128)===0)break}var a=new Uint8Array(this.blockLength);for(var o=0;o<this.blockLength;o++)a[o]=this.valueHexView[o];this.valueHexView=a;if((n[this.blockLength-1]&128)!==0){this.error="End of input reached before message was fully decoded";return-1}if(this.valueHexView[0]===0)this.warnings.push("Needlessly long format of SID encoding");if(this.blockLength<=8)this.valueDec=utilFromBase(this.valueHexView,7);else{this.isHexOnly=true;this.warnings.push("Too big SID for decoding, hex only")}return t+this.blockLength};t.prototype.toBER=function(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);var t=this.valueHexView;var i=new Uint8Array(this.blockLength);for(var r=0;r<this.blockLength-1;r++)i[r]=t[r]|128;i[this.blockLength-1]=t[this.blockLength-1];return i.buffer}var n=utilToBase(this.valueDec,7);if(n.byteLength===0){this.error="Error during encoding SID value";return EMPTY_BUFFER}var o=new Uint8Array(n.byteLength);if(!e){var a=new Uint8Array(n);var s=n.byteLength-1;for(var r=0;r<s;r++)o[r]=a[r]|128;o[s]=a[s]}return o.buffer};t.prototype.toString=function(){var e="";if(this.isHexOnly)e=buildExports.Convert.ToHex(this.valueHexView);else{e=this.valueDec.toString()}return e};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec})};return t}(HexBlock(LocalBaseBlock));LocalRelativeSidValueBlock.NAME="relativeSidBlock";var LocalRelativeObjectIdentifierValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=r===void 0?EMPTY_STRING:r,o=__rest(t,["value"]);i=e.call(this,o)||this;i.value=[];if(n){i.fromString(n)}return i}t.prototype.fromBER=function(e,t,i){var r=t;while(i>0){var n=new LocalRelativeSidValueBlock;r=n.fromBER(e,r,i);if(r===-1){this.blockLength=0;this.error=n.error;return r}this.blockLength+=n.blockLength;i-=n.blockLength;this.value.push(n)}return r};t.prototype.toBER=function(e,t){var i=[];for(var r=0;r<this.value.length;r++){var n=this.value[r].toBER(e);if(n.byteLength===0){this.error=this.value[r].error;return EMPTY_BUFFER}i.push(n)}return concat(i)};t.prototype.fromString=function(e){this.value=[];var t=0;var i=0;var r="";do{i=e.indexOf(".",t);if(i===-1)r=e.substring(t);else r=e.substring(t,i);t=i+1;var n=new LocalRelativeSidValueBlock;n.valueDec=parseInt(r,10);if(isNaN(n.valueDec))return true;this.value.push(n)}while(i!==-1);return true};t.prototype.toString=function(){var e="";var t=false;for(var i=0;i<this.value.length;i++){t=this.value[i].isHexOnly;var r=this.value[i].toString();if(i!==0)e="".concat(e,".");if(t){r="{".concat(r,"}");e+=r}else e+=r}return e};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{value:this.toString(),sidArray:[]});for(var i=0;i<this.value.length;i++)t.sidArray.push(this.value[i].toJSON());return t};return t}(ValueBlock);LocalRelativeObjectIdentifierValueBlock.NAME="RelativeObjectIdentifierValueBlock";var _a$l;var RelativeObjectIdentifier=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t,LocalRelativeObjectIdentifierValueBlock)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=13;return i}t.prototype.getValue=function(){return this.valueBlock.toString()};t.prototype.setValue=function(e){this.valueBlock.fromString(e)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.getValue()})};return t}(BaseBlock);_a$l=RelativeObjectIdentifier;(function(){typeStore.RelativeObjectIdentifier=_a$l})();RelativeObjectIdentifier.NAME="RelativeObjectIdentifier";var _a$k;var Sequence=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=16;return i}return t}(Constructed);_a$k=Sequence;(function(){typeStore.Sequence=_a$k})();Sequence.NAME="SEQUENCE";var _a$j;var Set=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=17;return i}return t}(Constructed);_a$j=Set;(function(){typeStore.Set=_a$j})();Set.NAME="SET";var LocalStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=__rest(t,[]);i=e.call(this,r)||this;i.isHexOnly=true;i.value=EMPTY_STRING;return i}t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.value})};return t}(HexBlock(ValueBlock));LocalStringValueBlock.NAME="StringValueBlock";var LocalSimpleStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(LocalStringValueBlock);LocalSimpleStringValueBlock.NAME="SimpleStringValueBlock";var LocalSimpleStringBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=__rest(t,[]);return e.call(this,i,LocalSimpleStringValueBlock)||this}t.prototype.fromBuffer=function(e){this.valueBlock.value=String.fromCharCode.apply(null,buildExports.BufferSourceConverter.toUint8Array(e))};t.prototype.fromString=function(e){var t=e.length;var i=this.valueBlock.valueHexView=new Uint8Array(t);for(var r=0;r<t;r++)i[r]=e.charCodeAt(r);this.valueBlock.value=e};return t}(BaseStringBlock);LocalSimpleStringBlock.NAME="SIMPLE STRING";var LocalUtf8StringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){this.valueBlock.valueHexView=buildExports.BufferSourceConverter.toUint8Array(e);try{this.valueBlock.value=buildExports.Convert.ToUtf8String(e)}catch(t){this.warnings.push('Error during "decodeURIComponent": '.concat(t,", using raw string"));this.valueBlock.value=buildExports.Convert.ToBinary(e)}};t.prototype.fromString=function(e){this.valueBlock.valueHexView=new Uint8Array(buildExports.Convert.FromUtf8String(e));this.valueBlock.value=e};return t}(LocalSimpleStringBlock);LocalUtf8StringValueBlock.NAME="Utf8StringValueBlock";var _a$i;var Utf8String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=12;return i}return t}(LocalUtf8StringValueBlock);_a$i=Utf8String;(function(){typeStore.Utf8String=_a$i})();Utf8String.NAME="UTF8String";var LocalBmpStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){this.valueBlock.value=buildExports.Convert.ToUtf16String(e);this.valueBlock.valueHexView=buildExports.BufferSourceConverter.toUint8Array(e)};t.prototype.fromString=function(e){this.valueBlock.value=e;this.valueBlock.valueHexView=new Uint8Array(buildExports.Convert.FromUtf16String(e))};return t}(LocalSimpleStringBlock);LocalBmpStringValueBlock.NAME="BmpStringValueBlock";var _a$h;var BmpString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=__rest(t,[]);i=e.call(this,r)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=30;return i}return t}(LocalBmpStringValueBlock);_a$h=BmpString;(function(){typeStore.BmpString=_a$h})();BmpString.NAME="BMPString";var LocalUniversalStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){var t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0);var i=new Uint8Array(t);for(var r=0;r<i.length;r+=4){i[r]=i[r+3];i[r+1]=i[r+2];i[r+2]=0;i[r+3]=0}this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))};t.prototype.fromString=function(e){var t=e.length;var i=this.valueBlock.valueHexView=new Uint8Array(t*4);for(var r=0;r<t;r++){var n=utilToBase(e.charCodeAt(r),8);var o=new Uint8Array(n);if(o.length>4)continue;var a=4-o.length;for(var s=o.length-1;s>=0;s--)i[r*4+s+a]=o[s]}this.valueBlock.value=e};return t}(LocalSimpleStringBlock);LocalUniversalStringValueBlock.NAME="UniversalStringValueBlock";var _a$g;var UniversalString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=__rest(t,[]);i=e.call(this,r)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=28;return i}return t}(LocalUniversalStringValueBlock);_a$g=UniversalString;(function(){typeStore.UniversalString=_a$g})();UniversalString.NAME="UniversalString";var _a$f;var NumericString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=18;return i}return t}(LocalSimpleStringBlock);_a$f=NumericString;(function(){typeStore.NumericString=_a$f})();NumericString.NAME="NumericString";var _a$e;var PrintableString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=19;return i}return t}(LocalSimpleStringBlock);_a$e=PrintableString;(function(){typeStore.PrintableString=_a$e})();PrintableString.NAME="PrintableString";var _a$d;var TeletexString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=20;return i}return t}(LocalSimpleStringBlock);_a$d=TeletexString;(function(){typeStore.TeletexString=_a$d})();TeletexString.NAME="TeletexString";var _a$c;var VideotexString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=21;return i}return t}(LocalSimpleStringBlock);_a$c=VideotexString;(function(){typeStore.VideotexString=_a$c})();VideotexString.NAME="VideotexString";var _a$b;var IA5String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=22;return i}return t}(LocalSimpleStringBlock);_a$b=IA5String;(function(){typeStore.IA5String=_a$b})();IA5String.NAME="IA5String";var _a$a;var GraphicString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=25;return i}return t}(LocalSimpleStringBlock);_a$a=GraphicString;(function(){typeStore.GraphicString=_a$a})();GraphicString.NAME="GraphicString";var _a$9;var VisibleString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=26;return i}return t}(LocalSimpleStringBlock);_a$9=VisibleString;(function(){typeStore.VisibleString=_a$9})();VisibleString.NAME="VisibleString";var _a$8;var GeneralString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=27;return i}return t}(LocalSimpleStringBlock);_a$8=GeneralString;(function(){typeStore.GeneralString=_a$8})();GeneralString.NAME="GeneralString";var _a$7;var CharacterString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=29;return i}return t}(LocalSimpleStringBlock);_a$7=CharacterString;(function(){typeStore.CharacterString=_a$7})();CharacterString.NAME="CharacterString";var _a$6;var UTCTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=t.valueDate,o=__rest(t,["value","valueDate"]);i=e.call(this,o)||this;i.year=0;i.month=0;i.day=0;i.hour=0;i.minute=0;i.second=0;if(r){i.fromString(r);i.valueBlock.valueHexView=new Uint8Array(r.length);for(var a=0;a<r.length;a++)i.valueBlock.valueHexView[a]=r.charCodeAt(a)}if(n){i.fromDate(n);i.valueBlock.valueHexView=new Uint8Array(i.toBuffer())}i.idBlock.tagClass=1;i.idBlock.tagNumber=23;return i}t.prototype.fromBuffer=function(e){this.fromString(String.fromCharCode.apply(null,buildExports.BufferSourceConverter.toUint8Array(e)))};t.prototype.toBuffer=function(){var e=this.toString();var t=new ArrayBuffer(e.length);var i=new Uint8Array(t);for(var r=0;r<e.length;r++)i[r]=e.charCodeAt(r);return t};t.prototype.fromDate=function(e){this.year=e.getUTCFullYear();this.month=e.getUTCMonth()+1;this.day=e.getUTCDate();this.hour=e.getUTCHours();this.minute=e.getUTCMinutes();this.second=e.getUTCSeconds()};t.prototype.toDate=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))};t.prototype.fromString=function(e){var t=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/gi;var i=t.exec(e);if(i===null){this.error="Wrong input string for conversion";return}var r=parseInt(i[1],10);if(r>=50)this.year=1900+r;else this.year=2e3+r;this.month=parseInt(i[2],10);this.day=parseInt(i[3],10);this.hour=parseInt(i[4],10);this.minute=parseInt(i[5],10);this.second=parseInt(i[6],10)};t.prototype.toString=function(t){if(t===void 0){t="iso"}if(t==="iso"){var i=new Array(7);i[0]=padNumber(this.year<2e3?this.year-1900:this.year-2e3,2);i[1]=padNumber(this.month,2);i[2]=padNumber(this.day,2);i[3]=padNumber(this.hour,2);i[4]=padNumber(this.minute,2);i[5]=padNumber(this.second,2);i[6]="Z";return i.join("")}return e.prototype.toString.call(this,t)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.toDate().toISOString())};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second})};return t}(VisibleString);_a$6=UTCTime;(function(){typeStore.UTCTime=_a$6})();UTCTime.NAME="UTCTime";var _a$5;var GeneralizedTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i;var r=e.call(this,t)||this;(i=r.millisecond)!==null&&i!==void 0?i:r.millisecond=0;r.idBlock.tagClass=1;r.idBlock.tagNumber=24;return r}t.prototype.fromDate=function(t){e.prototype.fromDate.call(this,t);this.millisecond=t.getUTCMilliseconds()};t.prototype.toDate=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond))};t.prototype.fromString=function(e){var t=false;var i="";var r="";var n=0;var o;var a=0;var s=0;if(e[e.length-1]==="Z"){i=e.substring(0,e.length-1);t=true}else{var c=new Number(e[e.length-1]);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");i=e}if(t){if(i.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(i.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{var u=1;var p=i.indexOf("+");var f="";if(p===-1){p=i.indexOf("-");u=-1}if(p!==-1){f=i.substring(p+1);i=i.substring(0,p);if(f.length!==2&&f.length!==4)throw new Error("Wrong input string for conversion");var c=parseInt(f.substring(0,2),10);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");a=u*c;if(f.length===4){c=parseInt(f.substring(2,4),10);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");s=u*c}}}var d=i.indexOf(".");if(d===-1)d=i.indexOf(",");if(d!==-1){var l=new Number("0".concat(i.substring(d)));if(isNaN(l.valueOf()))throw new Error("Wrong input string for conversion");n=l.valueOf();r=i.substring(0,d)}else r=i;switch(true){case r.length===8:o=/(\d{4})(\d{2})(\d{2})/gi;if(d!==-1)throw new Error("Wrong input string for conversion");break;case r.length===10:o=/(\d{4})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=60*n;this.minute=Math.floor(y);y=60*(y-this.minute);this.second=Math.floor(y);y=1e3*(y-this.second);this.millisecond=Math.floor(y)}break;case r.length===12:o=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=60*n;this.second=Math.floor(y);y=1e3*(y-this.second);this.millisecond=Math.floor(y)}break;case r.length===14:o=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=1e3*n;this.millisecond=Math.floor(y)}break;default:throw new Error("Wrong input string for conversion")}var A=o.exec(r);if(A===null)throw new Error("Wrong input string for conversion");for(var v=1;v<A.length;v++){switch(v){case 1:this.year=parseInt(A[v],10);break;case 2:this.month=parseInt(A[v],10);break;case 3:this.day=parseInt(A[v],10);break;case 4:this.hour=parseInt(A[v],10)+a;break;case 5:this.minute=parseInt(A[v],10)+s;break;case 6:this.second=parseInt(A[v],10);break;default:throw new Error("Wrong input string for conversion")}}if(t===false){var h=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=h.getUTCFullYear();this.month=h.getUTCMonth();this.day=h.getUTCDay();this.hour=h.getUTCHours();this.minute=h.getUTCMinutes();this.second=h.getUTCSeconds();this.millisecond=h.getUTCMilliseconds()}};t.prototype.toString=function(t){if(t===void 0){t="iso"}if(t==="iso"){var i=[];i.push(padNumber(this.year,4));i.push(padNumber(this.month,2));i.push(padNumber(this.day,2));i.push(padNumber(this.hour,2));i.push(padNumber(this.minute,2));i.push(padNumber(this.second,2));if(this.millisecond!==0){i.push(".");i.push(padNumber(this.millisecond,3))}i.push("Z");return i.join("")}return e.prototype.toString.call(this,t)};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{millisecond:this.millisecond})};return t}(UTCTime);_a$5=GeneralizedTime;(function(){typeStore.GeneralizedTime=_a$5})();GeneralizedTime.NAME="GeneralizedTime";var _a$4;var DATE=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=31;return i}return t}(Utf8String);_a$4=DATE;(function(){typeStore.DATE=_a$4})();DATE.NAME="DATE";var _a$3;var TimeOfDay=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=32;return i}return t}(Utf8String);_a$3=TimeOfDay;(function(){typeStore.TimeOfDay=_a$3})();TimeOfDay.NAME="TimeOfDay";var _a$2;var DateTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=33;return i}return t}(Utf8String);_a$2=DateTime;(function(){typeStore.DateTime=_a$2})();DateTime.NAME="DateTime";var _a$1;var Duration=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=34;return i}return t}(Utf8String);_a$1=Duration;(function(){typeStore.Duration=_a$1})();Duration.NAME="Duration";var _a;var TIME=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;i.idBlock.tagClass=1;i.idBlock.tagNumber=14;return i}return t}(Utf8String);_a=TIME;(function(){typeStore.TIME=_a})();TIME.NAME="TIME";var Any=function(){function e(e){var t=e===void 0?{}:e,i=t.name,r=i===void 0?EMPTY_STRING:i,n=t.optional,o=n===void 0?false:n;this.name=r;this.optional=o}return e}();var Choice=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=r===void 0?[]:r,o=__rest(t,["value"]);i=e.call(this,o)||this;i.value=n;return i}return t}(Any);var Repeated=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=this;var r=t.value,n=r===void 0?new Any:r,o=t.local,a=o===void 0?false:o,s=__rest(t,["value","local"]);i=e.call(this,s)||this;i.value=n;i.local=a;return i}return t}(Any);var RawData=function(){function e(e){var t=e===void 0?{}:e,i=t.data,r=i===void 0?EMPTY_VIEW:i;this.dataView=buildExports.BufferSourceConverter.toUint8Array(r)}Object.defineProperty(e.prototype,"data",{get:function(){return this.dataView.slice().buffer},set:function(e){this.dataView=buildExports.BufferSourceConverter.toUint8Array(e)},enumerable:false,configurable:true});e.prototype.fromBER=function(e,t,i){var r=t+i;this.dataView=buildExports.BufferSourceConverter.toUint8Array(e).subarray(t,r);return r};e.prototype.toBER=function(e){return this.dataView.slice().buffer};return e}();function compareSchema(e,t,i){if(i instanceof Choice){for(var r=0;r<i.value.length;r++){var n=compareSchema(e,t,i.value[r]);if(n.verified){return{verified:true,result:e}}}{var o={verified:false,result:{error:"Wrong values for Choice type"}};if(i.hasOwnProperty(NAME))o.name=i.name;return o}}if(i instanceof Any){if(i.hasOwnProperty(NAME))e[i.name]=t;return{verified:true,result:e}}if(e instanceof Object===false){return{verified:false,result:{error:"Wrong root object"}}}if(t instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 data"}}}if(i instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(ID_BLOCK in i===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(FROM_BER in i.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(TO_BER in i.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}var a=i.idBlock.toBER(false);if(a.byteLength===0){return{verified:false,result:{error:"Error encoding idBlock for ASN.1 schema"}}}var s=i.idBlock.fromBER(a,0,a.byteLength);if(s===-1){return{verified:false,result:{error:"Error decoding idBlock for ASN.1 schema"}}}if(i.idBlock.hasOwnProperty(TAG_CLASS)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(i.idBlock.tagClass!==t.idBlock.tagClass){return{verified:false,result:e}}if(i.idBlock.hasOwnProperty(TAG_NUMBER)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(i.idBlock.tagNumber!==t.idBlock.tagNumber){return{verified:false,result:e}}if(i.idBlock.hasOwnProperty(IS_CONSTRUCTED)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(i.idBlock.isConstructed!==t.idBlock.isConstructed){return{verified:false,result:e}}if(!(IS_HEX_ONLY in i.idBlock)){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(i.idBlock.isHexOnly!==t.idBlock.isHexOnly){return{verified:false,result:e}}if(i.idBlock.isHexOnly){if(VALUE_HEX_VIEW in i.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}var c=i.idBlock.valueHexView;var u=t.idBlock.valueHexView;if(c.length!==u.length){return{verified:false,result:e}}for(var p=0;p<c.length;p++){if(c[p]!==u[1]){return{verified:false,result:e}}}}if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name)e[i.name]=t}if(i instanceof typeStore.Constructed){var f=0;var n={verified:false,result:{error:"Unknown error"}};var d=i.valueBlock.value.length;if(d>0){if(i.valueBlock.value[0]instanceof Repeated){d=t.valueBlock.value.length}}if(d===0){return{verified:true,result:e}}if(t.valueBlock.value.length===0&&i.valueBlock.value.length!==0){var l=true;for(var p=0;p<i.valueBlock.value.length;p++)l=l&&(i.valueBlock.value[p].optional||false);if(l){return{verified:true,result:e}}if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name)delete e[i.name]}e.error="Inconsistent object length";return{verified:false,result:e}}for(var p=0;p<d;p++){if(p-f>=t.valueBlock.value.length){if(i.valueBlock.value[p].optional===false){var o={verified:false,result:e};e.error="Inconsistent length between ASN.1 data and schema";if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name){delete e[i.name];o.name=i.name}}return o}}else{if(i.valueBlock.value[0]instanceof Repeated){n=compareSchema(e,t.valueBlock.value[p],i.valueBlock.value[0].value);if(n.verified===false){if(i.valueBlock.value[0].optional)f++;else{if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name)delete e[i.name]}return n}}if(NAME in i.valueBlock.value[0]&&i.valueBlock.value[0].name.length>0){var y={};if(LOCAL in i.valueBlock.value[0]&&i.valueBlock.value[0].local)y=t;else y=e;if(typeof y[i.valueBlock.value[0].name]==="undefined")y[i.valueBlock.value[0].name]=[];y[i.valueBlock.value[0].name].push(t.valueBlock.value[p])}}else{n=compareSchema(e,t.valueBlock.value[p-f],i.valueBlock.value[p]);if(n.verified===false){if(i.valueBlock.value[p].optional)f++;else{if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name)delete e[i.name]}return n}}}}}if(n.verified===false){var o={verified:false,result:e};if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name){delete e[i.name];o.name=i.name}}return o}return{verified:true,result:e}}if(i.primitiveSchema&&VALUE_HEX_VIEW in t.valueBlock){var A=localFromBER(t.valueBlock.valueHexView);if(A.offset===-1){var o={verified:false,result:A.result};if(i.name){i.name=i.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(i.name){delete e[i.name];o.name=i.name}}return o}return compareSchema(e,A.result,i.primitiveSchema)}return{verified:true,result:e}}function verifySchema(e,t){if(t instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 schema type"}}}var i=localFromBER(buildExports.BufferSourceConverter.toUint8Array(e));if(i.offset===-1){return{verified:false,result:i.result}}return compareSchema(i.result,i.result,t)}var asn1js=Object.freeze({__proto__:null,Any:Any,BaseBlock:BaseBlock,BaseStringBlock:BaseStringBlock,BitString:BitString$1,BmpString:BmpString,Boolean:Boolean,CharacterString:CharacterString,Choice:Choice,Constructed:Constructed,DATE:DATE,DateTime:DateTime,Duration:Duration,EndOfContent:EndOfContent,Enumerated:Enumerated,GeneralString:GeneralString,GeneralizedTime:GeneralizedTime,GraphicString:GraphicString,HexBlock:HexBlock,IA5String:IA5String,Integer:Integer,Null:Null,NumericString:NumericString,ObjectIdentifier:ObjectIdentifier,OctetString:OctetString$1,Primitive:Primitive,PrintableString:PrintableString,RawData:RawData,RelativeObjectIdentifier:RelativeObjectIdentifier,Repeated:Repeated,Sequence:Sequence,Set:Set,TIME:TIME,TeletexString:TeletexString,TimeOfDay:TimeOfDay,UTCTime:UTCTime,UniversalString:UniversalString,Utf8String:Utf8String,ValueBlock:ValueBlock,VideotexString:VideotexString,ViewWriter:ViewWriter,VisibleString:VisibleString,compareSchema:compareSchema,fromBER:fromBER,verifySchema:verifySchema});var AsnTypeTypes;(function(e){e[e["Sequence"]=0]="Sequence";e[e["Set"]=1]="Set";e[e["Choice"]=2]="Choice"})(AsnTypeTypes||(AsnTypeTypes={}));var AsnPropTypes;(function(e){e[e["Any"]=1]="Any";e[e["Boolean"]=2]="Boolean";e[e["OctetString"]=3]="OctetString";e[e["BitString"]=4]="BitString";e[e["Integer"]=5]="Integer";e[e["Enumerated"]=6]="Enumerated";e[e["ObjectIdentifier"]=7]="ObjectIdentifier";e[e["Utf8String"]=8]="Utf8String";e[e["BmpString"]=9]="BmpString";e[e["UniversalString"]=10]="UniversalString";e[e["NumericString"]=11]="NumericString";e[e["PrintableString"]=12]="PrintableString";e[e["TeletexString"]=13]="TeletexString";e[e["VideotexString"]=14]="VideotexString";e[e["IA5String"]=15]="IA5String";e[e["GraphicString"]=16]="GraphicString";e[e["VisibleString"]=17]="VisibleString";e[e["GeneralString"]=18]="GeneralString";e[e["CharacterString"]=19]="CharacterString";e[e["UTCTime"]=20]="UTCTime";e[e["GeneralizedTime"]=21]="GeneralizedTime";e[e["DATE"]=22]="DATE";e[e["TimeOfDay"]=23]="TimeOfDay";e[e["DateTime"]=24]="DateTime";e[e["Duration"]=25]="Duration";e[e["TIME"]=26]="TIME";e[e["Null"]=27]="Null"})(AsnPropTypes||(AsnPropTypes={}));var BitString=function(){function e(e,t){if(t===void 0){t=0}this.unusedBits=0;this.value=new ArrayBuffer(0);if(e){if(typeof e==="number"){this.fromNumber(e)}else if(buildExports.BufferSourceConverter.isBufferSource(e)){this.unusedBits=t;this.value=buildExports.BufferSourceConverter.toArrayBuffer(e)}else{throw TypeError("Unsupported type of 'params' argument for BitString")}}}e.prototype.fromASN=function(e){if(!(e instanceof BitString$1)){throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString")}this.unusedBits=e.valueBlock.unusedBits;this.value=e.valueBlock.valueHex;return this};e.prototype.toASN=function(){return new BitString$1({unusedBits:this.unusedBits,valueHex:this.value})};e.prototype.toSchema=function(e){return new BitString$1({name:e})};e.prototype.toNumber=function(){var e="";var t=new Uint8Array(this.value);for(var i=0,r=t;i<r.length;i++){var n=r[i];e+=n.toString(2).padStart(8,"0")}e=e.split("").reverse().join("");if(this.unusedBits){e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")}return parseInt(e,2)};e.prototype.fromNumber=function(e){var t=e.toString(2);var i=t.length+7>>3;this.unusedBits=(i<<3)-t.length;var r=new Uint8Array(i);t=t.padStart(i<<3,"0").split("").reverse().join("");var n=0;while(n<i){r[n]=parseInt(t.slice(n<<3,(n<<3)+8),2);n++}this.value=r.buffer};return e}();var OctetString=function(){function e(e){if(typeof e==="number"){this.buffer=new ArrayBuffer(e)}else{if(buildExports.BufferSourceConverter.isBufferSource(e)){this.buffer=buildExports.BufferSourceConverter.toArrayBuffer(e)}else if(Array.isArray(e)){this.buffer=new Uint8Array(e)}else{this.buffer=new ArrayBuffer(0)}}}Object.defineProperty(e.prototype,"byteLength",{get:function(){return this.buffer.byteLength},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"byteOffset",{get:function(){return 0},enumerable:false,configurable:true});e.prototype.fromASN=function(e){if(!(e instanceof OctetString$1)){throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString")}this.buffer=e.valueBlock.valueHex;return this};e.prototype.toASN=function(){return new OctetString$1({valueHex:this.buffer})};e.prototype.toSchema=function(e){return new OctetString$1({name:e})};return e}();var AsnAnyConverter={fromASN:function(e){return e instanceof Null?null:e.valueBeforeDecodeView},toASN:function(e){if(e===null){return new Null}var t=fromBER(e);if(t.result.error){throw new Error(t.result.error)}return t.result}};var AsnIntegerConverter={fromASN:function(e){return e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec},toASN:function(e){return new Integer({value:+e})}};var AsnEnumeratedConverter={fromASN:function(e){return e.valueBlock.valueDec},toASN:function(e){return new Enumerated({value:e})}};var AsnIntegerArrayBufferConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new Integer({valueHex:e})}};var AsnBitStringConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new BitString$1({valueHex:e})}};var AsnObjectIdentifierConverter={fromASN:function(e){return e.valueBlock.toString()},toASN:function(e){return new ObjectIdentifier({value:e})}};var AsnBooleanConverter={fromASN:function(e){return e.valueBlock.value},toASN:function(e){return new Boolean({value:e})}};var AsnOctetStringConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new OctetString$1({valueHex:e})}};var AsnConstructedOctetStringConverter={fromASN:function(e){return new OctetString(e.getValue())},toASN:function(e){return e.toASN()}};function createStringConverter(e){return{fromASN:function(e){return e.valueBlock.value},toASN:function(t){return new e({value:t})}}}var AsnUtf8StringConverter=createStringConverter(Utf8String);var AsnBmpStringConverter=createStringConverter(BmpString);var AsnUniversalStringConverter=createStringConverter(UniversalString);var AsnNumericStringConverter=createStringConverter(NumericString);var AsnPrintableStringConverter=createStringConverter(PrintableString);var AsnTeletexStringConverter=createStringConverter(TeletexString);var AsnVideotexStringConverter=createStringConverter(VideotexString);var AsnIA5StringConverter=createStringConverter(IA5String);var AsnGraphicStringConverter=createStringConverter(GraphicString);var AsnVisibleStringConverter=createStringConverter(VisibleString);var AsnGeneralStringConverter=createStringConverter(GeneralString);var AsnCharacterStringConverter=createStringConverter(CharacterString);var AsnUTCTimeConverter={fromASN:function(e){return e.toDate()},toASN:function(e){return new UTCTime({valueDate:e})}};var AsnGeneralizedTimeConverter={fromASN:function(e){return e.toDate()},toASN:function(e){return new GeneralizedTime({valueDate:e})}};var AsnNullConverter={fromASN:function(){return null},toASN:function(){return new Null}};function defaultConverter(e){switch(e){case AsnPropTypes.Any:return AsnAnyConverter;case AsnPropTypes.BitString:return AsnBitStringConverter;case AsnPropTypes.BmpString:return AsnBmpStringConverter;case AsnPropTypes.Boolean:return AsnBooleanConverter;case AsnPropTypes.CharacterString:return AsnCharacterStringConverter;case AsnPropTypes.Enumerated:return AsnEnumeratedConverter;case AsnPropTypes.GeneralString:return AsnGeneralStringConverter;case AsnPropTypes.GeneralizedTime:return AsnGeneralizedTimeConverter;case AsnPropTypes.GraphicString:return AsnGraphicStringConverter;case AsnPropTypes.IA5String:return AsnIA5StringConverter;case AsnPropTypes.Integer:return AsnIntegerConverter;case AsnPropTypes.Null:return AsnNullConverter;case AsnPropTypes.NumericString:return AsnNumericStringConverter;case AsnPropTypes.ObjectIdentifier:return AsnObjectIdentifierConverter;case AsnPropTypes.OctetString:return AsnOctetStringConverter;case AsnPropTypes.PrintableString:return AsnPrintableStringConverter;case AsnPropTypes.TeletexString:return AsnTeletexStringConverter;case AsnPropTypes.UTCTime:return AsnUTCTimeConverter;case AsnPropTypes.UniversalString:return AsnUniversalStringConverter;case AsnPropTypes.Utf8String:return AsnUtf8StringConverter;case AsnPropTypes.VideotexString:return AsnVideotexStringConverter;case AsnPropTypes.VisibleString:return AsnVisibleStringConverter;default:return null}}function isConvertible(e){if(typeof e==="function"&&e.prototype){if(e.prototype.toASN&&e.prototype.fromASN){return true}else{return isConvertible(e.prototype)}}else{return!!(e&&typeof e==="object"&&"toASN"in e&&"fromASN"in e)}}function isTypeOfArray(e){var t;if(e){var i=Object.getPrototypeOf(e);if(((t=i===null||i===void 0?void 0:i.prototype)===null||t===void 0?void 0:t.constructor)===Array){return true}return isTypeOfArray(i)}return false}function isArrayEqual(e,t){if(!(e&&t)){return false}if(e.byteLength!==t.byteLength){return false}var i=new Uint8Array(e);var r=new Uint8Array(t);for(var n=0;n<e.byteLength;n++){if(i[n]!==r[n]){return false}}return true}var AsnSchemaStorage=function(){function e(){this.items=new WeakMap}e.prototype.has=function(e){return this.items.has(e)};e.prototype.get=function(e,t){if(t===void 0){t=false}var i=this.items.get(e);if(!i){throw new Error("Cannot get schema for '".concat(e.prototype.constructor.name,"' target"))}if(t&&!i.schema){throw new Error("Schema '".concat(e.prototype.constructor.name,"' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'."))}return i};e.prototype.cache=function(e){var t=this.get(e);if(!t.schema){t.schema=this.create(e,true)}};e.prototype.createDefault=function(e){var t={type:AsnTypeTypes.Sequence,items:{}};var i=this.findParentSchema(e);if(i){Object.assign(t,i);t.items=Object.assign({},t.items,i.items)}return t};e.prototype.create=function(e,t){var i=this.items.get(e)||this.createDefault(e);var r=[];for(var n in i.items){var o=i.items[n];var a=t?n:"";var s=void 0;if(typeof o.type==="number"){var c=AsnPropTypes[o.type];var u=asn1js[c];if(!u){throw new Error("Cannot get ASN1 class by name '".concat(c,"'"))}s=new u({name:a})}else if(isConvertible(o.type)){var p=new o.type;s=p.toSchema(a)}else if(o.optional){var f=this.get(o.type);if(f.type===AsnTypeTypes.Choice){s=new Any({name:a})}else{s=this.create(o.type,false);s.name=a}}else{s=new Any({name:a})}var d=!!o.optional||o.defaultValue!==undefined;if(o.repeated){s.name="";var l=o.repeated==="set"?Set:Sequence;s=new l({name:"",value:[new Repeated({name:a,value:s})]})}if(o.context!==null&&o.context!==undefined){if(o.implicit){if(typeof o.type==="number"||isConvertible(o.type)){var l=o.repeated?Constructed:Primitive;r.push(new l({name:a,optional:d,idBlock:{tagClass:3,tagNumber:o.context}}))}else{this.cache(o.type);var y=!!o.repeated;var A=!y?this.get(o.type,true).schema:s;A="valueBlock"in A?A.valueBlock.value:A.value;r.push(new Constructed({name:!y?a:"",optional:d,idBlock:{tagClass:3,tagNumber:o.context},value:A}))}}else{r.push(new Constructed({optional:d,idBlock:{tagClass:3,tagNumber:o.context},value:[s]}))}}else{s.optional=d;r.push(s)}}switch(i.type){case AsnTypeTypes.Sequence:return new Sequence({value:r,name:""});case AsnTypeTypes.Set:return new Set({value:r,name:""});case AsnTypeTypes.Choice:return new Choice({value:r,name:""});default:throw new Error("Unsupported ASN1 type in use")}};e.prototype.set=function(e,t){this.items.set(e,t);return this};e.prototype.findParentSchema=function(e){var t=Object.getPrototypeOf(e);if(t){var i=this.items.get(t);return i||this.findParentSchema(t)}return null};return e}();var schemaStorage=new AsnSchemaStorage;var AsnType=function(e){return function(t){var i;if(!schemaStorage.has(t)){i=schemaStorage.createDefault(t);schemaStorage.set(t,i)}else{i=schemaStorage.get(t)}Object.assign(i,e)}};var AsnProp=function(e){return function(t,i){var r;if(!schemaStorage.has(t.constructor)){r=schemaStorage.createDefault(t.constructor);schemaStorage.set(t.constructor,r)}else{r=schemaStorage.get(t.constructor)}var n=Object.assign({},e);if(typeof n.type==="number"&&!n.converter){var o=defaultConverter(e.type);if(!o){throw new Error("Cannot get default converter for property '".concat(i,"' of ").concat(t.constructor.name))}n.converter=o}r.items[i]=n}};var AsnSchemaValidationError=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.schemas=[];return t}return t}(Error);var AsnParser=function(){function e(){}e.parse=function(e,t){var i=fromBER(e);if(i.result.error){throw new Error(i.result.error)}var r=this.fromASN(i.result,t);return r};e.fromASN=function(e,t){var i=this;var r;try{if(isConvertible(t)){var n=new t;return n.fromASN(e)}var o=schemaStorage.get(t);schemaStorage.cache(t);var a=o.schema;if(e.constructor===Constructed&&o.type!==AsnTypeTypes.Choice){a=new Constructed({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:o.schema.valueBlock.value});for(var s in o.items){delete e[s]}}var c=compareSchema({},e,a);if(!c.verified){throw new AsnSchemaValidationError("Data does not match to ".concat(t.name," ASN1 schema. ").concat(c.result.error))}var u=new t;if(isTypeOfArray(t)){if(!("value"in e.valueBlock&&Array.isArray(e.valueBlock.value))){throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.")}var p=o.itemType;if(typeof p==="number"){var f=defaultConverter(p);if(!f){throw new Error("Cannot get default converter for array item of ".concat(t.name," ASN1 schema"))}return t.from(e.valueBlock.value,(function(e){return f.fromASN(e)}))}else{return t.from(e.valueBlock.value,(function(e){return i.fromASN(e,p)}))}}var d=function(e){var t=c.result[e];if(!t){return"continue"}var n=o.items[e];var a=n.type;if(typeof a==="number"||isConvertible(a)){var s=(r=n.converter)!==null&&r!==void 0?r:isConvertible(a)?new a:null;if(!s){throw new Error("Converter is empty")}if(n.repeated){if(n.implicit){var p=n.repeated==="sequence"?Sequence:Set;var f=new p;f.valueBlock=t.valueBlock;var d=fromBER(f.toBER(false));if(d.offset===-1){throw new Error("Cannot parse the child item. ".concat(d.result.error))}if(!("value"in d.result.valueBlock&&Array.isArray(d.result.valueBlock.value))){throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.")}var y=d.result.valueBlock.value;u[e]=Array.from(y,(function(e){return s.fromASN(e)}))}else{u[e]=Array.from(t,(function(e){return s.fromASN(e)}))}}else{var A=t;if(n.implicit){var f=void 0;if(isConvertible(a)){f=(new a).toSchema("")}else{var v=AsnPropTypes[a];var h=asn1js[v];if(!h){throw new Error("Cannot get '".concat(v,"' class from asn1js module"))}f=new h}f.valueBlock=A.valueBlock;A=fromBER(f.toBER(false)).result}u[e]=s.fromASN(A)}}else{if(n.repeated){if(!Array.isArray(t)){throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.")}u[e]=Array.from(t,(function(e){return i.fromASN(e,a)}))}else{u[e]=l.fromASN(t,a)}}};var l=this;for(var s in o.items){d(s)}return u}catch(e){if(e instanceof AsnSchemaValidationError){e.schemas.push(t.name)}throw e}};return e}();var AsnSerializer=function(){function e(){}e.serialize=function(e){if(e instanceof BaseBlock){return e.toBER(false)}return this.toASN(e).toBER(false)};e.toASN=function(t){var i=this;if(t&&typeof t==="object"&&isConvertible(t)){return t.toASN()}if(!(t&&typeof t==="object")){throw new TypeError("Parameter 1 should be type of Object.")}var r=t.constructor;var n=schemaStorage.get(r);schemaStorage.cache(r);var o=[];if(n.itemType){if(!Array.isArray(t)){throw new TypeError("Parameter 1 should be type of Array.")}if(typeof n.itemType==="number"){var a=defaultConverter(n.itemType);if(!a){throw new Error("Cannot get default converter for array item of ".concat(r.name," ASN1 schema"))}o=t.map((function(e){return a.toASN(e)}))}else{o=t.map((function(e){return i.toAsnItem({type:n.itemType},"[]",r,e)}))}}else{for(var s in n.items){var c=n.items[s];var u=t[s];if(u===undefined||c.defaultValue===u||typeof c.defaultValue==="object"&&typeof u==="object"&&isArrayEqual(this.serialize(c.defaultValue),this.serialize(u))){continue}var p=e.toAsnItem(c,s,r,u);if(typeof c.context==="number"){if(c.implicit){if(!c.repeated&&(typeof c.type==="number"||isConvertible(c.type))){var f={};f.valueHex=p instanceof Null?p.valueBeforeDecodeView:p.valueBlock.toBER();o.push(new Primitive(__assign({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context}},f)))}else{o.push(new Constructed({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:p.valueBlock.value}))}}else{o.push(new Constructed({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:[p]}))}}else if(c.repeated){o=o.concat(p)}else{o.push(p)}}}var d;switch(n.type){case AsnTypeTypes.Sequence:d=new Sequence({value:o});break;case AsnTypeTypes.Set:d=new Set({value:o});break;case AsnTypeTypes.Choice:if(!o[0]){throw new Error("Schema '".concat(r.name,"' has wrong data. Choice cannot be empty."))}d=o[0];break}return d};e.toAsnItem=function(e,t,i,r){var n=this;var o;if(typeof e.type==="number"){var a=e.converter;if(!a){throw new Error("Property '".concat(t,"' doesn't have converter for type ").concat(AsnPropTypes[e.type]," in schema '").concat(i.name,"'"))}if(e.repeated){if(!Array.isArray(r)){throw new TypeError("Parameter 'objProp' should be type of Array.")}var s=Array.from(r,(function(e){return a.toASN(e)}));var c=e.repeated==="sequence"?Sequence:Set;o=new c({value:s})}else{o=a.toASN(r)}}else{if(e.repeated){if(!Array.isArray(r)){throw new TypeError("Parameter 'objProp' should be type of Array.")}var s=Array.from(r,(function(e){return n.toASN(e)}));var c=e.repeated==="sequence"?Sequence:Set;o=new c({value:s})}else{o=this.toASN(r)}}return o};return e}();var AsnArray=function(e){__extends(t,e);function t(t){if(t===void 0){t=[]}var i=this;if(typeof t==="number"){i=e.call(this,t)||this}else{i=e.call(this)||this;for(var r=0,n=t;r<n.length;r++){var o=n[r];i.push(o)}}return i}return t}(Array);var AsnConvert=function(){function e(){}e.serialize=function(e){return AsnSerializer.serialize(e)};e.parse=function(e,t){return AsnParser.parse(e,t)};e.toString=function(t){var i=buildExports.BufferSourceConverter.isBufferSource(t)?buildExports.BufferSourceConverter.toArrayBuffer(t):e.serialize(t);var r=fromBER(i);if(r.offset===-1){throw new Error("Cannot decode ASN.1 data. ".concat(r.result.error))}return r.result.toString()};return e}();function __decorate$1(e,t,i,r){var n=arguments.length,o=n<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(n<3?a(o):n>3?a(t,i,o):a(t,i))||o;return n>3&&o&&Object.defineProperty(t,i,o),o}typeof SuppressedError==="function"?SuppressedError:function(e,t,i){var r=new Error(i);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};var IpConverter=function(){function e(){}e.isIPv4=function(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)};e.parseIPv4=function(e){var t=e.split(".");if(t.length!==4){throw new Error("Invalid IPv4 address")}return t.map((function(e){var t=parseInt(e,10);if(isNaN(t)||t<0||t>255){throw new Error("Invalid IPv4 address part")}return t}))};e.parseIPv6=function(e){var t=this.expandIPv6(e);var i=t.split(":");if(i.length!==8){throw new Error("Invalid IPv6 address")}return i.reduce((function(e,t){var i=parseInt(t,16);if(isNaN(i)||i<0||i>65535){throw new Error("Invalid IPv6 address part")}e.push(i>>8&255);e.push(i&255);return e}),[])};e.expandIPv6=function(e){if(!e.includes("::")){return e}var t=e.split("::");if(t.length>2){throw new Error("Invalid IPv6 address")}var i=t[0]?t[0].split(":"):[];var r=t[1]?t[1].split(":"):[];var n=8-(i.length+r.length);if(n<0){throw new Error("Invalid IPv6 address")}return __spreadArray(__spreadArray(__spreadArray([],i,true),Array(n).fill("0"),true),r,true).join(":")};e.formatIPv6=function(e){var t=[];for(var i=0;i<16;i+=2){t.push((e[i]<<8|e[i+1]).toString(16))}return this.compressIPv6(t.join(":"))};e.compressIPv6=function(e){var t=e.split(":");var i=-1;var r=0;var n=-1;var o=0;for(var a=0;a<t.length;a++){if(t[a]==="0"){if(n===-1){n=a}o++}else{if(o>r){i=n;r=o}n=-1;o=0}}if(o>r){i=n;r=o}if(r>1){var s=t.slice(0,i).join(":");var c=t.slice(i+r).join(":");return"".concat(s,"::").concat(c)}return e};e.parseCIDR=function(e){var t=e.split("/"),i=t[0],r=t[1];var n=parseInt(r,10);if(this.isIPv4(i)){if(n<0||n>32){throw new Error("Invalid IPv4 prefix length")}return[this.parseIPv4(i),n]}else{if(n<0||n>128){throw new Error("Invalid IPv6 prefix length")}return[this.parseIPv6(i),n]}};e.decodeIP=function(e){if(e.length===64&&parseInt(e,16)===0){return"::/0"}if(e.length!==16){return e}var t=parseInt(e.slice(8),16).toString(2).split("").reduce((function(e,t){return e+ +t}),0);var i=e.slice(0,8).replace(/(.{2})/g,(function(e){return"".concat(parseInt(e,16),".")}));i=i.slice(0,-1);return"".concat(i,"/").concat(t)};e.toString=function(e){var t=new Uint8Array(e);if(t.length===4){return Array.from(t).join(".")}if(t.length===16){return this.formatIPv6(t)}if(t.length===8||t.length===32){var i=t.length/2;var r=t.slice(0,i);var n=t.slice(i);var o=t.every((function(e){return e===0}));if(o){return t.length===8?"0.0.0.0/0":"::/0"}var a=n.reduce((function(e,t){return e+(t.toString(2).match(/1/g)||[]).length}),0);if(t.length===8){var s=Array.from(r).join(".");return"".concat(s,"/").concat(a)}else{var s=this.formatIPv6(r);return"".concat(s,"/").concat(a)}}return this.decodeIP(buildExports.Convert.ToHex(e))};e.fromString=function(e){if(e.includes("/")){var t=this.parseCIDR(e),i=t[0],r=t[1];var n=new Uint8Array(i.length);var o=r;for(var a=0;a<n.length;a++){if(o>=8){n[a]=255;o-=8}else if(o>0){n[a]=255<<8-o;o=0}}var s=new Uint8Array(i.length*2);s.set(i,0);s.set(n,i.length);return s.buffer}var c=this.isIPv4(e)?this.parseIPv4(e):this.parseIPv6(e);return new Uint8Array(c).buffer};return e}();var RelativeDistinguishedName_1,RDNSequence_1,Name_1;var DirectoryString=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""};return e}();__decorate$1([AsnProp({type:AsnPropTypes.TeletexString})],DirectoryString.prototype,"teletexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],DirectoryString.prototype,"printableString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.UniversalString})],DirectoryString.prototype,"universalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],DirectoryString.prototype,"utf8String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],DirectoryString.prototype,"bmpString",void 0);DirectoryString=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DirectoryString);var AttributeValue=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var i=e.call(this,t)||this;Object.assign(i,t);return i}t.prototype.toString=function(){return this.ia5String||(this.anyValue?buildExports.Convert.ToHex(this.anyValue):e.prototype.toString.call(this))};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],AttributeValue.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],AttributeValue.prototype,"anyValue",void 0);AttributeValue=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttributeValue);var AttributeTypeAndValue=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new AttributeValue;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AttributeTypeAndValue.prototype,"type",void 0);__decorate$1([AsnProp({type:AttributeValue})],AttributeTypeAndValue.prototype,"value",void 0);var RelativeDistinguishedName=RelativeDistinguishedName_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,RelativeDistinguishedName_1.prototype);return i}return t}(AsnArray);RelativeDistinguishedName=RelativeDistinguishedName_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:AttributeTypeAndValue})],RelativeDistinguishedName);var RDNSequence=RDNSequence_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,RDNSequence_1.prototype);return i}return t}(AsnArray);RDNSequence=RDNSequence_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RelativeDistinguishedName})],RDNSequence);var Name$1=Name_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name_1.prototype);return i}return t}(RDNSequence);Name$1=Name_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Name$1);var AsnIpConverter={fromASN:function(e){return IpConverter.toString(AsnOctetStringConverter.fromASN(e))},toASN:function(e){return AsnOctetStringConverter.toASN(IpConverter.fromString(e))}};var OtherName=function(){function e(e){if(e===void 0){e={}}this.typeId="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherName.prototype,"typeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],OtherName.prototype,"value",void 0);var EDIPartyName=function(){function e(e){if(e===void 0){e={}}this.partyName=new DirectoryString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DirectoryString,optional:true,context:0,implicit:true})],EDIPartyName.prototype,"nameAssigner",void 0);__decorate$1([AsnProp({type:DirectoryString,context:1,implicit:true})],EDIPartyName.prototype,"partyName",void 0);var GeneralName=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherName,context:0,implicit:true})],GeneralName.prototype,"otherName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:1,implicit:true})],GeneralName.prototype,"rfc822Name",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:2,implicit:true})],GeneralName.prototype,"dNSName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:3,implicit:true})],GeneralName.prototype,"x400Address",void 0);__decorate$1([AsnProp({type:Name$1,context:4,implicit:false})],GeneralName.prototype,"directoryName",void 0);__decorate$1([AsnProp({type:EDIPartyName,context:5})],GeneralName.prototype,"ediPartyName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:6,implicit:true})],GeneralName.prototype,"uniformResourceIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString,context:7,implicit:true,converter:AsnIpConverter})],GeneralName.prototype,"iPAddress",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,context:8,implicit:true})],GeneralName.prototype,"registeredID",void 0);GeneralName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],GeneralName);var id_pkix$1="1.3.6.1.5.5.7";var id_pe$1="".concat(id_pkix$1,".1");var id_ce="2.5.29";var AuthorityInfoAccessSyntax_1;var id_pe_authorityInfoAccess="".concat(id_pe$1,".1");var AccessDescription=function(){function e(e){if(e===void 0){e={}}this.accessMethod="";this.accessLocation=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AccessDescription.prototype,"accessMethod",void 0);__decorate$1([AsnProp({type:GeneralName})],AccessDescription.prototype,"accessLocation",void 0);var AuthorityInfoAccessSyntax=AuthorityInfoAccessSyntax_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,AuthorityInfoAccessSyntax_1.prototype);return i}return t}(AsnArray);AuthorityInfoAccessSyntax=AuthorityInfoAccessSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AccessDescription})],AuthorityInfoAccessSyntax);var id_ce_authorityKeyIdentifier="".concat(id_ce,".35");var KeyIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var AuthorityKeyIdentifier=function(){function e(e){if(e===void 0){e={}}if(e){Object.assign(this,e)}}return e}();__decorate$1([AsnProp({type:KeyIdentifier,context:0,optional:true,implicit:true})],AuthorityKeyIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,optional:true,implicit:true,repeated:"sequence"})],AuthorityKeyIdentifier.prototype,"authorityCertIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,optional:true,implicit:true,converter:AsnIntegerArrayBufferConverter})],AuthorityKeyIdentifier.prototype,"authorityCertSerialNumber",void 0);var id_ce_basicConstraints="".concat(id_ce,".19");var BasicConstraints=function(){function e(e){if(e===void 0){e={}}this.cA=false;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:false})],BasicConstraints.prototype,"cA",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],BasicConstraints.prototype,"pathLenConstraint",void 0);var GeneralNames_1;var GeneralNames=GeneralNames_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,GeneralNames_1.prototype);return i}return t}(AsnArray);GeneralNames=GeneralNames_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralName})],GeneralNames);var CertificateIssuer_1;var id_ce_certificateIssuer="".concat(id_ce,".29");var CertificateIssuer=CertificateIssuer_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CertificateIssuer_1.prototype);return i}return t}(GeneralNames);CertificateIssuer=CertificateIssuer_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertificateIssuer);var CertificatePolicies_1;var id_ce_certificatePolicies="".concat(id_ce,".32");var DisplayText=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],DisplayText.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],DisplayText.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],DisplayText.prototype,"bmpString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],DisplayText.prototype,"utf8String",void 0);DisplayText=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DisplayText);var NoticeReference=function(){function e(e){if(e===void 0){e={}}this.organization=new DisplayText;this.noticeNumbers=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DisplayText})],NoticeReference.prototype,"organization",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,repeated:"sequence"})],NoticeReference.prototype,"noticeNumbers",void 0);var UserNotice=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:NoticeReference,optional:true})],UserNotice.prototype,"noticeRef",void 0);__decorate$1([AsnProp({type:DisplayText,optional:true})],UserNotice.prototype,"explicitText",void 0);var Qualifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],Qualifier.prototype,"cPSuri",void 0);__decorate$1([AsnProp({type:UserNotice})],Qualifier.prototype,"userNotice",void 0);Qualifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Qualifier);var PolicyQualifierInfo=function(){function e(e){if(e===void 0){e={}}this.policyQualifierId="";this.qualifier=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyQualifierInfo.prototype,"policyQualifierId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],PolicyQualifierInfo.prototype,"qualifier",void 0);var PolicyInformation=function(){function e(e){if(e===void 0){e={}}this.policyIdentifier="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyInformation.prototype,"policyIdentifier",void 0);__decorate$1([AsnProp({type:PolicyQualifierInfo,repeated:"sequence",optional:true})],PolicyInformation.prototype,"policyQualifiers",void 0);var CertificatePolicies=CertificatePolicies_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CertificatePolicies_1.prototype);return i}return t}(AsnArray);CertificatePolicies=CertificatePolicies_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PolicyInformation})],CertificatePolicies);var id_ce_cRLNumber="".concat(id_ce,".20");var CRLNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CRLNumber.prototype,"value",void 0);CRLNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CRLNumber);var id_ce_deltaCRLIndicator="".concat(id_ce,".27");var BaseCRLNumber=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CRLNumber);BaseCRLNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],BaseCRLNumber);var CRLDistributionPoints_1;var id_ce_cRLDistributionPoints="".concat(id_ce,".31");var ReasonFlags;(function(e){e[e["unused"]=1]="unused";e[e["keyCompromise"]=2]="keyCompromise";e[e["cACompromise"]=4]="cACompromise";e[e["affiliationChanged"]=8]="affiliationChanged";e[e["superseded"]=16]="superseded";e[e["cessationOfOperation"]=32]="cessationOfOperation";e[e["certificateHold"]=64]="certificateHold";e[e["privilegeWithdrawn"]=128]="privilegeWithdrawn";e[e["aACompromise"]=256]="aACompromise"})(ReasonFlags||(ReasonFlags={}));var Reason=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=[];var t=this.toNumber();if(t&ReasonFlags.aACompromise){e.push("aACompromise")}if(t&ReasonFlags.affiliationChanged){e.push("affiliationChanged")}if(t&ReasonFlags.cACompromise){e.push("cACompromise")}if(t&ReasonFlags.certificateHold){e.push("certificateHold")}if(t&ReasonFlags.cessationOfOperation){e.push("cessationOfOperation")}if(t&ReasonFlags.keyCompromise){e.push("keyCompromise")}if(t&ReasonFlags.privilegeWithdrawn){e.push("privilegeWithdrawn")}if(t&ReasonFlags.superseded){e.push("superseded")}if(t&ReasonFlags.unused){e.push("unused")}return e};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var DistributionPointName=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,repeated:"sequence",implicit:true})],DistributionPointName.prototype,"fullName",void 0);__decorate$1([AsnProp({type:RelativeDistinguishedName,context:1,implicit:true})],DistributionPointName.prototype,"nameRelativeToCRLIssuer",void 0);DistributionPointName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DistributionPointName);var DistributionPoint=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DistributionPointName,context:0,optional:true})],DistributionPoint.prototype,"distributionPoint",void 0);__decorate$1([AsnProp({type:Reason,context:1,optional:true,implicit:true})],DistributionPoint.prototype,"reasons",void 0);__decorate$1([AsnProp({type:GeneralName,context:2,optional:true,repeated:"sequence",implicit:true})],DistributionPoint.prototype,"cRLIssuer",void 0);var CRLDistributionPoints=CRLDistributionPoints_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CRLDistributionPoints_1.prototype);return i}return t}(AsnArray);CRLDistributionPoints=CRLDistributionPoints_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:DistributionPoint})],CRLDistributionPoints);var FreshestCRL_1;var FreshestCRL=FreshestCRL_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,FreshestCRL_1.prototype);return i}return t}(CRLDistributionPoints);FreshestCRL=FreshestCRL_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:DistributionPoint})],FreshestCRL);var id_ce_issuingDistributionPoint="".concat(id_ce,".28");var IssuingDistributionPoint=function(){function e(t){if(t===void 0){t={}}this.onlyContainsUserCerts=e.ONLY;this.onlyContainsCACerts=e.ONLY;this.indirectCRL=e.ONLY;this.onlyContainsAttributeCerts=e.ONLY;Object.assign(this,t)}return e}();IssuingDistributionPoint.ONLY=false;__decorate$1([AsnProp({type:DistributionPointName,context:0,optional:true})],IssuingDistributionPoint.prototype,"distributionPoint",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:1,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsUserCerts",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:2,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsCACerts",void 0);__decorate$1([AsnProp({type:Reason,context:3,optional:true,implicit:true})],IssuingDistributionPoint.prototype,"onlySomeReasons",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:4,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"indirectCRL",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:5,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsAttributeCerts",void 0);var id_ce_cRLReasons="".concat(id_ce,".21");var CRLReasons;(function(e){e[e["unspecified"]=0]="unspecified";e[e["keyCompromise"]=1]="keyCompromise";e[e["cACompromise"]=2]="cACompromise";e[e["affiliationChanged"]=3]="affiliationChanged";e[e["superseded"]=4]="superseded";e[e["cessationOfOperation"]=5]="cessationOfOperation";e[e["certificateHold"]=6]="certificateHold";e[e["removeFromCRL"]=8]="removeFromCRL";e[e["privilegeWithdrawn"]=9]="privilegeWithdrawn";e[e["aACompromise"]=10]="aACompromise"})(CRLReasons||(CRLReasons={}));var CRLReason=function(){function e(e){if(e===void 0){e=CRLReasons.unspecified}this.reason=CRLReasons.unspecified;this.reason=e}e.prototype.toJSON=function(){return CRLReasons[this.reason]};e.prototype.toString=function(){return this.toJSON()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],CRLReason.prototype,"reason",void 0);CRLReason=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CRLReason);var ExtendedKeyUsage_1;var id_ce_extKeyUsage="".concat(id_ce,".37");var ExtendedKeyUsage=ExtendedKeyUsage_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,ExtendedKeyUsage_1.prototype);return i}return t}(AsnArray);ExtendedKeyUsage=ExtendedKeyUsage_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],ExtendedKeyUsage);var id_ce_inhibitAnyPolicy="".concat(id_ce,".54");var InhibitAnyPolicy=function(){function e(e){if(e===void 0){e=new ArrayBuffer(0)}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],InhibitAnyPolicy.prototype,"value",void 0);InhibitAnyPolicy=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],InhibitAnyPolicy);var id_ce_invalidityDate="".concat(id_ce,".24");var InvalidityDate=function(){function e(e){this.value=new Date;if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],InvalidityDate.prototype,"value",void 0);InvalidityDate=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],InvalidityDate);var IssueAlternativeName_1;var id_ce_issuerAltName="".concat(id_ce,".18");var IssueAlternativeName=IssueAlternativeName_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,IssueAlternativeName_1.prototype);return i}return t}(GeneralNames);IssueAlternativeName=IssueAlternativeName_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],IssueAlternativeName);var id_ce_keyUsage="".concat(id_ce,".15");var KeyUsageFlags;(function(e){e[e["digitalSignature"]=1]="digitalSignature";e[e["nonRepudiation"]=2]="nonRepudiation";e[e["keyEncipherment"]=4]="keyEncipherment";e[e["dataEncipherment"]=8]="dataEncipherment";e[e["keyAgreement"]=16]="keyAgreement";e[e["keyCertSign"]=32]="keyCertSign";e[e["cRLSign"]=64]="cRLSign";e[e["encipherOnly"]=128]="encipherOnly";e[e["decipherOnly"]=256]="decipherOnly"})(KeyUsageFlags||(KeyUsageFlags={}));var KeyUsage=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=this.toNumber();var t=[];if(e&KeyUsageFlags.cRLSign){t.push("crlSign")}if(e&KeyUsageFlags.dataEncipherment){t.push("dataEncipherment")}if(e&KeyUsageFlags.decipherOnly){t.push("decipherOnly")}if(e&KeyUsageFlags.digitalSignature){t.push("digitalSignature")}if(e&KeyUsageFlags.encipherOnly){t.push("encipherOnly")}if(e&KeyUsageFlags.keyAgreement){t.push("keyAgreement")}if(e&KeyUsageFlags.keyCertSign){t.push("keyCertSign")}if(e&KeyUsageFlags.keyEncipherment){t.push("keyEncipherment")}if(e&KeyUsageFlags.nonRepudiation){t.push("nonRepudiation")}return t};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var GeneralSubtrees_1;var id_ce_nameConstraints="".concat(id_ce,".30");var GeneralSubtree=function(){function e(e){if(e===void 0){e={}}this.base=new GeneralName;this.minimum=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],GeneralSubtree.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,defaultValue:0,implicit:true})],GeneralSubtree.prototype,"minimum",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,optional:true,implicit:true})],GeneralSubtree.prototype,"maximum",void 0);var GeneralSubtrees=GeneralSubtrees_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,GeneralSubtrees_1.prototype);return i}return t}(AsnArray);GeneralSubtrees=GeneralSubtrees_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralSubtree})],GeneralSubtrees);var NameConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralSubtrees,context:0,optional:true,implicit:true})],NameConstraints.prototype,"permittedSubtrees",void 0);__decorate$1([AsnProp({type:GeneralSubtrees,context:1,optional:true,implicit:true})],NameConstraints.prototype,"excludedSubtrees",void 0);var id_ce_policyConstraints="".concat(id_ce,".36");var PolicyConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,implicit:true,optional:true,converter:AsnIntegerArrayBufferConverter})],PolicyConstraints.prototype,"requireExplicitPolicy",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,implicit:true,optional:true,converter:AsnIntegerArrayBufferConverter})],PolicyConstraints.prototype,"inhibitPolicyMapping",void 0);var PolicyMappings_1;var id_ce_policyMappings="".concat(id_ce,".33");var PolicyMapping=function(){function e(e){if(e===void 0){e={}}this.issuerDomainPolicy="";this.subjectDomainPolicy="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyMapping.prototype,"issuerDomainPolicy",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyMapping.prototype,"subjectDomainPolicy",void 0);var PolicyMappings=PolicyMappings_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,PolicyMappings_1.prototype);return i}return t}(AsnArray);PolicyMappings=PolicyMappings_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PolicyMapping})],PolicyMappings);var SubjectAlternativeName_1;var id_ce_subjectAltName="".concat(id_ce,".17");var SubjectAlternativeName=SubjectAlternativeName_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SubjectAlternativeName_1.prototype);return i}return t}(GeneralNames);SubjectAlternativeName=SubjectAlternativeName_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SubjectAlternativeName);var Attribute$1=function(){function e(e){if(e===void 0){e={}}this.type="";this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute$1.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute$1.prototype,"values",void 0);var SubjectDirectoryAttributes_1;var id_ce_subjectDirectoryAttributes="".concat(id_ce,".9");var SubjectDirectoryAttributes=SubjectDirectoryAttributes_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SubjectDirectoryAttributes_1.prototype);return i}return t}(AsnArray);SubjectDirectoryAttributes=SubjectDirectoryAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],SubjectDirectoryAttributes);var id_ce_subjectKeyIdentifier="".concat(id_ce,".14");var SubjectKeyIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(KeyIdentifier);var id_ce_privateKeyUsagePeriod="".concat(id_ce,".16");var PrivateKeyUsagePeriod=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,context:0,implicit:true,optional:true})],PrivateKeyUsagePeriod.prototype,"notBefore",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,context:1,implicit:true,optional:true})],PrivateKeyUsagePeriod.prototype,"notAfter",void 0);var id_entrust_entrustVersInfo="1.2.840.113533.7.65.0";var EntrustInfoFlags;(function(e){e[e["keyUpdateAllowed"]=1]="keyUpdateAllowed";e[e["newExtensions"]=2]="newExtensions";e[e["pKIXCertificate"]=4]="pKIXCertificate"})(EntrustInfoFlags||(EntrustInfoFlags={}));var EntrustInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=[];var t=this.toNumber();if(t&EntrustInfoFlags.pKIXCertificate){e.push("pKIXCertificate")}if(t&EntrustInfoFlags.newExtensions){e.push("newExtensions")}if(t&EntrustInfoFlags.keyUpdateAllowed){e.push("keyUpdateAllowed")}return e};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var EntrustVersionInfo=function(){function e(e){if(e===void 0){e={}}this.entrustVers="";this.entrustInfoFlags=new EntrustInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralString})],EntrustVersionInfo.prototype,"entrustVers",void 0);__decorate$1([AsnProp({type:EntrustInfo})],EntrustVersionInfo.prototype,"entrustInfoFlags",void 0);var SubjectInfoAccessSyntax_1;var id_pe_subjectInfoAccess="".concat(id_pe$1,".11");var SubjectInfoAccessSyntax=SubjectInfoAccessSyntax_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SubjectInfoAccessSyntax_1.prototype);return i}return t}(AsnArray);SubjectInfoAccessSyntax=SubjectInfoAccessSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AccessDescription})],SubjectInfoAccessSyntax);var AlgorithmIdentifier=function(){function e(e){if(e===void 0){e={}}this.algorithm="";Object.assign(this,e)}e.prototype.isEqual=function(t){return t instanceof e&&t.algorithm==this.algorithm&&(t.parameters&&this.parameters&&buildExports.isEqual(t.parameters,this.parameters)||t.parameters===this.parameters)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AlgorithmIdentifier.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],AlgorithmIdentifier.prototype,"parameters",void 0);var SubjectPublicKeyInfo=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.subjectPublicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],SubjectPublicKeyInfo.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],SubjectPublicKeyInfo.prototype,"subjectPublicKey",void 0);var Time=function(){function e(e){if(e){if(typeof e==="string"||typeof e==="number"||e instanceof Date){var t=new Date(e);if(t.getUTCFullYear()>2049){this.generalTime=t}else{this.utcTime=t}}else{Object.assign(this,e)}}}e.prototype.getTime=function(){var e=this.utcTime||this.generalTime;if(!e){throw new Error("Cannot get time from CHOICE object")}return e};return e}();__decorate$1([AsnProp({type:AsnPropTypes.UTCTime})],Time.prototype,"utcTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],Time.prototype,"generalTime",void 0);Time=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Time);var Validity=function(){function e(e){this.notBefore=new Time(new Date);this.notAfter=new Time(new Date);if(e){this.notBefore=new Time(e.notBefore);this.notAfter=new Time(e.notAfter)}}return e}();__decorate$1([AsnProp({type:Time})],Validity.prototype,"notBefore",void 0);__decorate$1([AsnProp({type:Time})],Validity.prototype,"notAfter",void 0);var Extensions_1;var Extension$1=function(){function e(t){if(t===void 0){t={}}this.extnID="";this.critical=e.CRITICAL;this.extnValue=new OctetString;Object.assign(this,t)}return e}();Extension$1.CRITICAL=false;__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Extension$1.prototype,"extnID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:Extension$1.CRITICAL})],Extension$1.prototype,"critical",void 0);__decorate$1([AsnProp({type:OctetString})],Extension$1.prototype,"extnValue",void 0);var Extensions=Extensions_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Extensions_1.prototype);return i}return t}(AsnArray);Extensions=Extensions_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Extension$1})],Extensions);var Version$4;(function(e){e[e["v1"]=0]="v1";e[e["v2"]=1]="v2";e[e["v3"]=2]="v3"})(Version$4||(Version$4={}));var TBSCertificate=function(){function e(e){if(e===void 0){e={}}this.version=Version$4.v1;this.serialNumber=new ArrayBuffer(0);this.signature=new AlgorithmIdentifier;this.issuer=new Name$1;this.validity=new Validity;this.subject=new Name$1;this.subjectPublicKeyInfo=new SubjectPublicKeyInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,defaultValue:Version$4.v1})],TBSCertificate.prototype,"version",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],TBSCertificate.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],TBSCertificate.prototype,"signature",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertificate.prototype,"issuer",void 0);__decorate$1([AsnProp({type:Validity})],TBSCertificate.prototype,"validity",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertificate.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],TBSCertificate.prototype,"subjectPublicKeyInfo",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,implicit:true,optional:true})],TBSCertificate.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:2,implicit:true,optional:true})],TBSCertificate.prototype,"subjectUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,context:3,optional:true})],TBSCertificate.prototype,"extensions",void 0);var Certificate=function(){function e(e){if(e===void 0){e={}}this.tbsCertificate=new TBSCertificate;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TBSCertificate})],Certificate.prototype,"tbsCertificate",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],Certificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],Certificate.prototype,"signatureValue",void 0);var RevokedCertificate=function(){function e(e){if(e===void 0){e={}}this.userCertificate=new ArrayBuffer(0);this.revocationDate=new Time;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RevokedCertificate.prototype,"userCertificate",void 0);__decorate$1([AsnProp({type:Time})],RevokedCertificate.prototype,"revocationDate",void 0);__decorate$1([AsnProp({type:Extension$1,optional:true,repeated:"sequence"})],RevokedCertificate.prototype,"crlEntryExtensions",void 0);var TBSCertList=function(){function e(e){if(e===void 0){e={}}this.signature=new AlgorithmIdentifier;this.issuer=new Name$1;this.thisUpdate=new Time;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],TBSCertList.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],TBSCertList.prototype,"signature",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertList.prototype,"issuer",void 0);__decorate$1([AsnProp({type:Time})],TBSCertList.prototype,"thisUpdate",void 0);__decorate$1([AsnProp({type:Time,optional:true})],TBSCertList.prototype,"nextUpdate",void 0);__decorate$1([AsnProp({type:RevokedCertificate,repeated:"sequence",optional:true})],TBSCertList.prototype,"revokedCertificates",void 0);__decorate$1([AsnProp({type:Extension$1,optional:true,context:0,repeated:"sequence"})],TBSCertList.prototype,"crlExtensions",void 0);var CertificateList=function(){function e(e){if(e===void 0){e={}}this.tbsCertList=new TBSCertList;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TBSCertList})],CertificateList.prototype,"tbsCertList",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificateList.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificateList.prototype,"signature",void 0);var id_ecPublicKey="1.2.840.10045.2.1";var id_ecdsaWithSHA1="1.2.840.10045.4.1";var id_ecdsaWithSHA224="1.2.840.10045.4.3.1";var id_ecdsaWithSHA256="1.2.840.10045.4.3.2";var id_ecdsaWithSHA384="1.2.840.10045.4.3.3";var id_ecdsaWithSHA512="1.2.840.10045.4.3.4";function create$1(e){return new AlgorithmIdentifier({algorithm:e})}create$1(id_ecdsaWithSHA1);create$1(id_ecdsaWithSHA224);create$1(id_ecdsaWithSHA256);create$1(id_ecdsaWithSHA384);create$1(id_ecdsaWithSHA512);var FieldID=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],FieldID.prototype,"fieldType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],FieldID.prototype,"parameters",void 0);FieldID=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],FieldID);var ECPoint=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var Curve=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],Curve.prototype,"a",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],Curve.prototype,"b",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],Curve.prototype,"seed",void 0);Curve=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Curve);var ECPVer;(function(e){e[e["ecpVer1"]=1]="ecpVer1"})(ECPVer||(ECPVer={}));var SpecifiedECDomain=function(){function e(e){if(e===void 0){e={}}this.version=ECPVer.ecpVer1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SpecifiedECDomain.prototype,"version",void 0);__decorate$1([AsnProp({type:FieldID})],SpecifiedECDomain.prototype,"fieldID",void 0);__decorate$1([AsnProp({type:Curve})],SpecifiedECDomain.prototype,"curve",void 0);__decorate$1([AsnProp({type:ECPoint})],SpecifiedECDomain.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],SpecifiedECDomain.prototype,"order",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],SpecifiedECDomain.prototype,"cofactor",void 0);SpecifiedECDomain=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SpecifiedECDomain);var ECParameters=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ECParameters.prototype,"namedCurve",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Null})],ECParameters.prototype,"implicitCurve",void 0);__decorate$1([AsnProp({type:SpecifiedECDomain})],ECParameters.prototype,"specifiedCurve",void 0);ECParameters=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ECParameters);var ECPrivateKey=function(){function e(e){if(e===void 0){e={}}this.version=1;this.privateKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ECPrivateKey.prototype,"version",void 0);__decorate$1([AsnProp({type:OctetString})],ECPrivateKey.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:ECParameters,context:0,optional:true})],ECPrivateKey.prototype,"parameters",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,optional:true})],ECPrivateKey.prototype,"publicKey",void 0);var ECDSASigValue=function(){function e(e){if(e===void 0){e={}}this.r=new ArrayBuffer(0);this.s=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],ECDSASigValue.prototype,"r",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],ECDSASigValue.prototype,"s",void 0);var id_pkcs_1="1.2.840.113549.1.1";var id_rsaEncryption="".concat(id_pkcs_1,".1");var id_RSAES_OAEP="".concat(id_pkcs_1,".7");var id_pSpecified="".concat(id_pkcs_1,".9");var id_RSASSA_PSS="".concat(id_pkcs_1,".10");var id_md2WithRSAEncryption="".concat(id_pkcs_1,".2");var id_md5WithRSAEncryption="".concat(id_pkcs_1,".4");var id_sha1WithRSAEncryption="".concat(id_pkcs_1,".5");var id_sha384WithRSAEncryption="".concat(id_pkcs_1,".12");var id_sha512WithRSAEncryption="".concat(id_pkcs_1,".13");var id_sha512_224WithRSAEncryption="".concat(id_pkcs_1,".15");var id_sha512_256WithRSAEncryption="".concat(id_pkcs_1,".16");var id_sha1="1.3.14.3.2.26";var id_sha224="2.16.840.1.101.3.4.2.4";var id_sha256="2.16.840.1.101.3.4.2.1";var id_sha384="2.16.840.1.101.3.4.2.2";var id_sha512="2.16.840.1.101.3.4.2.3";var id_sha512_224="2.16.840.1.101.3.4.2.5";var id_sha512_256="2.16.840.1.101.3.4.2.6";var id_md2="1.2.840.113549.2.2";var id_md5="1.2.840.113549.2.5";var id_mgf1="".concat(id_pkcs_1,".8");function create(e){return new AlgorithmIdentifier({algorithm:e,parameters:null})}create(id_md2);create(id_md5);var sha1=create(id_sha1);create(id_sha224);create(id_sha256);create(id_sha384);create(id_sha512);create(id_sha512_224);create(id_sha512_256);var mgf1SHA1=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});var pSpecifiedEmpty=new AlgorithmIdentifier({algorithm:id_pSpecified,parameters:AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});create(id_rsaEncryption);create(id_md2WithRSAEncryption);create(id_md5WithRSAEncryption);create(id_sha1WithRSAEncryption);create(id_sha512_224WithRSAEncryption);create(id_sha512_256WithRSAEncryption);create(id_sha384WithRSAEncryption);create(id_sha512WithRSAEncryption);create(id_sha512_224WithRSAEncryption);create(id_sha512_256WithRSAEncryption);var RsaEsOaepParams=function(){function e(e){if(e===void 0){e={}}this.hashAlgorithm=new AlgorithmIdentifier(sha1);this.maskGenAlgorithm=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});this.pSourceAlgorithm=new AlgorithmIdentifier(pSpecifiedEmpty);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier,context:0,defaultValue:sha1})],RsaEsOaepParams.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:1,defaultValue:mgf1SHA1})],RsaEsOaepParams.prototype,"maskGenAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:2,defaultValue:pSpecifiedEmpty})],RsaEsOaepParams.prototype,"pSourceAlgorithm",void 0);new AlgorithmIdentifier({algorithm:id_RSAES_OAEP,parameters:AsnConvert.serialize(new RsaEsOaepParams)});var RsaSaPssParams=function(){function e(e){if(e===void 0){e={}}this.hashAlgorithm=new AlgorithmIdentifier(sha1);this.maskGenAlgorithm=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});this.saltLength=20;this.trailerField=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier,context:0,defaultValue:sha1})],RsaSaPssParams.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:1,defaultValue:mgf1SHA1})],RsaSaPssParams.prototype,"maskGenAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,defaultValue:20})],RsaSaPssParams.prototype,"saltLength",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:3,defaultValue:1})],RsaSaPssParams.prototype,"trailerField",void 0);new AlgorithmIdentifier({algorithm:id_RSASSA_PSS,parameters:AsnConvert.serialize(new RsaSaPssParams)});var DigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestAlgorithm=new AlgorithmIdentifier;this.digest=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],DigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],DigestInfo.prototype,"digest",void 0);var OtherPrimeInfos_1;var OtherPrimeInfo=function(){function e(e){if(e===void 0){e={}}this.prime=new ArrayBuffer(0);this.exponent=new ArrayBuffer(0);this.coefficient=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"prime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"exponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"coefficient",void 0);var OtherPrimeInfos=OtherPrimeInfos_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,OtherPrimeInfos_1.prototype);return i}return t}(AsnArray);OtherPrimeInfos=OtherPrimeInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OtherPrimeInfo})],OtherPrimeInfos);var RSAPrivateKey=function(){function e(e){if(e===void 0){e={}}this.version=0;this.modulus=new ArrayBuffer(0);this.publicExponent=new ArrayBuffer(0);this.privateExponent=new ArrayBuffer(0);this.prime1=new ArrayBuffer(0);this.prime2=new ArrayBuffer(0);this.exponent1=new ArrayBuffer(0);this.exponent2=new ArrayBuffer(0);this.coefficient=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],RSAPrivateKey.prototype,"version",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"modulus",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"publicExponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"privateExponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"prime1",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"prime2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"exponent1",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"exponent2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"coefficient",void 0);__decorate$1([AsnProp({type:OtherPrimeInfos,optional:true})],RSAPrivateKey.prototype,"otherPrimeInfos",void 0);var RSAPublicKey=function(){function e(e){if(e===void 0){e={}}this.modulus=new ArrayBuffer(0);this.publicExponent=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPublicKey.prototype,"modulus",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPublicKey.prototype,"publicExponent",void 0);var CompositeParams_1,CompositeSignatureValue_1;var id_alg_composite="1.3.6.1.4.1.18227.2.1";var CompositeParams=CompositeParams_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CompositeParams_1.prototype);return i}return t}(AsnArray);CompositeParams=CompositeParams_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AlgorithmIdentifier})],CompositeParams);var CompositeSignatureValue=CompositeSignatureValue_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CompositeSignatureValue_1.prototype);return i}return t}(AsnArray);CompositeSignatureValue=CompositeSignatureValue_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.BitString})],CompositeSignatureValue);var EncryptedData=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var EncryptedPrivateKeyInfo$1=function(){function e(e){if(e===void 0){e={}}this.encryptionAlgorithm=new AlgorithmIdentifier;this.encryptedData=new EncryptedData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],EncryptedPrivateKeyInfo$1.prototype,"encryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedData})],EncryptedPrivateKeyInfo$1.prototype,"encryptedData",void 0);var Attributes_1$1;var Version$3;(function(e){e[e["v1"]=0]="v1"})(Version$3||(Version$3={}));var PrivateKey=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var Attributes$1=Attributes_1$1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Attributes_1$1.prototype);return i}return t}(AsnArray);Attributes$1=Attributes_1$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes$1);var PrivateKeyInfo$1=function(){function e(e){if(e===void 0){e={}}this.version=Version$3.v1;this.privateKeyAlgorithm=new AlgorithmIdentifier;this.privateKey=new PrivateKey;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PrivateKeyInfo$1.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],PrivateKeyInfo$1.prototype,"privateKeyAlgorithm",void 0);__decorate$1([AsnProp({type:PrivateKey})],PrivateKeyInfo$1.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:Attributes$1,implicit:true,context:0,optional:true})],PrivateKeyInfo$1.prototype,"attributes",void 0);var AsymmetricKeyPackage_1;var Version$2;(function(e){e[e["v1"]=0]="v1";e[e["v2"]=1]="v2"})(Version$2||(Version$2={}));var PrivateKeyAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);PrivateKeyAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyAlgorithmIdentifier);var OneAsymmetricKey=function(){function e(){this.version=Version$2.v1;this.privateKeyAlgorithm=new AlgorithmIdentifier;this.privateKey=new ArrayBuffer(0)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],OneAsymmetricKey.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],OneAsymmetricKey.prototype,"privateKeyAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],OneAsymmetricKey.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:Attributes$1,context:0,implicit:true,optional:true})],OneAsymmetricKey.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,implicit:true,optional:true})],OneAsymmetricKey.prototype,"publicKey",void 0);OneAsymmetricKey=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],OneAsymmetricKey);var PrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OneAsymmetricKey);PrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyInfo);var AsymmetricKeyPackage=AsymmetricKeyPackage_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,AsymmetricKeyPackage_1.prototype);return i}return t}(AsnArray);AsymmetricKeyPackage=AsymmetricKeyPackage_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OneAsymmetricKey})],AsymmetricKeyPackage);var CompositePublicKey_1,CompositePrivateKey_1;var id_composite_key="2.16.840.1.114027.80.4.1";var CompositeAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);CompositeAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CompositeAlgorithmIdentifier);var CompositePublicKey=CompositePublicKey_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CompositePublicKey_1.prototype);return i}return t}(AsnArray);CompositePublicKey=CompositePublicKey_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SubjectPublicKeyInfo})],CompositePublicKey);var CompositePrivateKey=CompositePrivateKey_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CompositePrivateKey_1.prototype);return i}return t}(AsnArray);CompositePrivateKey=CompositePrivateKey_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OneAsymmetricKey})],CompositePrivateKey);var dayjs_min$1={exports:{}};var dayjs_min=dayjs_min$1.exports;var hasRequiredDayjs_min;function requireDayjs_min(){if(hasRequiredDayjs_min)return dayjs_min$1.exports;hasRequiredDayjs_min=1;(function(e,t){!function(t,i){e.exports=i()}(dayjs_min,(function(){var e=1e3,t=6e4,i=36e5,r="millisecond",n="second",o="minute",a="hour",s="day",c="week",u="month",p="quarter",f="year",d="date",l="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,v={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(e){var t=["th","st","nd","rd"],i=e%100;return"["+e+(t[(i-20)%10]||t[i]||t[0])+"]"}},h=function(e,t,i){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(i)+e},_={s:h,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),r=Math.floor(i/60),n=i%60;return(t<=0?"+":"-")+h(r,2,"0")+":"+h(n,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var r=12*(i.year()-t.year())+(i.month()-t.month()),n=t.clone().add(r,u),o=i-n<0,a=t.clone().add(r+(o?-1:1),u);return+(-(r+(i-n)/(o?n-a:a-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:o,s:n,ms:r,Q:p}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},S="en",m={};m[S]=v;var C="$isDayjsObject",g=function(e){return e instanceof E||!(!e||!e[C])},P=function e(t,i,r){var n;if(!t)return S;if("string"==typeof t){var o=t.toLowerCase();m[o]&&(n=o),i&&(m[o]=i,n=o);var a=t.split("-");if(!n&&a.length>1)return e(a[0])}else{var s=t.name;m[s]=t,n=s}return!r&&n&&(S=n),n||!r&&S},T=function(e,t){if(g(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new E(i)},I=_;I.l=P,I.i=g,I.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=P(e.locale,null,true),this.parse(e),this.$x=this.$x||e.x||{},this[C]=true}var h=v.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(y);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return I},h.isValid=function(){return!(this.$d.toString()===l)},h.isSame=function(e,t){var i=T(e);return this.startOf(t)<=i&&i<=this.endOf(t)},h.isAfter=function(e,t){return T(e)<this.startOf(t)},h.isBefore=function(e,t){return this.endOf(t)<T(e)},h.$g=function(e,t,i){return I.u(e)?this[t]:this.set(i,e)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(e,t){var i=this,r=!!I.u(t)||t,p=I.p(e),l=function(e,t){var n=I.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return r?n:n.endOf(s)},y=function(e,t){return I.w(i.toDate()[e].apply(i.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},A=this.$W,v=this.$M,h=this.$D,_="set"+(this.$u?"UTC":"");switch(p){case f:return r?l(1,0):l(31,11);case u:return r?l(1,v):l(0,v+1);case c:var S=this.$locale().weekStart||0,m=(A<S?A+7:A)-S;return l(r?h-m:h+(6-m),v);case s:case d:return y(_+"Hours",0);case a:return y(_+"Minutes",1);case o:return y(_+"Seconds",2);case n:return y(_+"Milliseconds",3);default:return this.clone()}},h.endOf=function(e){return this.startOf(e,false)},h.$set=function(e,t){var i,c=I.p(e),p="set"+(this.$u?"UTC":""),l=(i={},i[s]=p+"Date",i[d]=p+"Date",i[u]=p+"Month",i[f]=p+"FullYear",i[a]=p+"Hours",i[o]=p+"Minutes",i[n]=p+"Seconds",i[r]=p+"Milliseconds",i)[c],y=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var A=this.clone().set(d,1);A.$d[l](y),A.init(),this.$d=A.set(d,Math.min(this.$D,A.daysInMonth())).$d}else l&&this.$d[l](y);return this.init(),this},h.set=function(e,t){return this.clone().$set(e,t)},h.get=function(e){return this[I.p(e)]()},h.add=function(r,p){var d,l=this;r=Number(r);var y=I.p(p),A=function(e){var t=T(l);return I.w(t.date(t.date()+Math.round(e*r)),l)};if(y===u)return this.set(u,this.$M+r);if(y===f)return this.set(f,this.$y+r);if(y===s)return A(1);if(y===c)return A(7);var v=(d={},d[o]=t,d[a]=i,d[n]=e,d)[y]||1,h=this.$d.getTime()+r*v;return I.w(h,this)},h.subtract=function(e,t){return this.add(-1*e,t)},h.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||l;var r=e||"YYYY-MM-DDTHH:mm:ssZ",n=I.z(this),o=this.$H,a=this.$m,s=this.$M,c=i.weekdays,u=i.months,p=i.meridiem,f=function(e,i,n,o){return e&&(e[i]||e(t,r))||n[i].slice(0,o)},d=function(e){return I.s(o%12||12,e,"0")},y=p||function(e,t,i){var r=e<12?"AM":"PM";return i?r.toLowerCase():r};return r.replace(A,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return I.s(t.$y,4,"0");case"M":return s+1;case"MM":return I.s(s+1,2,"0");case"MMM":return f(i.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return I.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(i.weekdaysMin,t.$W,c,2);case"ddd":return f(i.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(o);case"HH":return I.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return y(o,a,true);case"A":return y(o,a,false);case"m":return String(a);case"mm":return I.s(a,2,"0");case"s":return String(t.$s);case"ss":return I.s(t.$s,2,"0");case"SSS":return I.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(r,d,l){var y,A=this,v=I.p(d),h=T(r),_=(h.utcOffset()-this.utcOffset())*t,S=this-h,m=function(){return I.m(A,h)};switch(v){case f:y=m()/12;break;case u:y=m();break;case p:y=m()/3;break;case c:y=(S-_)/6048e5;break;case s:y=(S-_)/864e5;break;case a:y=S/i;break;case o:y=S/t;break;case n:y=S/e;break;default:y=S}return l?y:I.a(y)},h.daysInMonth=function(){return this.endOf(u).$D},h.$locale=function(){return m[this.$L]},h.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),r=P(e,t,true);return r&&(i.$L=r),i},h.clone=function(){return I.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},v}(),b=E.prototype;return T.prototype=b,[["$ms",r],["$s",n],["$m",o],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach((function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,E,T),e.$i=true),T},T.locale=P,T.isDayjs=g,T.unix=function(e){return T(1e3*e)},T.en=m[S],T.Ls=m,T.p={},T}))})(dayjs_min$1);return dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();var dayjs=getDefaultExportFromCjs(dayjs_minExports);var relativeTime$2={exports:{}};var relativeTime$1=relativeTime$2.exports;var hasRequiredRelativeTime;function requireRelativeTime(){if(hasRequiredRelativeTime)return relativeTime$2.exports;hasRequiredRelativeTime=1;(function(e,t){!function(t,i){e.exports=i()}(relativeTime$1,(function(){return function(e,t,i){e=e||{};var r=t.prototype,n={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 o(e,t,i,n){return r.fromToBase(e,t,i,n)}i.en.relativeTime=n,r.fromToBase=function(t,r,o,a,s){for(var c,u,p,f=o.$locale().relativeTime||n,d=e.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"}],l=d.length,y=0;y<l;y+=1){var A=d[y];A.d&&(c=a?i(t).diff(o,A.d,true):o.diff(t,A.d,true));var v=(e.rounding||Math.round)(Math.abs(c));if(p=c>0,v<=A.r||!A.r){v<=1&&y>0&&(A=d[y-1]);var h=f[A.l];s&&(v=s(""+v)),u="string"==typeof h?h.replace("%d",v):h(v,r,A.l,p);break}}if(r)return u;var _=p?f.future:f.past;return"function"==typeof _?_(u):_.replace("%s",u)},r.to=function(e,t){return o(e,t,this,true)},r.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?i.utc():i()};r.toNow=function(e){return this.to(a(this),e)},r.fromNow=function(e){return this.from(a(this),e)}}}))})(relativeTime$2);return relativeTime$2.exports}var relativeTimeExports=requireRelativeTime();var relativeTime=getDefaultExportFromCjs(relativeTimeExports);
78
+ */function assertBigInt(){if(typeof BigInt==="undefined"){throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}}function concat(e){var t=0;var r=0;for(var i=0;i<e.length;i++){var n=e[i];t+=n.byteLength}var o=new Uint8Array(t);for(var i=0;i<e.length;i++){var n=e[i];o.set(new Uint8Array(n),r);r+=n.byteLength}return o.buffer}function checkBufferParams(e,t,r,i){if(!(t instanceof Uint8Array)){e.error="Wrong parameter: inputBuffer must be 'Uint8Array'";return false}if(!t.byteLength){e.error="Wrong parameter: inputBuffer has zero length";return false}if(r<0){e.error="Wrong parameter: inputOffset less than zero";return false}if(i<0){e.error="Wrong parameter: inputLength less than zero";return false}if(t.byteLength-r-i<0){e.error="End of input reached before message was fully decoded (inconsistent offset and length values)";return false}return true}var ViewWriter=function(){function e(){this.items=[]}e.prototype.write=function(e){this.items.push(e)};e.prototype.final=function(){return concat(this.items)};return e}();var powers2=[new Uint8Array([1])];var digitsString="0123456789";var NAME="name";var VALUE_HEX_VIEW="valueHexView";var IS_HEX_ONLY="isHexOnly";var ID_BLOCK="idBlock";var TAG_CLASS="tagClass";var TAG_NUMBER="tagNumber";var IS_CONSTRUCTED="isConstructed";var FROM_BER="fromBER";var TO_BER="toBER";var LOCAL="local";var EMPTY_STRING="";var EMPTY_BUFFER=new ArrayBuffer(0);var EMPTY_VIEW=new Uint8Array(0);var END_OF_CONTENT_NAME="EndOfContent";var OCTET_STRING_NAME="OCTET STRING";var BIT_STRING_NAME="BIT STRING";function HexBlock(e){var t;return t=function(e){__extends(t,e);function t(){var t=[];for(var r=0;r<arguments.length;r++){t[r]=arguments[r]}var i;var n=e.apply(this,t)||this;var o=t[0]||{};n.isHexOnly=(i=o.isHexOnly)!==null&&i!==void 0?i:false;n.valueHexView=o.valueHex?buildExports.BufferSourceConverter.toUint8Array(o.valueHex):EMPTY_VIEW;return n}Object.defineProperty(t.prototype,"valueHex",{get:function(){return this.valueHexView.slice().buffer},set:function(e){this.valueHexView=new Uint8Array(e)},enumerable:false,configurable:true});t.prototype.fromBER=function(e,t,r){var i=e instanceof ArrayBuffer?new Uint8Array(e):e;if(!checkBufferParams(this,i,t,r)){return-1}var n=t+r;this.valueHexView=i.subarray(t,n);if(!this.valueHexView.length){this.warnings.push("Zero buffer length");return t}this.blockLength=r;return n};t.prototype.toBER=function(e){if(e===void 0){e=false}if(!this.isHexOnly){this.error="Flag 'isHexOnly' is not set, abort";return EMPTY_BUFFER}if(e){return new ArrayBuffer(this.valueHexView.byteLength)}return this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isHexOnly:this.isHexOnly,valueHex:buildExports.Convert.ToHex(this.valueHexView)})};return t}(e),t.NAME="hexBlock",t}var LocalBaseBlock=function(){function e(e){var t=e===void 0?{}:e,r=t.blockLength,i=r===void 0?0:r,n=t.error,o=n===void 0?EMPTY_STRING:n,a=t.warnings,s=a===void 0?[]:a,c=t.valueBeforeDecode,u=c===void 0?EMPTY_VIEW:c;this.blockLength=i;this.error=o;this.warnings=s;this.valueBeforeDecodeView=buildExports.BufferSourceConverter.toUint8Array(u)}e.blockName=function(){return this.NAME};Object.defineProperty(e.prototype,"valueBeforeDecode",{get:function(){return this.valueBeforeDecodeView.slice().buffer},set:function(e){this.valueBeforeDecodeView=new Uint8Array(e)},enumerable:false,configurable:true});e.prototype.toJSON=function(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:buildExports.Convert.ToHex(this.valueBeforeDecodeView)}};return e}();LocalBaseBlock.NAME="baseBlock";var ValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBER=function(e,t,r){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")};t.prototype.toBER=function(e,t){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")};return t}(LocalBaseBlock);ValueBlock.NAME="valueBlock";var LocalIdentificationBlock=function(e){__extends(t,e);function t(t){var r=t===void 0?{}:t,i=r.idBlock,n=i===void 0?{}:i;var o,a,s,c;var u=e.call(this)||this;if(n){u.isHexOnly=(o=n.isHexOnly)!==null&&o!==void 0?o:false;u.valueHexView=n.valueHex?buildExports.BufferSourceConverter.toUint8Array(n.valueHex):EMPTY_VIEW;u.tagClass=(a=n.tagClass)!==null&&a!==void 0?a:-1;u.tagNumber=(s=n.tagNumber)!==null&&s!==void 0?s:-1;u.isConstructed=(c=n.isConstructed)!==null&&c!==void 0?c:false}else{u.tagClass=-1;u.tagNumber=-1;u.isConstructed=false}return u}t.prototype.toBER=function(e){if(e===void 0){e=false}var t=0;switch(this.tagClass){case 1:t|=0;break;case 2:t|=64;break;case 3:t|=128;break;case 4:t|=192;break;default:this.error="Unknown tag class";return EMPTY_BUFFER}if(this.isConstructed)t|=32;if(this.tagNumber<31&&!this.isHexOnly){var r=new Uint8Array(1);if(!e){var i=this.tagNumber;i&=31;t|=i;r[0]=t}return r.buffer}if(!this.isHexOnly){var n=utilToBase(this.tagNumber,7);var o=new Uint8Array(n);var a=n.byteLength;var s=new Uint8Array(a+1);s[0]=t|31;if(!e){for(var c=0;c<a-1;c++)s[c+1]=o[c]|128;s[a]=o[a-1]}return s.buffer}var u=new Uint8Array(this.valueHexView.byteLength+1);u[0]=t|31;if(!e){var p=this.valueHexView;for(var c=0;c<p.length-1;c++)u[c+1]=p[c]|128;u[this.valueHexView.byteLength]=p[p.length-1]}return u.buffer};t.prototype.fromBER=function(e,t,r){var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r)){return-1}var n=i.subarray(t,t+r);if(n.length===0){this.error="Zero buffer length";return-1}var o=n[0]&192;switch(o){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:this.error="Unknown tag class";return-1}this.isConstructed=(n[0]&32)===32;this.isHexOnly=false;var a=n[0]&31;if(a!==31){this.tagNumber=a;this.blockLength=1}else{var s=1;var c=this.valueHexView=new Uint8Array(255);var u=255;while(n[s]&128){c[s-1]=n[s]&127;s++;if(s>=n.length){this.error="End of input reached before message was fully decoded";return-1}if(s===u){u+=255;var p=new Uint8Array(u);for(var f=0;f<c.length;f++)p[f]=c[f];c=this.valueHexView=new Uint8Array(u)}}this.blockLength=s+1;c[s-1]=n[s]&127;var d=new Uint8Array(s);for(var f=0;f<s;f++)d[f]=c[f];c=this.valueHexView=new Uint8Array(s);c.set(d);if(this.blockLength<=9)this.tagNumber=utilFromBase(c,7);else{this.isHexOnly=true;this.warnings.push("Tag too long, represented as hex-coded")}}if(this.tagClass===1&&this.isConstructed){switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:this.error="Constructed encoding used for primitive type";return-1}}return t+this.blockLength};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed})};return t}(HexBlock(LocalBaseBlock));LocalIdentificationBlock.NAME="identificationBlock";var LocalLengthBlock=function(e){__extends(t,e);function t(t){var r=t===void 0?{}:t,i=r.lenBlock,n=i===void 0?{}:i;var o,a,s;var c=e.call(this)||this;c.isIndefiniteForm=(o=n.isIndefiniteForm)!==null&&o!==void 0?o:false;c.longFormUsed=(a=n.longFormUsed)!==null&&a!==void 0?a:false;c.length=(s=n.length)!==null&&s!==void 0?s:0;return c}t.prototype.fromBER=function(e,t,r){var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r)){return-1}var n=i.subarray(t,t+r);if(n.length===0){this.error="Zero buffer length";return-1}if(n[0]===255){this.error="Length block 0xFF is reserved by standard";return-1}this.isIndefiniteForm=n[0]===128;if(this.isIndefiniteForm){this.blockLength=1;return t+this.blockLength}this.longFormUsed=!!(n[0]&128);if(this.longFormUsed===false){this.length=n[0];this.blockLength=1;return t+this.blockLength}var o=n[0]&127;if(o>8){this.error="Too big integer";return-1}if(o+1>n.length){this.error="End of input reached before message was fully decoded";return-1}var a=t+1;var s=i.subarray(a,a+o);if(s[o-1]===0)this.warnings.push("Needlessly long encoded length");this.length=utilFromBase(s,8);if(this.longFormUsed&&this.length<=127)this.warnings.push("Unnecessary usage of long length form");this.blockLength=o+1;return t+this.blockLength};t.prototype.toBER=function(e){if(e===void 0){e=false}var t;var r;if(this.length>127)this.longFormUsed=true;if(this.isIndefiniteForm){t=new ArrayBuffer(1);if(e===false){r=new Uint8Array(t);r[0]=128}return t}if(this.longFormUsed){var i=utilToBase(this.length,8);if(i.byteLength>127){this.error="Too big length";return EMPTY_BUFFER}t=new ArrayBuffer(i.byteLength+1);if(e)return t;var n=new Uint8Array(i);r=new Uint8Array(t);r[0]=i.byteLength|128;for(var o=0;o<i.byteLength;o++)r[o+1]=n[o];return t}t=new ArrayBuffer(1);if(e===false){r=new Uint8Array(t);r[0]=this.length}return t};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length})};return t}(LocalBaseBlock);LocalLengthBlock.NAME="lengthBlock";var typeStore={};var BaseBlock=function(e){__extends(t,e);function t(t,r){if(t===void 0){t={}}var i=this;var n=t.name,o=n===void 0?EMPTY_STRING:n,a=t.optional,s=a===void 0?false:a,c=t.primitiveSchema,u=__rest(t,["name","optional","primitiveSchema"]);i=e.call(this,u)||this;i.name=o;i.optional=s;if(c){i.primitiveSchema=c}i.idBlock=new LocalIdentificationBlock(u);i.lenBlock=new LocalLengthBlock(u);i.valueBlock=r?new r(u):new ValueBlock(u);return i}t.prototype.fromBER=function(e,t,r){var i=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);if(i===-1){this.error=this.valueBlock.error;return i}if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return i};t.prototype.toBER=function(e,t){var r=t||new ViewWriter;if(!t){prepareIndefiniteForm(this)}var i=this.idBlock.toBER(e);r.write(i);if(this.lenBlock.isIndefiniteForm){r.write(new Uint8Array([128]).buffer);this.valueBlock.toBER(e,r);r.write(new ArrayBuffer(2))}else{var n=this.valueBlock.toBER(e);this.lenBlock.length=n.byteLength;var o=this.lenBlock.toBER(e);r.write(o);r.write(n)}if(!t){return r.final()}return EMPTY_BUFFER};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional});if(this.primitiveSchema)t.primitiveSchema=this.primitiveSchema.toJSON();return t};t.prototype.toString=function(e){if(e===void 0){e="ascii"}if(e==="ascii"){return this.onAsciiEncoding()}return buildExports.Convert.ToHex(this.toBER())};t.prototype.onAsciiEncoding=function(){var e=this.constructor.NAME;var t=buildExports.Convert.ToHex(this.valueBlock.valueBeforeDecodeView);return"".concat(e," : ").concat(t)};t.prototype.isEqual=function(e){if(this===e){return true}if(!(e instanceof this.constructor)){return false}var t=this.toBER();var r=e.toBER();return isEqualBuffer(t,r)};return t}(LocalBaseBlock);BaseBlock.NAME="BaseBlock";function prepareIndefiniteForm(e){var t;if(e instanceof typeStore.Constructed){for(var r=0,i=e.valueBlock.value;r<i.length;r++){var n=i[r];if(prepareIndefiniteForm(n)){e.lenBlock.isIndefiniteForm=true}}}return!!((t=e.lenBlock)===null||t===void 0?void 0:t.isIndefiniteForm)}var BaseStringBlock=function(e){__extends(t,e);function t(t,r){if(t===void 0){t={}}var i=this;var n=t.value,o=n===void 0?EMPTY_STRING:n,a=__rest(t,["value"]);i=e.call(this,a,r)||this;if(o){i.fromString(o)}return i}t.prototype.getValue=function(){return this.valueBlock.value};t.prototype.setValue=function(e){this.valueBlock.value=e};t.prototype.fromBER=function(e,t,r){var i=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);if(i===-1){this.error=this.valueBlock.error;return i}this.fromBuffer(this.valueBlock.valueHexView);if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return i};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : '").concat(this.valueBlock.value,"'")};return t}(BaseBlock);BaseStringBlock.NAME="BaseStringBlock";var LocalPrimitiveValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.isHexOnly,n=i===void 0?true:i,o=__rest(t,["isHexOnly"]);r=e.call(this,o)||this;r.isHexOnly=n;return r}return t}(HexBlock(ValueBlock));LocalPrimitiveValueBlock.NAME="PrimitiveValueBlock";var _a$w;var Primitive=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalPrimitiveValueBlock)||this;r.idBlock.isConstructed=false;return r}return t}(BaseBlock);_a$w=Primitive;(function(){typeStore.Primitive=_a$w})();Primitive.NAME="PRIMITIVE";function localChangeType(e,t){if(e instanceof t){return e}var r=new t;r.idBlock=e.idBlock;r.lenBlock=e.lenBlock;r.warnings=e.warnings;r.valueBeforeDecodeView=e.valueBeforeDecodeView;return r}function localFromBER(e,t,r){if(t===void 0){t=0}if(r===void 0){r=e.length}var i=t;var n=new BaseBlock({},ValueBlock);var o=new LocalBaseBlock;if(!checkBufferParams(o,e,t,r)){n.error=o.error;return{offset:-1,result:n}}var a=e.subarray(t,t+r);if(!a.length){n.error="Zero buffer length";return{offset:-1,result:n}}var s=n.idBlock.fromBER(e,t,r);if(n.idBlock.warnings.length){n.warnings.concat(n.idBlock.warnings)}if(s===-1){n.error=n.idBlock.error;return{offset:-1,result:n}}t=s;r-=n.idBlock.blockLength;s=n.lenBlock.fromBER(e,t,r);if(n.lenBlock.warnings.length){n.warnings.concat(n.lenBlock.warnings)}if(s===-1){n.error=n.lenBlock.error;return{offset:-1,result:n}}t=s;r-=n.lenBlock.blockLength;if(!n.idBlock.isConstructed&&n.lenBlock.isIndefiniteForm){n.error="Indefinite length form used for primitive encoding form";return{offset:-1,result:n}}var c=BaseBlock;switch(n.idBlock.tagClass){case 1:if(n.idBlock.tagNumber>=37&&n.idBlock.isHexOnly===false){n.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard";return{offset:-1,result:n}}switch(n.idBlock.tagNumber){case 0:if(n.idBlock.isConstructed&&n.lenBlock.length>0){n.error="Type [UNIVERSAL 0] is reserved";return{offset:-1,result:n}}c=typeStore.EndOfContent;break;case 1:c=typeStore.Boolean;break;case 2:c=typeStore.Integer;break;case 3:c=typeStore.BitString;break;case 4:c=typeStore.OctetString;break;case 5:c=typeStore.Null;break;case 6:c=typeStore.ObjectIdentifier;break;case 10:c=typeStore.Enumerated;break;case 12:c=typeStore.Utf8String;break;case 13:c=typeStore.RelativeObjectIdentifier;break;case 14:c=typeStore.TIME;break;case 15:n.error="[UNIVERSAL 15] is reserved by ASN.1 standard";return{offset:-1,result:n};case 16:c=typeStore.Sequence;break;case 17:c=typeStore.Set;break;case 18:c=typeStore.NumericString;break;case 19:c=typeStore.PrintableString;break;case 20:c=typeStore.TeletexString;break;case 21:c=typeStore.VideotexString;break;case 22:c=typeStore.IA5String;break;case 23:c=typeStore.UTCTime;break;case 24:c=typeStore.GeneralizedTime;break;case 25:c=typeStore.GraphicString;break;case 26:c=typeStore.VisibleString;break;case 27:c=typeStore.GeneralString;break;case 28:c=typeStore.UniversalString;break;case 29:c=typeStore.CharacterString;break;case 30:c=typeStore.BmpString;break;case 31:c=typeStore.DATE;break;case 32:c=typeStore.TimeOfDay;break;case 33:c=typeStore.DateTime;break;case 34:c=typeStore.Duration;break;default:{var u=n.idBlock.isConstructed?new typeStore.Constructed:new typeStore.Primitive;u.idBlock=n.idBlock;u.lenBlock=n.lenBlock;u.warnings=n.warnings;n=u}}break;case 2:case 3:case 4:default:{c=n.idBlock.isConstructed?typeStore.Constructed:typeStore.Primitive}}n=localChangeType(n,c);s=n.fromBER(e,t,n.lenBlock.isIndefiniteForm?r:n.lenBlock.length);n.valueBeforeDecodeView=e.subarray(i,i+n.blockLength);return{offset:s,result:n}}function fromBER(e){if(!e.byteLength){var t=new BaseBlock({},ValueBlock);t.error="Input buffer has zero length";return{offset:-1,result:t}}return localFromBER(buildExports.BufferSourceConverter.toUint8Array(e).slice(),0,e.byteLength)}function checkLen(e,t){if(e){return 1}return t}var LocalConstructedValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=i===void 0?[]:i,o=t.isIndefiniteForm,a=o===void 0?false:o,s=__rest(t,["value","isIndefiniteForm"]);r=e.call(this,s)||this;r.value=n;r.isIndefiniteForm=a;return r}t.prototype.fromBER=function(e,t,r){var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r)){return-1}this.valueBeforeDecodeView=i.subarray(t,t+r);if(this.valueBeforeDecodeView.length===0){this.warnings.push("Zero buffer length");return t}var n=t;while(checkLen(this.isIndefiniteForm,r)>0){var o=localFromBER(i,n,r);if(o.offset===-1){this.error=o.result.error;this.warnings.concat(o.result.warnings);return-1}n=o.offset;this.blockLength+=o.result.blockLength;r-=o.result.blockLength;this.value.push(o.result);if(this.isIndefiniteForm&&o.result.constructor.NAME===END_OF_CONTENT_NAME){break}}if(this.isIndefiniteForm){if(this.value[this.value.length-1].constructor.NAME===END_OF_CONTENT_NAME){this.value.pop()}else{this.warnings.push("No EndOfContent block encoded")}}return n};t.prototype.toBER=function(e,t){var r=t||new ViewWriter;for(var i=0;i<this.value.length;i++){this.value[i].toBER(e,r)}if(!t){return r.final()}return EMPTY_BUFFER};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{isIndefiniteForm:this.isIndefiniteForm,value:[]});for(var r=0,i=this.value;r<i.length;r++){var n=i[r];t.value.push(n.toJSON())}return t};return t}(ValueBlock);LocalConstructedValueBlock.NAME="ConstructedValueBlock";var _a$v;var Constructed=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalConstructedValueBlock)||this;r.idBlock.isConstructed=true;return r}t.prototype.fromBER=function(e,t,r){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;var i=this.valueBlock.fromBER(e,t,this.lenBlock.isIndefiniteForm?r:this.lenBlock.length);if(i===-1){this.error=this.valueBlock.error;return i}if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;if(!this.valueBlock.error.length)this.blockLength+=this.valueBlock.blockLength;return i};t.prototype.onAsciiEncoding=function(){var e=[];for(var t=0,r=this.valueBlock.value;t<r.length;t++){var i=r[t];e.push(i.toString("ascii").split("\n").map((function(e){return" ".concat(e)})).join("\n"))}var n=this.idBlock.tagClass===3?"[".concat(this.idBlock.tagNumber,"]"):this.constructor.NAME;return e.length?"".concat(n," :\n").concat(e.join("\n")):"".concat(n," :")};return t}(BaseBlock);_a$v=Constructed;(function(){typeStore.Constructed=_a$v})();Constructed.NAME="CONSTRUCTED";var LocalEndOfContentValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBER=function(e,t,r){return t};t.prototype.toBER=function(e){return EMPTY_BUFFER};return t}(ValueBlock);LocalEndOfContentValueBlock.override="EndOfContentValueBlock";var _a$u;var EndOfContent=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalEndOfContentValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=0;return r}return t}(BaseBlock);_a$u=EndOfContent;(function(){typeStore.EndOfContent=_a$u})();EndOfContent.NAME=END_OF_CONTENT_NAME;var _a$t;var Null=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,ValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=5;return r}t.prototype.fromBER=function(e,t,r){if(this.lenBlock.length>0)this.warnings.push("Non-zero length of value block for Null type");if(!this.idBlock.error.length)this.blockLength+=this.idBlock.blockLength;if(!this.lenBlock.error.length)this.blockLength+=this.lenBlock.blockLength;this.blockLength+=r;if(t+r>e.byteLength){this.error="End of input reached before message was fully decoded (inconsistent offset and length values)";return-1}return t+r};t.prototype.toBER=function(e,t){var r=new ArrayBuffer(2);if(!e){var i=new Uint8Array(r);i[0]=5;i[1]=0}if(t){t.write(r)}return r};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME)};return t}(BaseBlock);_a$t=Null;(function(){typeStore.Null=_a$t})();Null.NAME="NULL";var LocalBooleanValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=__rest(t,["value"]);r=e.call(this,n)||this;if(n.valueHex){r.valueHexView=buildExports.BufferSourceConverter.toUint8Array(n.valueHex)}else{r.valueHexView=new Uint8Array(1)}if(i){r.value=i}return r}Object.defineProperty(t.prototype,"value",{get:function(){for(var e=0,t=this.valueHexView;e<t.length;e++){var r=t[e];if(r>0){return true}}return false},set:function(e){this.valueHexView[0]=e?255:0},enumerable:false,configurable:true});t.prototype.fromBER=function(e,t,r){var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r)){return-1}this.valueHexView=i.subarray(t,t+r);if(r>1)this.warnings.push("Boolean value encoded in more then 1 octet");this.isHexOnly=true;utilDecodeTC.call(this);this.blockLength=r;return t+r};t.prototype.toBER=function(){return this.valueHexView.slice()};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.value})};return t}(HexBlock(ValueBlock));LocalBooleanValueBlock.NAME="BooleanValueBlock";var _a$s;var Boolean=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalBooleanValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=1;return r}t.prototype.getValue=function(){return this.valueBlock.value};t.prototype.setValue=function(e){this.valueBlock.value=e};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.getValue)};return t}(BaseBlock);_a$s=Boolean;(function(){typeStore.Boolean=_a$s})();Boolean.NAME="BOOLEAN";var LocalOctetStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.isConstructed,n=i===void 0?false:i,o=__rest(t,["isConstructed"]);r=e.call(this,o)||this;r.isConstructed=n;return r}t.prototype.fromBER=function(t,r,i){var n=0;if(this.isConstructed){this.isHexOnly=false;n=LocalConstructedValueBlock.prototype.fromBER.call(this,t,r,i);if(n===-1)return n;for(var o=0;o<this.value.length;o++){var a=this.value[o].constructor.NAME;if(a===END_OF_CONTENT_NAME){if(this.isIndefiniteForm)break;else{this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only";return-1}}if(a!==OCTET_STRING_NAME){this.error="OCTET STRING may consists of OCTET STRINGs only";return-1}}}else{this.isHexOnly=true;n=e.prototype.fromBER.call(this,t,r,i);this.blockLength=i}return n};t.prototype.toBER=function(e,t){if(this.isConstructed)return LocalConstructedValueBlock.prototype.toBER.call(this,e,t);return e?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{isConstructed:this.isConstructed})};return t}(HexBlock(LocalConstructedValueBlock));LocalOctetStringValueBlock.NAME="OctetStringValueBlock";var _a$r;var OctetString$1=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.idBlock,n=i===void 0?{}:i,o=t.lenBlock,a=o===void 0?{}:o,s=__rest(t,["idBlock","lenBlock"]);var c,u;(c=s.isConstructed)!==null&&c!==void 0?c:s.isConstructed=!!((u=s.value)===null||u===void 0?void 0:u.length);r=e.call(this,__assign({idBlock:__assign({isConstructed:s.isConstructed},n),lenBlock:__assign(__assign({},a),{isIndefiniteForm:!!s.isIndefiniteForm})},s),LocalOctetStringValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=4;return r}t.prototype.fromBER=function(t,r,i){this.valueBlock.isConstructed=this.idBlock.isConstructed;this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;if(i===0){if(this.idBlock.error.length===0)this.blockLength+=this.idBlock.blockLength;if(this.lenBlock.error.length===0)this.blockLength+=this.lenBlock.blockLength;return r}if(!this.valueBlock.isConstructed){var n=t instanceof ArrayBuffer?new Uint8Array(t):t;var o=n.subarray(r,r+i);try{if(o.byteLength){var a=localFromBER(o,0,o.byteLength);if(a.offset!==-1&&a.offset===i){this.valueBlock.value=[a.result]}}}catch(e){}}return e.prototype.fromBER.call(this,t,r,i)};t.prototype.onAsciiEncoding=function(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length){return Constructed.prototype.onAsciiEncoding.call(this)}var e=this.constructor.NAME;var t=buildExports.Convert.ToHex(this.valueBlock.valueHexView);return"".concat(e," : ").concat(t)};t.prototype.getValue=function(){if(!this.idBlock.isConstructed){return this.valueBlock.valueHexView.slice().buffer}var e=[];for(var t=0,r=this.valueBlock.value;t<r.length;t++){var i=r[t];if(i instanceof _a$r){e.push(i.valueBlock.valueHexView)}}return buildExports.BufferSourceConverter.concat(e)};return t}(BaseBlock);_a$r=OctetString$1;(function(){typeStore.OctetString=_a$r})();OctetString$1.NAME=OCTET_STRING_NAME;var LocalBitStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.unusedBits,n=i===void 0?0:i,o=t.isConstructed,a=o===void 0?false:o,s=__rest(t,["unusedBits","isConstructed"]);r=e.call(this,s)||this;r.unusedBits=n;r.isConstructed=a;r.blockLength=r.valueHexView.byteLength;return r}t.prototype.fromBER=function(e,t,r){if(!r){return t}var i=-1;if(this.isConstructed){i=LocalConstructedValueBlock.prototype.fromBER.call(this,e,t,r);if(i===-1)return i;for(var n=0,o=this.value;n<o.length;n++){var a=o[n];var s=a.constructor.NAME;if(s===END_OF_CONTENT_NAME){if(this.isIndefiniteForm)break;else{this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only";return-1}}if(s!==BIT_STRING_NAME){this.error="BIT STRING may consists of BIT STRINGs only";return-1}var c=a.valueBlock;if(this.unusedBits>0&&c.unusedBits>0){this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only';return-1}this.unusedBits=c.unusedBits}return i}var u=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,u,t,r)){return-1}var p=u.subarray(t,t+r);this.unusedBits=p[0];if(this.unusedBits>7){this.error="Unused bits for BitString must be in range 0-7";return-1}if(!this.unusedBits){var f=p.subarray(1);try{if(f.byteLength){var d=localFromBER(f,0,f.byteLength);if(d.offset!==-1&&d.offset===r-1){this.value=[d.result]}}}catch(e){}}this.valueHexView=p.subarray(1);this.blockLength=p.length;return t+r};t.prototype.toBER=function(e,t){if(this.isConstructed){return LocalConstructedValueBlock.prototype.toBER.call(this,e,t)}if(e){return new ArrayBuffer(this.valueHexView.byteLength+1)}if(!this.valueHexView.byteLength){return EMPTY_BUFFER}var r=new Uint8Array(this.valueHexView.length+1);r[0]=this.unusedBits;r.set(this.valueHexView,1);return r.buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{unusedBits:this.unusedBits,isConstructed:this.isConstructed})};return t}(HexBlock(LocalConstructedValueBlock));LocalBitStringValueBlock.NAME="BitStringValueBlock";var _a$q;var BitString$1=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.idBlock,n=i===void 0?{}:i,o=t.lenBlock,a=o===void 0?{}:o,s=__rest(t,["idBlock","lenBlock"]);var c,u;(c=s.isConstructed)!==null&&c!==void 0?c:s.isConstructed=!!((u=s.value)===null||u===void 0?void 0:u.length);r=e.call(this,__assign({idBlock:__assign({isConstructed:s.isConstructed},n),lenBlock:__assign(__assign({},a),{isIndefiniteForm:!!s.isIndefiniteForm})},s),LocalBitStringValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=3;return r}t.prototype.fromBER=function(t,r,i){this.valueBlock.isConstructed=this.idBlock.isConstructed;this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;return e.prototype.fromBER.call(this,t,r,i)};t.prototype.onAsciiEncoding=function(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length){return Constructed.prototype.onAsciiEncoding.call(this)}else{var e=[];var t=this.valueBlock.valueHexView;for(var r=0,i=t;r<i.length;r++){var n=i[r];e.push(n.toString(2).padStart(8,"0"))}var o=e.join("");var a=this.constructor.NAME;var s=o.substring(0,o.length-this.valueBlock.unusedBits);return"".concat(a," : ").concat(s)}};return t}(BaseBlock);_a$q=BitString$1;(function(){typeStore.BitString=_a$q})();BitString$1.NAME=BIT_STRING_NAME;var _a$p;function viewAdd(e,t){var r=new Uint8Array([0]);var i=new Uint8Array(e);var n=new Uint8Array(t);var o=i.slice(0);var a=o.length-1;var s=n.slice(0);var c=s.length-1;var u=0;var p=c<a?a:c;var f=0;for(var d=p;d>=0;d--,f++){switch(true){case f<s.length:u=o[a-f]+s[c-f]+r[0];break;default:u=o[a-f]+r[0]}r[0]=u/10;switch(true){case f>=o.length:o=utilConcatView(new Uint8Array([u%10]),o);break;default:o[a-f]=u%10}}if(r[0]>0)o=utilConcatView(r,o);return o}function power2(e){if(e>=powers2.length){for(var t=powers2.length;t<=e;t++){var r=new Uint8Array([0]);var i=powers2[t-1].slice(0);for(var n=i.length-1;n>=0;n--){var o=new Uint8Array([(i[n]<<1)+r[0]]);r[0]=o[0]/10;i[n]=o[0]%10}if(r[0]>0)i=utilConcatView(r,i);powers2.push(i)}}return powers2[e]}function viewSub(e,t){var r=0;var i=new Uint8Array(e);var n=new Uint8Array(t);var o=i.slice(0);var a=o.length-1;var s=n.slice(0);var c=s.length-1;var u;var p=0;for(var f=c;f>=0;f--,p++){u=o[a-p]-s[c-p]-r;switch(true){case u<0:r=1;o[a-p]=u+10;break;default:r=0;o[a-p]=u}}if(r>0){for(var f=a-c+1;f>=0;f--,p++){u=o[a-p]-r;if(u<0){r=1;o[a-p]=u+10}else{r=0;o[a-p]=u;break}}}return o.slice()}var LocalIntegerValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=__rest(t,["value"]);r=e.call(this,n)||this;r._valueDec=0;if(n.valueHex){r.setValueHex()}if(i!==undefined){r.valueDec=i}return r}t.prototype.setValueHex=function(){if(this.valueHexView.length>=4){this.warnings.push("Too big Integer for decoding, hex only");this.isHexOnly=true;this._valueDec=0}else{this.isHexOnly=false;if(this.valueHexView.length>0){this._valueDec=utilDecodeTC.call(this)}}};Object.defineProperty(t.prototype,"valueDec",{get:function(){return this._valueDec},set:function(e){this._valueDec=e;this.isHexOnly=false;this.valueHexView=new Uint8Array(utilEncodeTC(e))},enumerable:false,configurable:true});t.prototype.fromDER=function(e,t,r,i){if(i===void 0){i=0}var n=this.fromBER(e,t,r);if(n===-1)return n;var o=this.valueHexView;if(o[0]===0&&(o[1]&128)!==0){this.valueHexView=o.subarray(1)}else{if(i!==0){if(o.length<i){if(i-o.length>1)i=o.length+1;this.valueHexView=o.subarray(i-o.length)}}}return n};t.prototype.toDER=function(e){if(e===void 0){e=false}var t=this.valueHexView;switch(true){case(t[0]&128)!==0:{var r=new Uint8Array(this.valueHexView.length+1);r[0]=0;r.set(t,1);this.valueHexView=r}break;case t[0]===0&&(t[1]&128)===0:{this.valueHexView=this.valueHexView.subarray(1)}break}return this.toBER(e)};t.prototype.fromBER=function(t,r,i){var n=e.prototype.fromBER.call(this,t,r,i);if(n===-1){return n}this.setValueHex();return n};t.prototype.toBER=function(e){return e?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec})};t.prototype.toString=function(){var e=this.valueHexView.length*8-1;var t=new Uint8Array(this.valueHexView.length*8/3);var r=0;var i;var n=this.valueHexView;var o="";var a=false;for(var s=n.byteLength-1;s>=0;s--){i=n[s];for(var c=0;c<8;c++){if((i&1)===1){switch(r){case e:t=viewSub(power2(r),t);o="-";break;default:t=viewAdd(t,power2(r))}}r++;i>>=1}}for(var c=0;c<t.length;c++){if(t[c])a=true;if(a)o+=digitsString.charAt(t[c])}if(a===false)o+=digitsString.charAt(0);return o};return t}(HexBlock(ValueBlock));_a$p=LocalIntegerValueBlock;LocalIntegerValueBlock.NAME="IntegerValueBlock";(function(){Object.defineProperty(_a$p.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e);this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}})})();var _a$o;var Integer=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalIntegerValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=2;return r}t.prototype.toBigInt=function(){assertBigInt();return BigInt(this.valueBlock.toString())};t.fromBigInt=function(e){assertBigInt();var t=BigInt(e);var r=new ViewWriter;var i=t.toString(16).replace(/^-/,"");var n=new Uint8Array(buildExports.Convert.FromHex(i));if(t<0){var o=new Uint8Array(n.length+(n[0]&128?1:0));o[0]|=128;var a=BigInt("0x".concat(buildExports.Convert.ToHex(o)));var s=a+t;var c=buildExports.BufferSourceConverter.toUint8Array(buildExports.Convert.FromHex(s.toString(16)));c[0]|=128;r.write(c)}else{if(n[0]&128){r.write(new Uint8Array([0]))}r.write(n)}var u=new _a$o({valueHex:r.final()});return u};t.prototype.convertToDER=function(){var e=new _a$o({valueHex:this.valueBlock.valueHexView});e.valueBlock.toDER();return e};t.prototype.convertFromDER=function(){return new _a$o({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString())};return t}(BaseBlock);_a$o=Integer;(function(){typeStore.Integer=_a$o})();Integer.NAME="INTEGER";var _a$n;var Enumerated=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=10;return r}return t}(Integer);_a$n=Enumerated;(function(){typeStore.Enumerated=_a$n})();Enumerated.NAME="ENUMERATED";var LocalSidValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.valueDec,n=i===void 0?-1:i,o=t.isFirstSid,a=o===void 0?false:o,s=__rest(t,["valueDec","isFirstSid"]);r=e.call(this,s)||this;r.valueDec=n;r.isFirstSid=a;return r}t.prototype.fromBER=function(e,t,r){if(!r){return t}var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r)){return-1}var n=i.subarray(t,t+r);this.valueHexView=new Uint8Array(r);for(var o=0;o<r;o++){this.valueHexView[o]=n[o]&127;this.blockLength++;if((n[o]&128)===0)break}var a=new Uint8Array(this.blockLength);for(var o=0;o<this.blockLength;o++){a[o]=this.valueHexView[o]}this.valueHexView=a;if((n[this.blockLength-1]&128)!==0){this.error="End of input reached before message was fully decoded";return-1}if(this.valueHexView[0]===0)this.warnings.push("Needlessly long format of SID encoding");if(this.blockLength<=8)this.valueDec=utilFromBase(this.valueHexView,7);else{this.isHexOnly=true;this.warnings.push("Too big SID for decoding, hex only")}return t+this.blockLength};Object.defineProperty(t.prototype,"valueBigInt",{set:function(e){assertBigInt();var t=BigInt(e).toString(2);while(t.length%7){t="0"+t}var r=new Uint8Array(t.length/7);for(var i=0;i<r.length;i++){r[i]=parseInt(t.slice(i*7,i*7+7),2)+(i+1<r.length?128:0)}this.fromBER(r.buffer,0,r.length)},enumerable:false,configurable:true});t.prototype.toBER=function(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);var t=this.valueHexView;var r=new Uint8Array(this.blockLength);for(var i=0;i<this.blockLength-1;i++)r[i]=t[i]|128;r[this.blockLength-1]=t[this.blockLength-1];return r.buffer}var n=utilToBase(this.valueDec,7);if(n.byteLength===0){this.error="Error during encoding SID value";return EMPTY_BUFFER}var o=new Uint8Array(n.byteLength);if(!e){var a=new Uint8Array(n);var s=n.byteLength-1;for(var i=0;i<s;i++)o[i]=a[i]|128;o[s]=a[s]}return o};t.prototype.toString=function(){var e="";if(this.isHexOnly)e=buildExports.Convert.ToHex(this.valueHexView);else{if(this.isFirstSid){var t=this.valueDec;if(this.valueDec<=39)e="0.";else{if(this.valueDec<=79){e="1.";t-=40}else{e="2.";t-=80}}e+=t.toString()}else e=this.valueDec.toString()}return e};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec,isFirstSid:this.isFirstSid})};return t}(HexBlock(ValueBlock));LocalSidValueBlock.NAME="sidBlock";var LocalObjectIdentifierValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=i===void 0?EMPTY_STRING:i,o=__rest(t,["value"]);r=e.call(this,o)||this;r.value=[];if(n){r.fromString(n)}return r}t.prototype.fromBER=function(e,t,r){var i=t;while(r>0){var n=new LocalSidValueBlock;i=n.fromBER(e,i,r);if(i===-1){this.blockLength=0;this.error=n.error;return i}if(this.value.length===0)n.isFirstSid=true;this.blockLength+=n.blockLength;r-=n.blockLength;this.value.push(n)}return i};t.prototype.toBER=function(e){var t=[];for(var r=0;r<this.value.length;r++){var i=this.value[r].toBER(e);if(i.byteLength===0){this.error=this.value[r].error;return EMPTY_BUFFER}t.push(i)}return concat(t)};t.prototype.fromString=function(e){this.value=[];var t=0;var r=0;var i="";var n=false;do{r=e.indexOf(".",t);if(r===-1)i=e.substring(t);else i=e.substring(t,r);t=r+1;if(n){var o=this.value[0];var a=0;switch(o.valueDec){case 0:break;case 1:a=40;break;case 2:a=80;break;default:this.value=[];return}var s=parseInt(i,10);if(isNaN(s))return;o.valueDec=s+a;n=false}else{var o=new LocalSidValueBlock;if(i>Number.MAX_SAFE_INTEGER){assertBigInt();var c=BigInt(i);o.valueBigInt=c}else{o.valueDec=parseInt(i,10);if(isNaN(o.valueDec))return}if(!this.value.length){o.isFirstSid=true;n=true}this.value.push(o)}}while(r!==-1)};t.prototype.toString=function(){var e="";var t=false;for(var r=0;r<this.value.length;r++){t=this.value[r].isHexOnly;var i=this.value[r].toString();if(r!==0)e="".concat(e,".");if(t){i="{".concat(i,"}");if(this.value[r].isFirstSid)e="2.{".concat(i," - 80}");else e+=i}else e+=i}return e};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{value:this.toString(),sidArray:[]});for(var r=0;r<this.value.length;r++){t.sidArray.push(this.value[r].toJSON())}return t};return t}(ValueBlock);LocalObjectIdentifierValueBlock.NAME="ObjectIdentifierValueBlock";var _a$m;var ObjectIdentifier=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalObjectIdentifierValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=6;return r}t.prototype.getValue=function(){return this.valueBlock.toString()};t.prototype.setValue=function(e){this.valueBlock.fromString(e)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.getValue()})};return t}(BaseBlock);_a$m=ObjectIdentifier;(function(){typeStore.ObjectIdentifier=_a$m})();ObjectIdentifier.NAME="OBJECT IDENTIFIER";var LocalRelativeSidValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.valueDec,n=i===void 0?0:i,o=__rest(t,["valueDec"]);r=e.call(this,o)||this;r.valueDec=n;return r}t.prototype.fromBER=function(e,t,r){if(r===0)return t;var i=buildExports.BufferSourceConverter.toUint8Array(e);if(!checkBufferParams(this,i,t,r))return-1;var n=i.subarray(t,t+r);this.valueHexView=new Uint8Array(r);for(var o=0;o<r;o++){this.valueHexView[o]=n[o]&127;this.blockLength++;if((n[o]&128)===0)break}var a=new Uint8Array(this.blockLength);for(var o=0;o<this.blockLength;o++)a[o]=this.valueHexView[o];this.valueHexView=a;if((n[this.blockLength-1]&128)!==0){this.error="End of input reached before message was fully decoded";return-1}if(this.valueHexView[0]===0)this.warnings.push("Needlessly long format of SID encoding");if(this.blockLength<=8)this.valueDec=utilFromBase(this.valueHexView,7);else{this.isHexOnly=true;this.warnings.push("Too big SID for decoding, hex only")}return t+this.blockLength};t.prototype.toBER=function(e){if(this.isHexOnly){if(e)return new ArrayBuffer(this.valueHexView.byteLength);var t=this.valueHexView;var r=new Uint8Array(this.blockLength);for(var i=0;i<this.blockLength-1;i++)r[i]=t[i]|128;r[this.blockLength-1]=t[this.blockLength-1];return r.buffer}var n=utilToBase(this.valueDec,7);if(n.byteLength===0){this.error="Error during encoding SID value";return EMPTY_BUFFER}var o=new Uint8Array(n.byteLength);if(!e){var a=new Uint8Array(n);var s=n.byteLength-1;for(var i=0;i<s;i++)o[i]=a[i]|128;o[s]=a[s]}return o.buffer};t.prototype.toString=function(){var e="";if(this.isHexOnly)e=buildExports.Convert.ToHex(this.valueHexView);else{e=this.valueDec.toString()}return e};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{valueDec:this.valueDec})};return t}(HexBlock(LocalBaseBlock));LocalRelativeSidValueBlock.NAME="relativeSidBlock";var LocalRelativeObjectIdentifierValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=i===void 0?EMPTY_STRING:i,o=__rest(t,["value"]);r=e.call(this,o)||this;r.value=[];if(n){r.fromString(n)}return r}t.prototype.fromBER=function(e,t,r){var i=t;while(r>0){var n=new LocalRelativeSidValueBlock;i=n.fromBER(e,i,r);if(i===-1){this.blockLength=0;this.error=n.error;return i}this.blockLength+=n.blockLength;r-=n.blockLength;this.value.push(n)}return i};t.prototype.toBER=function(e,t){var r=[];for(var i=0;i<this.value.length;i++){var n=this.value[i].toBER(e);if(n.byteLength===0){this.error=this.value[i].error;return EMPTY_BUFFER}r.push(n)}return concat(r)};t.prototype.fromString=function(e){this.value=[];var t=0;var r=0;var i="";do{r=e.indexOf(".",t);if(r===-1)i=e.substring(t);else i=e.substring(t,r);t=r+1;var n=new LocalRelativeSidValueBlock;n.valueDec=parseInt(i,10);if(isNaN(n.valueDec))return true;this.value.push(n)}while(r!==-1);return true};t.prototype.toString=function(){var e="";var t=false;for(var r=0;r<this.value.length;r++){t=this.value[r].isHexOnly;var i=this.value[r].toString();if(r!==0)e="".concat(e,".");if(t){i="{".concat(i,"}");e+=i}else e+=i}return e};t.prototype.toJSON=function(){var t=__assign(__assign({},e.prototype.toJSON.call(this)),{value:this.toString(),sidArray:[]});for(var r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t};return t}(ValueBlock);LocalRelativeObjectIdentifierValueBlock.NAME="RelativeObjectIdentifierValueBlock";var _a$l;var RelativeObjectIdentifier=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t,LocalRelativeObjectIdentifierValueBlock)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=13;return r}t.prototype.getValue=function(){return this.valueBlock.toString()};t.prototype.setValue=function(e){this.valueBlock.fromString(e)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.valueBlock.toString()||"empty")};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.getValue()})};return t}(BaseBlock);_a$l=RelativeObjectIdentifier;(function(){typeStore.RelativeObjectIdentifier=_a$l})();RelativeObjectIdentifier.NAME="RelativeObjectIdentifier";var _a$k;var Sequence=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=16;return r}return t}(Constructed);_a$k=Sequence;(function(){typeStore.Sequence=_a$k})();Sequence.NAME="SEQUENCE";var _a$j;var Set=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=17;return r}return t}(Constructed);_a$j=Set;(function(){typeStore.Set=_a$j})();Set.NAME="SET";var LocalStringValueBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=__rest(t,[]);r=e.call(this,i)||this;r.isHexOnly=true;r.value=EMPTY_STRING;return r}t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{value:this.value})};return t}(HexBlock(ValueBlock));LocalStringValueBlock.NAME="StringValueBlock";var LocalSimpleStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(LocalStringValueBlock);LocalSimpleStringValueBlock.NAME="SimpleStringValueBlock";var LocalSimpleStringBlock=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=__rest(t,[]);return e.call(this,r,LocalSimpleStringValueBlock)||this}t.prototype.fromBuffer=function(e){this.valueBlock.value=String.fromCharCode.apply(null,buildExports.BufferSourceConverter.toUint8Array(e))};t.prototype.fromString=function(e){var t=e.length;var r=this.valueBlock.valueHexView=new Uint8Array(t);for(var i=0;i<t;i++)r[i]=e.charCodeAt(i);this.valueBlock.value=e};return t}(BaseStringBlock);LocalSimpleStringBlock.NAME="SIMPLE STRING";var LocalUtf8StringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){this.valueBlock.valueHexView=buildExports.BufferSourceConverter.toUint8Array(e);try{this.valueBlock.value=buildExports.Convert.ToUtf8String(e)}catch(t){this.warnings.push('Error during "decodeURIComponent": '.concat(t,", using raw string"));this.valueBlock.value=buildExports.Convert.ToBinary(e)}};t.prototype.fromString=function(e){this.valueBlock.valueHexView=new Uint8Array(buildExports.Convert.FromUtf8String(e));this.valueBlock.value=e};return t}(LocalSimpleStringBlock);LocalUtf8StringValueBlock.NAME="Utf8StringValueBlock";var _a$i;var Utf8String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=12;return r}return t}(LocalUtf8StringValueBlock);_a$i=Utf8String;(function(){typeStore.Utf8String=_a$i})();Utf8String.NAME="UTF8String";var LocalBmpStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){this.valueBlock.value=buildExports.Convert.ToUtf16String(e);this.valueBlock.valueHexView=buildExports.BufferSourceConverter.toUint8Array(e)};t.prototype.fromString=function(e){this.valueBlock.value=e;this.valueBlock.valueHexView=new Uint8Array(buildExports.Convert.FromUtf16String(e))};return t}(LocalSimpleStringBlock);LocalBmpStringValueBlock.NAME="BmpStringValueBlock";var _a$h;var BmpString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=__rest(t,[]);r=e.call(this,i)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=30;return r}return t}(LocalBmpStringValueBlock);_a$h=BmpString;(function(){typeStore.BmpString=_a$h})();BmpString.NAME="BMPString";var LocalUniversalStringValueBlock=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.fromBuffer=function(e){var t=ArrayBuffer.isView(e)?e.slice().buffer:e.slice(0);var r=new Uint8Array(t);for(var i=0;i<r.length;i+=4){r[i]=r[i+3];r[i+1]=r[i+2];r[i+2]=0;r[i+3]=0}this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(t))};t.prototype.fromString=function(e){var t=e.length;var r=this.valueBlock.valueHexView=new Uint8Array(t*4);for(var i=0;i<t;i++){var n=utilToBase(e.charCodeAt(i),8);var o=new Uint8Array(n);if(o.length>4)continue;var a=4-o.length;for(var s=o.length-1;s>=0;s--)r[i*4+s+a]=o[s]}this.valueBlock.value=e};return t}(LocalSimpleStringBlock);LocalUniversalStringValueBlock.NAME="UniversalStringValueBlock";var _a$g;var UniversalString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=__rest(t,[]);r=e.call(this,i)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=28;return r}return t}(LocalUniversalStringValueBlock);_a$g=UniversalString;(function(){typeStore.UniversalString=_a$g})();UniversalString.NAME="UniversalString";var _a$f;var NumericString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=18;return r}return t}(LocalSimpleStringBlock);_a$f=NumericString;(function(){typeStore.NumericString=_a$f})();NumericString.NAME="NumericString";var _a$e;var PrintableString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=19;return r}return t}(LocalSimpleStringBlock);_a$e=PrintableString;(function(){typeStore.PrintableString=_a$e})();PrintableString.NAME="PrintableString";var _a$d;var TeletexString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=20;return r}return t}(LocalSimpleStringBlock);_a$d=TeletexString;(function(){typeStore.TeletexString=_a$d})();TeletexString.NAME="TeletexString";var _a$c;var VideotexString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=21;return r}return t}(LocalSimpleStringBlock);_a$c=VideotexString;(function(){typeStore.VideotexString=_a$c})();VideotexString.NAME="VideotexString";var _a$b;var IA5String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=22;return r}return t}(LocalSimpleStringBlock);_a$b=IA5String;(function(){typeStore.IA5String=_a$b})();IA5String.NAME="IA5String";var _a$a;var GraphicString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=25;return r}return t}(LocalSimpleStringBlock);_a$a=GraphicString;(function(){typeStore.GraphicString=_a$a})();GraphicString.NAME="GraphicString";var _a$9;var VisibleString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=26;return r}return t}(LocalSimpleStringBlock);_a$9=VisibleString;(function(){typeStore.VisibleString=_a$9})();VisibleString.NAME="VisibleString";var _a$8;var GeneralString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=27;return r}return t}(LocalSimpleStringBlock);_a$8=GeneralString;(function(){typeStore.GeneralString=_a$8})();GeneralString.NAME="GeneralString";var _a$7;var CharacterString=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=29;return r}return t}(LocalSimpleStringBlock);_a$7=CharacterString;(function(){typeStore.CharacterString=_a$7})();CharacterString.NAME="CharacterString";var _a$6;var UTCTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=t.valueDate,o=__rest(t,["value","valueDate"]);r=e.call(this,o)||this;r.year=0;r.month=0;r.day=0;r.hour=0;r.minute=0;r.second=0;if(i){r.fromString(i);r.valueBlock.valueHexView=new Uint8Array(i.length);for(var a=0;a<i.length;a++)r.valueBlock.valueHexView[a]=i.charCodeAt(a)}if(n){r.fromDate(n);r.valueBlock.valueHexView=new Uint8Array(r.toBuffer())}r.idBlock.tagClass=1;r.idBlock.tagNumber=23;return r}t.prototype.fromBuffer=function(e){this.fromString(String.fromCharCode.apply(null,buildExports.BufferSourceConverter.toUint8Array(e)))};t.prototype.toBuffer=function(){var e=this.toString();var t=new ArrayBuffer(e.length);var r=new Uint8Array(t);for(var i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return t};t.prototype.fromDate=function(e){this.year=e.getUTCFullYear();this.month=e.getUTCMonth()+1;this.day=e.getUTCDate();this.hour=e.getUTCHours();this.minute=e.getUTCMinutes();this.second=e.getUTCSeconds()};t.prototype.toDate=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))};t.prototype.fromString=function(e){var t=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/gi;var r=t.exec(e);if(r===null){this.error="Wrong input string for conversion";return}var i=parseInt(r[1],10);if(i>=50)this.year=1900+i;else this.year=2e3+i;this.month=parseInt(r[2],10);this.day=parseInt(r[3],10);this.hour=parseInt(r[4],10);this.minute=parseInt(r[5],10);this.second=parseInt(r[6],10)};t.prototype.toString=function(t){if(t===void 0){t="iso"}if(t==="iso"){var r=new Array(7);r[0]=padNumber(this.year<2e3?this.year-1900:this.year-2e3,2);r[1]=padNumber(this.month,2);r[2]=padNumber(this.day,2);r[3]=padNumber(this.hour,2);r[4]=padNumber(this.minute,2);r[5]=padNumber(this.second,2);r[6]="Z";return r.join("")}return e.prototype.toString.call(this,t)};t.prototype.onAsciiEncoding=function(){return"".concat(this.constructor.NAME," : ").concat(this.toDate().toISOString())};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second})};return t}(VisibleString);_a$6=UTCTime;(function(){typeStore.UTCTime=_a$6})();UTCTime.NAME="UTCTime";var _a$5;var GeneralizedTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r;var i=e.call(this,t)||this;(r=i.millisecond)!==null&&r!==void 0?r:i.millisecond=0;i.idBlock.tagClass=1;i.idBlock.tagNumber=24;return i}t.prototype.fromDate=function(t){e.prototype.fromDate.call(this,t);this.millisecond=t.getUTCMilliseconds()};t.prototype.toDate=function(){var e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond);return new Date(e)};t.prototype.fromString=function(e){var t=false;var r="";var i="";var n=0;var o;var a=0;var s=0;if(e[e.length-1]==="Z"){r=e.substring(0,e.length-1);t=true}else{var c=new Number(e[e.length-1]);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");r=e}if(t){if(r.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(r.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{var u=1;var p=r.indexOf("+");var f="";if(p===-1){p=r.indexOf("-");u=-1}if(p!==-1){f=r.substring(p+1);r=r.substring(0,p);if(f.length!==2&&f.length!==4)throw new Error("Wrong input string for conversion");var c=parseInt(f.substring(0,2),10);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");a=u*c;if(f.length===4){c=parseInt(f.substring(2,4),10);if(isNaN(c.valueOf()))throw new Error("Wrong input string for conversion");s=u*c}}}var d=r.indexOf(".");if(d===-1)d=r.indexOf(",");if(d!==-1){var l=new Number("0".concat(r.substring(d)));if(isNaN(l.valueOf()))throw new Error("Wrong input string for conversion");n=l.valueOf();i=r.substring(0,d)}else i=r;switch(true){case i.length===8:o=/(\d{4})(\d{2})(\d{2})/gi;if(d!==-1)throw new Error("Wrong input string for conversion");break;case i.length===10:o=/(\d{4})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=60*n;this.minute=Math.floor(y);y=60*(y-this.minute);this.second=Math.floor(y);y=1e3*(y-this.second);this.millisecond=Math.floor(y)}break;case i.length===12:o=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=60*n;this.second=Math.floor(y);y=1e3*(y-this.second);this.millisecond=Math.floor(y)}break;case i.length===14:o=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/gi;if(d!==-1){var y=1e3*n;this.millisecond=Math.floor(y)}break;default:throw new Error("Wrong input string for conversion")}var A=o.exec(i);if(A===null)throw new Error("Wrong input string for conversion");for(var v=1;v<A.length;v++){switch(v){case 1:this.year=parseInt(A[v],10);break;case 2:this.month=parseInt(A[v],10);break;case 3:this.day=parseInt(A[v],10);break;case 4:this.hour=parseInt(A[v],10)+a;break;case 5:this.minute=parseInt(A[v],10)+s;break;case 6:this.second=parseInt(A[v],10);break;default:throw new Error("Wrong input string for conversion")}}if(t===false){var h=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=h.getUTCFullYear();this.month=h.getUTCMonth();this.day=h.getUTCDay();this.hour=h.getUTCHours();this.minute=h.getUTCMinutes();this.second=h.getUTCSeconds();this.millisecond=h.getUTCMilliseconds()}};t.prototype.toString=function(t){if(t===void 0){t="iso"}if(t==="iso"){var r=[];r.push(padNumber(this.year,4));r.push(padNumber(this.month,2));r.push(padNumber(this.day,2));r.push(padNumber(this.hour,2));r.push(padNumber(this.minute,2));r.push(padNumber(this.second,2));if(this.millisecond!==0){r.push(".");r.push(padNumber(this.millisecond,3))}r.push("Z");return r.join("")}return e.prototype.toString.call(this,t)};t.prototype.toJSON=function(){return __assign(__assign({},e.prototype.toJSON.call(this)),{millisecond:this.millisecond})};return t}(UTCTime);_a$5=GeneralizedTime;(function(){typeStore.GeneralizedTime=_a$5})();GeneralizedTime.NAME="GeneralizedTime";var _a$4;var DATE=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=31;return r}return t}(Utf8String);_a$4=DATE;(function(){typeStore.DATE=_a$4})();DATE.NAME="DATE";var _a$3;var TimeOfDay=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=32;return r}return t}(Utf8String);_a$3=TimeOfDay;(function(){typeStore.TimeOfDay=_a$3})();TimeOfDay.NAME="TimeOfDay";var _a$2;var DateTime=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=33;return r}return t}(Utf8String);_a$2=DateTime;(function(){typeStore.DateTime=_a$2})();DateTime.NAME="DateTime";var _a$1;var Duration=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=34;return r}return t}(Utf8String);_a$1=Duration;(function(){typeStore.Duration=_a$1})();Duration.NAME="Duration";var _a;var TIME=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;r.idBlock.tagClass=1;r.idBlock.tagNumber=14;return r}return t}(Utf8String);_a=TIME;(function(){typeStore.TIME=_a})();TIME.NAME="TIME";var Any=function(){function e(e){var t=e===void 0?{}:e,r=t.name,i=r===void 0?EMPTY_STRING:r,n=t.optional,o=n===void 0?false:n;this.name=i;this.optional=o}return e}();var Choice=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=i===void 0?[]:i,o=__rest(t,["value"]);r=e.call(this,o)||this;r.value=n;return r}return t}(Any);var Repeated=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=this;var i=t.value,n=i===void 0?new Any:i,o=t.local,a=o===void 0?false:o,s=__rest(t,["value","local"]);r=e.call(this,s)||this;r.value=n;r.local=a;return r}return t}(Any);var RawData=function(){function e(e){var t=e===void 0?{}:e,r=t.data,i=r===void 0?EMPTY_VIEW:r;this.dataView=buildExports.BufferSourceConverter.toUint8Array(i)}Object.defineProperty(e.prototype,"data",{get:function(){return this.dataView.slice().buffer},set:function(e){this.dataView=buildExports.BufferSourceConverter.toUint8Array(e)},enumerable:false,configurable:true});e.prototype.fromBER=function(e,t,r){var i=t+r;this.dataView=buildExports.BufferSourceConverter.toUint8Array(e).subarray(t,i);return i};e.prototype.toBER=function(e){return this.dataView.slice().buffer};return e}();function compareSchema(e,t,r){if(r instanceof Choice){for(var i=0,n=r.value;i<n.length;i++){var o=n[i];var a=compareSchema(e,t,o);if(a.verified){return{verified:true,result:e}}}{var s={verified:false,result:{error:"Wrong values for Choice type"}};if(r.hasOwnProperty(NAME))s.name=r.name;return s}}if(r instanceof Any){if(r.hasOwnProperty(NAME))e[r.name]=t;return{verified:true,result:e}}if(e instanceof Object===false){return{verified:false,result:{error:"Wrong root object"}}}if(t instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 data"}}}if(r instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(ID_BLOCK in r===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(FROM_BER in r.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(TO_BER in r.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}var c=r.idBlock.toBER(false);if(c.byteLength===0){return{verified:false,result:{error:"Error encoding idBlock for ASN.1 schema"}}}var u=r.idBlock.fromBER(c,0,c.byteLength);if(u===-1){return{verified:false,result:{error:"Error decoding idBlock for ASN.1 schema"}}}if(r.idBlock.hasOwnProperty(TAG_CLASS)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(r.idBlock.tagClass!==t.idBlock.tagClass){return{verified:false,result:e}}if(r.idBlock.hasOwnProperty(TAG_NUMBER)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(r.idBlock.tagNumber!==t.idBlock.tagNumber){return{verified:false,result:e}}if(r.idBlock.hasOwnProperty(IS_CONSTRUCTED)===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(r.idBlock.isConstructed!==t.idBlock.isConstructed){return{verified:false,result:e}}if(!(IS_HEX_ONLY in r.idBlock)){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}if(r.idBlock.isHexOnly!==t.idBlock.isHexOnly){return{verified:false,result:e}}if(r.idBlock.isHexOnly){if(VALUE_HEX_VIEW in r.idBlock===false){return{verified:false,result:{error:"Wrong ASN.1 schema"}}}var p=r.idBlock.valueHexView;var f=t.idBlock.valueHexView;if(p.length!==f.length){return{verified:false,result:e}}for(var d=0;d<p.length;d++){if(p[d]!==f[1]){return{verified:false,result:e}}}}if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name)e[r.name]=t}if(r instanceof typeStore.Constructed){var l=0;var a={verified:false,result:{error:"Unknown error"}};var y=r.valueBlock.value.length;if(y>0){if(r.valueBlock.value[0]instanceof Repeated){y=t.valueBlock.value.length}}if(y===0){return{verified:true,result:e}}if(t.valueBlock.value.length===0&&r.valueBlock.value.length!==0){var A=true;for(var d=0;d<r.valueBlock.value.length;d++)A=A&&(r.valueBlock.value[d].optional||false);if(A){return{verified:true,result:e}}if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name)delete e[r.name]}e.error="Inconsistent object length";return{verified:false,result:e}}for(var d=0;d<y;d++){if(d-l>=t.valueBlock.value.length){if(r.valueBlock.value[d].optional===false){var s={verified:false,result:e};e.error="Inconsistent length between ASN.1 data and schema";if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name){delete e[r.name];s.name=r.name}}return s}}else{if(r.valueBlock.value[0]instanceof Repeated){a=compareSchema(e,t.valueBlock.value[d],r.valueBlock.value[0].value);if(a.verified===false){if(r.valueBlock.value[0].optional)l++;else{if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name)delete e[r.name]}return a}}if(NAME in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){var v={};if(LOCAL in r.valueBlock.value[0]&&r.valueBlock.value[0].local)v=t;else v=e;if(typeof v[r.valueBlock.value[0].name]==="undefined")v[r.valueBlock.value[0].name]=[];v[r.valueBlock.value[0].name].push(t.valueBlock.value[d])}}else{a=compareSchema(e,t.valueBlock.value[d-l],r.valueBlock.value[d]);if(a.verified===false){if(r.valueBlock.value[d].optional)l++;else{if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name)delete e[r.name]}return a}}}}}if(a.verified===false){var s={verified:false,result:e};if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name){delete e[r.name];s.name=r.name}}return s}return{verified:true,result:e}}if(r.primitiveSchema&&VALUE_HEX_VIEW in t.valueBlock){var h=localFromBER(t.valueBlock.valueHexView);if(h.offset===-1){var s={verified:false,result:h.result};if(r.name){r.name=r.name.replace(/^\s+|\s+$/g,EMPTY_STRING);if(r.name){delete e[r.name];s.name=r.name}}return s}return compareSchema(e,h.result,r.primitiveSchema)}return{verified:true,result:e}}function verifySchema(e,t){if(t instanceof Object===false){return{verified:false,result:{error:"Wrong ASN.1 schema type"}}}var r=localFromBER(buildExports.BufferSourceConverter.toUint8Array(e));if(r.offset===-1){return{verified:false,result:r.result}}return compareSchema(r.result,r.result,t)}var asn1js=Object.freeze({__proto__:null,Any:Any,BaseBlock:BaseBlock,BaseStringBlock:BaseStringBlock,BitString:BitString$1,BmpString:BmpString,Boolean:Boolean,CharacterString:CharacterString,Choice:Choice,Constructed:Constructed,DATE:DATE,DateTime:DateTime,Duration:Duration,EndOfContent:EndOfContent,Enumerated:Enumerated,GeneralString:GeneralString,GeneralizedTime:GeneralizedTime,GraphicString:GraphicString,HexBlock:HexBlock,IA5String:IA5String,Integer:Integer,Null:Null,NumericString:NumericString,ObjectIdentifier:ObjectIdentifier,OctetString:OctetString$1,Primitive:Primitive,PrintableString:PrintableString,RawData:RawData,RelativeObjectIdentifier:RelativeObjectIdentifier,Repeated:Repeated,Sequence:Sequence,Set:Set,TIME:TIME,TeletexString:TeletexString,TimeOfDay:TimeOfDay,UTCTime:UTCTime,UniversalString:UniversalString,Utf8String:Utf8String,ValueBlock:ValueBlock,VideotexString:VideotexString,ViewWriter:ViewWriter,VisibleString:VisibleString,compareSchema:compareSchema,fromBER:fromBER,verifySchema:verifySchema});var AsnTypeTypes;(function(e){e[e["Sequence"]=0]="Sequence";e[e["Set"]=1]="Set";e[e["Choice"]=2]="Choice"})(AsnTypeTypes||(AsnTypeTypes={}));var AsnPropTypes;(function(e){e[e["Any"]=1]="Any";e[e["Boolean"]=2]="Boolean";e[e["OctetString"]=3]="OctetString";e[e["BitString"]=4]="BitString";e[e["Integer"]=5]="Integer";e[e["Enumerated"]=6]="Enumerated";e[e["ObjectIdentifier"]=7]="ObjectIdentifier";e[e["Utf8String"]=8]="Utf8String";e[e["BmpString"]=9]="BmpString";e[e["UniversalString"]=10]="UniversalString";e[e["NumericString"]=11]="NumericString";e[e["PrintableString"]=12]="PrintableString";e[e["TeletexString"]=13]="TeletexString";e[e["VideotexString"]=14]="VideotexString";e[e["IA5String"]=15]="IA5String";e[e["GraphicString"]=16]="GraphicString";e[e["VisibleString"]=17]="VisibleString";e[e["GeneralString"]=18]="GeneralString";e[e["CharacterString"]=19]="CharacterString";e[e["UTCTime"]=20]="UTCTime";e[e["GeneralizedTime"]=21]="GeneralizedTime";e[e["DATE"]=22]="DATE";e[e["TimeOfDay"]=23]="TimeOfDay";e[e["DateTime"]=24]="DateTime";e[e["Duration"]=25]="Duration";e[e["TIME"]=26]="TIME";e[e["Null"]=27]="Null"})(AsnPropTypes||(AsnPropTypes={}));var BitString=function(){function e(e,t){if(t===void 0){t=0}this.unusedBits=0;this.value=new ArrayBuffer(0);if(e){if(typeof e==="number"){this.fromNumber(e)}else if(buildExports.BufferSourceConverter.isBufferSource(e)){this.unusedBits=t;this.value=buildExports.BufferSourceConverter.toArrayBuffer(e)}else{throw TypeError("Unsupported type of 'params' argument for BitString")}}}e.prototype.fromASN=function(e){if(!(e instanceof BitString$1)){throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString")}this.unusedBits=e.valueBlock.unusedBits;this.value=e.valueBlock.valueHex;return this};e.prototype.toASN=function(){return new BitString$1({unusedBits:this.unusedBits,valueHex:this.value})};e.prototype.toSchema=function(e){return new BitString$1({name:e})};e.prototype.toNumber=function(){var e="";var t=new Uint8Array(this.value);for(var r=0,i=t;r<i.length;r++){var n=i[r];e+=n.toString(2).padStart(8,"0")}e=e.split("").reverse().join("");if(this.unusedBits){e=e.slice(this.unusedBits).padStart(this.unusedBits,"0")}return parseInt(e,2)};e.prototype.fromNumber=function(e){var t=e.toString(2);var r=t.length+7>>3;this.unusedBits=(r<<3)-t.length;var i=new Uint8Array(r);t=t.padStart(r<<3,"0").split("").reverse().join("");var n=0;while(n<r){i[n]=parseInt(t.slice(n<<3,(n<<3)+8),2);n++}this.value=i.buffer};return e}();var OctetString=function(){function e(e){if(typeof e==="number"){this.buffer=new ArrayBuffer(e)}else{if(buildExports.BufferSourceConverter.isBufferSource(e)){this.buffer=buildExports.BufferSourceConverter.toArrayBuffer(e)}else if(Array.isArray(e)){this.buffer=new Uint8Array(e)}else{this.buffer=new ArrayBuffer(0)}}}Object.defineProperty(e.prototype,"byteLength",{get:function(){return this.buffer.byteLength},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"byteOffset",{get:function(){return 0},enumerable:false,configurable:true});e.prototype.fromASN=function(e){if(!(e instanceof OctetString$1)){throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString")}this.buffer=e.valueBlock.valueHex;return this};e.prototype.toASN=function(){return new OctetString$1({valueHex:this.buffer})};e.prototype.toSchema=function(e){return new OctetString$1({name:e})};return e}();var AsnAnyConverter={fromASN:function(e){return e instanceof Null?null:e.valueBeforeDecodeView},toASN:function(e){if(e===null){return new Null}var t=fromBER(e);if(t.result.error){throw new Error(t.result.error)}return t.result}};var AsnIntegerConverter={fromASN:function(e){return e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec},toASN:function(e){return new Integer({value:+e})}};var AsnEnumeratedConverter={fromASN:function(e){return e.valueBlock.valueDec},toASN:function(e){return new Enumerated({value:e})}};var AsnIntegerArrayBufferConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new Integer({valueHex:e})}};var AsnBitStringConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new BitString$1({valueHex:e})}};var AsnObjectIdentifierConverter={fromASN:function(e){return e.valueBlock.toString()},toASN:function(e){return new ObjectIdentifier({value:e})}};var AsnBooleanConverter={fromASN:function(e){return e.valueBlock.value},toASN:function(e){return new Boolean({value:e})}};var AsnOctetStringConverter={fromASN:function(e){return e.valueBlock.valueHexView},toASN:function(e){return new OctetString$1({valueHex:e})}};var AsnConstructedOctetStringConverter={fromASN:function(e){return new OctetString(e.getValue())},toASN:function(e){return e.toASN()}};function createStringConverter(e){return{fromASN:function(e){return e.valueBlock.value},toASN:function(t){return new e({value:t})}}}var AsnUtf8StringConverter=createStringConverter(Utf8String);var AsnBmpStringConverter=createStringConverter(BmpString);var AsnUniversalStringConverter=createStringConverter(UniversalString);var AsnNumericStringConverter=createStringConverter(NumericString);var AsnPrintableStringConverter=createStringConverter(PrintableString);var AsnTeletexStringConverter=createStringConverter(TeletexString);var AsnVideotexStringConverter=createStringConverter(VideotexString);var AsnIA5StringConverter=createStringConverter(IA5String);var AsnGraphicStringConverter=createStringConverter(GraphicString);var AsnVisibleStringConverter=createStringConverter(VisibleString);var AsnGeneralStringConverter=createStringConverter(GeneralString);var AsnCharacterStringConverter=createStringConverter(CharacterString);var AsnUTCTimeConverter={fromASN:function(e){return e.toDate()},toASN:function(e){return new UTCTime({valueDate:e})}};var AsnGeneralizedTimeConverter={fromASN:function(e){return e.toDate()},toASN:function(e){return new GeneralizedTime({valueDate:e})}};var AsnNullConverter={fromASN:function(){return null},toASN:function(){return new Null}};function defaultConverter(e){switch(e){case AsnPropTypes.Any:return AsnAnyConverter;case AsnPropTypes.BitString:return AsnBitStringConverter;case AsnPropTypes.BmpString:return AsnBmpStringConverter;case AsnPropTypes.Boolean:return AsnBooleanConverter;case AsnPropTypes.CharacterString:return AsnCharacterStringConverter;case AsnPropTypes.Enumerated:return AsnEnumeratedConverter;case AsnPropTypes.GeneralString:return AsnGeneralStringConverter;case AsnPropTypes.GeneralizedTime:return AsnGeneralizedTimeConverter;case AsnPropTypes.GraphicString:return AsnGraphicStringConverter;case AsnPropTypes.IA5String:return AsnIA5StringConverter;case AsnPropTypes.Integer:return AsnIntegerConverter;case AsnPropTypes.Null:return AsnNullConverter;case AsnPropTypes.NumericString:return AsnNumericStringConverter;case AsnPropTypes.ObjectIdentifier:return AsnObjectIdentifierConverter;case AsnPropTypes.OctetString:return AsnOctetStringConverter;case AsnPropTypes.PrintableString:return AsnPrintableStringConverter;case AsnPropTypes.TeletexString:return AsnTeletexStringConverter;case AsnPropTypes.UTCTime:return AsnUTCTimeConverter;case AsnPropTypes.UniversalString:return AsnUniversalStringConverter;case AsnPropTypes.Utf8String:return AsnUtf8StringConverter;case AsnPropTypes.VideotexString:return AsnVideotexStringConverter;case AsnPropTypes.VisibleString:return AsnVisibleStringConverter;default:return null}}function isConvertible(e){if(typeof e==="function"&&e.prototype){if(e.prototype.toASN&&e.prototype.fromASN){return true}else{return isConvertible(e.prototype)}}else{return!!(e&&typeof e==="object"&&"toASN"in e&&"fromASN"in e)}}function isTypeOfArray(e){var t;if(e){var r=Object.getPrototypeOf(e);if(((t=r===null||r===void 0?void 0:r.prototype)===null||t===void 0?void 0:t.constructor)===Array){return true}return isTypeOfArray(r)}return false}function isArrayEqual(e,t){if(!(e&&t)){return false}if(e.byteLength!==t.byteLength){return false}var r=new Uint8Array(e);var i=new Uint8Array(t);for(var n=0;n<e.byteLength;n++){if(r[n]!==i[n]){return false}}return true}var AsnSchemaStorage=function(){function e(){this.items=new WeakMap}e.prototype.has=function(e){return this.items.has(e)};e.prototype.get=function(e,t){if(t===void 0){t=false}var r=this.items.get(e);if(!r){throw new Error("Cannot get schema for '".concat(e.prototype.constructor.name,"' target"))}if(t&&!r.schema){throw new Error("Schema '".concat(e.prototype.constructor.name,"' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'."))}return r};e.prototype.cache=function(e){var t=this.get(e);if(!t.schema){t.schema=this.create(e,true)}};e.prototype.createDefault=function(e){var t={type:AsnTypeTypes.Sequence,items:{}};var r=this.findParentSchema(e);if(r){Object.assign(t,r);t.items=Object.assign({},t.items,r.items)}return t};e.prototype.create=function(e,t){var r=this.items.get(e)||this.createDefault(e);var i=[];for(var n in r.items){var o=r.items[n];var a=t?n:"";var s=void 0;if(typeof o.type==="number"){var c=AsnPropTypes[o.type];var u=asn1js[c];if(!u){throw new Error("Cannot get ASN1 class by name '".concat(c,"'"))}s=new u({name:a})}else if(isConvertible(o.type)){var p=new o.type;s=p.toSchema(a)}else if(o.optional){var f=this.get(o.type);if(f.type===AsnTypeTypes.Choice){s=new Any({name:a})}else{s=this.create(o.type,false);s.name=a}}else{s=new Any({name:a})}var d=!!o.optional||o.defaultValue!==undefined;if(o.repeated){s.name="";var l=o.repeated==="set"?Set:Sequence;s=new l({name:"",value:[new Repeated({name:a,value:s})]})}if(o.context!==null&&o.context!==undefined){if(o.implicit){if(typeof o.type==="number"||isConvertible(o.type)){var l=o.repeated?Constructed:Primitive;i.push(new l({name:a,optional:d,idBlock:{tagClass:3,tagNumber:o.context}}))}else{this.cache(o.type);var y=!!o.repeated;var A=!y?this.get(o.type,true).schema:s;A="valueBlock"in A?A.valueBlock.value:A.value;i.push(new Constructed({name:!y?a:"",optional:d,idBlock:{tagClass:3,tagNumber:o.context},value:A}))}}else{i.push(new Constructed({optional:d,idBlock:{tagClass:3,tagNumber:o.context},value:[s]}))}}else{s.optional=d;i.push(s)}}switch(r.type){case AsnTypeTypes.Sequence:return new Sequence({value:i,name:""});case AsnTypeTypes.Set:return new Set({value:i,name:""});case AsnTypeTypes.Choice:return new Choice({value:i,name:""});default:throw new Error("Unsupported ASN1 type in use")}};e.prototype.set=function(e,t){this.items.set(e,t);return this};e.prototype.findParentSchema=function(e){var t=Object.getPrototypeOf(e);if(t){var r=this.items.get(t);return r||this.findParentSchema(t)}return null};return e}();var schemaStorage=new AsnSchemaStorage;var AsnType=function(e){return function(t){var r;if(!schemaStorage.has(t)){r=schemaStorage.createDefault(t);schemaStorage.set(t,r)}else{r=schemaStorage.get(t)}Object.assign(r,e)}};var AsnProp=function(e){return function(t,r){var i;if(!schemaStorage.has(t.constructor)){i=schemaStorage.createDefault(t.constructor);schemaStorage.set(t.constructor,i)}else{i=schemaStorage.get(t.constructor)}var n=Object.assign({},e);if(typeof n.type==="number"&&!n.converter){var o=defaultConverter(e.type);if(!o){throw new Error("Cannot get default converter for property '".concat(r,"' of ").concat(t.constructor.name))}n.converter=o}i.items[r]=n}};var AsnSchemaValidationError=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.schemas=[];return t}return t}(Error);var AsnParser=function(){function e(){}e.parse=function(e,t){var r=fromBER(e);if(r.result.error){throw new Error(r.result.error)}var i=this.fromASN(r.result,t);return i};e.fromASN=function(e,t){try{if(isConvertible(t)){var r=new t;return r.fromASN(e)}var i=schemaStorage.get(t);schemaStorage.cache(t);var n=i.schema;var o=this.handleChoiceTypes(e,i,t,n);if(o===null||o===void 0?void 0:o.result){return o.result}if(o===null||o===void 0?void 0:o.targetSchema){n=o.targetSchema}var a=this.handleSequenceTypes(e,i,t,n);if(a&&"isManualMapping"in a){return a.result}var s=a;var c=new t;if(isTypeOfArray(t)){return this.handleArrayTypes(e,i,t)}this.processSchemaItems(i,s,c);return c}catch(e){if(e instanceof AsnSchemaValidationError){e.schemas.push(t.name)}throw e}};e.handleChoiceTypes=function(e,t,r,i){if(e.constructor===Constructed&&t.type===AsnTypeTypes.Choice&&e.idBlock.tagClass===3){for(var n in t.items){var o=t.items[n];if(o.context===e.idBlock.tagNumber&&o.implicit){if(typeof o.type==="function"&&schemaStorage.has(o.type)){var a=schemaStorage.get(o.type);if(a&&a.type===AsnTypeTypes.Sequence){var s=new Sequence;if("value"in e.valueBlock&&Array.isArray(e.valueBlock.value)&&"value"in s.valueBlock){s.valueBlock.value=e.valueBlock.value;var c=this.fromASN(s,o.type);var u=new r;u[n]=c;return{result:u}}}}}}}else if(e.constructor===Constructed&&t.type!==AsnTypeTypes.Choice){var p=new Constructed({idBlock:{tagClass:3,tagNumber:e.idBlock.tagNumber},value:t.schema.valueBlock.value});for(var n in t.items){delete e[n]}return{targetSchema:p}}return null};e.handleSequenceTypes=function(e,t,r,i){if(t.type===AsnTypeTypes.Sequence){var n=Object.keys(t.items).filter((function(e){var r=t.items[e];return r.optional&&typeof r.type==="function"&&schemaStorage.has(r.type)&&schemaStorage.get(r.type).type===AsnTypeTypes.Choice}));if(n.length>0&&"value"in e.valueBlock&&Array.isArray(e.valueBlock.value)&&r.name==="CertReqMsg"){return this.handleManualMapping(e,t,r)}var o=compareSchema({},e,i);if(!o.verified){throw new AsnSchemaValidationError("Data does not match to ".concat(r.name," ASN1 schema. ").concat(o.result.error))}return o}else{var o=compareSchema({},e,i);if(!o.verified){throw new AsnSchemaValidationError("Data does not match to ".concat(r.name," ASN1 schema. ").concat(o.result.error))}return o}};e.handleManualMapping=function(e,t,r){var i=new r;var n=e.valueBlock.value;var o=Object.keys(t.items);var a=0;for(var s=0;s<o.length;s++){var c=o[s];var u=t.items[c];if(a>=n.length)break;if(u.repeated){i[c]=this.processRepeatedField(n,a,u);break}else if(typeof u.type==="number"){i[c]=this.processPrimitiveField(n[a],u);a++}else if(this.isOptionalChoiceField(u)){var p=this.processOptionalChoiceField(n[a],u);if(p.processed){i[c]=p.value;a++}}else{i[c]=this.fromASN(n[a],u.type);a++}}return{result:i,verified:true,isManualMapping:true}};e.processRepeatedField=function(e,t,r){var i=this;var n=e.slice(t);if(n.length===1&&n[0].constructor.name==="Sequence"){var o=n[0];if(o.valueBlock&&o.valueBlock.value&&Array.isArray(o.valueBlock.value)){n=o.valueBlock.value}}if(typeof r.type==="number"){var a=defaultConverter(r.type);if(!a)throw new Error("No converter for ASN.1 type ".concat(r.type));return n.filter((function(e){return e&&e.valueBlock})).map((function(e){try{return a.fromASN(e)}catch(e){return undefined}})).filter((function(e){return e!==undefined}))}else{return n.filter((function(e){return e&&e.valueBlock})).map((function(e){try{return i.fromASN(e,r.type)}catch(e){return undefined}})).filter((function(e){return e!==undefined}))}};e.processPrimitiveField=function(e,t){var r=defaultConverter(t.type);if(!r)throw new Error("No converter for ASN.1 type ".concat(t.type));return r.fromASN(e)};e.isOptionalChoiceField=function(e){return e.optional&&typeof e.type==="function"&&schemaStorage.has(e.type)&&schemaStorage.get(e.type).type===AsnTypeTypes.Choice};e.processOptionalChoiceField=function(e,t){try{var r=this.fromASN(e,t.type);return{processed:true,value:r}}catch(e){if(e instanceof AsnSchemaValidationError&&/Wrong values for Choice type/.test(e.message)){return{processed:false}}throw e}};e.handleArrayTypes=function(e,t,r){var i=this;if(!("value"in e.valueBlock&&Array.isArray(e.valueBlock.value))){throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.")}var n=t.itemType;if(typeof n==="number"){var o=defaultConverter(n);if(!o){throw new Error("Cannot get default converter for array item of ".concat(r.name," ASN1 schema"))}return r.from(e.valueBlock.value,(function(e){return o.fromASN(e)}))}else{return r.from(e.valueBlock.value,(function(e){return i.fromASN(e,n)}))}};e.processSchemaItems=function(e,t,r){for(var i in e.items){var n=t.result[i];if(!n){continue}var o=e.items[i];var a=o.type;if(typeof a==="number"||isConvertible(a)){r[i]=this.processPrimitiveSchemaItem(n,o,a)}else{r[i]=this.processComplexSchemaItem(n,o,a)}}};e.processPrimitiveSchemaItem=function(e,t,r){var i;var n=(i=t.converter)!==null&&i!==void 0?i:isConvertible(r)?new r:null;if(!n){throw new Error("Converter is empty")}if(t.repeated){return this.processRepeatedPrimitiveItem(e,t,n)}else{return this.processSinglePrimitiveItem(e,t,r,n)}};e.processRepeatedPrimitiveItem=function(e,t,r){if(t.implicit){var i=t.repeated==="sequence"?Sequence:Set;var n=new i;n.valueBlock=e.valueBlock;var o=fromBER(n.toBER(false));if(o.offset===-1){throw new Error("Cannot parse the child item. ".concat(o.result.error))}if(!("value"in o.result.valueBlock&&Array.isArray(o.result.valueBlock.value))){throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.")}var a=o.result.valueBlock.value;return Array.from(a,(function(e){return r.fromASN(e)}))}else{return Array.from(e,(function(e){return r.fromASN(e)}))}};e.processSinglePrimitiveItem=function(e,t,r,i){var n=e;if(t.implicit){var o=void 0;if(isConvertible(r)){o=(new r).toSchema("")}else{var a=AsnPropTypes[r];var s=asn1js[a];if(!s){throw new Error("Cannot get '".concat(a,"' class from asn1js module"))}o=new s}o.valueBlock=n.valueBlock;n=fromBER(o.toBER(false)).result}return i.fromASN(n)};e.processComplexSchemaItem=function(e,t,r){var i=this;if(t.repeated){if(!Array.isArray(e)){throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.")}return Array.from(e,(function(e){return i.fromASN(e,r)}))}else{var n=this.handleImplicitTagging(e,t,r);if(this.isOptionalChoiceField(t)){try{return this.fromASN(n,r)}catch(e){if(e instanceof AsnSchemaValidationError&&/Wrong values for Choice type/.test(e.message)){return undefined}throw e}}else{return this.fromASN(n,r)}}};e.handleImplicitTagging=function(e,t,r){if(t.implicit&&typeof t.context==="number"){var i=schemaStorage.get(r);if(i.type===AsnTypeTypes.Sequence){var n=new Sequence;if("value"in e.valueBlock&&Array.isArray(e.valueBlock.value)&&"value"in n.valueBlock){n.valueBlock.value=e.valueBlock.value;return n}}else if(i.type===AsnTypeTypes.Set){var o=new Set;if("value"in e.valueBlock&&Array.isArray(e.valueBlock.value)&&"value"in o.valueBlock){o.valueBlock.value=e.valueBlock.value;return o}}}return e};return e}();var AsnSerializer=function(){function e(){}e.serialize=function(e){if(e instanceof BaseBlock){return e.toBER(false)}return this.toASN(e).toBER(false)};e.toASN=function(t){var r=this;if(t&&typeof t==="object"&&isConvertible(t)){return t.toASN()}if(!(t&&typeof t==="object")){throw new TypeError("Parameter 1 should be type of Object.")}var i=t.constructor;var n=schemaStorage.get(i);schemaStorage.cache(i);var o=[];if(n.itemType){if(!Array.isArray(t)){throw new TypeError("Parameter 1 should be type of Array.")}if(typeof n.itemType==="number"){var a=defaultConverter(n.itemType);if(!a){throw new Error("Cannot get default converter for array item of ".concat(i.name," ASN1 schema"))}o=t.map((function(e){return a.toASN(e)}))}else{o=t.map((function(e){return r.toAsnItem({type:n.itemType},"[]",i,e)}))}}else{for(var s in n.items){var c=n.items[s];var u=t[s];if(u===undefined||c.defaultValue===u||typeof c.defaultValue==="object"&&typeof u==="object"&&isArrayEqual(this.serialize(c.defaultValue),this.serialize(u))){continue}var p=e.toAsnItem(c,s,i,u);if(typeof c.context==="number"){if(c.implicit){if(!c.repeated&&(typeof c.type==="number"||isConvertible(c.type))){var f={};f.valueHex=p instanceof Null?p.valueBeforeDecodeView:p.valueBlock.toBER();o.push(new Primitive(__assign({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context}},f)))}else{o.push(new Constructed({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:p.valueBlock.value}))}}else{o.push(new Constructed({optional:c.optional,idBlock:{tagClass:3,tagNumber:c.context},value:[p]}))}}else if(c.repeated){o=o.concat(p)}else{o.push(p)}}}var d;switch(n.type){case AsnTypeTypes.Sequence:d=new Sequence({value:o});break;case AsnTypeTypes.Set:d=new Set({value:o});break;case AsnTypeTypes.Choice:if(!o[0]){throw new Error("Schema '".concat(i.name,"' has wrong data. Choice cannot be empty."))}d=o[0];break}return d};e.toAsnItem=function(e,t,r,i){var n=this;var o;if(typeof e.type==="number"){var a=e.converter;if(!a){throw new Error("Property '".concat(t,"' doesn't have converter for type ").concat(AsnPropTypes[e.type]," in schema '").concat(r.name,"'"))}if(e.repeated){if(!Array.isArray(i)){throw new TypeError("Parameter 'objProp' should be type of Array.")}var s=Array.from(i,(function(e){return a.toASN(e)}));var c=e.repeated==="sequence"?Sequence:Set;o=new c({value:s})}else{o=a.toASN(i)}}else{if(e.repeated){if(!Array.isArray(i)){throw new TypeError("Parameter 'objProp' should be type of Array.")}var s=Array.from(i,(function(e){return n.toASN(e)}));var c=e.repeated==="sequence"?Sequence:Set;o=new c({value:s})}else{o=this.toASN(i)}}return o};return e}();var AsnArray=function(e){__extends(t,e);function t(t){if(t===void 0){t=[]}var r=this;if(typeof t==="number"){r=e.call(this,t)||this}else{r=e.call(this)||this;for(var i=0,n=t;i<n.length;i++){var o=n[i];r.push(o)}}return r}return t}(Array);var AsnConvert=function(){function e(){}e.serialize=function(e){return AsnSerializer.serialize(e)};e.parse=function(e,t){return AsnParser.parse(e,t)};e.toString=function(t){var r=buildExports.BufferSourceConverter.isBufferSource(t)?buildExports.BufferSourceConverter.toArrayBuffer(t):e.serialize(t);var i=fromBER(r);if(i.offset===-1){throw new Error("Cannot decode ASN.1 data. ".concat(i.result.error))}return i.result.toString()};return e}();function __decorate$1(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(n<3?a(o):n>3?a(t,r,o):a(t,r))||o;return n>3&&o&&Object.defineProperty(t,r,o),o}typeof SuppressedError==="function"?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};var IpConverter=function(){function e(){}e.isIPv4=function(e){return/^(\d{1,3}\.){3}\d{1,3}$/.test(e)};e.parseIPv4=function(e){var t=e.split(".");if(t.length!==4){throw new Error("Invalid IPv4 address")}return t.map((function(e){var t=parseInt(e,10);if(isNaN(t)||t<0||t>255){throw new Error("Invalid IPv4 address part")}return t}))};e.parseIPv6=function(e){var t=this.expandIPv6(e);var r=t.split(":");if(r.length!==8){throw new Error("Invalid IPv6 address")}return r.reduce((function(e,t){var r=parseInt(t,16);if(isNaN(r)||r<0||r>65535){throw new Error("Invalid IPv6 address part")}e.push(r>>8&255);e.push(r&255);return e}),[])};e.expandIPv6=function(e){if(!e.includes("::")){return e}var t=e.split("::");if(t.length>2){throw new Error("Invalid IPv6 address")}var r=t[0]?t[0].split(":"):[];var i=t[1]?t[1].split(":"):[];var n=8-(r.length+i.length);if(n<0){throw new Error("Invalid IPv6 address")}return __spreadArray(__spreadArray(__spreadArray([],r,true),Array(n).fill("0"),true),i,true).join(":")};e.formatIPv6=function(e){var t=[];for(var r=0;r<16;r+=2){t.push((e[r]<<8|e[r+1]).toString(16))}return this.compressIPv6(t.join(":"))};e.compressIPv6=function(e){var t=e.split(":");var r=-1;var i=0;var n=-1;var o=0;for(var a=0;a<t.length;a++){if(t[a]==="0"){if(n===-1){n=a}o++}else{if(o>i){r=n;i=o}n=-1;o=0}}if(o>i){r=n;i=o}if(i>1){var s=t.slice(0,r).join(":");var c=t.slice(r+i).join(":");return"".concat(s,"::").concat(c)}return e};e.parseCIDR=function(e){var t=e.split("/"),r=t[0],i=t[1];var n=parseInt(i,10);if(this.isIPv4(r)){if(n<0||n>32){throw new Error("Invalid IPv4 prefix length")}return[this.parseIPv4(r),n]}else{if(n<0||n>128){throw new Error("Invalid IPv6 prefix length")}return[this.parseIPv6(r),n]}};e.decodeIP=function(e){if(e.length===64&&parseInt(e,16)===0){return"::/0"}if(e.length!==16){return e}var t=parseInt(e.slice(8),16).toString(2).split("").reduce((function(e,t){return e+ +t}),0);var r=e.slice(0,8).replace(/(.{2})/g,(function(e){return"".concat(parseInt(e,16),".")}));r=r.slice(0,-1);return"".concat(r,"/").concat(t)};e.toString=function(e){var t=new Uint8Array(e);if(t.length===4){return Array.from(t).join(".")}if(t.length===16){return this.formatIPv6(t)}if(t.length===8||t.length===32){var r=t.length/2;var i=t.slice(0,r);var n=t.slice(r);var o=t.every((function(e){return e===0}));if(o){return t.length===8?"0.0.0.0/0":"::/0"}var a=n.reduce((function(e,t){return e+(t.toString(2).match(/1/g)||[]).length}),0);if(t.length===8){var s=Array.from(i).join(".");return"".concat(s,"/").concat(a)}else{var s=this.formatIPv6(i);return"".concat(s,"/").concat(a)}}return this.decodeIP(buildExports.Convert.ToHex(e))};e.fromString=function(e){if(e.includes("/")){var t=this.parseCIDR(e),r=t[0],i=t[1];var n=new Uint8Array(r.length);var o=i;for(var a=0;a<n.length;a++){if(o>=8){n[a]=255;o-=8}else if(o>0){n[a]=255<<8-o;o=0}}var s=new Uint8Array(r.length*2);s.set(r,0);s.set(n,r.length);return s.buffer}var c=this.isIPv4(e)?this.parseIPv4(e):this.parseIPv6(e);return new Uint8Array(c).buffer};return e}();var RelativeDistinguishedName_1,RDNSequence_1,Name_1;var DirectoryString=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""};return e}();__decorate$1([AsnProp({type:AsnPropTypes.TeletexString})],DirectoryString.prototype,"teletexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],DirectoryString.prototype,"printableString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.UniversalString})],DirectoryString.prototype,"universalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],DirectoryString.prototype,"utf8String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],DirectoryString.prototype,"bmpString",void 0);DirectoryString=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DirectoryString);var AttributeValue=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}var r=e.call(this,t)||this;Object.assign(r,t);return r}t.prototype.toString=function(){return this.ia5String||(this.anyValue?buildExports.Convert.ToHex(this.anyValue):e.prototype.toString.call(this))};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],AttributeValue.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],AttributeValue.prototype,"anyValue",void 0);AttributeValue=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttributeValue);var AttributeTypeAndValue=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new AttributeValue;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AttributeTypeAndValue.prototype,"type",void 0);__decorate$1([AsnProp({type:AttributeValue})],AttributeTypeAndValue.prototype,"value",void 0);var RelativeDistinguishedName=RelativeDistinguishedName_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RelativeDistinguishedName_1.prototype);return r}return t}(AsnArray);RelativeDistinguishedName=RelativeDistinguishedName_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:AttributeTypeAndValue})],RelativeDistinguishedName);var RDNSequence=RDNSequence_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RDNSequence_1.prototype);return r}return t}(AsnArray);RDNSequence=RDNSequence_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RelativeDistinguishedName})],RDNSequence);var Name$1=Name_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name_1.prototype);return r}return t}(RDNSequence);Name$1=Name_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Name$1);var AsnIpConverter={fromASN:function(e){return IpConverter.toString(AsnOctetStringConverter.fromASN(e))},toASN:function(e){return AsnOctetStringConverter.toASN(IpConverter.fromString(e))}};var OtherName=function(){function e(e){if(e===void 0){e={}}this.typeId="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherName.prototype,"typeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],OtherName.prototype,"value",void 0);var EDIPartyName=function(){function e(e){if(e===void 0){e={}}this.partyName=new DirectoryString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DirectoryString,optional:true,context:0,implicit:true})],EDIPartyName.prototype,"nameAssigner",void 0);__decorate$1([AsnProp({type:DirectoryString,context:1,implicit:true})],EDIPartyName.prototype,"partyName",void 0);var GeneralName=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherName,context:0,implicit:true})],GeneralName.prototype,"otherName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:1,implicit:true})],GeneralName.prototype,"rfc822Name",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:2,implicit:true})],GeneralName.prototype,"dNSName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:3,implicit:true})],GeneralName.prototype,"x400Address",void 0);__decorate$1([AsnProp({type:Name$1,context:4,implicit:false})],GeneralName.prototype,"directoryName",void 0);__decorate$1([AsnProp({type:EDIPartyName,context:5})],GeneralName.prototype,"ediPartyName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:6,implicit:true})],GeneralName.prototype,"uniformResourceIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString,context:7,implicit:true,converter:AsnIpConverter})],GeneralName.prototype,"iPAddress",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,context:8,implicit:true})],GeneralName.prototype,"registeredID",void 0);GeneralName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],GeneralName);var id_pkix$1="1.3.6.1.5.5.7";var id_pe$1="".concat(id_pkix$1,".1");var id_ce="2.5.29";var AuthorityInfoAccessSyntax_1;var id_pe_authorityInfoAccess="".concat(id_pe$1,".1");var AccessDescription=function(){function e(e){if(e===void 0){e={}}this.accessMethod="";this.accessLocation=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AccessDescription.prototype,"accessMethod",void 0);__decorate$1([AsnProp({type:GeneralName})],AccessDescription.prototype,"accessLocation",void 0);var AuthorityInfoAccessSyntax=AuthorityInfoAccessSyntax_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AuthorityInfoAccessSyntax_1.prototype);return r}return t}(AsnArray);AuthorityInfoAccessSyntax=AuthorityInfoAccessSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AccessDescription})],AuthorityInfoAccessSyntax);var id_ce_authorityKeyIdentifier="".concat(id_ce,".35");var KeyIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var AuthorityKeyIdentifier=function(){function e(e){if(e===void 0){e={}}if(e){Object.assign(this,e)}}return e}();__decorate$1([AsnProp({type:KeyIdentifier,context:0,optional:true,implicit:true})],AuthorityKeyIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,optional:true,implicit:true,repeated:"sequence"})],AuthorityKeyIdentifier.prototype,"authorityCertIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,optional:true,implicit:true,converter:AsnIntegerArrayBufferConverter})],AuthorityKeyIdentifier.prototype,"authorityCertSerialNumber",void 0);var id_ce_basicConstraints="".concat(id_ce,".19");var BasicConstraints=function(){function e(e){if(e===void 0){e={}}this.cA=false;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:false})],BasicConstraints.prototype,"cA",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],BasicConstraints.prototype,"pathLenConstraint",void 0);var GeneralNames_1;var GeneralNames=GeneralNames_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,GeneralNames_1.prototype);return r}return t}(AsnArray);GeneralNames=GeneralNames_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralName})],GeneralNames);var CertificateIssuer_1;var id_ce_certificateIssuer="".concat(id_ce,".29");var CertificateIssuer=CertificateIssuer_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificateIssuer_1.prototype);return r}return t}(GeneralNames);CertificateIssuer=CertificateIssuer_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertificateIssuer);var CertificatePolicies_1;var id_ce_certificatePolicies="".concat(id_ce,".32");var DisplayText=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],DisplayText.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],DisplayText.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],DisplayText.prototype,"bmpString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],DisplayText.prototype,"utf8String",void 0);DisplayText=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DisplayText);var NoticeReference=function(){function e(e){if(e===void 0){e={}}this.organization=new DisplayText;this.noticeNumbers=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DisplayText})],NoticeReference.prototype,"organization",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,repeated:"sequence"})],NoticeReference.prototype,"noticeNumbers",void 0);var UserNotice=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:NoticeReference,optional:true})],UserNotice.prototype,"noticeRef",void 0);__decorate$1([AsnProp({type:DisplayText,optional:true})],UserNotice.prototype,"explicitText",void 0);var Qualifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],Qualifier.prototype,"cPSuri",void 0);__decorate$1([AsnProp({type:UserNotice})],Qualifier.prototype,"userNotice",void 0);Qualifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Qualifier);var PolicyQualifierInfo=function(){function e(e){if(e===void 0){e={}}this.policyQualifierId="";this.qualifier=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyQualifierInfo.prototype,"policyQualifierId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],PolicyQualifierInfo.prototype,"qualifier",void 0);var PolicyInformation=function(){function e(e){if(e===void 0){e={}}this.policyIdentifier="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyInformation.prototype,"policyIdentifier",void 0);__decorate$1([AsnProp({type:PolicyQualifierInfo,repeated:"sequence",optional:true})],PolicyInformation.prototype,"policyQualifiers",void 0);var CertificatePolicies=CertificatePolicies_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificatePolicies_1.prototype);return r}return t}(AsnArray);CertificatePolicies=CertificatePolicies_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PolicyInformation})],CertificatePolicies);var id_ce_cRLNumber="".concat(id_ce,".20");var CRLNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CRLNumber.prototype,"value",void 0);CRLNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CRLNumber);var id_ce_deltaCRLIndicator="".concat(id_ce,".27");var BaseCRLNumber=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CRLNumber);BaseCRLNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],BaseCRLNumber);var CRLDistributionPoints_1;var id_ce_cRLDistributionPoints="".concat(id_ce,".31");var ReasonFlags;(function(e){e[e["unused"]=1]="unused";e[e["keyCompromise"]=2]="keyCompromise";e[e["cACompromise"]=4]="cACompromise";e[e["affiliationChanged"]=8]="affiliationChanged";e[e["superseded"]=16]="superseded";e[e["cessationOfOperation"]=32]="cessationOfOperation";e[e["certificateHold"]=64]="certificateHold";e[e["privilegeWithdrawn"]=128]="privilegeWithdrawn";e[e["aACompromise"]=256]="aACompromise"})(ReasonFlags||(ReasonFlags={}));var Reason=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=[];var t=this.toNumber();if(t&ReasonFlags.aACompromise){e.push("aACompromise")}if(t&ReasonFlags.affiliationChanged){e.push("affiliationChanged")}if(t&ReasonFlags.cACompromise){e.push("cACompromise")}if(t&ReasonFlags.certificateHold){e.push("certificateHold")}if(t&ReasonFlags.cessationOfOperation){e.push("cessationOfOperation")}if(t&ReasonFlags.keyCompromise){e.push("keyCompromise")}if(t&ReasonFlags.privilegeWithdrawn){e.push("privilegeWithdrawn")}if(t&ReasonFlags.superseded){e.push("superseded")}if(t&ReasonFlags.unused){e.push("unused")}return e};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var DistributionPointName=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,repeated:"sequence",implicit:true})],DistributionPointName.prototype,"fullName",void 0);__decorate$1([AsnProp({type:RelativeDistinguishedName,context:1,implicit:true})],DistributionPointName.prototype,"nameRelativeToCRLIssuer",void 0);DistributionPointName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DistributionPointName);var DistributionPoint=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DistributionPointName,context:0,optional:true})],DistributionPoint.prototype,"distributionPoint",void 0);__decorate$1([AsnProp({type:Reason,context:1,optional:true,implicit:true})],DistributionPoint.prototype,"reasons",void 0);__decorate$1([AsnProp({type:GeneralName,context:2,optional:true,repeated:"sequence",implicit:true})],DistributionPoint.prototype,"cRLIssuer",void 0);var CRLDistributionPoints=CRLDistributionPoints_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CRLDistributionPoints_1.prototype);return r}return t}(AsnArray);CRLDistributionPoints=CRLDistributionPoints_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:DistributionPoint})],CRLDistributionPoints);var FreshestCRL_1;var FreshestCRL=FreshestCRL_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,FreshestCRL_1.prototype);return r}return t}(CRLDistributionPoints);FreshestCRL=FreshestCRL_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:DistributionPoint})],FreshestCRL);var id_ce_issuingDistributionPoint="".concat(id_ce,".28");var IssuingDistributionPoint=function(){function e(t){if(t===void 0){t={}}this.onlyContainsUserCerts=e.ONLY;this.onlyContainsCACerts=e.ONLY;this.indirectCRL=e.ONLY;this.onlyContainsAttributeCerts=e.ONLY;Object.assign(this,t)}return e}();IssuingDistributionPoint.ONLY=false;__decorate$1([AsnProp({type:DistributionPointName,context:0,optional:true})],IssuingDistributionPoint.prototype,"distributionPoint",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:1,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsUserCerts",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:2,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsCACerts",void 0);__decorate$1([AsnProp({type:Reason,context:3,optional:true,implicit:true})],IssuingDistributionPoint.prototype,"onlySomeReasons",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:4,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"indirectCRL",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,context:5,defaultValue:IssuingDistributionPoint.ONLY,implicit:true})],IssuingDistributionPoint.prototype,"onlyContainsAttributeCerts",void 0);var id_ce_cRLReasons="".concat(id_ce,".21");var CRLReasons;(function(e){e[e["unspecified"]=0]="unspecified";e[e["keyCompromise"]=1]="keyCompromise";e[e["cACompromise"]=2]="cACompromise";e[e["affiliationChanged"]=3]="affiliationChanged";e[e["superseded"]=4]="superseded";e[e["cessationOfOperation"]=5]="cessationOfOperation";e[e["certificateHold"]=6]="certificateHold";e[e["removeFromCRL"]=8]="removeFromCRL";e[e["privilegeWithdrawn"]=9]="privilegeWithdrawn";e[e["aACompromise"]=10]="aACompromise"})(CRLReasons||(CRLReasons={}));var CRLReason=function(){function e(e){if(e===void 0){e=CRLReasons.unspecified}this.reason=CRLReasons.unspecified;this.reason=e}e.prototype.toJSON=function(){return CRLReasons[this.reason]};e.prototype.toString=function(){return this.toJSON()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],CRLReason.prototype,"reason",void 0);CRLReason=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CRLReason);var ExtendedKeyUsage_1;var id_ce_extKeyUsage="".concat(id_ce,".37");var ExtendedKeyUsage=ExtendedKeyUsage_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtendedKeyUsage_1.prototype);return r}return t}(AsnArray);ExtendedKeyUsage=ExtendedKeyUsage_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],ExtendedKeyUsage);var id_ce_inhibitAnyPolicy="".concat(id_ce,".54");var InhibitAnyPolicy=function(){function e(e){if(e===void 0){e=new ArrayBuffer(0)}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],InhibitAnyPolicy.prototype,"value",void 0);InhibitAnyPolicy=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],InhibitAnyPolicy);var id_ce_invalidityDate="".concat(id_ce,".24");var InvalidityDate=function(){function e(e){this.value=new Date;if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],InvalidityDate.prototype,"value",void 0);InvalidityDate=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],InvalidityDate);var IssueAlternativeName_1;var id_ce_issuerAltName="".concat(id_ce,".18");var IssueAlternativeName=IssueAlternativeName_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,IssueAlternativeName_1.prototype);return r}return t}(GeneralNames);IssueAlternativeName=IssueAlternativeName_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],IssueAlternativeName);var id_ce_keyUsage="".concat(id_ce,".15");var KeyUsageFlags;(function(e){e[e["digitalSignature"]=1]="digitalSignature";e[e["nonRepudiation"]=2]="nonRepudiation";e[e["keyEncipherment"]=4]="keyEncipherment";e[e["dataEncipherment"]=8]="dataEncipherment";e[e["keyAgreement"]=16]="keyAgreement";e[e["keyCertSign"]=32]="keyCertSign";e[e["cRLSign"]=64]="cRLSign";e[e["encipherOnly"]=128]="encipherOnly";e[e["decipherOnly"]=256]="decipherOnly"})(KeyUsageFlags||(KeyUsageFlags={}));var KeyUsage=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=this.toNumber();var t=[];if(e&KeyUsageFlags.cRLSign){t.push("crlSign")}if(e&KeyUsageFlags.dataEncipherment){t.push("dataEncipherment")}if(e&KeyUsageFlags.decipherOnly){t.push("decipherOnly")}if(e&KeyUsageFlags.digitalSignature){t.push("digitalSignature")}if(e&KeyUsageFlags.encipherOnly){t.push("encipherOnly")}if(e&KeyUsageFlags.keyAgreement){t.push("keyAgreement")}if(e&KeyUsageFlags.keyCertSign){t.push("keyCertSign")}if(e&KeyUsageFlags.keyEncipherment){t.push("keyEncipherment")}if(e&KeyUsageFlags.nonRepudiation){t.push("nonRepudiation")}return t};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var GeneralSubtrees_1;var id_ce_nameConstraints="".concat(id_ce,".30");var GeneralSubtree=function(){function e(e){if(e===void 0){e={}}this.base=new GeneralName;this.minimum=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],GeneralSubtree.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,defaultValue:0,implicit:true})],GeneralSubtree.prototype,"minimum",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,optional:true,implicit:true})],GeneralSubtree.prototype,"maximum",void 0);var GeneralSubtrees=GeneralSubtrees_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,GeneralSubtrees_1.prototype);return r}return t}(AsnArray);GeneralSubtrees=GeneralSubtrees_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralSubtree})],GeneralSubtrees);var NameConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralSubtrees,context:0,optional:true,implicit:true})],NameConstraints.prototype,"permittedSubtrees",void 0);__decorate$1([AsnProp({type:GeneralSubtrees,context:1,optional:true,implicit:true})],NameConstraints.prototype,"excludedSubtrees",void 0);var id_ce_policyConstraints="".concat(id_ce,".36");var PolicyConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,implicit:true,optional:true,converter:AsnIntegerArrayBufferConverter})],PolicyConstraints.prototype,"requireExplicitPolicy",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,implicit:true,optional:true,converter:AsnIntegerArrayBufferConverter})],PolicyConstraints.prototype,"inhibitPolicyMapping",void 0);var PolicyMappings_1;var id_ce_policyMappings="".concat(id_ce,".33");var PolicyMapping=function(){function e(e){if(e===void 0){e={}}this.issuerDomainPolicy="";this.subjectDomainPolicy="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyMapping.prototype,"issuerDomainPolicy",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PolicyMapping.prototype,"subjectDomainPolicy",void 0);var PolicyMappings=PolicyMappings_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,PolicyMappings_1.prototype);return r}return t}(AsnArray);PolicyMappings=PolicyMappings_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PolicyMapping})],PolicyMappings);var SubjectAlternativeName_1;var id_ce_subjectAltName="".concat(id_ce,".17");var SubjectAlternativeName=SubjectAlternativeName_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SubjectAlternativeName_1.prototype);return r}return t}(GeneralNames);SubjectAlternativeName=SubjectAlternativeName_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SubjectAlternativeName);var Attribute$1=function(){function e(e){if(e===void 0){e={}}this.type="";this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute$1.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute$1.prototype,"values",void 0);var SubjectDirectoryAttributes_1;var id_ce_subjectDirectoryAttributes="".concat(id_ce,".9");var SubjectDirectoryAttributes=SubjectDirectoryAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SubjectDirectoryAttributes_1.prototype);return r}return t}(AsnArray);SubjectDirectoryAttributes=SubjectDirectoryAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],SubjectDirectoryAttributes);var id_ce_subjectKeyIdentifier="".concat(id_ce,".14");var SubjectKeyIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(KeyIdentifier);var id_ce_privateKeyUsagePeriod="".concat(id_ce,".16");var PrivateKeyUsagePeriod=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,context:0,implicit:true,optional:true})],PrivateKeyUsagePeriod.prototype,"notBefore",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,context:1,implicit:true,optional:true})],PrivateKeyUsagePeriod.prototype,"notAfter",void 0);var id_entrust_entrustVersInfo="1.2.840.113533.7.65.0";var EntrustInfoFlags;(function(e){e[e["keyUpdateAllowed"]=1]="keyUpdateAllowed";e[e["newExtensions"]=2]="newExtensions";e[e["pKIXCertificate"]=4]="pKIXCertificate"})(EntrustInfoFlags||(EntrustInfoFlags={}));var EntrustInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=[];var t=this.toNumber();if(t&EntrustInfoFlags.pKIXCertificate){e.push("pKIXCertificate")}if(t&EntrustInfoFlags.newExtensions){e.push("newExtensions")}if(t&EntrustInfoFlags.keyUpdateAllowed){e.push("keyUpdateAllowed")}return e};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var EntrustVersionInfo=function(){function e(e){if(e===void 0){e={}}this.entrustVers="";this.entrustInfoFlags=new EntrustInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralString})],EntrustVersionInfo.prototype,"entrustVers",void 0);__decorate$1([AsnProp({type:EntrustInfo})],EntrustVersionInfo.prototype,"entrustInfoFlags",void 0);var SubjectInfoAccessSyntax_1;var id_pe_subjectInfoAccess="".concat(id_pe$1,".11");var SubjectInfoAccessSyntax=SubjectInfoAccessSyntax_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SubjectInfoAccessSyntax_1.prototype);return r}return t}(AsnArray);SubjectInfoAccessSyntax=SubjectInfoAccessSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AccessDescription})],SubjectInfoAccessSyntax);var AlgorithmIdentifier=function(){function e(e){if(e===void 0){e={}}this.algorithm="";Object.assign(this,e)}e.prototype.isEqual=function(t){return t instanceof e&&t.algorithm==this.algorithm&&(t.parameters&&this.parameters&&buildExports.isEqual(t.parameters,this.parameters)||t.parameters===this.parameters)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],AlgorithmIdentifier.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],AlgorithmIdentifier.prototype,"parameters",void 0);var SubjectPublicKeyInfo=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.subjectPublicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],SubjectPublicKeyInfo.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],SubjectPublicKeyInfo.prototype,"subjectPublicKey",void 0);var Time=function(){function e(e){if(e){if(typeof e==="string"||typeof e==="number"||e instanceof Date){var t=new Date(e);if(t.getUTCFullYear()>2049){this.generalTime=t}else{this.utcTime=t}}else{Object.assign(this,e)}}}e.prototype.getTime=function(){var e=this.utcTime||this.generalTime;if(!e){throw new Error("Cannot get time from CHOICE object")}return e};return e}();__decorate$1([AsnProp({type:AsnPropTypes.UTCTime})],Time.prototype,"utcTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],Time.prototype,"generalTime",void 0);Time=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Time);var Validity=function(){function e(e){this.notBefore=new Time(new Date);this.notAfter=new Time(new Date);if(e){this.notBefore=new Time(e.notBefore);this.notAfter=new Time(e.notAfter)}}return e}();__decorate$1([AsnProp({type:Time})],Validity.prototype,"notBefore",void 0);__decorate$1([AsnProp({type:Time})],Validity.prototype,"notAfter",void 0);var Extensions_1;var Extension$1=function(){function e(t){if(t===void 0){t={}}this.extnID="";this.critical=e.CRITICAL;this.extnValue=new OctetString;Object.assign(this,t)}return e}();Extension$1.CRITICAL=false;__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Extension$1.prototype,"extnID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:Extension$1.CRITICAL})],Extension$1.prototype,"critical",void 0);__decorate$1([AsnProp({type:OctetString})],Extension$1.prototype,"extnValue",void 0);var Extensions=Extensions_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Extensions_1.prototype);return r}return t}(AsnArray);Extensions=Extensions_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Extension$1})],Extensions);var Version$4;(function(e){e[e["v1"]=0]="v1";e[e["v2"]=1]="v2";e[e["v3"]=2]="v3"})(Version$4||(Version$4={}));var TBSCertificate=function(){function e(e){if(e===void 0){e={}}this.version=Version$4.v1;this.serialNumber=new ArrayBuffer(0);this.signature=new AlgorithmIdentifier;this.issuer=new Name$1;this.validity=new Validity;this.subject=new Name$1;this.subjectPublicKeyInfo=new SubjectPublicKeyInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,defaultValue:Version$4.v1})],TBSCertificate.prototype,"version",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],TBSCertificate.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],TBSCertificate.prototype,"signature",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertificate.prototype,"issuer",void 0);__decorate$1([AsnProp({type:Validity})],TBSCertificate.prototype,"validity",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertificate.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],TBSCertificate.prototype,"subjectPublicKeyInfo",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,implicit:true,optional:true})],TBSCertificate.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:2,implicit:true,optional:true})],TBSCertificate.prototype,"subjectUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,context:3,optional:true})],TBSCertificate.prototype,"extensions",void 0);var Certificate=function(){function e(e){if(e===void 0){e={}}this.tbsCertificate=new TBSCertificate;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TBSCertificate})],Certificate.prototype,"tbsCertificate",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],Certificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],Certificate.prototype,"signatureValue",void 0);var RevokedCertificate=function(){function e(e){if(e===void 0){e={}}this.userCertificate=new ArrayBuffer(0);this.revocationDate=new Time;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RevokedCertificate.prototype,"userCertificate",void 0);__decorate$1([AsnProp({type:Time})],RevokedCertificate.prototype,"revocationDate",void 0);__decorate$1([AsnProp({type:Extension$1,optional:true,repeated:"sequence"})],RevokedCertificate.prototype,"crlEntryExtensions",void 0);var TBSCertList=function(){function e(e){if(e===void 0){e={}}this.signature=new AlgorithmIdentifier;this.issuer=new Name$1;this.thisUpdate=new Time;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],TBSCertList.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],TBSCertList.prototype,"signature",void 0);__decorate$1([AsnProp({type:Name$1})],TBSCertList.prototype,"issuer",void 0);__decorate$1([AsnProp({type:Time})],TBSCertList.prototype,"thisUpdate",void 0);__decorate$1([AsnProp({type:Time,optional:true})],TBSCertList.prototype,"nextUpdate",void 0);__decorate$1([AsnProp({type:RevokedCertificate,repeated:"sequence",optional:true})],TBSCertList.prototype,"revokedCertificates",void 0);__decorate$1([AsnProp({type:Extension$1,optional:true,context:0,repeated:"sequence"})],TBSCertList.prototype,"crlExtensions",void 0);var CertificateList=function(){function e(e){if(e===void 0){e={}}this.tbsCertList=new TBSCertList;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TBSCertList})],CertificateList.prototype,"tbsCertList",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificateList.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificateList.prototype,"signature",void 0);var id_ecPublicKey="1.2.840.10045.2.1";var id_ecdsaWithSHA1="1.2.840.10045.4.1";var id_ecdsaWithSHA224="1.2.840.10045.4.3.1";var id_ecdsaWithSHA256="1.2.840.10045.4.3.2";var id_ecdsaWithSHA384="1.2.840.10045.4.3.3";var id_ecdsaWithSHA512="1.2.840.10045.4.3.4";function create$1(e){return new AlgorithmIdentifier({algorithm:e})}create$1(id_ecdsaWithSHA1);create$1(id_ecdsaWithSHA224);create$1(id_ecdsaWithSHA256);create$1(id_ecdsaWithSHA384);create$1(id_ecdsaWithSHA512);var FieldID=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],FieldID.prototype,"fieldType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],FieldID.prototype,"parameters",void 0);FieldID=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],FieldID);var ECPoint=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var Curve=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],Curve.prototype,"a",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],Curve.prototype,"b",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],Curve.prototype,"seed",void 0);Curve=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Curve);var ECPVer;(function(e){e[e["ecpVer1"]=1]="ecpVer1"})(ECPVer||(ECPVer={}));var SpecifiedECDomain=function(){function e(e){if(e===void 0){e={}}this.version=ECPVer.ecpVer1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SpecifiedECDomain.prototype,"version",void 0);__decorate$1([AsnProp({type:FieldID})],SpecifiedECDomain.prototype,"fieldID",void 0);__decorate$1([AsnProp({type:Curve})],SpecifiedECDomain.prototype,"curve",void 0);__decorate$1([AsnProp({type:ECPoint})],SpecifiedECDomain.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],SpecifiedECDomain.prototype,"order",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],SpecifiedECDomain.prototype,"cofactor",void 0);SpecifiedECDomain=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SpecifiedECDomain);var ECParameters=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ECParameters.prototype,"namedCurve",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Null})],ECParameters.prototype,"implicitCurve",void 0);__decorate$1([AsnProp({type:SpecifiedECDomain})],ECParameters.prototype,"specifiedCurve",void 0);ECParameters=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ECParameters);var ECPrivateKey=function(){function e(e){if(e===void 0){e={}}this.version=1;this.privateKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ECPrivateKey.prototype,"version",void 0);__decorate$1([AsnProp({type:OctetString})],ECPrivateKey.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:ECParameters,context:0,optional:true})],ECPrivateKey.prototype,"parameters",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,optional:true})],ECPrivateKey.prototype,"publicKey",void 0);var ECDSASigValue=function(){function e(e){if(e===void 0){e={}}this.r=new ArrayBuffer(0);this.s=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],ECDSASigValue.prototype,"r",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],ECDSASigValue.prototype,"s",void 0);var id_pkcs_1="1.2.840.113549.1.1";var id_rsaEncryption="".concat(id_pkcs_1,".1");var id_RSAES_OAEP="".concat(id_pkcs_1,".7");var id_pSpecified="".concat(id_pkcs_1,".9");var id_RSASSA_PSS="".concat(id_pkcs_1,".10");var id_md2WithRSAEncryption="".concat(id_pkcs_1,".2");var id_md5WithRSAEncryption="".concat(id_pkcs_1,".4");var id_sha1WithRSAEncryption="".concat(id_pkcs_1,".5");var id_sha384WithRSAEncryption="".concat(id_pkcs_1,".12");var id_sha512WithRSAEncryption="".concat(id_pkcs_1,".13");var id_sha512_224WithRSAEncryption="".concat(id_pkcs_1,".15");var id_sha512_256WithRSAEncryption="".concat(id_pkcs_1,".16");var id_sha1="1.3.14.3.2.26";var id_sha224="2.16.840.1.101.3.4.2.4";var id_sha256="2.16.840.1.101.3.4.2.1";var id_sha384="2.16.840.1.101.3.4.2.2";var id_sha512="2.16.840.1.101.3.4.2.3";var id_sha512_224="2.16.840.1.101.3.4.2.5";var id_sha512_256="2.16.840.1.101.3.4.2.6";var id_md2="1.2.840.113549.2.2";var id_md5="1.2.840.113549.2.5";var id_mgf1="".concat(id_pkcs_1,".8");function create(e){return new AlgorithmIdentifier({algorithm:e,parameters:null})}create(id_md2);create(id_md5);var sha1=create(id_sha1);create(id_sha224);create(id_sha256);create(id_sha384);create(id_sha512);create(id_sha512_224);create(id_sha512_256);var mgf1SHA1=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});var pSpecifiedEmpty=new AlgorithmIdentifier({algorithm:id_pSpecified,parameters:AsnConvert.serialize(AsnOctetStringConverter.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});create(id_rsaEncryption);create(id_md2WithRSAEncryption);create(id_md5WithRSAEncryption);create(id_sha1WithRSAEncryption);create(id_sha512_224WithRSAEncryption);create(id_sha512_256WithRSAEncryption);create(id_sha384WithRSAEncryption);create(id_sha512WithRSAEncryption);create(id_sha512_224WithRSAEncryption);create(id_sha512_256WithRSAEncryption);var RsaEsOaepParams=function(){function e(e){if(e===void 0){e={}}this.hashAlgorithm=new AlgorithmIdentifier(sha1);this.maskGenAlgorithm=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});this.pSourceAlgorithm=new AlgorithmIdentifier(pSpecifiedEmpty);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier,context:0,defaultValue:sha1})],RsaEsOaepParams.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:1,defaultValue:mgf1SHA1})],RsaEsOaepParams.prototype,"maskGenAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:2,defaultValue:pSpecifiedEmpty})],RsaEsOaepParams.prototype,"pSourceAlgorithm",void 0);new AlgorithmIdentifier({algorithm:id_RSAES_OAEP,parameters:AsnConvert.serialize(new RsaEsOaepParams)});var RsaSaPssParams=function(){function e(e){if(e===void 0){e={}}this.hashAlgorithm=new AlgorithmIdentifier(sha1);this.maskGenAlgorithm=new AlgorithmIdentifier({algorithm:id_mgf1,parameters:AsnConvert.serialize(sha1)});this.saltLength=20;this.trailerField=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier,context:0,defaultValue:sha1})],RsaSaPssParams.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier,context:1,defaultValue:mgf1SHA1})],RsaSaPssParams.prototype,"maskGenAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,defaultValue:20})],RsaSaPssParams.prototype,"saltLength",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:3,defaultValue:1})],RsaSaPssParams.prototype,"trailerField",void 0);new AlgorithmIdentifier({algorithm:id_RSASSA_PSS,parameters:AsnConvert.serialize(new RsaSaPssParams)});var DigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestAlgorithm=new AlgorithmIdentifier;this.digest=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],DigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],DigestInfo.prototype,"digest",void 0);var OtherPrimeInfos_1;var OtherPrimeInfo=function(){function e(e){if(e===void 0){e={}}this.prime=new ArrayBuffer(0);this.exponent=new ArrayBuffer(0);this.coefficient=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"prime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"exponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],OtherPrimeInfo.prototype,"coefficient",void 0);var OtherPrimeInfos=OtherPrimeInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,OtherPrimeInfos_1.prototype);return r}return t}(AsnArray);OtherPrimeInfos=OtherPrimeInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OtherPrimeInfo})],OtherPrimeInfos);var RSAPrivateKey=function(){function e(e){if(e===void 0){e={}}this.version=0;this.modulus=new ArrayBuffer(0);this.publicExponent=new ArrayBuffer(0);this.privateExponent=new ArrayBuffer(0);this.prime1=new ArrayBuffer(0);this.prime2=new ArrayBuffer(0);this.exponent1=new ArrayBuffer(0);this.exponent2=new ArrayBuffer(0);this.coefficient=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],RSAPrivateKey.prototype,"version",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"modulus",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"publicExponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"privateExponent",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"prime1",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"prime2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"exponent1",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"exponent2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPrivateKey.prototype,"coefficient",void 0);__decorate$1([AsnProp({type:OtherPrimeInfos,optional:true})],RSAPrivateKey.prototype,"otherPrimeInfos",void 0);var RSAPublicKey=function(){function e(e){if(e===void 0){e={}}this.modulus=new ArrayBuffer(0);this.publicExponent=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPublicKey.prototype,"modulus",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],RSAPublicKey.prototype,"publicExponent",void 0);var CompositeParams_1,CompositeSignatureValue_1;var id_alg_composite="1.3.6.1.4.1.18227.2.1";var CompositeParams=CompositeParams_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CompositeParams_1.prototype);return r}return t}(AsnArray);CompositeParams=CompositeParams_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AlgorithmIdentifier})],CompositeParams);var CompositeSignatureValue=CompositeSignatureValue_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CompositeSignatureValue_1.prototype);return r}return t}(AsnArray);CompositeSignatureValue=CompositeSignatureValue_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.BitString})],CompositeSignatureValue);var EncryptedData=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var EncryptedPrivateKeyInfo$1=function(){function e(e){if(e===void 0){e={}}this.encryptionAlgorithm=new AlgorithmIdentifier;this.encryptedData=new EncryptedData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],EncryptedPrivateKeyInfo$1.prototype,"encryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedData})],EncryptedPrivateKeyInfo$1.prototype,"encryptedData",void 0);var Attributes_1$1;var Version$3;(function(e){e[e["v1"]=0]="v1"})(Version$3||(Version$3={}));var PrivateKey=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OctetString);var Attributes$1=Attributes_1$1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Attributes_1$1.prototype);return r}return t}(AsnArray);Attributes$1=Attributes_1$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes$1);var PrivateKeyInfo$1=function(){function e(e){if(e===void 0){e={}}this.version=Version$3.v1;this.privateKeyAlgorithm=new AlgorithmIdentifier;this.privateKey=new PrivateKey;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PrivateKeyInfo$1.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],PrivateKeyInfo$1.prototype,"privateKeyAlgorithm",void 0);__decorate$1([AsnProp({type:PrivateKey})],PrivateKeyInfo$1.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:Attributes$1,implicit:true,context:0,optional:true})],PrivateKeyInfo$1.prototype,"attributes",void 0);var AsymmetricKeyPackage_1;var Version$2;(function(e){e[e["v1"]=0]="v1";e[e["v2"]=1]="v2"})(Version$2||(Version$2={}));var PrivateKeyAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);PrivateKeyAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyAlgorithmIdentifier);var OneAsymmetricKey=function(){function e(){this.version=Version$2.v1;this.privateKeyAlgorithm=new AlgorithmIdentifier;this.privateKey=new ArrayBuffer(0)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],OneAsymmetricKey.prototype,"version",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],OneAsymmetricKey.prototype,"privateKeyAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],OneAsymmetricKey.prototype,"privateKey",void 0);__decorate$1([AsnProp({type:Attributes$1,context:0,implicit:true,optional:true})],OneAsymmetricKey.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,context:1,implicit:true,optional:true})],OneAsymmetricKey.prototype,"publicKey",void 0);OneAsymmetricKey=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],OneAsymmetricKey);var PrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OneAsymmetricKey);PrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PrivateKeyInfo);var AsymmetricKeyPackage=AsymmetricKeyPackage_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AsymmetricKeyPackage_1.prototype);return r}return t}(AsnArray);AsymmetricKeyPackage=AsymmetricKeyPackage_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OneAsymmetricKey})],AsymmetricKeyPackage);var CompositePublicKey_1,CompositePrivateKey_1;var id_composite_key="2.16.840.1.114027.80.4.1";var CompositeAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);CompositeAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CompositeAlgorithmIdentifier);var CompositePublicKey=CompositePublicKey_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CompositePublicKey_1.prototype);return r}return t}(AsnArray);CompositePublicKey=CompositePublicKey_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SubjectPublicKeyInfo})],CompositePublicKey);var CompositePrivateKey=CompositePrivateKey_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CompositePrivateKey_1.prototype);return r}return t}(AsnArray);CompositePrivateKey=CompositePrivateKey_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:OneAsymmetricKey})],CompositePrivateKey);var dayjs_min$1={exports:{}};var dayjs_min=dayjs_min$1.exports;var hasRequiredDayjs_min;function requireDayjs_min(){if(hasRequiredDayjs_min)return dayjs_min$1.exports;hasRequiredDayjs_min=1;(function(e,t){!function(t,r){e.exports=r()}(dayjs_min,(function(){var e=1e3,t=6e4,r=36e5,i="millisecond",n="second",o="minute",a="hour",s="day",c="week",u="month",p="quarter",f="year",d="date",l="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,A=/\[([^\]]+)]|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,v={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},h=function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},_={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),i=Math.floor(r/60),n=r%60;return(t<=0?"+":"-")+h(i,2,"0")+":"+h(n,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var i=12*(r.year()-t.year())+(r.month()-t.month()),n=t.clone().add(i,u),o=r-n<0,a=t.clone().add(i+(o?-1:1),u);return+(-(i+(r-n)/(o?n-a:a-n))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:o,s:n,ms:i,Q:p}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},S="en",m={};m[S]=v;var C="$isDayjsObject",g=function(e){return e instanceof E||!(!e||!e[C])},P=function e(t,r,i){var n;if(!t)return S;if("string"==typeof t){var o=t.toLowerCase();m[o]&&(n=o),r&&(m[o]=r,n=o);var a=t.split("-");if(!n&&a.length>1)return e(a[0])}else{var s=t.name;m[s]=t,n=s}return!i&&n&&(S=n),n||!i&&S},T=function(e,t){if(g(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new E(r)},I=_;I.l=P,I.i=g,I.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function v(e){this.$L=P(e.locale,null,true),this.parse(e),this.$x=this.$x||e.x||{},this[C]=true}var h=v.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(I.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(y);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return I},h.isValid=function(){return!(this.$d.toString()===l)},h.isSame=function(e,t){var r=T(e);return this.startOf(t)<=r&&r<=this.endOf(t)},h.isAfter=function(e,t){return T(e)<this.startOf(t)},h.isBefore=function(e,t){return this.endOf(t)<T(e)},h.$g=function(e,t,r){return I.u(e)?this[t]:this.set(r,e)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(e,t){var r=this,i=!!I.u(t)||t,p=I.p(e),l=function(e,t){var n=I.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return i?n:n.endOf(s)},y=function(e,t){return I.w(r.toDate()[e].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},A=this.$W,v=this.$M,h=this.$D,_="set"+(this.$u?"UTC":"");switch(p){case f:return i?l(1,0):l(31,11);case u:return i?l(1,v):l(0,v+1);case c:var S=this.$locale().weekStart||0,m=(A<S?A+7:A)-S;return l(i?h-m:h+(6-m),v);case s:case d:return y(_+"Hours",0);case a:return y(_+"Minutes",1);case o:return y(_+"Seconds",2);case n:return y(_+"Milliseconds",3);default:return this.clone()}},h.endOf=function(e){return this.startOf(e,false)},h.$set=function(e,t){var r,c=I.p(e),p="set"+(this.$u?"UTC":""),l=(r={},r[s]=p+"Date",r[d]=p+"Date",r[u]=p+"Month",r[f]=p+"FullYear",r[a]=p+"Hours",r[o]=p+"Minutes",r[n]=p+"Seconds",r[i]=p+"Milliseconds",r)[c],y=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var A=this.clone().set(d,1);A.$d[l](y),A.init(),this.$d=A.set(d,Math.min(this.$D,A.daysInMonth())).$d}else l&&this.$d[l](y);return this.init(),this},h.set=function(e,t){return this.clone().$set(e,t)},h.get=function(e){return this[I.p(e)]()},h.add=function(i,p){var d,l=this;i=Number(i);var y=I.p(p),A=function(e){var t=T(l);return I.w(t.date(t.date()+Math.round(e*i)),l)};if(y===u)return this.set(u,this.$M+i);if(y===f)return this.set(f,this.$y+i);if(y===s)return A(1);if(y===c)return A(7);var v=(d={},d[o]=t,d[a]=r,d[n]=e,d)[y]||1,h=this.$d.getTime()+i*v;return I.w(h,this)},h.subtract=function(e,t){return this.add(-1*e,t)},h.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var i=e||"YYYY-MM-DDTHH:mm:ssZ",n=I.z(this),o=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,p=r.meridiem,f=function(e,r,n,o){return e&&(e[r]||e(t,i))||n[r].slice(0,o)},d=function(e){return I.s(o%12||12,e,"0")},y=p||function(e,t,r){var i=e<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(A,(function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return I.s(t.$y,4,"0");case"M":return s+1;case"MM":return I.s(s+1,2,"0");case"MMM":return f(r.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return I.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(o);case"HH":return I.s(o,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return y(o,a,true);case"A":return y(o,a,false);case"m":return String(a);case"mm":return I.s(a,2,"0");case"s":return String(t.$s);case"ss":return I.s(t.$s,2,"0");case"SSS":return I.s(t.$ms,3,"0");case"Z":return n}return null}(e)||n.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(i,d,l){var y,A=this,v=I.p(d),h=T(i),_=(h.utcOffset()-this.utcOffset())*t,S=this-h,m=function(){return I.m(A,h)};switch(v){case f:y=m()/12;break;case u:y=m();break;case p:y=m()/3;break;case c:y=(S-_)/6048e5;break;case s:y=(S-_)/864e5;break;case a:y=S/r;break;case o:y=S/t;break;case n:y=S/e;break;default:y=S}return l?y:I.a(y)},h.daysInMonth=function(){return this.endOf(u).$D},h.$locale=function(){return m[this.$L]},h.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),i=P(e,t,true);return i&&(r.$L=i),r},h.clone=function(){return I.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},v}(),b=E.prototype;return T.prototype=b,[["$ms",i],["$s",n],["$m",o],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach((function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,E,T),e.$i=true),T},T.locale=P,T.isDayjs=g,T.unix=function(e){return T(1e3*e)},T.en=m[S],T.Ls=m,T.p={},T}))})(dayjs_min$1);return dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();var dayjs=getDefaultExportFromCjs(dayjs_minExports);var relativeTime$2={exports:{}};var relativeTime$1=relativeTime$2.exports;var hasRequiredRelativeTime;function requireRelativeTime(){if(hasRequiredRelativeTime)return relativeTime$2.exports;hasRequiredRelativeTime=1;(function(e,t){!function(t,r){e.exports=r()}(relativeTime$1,(function(){return function(e,t,r){e=e||{};var i=t.prototype,n={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 o(e,t,r,n){return i.fromToBase(e,t,r,n)}r.en.relativeTime=n,i.fromToBase=function(t,i,o,a,s){for(var c,u,p,f=o.$locale().relativeTime||n,d=e.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"}],l=d.length,y=0;y<l;y+=1){var A=d[y];A.d&&(c=a?r(t).diff(o,A.d,true):o.diff(t,A.d,true));var v=(e.rounding||Math.round)(Math.abs(c));if(p=c>0,v<=A.r||!A.r){v<=1&&y>0&&(A=d[y-1]);var h=f[A.l];s&&(v=s(""+v)),u="string"==typeof h?h.replace("%d",v):h(v,i,A.l,p);break}}if(i)return u;var _=p?f.future:f.past;return"function"==typeof _?_(u):_.replace("%s",u)},i.to=function(e,t){return o(e,t,this,true)},i.from=function(e,t){return o(e,t,this)};var a=function(e){return e.$u?r.utc():r()};i.toNow=function(e){return this.to(a(this),e)},i.fromNow=function(e){return this.from(a(this),e)}}}))})(relativeTime$2);return relativeTime$2.exports}var relativeTimeExports=requireRelativeTime();var relativeTime=getDefaultExportFromCjs(relativeTimeExports);
79
79
  /**
80
80
  * @license
81
81
  * Copyright (c) Peculiar Ventures, LLC.
82
82
  *
83
83
  * This source code is licensed under the MIT license found in the
84
84
  * LICENSE file in the root directory of this source tree.
85
- */dayjs.extend(relativeTime);var dateShort=function(e){return new Date(e).toUTCString()};var dateDiff=function(e,t){if(!e||!t){return""}var i=dayjs(e);var r=dayjs(t);return i.to(r,true)};var basicInformation="Basic Information";var subjectName="Subject Name";var issuerName="Issuer Name";var publicKeyInfo="Public Key Info";var signature="Signature";var extensions="Extensions";var miscellaneous="Miscellaneous";var download="Download";var serialNumber="Serial Number";var version="Version";var validity="Validity";var issued="Issued";var expired="Expired";var lastUpdate="Last Update";var nextUpdate="Next Update";var algorithm="Algorithm";var namedCurve="Named Curve";var exponent="Exponent";var modulus="Modulus";var value="Value";var valid="Valid";var revoked="Revoked";var issuer="Issuer";var name="Name";var publicKey="Public Key";var fingerprint="Fingerprint";var fingerprints="Fingerprints";var testURLs="Test URLs";var certificateDetails="Certificate Details";var holder="Holder";var digestInfo="Digest Info";var type="Type";var revokedCertificates="Revoked Certificates";var revocationDate="Revocation Date";var yes="Yes";var no="No";var onlyUserCertificates="Only User Certificates";var onlyAttributeCertificates="Only Attribute Certificates";var onlyCACertificates="Only CA Certificates";var indirectCRL="Indirect CRL";var onlyReasons="Only Reasons";var crlEntryExtensions="CRL Entry Extensions";var previewCertificate="Preview certificate";var viewDetails="View details";var downloadOptions="Download options";var en={basicInformation:basicInformation,subjectName:subjectName,issuerName:issuerName,publicKeyInfo:publicKeyInfo,signature:signature,extensions:extensions,miscellaneous:miscellaneous,download:download,"download.pem":"Download PEM","download.der":"Download DER",serialNumber:serialNumber,version:version,validity:validity,issued:issued,expired:expired,lastUpdate:lastUpdate,nextUpdate:nextUpdate,algorithm:algorithm,namedCurve:namedCurve,exponent:exponent,modulus:modulus,value:value,valid:valid,revoked:revoked,issuer:issuer,name:name,publicKey:publicKey,fingerprint:fingerprint,fingerprints:fingerprints,testURLs:testURLs,certificateDetails:certificateDetails,holder:holder,digestInfo:digestInfo,type:type,revokedCertificates:revokedCertificates,revocationDate:revocationDate,yes:yes,no:no,onlyUserCertificates:onlyUserCertificates,onlyAttributeCertificates:onlyAttributeCertificates,onlyCACertificates:onlyCACertificates,indirectCRL:indirectCRL,onlyReasons:onlyReasons,crlEntryExtensions:crlEntryExtensions,previewCertificate:previewCertificate,viewDetails:viewDetails,downloadOptions:downloadOptions};
85
+ */dayjs.extend(relativeTime);var dateShort=function(e){return new Date(e).toUTCString()};var dateDiff=function(e,t){if(!e||!t){return""}var r=dayjs(e);var i=dayjs(t);return r.to(i,true)};var basicInformation="Basic Information";var subjectName="Subject Name";var issuerName="Issuer Name";var publicKeyInfo="Public Key Info";var signature="Signature";var extensions="Extensions";var miscellaneous="Miscellaneous";var download="Download";var serialNumber="Serial Number";var version="Version";var validity="Validity";var issued="Issued";var expired="Expired";var lastUpdate="Last Update";var nextUpdate="Next Update";var algorithm="Algorithm";var namedCurve="Named Curve";var exponent="Exponent";var modulus="Modulus";var value="Value";var valid="Valid";var revoked="Revoked";var issuer="Issuer";var name="Name";var publicKey="Public Key";var fingerprint="Fingerprint";var fingerprints="Fingerprints";var testURLs="Test URLs";var certificateDetails="Certificate Details";var holder="Holder";var digestInfo="Digest Info";var type="Type";var revokedCertificates="Revoked Certificates";var revocationDate="Revocation Date";var yes="Yes";var no="No";var onlyUserCertificates="Only User Certificates";var onlyAttributeCertificates="Only Attribute Certificates";var onlyCACertificates="Only CA Certificates";var indirectCRL="Indirect CRL";var onlyReasons="Only Reasons";var crlEntryExtensions="CRL Entry Extensions";var previewCertificate="Preview certificate";var viewDetails="View details";var downloadOptions="Download options";var en={basicInformation:basicInformation,subjectName:subjectName,issuerName:issuerName,publicKeyInfo:publicKeyInfo,signature:signature,extensions:extensions,miscellaneous:miscellaneous,download:download,"download.pem":"Download PEM","download.der":"Download DER",serialNumber:serialNumber,version:version,validity:validity,issued:issued,expired:expired,lastUpdate:lastUpdate,nextUpdate:nextUpdate,algorithm:algorithm,namedCurve:namedCurve,exponent:exponent,modulus:modulus,value:value,valid:valid,revoked:revoked,issuer:issuer,name:name,publicKey:publicKey,fingerprint:fingerprint,fingerprints:fingerprints,testURLs:testURLs,certificateDetails:certificateDetails,holder:holder,digestInfo:digestInfo,type:type,revokedCertificates:revokedCertificates,revocationDate:revocationDate,yes:yes,no:no,onlyUserCertificates:onlyUserCertificates,onlyAttributeCertificates:onlyAttributeCertificates,onlyCACertificates:onlyCACertificates,indirectCRL:indirectCRL,onlyReasons:onlyReasons,crlEntryExtensions:crlEntryExtensions,previewCertificate:previewCertificate,viewDetails:viewDetails,downloadOptions:downloadOptions};
86
86
  /**
87
87
  * @license
88
88
  * Copyright (c) Peculiar Ventures, LLC.
89
89
  *
90
90
  * This source code is licensed under the MIT license found in the
91
91
  * LICENSE file in the root directory of this source tree.
92
- */var MESSAGES_ALL={en:en};var Localization=function(){function e(){var e=this;this.setLocale=function(t){e.locale=t&&MESSAGES_ALL[t]?t:"en"};this.getLocale=function(){return e.locale};var t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}e.prototype.getString=function(e,t){var i=MESSAGES_ALL[this.locale][e];if(!i){return""}if(!t){return i}var r=i.split(t.pattern);if(r.length>1){return[r[0],t.replacer,r[1]]}return i};return e}();var l10n=new Localization;
92
+ */var MESSAGES_ALL={en:en};var Localization=function(){function e(){var e=this;this.setLocale=function(t){e.locale=t&&MESSAGES_ALL[t]?t:"en"};this.getLocale=function(){return e.locale};var t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}e.prototype.getString=function(e,t){var r=MESSAGES_ALL[this.locale][e];if(!r){return""}if(!t){return r}var i=r.split(t.pattern);if(i.length>1){return[i[0],t.replacer,i[1]]}return r};return e}();var l10n=new Localization;
93
93
  /**
94
94
  * @license
95
95
  * Copyright (c) Peculiar Ventures, LLC.
@@ -103,40 +103,40 @@ var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setP
103
103
  *
104
104
  * This source code is licensed under the MIT license found in the
105
105
  * LICENSE file in the root directory of this source tree.
106
- */var __classPrivateFieldSet$1=undefined&&undefined.__classPrivateFieldSet||function(e,t,i,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,i):n?n.value=i:t.set(e,i),i};var __classPrivateFieldGet$1=undefined&&undefined.__classPrivateFieldGet||function(e,t,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(e):r?r.value:t.get(e)};var _Name_asn;var Name=function(){function e(e){_Name_asn.set(this,new Name$1);if(buildExports.BufferSourceConverter.isBufferSource(e)){__classPrivateFieldSet$1(this,_Name_asn,AsnParser.parse(e,Name$1),"f")}else{__classPrivateFieldSet$1(this,_Name_asn,e,"f")}}e.prototype.toJSON=function(){var e=[];__classPrivateFieldGet$1(this,_Name_asn,"f").forEach((function(t){return t.forEach((function(t){e.push({type:t.type,name:OIDs[t.type],shortName:OIDsShort[t.type],value:t.value.toString()})}))}));return e};return e}();_Name_asn=new WeakMap;var BiometricSyntax_1;var id_pe_biometricInfo="".concat(id_pe$1,".2");var PredefinedBiometricType;(function(e){e[e["picture"]=0]="picture";e[e["handwrittenSignature"]=1]="handwrittenSignature"})(PredefinedBiometricType||(PredefinedBiometricType={}));var TypeOfBiometricData=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],TypeOfBiometricData.prototype,"predefinedBiometricType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],TypeOfBiometricData.prototype,"biometricDataOid",void 0);TypeOfBiometricData=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],TypeOfBiometricData);var BiometricData=function(){function e(e){if(e===void 0){e={}}this.typeOfBiometricData=new TypeOfBiometricData;this.hashAlgorithm=new AlgorithmIdentifier;this.biometricDataHash=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TypeOfBiometricData})],BiometricData.prototype,"typeOfBiometricData",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],BiometricData.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],BiometricData.prototype,"biometricDataHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,optional:true})],BiometricData.prototype,"sourceDataUri",void 0);var BiometricSyntax=BiometricSyntax_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,BiometricSyntax_1.prototype);return i}return t}(AsnArray);BiometricSyntax=BiometricSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:BiometricData})],BiometricSyntax);var id_qcs="".concat(id_pkix$1,".11");var NameRegistrationAuthorities_1,QCStatements_1;var id_pe_qcStatements="".concat(id_pe$1,".3");var QCStatement=function(){function e(){this.statementId="";this.statementInfo=new ArrayBuffer(0)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],QCStatement.prototype,"statementId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],QCStatement.prototype,"statementInfo",void 0);var id_qcs_pkixQCSyntax_v2="".concat(id_qcs,".2");var NameRegistrationAuthorities=NameRegistrationAuthorities_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,NameRegistrationAuthorities_1.prototype);return i}return t}(AsnArray);NameRegistrationAuthorities=NameRegistrationAuthorities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralName})],NameRegistrationAuthorities);var SemanticsInformation=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],SemanticsInformation.prototype,"semanticsIdentifier",void 0);__decorate$1([AsnProp({type:NameRegistrationAuthorities,optional:true})],SemanticsInformation.prototype,"nameRegistrationAuthorities",void 0);var QCStatements=QCStatements_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,QCStatements_1.prototype);return i}return t}(AsnArray);QCStatements=QCStatements_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:QCStatement})],QCStatements);var PlaceOfBirth$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth$1);var Gender$1;(function(e){e["M"]="M";e["F"]="F";e["m"]="m";e["f"]="f"})(Gender$1||(Gender$1={}));var CertificateApplicationPolicies_1;var CertificateApplicationPolicies=CertificateApplicationPolicies_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CertificateApplicationPolicies_1.prototype);return i}return t}(CertificatePolicies);CertificateApplicationPolicies=CertificateApplicationPolicies_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertificateApplicationPolicies);var id_certificateTemplate="1.3.6.1.4.1.311.21.7";var CertificateTemplate=function(){function e(e){if(e===void 0){e={}}this.templateID="";this.templateMajorVersion=0;this.templateMinorVersion=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertificateTemplate.prototype,"templateID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificateTemplate.prototype,"templateMajorVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificateTemplate.prototype,"templateMinorVersion",void 0);var id_enrollCertType="1.3.6.1.4.1.311.20.2";var EnrollCertType=function(){function e(e){if(e===void 0){e={}}this.name="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],EnrollCertType.prototype,"name",void 0);var EnrollCertTypeChoice=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){var e,t;return((e=this.name)===null||e===void 0?void 0:e.toString())||((t=this.spec)===null||t===void 0?void 0:t.name)||""};return e}();__decorate$1([AsnProp({type:DirectoryString})],EnrollCertTypeChoice.prototype,"name",void 0);__decorate$1([AsnProp({type:EnrollCertType})],EnrollCertTypeChoice.prototype,"spec",void 0);EnrollCertTypeChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EnrollCertTypeChoice);var id_caVersion="1.3.6.1.4.1.311.21.1";var CaVersion=function(){function e(){this.value=new ArrayBuffer(0)}e.prototype.toString=function(){var e=this.getVersion();return"V".concat(e.certificateIndex,".").concat(e.keyIndex)};e.prototype.getVersion=function(){var e=new Uint8Array(this.value);if(this.value.byteLength<4){e=new Uint8Array(4);e.set(new Uint8Array(this.value),4-this.value.byteLength)}return{keyIndex:parseInt(buildExports.Convert.ToHex(e.slice(0,2)),16),certificateIndex:parseInt(buildExports.Convert.ToHex(e.slice(2)),16)}};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],CaVersion.prototype,"value",void 0);CaVersion=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CaVersion);var AnyString=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.NumericString})],AnyString.prototype,"numericString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],AnyString.prototype,"printableString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.TeletexString})],AnyString.prototype,"teletexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VideotexString})],AnyString.prototype,"videotexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],AnyString.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GraphicString})],AnyString.prototype,"graphicString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],AnyString.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralString})],AnyString.prototype,"generalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.UniversalString})],AnyString.prototype,"universalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],AnyString.prototype,"bmpString",void 0);AnyString=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AnyString);var ArchivedKey=function(){function e(e){if(e===void 0){e=new ArrayBuffer(0)}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Any})],ArchivedKey.prototype,"value",void 0);ArchivedKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ArchivedKey);var CertExtensions_1;var CertExtensions=CertExtensions_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CertExtensions_1.prototype);return i}return t}(Extensions);CertExtensions=CertExtensions_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertExtensions);var CSPProvider=function(){function e(e){if(e===void 0){e={}}this.keySpec=0;this.cspName="";this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CSPProvider.prototype,"keySpec",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],CSPProvider.prototype,"cspName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CSPProvider.prototype,"signature",void 0);var AttestationIdentityKeyInfo_1;var AttestationIdentityKeyInfo=AttestationIdentityKeyInfo_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,AttestationIdentityKeyInfo_1.prototype);return i}return t}(AsnArray);AttestationIdentityKeyInfo=AttestationIdentityKeyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.Any})],AttestationIdentityKeyInfo);var EndorsementKeyInfo_1;var EndorsementKeyInfo=EndorsementKeyInfo_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,EndorsementKeyInfo_1.prototype);return i}return t}(AsnArray);EndorsementKeyInfo=EndorsementKeyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.Any})],EndorsementKeyInfo);var EnrollmentNameValuePairs_1;var EnrollmentNameValuePair=function(){function e(e){if(e===void 0){e={}}this.name="";this.value="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],EnrollmentNameValuePair.prototype,"name",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],EnrollmentNameValuePair.prototype,"value",void 0);var EnrollmentNameValuePairs=EnrollmentNameValuePairs_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,EnrollmentNameValuePairs_1.prototype);return i}return t}(AsnArray);EnrollmentNameValuePairs=EnrollmentNameValuePairs_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:EnrollmentNameValuePair})],EnrollmentNameValuePairs);var NTPrincipalName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OtherName);NTPrincipalName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NTPrincipalName);var NTDSReplication=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OtherName);NTDSReplication=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NTDSReplication);var RenewalCertificate=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Certificate);RenewalCertificate=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],RenewalCertificate);var RequestClientInfo=function(){function e(e){if(e===void 0){e={}}this.clientId=0;this.machineName="";this.userName="";this.processName="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],RequestClientInfo.prototype,"clientId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"machineName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"userName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"processName",void 0);var id_netscape="2.16.840.1.113730";var id_netscapeCertExtension="".concat(id_netscape,".1");var NetscapeBaseUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeBaseUrl.prototype,"value",void 0);NetscapeBaseUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeBaseUrl);var NetscapeCaPolicyUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCaPolicyUrl.prototype,"value",void 0);NetscapeCaPolicyUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCaPolicyUrl);var NetscapeCaRevocationUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCaRevocationUrl.prototype,"value",void 0);NetscapeCaRevocationUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCaRevocationUrl);var NetscapeCertRenewUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCertRenewUrl.prototype,"value",void 0);NetscapeCertRenewUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCertRenewUrl);var id_netscapeCertType="".concat(id_netscapeCertExtension,".1");var NetscapeCertTypeFlags;(function(e){e[e["sslClient"]=1]="sslClient";e[e["sslServer"]=2]="sslServer";e[e["sMime"]=4]="sMime";e[e["objectSigning"]=8]="objectSigning";e[e["sslCa"]=32]="sslCa";e[e["sMimeCa"]=64]="sMimeCa";e[e["objectSigningCa"]=128]="objectSigningCa"})(NetscapeCertTypeFlags||(NetscapeCertTypeFlags={}));var NetscapeCertType=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=this.toNumber();var t=[];if(e&NetscapeCertTypeFlags.objectSigning){t.push("objectSigning")}if(e&NetscapeCertTypeFlags.objectSigningCa){t.push("objectSigningCa")}if(e&NetscapeCertTypeFlags.sMime){t.push("sMime")}if(e&NetscapeCertTypeFlags.sMimeCa){t.push("sMimeCa")}if(e&NetscapeCertTypeFlags.sslCa){t.push("sslCa")}if(e&NetscapeCertTypeFlags.sslClient){t.push("sslClient")}if(e&NetscapeCertTypeFlags.sslServer){t.push("sslServer")}return t};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var id_netscapeComment="".concat(id_netscapeCertExtension,".13");var NetscapeComment=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeComment.prototype,"value",void 0);NetscapeComment=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeComment);var NetscapeRevocationUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeRevocationUrl.prototype,"value",void 0);NetscapeRevocationUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeRevocationUrl);var NetscapeSSLServerName=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeSSLServerName.prototype,"value",void 0);NetscapeSSLServerName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeSSLServerName);var id_lei="1.3.6.1.4.1.52266.1";var Lei=function(){function e(e){if(e===void 0){e={}}this.leiCode="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:PrintableString})],Lei.prototype,"leiCode",void 0);__decorate$1([AsnProp({type:PrintableString,context:0,optional:true})],Lei.prototype,"leiRole",void 0);Lei=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Lei);var BaseLeiChoice=function(){function e(e){if(e){this.text=e}}Object.defineProperty(e.prototype,"text",{get:function(){if(this.bmpString!==undefined){return this.bmpString}if(this.ia5String!==undefined){return this.ia5String}if(this.printableString!==undefined){return this.printableString}if(this.utf8String!==undefined){return this.utf8String}if(this.visibleString!==undefined){return this.visibleString}return undefined},set:function(e){this.printableString=e},enumerable:false,configurable:true});return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],BaseLeiChoice.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],BaseLeiChoice.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],BaseLeiChoice.prototype,"bmpString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],BaseLeiChoice.prototype,"utf8String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],BaseLeiChoice.prototype,"printableString",void 0);BaseLeiChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],BaseLeiChoice);var LeiChoice=function(e){__extends(t,e);function t(t){var i=e.call(this)||this;if(typeof t==="string"){i.text=t}else if(t instanceof Lei){i.struct=t}return i}return t}(BaseLeiChoice);__decorate$1([AsnProp({type:Lei})],LeiChoice.prototype,"struct",void 0);LeiChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LeiChoice);var id_role="1.3.6.1.4.1.52266.2";var LeiRole=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BaseLeiChoice);LeiRole=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LeiRole);var ByteStream=function(){function e(e){this.offset=0;this.view=buildExports.BufferSourceConverter.toUint8Array(e)}Object.defineProperty(e.prototype,"position",{get:function(){return this.offset},enumerable:false,configurable:true});e.prototype.read=function(e){if(e===void 0){e=1}var t=this.view.slice(this.offset,this.offset+e);this.offset=this.offset+t.length;return t};e.prototype.readByte=function(){var e=this.read();if(!e.length){throw new Error("End of stream")}return e[0]};e.prototype.readNumber=function(e){var t=this.read(e);var i=buildExports.Convert.ToHex(t);return parseInt(i,16)};e.prototype.readEnd=function(){return this.read(this.view.length-this.offset)};e.prototype.reset=function(){this.offset=0};return e}();var Structure=function(){function e(){}e.createStream=function(e){var t=buildExports.BufferSourceConverter.toUint8Array(e);return new ByteStream(t)};return e}();var SignatureType;(function(e){e[e["certificateTimestamp"]=0]="certificateTimestamp";e[e["treeHash"]=1]="treeHash"})(SignatureType||(SignatureType={}));var HashAlgorithm;(function(e){e[e["none"]=0]="none";e[e["md5"]=1]="md5";e[e["sha1"]=2]="sha1";e[e["sha224"]=3]="sha224";e[e["sha256"]=4]="sha256";e[e["sha384"]=5]="sha384";e[e["sha512"]=6]="sha512"})(HashAlgorithm||(HashAlgorithm={}));var SignatureAlgorithm;(function(e){e[e["anonymous"]=0]="anonymous";e[e["rsa"]=1]="rsa";e[e["dsa"]=2]="dsa";e[e["ecdsa"]=3]="ecdsa"})(SignatureAlgorithm||(SignatureAlgorithm={}));var SignedCertificateTimestamp=function(e){__extends(t,e);function t(t){var i=e.call(this)||this;i.version=0;i.logId=new ArrayBuffer(32);i.timestamp=new Date;i.extensions=new ArrayBuffer(0);i.hashAlgorithm=0;i.signatureAlgorithm=0;i.signature=new ArrayBuffer(0);if(t){i.parse(t)}return i}t.prototype.parse=function(e){this.version=e.readByte();e.read(2);this.logId=buildExports.BufferSourceConverter.toArrayBuffer(e.read(32));this.timestamp=new Date(e.readNumber(8));var t=e.readNumber(2);this.extensions=e.read(t).buffer;this.hashAlgorithm=e.readByte();this.signatureAlgorithm=e.readByte();this.signature=e.read(e.readNumber(2)).buffer};t.prototype.toJSON=function(){return{version:this.version,logId:buildExports.Convert.ToHex(this.logId),timestamp:this.timestamp,extensions:buildExports.Convert.ToBase64(this.extensions),hashAlgorithm:HashAlgorithm[this.hashAlgorithm]||"undefined",signatureAlgorithm:SignatureAlgorithm[this.signatureAlgorithm]||"undefined",signature:buildExports.Convert.ToBase64(this.signature)}};return t}(Structure);var id_certificateTransparency="1.3.6.1.4.1.11129.2.4.2";var CertificateTransparency=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.items=[];return t}t.prototype.fromASN=function(t){e.prototype.fromASN.call(this,t);var i=new ByteStream(this.buffer);var r=i.readNumber(2);this.items=[];while(i.position<r){this.items.push(new SignedCertificateTimestamp(i))}return this};t.prototype.toJSON=function(){return this.items.map((function(e){return e.toJSON()}))};return t}(OctetString);var Version$1;(function(e){e[e["v1"]=1]="v1"})(Version$1||(Version$1={}));var id_adbe_archiveRevInfo="1.2.840.113583.1.1.9.2";var ArchiveRevInfo=function(){function e(e){if(e===void 0){e={}}this.version=Version$1.v1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ArchiveRevInfo.prototype,"version",void 0);var id_adbe_timestamp="1.2.840.113583.1.1.9.1";var Timestamp=function(){function e(e){if(e===void 0){e={}}this.version=Version$1.v1;this.location=new GeneralName;this.requiresAuth=false;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],Timestamp.prototype,"version",void 0);__decorate$1([AsnProp({type:GeneralName})],Timestamp.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:false,optional:true})],Timestamp.prototype,"requiresAuth",void 0);var HashAlgAndValue=function(){function e(e){if(e===void 0){e={}}this.hashAlg=new AlgorithmIdentifier;this.hashValue=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],HashAlgAndValue.prototype,"hashAlg",void 0);__decorate$1([AsnProp({type:OctetString})],HashAlgAndValue.prototype,"hashValue",void 0);var LogotypeDetails=function(){function e(e){if(e===void 0){e={}}this.mediaType="";this.logotypeHash=[];this.logotypeURI=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],LogotypeDetails.prototype,"mediaType",void 0);__decorate$1([AsnProp({type:HashAlgAndValue,repeated:"sequence"})],LogotypeDetails.prototype,"logotypeHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,repeated:"sequence"})],LogotypeDetails.prototype,"logotypeURI",void 0);var LogotypeAudioChannels;(function(e){e[e["mono"]=1]="mono";e[e["stereo"]=2]="stereo";e[e["quad"]=4]="quad"})(LogotypeAudioChannels||(LogotypeAudioChannels={}));var LogotypeAudioInfo=function(){function e(e){if(e===void 0){e={}}this.fileSize=0;this.playTime=0;this.channels=LogotypeAudioChannels.mono;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"fileSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"playTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"channels",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,implicit:true,context:3,optional:true})],LogotypeAudioInfo.prototype,"sampleRate",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,implicit:true,context:4,optional:true})],LogotypeAudioInfo.prototype,"language",void 0);var LogotypeAudio=function(){function e(e){if(e===void 0){e={}}this.audioDetails=new LogotypeDetails;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeDetails})],LogotypeAudio.prototype,"audioDetails",void 0);__decorate$1([AsnProp({type:LogotypeAudioInfo,optional:true})],LogotypeAudio.prototype,"audioInfo",void 0);var LogotypeImageResolution=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,implicit:true})],LogotypeImageResolution.prototype,"numBits",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,implicit:true})],LogotypeImageResolution.prototype,"tableSize",void 0);LogotypeImageResolution=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LogotypeImageResolution);var LogotypeImageType;(function(e){e[e["grayScale"]=0]="grayScale";e[e["color"]=1]="color"})(LogotypeImageType||(LogotypeImageType={}));var LogotypeImageInfo=function(){function e(e){if(e===void 0){e={}}this.type=LogotypeImageType.color;this.fileSize=0;this.xSize=0;this.ySize=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,implicit:true,defaultValue:LogotypeImageType.color})],LogotypeImageInfo.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"fileSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"xSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"ySize",void 0);__decorate$1([AsnProp({type:LogotypeImageResolution})],LogotypeImageInfo.prototype,"resolution",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:4,implicit:true,optional:true})],LogotypeImageInfo.prototype,"language",void 0);var LogotypeImage=function(){function e(e){if(e===void 0){e={}}this.imageDetails=new LogotypeDetails;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeDetails})],LogotypeImage.prototype,"imageDetails",void 0);__decorate$1([AsnProp({type:LogotypeImageInfo,optional:true})],LogotypeImage.prototype,"imageInfo",void 0);var LogotypeData=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeImage,repeated:"sequence",optional:true})],LogotypeData.prototype,"image",void 0);__decorate$1([AsnProp({type:LogotypeAudio,repeated:"sequence",context:1,optional:true})],LogotypeData.prototype,"audio",void 0);var LogotypeReference=function(){function e(e){if(e===void 0){e={}}this.refStructHash=[];this.refStructURI=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:HashAlgAndValue,repeated:"sequence"})],LogotypeReference.prototype,"refStructHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,repeated:"sequence"})],LogotypeReference.prototype,"refStructURI",void 0);var LogotypeInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeData,implicit:true,context:0})],LogotypeInfo.prototype,"direct",void 0);__decorate$1([AsnProp({type:LogotypeReference,implicit:true,context:1})],LogotypeInfo.prototype,"indirect",void 0);LogotypeInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LogotypeInfo);var OtherLogotypeInfo=function(){function e(e){if(e===void 0){e={}}this.logotypeType="";this.info=new LogotypeInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherLogotypeInfo.prototype,"logotypeType",void 0);__decorate$1([AsnProp({type:LogotypeInfo})],OtherLogotypeInfo.prototype,"info",void 0);var LogotypeExtn=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeInfo,context:0,repeated:"sequence",optional:true})],LogotypeExtn.prototype,"communityLogos",void 0);__decorate$1([AsnProp({type:LogotypeInfo,context:1,optional:true})],LogotypeExtn.prototype,"issuerLogo",void 0);__decorate$1([AsnProp({type:LogotypeInfo,context:2,optional:true})],LogotypeExtn.prototype,"subjectLogo",void 0);__decorate$1([AsnProp({type:OtherLogotypeInfo,context:3,repeated:"sequence",optional:true})],LogotypeExtn.prototype,"otherLogos",void 0);var id_pe_logotype="1.3.6.1.5.5.7.1.12";var JWTClaimNames_1,JWTClaimPermittedValuesList_1,TNAuthorizationList_1;var id_pkix="1.3.6.1.5.5.7";var id_pe="".concat(id_pkix,".1");var JWTClaimNames=JWTClaimNames_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,JWTClaimNames_1.prototype);return i}return t}(AsnArray);JWTClaimNames=JWTClaimNames_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.IA5String})],JWTClaimNames);var JWTClaimPermittedValues=function(){function e(e){if(e===void 0){e={}}this.claim="";this.permitted=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],JWTClaimPermittedValues.prototype,"claim",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,repeated:"sequence"})],JWTClaimPermittedValues.prototype,"permitted",void 0);var JWTClaimPermittedValuesList=JWTClaimPermittedValuesList_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,JWTClaimPermittedValuesList_1.prototype);return i}return t}(AsnArray);JWTClaimPermittedValuesList=JWTClaimPermittedValuesList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:JWTClaimPermittedValues})],JWTClaimPermittedValuesList);var JWTClaimConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:JWTClaimNames,optional:true,context:0})],JWTClaimConstraints.prototype,"mustInclude",void 0);__decorate$1([AsnProp({type:JWTClaimPermittedValuesList,optional:true,context:1})],JWTClaimConstraints.prototype,"permittedValues",void 0);var id_pe_TNAuthList="".concat(id_pe,".26");var TelephoneNumberRange=function(){function e(){this.start="";this.count=2}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],TelephoneNumberRange.prototype,"start",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],TelephoneNumberRange.prototype,"count",void 0);var TNEntry=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:0})],TNEntry.prototype,"spc",void 0);__decorate$1([AsnProp({type:TelephoneNumberRange,context:1})],TNEntry.prototype,"range",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:2})],TNEntry.prototype,"one",void 0);TNEntry=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],TNEntry);var TNAuthorizationList=TNAuthorizationList_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,TNAuthorizationList_1.prototype);return i}return t}(AsnArray);TNAuthorizationList=TNAuthorizationList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:TNEntry})],TNAuthorizationList);var IntegerSet_1;var id_ce_keyDescription="1.3.6.1.4.1.11129.2.1.17";var VerifiedBootState;(function(e){e[e["verified"]=0]="verified";e[e["selfSigned"]=1]="selfSigned";e[e["unverified"]=2]="unverified";e[e["failed"]=3]="failed"})(VerifiedBootState||(VerifiedBootState={}));var RootOfTrust=function(){function e(e){if(e===void 0){e={}}this.verifiedBootKey=new OctetString;this.deviceLocked=false;this.verifiedBootState=VerifiedBootState.verified;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],RootOfTrust.prototype,"verifiedBootKey",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean})],RootOfTrust.prototype,"deviceLocked",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],RootOfTrust.prototype,"verifiedBootState",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],RootOfTrust.prototype,"verifiedBootHash",void 0);var IntegerSet=IntegerSet_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,IntegerSet_1.prototype);return i}return t}(AsnArray);IntegerSet=IntegerSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:AsnPropTypes.Integer})],IntegerSet);var AuthorizationList=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({context:1,type:IntegerSet,optional:true})],AuthorizationList.prototype,"purpose",void 0);__decorate$1([AsnProp({context:2,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"algorithm",void 0);__decorate$1([AsnProp({context:3,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"keySize",void 0);__decorate$1([AsnProp({context:5,type:IntegerSet,optional:true})],AuthorizationList.prototype,"digest",void 0);__decorate$1([AsnProp({context:6,type:IntegerSet,optional:true})],AuthorizationList.prototype,"padding",void 0);__decorate$1([AsnProp({context:10,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"ecCurve",void 0);__decorate$1([AsnProp({context:200,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"rsaPublicExponent",void 0);__decorate$1([AsnProp({context:203,type:IntegerSet,optional:true})],AuthorizationList.prototype,"mgfDigest",void 0);__decorate$1([AsnProp({context:303,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"rollbackResistance",void 0);__decorate$1([AsnProp({context:305,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"earlyBootOnly",void 0);__decorate$1([AsnProp({context:400,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"activeDateTime",void 0);__decorate$1([AsnProp({context:401,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"originationExpireDateTime",void 0);__decorate$1([AsnProp({context:402,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"usageExpireDateTime",void 0);__decorate$1([AsnProp({context:405,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"usageCountLimit",void 0);__decorate$1([AsnProp({context:503,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"noAuthRequired",void 0);__decorate$1([AsnProp({context:504,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"userAuthType",void 0);__decorate$1([AsnProp({context:505,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"authTimeout",void 0);__decorate$1([AsnProp({context:506,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"allowWhileOnBody",void 0);__decorate$1([AsnProp({context:507,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"trustedUserPresenceRequired",void 0);__decorate$1([AsnProp({context:508,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"trustedConfirmationRequired",void 0);__decorate$1([AsnProp({context:509,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"unlockedDeviceRequired",void 0);__decorate$1([AsnProp({context:600,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"allApplications",void 0);__decorate$1([AsnProp({context:601,type:OctetString,optional:true})],AuthorizationList.prototype,"applicationId",void 0);__decorate$1([AsnProp({context:701,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"creationDateTime",void 0);__decorate$1([AsnProp({context:702,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"origin",void 0);__decorate$1([AsnProp({context:703,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"rollbackResistant",void 0);__decorate$1([AsnProp({context:704,type:RootOfTrust,optional:true})],AuthorizationList.prototype,"rootOfTrust",void 0);__decorate$1([AsnProp({context:705,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"osVersion",void 0);__decorate$1([AsnProp({context:706,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"osPatchLevel",void 0);__decorate$1([AsnProp({context:709,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationApplicationId",void 0);__decorate$1([AsnProp({context:710,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdBrand",void 0);__decorate$1([AsnProp({context:711,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdDevice",void 0);__decorate$1([AsnProp({context:712,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdProduct",void 0);__decorate$1([AsnProp({context:713,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdSerial",void 0);__decorate$1([AsnProp({context:714,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdImei",void 0);__decorate$1([AsnProp({context:715,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdMeid",void 0);__decorate$1([AsnProp({context:716,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdManufacturer",void 0);__decorate$1([AsnProp({context:717,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdModel",void 0);__decorate$1([AsnProp({context:718,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"vendorPatchLevel",void 0);__decorate$1([AsnProp({context:719,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"bootPatchLevel",void 0);__decorate$1([AsnProp({context:720,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"deviceUniqueAttestation",void 0);__decorate$1([AsnProp({context:723,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdSecondImei",void 0);__decorate$1([AsnProp({context:724,type:OctetString,optional:true})],AuthorizationList.prototype,"moduleHash",void 0);var SecurityLevel;(function(e){e[e["software"]=0]="software";e[e["trustedEnvironment"]=1]="trustedEnvironment";e[e["strongBox"]=2]="strongBox"})(SecurityLevel||(SecurityLevel={}));var Version;(function(e){e[e["KM2"]=1]="KM2";e[e["KM3"]=2]="KM3";e[e["KM4"]=3]="KM4";e[e["KM4_1"]=4]="KM4_1";e[e["keyMint1"]=100]="keyMint1";e[e["keyMint2"]=200]="keyMint2";e[e["keyMint3"]=300]="keyMint3";e[e["keyMint4"]=400]="keyMint4"})(Version||(Version={}));var KeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.KM4;this.attestationSecurityLevel=SecurityLevel.software;this.keymasterVersion=0;this.keymasterSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new AuthorizationList;this.teeEnforced=new AuthorizationList;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyDescription.prototype,"keymasterVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyDescription.prototype,"keymasterSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],KeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],KeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyDescription.prototype,"teeEnforced",void 0);var KeyMintKeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.keyMint4;this.attestationSecurityLevel=SecurityLevel.software;this.keyMintVersion=0;this.keyMintSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new AuthorizationList;this.hardwareEnforced=new AuthorizationList;Object.assign(this,e)}e.prototype.toLegacyKeyDescription=function(){return new KeyDescription({attestationVersion:this.attestationVersion,attestationSecurityLevel:this.attestationSecurityLevel,keymasterVersion:this.keyMintVersion,keymasterSecurityLevel:this.keyMintSecurityLevel,attestationChallenge:this.attestationChallenge,uniqueId:this.uniqueId,softwareEnforced:this.softwareEnforced,teeEnforced:this.hardwareEnforced})};e.fromLegacyKeyDescription=function(t){return new e({attestationVersion:t.attestationVersion,attestationSecurityLevel:t.attestationSecurityLevel,keyMintVersion:t.keymasterVersion,keyMintSecurityLevel:t.keymasterSecurityLevel,attestationChallenge:t.attestationChallenge,uniqueId:t.uniqueId,softwareEnforced:t.softwareEnforced,hardwareEnforced:t.teeEnforced})};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyMintKeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyMintKeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyMintKeyDescription.prototype,"keyMintVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyMintKeyDescription.prototype,"keyMintSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],KeyMintKeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],KeyMintKeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyMintKeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyMintKeyDescription.prototype,"hardwareEnforced",void 0);var NonStandardAuthorizationList_1;var NonStandardAuthorization=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AuthorizationList);NonStandardAuthorization=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NonStandardAuthorization);var NonStandardAuthorizationList=NonStandardAuthorizationList_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,NonStandardAuthorizationList_1.prototype);return i}t.prototype.findProperty=function(e){var t=this.find((function(t){return e in t}));if(t){return t[e]}return undefined};return t}(AsnArray);NonStandardAuthorizationList=NonStandardAuthorizationList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:NonStandardAuthorization})],NonStandardAuthorizationList);var NonStandardKeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.KM4;this.attestationSecurityLevel=SecurityLevel.software;this.keymasterVersion=0;this.keymasterSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new NonStandardAuthorizationList;this.teeEnforced=new NonStandardAuthorizationList;Object.assign(this,e)}Object.defineProperty(e.prototype,"keyMintVersion",{get:function(){return this.keymasterVersion},set:function(e){this.keymasterVersion=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"keyMintSecurityLevel",{get:function(){return this.keymasterSecurityLevel},set:function(e){this.keymasterSecurityLevel=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hardwareEnforced",{get:function(){return this.teeEnforced},set:function(e){this.teeEnforced=e},enumerable:false,configurable:true});return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],NonStandardKeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],NonStandardKeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],NonStandardKeyDescription.prototype,"keymasterVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],NonStandardKeyDescription.prototype,"keymasterSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],NonStandardKeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],NonStandardKeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:NonStandardAuthorizationList})],NonStandardKeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:NonStandardAuthorizationList})],NonStandardKeyDescription.prototype,"teeEnforced",void 0);var NonStandardKeyMintKeyDescription=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}if("keymasterVersion"in t&&!("keyMintVersion"in t)){t.keyMintVersion=t.keymasterVersion}if("keymasterSecurityLevel"in t&&!("keyMintSecurityLevel"in t)){t.keyMintSecurityLevel=t.keymasterSecurityLevel}if("teeEnforced"in t&&!("hardwareEnforced"in t)){t.hardwareEnforced=t.teeEnforced}return e.call(this,t)||this}return t}(NonStandardKeyDescription);NonStandardKeyMintKeyDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NonStandardKeyMintKeyDescription);var AttestationPackageInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],AttestationPackageInfo.prototype,"packageName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttestationPackageInfo.prototype,"version",void 0);var AttestationApplicationId=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttestationPackageInfo,repeated:"set"})],AttestationApplicationId.prototype,"packageInfos",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString,repeated:"set"})],AttestationApplicationId.prototype,"signatureDigests",void 0);var __decorate=undefined&&undefined.__decorate||function(e,t,i,r){var n=arguments.length,o=n<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,i):r,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(n<3?a(o):n>3?a(t,i,o):a(t,i))||o;return n>3&&o&&Object.defineProperty(t,i,o),o};var id_cabforganizationIdentifier="2.23.140.3.1";var CabforganizationIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate([AsnProp({type:AsnPropTypes.PrintableString})],CabforganizationIdentifier.prototype,"registrationSchemeIdentifier",void 0);__decorate([AsnProp({type:AsnPropTypes.PrintableString})],CabforganizationIdentifier.prototype,"registrationCountry",void 0);__decorate([AsnProp({type:AsnPropTypes.PrintableString,optional:true,context:0,implicit:true})],CabforganizationIdentifier.prototype,"registrationStateOrProvince",void 0);__decorate([AsnProp({type:AsnPropTypes.Utf8String})],CabforganizationIdentifier.prototype,"registrationReference",void 0);
106
+ */var __classPrivateFieldSet$1=undefined&&undefined.__classPrivateFieldSet||function(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var __classPrivateFieldGet$1=undefined&&undefined.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var _Name_asn;var Name=function(){function e(e){_Name_asn.set(this,new Name$1);if(buildExports.BufferSourceConverter.isBufferSource(e)){__classPrivateFieldSet$1(this,_Name_asn,AsnParser.parse(e,Name$1),"f")}else{__classPrivateFieldSet$1(this,_Name_asn,e,"f")}}e.prototype.toJSON=function(){var e=[];__classPrivateFieldGet$1(this,_Name_asn,"f").forEach((function(t){return t.forEach((function(t){e.push({type:t.type,name:OIDs[t.type],shortName:OIDsShort[t.type],value:t.value.toString()})}))}));return e};return e}();_Name_asn=new WeakMap;var BiometricSyntax_1;var id_pe_biometricInfo="".concat(id_pe$1,".2");var PredefinedBiometricType;(function(e){e[e["picture"]=0]="picture";e[e["handwrittenSignature"]=1]="handwrittenSignature"})(PredefinedBiometricType||(PredefinedBiometricType={}));var TypeOfBiometricData=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],TypeOfBiometricData.prototype,"predefinedBiometricType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],TypeOfBiometricData.prototype,"biometricDataOid",void 0);TypeOfBiometricData=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],TypeOfBiometricData);var BiometricData=function(){function e(e){if(e===void 0){e={}}this.typeOfBiometricData=new TypeOfBiometricData;this.hashAlgorithm=new AlgorithmIdentifier;this.biometricDataHash=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:TypeOfBiometricData})],BiometricData.prototype,"typeOfBiometricData",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],BiometricData.prototype,"hashAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],BiometricData.prototype,"biometricDataHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,optional:true})],BiometricData.prototype,"sourceDataUri",void 0);var BiometricSyntax=BiometricSyntax_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,BiometricSyntax_1.prototype);return r}return t}(AsnArray);BiometricSyntax=BiometricSyntax_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:BiometricData})],BiometricSyntax);var id_qcs="".concat(id_pkix$1,".11");var NameRegistrationAuthorities_1,QCStatements_1;var id_pe_qcStatements="".concat(id_pe$1,".3");var QCStatement=function(){function e(){this.statementId="";this.statementInfo=new ArrayBuffer(0)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],QCStatement.prototype,"statementId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],QCStatement.prototype,"statementInfo",void 0);var id_qcs_pkixQCSyntax_v2="".concat(id_qcs,".2");var NameRegistrationAuthorities=NameRegistrationAuthorities_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,NameRegistrationAuthorities_1.prototype);return r}return t}(AsnArray);NameRegistrationAuthorities=NameRegistrationAuthorities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:GeneralName})],NameRegistrationAuthorities);var SemanticsInformation=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],SemanticsInformation.prototype,"semanticsIdentifier",void 0);__decorate$1([AsnProp({type:NameRegistrationAuthorities,optional:true})],SemanticsInformation.prototype,"nameRegistrationAuthorities",void 0);var QCStatements=QCStatements_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,QCStatements_1.prototype);return r}return t}(AsnArray);QCStatements=QCStatements_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:QCStatement})],QCStatements);var PlaceOfBirth$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth$1);var Gender$1;(function(e){e["M"]="M";e["F"]="F";e["m"]="m";e["f"]="f"})(Gender$1||(Gender$1={}));var CertificateApplicationPolicies_1;var CertificateApplicationPolicies=CertificateApplicationPolicies_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificateApplicationPolicies_1.prototype);return r}return t}(CertificatePolicies);CertificateApplicationPolicies=CertificateApplicationPolicies_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertificateApplicationPolicies);var id_certificateTemplate="1.3.6.1.4.1.311.21.7";var CertificateTemplate=function(){function e(e){if(e===void 0){e={}}this.templateID="";this.templateMajorVersion=0;this.templateMinorVersion=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertificateTemplate.prototype,"templateID",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificateTemplate.prototype,"templateMajorVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificateTemplate.prototype,"templateMinorVersion",void 0);var id_enrollCertType="1.3.6.1.4.1.311.20.2";var EnrollCertType=function(){function e(e){if(e===void 0){e={}}this.name="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],EnrollCertType.prototype,"name",void 0);var EnrollCertTypeChoice=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}e.prototype.toString=function(){var e,t;return((e=this.name)===null||e===void 0?void 0:e.toString())||((t=this.spec)===null||t===void 0?void 0:t.name)||""};return e}();__decorate$1([AsnProp({type:DirectoryString})],EnrollCertTypeChoice.prototype,"name",void 0);__decorate$1([AsnProp({type:EnrollCertType})],EnrollCertTypeChoice.prototype,"spec",void 0);EnrollCertTypeChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EnrollCertTypeChoice);var id_caVersion="1.3.6.1.4.1.311.21.1";var CaVersion=function(){function e(){this.value=new ArrayBuffer(0)}e.prototype.toString=function(){var e=this.getVersion();return"V".concat(e.certificateIndex,".").concat(e.keyIndex)};e.prototype.getVersion=function(){var e=new Uint8Array(this.value);if(this.value.byteLength<4){e=new Uint8Array(4);e.set(new Uint8Array(this.value),4-this.value.byteLength)}return{keyIndex:parseInt(buildExports.Convert.ToHex(e.slice(0,2)),16),certificateIndex:parseInt(buildExports.Convert.ToHex(e.slice(2)),16)}};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],CaVersion.prototype,"value",void 0);CaVersion=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CaVersion);var AnyString=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.NumericString})],AnyString.prototype,"numericString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],AnyString.prototype,"printableString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.TeletexString})],AnyString.prototype,"teletexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VideotexString})],AnyString.prototype,"videotexString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],AnyString.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GraphicString})],AnyString.prototype,"graphicString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],AnyString.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralString})],AnyString.prototype,"generalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.UniversalString})],AnyString.prototype,"universalString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],AnyString.prototype,"bmpString",void 0);AnyString=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AnyString);var ArchivedKey=function(){function e(e){if(e===void 0){e=new ArrayBuffer(0)}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Any})],ArchivedKey.prototype,"value",void 0);ArchivedKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ArchivedKey);var CertExtensions_1;var CertExtensions=CertExtensions_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertExtensions_1.prototype);return r}return t}(Extensions);CertExtensions=CertExtensions_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CertExtensions);var CSPProvider=function(){function e(e){if(e===void 0){e={}}this.keySpec=0;this.cspName="";this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CSPProvider.prototype,"keySpec",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],CSPProvider.prototype,"cspName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CSPProvider.prototype,"signature",void 0);var AttestationIdentityKeyInfo_1;var AttestationIdentityKeyInfo=AttestationIdentityKeyInfo_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AttestationIdentityKeyInfo_1.prototype);return r}return t}(AsnArray);AttestationIdentityKeyInfo=AttestationIdentityKeyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.Any})],AttestationIdentityKeyInfo);var EndorsementKeyInfo_1;var EndorsementKeyInfo=EndorsementKeyInfo_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,EndorsementKeyInfo_1.prototype);return r}return t}(AsnArray);EndorsementKeyInfo=EndorsementKeyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.Any})],EndorsementKeyInfo);var EnrollmentNameValuePairs_1;var EnrollmentNameValuePair=function(){function e(e){if(e===void 0){e={}}this.name="";this.value="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],EnrollmentNameValuePair.prototype,"name",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],EnrollmentNameValuePair.prototype,"value",void 0);var EnrollmentNameValuePairs=EnrollmentNameValuePairs_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,EnrollmentNameValuePairs_1.prototype);return r}return t}(AsnArray);EnrollmentNameValuePairs=EnrollmentNameValuePairs_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:EnrollmentNameValuePair})],EnrollmentNameValuePairs);var NTPrincipalName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OtherName);NTPrincipalName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NTPrincipalName);var NTDSReplication=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(OtherName);NTDSReplication=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NTDSReplication);var RenewalCertificate=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Certificate);RenewalCertificate=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],RenewalCertificate);var RequestClientInfo=function(){function e(e){if(e===void 0){e={}}this.clientId=0;this.machineName="";this.userName="";this.processName="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],RequestClientInfo.prototype,"clientId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"machineName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"userName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],RequestClientInfo.prototype,"processName",void 0);var id_netscape="2.16.840.1.113730";var id_netscapeCertExtension="".concat(id_netscape,".1");var NetscapeBaseUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeBaseUrl.prototype,"value",void 0);NetscapeBaseUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeBaseUrl);var NetscapeCaPolicyUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCaPolicyUrl.prototype,"value",void 0);NetscapeCaPolicyUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCaPolicyUrl);var NetscapeCaRevocationUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCaRevocationUrl.prototype,"value",void 0);NetscapeCaRevocationUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCaRevocationUrl);var NetscapeCertRenewUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeCertRenewUrl.prototype,"value",void 0);NetscapeCertRenewUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeCertRenewUrl);var id_netscapeCertType="".concat(id_netscapeCertExtension,".1");var NetscapeCertTypeFlags;(function(e){e[e["sslClient"]=1]="sslClient";e[e["sslServer"]=2]="sslServer";e[e["sMime"]=4]="sMime";e[e["objectSigning"]=8]="objectSigning";e[e["sslCa"]=32]="sslCa";e[e["sMimeCa"]=64]="sMimeCa";e[e["objectSigningCa"]=128]="objectSigningCa"})(NetscapeCertTypeFlags||(NetscapeCertTypeFlags={}));var NetscapeCertType=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.toJSON=function(){var e=this.toNumber();var t=[];if(e&NetscapeCertTypeFlags.objectSigning){t.push("objectSigning")}if(e&NetscapeCertTypeFlags.objectSigningCa){t.push("objectSigningCa")}if(e&NetscapeCertTypeFlags.sMime){t.push("sMime")}if(e&NetscapeCertTypeFlags.sMimeCa){t.push("sMimeCa")}if(e&NetscapeCertTypeFlags.sslCa){t.push("sslCa")}if(e&NetscapeCertTypeFlags.sslClient){t.push("sslClient")}if(e&NetscapeCertTypeFlags.sslServer){t.push("sslServer")}return t};t.prototype.toString=function(){return"[".concat(this.toJSON().join(", "),"]")};return t}(BitString);var id_netscapeComment="".concat(id_netscapeCertExtension,".13");var NetscapeComment=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeComment.prototype,"value",void 0);NetscapeComment=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeComment);var NetscapeRevocationUrl=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeRevocationUrl.prototype,"value",void 0);NetscapeRevocationUrl=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeRevocationUrl);var NetscapeSSLServerName=function(){function e(e){this.value="";if(e){this.value=e}}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],NetscapeSSLServerName.prototype,"value",void 0);NetscapeSSLServerName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NetscapeSSLServerName);var id_lei="1.3.6.1.4.1.52266.1";var Lei=function(){function e(e){if(e===void 0){e={}}this.leiCode="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:PrintableString})],Lei.prototype,"leiCode",void 0);__decorate$1([AsnProp({type:PrintableString,context:0,optional:true})],Lei.prototype,"leiRole",void 0);Lei=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Lei);var BaseLeiChoice=function(){function e(e){if(e){this.text=e}}Object.defineProperty(e.prototype,"text",{get:function(){if(this.bmpString!==undefined){return this.bmpString}if(this.ia5String!==undefined){return this.ia5String}if(this.printableString!==undefined){return this.printableString}if(this.utf8String!==undefined){return this.utf8String}if(this.visibleString!==undefined){return this.visibleString}return undefined},set:function(e){this.printableString=e},enumerable:false,configurable:true});return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],BaseLeiChoice.prototype,"ia5String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.VisibleString})],BaseLeiChoice.prototype,"visibleString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],BaseLeiChoice.prototype,"bmpString",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],BaseLeiChoice.prototype,"utf8String",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],BaseLeiChoice.prototype,"printableString",void 0);BaseLeiChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],BaseLeiChoice);var LeiChoice=function(e){__extends(t,e);function t(t){var r=e.call(this)||this;if(typeof t==="string"){r.text=t}else if(t instanceof Lei){r.struct=t}return r}return t}(BaseLeiChoice);__decorate$1([AsnProp({type:Lei})],LeiChoice.prototype,"struct",void 0);LeiChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LeiChoice);var id_role="1.3.6.1.4.1.52266.2";var LeiRole=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BaseLeiChoice);LeiRole=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LeiRole);var ByteStream=function(){function e(e){this.offset=0;this.view=buildExports.BufferSourceConverter.toUint8Array(e)}Object.defineProperty(e.prototype,"position",{get:function(){return this.offset},enumerable:false,configurable:true});e.prototype.read=function(e){if(e===void 0){e=1}var t=this.view.slice(this.offset,this.offset+e);this.offset=this.offset+t.length;return t};e.prototype.readByte=function(){var e=this.read();if(!e.length){throw new Error("End of stream")}return e[0]};e.prototype.readNumber=function(e){var t=this.read(e);var r=buildExports.Convert.ToHex(t);return parseInt(r,16)};e.prototype.readEnd=function(){return this.read(this.view.length-this.offset)};e.prototype.reset=function(){this.offset=0};return e}();var Structure=function(){function e(){}e.createStream=function(e){var t=buildExports.BufferSourceConverter.toUint8Array(e);return new ByteStream(t)};return e}();var SignatureType;(function(e){e[e["certificateTimestamp"]=0]="certificateTimestamp";e[e["treeHash"]=1]="treeHash"})(SignatureType||(SignatureType={}));var HashAlgorithm;(function(e){e[e["none"]=0]="none";e[e["md5"]=1]="md5";e[e["sha1"]=2]="sha1";e[e["sha224"]=3]="sha224";e[e["sha256"]=4]="sha256";e[e["sha384"]=5]="sha384";e[e["sha512"]=6]="sha512"})(HashAlgorithm||(HashAlgorithm={}));var SignatureAlgorithm;(function(e){e[e["anonymous"]=0]="anonymous";e[e["rsa"]=1]="rsa";e[e["dsa"]=2]="dsa";e[e["ecdsa"]=3]="ecdsa"})(SignatureAlgorithm||(SignatureAlgorithm={}));var SignedCertificateTimestamp=function(e){__extends(t,e);function t(t){var r=e.call(this)||this;r.version=0;r.logId=new ArrayBuffer(32);r.timestamp=new Date;r.extensions=new ArrayBuffer(0);r.hashAlgorithm=0;r.signatureAlgorithm=0;r.signature=new ArrayBuffer(0);if(t){r.parse(t)}return r}t.prototype.parse=function(e){this.version=e.readByte();e.read(2);this.logId=buildExports.BufferSourceConverter.toArrayBuffer(e.read(32));this.timestamp=new Date(e.readNumber(8));var t=e.readNumber(2);this.extensions=e.read(t).buffer;this.hashAlgorithm=e.readByte();this.signatureAlgorithm=e.readByte();this.signature=e.read(e.readNumber(2)).buffer};t.prototype.toJSON=function(){return{version:this.version,logId:buildExports.Convert.ToHex(this.logId),timestamp:this.timestamp,extensions:buildExports.Convert.ToBase64(this.extensions),hashAlgorithm:HashAlgorithm[this.hashAlgorithm]||"undefined",signatureAlgorithm:SignatureAlgorithm[this.signatureAlgorithm]||"undefined",signature:buildExports.Convert.ToBase64(this.signature)}};return t}(Structure);var id_certificateTransparency="1.3.6.1.4.1.11129.2.4.2";var CertificateTransparency=function(e){__extends(t,e);function t(){var t=e.apply(this,arguments)||this;t.items=[];return t}t.prototype.fromASN=function(t){e.prototype.fromASN.call(this,t);var r=new ByteStream(this.buffer);var i=r.readNumber(2);this.items=[];while(r.position<i){this.items.push(new SignedCertificateTimestamp(r))}return this};t.prototype.toJSON=function(){return this.items.map((function(e){return e.toJSON()}))};return t}(OctetString);var Version$1;(function(e){e[e["v1"]=1]="v1"})(Version$1||(Version$1={}));var id_adbe_archiveRevInfo="1.2.840.113583.1.1.9.2";var ArchiveRevInfo=function(){function e(e){if(e===void 0){e={}}this.version=Version$1.v1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ArchiveRevInfo.prototype,"version",void 0);var id_adbe_timestamp="1.2.840.113583.1.1.9.1";var Timestamp=function(){function e(e){if(e===void 0){e={}}this.version=Version$1.v1;this.location=new GeneralName;this.requiresAuth=false;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],Timestamp.prototype,"version",void 0);__decorate$1([AsnProp({type:GeneralName})],Timestamp.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:false,optional:true})],Timestamp.prototype,"requiresAuth",void 0);var HashAlgAndValue=function(){function e(e){if(e===void 0){e={}}this.hashAlg=new AlgorithmIdentifier;this.hashValue=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],HashAlgAndValue.prototype,"hashAlg",void 0);__decorate$1([AsnProp({type:OctetString})],HashAlgAndValue.prototype,"hashValue",void 0);var LogotypeDetails=function(){function e(e){if(e===void 0){e={}}this.mediaType="";this.logotypeHash=[];this.logotypeURI=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],LogotypeDetails.prototype,"mediaType",void 0);__decorate$1([AsnProp({type:HashAlgAndValue,repeated:"sequence"})],LogotypeDetails.prototype,"logotypeHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,repeated:"sequence"})],LogotypeDetails.prototype,"logotypeURI",void 0);var LogotypeAudioChannels;(function(e){e[e["mono"]=1]="mono";e[e["stereo"]=2]="stereo";e[e["quad"]=4]="quad"})(LogotypeAudioChannels||(LogotypeAudioChannels={}));var LogotypeAudioInfo=function(){function e(e){if(e===void 0){e={}}this.fileSize=0;this.playTime=0;this.channels=LogotypeAudioChannels.mono;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"fileSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"playTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeAudioInfo.prototype,"channels",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,implicit:true,context:3,optional:true})],LogotypeAudioInfo.prototype,"sampleRate",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,implicit:true,context:4,optional:true})],LogotypeAudioInfo.prototype,"language",void 0);var LogotypeAudio=function(){function e(e){if(e===void 0){e={}}this.audioDetails=new LogotypeDetails;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeDetails})],LogotypeAudio.prototype,"audioDetails",void 0);__decorate$1([AsnProp({type:LogotypeAudioInfo,optional:true})],LogotypeAudio.prototype,"audioInfo",void 0);var LogotypeImageResolution=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:1,implicit:true})],LogotypeImageResolution.prototype,"numBits",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:2,implicit:true})],LogotypeImageResolution.prototype,"tableSize",void 0);LogotypeImageResolution=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LogotypeImageResolution);var LogotypeImageType;(function(e){e[e["grayScale"]=0]="grayScale";e[e["color"]=1]="color"})(LogotypeImageType||(LogotypeImageType={}));var LogotypeImageInfo=function(){function e(e){if(e===void 0){e={}}this.type=LogotypeImageType.color;this.fileSize=0;this.xSize=0;this.ySize=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,context:0,implicit:true,defaultValue:LogotypeImageType.color})],LogotypeImageInfo.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"fileSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"xSize",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],LogotypeImageInfo.prototype,"ySize",void 0);__decorate$1([AsnProp({type:LogotypeImageResolution})],LogotypeImageInfo.prototype,"resolution",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:4,implicit:true,optional:true})],LogotypeImageInfo.prototype,"language",void 0);var LogotypeImage=function(){function e(e){if(e===void 0){e={}}this.imageDetails=new LogotypeDetails;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeDetails})],LogotypeImage.prototype,"imageDetails",void 0);__decorate$1([AsnProp({type:LogotypeImageInfo,optional:true})],LogotypeImage.prototype,"imageInfo",void 0);var LogotypeData=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeImage,repeated:"sequence",optional:true})],LogotypeData.prototype,"image",void 0);__decorate$1([AsnProp({type:LogotypeAudio,repeated:"sequence",context:1,optional:true})],LogotypeData.prototype,"audio",void 0);var LogotypeReference=function(){function e(e){if(e===void 0){e={}}this.refStructHash=[];this.refStructURI=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:HashAlgAndValue,repeated:"sequence"})],LogotypeReference.prototype,"refStructHash",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,repeated:"sequence"})],LogotypeReference.prototype,"refStructURI",void 0);var LogotypeInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeData,implicit:true,context:0})],LogotypeInfo.prototype,"direct",void 0);__decorate$1([AsnProp({type:LogotypeReference,implicit:true,context:1})],LogotypeInfo.prototype,"indirect",void 0);LogotypeInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],LogotypeInfo);var OtherLogotypeInfo=function(){function e(e){if(e===void 0){e={}}this.logotypeType="";this.info=new LogotypeInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherLogotypeInfo.prototype,"logotypeType",void 0);__decorate$1([AsnProp({type:LogotypeInfo})],OtherLogotypeInfo.prototype,"info",void 0);var LogotypeExtn=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:LogotypeInfo,context:0,repeated:"sequence",optional:true})],LogotypeExtn.prototype,"communityLogos",void 0);__decorate$1([AsnProp({type:LogotypeInfo,context:1,optional:true})],LogotypeExtn.prototype,"issuerLogo",void 0);__decorate$1([AsnProp({type:LogotypeInfo,context:2,optional:true})],LogotypeExtn.prototype,"subjectLogo",void 0);__decorate$1([AsnProp({type:OtherLogotypeInfo,context:3,repeated:"sequence",optional:true})],LogotypeExtn.prototype,"otherLogos",void 0);var id_pe_logotype="1.3.6.1.5.5.7.1.12";var JWTClaimNames_1,JWTClaimPermittedValuesList_1,TNAuthorizationList_1;var id_pkix="1.3.6.1.5.5.7";var id_pe="".concat(id_pkix,".1");var JWTClaimNames=JWTClaimNames_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,JWTClaimNames_1.prototype);return r}return t}(AsnArray);JWTClaimNames=JWTClaimNames_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.IA5String})],JWTClaimNames);var JWTClaimPermittedValues=function(){function e(e){if(e===void 0){e={}}this.claim="";this.permitted=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],JWTClaimPermittedValues.prototype,"claim",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,repeated:"sequence"})],JWTClaimPermittedValues.prototype,"permitted",void 0);var JWTClaimPermittedValuesList=JWTClaimPermittedValuesList_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,JWTClaimPermittedValuesList_1.prototype);return r}return t}(AsnArray);JWTClaimPermittedValuesList=JWTClaimPermittedValuesList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:JWTClaimPermittedValues})],JWTClaimPermittedValuesList);var JWTClaimConstraints=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:JWTClaimNames,optional:true,context:0})],JWTClaimConstraints.prototype,"mustInclude",void 0);__decorate$1([AsnProp({type:JWTClaimPermittedValuesList,optional:true,context:1})],JWTClaimConstraints.prototype,"permittedValues",void 0);var id_pe_TNAuthList="".concat(id_pe,".26");var TelephoneNumberRange=function(){function e(){this.start="";this.count=2}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],TelephoneNumberRange.prototype,"start",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],TelephoneNumberRange.prototype,"count",void 0);var TNEntry=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:0})],TNEntry.prototype,"spc",void 0);__decorate$1([AsnProp({type:TelephoneNumberRange,context:1})],TNEntry.prototype,"range",void 0);__decorate$1([AsnProp({type:AsnPropTypes.IA5String,context:2})],TNEntry.prototype,"one",void 0);TNEntry=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],TNEntry);var TNAuthorizationList=TNAuthorizationList_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,TNAuthorizationList_1.prototype);return r}return t}(AsnArray);TNAuthorizationList=TNAuthorizationList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:TNEntry})],TNAuthorizationList);var IntegerSet_1;var id_ce_keyDescription="1.3.6.1.4.1.11129.2.1.17";var VerifiedBootState;(function(e){e[e["verified"]=0]="verified";e[e["selfSigned"]=1]="selfSigned";e[e["unverified"]=2]="unverified";e[e["failed"]=3]="failed"})(VerifiedBootState||(VerifiedBootState={}));var RootOfTrust=function(){function e(e){if(e===void 0){e={}}this.verifiedBootKey=new OctetString;this.deviceLocked=false;this.verifiedBootState=VerifiedBootState.verified;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],RootOfTrust.prototype,"verifiedBootKey",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean})],RootOfTrust.prototype,"deviceLocked",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],RootOfTrust.prototype,"verifiedBootState",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],RootOfTrust.prototype,"verifiedBootHash",void 0);var IntegerSet=IntegerSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,IntegerSet_1.prototype);return r}return t}(AsnArray);IntegerSet=IntegerSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:AsnPropTypes.Integer})],IntegerSet);var AuthorizationList=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({context:1,type:IntegerSet,optional:true})],AuthorizationList.prototype,"purpose",void 0);__decorate$1([AsnProp({context:2,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"algorithm",void 0);__decorate$1([AsnProp({context:3,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"keySize",void 0);__decorate$1([AsnProp({context:5,type:IntegerSet,optional:true})],AuthorizationList.prototype,"digest",void 0);__decorate$1([AsnProp({context:6,type:IntegerSet,optional:true})],AuthorizationList.prototype,"padding",void 0);__decorate$1([AsnProp({context:10,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"ecCurve",void 0);__decorate$1([AsnProp({context:200,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"rsaPublicExponent",void 0);__decorate$1([AsnProp({context:203,type:IntegerSet,optional:true})],AuthorizationList.prototype,"mgfDigest",void 0);__decorate$1([AsnProp({context:303,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"rollbackResistance",void 0);__decorate$1([AsnProp({context:305,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"earlyBootOnly",void 0);__decorate$1([AsnProp({context:400,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"activeDateTime",void 0);__decorate$1([AsnProp({context:401,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"originationExpireDateTime",void 0);__decorate$1([AsnProp({context:402,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"usageExpireDateTime",void 0);__decorate$1([AsnProp({context:405,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"usageCountLimit",void 0);__decorate$1([AsnProp({context:503,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"noAuthRequired",void 0);__decorate$1([AsnProp({context:504,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"userAuthType",void 0);__decorate$1([AsnProp({context:505,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"authTimeout",void 0);__decorate$1([AsnProp({context:506,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"allowWhileOnBody",void 0);__decorate$1([AsnProp({context:507,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"trustedUserPresenceRequired",void 0);__decorate$1([AsnProp({context:508,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"trustedConfirmationRequired",void 0);__decorate$1([AsnProp({context:509,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"unlockedDeviceRequired",void 0);__decorate$1([AsnProp({context:600,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"allApplications",void 0);__decorate$1([AsnProp({context:601,type:OctetString,optional:true})],AuthorizationList.prototype,"applicationId",void 0);__decorate$1([AsnProp({context:701,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"creationDateTime",void 0);__decorate$1([AsnProp({context:702,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"origin",void 0);__decorate$1([AsnProp({context:703,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"rollbackResistant",void 0);__decorate$1([AsnProp({context:704,type:RootOfTrust,optional:true})],AuthorizationList.prototype,"rootOfTrust",void 0);__decorate$1([AsnProp({context:705,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"osVersion",void 0);__decorate$1([AsnProp({context:706,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"osPatchLevel",void 0);__decorate$1([AsnProp({context:709,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationApplicationId",void 0);__decorate$1([AsnProp({context:710,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdBrand",void 0);__decorate$1([AsnProp({context:711,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdDevice",void 0);__decorate$1([AsnProp({context:712,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdProduct",void 0);__decorate$1([AsnProp({context:713,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdSerial",void 0);__decorate$1([AsnProp({context:714,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdImei",void 0);__decorate$1([AsnProp({context:715,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdMeid",void 0);__decorate$1([AsnProp({context:716,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdManufacturer",void 0);__decorate$1([AsnProp({context:717,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdModel",void 0);__decorate$1([AsnProp({context:718,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"vendorPatchLevel",void 0);__decorate$1([AsnProp({context:719,type:AsnPropTypes.Integer,optional:true})],AuthorizationList.prototype,"bootPatchLevel",void 0);__decorate$1([AsnProp({context:720,type:AsnPropTypes.Null,optional:true})],AuthorizationList.prototype,"deviceUniqueAttestation",void 0);__decorate$1([AsnProp({context:723,type:OctetString,optional:true})],AuthorizationList.prototype,"attestationIdSecondImei",void 0);__decorate$1([AsnProp({context:724,type:OctetString,optional:true})],AuthorizationList.prototype,"moduleHash",void 0);var SecurityLevel;(function(e){e[e["software"]=0]="software";e[e["trustedEnvironment"]=1]="trustedEnvironment";e[e["strongBox"]=2]="strongBox"})(SecurityLevel||(SecurityLevel={}));var Version;(function(e){e[e["KM2"]=1]="KM2";e[e["KM3"]=2]="KM3";e[e["KM4"]=3]="KM4";e[e["KM4_1"]=4]="KM4_1";e[e["keyMint1"]=100]="keyMint1";e[e["keyMint2"]=200]="keyMint2";e[e["keyMint3"]=300]="keyMint3";e[e["keyMint4"]=400]="keyMint4"})(Version||(Version={}));var KeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.KM4;this.attestationSecurityLevel=SecurityLevel.software;this.keymasterVersion=0;this.keymasterSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new AuthorizationList;this.teeEnforced=new AuthorizationList;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyDescription.prototype,"keymasterVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyDescription.prototype,"keymasterSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],KeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],KeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyDescription.prototype,"teeEnforced",void 0);var KeyMintKeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.keyMint4;this.attestationSecurityLevel=SecurityLevel.software;this.keyMintVersion=0;this.keyMintSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new AuthorizationList;this.hardwareEnforced=new AuthorizationList;Object.assign(this,e)}e.prototype.toLegacyKeyDescription=function(){return new KeyDescription({attestationVersion:this.attestationVersion,attestationSecurityLevel:this.attestationSecurityLevel,keymasterVersion:this.keyMintVersion,keymasterSecurityLevel:this.keyMintSecurityLevel,attestationChallenge:this.attestationChallenge,uniqueId:this.uniqueId,softwareEnforced:this.softwareEnforced,teeEnforced:this.hardwareEnforced})};e.fromLegacyKeyDescription=function(t){return new e({attestationVersion:t.attestationVersion,attestationSecurityLevel:t.attestationSecurityLevel,keyMintVersion:t.keymasterVersion,keyMintSecurityLevel:t.keymasterSecurityLevel,attestationChallenge:t.attestationChallenge,uniqueId:t.uniqueId,softwareEnforced:t.softwareEnforced,hardwareEnforced:t.teeEnforced})};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyMintKeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyMintKeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyMintKeyDescription.prototype,"keyMintVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],KeyMintKeyDescription.prototype,"keyMintSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],KeyMintKeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],KeyMintKeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyMintKeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:AuthorizationList})],KeyMintKeyDescription.prototype,"hardwareEnforced",void 0);var NonStandardAuthorizationList_1;var NonStandardAuthorization=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AuthorizationList);NonStandardAuthorization=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],NonStandardAuthorization);var NonStandardAuthorizationList=NonStandardAuthorizationList_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,NonStandardAuthorizationList_1.prototype);return r}t.prototype.findProperty=function(e){var t=this.find((function(t){return e in t}));if(t){return t[e]}return undefined};return t}(AsnArray);NonStandardAuthorizationList=NonStandardAuthorizationList_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:NonStandardAuthorization})],NonStandardAuthorizationList);var NonStandardKeyDescription=function(){function e(e){if(e===void 0){e={}}this.attestationVersion=Version.KM4;this.attestationSecurityLevel=SecurityLevel.software;this.keymasterVersion=0;this.keymasterSecurityLevel=SecurityLevel.software;this.attestationChallenge=new OctetString;this.uniqueId=new OctetString;this.softwareEnforced=new NonStandardAuthorizationList;this.teeEnforced=new NonStandardAuthorizationList;Object.assign(this,e)}Object.defineProperty(e.prototype,"keyMintVersion",{get:function(){return this.keymasterVersion},set:function(e){this.keymasterVersion=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"keyMintSecurityLevel",{get:function(){return this.keymasterSecurityLevel},set:function(e){this.keymasterSecurityLevel=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hardwareEnforced",{get:function(){return this.teeEnforced},set:function(e){this.teeEnforced=e},enumerable:false,configurable:true});return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],NonStandardKeyDescription.prototype,"attestationVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],NonStandardKeyDescription.prototype,"attestationSecurityLevel",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],NonStandardKeyDescription.prototype,"keymasterVersion",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],NonStandardKeyDescription.prototype,"keymasterSecurityLevel",void 0);__decorate$1([AsnProp({type:OctetString})],NonStandardKeyDescription.prototype,"attestationChallenge",void 0);__decorate$1([AsnProp({type:OctetString})],NonStandardKeyDescription.prototype,"uniqueId",void 0);__decorate$1([AsnProp({type:NonStandardAuthorizationList})],NonStandardKeyDescription.prototype,"softwareEnforced",void 0);__decorate$1([AsnProp({type:NonStandardAuthorizationList})],NonStandardKeyDescription.prototype,"teeEnforced",void 0);var NonStandardKeyMintKeyDescription=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}if("keymasterVersion"in t&&!("keyMintVersion"in t)){t.keyMintVersion=t.keymasterVersion}if("keymasterSecurityLevel"in t&&!("keyMintSecurityLevel"in t)){t.keyMintSecurityLevel=t.keymasterSecurityLevel}if("teeEnforced"in t&&!("hardwareEnforced"in t)){t.hardwareEnforced=t.teeEnforced}return e.call(this,t)||this}return t}(NonStandardKeyDescription);NonStandardKeyMintKeyDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],NonStandardKeyMintKeyDescription);var AttestationPackageInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.OctetString})],AttestationPackageInfo.prototype,"packageName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttestationPackageInfo.prototype,"version",void 0);var AttestationApplicationId=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttestationPackageInfo,repeated:"set"})],AttestationApplicationId.prototype,"packageInfos",void 0);__decorate$1([AsnProp({type:AsnPropTypes.OctetString,repeated:"set"})],AttestationApplicationId.prototype,"signatureDigests",void 0);var __decorate=undefined&&undefined.__decorate||function(e,t,r,i){var n=arguments.length,o=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")o=Reflect.decorate(e,t,r,i);else for(var s=e.length-1;s>=0;s--)if(a=e[s])o=(n<3?a(o):n>3?a(t,r,o):a(t,r))||o;return n>3&&o&&Object.defineProperty(t,r,o),o};var id_cabforganizationIdentifier="2.23.140.3.1";var CabforganizationIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate([AsnProp({type:AsnPropTypes.PrintableString})],CabforganizationIdentifier.prototype,"registrationSchemeIdentifier",void 0);__decorate([AsnProp({type:AsnPropTypes.PrintableString})],CabforganizationIdentifier.prototype,"registrationCountry",void 0);__decorate([AsnProp({type:AsnPropTypes.PrintableString,optional:true,context:0,implicit:true})],CabforganizationIdentifier.prototype,"registrationStateOrProvince",void 0);__decorate([AsnProp({type:AsnPropTypes.Utf8String})],CabforganizationIdentifier.prototype,"registrationReference",void 0);
107
107
  /**
108
108
  * @license
109
109
  * Copyright (c) Peculiar Ventures, LLC.
110
110
  *
111
111
  * This source code is licensed under the MIT license found in the
112
112
  * LICENSE file in the root directory of this source tree.
113
- */var __classPrivateFieldSet=undefined&&undefined.__classPrivateFieldSet||function(e,t,i,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,i):n?n.value=i:t.set(e,i),i};var __classPrivateFieldGet=undefined&&undefined.__classPrivateFieldGet||function(e,t,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(e):r?r.value:t.get(e)};var _AsnData_asn,_AsnData_raw;var AsnData=function(){function e(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}_AsnData_asn.set(this,void 0);_AsnData_raw.set(this,void 0);if(e.length===1){__classPrivateFieldSet(this,_AsnData_asn,e[0],"f");__classPrivateFieldSet(this,_AsnData_raw,AsnConvert.serialize(__classPrivateFieldGet(this,_AsnData_asn,"f")),"f")}else{__classPrivateFieldSet(this,_AsnData_asn,AsnConvert.parse(e[0],e[1]),"f");__classPrivateFieldSet(this,_AsnData_raw,buildExports.BufferSourceConverter.toArrayBuffer(e[0]),"f")}}Object.defineProperty(e.prototype,"asn",{get:function(){return __classPrivateFieldGet(this,_AsnData_asn,"f")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){return __classPrivateFieldGet(this,_AsnData_raw,"f")},enumerable:false,configurable:true});return e}();_AsnData_asn=new WeakMap,_AsnData_raw=new WeakMap;
113
+ */var __classPrivateFieldSet=undefined&&undefined.__classPrivateFieldSet||function(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r};var __classPrivateFieldGet=undefined&&undefined.__classPrivateFieldGet||function(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var _AsnData_asn,_AsnData_raw;var AsnData=function(){function e(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}_AsnData_asn.set(this,void 0);_AsnData_raw.set(this,void 0);if(e.length===1){__classPrivateFieldSet(this,_AsnData_asn,e[0],"f");__classPrivateFieldSet(this,_AsnData_raw,AsnConvert.serialize(__classPrivateFieldGet(this,_AsnData_asn,"f")),"f")}else{__classPrivateFieldSet(this,_AsnData_asn,AsnConvert.parse(e[0],e[1]),"f");__classPrivateFieldSet(this,_AsnData_raw,buildExports.BufferSourceConverter.toArrayBuffer(e[0]),"f")}}Object.defineProperty(e.prototype,"asn",{get:function(){return __classPrivateFieldGet(this,_AsnData_asn,"f")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"raw",{get:function(){return __classPrivateFieldGet(this,_AsnData_raw,"f")},enumerable:false,configurable:true});return e}();_AsnData_asn=new WeakMap,_AsnData_raw=new WeakMap;
114
114
  /**
115
115
  * @license
116
116
  * Copyright (c) Peculiar Ventures, LLC.
117
117
  *
118
118
  * This source code is licensed under the MIT license found in the
119
119
  * LICENSE file in the root directory of this source tree.
120
- */var extensionParsers=(_e={},_e[id_pe_authorityInfoAccess]=AuthorityInfoAccessSyntax,_e[id_ce_authorityKeyIdentifier]=AuthorityKeyIdentifier,_e[id_ce_basicConstraints]=BasicConstraints,_e[id_ce_certificateIssuer]=CertificateIssuer,_e[id_ce_certificatePolicies]=CertificatePolicies,_e[id_ce_cRLDistributionPoints]=CRLDistributionPoints,_e["2.5.29.46"]=CRLDistributionPoints,_e[id_ce_issuingDistributionPoint]=IssuingDistributionPoint,_e[id_ce_cRLReasons]=CRLReason,_e[id_ce_extKeyUsage]=ExtendedKeyUsage,_e[id_ce_inhibitAnyPolicy]=InhibitAnyPolicy,_e[id_ce_invalidityDate]=InvalidityDate,_e[id_ce_issuerAltName]=IssueAlternativeName,_e[id_ce_keyUsage]=KeyUsage,_e[id_ce_nameConstraints]=NameConstraints,_e[id_ce_policyConstraints]=PolicyConstraints,_e[id_ce_policyMappings]=PolicyMappings,_e[id_ce_subjectAltName]=SubjectAlternativeName,_e[id_ce_subjectDirectoryAttributes]=SubjectDirectoryAttributes,_e[id_ce_subjectKeyIdentifier]=SubjectKeyIdentifier,_e[id_pe_qcStatements]=QCStatements,_e[id_certificateTemplate]=CertificateTemplate,_e[id_enrollCertType]=EnrollCertTypeChoice,_e[id_netscapeComment]=NetscapeComment,_e[id_netscapeCertType]=NetscapeCertType,_e[id_caVersion]=CaVersion,_e[id_certificateTransparency]=CertificateTransparency,_e[id_lei]=LeiChoice,_e[id_role]=LeiRole,_e[id_adbe_timestamp]=Timestamp,_e[id_adbe_archiveRevInfo]=ArchiveRevInfo,_e[id_ce_privateKeyUsagePeriod]=PrivateKeyUsagePeriod,_e[id_entrust_entrustVersInfo]=EntrustVersionInfo,_e["2.16.724.1.2.2.4.1"]=BiometricSyntax,_e[id_pe_biometricInfo]=BiometricSyntax,_e[id_pe_logotype]=LogotypeExtn,_e[id_pe_TNAuthList]=TNAuthorizationList,_e[id_pe_subjectInfoAccess]=SubjectInfoAccessSyntax,_e[id_ce_cRLNumber]=CRLNumber,_e[id_ce_deltaCRLIndicator]=BaseCRLNumber,_e[id_ce_keyDescription]=NonStandardKeyDescription,_e[id_cabforganizationIdentifier]=CabforganizationIdentifier,_e);var Extension=function(e){__extends(t,e);function t(t){var i=e.call(this,t,Extension$1)||this;var r=i.getAsnExtnValue();try{var n=extensionParsers[i.asn.extnID];if(n){i.value=AsnParser.parse(r,n)}else{console.warn("Didn't detect parser for \"".concat(i.asn.extnID,'" extension.'));i.value=buildExports.Convert.ToHex(r)}}catch(e){console.error('Error parse "'.concat(i.asn.extnID,'" extension:'),e.message);i.value=buildExports.Convert.ToHex(r)}return i}t.prototype.getAsnExtnValue=function(){return this.asn.extnValue.buffer};return t}(AsnData);
120
+ */var extensionParsers=(_e={},_e[id_pe_authorityInfoAccess]=AuthorityInfoAccessSyntax,_e[id_ce_authorityKeyIdentifier]=AuthorityKeyIdentifier,_e[id_ce_basicConstraints]=BasicConstraints,_e[id_ce_certificateIssuer]=CertificateIssuer,_e[id_ce_certificatePolicies]=CertificatePolicies,_e[id_ce_cRLDistributionPoints]=CRLDistributionPoints,_e["2.5.29.46"]=CRLDistributionPoints,_e[id_ce_issuingDistributionPoint]=IssuingDistributionPoint,_e[id_ce_cRLReasons]=CRLReason,_e[id_ce_extKeyUsage]=ExtendedKeyUsage,_e[id_ce_inhibitAnyPolicy]=InhibitAnyPolicy,_e[id_ce_invalidityDate]=InvalidityDate,_e[id_ce_issuerAltName]=IssueAlternativeName,_e[id_ce_keyUsage]=KeyUsage,_e[id_ce_nameConstraints]=NameConstraints,_e[id_ce_policyConstraints]=PolicyConstraints,_e[id_ce_policyMappings]=PolicyMappings,_e[id_ce_subjectAltName]=SubjectAlternativeName,_e[id_ce_subjectDirectoryAttributes]=SubjectDirectoryAttributes,_e[id_ce_subjectKeyIdentifier]=SubjectKeyIdentifier,_e[id_pe_qcStatements]=QCStatements,_e[id_certificateTemplate]=CertificateTemplate,_e[id_enrollCertType]=EnrollCertTypeChoice,_e[id_netscapeComment]=NetscapeComment,_e[id_netscapeCertType]=NetscapeCertType,_e[id_caVersion]=CaVersion,_e[id_certificateTransparency]=CertificateTransparency,_e[id_lei]=LeiChoice,_e[id_role]=LeiRole,_e[id_adbe_timestamp]=Timestamp,_e[id_adbe_archiveRevInfo]=ArchiveRevInfo,_e[id_ce_privateKeyUsagePeriod]=PrivateKeyUsagePeriod,_e[id_entrust_entrustVersInfo]=EntrustVersionInfo,_e["2.16.724.1.2.2.4.1"]=BiometricSyntax,_e[id_pe_biometricInfo]=BiometricSyntax,_e[id_pe_logotype]=LogotypeExtn,_e[id_pe_TNAuthList]=TNAuthorizationList,_e[id_pe_subjectInfoAccess]=SubjectInfoAccessSyntax,_e[id_ce_cRLNumber]=CRLNumber,_e[id_ce_deltaCRLIndicator]=BaseCRLNumber,_e[id_ce_keyDescription]=NonStandardKeyDescription,_e[id_cabforganizationIdentifier]=CabforganizationIdentifier,_e);var Extension=function(e){__extends(t,e);function t(t){var r=e.call(this,t,Extension$1)||this;var i=r.getAsnExtnValue();try{var n=extensionParsers[r.asn.extnID];if(n){r.value=AsnParser.parse(i,n)}else{console.warn("Didn't detect parser for \"".concat(r.asn.extnID,'" extension.'));r.value=buildExports.Convert.ToHex(i)}}catch(e){console.error('Error parse "'.concat(r.asn.extnID,'" extension:'),e.message);r.value=buildExports.Convert.ToHex(i)}return r}t.prototype.getAsnExtnValue=function(){return this.asn.extnValue.buffer};return t}(AsnData);
121
121
  /**
122
122
  * @license
123
123
  * Copyright (c) Peculiar Ventures, LLC.
124
124
  *
125
125
  * This source code is licensed under the MIT license found in the
126
126
  * LICENSE file in the root directory of this source tree.
127
- */var rPaddingTag="-{5}";var rEolChars="\\n";var rNameTag="[^".concat(rEolChars,"]+");var rBeginTag="".concat(rPaddingTag,"BEGIN (").concat(rNameTag,"(?=").concat(rPaddingTag,"))").concat(rPaddingTag);var rEndTag="".concat(rPaddingTag,"END \\1").concat(rPaddingTag);var rEolGroup="\\n";var rHeaderKey="[^:".concat(rEolChars,"]+");var rHeaderValue="(?:[^".concat(rEolChars,"]+").concat(rEolGroup,"(?: +[^").concat(rEolChars,"]+").concat(rEolGroup,")*)");var rBase64Chars="[a-zA-Z0-9=+/]+";var rBase64="(?:".concat(rBase64Chars).concat(rEolGroup,")+");var rPem="".concat(rBeginTag).concat(rEolGroup,"(?:((?:").concat(rHeaderKey,": ").concat(rHeaderValue,")+))?").concat(rEolGroup,"?(").concat(rBase64,")").concat(rEndTag);var PemConverter=function(){function e(){}e.isPem=function(e){return typeof e==="string"&&new RegExp(rPem,"g").test(e.replace(/\r/g,""))};e.decodeWithHeaders=function(e){e=e.replace(/\r/g,"");var t=new RegExp(rPem,"g");var i=[];var r=null;while(r=t.exec(e)){var n=r[3].replace(new RegExp("[".concat(rEolChars,"]+"),"g"),"");var o={type:r[1],headers:[],rawData:buildExports.Convert.FromBase64(n)};var a=r[2];if(a){var s=a.split(new RegExp(rEolGroup,"g"));var c=null;for(var u=0,p=s;u<p.length;u++){var f=p[u];var d=f.split(/:(.*)/),l=d[0],y=d[1];if(y===undefined){if(!c){throw new Error("Cannot parse PEM string. Incorrect header value")}c.value+=l.trim()}else{if(c){o.headers.push(c)}c={key:l,value:y.trim()}}}if(c){o.headers.push(c)}}i.push(o)}return i};e.decode=function(e){var t=this.decodeWithHeaders(e);return t.map((function(e){return e.rawData}))};e.encode=function(e,t){var i=this;if(Array.isArray(e)){var r=new Array;if(t){e.forEach((function(e){if(!buildExports.BufferSourceConverter.isBufferSource(e)){throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource")}r.push(i.encodeStruct({type:t,rawData:buildExports.BufferSourceConverter.toArrayBuffer(e)}))}))}else{e.forEach((function(e){if(!("type"in e)){throw new TypeError("Cannot encode array of IPemStruct in PEM format. Not all items of the array are PemStrut")}r.push(i.encodeStruct(e))}))}return r.join("\n")}if(!t){throw new Error("Required argument 'tag' is missed")}return this.encodeStruct({type:t,rawData:buildExports.BufferSourceConverter.toArrayBuffer(e)})};e.encodeStruct=function(e){var t;var i=e.type.toLocaleUpperCase();var r=[];r.push("-----BEGIN ".concat(i,"-----"));if((t=e.headers)===null||t===void 0?void 0:t.length){for(var n=0,o=e.headers;n<o.length;n++){var a=o[n];r.push("".concat(a.key,": ").concat(a.value))}r.push("")}var s=buildExports.Convert.ToBase64(e.rawData);var c;var u=0;var p=Array();while(u<s.length){if(s.length-u<64){c=s.substring(u)}else{c=s.substring(u,u+64);u+=64}if(c.length!==0){p.push(c);if(c.length<64){break}}else{break}}r.push.apply(r,p);r.push("-----END ".concat(i,"-----"));return r.join("\n")};return e}();PemConverter.CertificateTag="CERTIFICATE";PemConverter.CrlTag="CRL";PemConverter.CertificateRequestTag="CERTIFICATE REQUEST";PemConverter.AttributeCertificateTag="ATTRIBUTE CERTIFICATE";
127
+ */var rPaddingTag="-{5}";var rEolChars="\\n";var rNameTag="[^".concat(rEolChars,"]+");var rBeginTag="".concat(rPaddingTag,"BEGIN (").concat(rNameTag,"(?=").concat(rPaddingTag,"))").concat(rPaddingTag);var rEndTag="".concat(rPaddingTag,"END \\1").concat(rPaddingTag);var rEolGroup="\\n";var rHeaderKey="[^:".concat(rEolChars,"]+");var rHeaderValue="(?:[^".concat(rEolChars,"]+").concat(rEolGroup,"(?: +[^").concat(rEolChars,"]+").concat(rEolGroup,")*)");var rBase64Chars="[a-zA-Z0-9=+/]+";var rBase64="(?:".concat(rBase64Chars).concat(rEolGroup,")+");var rPem="".concat(rBeginTag).concat(rEolGroup,"(?:((?:").concat(rHeaderKey,": ").concat(rHeaderValue,")+))?").concat(rEolGroup,"?(").concat(rBase64,")").concat(rEndTag);var PemConverter=function(){function e(){}e.isPem=function(e){return typeof e==="string"&&new RegExp(rPem,"g").test(e.replace(/\r/g,""))};e.decodeWithHeaders=function(e){e=e.replace(/\r/g,"");var t=new RegExp(rPem,"g");var r=[];var i=null;while(i=t.exec(e)){var n=i[3].replace(new RegExp("[".concat(rEolChars,"]+"),"g"),"");var o={type:i[1],headers:[],rawData:buildExports.Convert.FromBase64(n)};var a=i[2];if(a){var s=a.split(new RegExp(rEolGroup,"g"));var c=null;for(var u=0,p=s;u<p.length;u++){var f=p[u];var d=f.split(/:(.*)/),l=d[0],y=d[1];if(y===undefined){if(!c){throw new Error("Cannot parse PEM string. Incorrect header value")}c.value+=l.trim()}else{if(c){o.headers.push(c)}c={key:l,value:y.trim()}}}if(c){o.headers.push(c)}}r.push(o)}return r};e.decode=function(e){var t=this.decodeWithHeaders(e);return t.map((function(e){return e.rawData}))};e.encode=function(e,t){var r=this;if(Array.isArray(e)){var i=new Array;if(t){e.forEach((function(e){if(!buildExports.BufferSourceConverter.isBufferSource(e)){throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource")}i.push(r.encodeStruct({type:t,rawData:buildExports.BufferSourceConverter.toArrayBuffer(e)}))}))}else{e.forEach((function(e){if(!("type"in e)){throw new TypeError("Cannot encode array of IPemStruct in PEM format. Not all items of the array are PemStrut")}i.push(r.encodeStruct(e))}))}return i.join("\n")}if(!t){throw new Error("Required argument 'tag' is missed")}return this.encodeStruct({type:t,rawData:buildExports.BufferSourceConverter.toArrayBuffer(e)})};e.encodeStruct=function(e){var t;var r=e.type.toLocaleUpperCase();var i=[];i.push("-----BEGIN ".concat(r,"-----"));if((t=e.headers)===null||t===void 0?void 0:t.length){for(var n=0,o=e.headers;n<o.length;n++){var a=o[n];i.push("".concat(a.key,": ").concat(a.value))}i.push("")}var s=buildExports.Convert.ToBase64(e.rawData);var c;var u=0;var p=Array();while(u<s.length){if(s.length-u<64){c=s.substring(u)}else{c=s.substring(u,u+64);u+=64}if(c.length!==0){p.push(c);if(c.length<64){break}}else{break}}i.push.apply(i,p);i.push("-----END ".concat(r,"-----"));return i.join("\n")};return e}();PemConverter.CertificateTag="CERTIFICATE";PemConverter.CrlTag="CRL";PemConverter.CertificateRequestTag="CERTIFICATE REQUEST";PemConverter.AttributeCertificateTag="ATTRIBUTE CERTIFICATE";
128
128
  /**
129
129
  * @license
130
130
  * Copyright (c) Peculiar Ventures, LLC.
131
131
  *
132
132
  * This source code is licensed under the MIT license found in the
133
133
  * LICENSE file in the root directory of this source tree.
134
- */var CryptoProvider=function(){function e(){this.providers=new Map;var t=window.crypto||window.msCrypto;if(typeof t!=="undefined"){this.set(e.DEFAULT,t)}}e.isCryptoKeyPair=function(e){return e&&typeof e==="object"&&"privateKey"in e&&"publicKey"in e};e.prototype.get=function(t){if(t===void 0){t=e.DEFAULT}var i=this.providers.get(t.toLowerCase());if(!i){throw new Error("Cannot get Crypto by name '".concat(t,"'"))}return i};e.prototype.set=function(t,i){if(typeof t==="string"){if(!i){throw new TypeError("Argument 'value' is required")}this.providers.set(t.toLowerCase(),i)}else{this.providers.set(e.DEFAULT,t)}return this};return e}();CryptoProvider.DEFAULT="default";var cryptoProvider=new CryptoProvider;
134
+ */var CryptoProvider=function(){function e(){this.providers=new Map;var t=window.crypto||window.msCrypto;if(typeof t!=="undefined"){this.set(e.DEFAULT,t)}}e.isCryptoKeyPair=function(e){return e&&typeof e==="object"&&"privateKey"in e&&"publicKey"in e};e.prototype.get=function(t){if(t===void 0){t=e.DEFAULT}var r=this.providers.get(t.toLowerCase());if(!r){throw new Error("Cannot get Crypto by name '".concat(t,"'"))}return r};e.prototype.set=function(t,r){if(typeof t==="string"){if(!r){throw new TypeError("Argument 'value' is required")}this.providers.set(t.toLowerCase(),r)}else{this.providers.set(e.DEFAULT,t)}return this};return e}();CryptoProvider.DEFAULT="default";var cryptoProvider=new CryptoProvider;
135
135
  /**
136
136
  * @license
137
137
  * Copyright (c) Peculiar Ventures, LLC.
138
138
  *
139
139
  * This source code is licensed under the MIT license found in the
140
140
  * LICENSE file in the root directory of this source tree.
141
- */var certificateRawToBuffer=function(e){if(PemConverter.isPem(e)){return PemConverter.decode(e)[0]}if(buildExports.Convert.isHex(e)){return buildExports.Convert.FromHex(e)}if(buildExports.Convert.isBase64(e)){return buildExports.Convert.FromBase64(e)}if(buildExports.Convert.isBase64Url(e)){return buildExports.Convert.FromBase64Url(e)}return buildExports.Convert.FromBinary(e)};var getCertificateThumbprint=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var i;return __generator(this,(function(r){i=cryptoProvider.get();if(i.subtle){return[2,i.subtle.digest(e,t)]}return[2,undefined]}))}))};var ACClearAttrs=function(){function e(e){if(e===void 0){e={}}this.acIssuer=new GeneralName;this.acSerial=0;this.attrs=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],ACClearAttrs.prototype,"acIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ACClearAttrs.prototype,"acSerial",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],ACClearAttrs.prototype,"attrs",void 0);var AttrSpec_1;var AttrSpec=AttrSpec_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,AttrSpec_1.prototype);return i}return t}(AsnArray);AttrSpec=AttrSpec_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],AttrSpec);var AAControls=function(){function e(e){if(e===void 0){e={}}this.permitUnSpecified=true;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],AAControls.prototype,"pathLenConstraint",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:0,optional:true})],AAControls.prototype,"permittedAttrs",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:1,optional:true})],AAControls.prototype,"excludedAttrs",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:true})],AAControls.prototype,"permitUnSpecified",void 0);var IssuerSerial=function(){function e(e){if(e===void 0){e={}}this.issuer=new GeneralNames;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames})],IssuerSerial.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerSerial.prototype,"serial",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],IssuerSerial.prototype,"issuerUID",void 0);var DigestedObjectType;(function(e){e[e["publicKey"]=0]="publicKey";e[e["publicKeyCert"]=1]="publicKeyCert";e[e["otherObjectTypes"]=2]="otherObjectTypes"})(DigestedObjectType||(DigestedObjectType={}));var ObjectDigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestedObjectType=DigestedObjectType.publicKey;this.digestAlgorithm=new AlgorithmIdentifier;this.objectDigest=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],ObjectDigestInfo.prototype,"digestedObjectType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],ObjectDigestInfo.prototype,"otherObjectTypeID",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],ObjectDigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],ObjectDigestInfo.prototype,"objectDigest",void 0);var V2Form=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,optional:true})],V2Form.prototype,"issuerName",void 0);__decorate$1([AsnProp({type:IssuerSerial,context:0,implicit:true,optional:true})],V2Form.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,context:1,implicit:true,optional:true})],V2Form.prototype,"objectDigestInfo",void 0);var AttCertIssuer=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,repeated:"sequence"})],AttCertIssuer.prototype,"v1Form",void 0);__decorate$1([AsnProp({type:V2Form,context:0,implicit:true})],AttCertIssuer.prototype,"v2Form",void 0);AttCertIssuer=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttCertIssuer);var AttCertValidityPeriod=function(){function e(e){if(e===void 0){e={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notBeforeTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notAfterTime",void 0);var Holder=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial,implicit:true,context:0,optional:true})],Holder.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:1,optional:true})],Holder.prototype,"entityName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,implicit:true,context:2,optional:true})],Holder.prototype,"objectDigestInfo",void 0);var AttCertVersion;(function(e){e[e["v2"]=1]="v2"})(AttCertVersion||(AttCertVersion={}));var AttributeCertificateInfo=function(){function e(e){if(e===void 0){e={}}this.version=AttCertVersion.v2;this.holder=new Holder;this.issuer=new AttCertIssuer;this.signature=new AlgorithmIdentifier;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new AttCertValidityPeriod;this.attributes=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttributeCertificateInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Holder})],AttributeCertificateInfo.prototype,"holder",void 0);__decorate$1([AsnProp({type:AttCertIssuer})],AttributeCertificateInfo.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificateInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],AttributeCertificateInfo.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AttCertValidityPeriod})],AttributeCertificateInfo.prototype,"attrCertValidityPeriod",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],AttributeCertificateInfo.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],AttributeCertificateInfo.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,optional:true})],AttributeCertificateInfo.prototype,"extensions",void 0);var AttributeCertificate=function(){function e(e){if(e===void 0){e={}}this.acinfo=new AttributeCertificateInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttributeCertificateInfo})],AttributeCertificate.prototype,"acinfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],AttributeCertificate.prototype,"signatureValue",void 0);var ClassListFlags;(function(e){e[e["unmarked"]=1]="unmarked";e[e["unclassified"]=2]="unclassified";e[e["restricted"]=4]="restricted";e[e["confidential"]=8]="confidential";e[e["secret"]=16]="secret";e[e["topSecret"]=32]="topSecret"})(ClassListFlags||(ClassListFlags={}));var ClassList=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BitString);var SecurityCategory=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,implicit:true,context:0})],SecurityCategory.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,implicit:true,context:1})],SecurityCategory.prototype,"value",void 0);var Clearance=function(){function e(e){if(e===void 0){e={}}this.policyId="";this.classList=new ClassList(ClassListFlags.unclassified);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Clearance.prototype,"policyId",void 0);__decorate$1([AsnProp({type:ClassList,defaultValue:new ClassList(ClassListFlags.unclassified)})],Clearance.prototype,"classList",void 0);__decorate$1([AsnProp({type:SecurityCategory,repeated:"set"})],Clearance.prototype,"securityCategories",void 0);var IetfAttrSyntaxValueChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],IetfAttrSyntaxValueChoices.prototype,"cotets",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],IetfAttrSyntaxValueChoices.prototype,"oid",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],IetfAttrSyntaxValueChoices.prototype,"string",void 0);var IetfAttrSyntax=function(){function e(e){if(e===void 0){e={}}this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],IetfAttrSyntax.prototype,"policyAuthority",void 0);__decorate$1([AsnProp({type:IetfAttrSyntaxValueChoices,repeated:"sequence"})],IetfAttrSyntax.prototype,"values",void 0);var Targets_1;var TargetCert=function(){function e(e){if(e===void 0){e={}}this.targetCertificate=new IssuerSerial;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial})],TargetCert.prototype,"targetCertificate",void 0);__decorate$1([AsnProp({type:GeneralName,optional:true})],TargetCert.prototype,"targetName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,optional:true})],TargetCert.prototype,"certDigestInfo",void 0);var Target=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,implicit:true})],Target.prototype,"targetName",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,implicit:true})],Target.prototype,"targetGroup",void 0);__decorate$1([AsnProp({type:TargetCert,context:2,implicit:true})],Target.prototype,"targetCert",void 0);Target=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Target);var Targets=Targets_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Targets_1.prototype);return i}return t}(AsnArray);Targets=Targets_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Target})],Targets);var ProxyInfo_1;var ProxyInfo=ProxyInfo_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,ProxyInfo_1.prototype);return i}return t}(AsnArray);ProxyInfo=ProxyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Targets})],ProxyInfo);var RoleSyntax=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],RoleSyntax.prototype,"roleAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,implicit:true,context:1})],RoleSyntax.prototype,"roleName",void 0);var SvceAuthInfo=function(){function e(e){if(e===void 0){e={}}this.service=new GeneralName;this.ident=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"service",void 0);__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"ident",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],SvceAuthInfo.prototype,"authInfo",void 0);var id_ntQWAC="0.4.0.9496";var id_ActivityDescription="".concat(id_ntQWAC,".6");var ActivityDescription=function(){function e(e){if(e===void 0){e={}}this.codeAuthority=new GeneralName;this.codeId=new GeneralName;this.shortName="";this.shortDescription="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],ActivityDescription.prototype,"codeAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],ActivityDescription.prototype,"codeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:2})],ActivityDescription.prototype,"shortName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:3})],ActivityDescription.prototype,"shortDescription",void 0);ActivityDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ActivityDescription);var DomainName=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name$1.prototype);return i}return t}(Name$1);DomainName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainName);var id_DomainNameBeneficiary="".concat(id_ntQWAC,".1");var DomainNameBeneficiary=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name$1.prototype);return i}return t}(DomainName);DomainNameBeneficiary=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameBeneficiary);var id_DomainNameLegalRepresentative="".concat(id_ntQWAC,".2");var DomainNameLegalRepresentative=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name$1.prototype);return i}return t}(DomainName);DomainNameLegalRepresentative=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameLegalRepresentative);var id_DomainNameOwner="".concat(id_ntQWAC,".3");var DomainNameOwner=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name$1.prototype);return i}return t}(DomainName);DomainNameOwner=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameOwner);var id_DomainNameTechnicalOperator="".concat(id_ntQWAC,".4");var DomainNameTechnicalOperator=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Name$1.prototype);return i}return t}(DomainName);DomainNameTechnicalOperator=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameTechnicalOperator);var id_InsuranceValue="".concat(id_ntQWAC,".8");var InsuranceValue=function(){function e(e){if(e===void 0){e={}}this.location="";this.base=0;this.degree=0;Object.assign(this,e)}e.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],InsuranceValue.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"degree",void 0);InsuranceValue=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],InsuranceValue);var id_ValuationRanking="".concat(id_ntQWAC,".9");var ValuationRanking=function(){function e(e){if(e===void 0){e={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars5",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars4",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars3",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars1",void 0);ValuationRanking=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ValuationRanking);var id_TypeRelationship="".concat(id_ntQWAC,".5");var TypeRelationship=function(){function e(e){if(e===void 0){e={}}this.DNBvsDNO=new BitString(0);this.DNBvsDNT=new BitString(0);this.DNOvsDNT=new BitString(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:BitString,context:0})],TypeRelationship.prototype,"DNBvsDNO",void 0);__decorate$1([AsnProp({type:BitString,context:1})],TypeRelationship.prototype,"DNBvsDNT",void 0);__decorate$1([AsnProp({type:BitString,context:2})],TypeRelationship.prototype,"DNOvsDNT",void 0);TypeRelationship=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],TypeRelationship);var id_WebGDPR="".concat(id_ntQWAC,".7");var WebGDPR=function(){function e(e){if(e===void 0){e={}}this.assessmentAuthority=new GeneralName;this.assessmentRef=new GeneralName;this.assessmentLocation=new GeneralName;this.dataStorageTerritory="";this.description="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],WebGDPR.prototype,"assessmentAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],WebGDPR.prototype,"assessmentRef",void 0);__decorate$1([AsnProp({type:GeneralName,context:2})],WebGDPR.prototype,"assessmentLocation",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString,context:3})],WebGDPR.prototype,"dataStorageTerritory",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:4})],WebGDPR.prototype,"description",void 0);WebGDPR=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],WebGDPR);var IssuerAndSerialNumber=function(){function e(e){if(e===void 0){e={}}this.issuer=new Name$1;this.serialNumber=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Name$1})],IssuerAndSerialNumber.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerAndSerialNumber.prototype,"serialNumber",void 0);var SignerIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],SignerIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],SignerIdentifier.prototype,"issuerAndSerialNumber",void 0);SignerIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SignerIdentifier);var CMSVersion;(function(e){e[e["v0"]=0]="v0";e[e["v1"]=1]="v1";e[e["v2"]=2]="v2";e[e["v3"]=3]="v3";e[e["v4"]=4]="v4";e[e["v5"]=5]="v5"})(CMSVersion||(CMSVersion={}));var DigestAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);DigestAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DigestAlgorithmIdentifier);var SignatureAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SignatureAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SignatureAlgorithmIdentifier);var KeyEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyEncryptionAlgorithmIdentifier);var ContentEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);ContentEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ContentEncryptionAlgorithmIdentifier);var MessageAuthenticationCodeAlgorithm=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);MessageAuthenticationCodeAlgorithm=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],MessageAuthenticationCodeAlgorithm);var KeyDerivationAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyDerivationAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyDerivationAlgorithmIdentifier);var Attribute=function(){function e(e){if(e===void 0){e={}}this.attrType="";this.attrValues=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute.prototype,"attrType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute.prototype,"attrValues",void 0);var SignerInfos_1;var SignerInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.sid=new SignerIdentifier;this.digestAlgorithm=new DigestAlgorithmIdentifier;this.signatureAlgorithm=new SignatureAlgorithmIdentifier;this.signature=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignerInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:SignerIdentifier})],SignerInfo.prototype,"sid",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifier})],SignerInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:0,implicit:true,optional:true})],SignerInfo.prototype,"signedAttrs",void 0);__decorate$1([AsnProp({type:SignatureAlgorithmIdentifier})],SignerInfo.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],SignerInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:1,implicit:true,optional:true})],SignerInfo.prototype,"unsignedAttrs",void 0);var SignerInfos=SignerInfos_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SignerInfos_1.prototype);return i}return t}(AsnArray);SignerInfos=SignerInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:SignerInfo})],SignerInfos);var SigningTime$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime$1);var CounterSignature$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature$1);var CertificateSet_1;var OtherCertificateFormat=function(){function e(e){if(e===void 0){e={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherCertificateFormat.prototype,"otherCertFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherCertificateFormat.prototype,"otherCert",void 0);var CertificateChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Certificate})],CertificateChoices.prototype,"certificate",void 0);__decorate$1([AsnProp({type:AttributeCertificate,context:2,implicit:true})],CertificateChoices.prototype,"v2AttrCert",void 0);__decorate$1([AsnProp({type:OtherCertificateFormat,context:3,implicit:true})],CertificateChoices.prototype,"other",void 0);CertificateChoices=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CertificateChoices);var CertificateSet=CertificateSet_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,CertificateSet_1.prototype);return i}return t}(AsnArray);CertificateSet=CertificateSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:CertificateChoices})],CertificateSet);var ContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],ContentInfo.prototype,"content",void 0);var EncapsulatedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],EncapsulatedContent.prototype,"single",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],EncapsulatedContent.prototype,"any",void 0);EncapsulatedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncapsulatedContent);var EncapsulatedContentInfo=function(){function e(e){if(e===void 0){e={}}this.eContentType="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncapsulatedContentInfo.prototype,"eContentType",void 0);__decorate$1([AsnProp({type:EncapsulatedContent,context:0,optional:true})],EncapsulatedContentInfo.prototype,"eContent",void 0);var EncryptedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString,context:0,implicit:true,optional:true})],EncryptedContent.prototype,"value",void 0);__decorate$1([AsnProp({type:OctetString,converter:AsnConstructedOctetStringConverter,context:0,implicit:true,optional:true,repeated:"sequence"})],EncryptedContent.prototype,"constructedValue",void 0);EncryptedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncryptedContent);var EncryptedContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.contentEncryptionAlgorithm=new ContentEncryptionAlgorithmIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncryptedContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:ContentEncryptionAlgorithmIdentifier})],EncryptedContentInfo.prototype,"contentEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedContent,optional:true})],EncryptedContentInfo.prototype,"encryptedContent",void 0);var OtherKeyAttribute=function(){function e(e){if(e===void 0){e={}}this.keyAttrId="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherKeyAttribute.prototype,"keyAttrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],OtherKeyAttribute.prototype,"keyAttr",void 0);var RecipientEncryptedKeys_1;var RecipientKeyIdentifier=function(){function e(e){if(e===void 0){e={}}this.subjectKeyIdentifier=new SubjectKeyIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier})],RecipientKeyIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],RecipientKeyIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],RecipientKeyIdentifier.prototype,"other",void 0);var KeyAgreeRecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:RecipientKeyIdentifier,context:0,implicit:true,optional:true})],KeyAgreeRecipientIdentifier.prototype,"rKeyId",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],KeyAgreeRecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);KeyAgreeRecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],KeyAgreeRecipientIdentifier);var RecipientEncryptedKey=function(){function e(e){if(e===void 0){e={}}this.rid=new KeyAgreeRecipientIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyAgreeRecipientIdentifier})],RecipientEncryptedKey.prototype,"rid",void 0);__decorate$1([AsnProp({type:OctetString})],RecipientEncryptedKey.prototype,"encryptedKey",void 0);var RecipientEncryptedKeys=RecipientEncryptedKeys_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,RecipientEncryptedKeys_1.prototype);return i}return t}(AsnArray);RecipientEncryptedKeys=RecipientEncryptedKeys_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RecipientEncryptedKey})],RecipientEncryptedKeys);var OriginatorPublicKey=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.publicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],OriginatorPublicKey.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],OriginatorPublicKey.prototype,"publicKey",void 0);var OriginatorIdentifierOrKey=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:OriginatorPublicKey,context:1,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"originatorKey",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],OriginatorIdentifierOrKey.prototype,"issuerAndSerialNumber",void 0);OriginatorIdentifierOrKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],OriginatorIdentifierOrKey);var KeyAgreeRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v3;this.originator=new OriginatorIdentifierOrKey;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.recipientEncryptedKeys=new RecipientEncryptedKeys;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyAgreeRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorIdentifierOrKey,context:0})],KeyAgreeRecipientInfo.prototype,"originator",void 0);__decorate$1([AsnProp({type:OctetString,context:1,optional:true})],KeyAgreeRecipientInfo.prototype,"ukm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyAgreeRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:RecipientEncryptedKeys})],KeyAgreeRecipientInfo.prototype,"recipientEncryptedKeys",void 0);var RecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],RecipientIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],RecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);RecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientIdentifier);var KeyTransRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.rid=new RecipientIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyTransRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:RecipientIdentifier})],KeyTransRecipientInfo.prototype,"rid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyTransRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KeyTransRecipientInfo.prototype,"encryptedKey",void 0);var KEKIdentifier=function(){function e(e){if(e===void 0){e={}}this.keyIdentifier=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],KEKIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],KEKIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],KEKIdentifier.prototype,"other",void 0);var KEKRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v4;this.kekid=new KEKIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KEKRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KEKIdentifier})],KEKRecipientInfo.prototype,"kekid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KEKRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KEKRecipientInfo.prototype,"encryptedKey",void 0);var PasswordRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PasswordRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KeyDerivationAlgorithmIdentifier,context:0,optional:true})],PasswordRecipientInfo.prototype,"keyDerivationAlgorithm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],PasswordRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],PasswordRecipientInfo.prototype,"encryptedKey",void 0);var OtherRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRecipientInfo.prototype,"oriType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRecipientInfo.prototype,"oriValue",void 0);var RecipientInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyTransRecipientInfo,optional:true})],RecipientInfo.prototype,"ktri",void 0);__decorate$1([AsnProp({type:KeyAgreeRecipientInfo,context:1,implicit:true,optional:true})],RecipientInfo.prototype,"kari",void 0);__decorate$1([AsnProp({type:KEKRecipientInfo,context:2,implicit:true,optional:true})],RecipientInfo.prototype,"kekri",void 0);__decorate$1([AsnProp({type:PasswordRecipientInfo,context:3,implicit:true,optional:true})],RecipientInfo.prototype,"pwri",void 0);__decorate$1([AsnProp({type:OtherRecipientInfo,context:4,implicit:true,optional:true})],RecipientInfo.prototype,"ori",void 0);RecipientInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientInfo);var RecipientInfos_1;var RecipientInfos=RecipientInfos_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,RecipientInfos_1.prototype);return i}return t}(AsnArray);RecipientInfos=RecipientInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RecipientInfo})],RecipientInfos);var RevocationInfoChoices_1;var OtherRevocationInfoFormat=function(){function e(e){if(e===void 0){e={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRevocationInfoFormat.prototype,"otherRevInfoFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRevocationInfoFormat.prototype,"otherRevInfo",void 0);var RevocationInfoChoice=function(){function e(e){if(e===void 0){e={}}this.other=new OtherRevocationInfoFormat;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherRevocationInfoFormat,context:1,implicit:true})],RevocationInfoChoice.prototype,"other",void 0);RevocationInfoChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RevocationInfoChoice);var RevocationInfoChoices=RevocationInfoChoices_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,RevocationInfoChoices_1.prototype);return i}return t}(AsnArray);RevocationInfoChoices=RevocationInfoChoices_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RevocationInfoChoice})],RevocationInfoChoices);var OriginatorInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],OriginatorInfo.prototype,"certs",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],OriginatorInfo.prototype,"crls",void 0);var UnprotectedAttributes_1;var UnprotectedAttributes=UnprotectedAttributes_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,UnprotectedAttributes_1.prototype);return i}return t}(AsnArray);UnprotectedAttributes=UnprotectedAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],UnprotectedAttributes);var EnvelopedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.recipientInfos=new RecipientInfos;this.encryptedContentInfo=new EncryptedContentInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],EnvelopedData.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorInfo,context:0,implicit:true,optional:true})],EnvelopedData.prototype,"originatorInfo",void 0);__decorate$1([AsnProp({type:RecipientInfos})],EnvelopedData.prototype,"recipientInfos",void 0);__decorate$1([AsnProp({type:EncryptedContentInfo})],EnvelopedData.prototype,"encryptedContentInfo",void 0);__decorate$1([AsnProp({type:UnprotectedAttributes,context:1,implicit:true,optional:true})],EnvelopedData.prototype,"unprotectedAttrs",void 0);var DigestAlgorithmIdentifiers_1;var DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,DigestAlgorithmIdentifiers_1.prototype);return i}return t}(AsnArray);DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:DigestAlgorithmIdentifier})],DigestAlgorithmIdentifiers);var SignedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.digestAlgorithms=new DigestAlgorithmIdentifiers;this.encapContentInfo=new EncapsulatedContentInfo;this.signerInfos=new SignerInfos;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignedData.prototype,"version",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifiers})],SignedData.prototype,"digestAlgorithms",void 0);__decorate$1([AsnProp({type:EncapsulatedContentInfo})],SignedData.prototype,"encapContentInfo",void 0);__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],SignedData.prototype,"certificates",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],SignedData.prototype,"crls",void 0);__decorate$1([AsnProp({type:SignerInfos})],SignedData.prototype,"signerInfos",void 0);var PKCS12AttrSet_1;var PKCS12Attribute=function(){function e(e){if(e===void 0){e={}}this.attrId="";this.attrValues=[];Object.assign(e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PKCS12Attribute.prototype,"attrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],PKCS12Attribute.prototype,"attrValues",void 0);var PKCS12AttrSet=PKCS12AttrSet_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,PKCS12AttrSet_1.prototype);return i}return t}(AsnArray);PKCS12AttrSet=PKCS12AttrSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PKCS12Attribute})],PKCS12AttrSet);var AuthenticatedSafe_1;var AuthenticatedSafe=AuthenticatedSafe_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,AuthenticatedSafe_1.prototype);return i}return t}(AsnArray);AuthenticatedSafe=AuthenticatedSafe_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:ContentInfo})],AuthenticatedSafe);var CertBag=function(){function e(e){if(e===void 0){e={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertBag.prototype,"certId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CertBag.prototype,"certValue",void 0);var CRLBag=function(){function e(e){if(e===void 0){e={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CRLBag.prototype,"crlId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CRLBag.prototype,"crltValue",void 0);var KeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PrivateKeyInfo$1);KeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyBag);var PKCS8ShroudedKeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);PKCS8ShroudedKeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PKCS8ShroudedKeyBag);var SecretBag=function(){function e(e){if(e===void 0){e={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SecretBag.prototype,"secretTypeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SecretBag.prototype,"secretValue",void 0);var MacData=function(){function e(e){if(e===void 0){e={}}this.mac=new DigestInfo;this.macSalt=new OctetString;this.iterations=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DigestInfo})],MacData.prototype,"mac",void 0);__decorate$1([AsnProp({type:OctetString})],MacData.prototype,"macSalt",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,defaultValue:1})],MacData.prototype,"iterations",void 0);var PFX=function(){function e(e){if(e===void 0){e={}}this.version=3;this.authSafe=new ContentInfo;this.macData=new MacData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PFX.prototype,"version",void 0);__decorate$1([AsnProp({type:ContentInfo})],PFX.prototype,"authSafe",void 0);__decorate$1([AsnProp({type:MacData,optional:true})],PFX.prototype,"macData",void 0);var SafeContents_1;var SafeBag=function(){function e(e){if(e===void 0){e={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SafeBag.prototype,"bagId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SafeBag.prototype,"bagValue",void 0);__decorate$1([AsnProp({type:PKCS12Attribute,repeated:"set",optional:true})],SafeBag.prototype,"bagAttributes",void 0);var SafeContents=SafeContents_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SafeContents_1.prototype);return i}return t}(AsnArray);SafeContents=SafeContents_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SafeBag})],SafeContents);var ExtensionRequest_1,ExtendedCertificateAttributes_1,SMIMECapabilities_1;var id_pkcs9="1.2.840.113549.1.9";var id_pkcs9_at_unstructuredName="".concat(id_pkcs9,".2");var id_pkcs9_at_challengePassword="".concat(id_pkcs9,".7");var id_pkcs9_at_extensionRequest="".concat(id_pkcs9,".14");var PKCS9String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}return e.call(this,t)||this}t.prototype.toString=function(){return this.ia5String||e.prototype.toString.call(this)};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],PKCS9String.prototype,"ia5String",void 0);PKCS9String=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PKCS9String);var Pkcs7PDU=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ContentInfo);Pkcs7PDU=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Pkcs7PDU);var UserPKCS12=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PFX);UserPKCS12=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],UserPKCS12);var EncryptedPrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);EncryptedPrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],EncryptedPrivateKeyInfo);var EmailAddress=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],EmailAddress.prototype,"value",void 0);EmailAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EmailAddress);var UnstructuredName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PKCS9String);UnstructuredName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredName);var UnstructuredAddress=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);UnstructuredAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredAddress);var DateOfBirth=function(){function e(e){if(e===void 0){e=new Date}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],DateOfBirth.prototype,"value",void 0);DateOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DateOfBirth);var PlaceOfBirth=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth);var Gender=function(){function e(e){if(e===void 0){e="M"}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],Gender.prototype,"value",void 0);Gender=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Gender);var CountryOfCitizenship=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],CountryOfCitizenship.prototype,"value",void 0);CountryOfCitizenship=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfCitizenship);var CountryOfResidence=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CountryOfCitizenship);CountryOfResidence=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfResidence);var Pseudonym=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);Pseudonym=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Pseudonym);var ContentType=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentType.prototype,"value",void 0);ContentType=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ContentType);var SigningTime=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime);var SequenceNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}e.prototype.toString=function(){return this.value.toString()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SequenceNumber.prototype,"value",void 0);SequenceNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SequenceNumber);var CounterSignature=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature);var ChallengePassword=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);ChallengePassword=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ChallengePassword);var ExtensionRequest=ExtensionRequest_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,ExtensionRequest_1.prototype);return i}return t}(Extensions);ExtensionRequest=ExtensionRequest_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ExtensionRequest);var ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,ExtendedCertificateAttributes_1.prototype);return i}return t}(AsnArray);ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],ExtendedCertificateAttributes);var FriendlyName=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],FriendlyName.prototype,"value",void 0);FriendlyName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],FriendlyName);var SMIMECapability=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SMIMECapability=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SMIMECapability);var SMIMECapabilities=SMIMECapabilities_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,SMIMECapabilities_1.prototype);return i}return t}(AsnArray);SMIMECapabilities=SMIMECapabilities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SMIMECapability})],SMIMECapabilities);var Attributes_1;var Attributes=Attributes_1=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;Object.setPrototypeOf(i,Attributes_1.prototype);return i}return t}(AsnArray);Attributes=Attributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes);var CertificationRequestInfo=function(){function e(e){if(e===void 0){e={}}this.version=0;this.subject=new Name$1;this.subjectPKInfo=new SubjectPublicKeyInfo;this.attributes=new Attributes;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificationRequestInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Name$1})],CertificationRequestInfo.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],CertificationRequestInfo.prototype,"subjectPKInfo",void 0);__decorate$1([AsnProp({type:Attributes,implicit:true,context:0})],CertificationRequestInfo.prototype,"attributes",void 0);var CertificationRequest=function(){function e(e){if(e===void 0){e={}}this.certificationRequestInfo=new CertificationRequestInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificationRequestInfo})],CertificationRequest.prototype,"certificationRequestInfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificationRequest.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificationRequest.prototype,"signature",void 0);export{SignedData as $,AsnData as A,id_pkcs9_at_unstructuredName as B,Certificate as C,Download as D,Extension as E,id_pkcs9_at_challengePassword as F,id_ValuationRanking as G,id_InsuranceValue as H,InsuranceValue as I,id_WebGDPR as J,id_ActivityDescription as K,id_TypeRelationship as L,id_DomainNameTechnicalOperator as M,Name as N,id_DomainNameOwner as O,PemConverter as P,id_DomainNameLegalRepresentative as Q,RSAPublicKey as R,id_DomainNameBeneficiary as S,TypeRelationship as T,UnstructuredName as U,ValuationRanking as V,WebGDPR as W,CertificationRequest as X,l10n as Y,dateShort as Z,OIDs as _,dateDiff as a,EncapsulatedContent as a0,OctetString as a1,CertificateSet as a2,CertificateChoices as a3,ContentInfo as a4,Name$1 as a5,CRLReason as a6,InvalidityDate as a7,CertificateIssuer as a8,OtherName as a9,NameConstraints as aA,CertificateTemplate as aB,EnrollCertTypeChoice as aC,CaVersion as aD,QCStatements as aE,NetscapeComment as aF,NetscapeCertType as aG,LeiRole as aH,LeiChoice as aI,Timestamp as aJ,ArchiveRevInfo as aK,SubjectDirectoryAttributes as aL,PrivateKeyUsagePeriod as aM,EntrustVersionInfo as aN,BiometricSyntax as aO,LogotypeExtn as aP,TNAuthorizationList as aQ,PolicyConstraints as aR,PolicyMappings as aS,CRLNumber as aT,IssuingDistributionPoint as aU,NonStandardKeyDescription as aV,CabforganizationIdentifier as aW,DisplayText as aa,UserNotice as ab,EDIPartyName as ac,__decorate$1 as ad,AsnProp as ae,AsnPropTypes as af,AsnType as ag,AsnTypeTypes as ah,AsnArray as ai,id_qcs_pkixQCSyntax_v2 as aj,SemanticsInformation as ak,AsnIntegerArrayBufferConverter as al,AttestationApplicationId as am,RootOfTrust as an,IntegerSet as ao,KeyUsage as ap,BasicConstraints as aq,ExtendedKeyUsage as ar,SubjectKeyIdentifier as as,AuthorityKeyIdentifier as at,CRLDistributionPoints as au,AuthorityInfoAccessSyntax as av,SubjectInfoAccessSyntax as aw,SubjectAlternativeName as ax,CertificatePolicies as ay,CertificateTransparency as az,buildExports as b,certificateRawToBuffer as c,downloadFromBuffer as d,AsnConvert as e,ECParameters as f,id_rsaEncryption as g,id_composite_key as h,id_ecPublicKey as i,CompositePublicKey as j,id_alg_composite as k,CompositeSignatureValue as l,CompositeParams as m,getCertificateThumbprint as n,AttributeCertificate as o,CertificateList as p,Attribute$1 as q,AsnParser as r,ExtensionRequest as s,ChallengePassword as t,ActivityDescription as u,DomainNameTechnicalOperator as v,DomainNameOwner as w,DomainNameLegalRepresentative as x,DomainNameBeneficiary as y,id_pkcs9_at_extensionRequest as z};
142
- //# sourceMappingURL=certification_request-DazysL_f.js.map
141
+ */var certificateRawToBuffer=function(e){if(PemConverter.isPem(e)){return PemConverter.decode(e)[0]}if(buildExports.Convert.isHex(e)){return buildExports.Convert.FromHex(e)}if(buildExports.Convert.isBase64(e)){return buildExports.Convert.FromBase64(e)}if(buildExports.Convert.isBase64Url(e)){return buildExports.Convert.FromBase64Url(e)}return buildExports.Convert.FromBinary(e)};var getCertificateThumbprint=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(i){r=cryptoProvider.get();if(r.subtle){return[2,r.subtle.digest(e,t)]}return[2,undefined]}))}))};var ACClearAttrs=function(){function e(e){if(e===void 0){e={}}this.acIssuer=new GeneralName;this.acSerial=0;this.attrs=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],ACClearAttrs.prototype,"acIssuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ACClearAttrs.prototype,"acSerial",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],ACClearAttrs.prototype,"attrs",void 0);var AttrSpec_1;var AttrSpec=AttrSpec_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AttrSpec_1.prototype);return r}return t}(AsnArray);AttrSpec=AttrSpec_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:AsnPropTypes.ObjectIdentifier})],AttrSpec);var AAControls=function(){function e(e){if(e===void 0){e={}}this.permitUnSpecified=true;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer,optional:true})],AAControls.prototype,"pathLenConstraint",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:0,optional:true})],AAControls.prototype,"permittedAttrs",void 0);__decorate$1([AsnProp({type:AttrSpec,implicit:true,context:1,optional:true})],AAControls.prototype,"excludedAttrs",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Boolean,defaultValue:true})],AAControls.prototype,"permitUnSpecified",void 0);var IssuerSerial=function(){function e(e){if(e===void 0){e={}}this.issuer=new GeneralNames;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames})],IssuerSerial.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerSerial.prototype,"serial",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],IssuerSerial.prototype,"issuerUID",void 0);var DigestedObjectType;(function(e){e[e["publicKey"]=0]="publicKey";e[e["publicKeyCert"]=1]="publicKeyCert";e[e["otherObjectTypes"]=2]="otherObjectTypes"})(DigestedObjectType||(DigestedObjectType={}));var ObjectDigestInfo=function(){function e(e){if(e===void 0){e={}}this.digestedObjectType=DigestedObjectType.publicKey;this.digestAlgorithm=new AlgorithmIdentifier;this.objectDigest=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Enumerated})],ObjectDigestInfo.prototype,"digestedObjectType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,optional:true})],ObjectDigestInfo.prototype,"otherObjectTypeID",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],ObjectDigestInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],ObjectDigestInfo.prototype,"objectDigest",void 0);var V2Form=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,optional:true})],V2Form.prototype,"issuerName",void 0);__decorate$1([AsnProp({type:IssuerSerial,context:0,implicit:true,optional:true})],V2Form.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,context:1,implicit:true,optional:true})],V2Form.prototype,"objectDigestInfo",void 0);var AttCertIssuer=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,repeated:"sequence"})],AttCertIssuer.prototype,"v1Form",void 0);__decorate$1([AsnProp({type:V2Form,context:0,implicit:true})],AttCertIssuer.prototype,"v2Form",void 0);AttCertIssuer=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],AttCertIssuer);var AttCertValidityPeriod=function(){function e(e){if(e===void 0){e={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notBeforeTime",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],AttCertValidityPeriod.prototype,"notAfterTime",void 0);var Holder=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial,implicit:true,context:0,optional:true})],Holder.prototype,"baseCertificateID",void 0);__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:1,optional:true})],Holder.prototype,"entityName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,implicit:true,context:2,optional:true})],Holder.prototype,"objectDigestInfo",void 0);var AttCertVersion;(function(e){e[e["v2"]=1]="v2"})(AttCertVersion||(AttCertVersion={}));var AttributeCertificateInfo=function(){function e(e){if(e===void 0){e={}}this.version=AttCertVersion.v2;this.holder=new Holder;this.issuer=new AttCertIssuer;this.signature=new AlgorithmIdentifier;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new AttCertValidityPeriod;this.attributes=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],AttributeCertificateInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Holder})],AttributeCertificateInfo.prototype,"holder",void 0);__decorate$1([AsnProp({type:AttCertIssuer})],AttributeCertificateInfo.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificateInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],AttributeCertificateInfo.prototype,"serialNumber",void 0);__decorate$1([AsnProp({type:AttCertValidityPeriod})],AttributeCertificateInfo.prototype,"attrCertValidityPeriod",void 0);__decorate$1([AsnProp({type:Attribute$1,repeated:"sequence"})],AttributeCertificateInfo.prototype,"attributes",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString,optional:true})],AttributeCertificateInfo.prototype,"issuerUniqueID",void 0);__decorate$1([AsnProp({type:Extensions,optional:true})],AttributeCertificateInfo.prototype,"extensions",void 0);var AttributeCertificate=function(){function e(e){if(e===void 0){e={}}this.acinfo=new AttributeCertificateInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signatureValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AttributeCertificateInfo})],AttributeCertificate.prototype,"acinfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],AttributeCertificate.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],AttributeCertificate.prototype,"signatureValue",void 0);var ClassListFlags;(function(e){e[e["unmarked"]=1]="unmarked";e[e["unclassified"]=2]="unclassified";e[e["restricted"]=4]="restricted";e[e["confidential"]=8]="confidential";e[e["secret"]=16]="secret";e[e["topSecret"]=32]="topSecret"})(ClassListFlags||(ClassListFlags={}));var ClassList=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(BitString);var SecurityCategory=function(){function e(e){if(e===void 0){e={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier,implicit:true,context:0})],SecurityCategory.prototype,"type",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,implicit:true,context:1})],SecurityCategory.prototype,"value",void 0);var Clearance=function(){function e(e){if(e===void 0){e={}}this.policyId="";this.classList=new ClassList(ClassListFlags.unclassified);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Clearance.prototype,"policyId",void 0);__decorate$1([AsnProp({type:ClassList,defaultValue:new ClassList(ClassListFlags.unclassified)})],Clearance.prototype,"classList",void 0);__decorate$1([AsnProp({type:SecurityCategory,repeated:"set"})],Clearance.prototype,"securityCategories",void 0);var IetfAttrSyntaxValueChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],IetfAttrSyntaxValueChoices.prototype,"cotets",void 0);__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],IetfAttrSyntaxValueChoices.prototype,"oid",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String})],IetfAttrSyntaxValueChoices.prototype,"string",void 0);var IetfAttrSyntax=function(){function e(e){if(e===void 0){e={}}this.values=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],IetfAttrSyntax.prototype,"policyAuthority",void 0);__decorate$1([AsnProp({type:IetfAttrSyntaxValueChoices,repeated:"sequence"})],IetfAttrSyntax.prototype,"values",void 0);var Targets_1;var TargetCert=function(){function e(e){if(e===void 0){e={}}this.targetCertificate=new IssuerSerial;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:IssuerSerial})],TargetCert.prototype,"targetCertificate",void 0);__decorate$1([AsnProp({type:GeneralName,optional:true})],TargetCert.prototype,"targetName",void 0);__decorate$1([AsnProp({type:ObjectDigestInfo,optional:true})],TargetCert.prototype,"certDigestInfo",void 0);var Target=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0,implicit:true})],Target.prototype,"targetName",void 0);__decorate$1([AsnProp({type:GeneralName,context:1,implicit:true})],Target.prototype,"targetGroup",void 0);__decorate$1([AsnProp({type:TargetCert,context:2,implicit:true})],Target.prototype,"targetCert",void 0);Target=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Target);var Targets=Targets_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Targets_1.prototype);return r}return t}(AsnArray);Targets=Targets_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Target})],Targets);var ProxyInfo_1;var ProxyInfo=ProxyInfo_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ProxyInfo_1.prototype);return r}return t}(AsnArray);ProxyInfo=ProxyInfo_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Targets})],ProxyInfo);var RoleSyntax=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralNames,implicit:true,context:0,optional:true})],RoleSyntax.prototype,"roleAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,implicit:true,context:1})],RoleSyntax.prototype,"roleName",void 0);var SvceAuthInfo=function(){function e(e){if(e===void 0){e={}}this.service=new GeneralName;this.ident=new GeneralName;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"service",void 0);__decorate$1([AsnProp({type:GeneralName})],SvceAuthInfo.prototype,"ident",void 0);__decorate$1([AsnProp({type:OctetString,optional:true})],SvceAuthInfo.prototype,"authInfo",void 0);var id_ntQWAC="0.4.0.9496";var id_ActivityDescription="".concat(id_ntQWAC,".6");var ActivityDescription=function(){function e(e){if(e===void 0){e={}}this.codeAuthority=new GeneralName;this.codeId=new GeneralName;this.shortName="";this.shortDescription="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],ActivityDescription.prototype,"codeAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],ActivityDescription.prototype,"codeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:2})],ActivityDescription.prototype,"shortName",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:3})],ActivityDescription.prototype,"shortDescription",void 0);ActivityDescription=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ActivityDescription);var DomainName=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(Name$1);DomainName=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainName);var id_DomainNameBeneficiary="".concat(id_ntQWAC,".1");var DomainNameBeneficiary=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameBeneficiary=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameBeneficiary);var id_DomainNameLegalRepresentative="".concat(id_ntQWAC,".2");var DomainNameLegalRepresentative=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameLegalRepresentative=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameLegalRepresentative);var id_DomainNameOwner="".concat(id_ntQWAC,".3");var DomainNameOwner=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameOwner=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameOwner);var id_DomainNameTechnicalOperator="".concat(id_ntQWAC,".4");var DomainNameTechnicalOperator=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Name$1.prototype);return r}return t}(DomainName);DomainNameTechnicalOperator=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DomainNameTechnicalOperator);var id_InsuranceValue="".concat(id_ntQWAC,".8");var InsuranceValue=function(){function e(e){if(e===void 0){e={}}this.location="";this.base=0;this.degree=0;Object.assign(this,e)}e.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],InsuranceValue.prototype,"location",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"base",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],InsuranceValue.prototype,"degree",void 0);InsuranceValue=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],InsuranceValue);var id_ValuationRanking="".concat(id_ntQWAC,".9");var ValuationRanking=function(){function e(e){if(e===void 0){e={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars5",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars4",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars3",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars2",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer})],ValuationRanking.prototype,"stars1",void 0);ValuationRanking=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ValuationRanking);var id_TypeRelationship="".concat(id_ntQWAC,".5");var TypeRelationship=function(){function e(e){if(e===void 0){e={}}this.DNBvsDNO=new BitString(0);this.DNBvsDNT=new BitString(0);this.DNOvsDNT=new BitString(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:BitString,context:0})],TypeRelationship.prototype,"DNBvsDNO",void 0);__decorate$1([AsnProp({type:BitString,context:1})],TypeRelationship.prototype,"DNBvsDNT",void 0);__decorate$1([AsnProp({type:BitString,context:2})],TypeRelationship.prototype,"DNOvsDNT",void 0);TypeRelationship=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],TypeRelationship);var id_WebGDPR="".concat(id_ntQWAC,".7");var WebGDPR=function(){function e(e){if(e===void 0){e={}}this.assessmentAuthority=new GeneralName;this.assessmentRef=new GeneralName;this.assessmentLocation=new GeneralName;this.dataStorageTerritory="";this.description="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:GeneralName,context:0})],WebGDPR.prototype,"assessmentAuthority",void 0);__decorate$1([AsnProp({type:GeneralName,context:1})],WebGDPR.prototype,"assessmentRef",void 0);__decorate$1([AsnProp({type:GeneralName,context:2})],WebGDPR.prototype,"assessmentLocation",void 0);__decorate$1([AsnProp({type:AsnPropTypes.PrintableString,context:3})],WebGDPR.prototype,"dataStorageTerritory",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Utf8String,context:4})],WebGDPR.prototype,"description",void 0);WebGDPR=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],WebGDPR);var IssuerAndSerialNumber=function(){function e(e){if(e===void 0){e={}}this.issuer=new Name$1;this.serialNumber=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Name$1})],IssuerAndSerialNumber.prototype,"issuer",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,converter:AsnIntegerArrayBufferConverter})],IssuerAndSerialNumber.prototype,"serialNumber",void 0);var SignerIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],SignerIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],SignerIdentifier.prototype,"issuerAndSerialNumber",void 0);SignerIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SignerIdentifier);var CMSVersion;(function(e){e[e["v0"]=0]="v0";e[e["v1"]=1]="v1";e[e["v2"]=2]="v2";e[e["v3"]=3]="v3";e[e["v4"]=4]="v4";e[e["v5"]=5]="v5"})(CMSVersion||(CMSVersion={}));var DigestAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);DigestAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],DigestAlgorithmIdentifier);var SignatureAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SignatureAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SignatureAlgorithmIdentifier);var KeyEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyEncryptionAlgorithmIdentifier);var ContentEncryptionAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);ContentEncryptionAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ContentEncryptionAlgorithmIdentifier);var MessageAuthenticationCodeAlgorithm=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);MessageAuthenticationCodeAlgorithm=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],MessageAuthenticationCodeAlgorithm);var KeyDerivationAlgorithmIdentifier=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);KeyDerivationAlgorithmIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyDerivationAlgorithmIdentifier);var Attribute=function(){function e(e){if(e===void 0){e={}}this.attrType="";this.attrValues=[];Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],Attribute.prototype,"attrType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],Attribute.prototype,"attrValues",void 0);var SignerInfos_1;var SignerInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.sid=new SignerIdentifier;this.digestAlgorithm=new DigestAlgorithmIdentifier;this.signatureAlgorithm=new SignatureAlgorithmIdentifier;this.signature=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignerInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:SignerIdentifier})],SignerInfo.prototype,"sid",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifier})],SignerInfo.prototype,"digestAlgorithm",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:0,implicit:true,optional:true})],SignerInfo.prototype,"signedAttrs",void 0);__decorate$1([AsnProp({type:SignatureAlgorithmIdentifier})],SignerInfo.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],SignerInfo.prototype,"signature",void 0);__decorate$1([AsnProp({type:Attribute,repeated:"set",context:1,implicit:true,optional:true})],SignerInfo.prototype,"unsignedAttrs",void 0);var SignerInfos=SignerInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SignerInfos_1.prototype);return r}return t}(AsnArray);SignerInfos=SignerInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:SignerInfo})],SignerInfos);var SigningTime$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime$1=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime$1);var CounterSignature$1=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature$1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature$1);var CertificateSet_1;var OtherCertificateFormat=function(){function e(e){if(e===void 0){e={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherCertificateFormat.prototype,"otherCertFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherCertificateFormat.prototype,"otherCert",void 0);var CertificateChoices=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:Certificate})],CertificateChoices.prototype,"certificate",void 0);__decorate$1([AsnProp({type:AttributeCertificate,context:2,implicit:true})],CertificateChoices.prototype,"v2AttrCert",void 0);__decorate$1([AsnProp({type:OtherCertificateFormat,context:3,implicit:true})],CertificateChoices.prototype,"other",void 0);CertificateChoices=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CertificateChoices);var CertificateSet=CertificateSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,CertificateSet_1.prototype);return r}return t}(AsnArray);CertificateSet=CertificateSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:CertificateChoices})],CertificateSet);var ContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],ContentInfo.prototype,"content",void 0);var EncapsulatedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],EncapsulatedContent.prototype,"single",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],EncapsulatedContent.prototype,"any",void 0);EncapsulatedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncapsulatedContent);var EncapsulatedContentInfo=function(){function e(e){if(e===void 0){e={}}this.eContentType="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncapsulatedContentInfo.prototype,"eContentType",void 0);__decorate$1([AsnProp({type:EncapsulatedContent,context:0,optional:true})],EncapsulatedContentInfo.prototype,"eContent",void 0);var EncryptedContent=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString,context:0,implicit:true,optional:true})],EncryptedContent.prototype,"value",void 0);__decorate$1([AsnProp({type:OctetString,converter:AsnConstructedOctetStringConverter,context:0,implicit:true,optional:true,repeated:"sequence"})],EncryptedContent.prototype,"constructedValue",void 0);EncryptedContent=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EncryptedContent);var EncryptedContentInfo=function(){function e(e){if(e===void 0){e={}}this.contentType="";this.contentEncryptionAlgorithm=new ContentEncryptionAlgorithmIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],EncryptedContentInfo.prototype,"contentType",void 0);__decorate$1([AsnProp({type:ContentEncryptionAlgorithmIdentifier})],EncryptedContentInfo.prototype,"contentEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:EncryptedContent,optional:true})],EncryptedContentInfo.prototype,"encryptedContent",void 0);var OtherKeyAttribute=function(){function e(e){if(e===void 0){e={}}this.keyAttrId="";Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherKeyAttribute.prototype,"keyAttrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,optional:true})],OtherKeyAttribute.prototype,"keyAttr",void 0);var RecipientEncryptedKeys_1;var RecipientKeyIdentifier=function(){function e(e){if(e===void 0){e={}}this.subjectKeyIdentifier=new SubjectKeyIdentifier;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier})],RecipientKeyIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],RecipientKeyIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],RecipientKeyIdentifier.prototype,"other",void 0);var KeyAgreeRecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:RecipientKeyIdentifier,context:0,implicit:true,optional:true})],KeyAgreeRecipientIdentifier.prototype,"rKeyId",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],KeyAgreeRecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);KeyAgreeRecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],KeyAgreeRecipientIdentifier);var RecipientEncryptedKey=function(){function e(e){if(e===void 0){e={}}this.rid=new KeyAgreeRecipientIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyAgreeRecipientIdentifier})],RecipientEncryptedKey.prototype,"rid",void 0);__decorate$1([AsnProp({type:OctetString})],RecipientEncryptedKey.prototype,"encryptedKey",void 0);var RecipientEncryptedKeys=RecipientEncryptedKeys_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientEncryptedKeys_1.prototype);return r}return t}(AsnArray);RecipientEncryptedKeys=RecipientEncryptedKeys_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:RecipientEncryptedKey})],RecipientEncryptedKeys);var OriginatorPublicKey=function(){function e(e){if(e===void 0){e={}}this.algorithm=new AlgorithmIdentifier;this.publicKey=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AlgorithmIdentifier})],OriginatorPublicKey.prototype,"algorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],OriginatorPublicKey.prototype,"publicKey",void 0);var OriginatorIdentifierOrKey=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:OriginatorPublicKey,context:1,implicit:true,optional:true})],OriginatorIdentifierOrKey.prototype,"originatorKey",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber,optional:true})],OriginatorIdentifierOrKey.prototype,"issuerAndSerialNumber",void 0);OriginatorIdentifierOrKey=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],OriginatorIdentifierOrKey);var KeyAgreeRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v3;this.originator=new OriginatorIdentifierOrKey;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.recipientEncryptedKeys=new RecipientEncryptedKeys;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyAgreeRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorIdentifierOrKey,context:0})],KeyAgreeRecipientInfo.prototype,"originator",void 0);__decorate$1([AsnProp({type:OctetString,context:1,optional:true})],KeyAgreeRecipientInfo.prototype,"ukm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyAgreeRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:RecipientEncryptedKeys})],KeyAgreeRecipientInfo.prototype,"recipientEncryptedKeys",void 0);var RecipientIdentifier=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:SubjectKeyIdentifier,context:0,implicit:true})],RecipientIdentifier.prototype,"subjectKeyIdentifier",void 0);__decorate$1([AsnProp({type:IssuerAndSerialNumber})],RecipientIdentifier.prototype,"issuerAndSerialNumber",void 0);RecipientIdentifier=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientIdentifier);var KeyTransRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.rid=new RecipientIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KeyTransRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:RecipientIdentifier})],KeyTransRecipientInfo.prototype,"rid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KeyTransRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KeyTransRecipientInfo.prototype,"encryptedKey",void 0);var KEKIdentifier=function(){function e(e){if(e===void 0){e={}}this.keyIdentifier=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OctetString})],KEKIdentifier.prototype,"keyIdentifier",void 0);__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime,optional:true})],KEKIdentifier.prototype,"date",void 0);__decorate$1([AsnProp({type:OtherKeyAttribute,optional:true})],KEKIdentifier.prototype,"other",void 0);var KEKRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v4;this.kekid=new KEKIdentifier;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],KEKRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KEKIdentifier})],KEKRecipientInfo.prototype,"kekid",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],KEKRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],KEKRecipientInfo.prototype,"encryptedKey",void 0);var PasswordRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.keyEncryptionAlgorithm=new KeyEncryptionAlgorithmIdentifier;this.encryptedKey=new OctetString;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PasswordRecipientInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:KeyDerivationAlgorithmIdentifier,context:0,optional:true})],PasswordRecipientInfo.prototype,"keyDerivationAlgorithm",void 0);__decorate$1([AsnProp({type:KeyEncryptionAlgorithmIdentifier})],PasswordRecipientInfo.prototype,"keyEncryptionAlgorithm",void 0);__decorate$1([AsnProp({type:OctetString})],PasswordRecipientInfo.prototype,"encryptedKey",void 0);var OtherRecipientInfo=function(){function e(e){if(e===void 0){e={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRecipientInfo.prototype,"oriType",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRecipientInfo.prototype,"oriValue",void 0);var RecipientInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:KeyTransRecipientInfo,optional:true})],RecipientInfo.prototype,"ktri",void 0);__decorate$1([AsnProp({type:KeyAgreeRecipientInfo,context:1,implicit:true,optional:true})],RecipientInfo.prototype,"kari",void 0);__decorate$1([AsnProp({type:KEKRecipientInfo,context:2,implicit:true,optional:true})],RecipientInfo.prototype,"kekri",void 0);__decorate$1([AsnProp({type:PasswordRecipientInfo,context:3,implicit:true,optional:true})],RecipientInfo.prototype,"pwri",void 0);__decorate$1([AsnProp({type:OtherRecipientInfo,context:4,implicit:true,optional:true})],RecipientInfo.prototype,"ori",void 0);RecipientInfo=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RecipientInfo);var RecipientInfos_1;var RecipientInfos=RecipientInfos_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RecipientInfos_1.prototype);return r}return t}(AsnArray);RecipientInfos=RecipientInfos_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RecipientInfo})],RecipientInfos);var RevocationInfoChoices_1;var OtherRevocationInfoFormat=function(){function e(e){if(e===void 0){e={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],OtherRevocationInfoFormat.prototype,"otherRevInfoFormat",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any})],OtherRevocationInfoFormat.prototype,"otherRevInfo",void 0);var RevocationInfoChoice=function(){function e(e){if(e===void 0){e={}}this.other=new OtherRevocationInfoFormat;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:OtherRevocationInfoFormat,context:1,implicit:true})],RevocationInfoChoice.prototype,"other",void 0);RevocationInfoChoice=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],RevocationInfoChoice);var RevocationInfoChoices=RevocationInfoChoices_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,RevocationInfoChoices_1.prototype);return r}return t}(AsnArray);RevocationInfoChoices=RevocationInfoChoices_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:RevocationInfoChoice})],RevocationInfoChoices);var OriginatorInfo=function(){function e(e){if(e===void 0){e={}}Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],OriginatorInfo.prototype,"certs",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],OriginatorInfo.prototype,"crls",void 0);var UnprotectedAttributes_1;var UnprotectedAttributes=UnprotectedAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,UnprotectedAttributes_1.prototype);return r}return t}(AsnArray);UnprotectedAttributes=UnprotectedAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],UnprotectedAttributes);var EnvelopedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.recipientInfos=new RecipientInfos;this.encryptedContentInfo=new EncryptedContentInfo;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],EnvelopedData.prototype,"version",void 0);__decorate$1([AsnProp({type:OriginatorInfo,context:0,implicit:true,optional:true})],EnvelopedData.prototype,"originatorInfo",void 0);__decorate$1([AsnProp({type:RecipientInfos})],EnvelopedData.prototype,"recipientInfos",void 0);__decorate$1([AsnProp({type:EncryptedContentInfo})],EnvelopedData.prototype,"encryptedContentInfo",void 0);__decorate$1([AsnProp({type:UnprotectedAttributes,context:1,implicit:true,optional:true})],EnvelopedData.prototype,"unprotectedAttrs",void 0);var DigestAlgorithmIdentifiers_1;var DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,DigestAlgorithmIdentifiers_1.prototype);return r}return t}(AsnArray);DigestAlgorithmIdentifiers=DigestAlgorithmIdentifiers_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:DigestAlgorithmIdentifier})],DigestAlgorithmIdentifiers);var SignedData=function(){function e(e){if(e===void 0){e={}}this.version=CMSVersion.v0;this.digestAlgorithms=new DigestAlgorithmIdentifiers;this.encapContentInfo=new EncapsulatedContentInfo;this.signerInfos=new SignerInfos;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SignedData.prototype,"version",void 0);__decorate$1([AsnProp({type:DigestAlgorithmIdentifiers})],SignedData.prototype,"digestAlgorithms",void 0);__decorate$1([AsnProp({type:EncapsulatedContentInfo})],SignedData.prototype,"encapContentInfo",void 0);__decorate$1([AsnProp({type:CertificateSet,context:0,implicit:true,optional:true})],SignedData.prototype,"certificates",void 0);__decorate$1([AsnProp({type:RevocationInfoChoices,context:1,implicit:true,optional:true})],SignedData.prototype,"crls",void 0);__decorate$1([AsnProp({type:SignerInfos})],SignedData.prototype,"signerInfos",void 0);var PKCS12AttrSet_1;var PKCS12Attribute=function(){function e(e){if(e===void 0){e={}}this.attrId="";this.attrValues=[];Object.assign(e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],PKCS12Attribute.prototype,"attrId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,repeated:"set"})],PKCS12Attribute.prototype,"attrValues",void 0);var PKCS12AttrSet=PKCS12AttrSet_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,PKCS12AttrSet_1.prototype);return r}return t}(AsnArray);PKCS12AttrSet=PKCS12AttrSet_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:PKCS12Attribute})],PKCS12AttrSet);var AuthenticatedSafe_1;var AuthenticatedSafe=AuthenticatedSafe_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,AuthenticatedSafe_1.prototype);return r}return t}(AsnArray);AuthenticatedSafe=AuthenticatedSafe_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:ContentInfo})],AuthenticatedSafe);var CertBag=function(){function e(e){if(e===void 0){e={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CertBag.prototype,"certId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CertBag.prototype,"certValue",void 0);var CRLBag=function(){function e(e){if(e===void 0){e={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],CRLBag.prototype,"crlId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],CRLBag.prototype,"crltValue",void 0);var KeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PrivateKeyInfo$1);KeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],KeyBag);var PKCS8ShroudedKeyBag=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);PKCS8ShroudedKeyBag=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],PKCS8ShroudedKeyBag);var SecretBag=function(){function e(e){if(e===void 0){e={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SecretBag.prototype,"secretTypeId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SecretBag.prototype,"secretValue",void 0);var MacData=function(){function e(e){if(e===void 0){e={}}this.mac=new DigestInfo;this.macSalt=new OctetString;this.iterations=1;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:DigestInfo})],MacData.prototype,"mac",void 0);__decorate$1([AsnProp({type:OctetString})],MacData.prototype,"macSalt",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Integer,defaultValue:1})],MacData.prototype,"iterations",void 0);var PFX=function(){function e(e){if(e===void 0){e={}}this.version=3;this.authSafe=new ContentInfo;this.macData=new MacData;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],PFX.prototype,"version",void 0);__decorate$1([AsnProp({type:ContentInfo})],PFX.prototype,"authSafe",void 0);__decorate$1([AsnProp({type:MacData,optional:true})],PFX.prototype,"macData",void 0);var SafeContents_1;var SafeBag=function(){function e(e){if(e===void 0){e={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],SafeBag.prototype,"bagId",void 0);__decorate$1([AsnProp({type:AsnPropTypes.Any,context:0})],SafeBag.prototype,"bagValue",void 0);__decorate$1([AsnProp({type:PKCS12Attribute,repeated:"set",optional:true})],SafeBag.prototype,"bagAttributes",void 0);var SafeContents=SafeContents_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SafeContents_1.prototype);return r}return t}(AsnArray);SafeContents=SafeContents_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SafeBag})],SafeContents);var ExtensionRequest_1,ExtendedCertificateAttributes_1,SMIMECapabilities_1;var id_pkcs9="1.2.840.113549.1.9";var id_pkcs9_at_unstructuredName="".concat(id_pkcs9,".2");var id_pkcs9_at_challengePassword="".concat(id_pkcs9,".7");var id_pkcs9_at_extensionRequest="".concat(id_pkcs9,".14");var PKCS9String=function(e){__extends(t,e);function t(t){if(t===void 0){t={}}return e.call(this,t)||this}t.prototype.toString=function(){return this.ia5String||e.prototype.toString.call(this)};return t}(DirectoryString);__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],PKCS9String.prototype,"ia5String",void 0);PKCS9String=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PKCS9String);var Pkcs7PDU=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ContentInfo);Pkcs7PDU=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],Pkcs7PDU);var UserPKCS12=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PFX);UserPKCS12=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],UserPKCS12);var EncryptedPrivateKeyInfo=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(EncryptedPrivateKeyInfo$1);EncryptedPrivateKeyInfo=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],EncryptedPrivateKeyInfo);var EmailAddress=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.IA5String})],EmailAddress.prototype,"value",void 0);EmailAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],EmailAddress);var UnstructuredName=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(PKCS9String);UnstructuredName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredName);var UnstructuredAddress=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);UnstructuredAddress=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],UnstructuredAddress);var DateOfBirth=function(){function e(e){if(e===void 0){e=new Date}this.value=e}return e}();__decorate$1([AsnProp({type:AsnPropTypes.GeneralizedTime})],DateOfBirth.prototype,"value",void 0);DateOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],DateOfBirth);var PlaceOfBirth=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);PlaceOfBirth=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],PlaceOfBirth);var Gender=function(){function e(e){if(e===void 0){e="M"}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],Gender.prototype,"value",void 0);Gender=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Gender);var CountryOfCitizenship=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.PrintableString})],CountryOfCitizenship.prototype,"value",void 0);CountryOfCitizenship=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfCitizenship);var CountryOfResidence=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(CountryOfCitizenship);CountryOfResidence=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],CountryOfResidence);var Pseudonym=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);Pseudonym=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],Pseudonym);var ContentType=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.ObjectIdentifier})],ContentType.prototype,"value",void 0);ContentType=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ContentType);var SigningTime=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Time);SigningTime=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SigningTime);var SequenceNumber=function(){function e(e){if(e===void 0){e=0}this.value=e}e.prototype.toString=function(){return this.value.toString()};return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],SequenceNumber.prototype,"value",void 0);SequenceNumber=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],SequenceNumber);var CounterSignature=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(SignerInfo);CounterSignature=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],CounterSignature);var ChallengePassword=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(DirectoryString);ChallengePassword=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],ChallengePassword);var ExtensionRequest=ExtensionRequest_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtensionRequest_1.prototype);return r}return t}(Extensions);ExtensionRequest=ExtensionRequest_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],ExtensionRequest);var ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,ExtendedCertificateAttributes_1.prototype);return r}return t}(AsnArray);ExtendedCertificateAttributes=ExtendedCertificateAttributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Set,itemType:Attribute})],ExtendedCertificateAttributes);var FriendlyName=function(){function e(e){if(e===void 0){e=""}this.value=e}e.prototype.toString=function(){return this.value};return e}();__decorate$1([AsnProp({type:AsnPropTypes.BmpString})],FriendlyName.prototype,"value",void 0);FriendlyName=__decorate$1([AsnType({type:AsnTypeTypes.Choice})],FriendlyName);var SMIMECapability=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(AlgorithmIdentifier);SMIMECapability=__decorate$1([AsnType({type:AsnTypeTypes.Sequence})],SMIMECapability);var SMIMECapabilities=SMIMECapabilities_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,SMIMECapabilities_1.prototype);return r}return t}(AsnArray);SMIMECapabilities=SMIMECapabilities_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:SMIMECapability})],SMIMECapabilities);var Attributes_1;var Attributes=Attributes_1=function(e){__extends(t,e);function t(t){var r=e.call(this,t)||this;Object.setPrototypeOf(r,Attributes_1.prototype);return r}return t}(AsnArray);Attributes=Attributes_1=__decorate$1([AsnType({type:AsnTypeTypes.Sequence,itemType:Attribute$1})],Attributes);var CertificationRequestInfo=function(){function e(e){if(e===void 0){e={}}this.version=0;this.subject=new Name$1;this.subjectPKInfo=new SubjectPublicKeyInfo;this.attributes=new Attributes;Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:AsnPropTypes.Integer})],CertificationRequestInfo.prototype,"version",void 0);__decorate$1([AsnProp({type:Name$1})],CertificationRequestInfo.prototype,"subject",void 0);__decorate$1([AsnProp({type:SubjectPublicKeyInfo})],CertificationRequestInfo.prototype,"subjectPKInfo",void 0);__decorate$1([AsnProp({type:Attributes,implicit:true,context:0})],CertificationRequestInfo.prototype,"attributes",void 0);var CertificationRequest=function(){function e(e){if(e===void 0){e={}}this.certificationRequestInfo=new CertificationRequestInfo;this.signatureAlgorithm=new AlgorithmIdentifier;this.signature=new ArrayBuffer(0);Object.assign(this,e)}return e}();__decorate$1([AsnProp({type:CertificationRequestInfo})],CertificationRequest.prototype,"certificationRequestInfo",void 0);__decorate$1([AsnProp({type:AlgorithmIdentifier})],CertificationRequest.prototype,"signatureAlgorithm",void 0);__decorate$1([AsnProp({type:AsnPropTypes.BitString})],CertificationRequest.prototype,"signature",void 0);export{SignedData as $,AsnData as A,id_pkcs9_at_unstructuredName as B,Certificate as C,Download as D,Extension as E,id_pkcs9_at_challengePassword as F,id_ValuationRanking as G,id_InsuranceValue as H,InsuranceValue as I,id_WebGDPR as J,id_ActivityDescription as K,id_TypeRelationship as L,id_DomainNameTechnicalOperator as M,Name as N,id_DomainNameOwner as O,PemConverter as P,id_DomainNameLegalRepresentative as Q,RSAPublicKey as R,id_DomainNameBeneficiary as S,TypeRelationship as T,UnstructuredName as U,ValuationRanking as V,WebGDPR as W,CertificationRequest as X,l10n as Y,dateShort as Z,OIDs as _,dateDiff as a,EncapsulatedContent as a0,OctetString as a1,CertificateSet as a2,CertificateChoices as a3,ContentInfo as a4,Name$1 as a5,CRLReason as a6,InvalidityDate as a7,CertificateIssuer as a8,OtherName as a9,NameConstraints as aA,CertificateTemplate as aB,EnrollCertTypeChoice as aC,CaVersion as aD,QCStatements as aE,NetscapeComment as aF,NetscapeCertType as aG,LeiRole as aH,LeiChoice as aI,Timestamp as aJ,ArchiveRevInfo as aK,SubjectDirectoryAttributes as aL,PrivateKeyUsagePeriod as aM,EntrustVersionInfo as aN,BiometricSyntax as aO,LogotypeExtn as aP,TNAuthorizationList as aQ,PolicyConstraints as aR,PolicyMappings as aS,CRLNumber as aT,IssuingDistributionPoint as aU,NonStandardKeyDescription as aV,CabforganizationIdentifier as aW,DisplayText as aa,UserNotice as ab,EDIPartyName as ac,__decorate$1 as ad,AsnProp as ae,AsnPropTypes as af,AsnType as ag,AsnTypeTypes as ah,AsnArray as ai,id_qcs_pkixQCSyntax_v2 as aj,SemanticsInformation as ak,AsnIntegerArrayBufferConverter as al,AttestationApplicationId as am,RootOfTrust as an,IntegerSet as ao,KeyUsage as ap,BasicConstraints as aq,ExtendedKeyUsage as ar,SubjectKeyIdentifier as as,AuthorityKeyIdentifier as at,CRLDistributionPoints as au,AuthorityInfoAccessSyntax as av,SubjectInfoAccessSyntax as aw,SubjectAlternativeName as ax,CertificatePolicies as ay,CertificateTransparency as az,buildExports as b,certificateRawToBuffer as c,downloadFromBuffer as d,AsnConvert as e,ECParameters as f,id_rsaEncryption as g,id_composite_key as h,id_ecPublicKey as i,CompositePublicKey as j,id_alg_composite as k,CompositeSignatureValue as l,CompositeParams as m,getCertificateThumbprint as n,AttributeCertificate as o,CertificateList as p,Attribute$1 as q,AsnParser as r,ExtensionRequest as s,ChallengePassword as t,ActivityDescription as u,DomainNameTechnicalOperator as v,DomainNameOwner as w,DomainNameLegalRepresentative as x,DomainNameBeneficiary as y,id_pkcs9_at_extensionRequest as z};
142
+ //# sourceMappingURL=certification_request-PeMaLTUD.js.map