@peculiar/certificates-viewer 3.8.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/cjs/{certification_request-6eb7ef37.js → certification_request-b9ac73f2.js} +5 -3
  2. package/dist/cjs/{crl-75106e2e.js → crl-57727a07.js} +6 -6
  3. package/dist/cjs/{download-a97f4cb2.js → download-93f7b773.js} +9 -5
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/{l10n-17c96aba.js → l10n-ddc7cff9.js} +1 -1
  6. package/dist/cjs/{miscellaneous-0eade914.js → miscellaneous-07184a47.js} +8 -11
  7. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +7 -5
  8. package/dist/cjs/peculiar-button-split_4.cjs.entry.js +2 -2
  9. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +5 -5
  10. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +5 -5
  11. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +4 -4
  12. package/dist/cjs/{x509_certificate-9e7652cf.js → x509_certificate-da0fc87d.js} +4 -4
  13. package/dist/collection/components/certificate-details-parts/public_key.js +5 -8
  14. package/dist/collection/components/csr-viewer/csr-viewer.js +2 -0
  15. package/dist/collection/constants/oids.js +1 -0
  16. package/dist/collection/crypto/crl.js +1 -1
  17. package/dist/collection/crypto/csr.js +1 -1
  18. package/dist/collection/crypto/provider.js +2 -1
  19. package/dist/collection/crypto/x509_attribute_certificate.js +1 -1
  20. package/dist/collection/crypto/x509_certificate.js +1 -1
  21. package/dist/collection/utils/download_from_buffer.js +9 -5
  22. package/dist/esm/{certification_request-4adeae0c.js → certification_request-db83dd19.js} +5 -3
  23. package/dist/esm/{crl-2857d300.js → crl-34288843.js} +6 -6
  24. package/dist/esm/{download-67ac9120.js → download-91511aeb.js} +9 -5
  25. package/dist/esm/index.js +1 -1
  26. package/dist/esm/{l10n-a68d5748.js → l10n-d48f35ff.js} +1 -1
  27. package/dist/esm/{miscellaneous-91256fd3.js → miscellaneous-ee8e1994.js} +8 -11
  28. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +7 -5
  29. package/dist/esm/peculiar-button-split_4.entry.js +2 -2
  30. package/dist/esm/peculiar-certificate-decoder.entry.js +5 -5
  31. package/dist/esm/peculiar-certificate-viewer.entry.js +5 -5
  32. package/dist/esm/peculiar-certificates-viewer.entry.js +4 -4
  33. package/dist/esm/{x509_certificate-e7b4d8d1.js → x509_certificate-1acb3564.js} +4 -4
  34. package/dist/peculiar/index.esm.js +1 -1
  35. package/dist/peculiar/p-08aba71b.js +69 -0
  36. package/dist/peculiar/p-0f7868b1.js +11 -0
  37. package/dist/peculiar/{p-40808c02.entry.js → p-2f213160.entry.js} +2 -2
  38. package/dist/peculiar/{p-b44dc7c9.js → p-3c4e4245.js} +2 -2
  39. package/dist/peculiar/{p-e7518804.js → p-48a620ff.js} +5 -5
  40. package/dist/peculiar/p-711b4e1e.js +18 -0
  41. package/dist/peculiar/{p-7de0bfb3.entry.js → p-81ae1305.entry.js} +1 -1
  42. package/dist/peculiar/{p-22d8ae9c.entry.js → p-81d33fb4.entry.js} +1 -1
  43. package/dist/peculiar/{p-5fb5f008.entry.js → p-9bfd4f58.entry.js} +1 -1
  44. package/dist/peculiar/{p-893659f4.entry.js → p-df53fbcc.entry.js} +1 -1
  45. package/dist/peculiar/{p-fec9d812.js → p-ec250cc4.js} +1 -1
  46. package/dist/peculiar/peculiar.esm.js +1 -1
  47. package/dist/types/constants/oids.d.ts +1 -0
  48. package/dist/types/crypto/crl.d.ts +1 -1
  49. package/dist/types/crypto/csr.d.ts +1 -1
  50. package/dist/types/crypto/x509_attribute_certificate.d.ts +1 -1
  51. package/dist/types/crypto/x509_certificate.d.ts +1 -1
  52. package/dist/types/interface.d.ts +1 -0
  53. package/package.json +2 -2
  54. package/dist/peculiar/p-05f4713f.js +0 -11
  55. package/dist/peculiar/p-77121cf7.js +0 -69
  56. package/dist/peculiar/p-cff9655c.js +0 -18
@@ -1,32 +1,32 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{A as t,s,t as e,u as r,v as i,E as a,f as n,w as o,U as h,x as c,y as u,z as l,V as m,B as E,I as g,D as p,W as A,F as d,G as f,H as b,T as w,J as x,K as C,L as T,M as R,O as I,P as v,Q as k,S as N,e as F,X as y,r as B,p as D,q as P,Y as H,N as S,g as L,h as X,j,R as U,Z as q}from"./p-b44dc7c9.js";import{b as G,D as K}from"./p-cff9655c.js";import{d as M}from"./p-fec9d812.js";
4
+ import{A as t,s,t as e,u as r,v as i,E as a,f as n,w as o,U as h,x as c,y as u,z as l,V as m,B as E,I as g,D as p,W as A,F as b,G as d,H as f,T as w,J as x,K as C,L as T,M as R,O as I,P as v,Q as k,S as N,e as F,X as y,r as B,p as D,q as P,Y as H,N as S,g as L,h as X,j,R as U,Z as q}from"./p-3c4e4245.js";import{b as G,D as K}from"./p-711b4e1e.js";import{d as M}from"./p-ec250cc4.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
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
- */class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case k:this.value=r.parse(F,N);break;case I:this.value=r.parse(F,v);break;case T:this.value=r.parse(F,R);break;case x:this.value=r.parse(F,C);break;case b:this.value=r.parse(F,w);break;case d:this.value=r.parse(F,f);break;case p:this.value=r.parse(F,A);break;case E:this.value=r.parse(F,g);break;case l:this.value=r.parse(F,m);break;case c:this.value=r.parse(F,u);break;case o:this.value=r.parse(F,h);break;case e:{const t=r.parse(F,i);this.value=t.map((t=>new a(n.serialize(t))));break}default:this.value=G.Convert.ToHex(F)}}getAsnExtnValue(){return this.asn.values[0]}}
11
+ */class $ extends t{constructor(t){super(t,s);const F=this.getAsnExtnValue();switch(this.asn.type){case k:this.value=r.parse(F,N);break;case I:this.value=r.parse(F,v);break;case T:this.value=r.parse(F,R);break;case x:this.value=r.parse(F,C);break;case f:this.value=r.parse(F,w);break;case b:this.value=r.parse(F,d);break;case p:this.value=r.parse(F,A);break;case E:this.value=r.parse(F,g);break;case l:this.value=r.parse(F,m);break;case c:this.value=r.parse(F,u);break;case o:this.value=r.parse(F,h);break;case e:{const t=r.parse(F,i);this.value=t.map((t=>new a(n.serialize(t))));break}default:this.value=G.Convert.ToHex(F)}}getAsnExtnValue(){return this.asn.values[0]}}
12
12
  /**
13
13
  * @license
14
14
  * Copyright (c) Peculiar Ventures, LLC.
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */class O extends t{constructor(t){var s;super(F(t),y),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:e}=this.asn;this.serialNumber=G.Convert.ToHex(e.serialNumber),this.version=e.version;const r=e.attrCertValidityPeriod.notBeforeTime;if(!r)throw new Error("Cannot get 'notBefore' value");this.notBefore=r;const i=e.attrCertValidityPeriod.notAfterTime;if(!i)throw new Error("Cannot get 'notAfter' value");this.notAfter=i,this.validity=M(this.notBefore,this.notAfter),this.issuer=e.issuer.v1Form||(null===(s=e.issuer.v2Form)||void 0===s?void 0:s.issuerName),this.holder=e.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new a(n.serialize(t)))))}parseAttributes(){const{acinfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${P(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){K.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
18
+ */class O extends t{constructor(t){var s;super(F(t),y),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:e}=this.asn;this.serialNumber=G.Convert.ToHex(e.serialNumber),this.version=e.version;const r=e.attrCertValidityPeriod.notBeforeTime;if(!r)throw new Error("Cannot get 'notBefore' value");this.notBefore=r;const i=e.attrCertValidityPeriod.notAfterTime;if(!i)throw new Error("Cannot get 'notAfter' value");this.notAfter=i,this.validity=M(this.notBefore,this.notAfter),this.issuer=e.issuer.v1Form||(null===(s=e.issuer.v2Form)||void 0===s?void 0:s.issuerName),this.holder=e.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new a(n.serialize(t)))))}parseAttributes(){const{acinfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${P(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}downloadAsPEM(t){K.attrCert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.attrCert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
19
19
  /**
20
20
  * @license
21
21
  * Copyright (c) Peculiar Ventures, LLC.
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */class Q extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new S(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===L&&s.parameters&&(e=n.parse(s.parameters,X)),s.algorithm===j&&(e=n.parse(t,U)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${P(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){K.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
25
+ */class Q extends t{constructor(t){super(F(t),H),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:s}=this.asn;this.subject=new S(s.subject).toJSON(),this.version=s.version}get publicKey(){const{subjectPublicKey:t,algorithm:s}=this.asn.certificationRequestInfo.subjectPKInfo;let e;return s.algorithm===L&&s.parameters&&(e=n.parse(s.parameters,X)),s.algorithm===j&&(e=n.parse(t,U)),{params:e,value:n.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:s.algorithm}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}parseAttributes(){const{certificationRequestInfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new $(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${P(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}downloadAsPEM(t){K.csr.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.csr.asDER(this.exportAsHexFormatted(),t||this.commonName)}}
26
26
  /**
27
27
  * @license
28
28
  * Copyright (c) Peculiar Ventures, LLC.
29
29
  *
30
30
  * This source code is licensed under the MIT license found in the
31
31
  * LICENSE file in the root directory of this source tree.
32
- */class V extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new S(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime(),this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:null===(s=t.crlEntryExtensions)||void 0===s?void 0:s.map((t=>new a(n.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t.name||t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}parseExtensions(){const{tbsCertList:t}=this.asn;t.crlExtensions&&(this.extensions=t.crlExtensions.map((t=>new a(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${P(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){K.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{Q as C,O as X,V as a}
32
+ */class V extends t{constructor(t){super(F(t),q),this.thumbprints={},this.type="X.509 Certificate Revocation List";const{tbsCertList:s}=this.asn;this.issuer=new S(s.issuer).toJSON(),this.version=s.version+1,this.lastUpdate=s.thisUpdate.getTime(),this.nextUpdate=s.nextUpdate.getTime(),this.revokedCertificates=(s.revokedCertificates||[]).map((t=>{var s;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:null===(s=t.crlEntryExtensions)||void 0===s?void 0:s.map((t=>new a(n.serialize(t))))}}))}async getThumbprint(t="SHA-1"){try{const s=await B(t,this.raw);s&&(this.thumbprints[t]=G.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}get signature(){const{signature:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}get commonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}parseExtensions(){const{tbsCertList:t}=this.asn;t.crlExtensions&&(this.extensions=t.crlExtensions.map((t=>new a(n.serialize(t)))))}exportAsBase64(){return G.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return D(G.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN X509 CRL-----\n${P(this.exportAsBase64())}\n-----END X509 CRL-----`}downloadAsPEM(t){K.crl.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){K.crl.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{Q as C,O as X,V as a}
@@ -0,0 +1,18 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright (c) Peculiar Ventures, LLC.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ function t(t,r,e,n="application/octet-stream"){const s=new Blob([t],{type:n});if(navigator.msSaveBlob)return navigator.msSaveBlob(s,`${r}.${e}`),new Promise((t=>{setTimeout(t,100)}));const i=window.URL.createObjectURL(s),a=document.createElement("a"),o=document.createElement("iframe");return a.style.display="none",o.style.display="none",o.name=i,document.body.appendChild(o),a.href=i,a.target=i,a.download=`${r}.${e}`,document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),new Promise((t=>{setTimeout((()=>{document.body.removeChild(o),t()}),100)}))}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,r,e){return t(e={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var n=e((function(t,r){Object.defineProperty(r,"__esModule",{value:!0});class e{static isArrayBuffer(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t).slice().buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,r){if(t.constructor===r)return t;if(this.isArrayBuffer(t))return new r(t);if(this.isArrayBufferView(t))return new r(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,r){const n=e.toUint8Array(t),s=e.toUint8Array(r);if(n.length!==s.byteLength)return!1;for(let t=0;t<n.length;t++)if(n[t]!==s[t])return!1;return!0}static concat(...t){if(Array.isArray(t[0])){const r=t[0];let e=0;for(const t of r)e+=t.byteLength;const n=new Uint8Array(e);let s=0;for(const t of r){const r=this.toUint8Array(t);n.set(r,s),s+=r.length}return t[1]?this.toView(n,t[1]):n.buffer}return this.concat(t)}}class n{static fromString(t){const r=unescape(encodeURIComponent(t)),e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer}static toString(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return decodeURIComponent(escape(n))}}class s{static toString(t,r=!1){const n=e.toArrayBuffer(t),s=new DataView(n);let i="";for(let t=0;t<n.byteLength;t+=2){const e=s.getUint16(t,r);i+=String.fromCharCode(e)}return i}static fromString(t,r=!1){const e=new ArrayBuffer(2*t.length),n=new DataView(e);for(let e=0;e<t.length;e++)n.setUint16(2*e,t.charCodeAt(e),r);return e}}class i{static isHex(t){return"string"==typeof t&&/^[a-z0-9]+$/i.test(t)}static isBase64(t){return"string"==typeof t&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}static isBase64Url(t){return"string"==typeof t&&/^[a-zA-Z0-9-_]+$/i.test(t)}static ToString(t,r="utf8"){const n=e.toUint8Array(t);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return s.toString(n,!0);case"utf16":case"utf16be":return s.toString(n);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(t,r="utf8"){if(!t)return new ArrayBuffer(0);switch(r.toLowerCase()){case"utf8":return this.FromUtf8String(t);case"binary":return this.FromBinary(t);case"hex":return this.FromHex(t);case"base64":return this.FromBase64(t);case"base64url":return this.FromBase64Url(t);case"utf16le":return s.fromString(t,!0);case"utf16":case"utf16be":return s.fromString(t);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToBase64(t){const r=e.toUint8Array(t);if("undefined"!=typeof btoa){const t=this.ToString(r,"binary");return btoa(t)}return Buffer.from(r).toString("base64")}static FromBase64(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}static FromBase64Url(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(t){return this.ToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(t,r=i.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.FromBinary(t);case"utf8":return n.fromString(t);case"utf16":case"utf16be":return s.fromString(t);case"utf16le":case"usc2":return s.fromString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToUtf8String(t,r=i.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.ToBinary(t);case"utf8":return n.toString(t);case"utf16":case"utf16be":return s.toString(t);case"utf16le":case"usc2":return s.toString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromBinary(t){const r=t.length,e=new Uint8Array(r);for(let n=0;n<r;n++)e[n]=t.charCodeAt(n);return e.buffer}static ToBinary(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}static ToHex(t){const r=e.toUint8Array(t),n=[],s=r.length;for(let t=0;t<s;t++){const e=r[t].toString(16).padStart(2,"0");n.push(e)}return n.join("")}static FromHex(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isHex(r))throw new TypeError("Argument 'hexString' is not HEX encoded");r.length%2&&(r=`0${r}`);const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2);e[t/2]=parseInt(n,16)}return e.buffer}static ToUtf16String(t,r=!1){return s.toString(t,r)}static FromUtf16String(t,r=!1){return s.fromString(t,r)}static Base64Padding(t){const r=4-t.length%4;if(r<4)for(let e=0;e<r;e++)t+="=";return t}static formatString(t){return(null==t?void 0:t.replace(/[\n\r\t ]/g,""))||""}}i.DEFAULT_UTF8_ENCODING="utf8",r.BufferSourceConverter=e,r.Convert=i,r.assign=function(t){const r=arguments[0];for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)r[t]=e[t]}return r},r.combine=function(...t){const r=t.map((t=>t.byteLength)).reduce(((t,r)=>t+r)),e=new Uint8Array(r);let n=0;return t.map((t=>new Uint8Array(t))).forEach((t=>{for(const r of t)e[n++]=r})),e.buffer},r.isEqual=function(t,r){if(!t||!r)return!1;if(t.byteLength!==r.byteLength)return!1;const e=new Uint8Array(t),n=new Uint8Array(r);for(let r=0;r<t.byteLength;r++)if(e[r]!==n[r])return!1;return!0}}));
12
+ /**
13
+ * @license
14
+ * Copyright (c) Peculiar Ventures, LLC.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */class s{}s.cert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")}},s.attrCert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")}},s.csr={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")}},s.crl={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")}};export{s as D,r as a,n as b,e as c,t as d}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-05f4713f.js";import"./p-b44dc7c9.js";import"./p-cff9655c.js";import"./p-fec9d812.js";import{B as r,f as d,I as s,P as o,S as l,b as n,E as p,c as h,d as c,e as b,M as g}from"./p-77121cf7.js";const m=class{constructor(i){t(this,i),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?i(e,{"data-view":this.view},i("table",null,i(r,Object.assign({},this.certificateDecoded)),i(d,{name:this.certificateDecoded.subject}),i(s,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),i(o,{publicKey:this.certificateDecoded.publicKey}),i(l,{signature:this.certificateDecoded.signature}),i(n,{thumbprints:this.certificateDecoded.thumbprints}),i(p,{extensions:this.certificateDecoded.extensions,getLEILink:h,getDNSNameLink:c,getIPAddressLink:b,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&i(g,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};m.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table table{margin-bottom:0}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{m as peculiar_certificate_viewer}
4
+ import{r as t,h as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-0f7868b1.js";import"./p-3c4e4245.js";import"./p-711b4e1e.js";import"./p-ec250cc4.js";import{B as r,f as d,I as s,P as o,S as l,b as n,E as p,c as h,d as c,e as b,M as g}from"./p-08aba71b.js";const m=class{constructor(i){t(this,i),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return i("div",{class:"status_wrapper"},i("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?i(e,{"data-view":this.view},i("table",null,i(r,Object.assign({},this.certificateDecoded)),i(d,{name:this.certificateDecoded.subject}),i(s,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),i(o,{publicKey:this.certificateDecoded.publicKey}),i(l,{signature:this.certificateDecoded.signature}),i(n,{thumbprints:this.certificateDecoded.thumbprints}),i(p,{extensions:this.certificateDecoded.extensions,getLEILink:h,getDNSNameLink:c,getIPAddressLink:b,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&i(g,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};m.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table table{margin-bottom:0}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{m as peculiar_certificate_viewer}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{X as a}from"./p-05f4713f.js";import{_ as i}from"./p-b44dc7c9.js";import"./p-cff9655c.js";import{l}from"./p-fec9d812.js";const s=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),t.body.downloadAsPEM(t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),t.body.downloadAsDER(t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},l.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},l.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},l.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const s=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:s},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("fingerprint"),"  (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},l.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:l.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},l.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),s&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},l.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("fingerprint"),"  (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};s.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{s as peculiar_certificates_viewer}
4
+ import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{X as a}from"./p-0f7868b1.js";import{_ as i}from"./p-3c4e4245.js";import"./p-711b4e1e.js";import{l}from"./p-ec250cc4.js";const s=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),t.body.downloadAsPEM(t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),t.body.downloadAsDER(t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},l.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},l.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},l.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const s=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:s},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("fingerprint"),"  (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},l.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:l.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},l.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),s&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},l.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("fingerprint"),"  (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};s.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';export{s as peculiar_certificates_viewer}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{_ as a,$ as r,G as s,W as n,I as d,T as o,V as l,U as c,y as h,a0 as p,a1 as b,a2 as g}from"./p-b44dc7c9.js";import{b as u}from"./p-cff9655c.js";import{l as m,a as x}from"./p-fec9d812.js";import{X as v,a as f,C as w}from"./p-e7518804.js";import{g as y,R as k,G as L,a as I,T as S,B as A,S as _,b as N,c as D,d as j,e as K,E as P,M as C,I as E,f as z,P as T}from"./p-77121cf7.js";
4
+ import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{_ as a,$ as r,G as s,W as n,I as d,T as o,V as l,U as c,y as h,a0 as p,a1 as b,a2 as g}from"./p-3c4e4245.js";import{b as u}from"./p-711b4e1e.js";import{l as m,a as x}from"./p-ec250cc4.js";import{X as v,a as f,C as w}from"./p-48a620ff.js";import{g as y,R as k,G as L,a as I,T as S,B as A,S as _,b as N,c as D,d as j,e as K,E as P,M as C,I as E,f as z,P as T}from"./p-08aba71b.js";
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{r as t,h as i,H as r,g as s}from"./p-f7683ba5.js";import{l as o,a as e}from"./p-fec9d812.js";import"./p-cff9655c.js";const a=class{constructor(i){t(this,i),this.fill="stroke",this.actions=[],this.open=!1,this.onClickSplitButton=t=>{t.stopPropagation(),this.open=!this.open}}onClickActiveButton(t,i){this.open=!1,t(i)}renderActiveSplitState(){return this.open?i("div",{class:"button_split_container"},this.actions.map((t=>i("peculiar-button",{fill:"fill",class:"button_split_action",onClick:this.onClickActiveButton.bind(this,t.onClick)},t.text)))):null}render(){return i("div",{class:{button_split:!0}},i("peculiar-button",{fill:this.fill,onClick:this.onClick},i("slot",null)),i("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:!0,m_open:this.open}},i("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"button_split_icon"},i("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))),this.renderActiveSplitState())}};a.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}';const l=class{constructor(i){t(this,i),this.showIssuer=!0}renderRow(t,r,s){return i("tr",null,i("td",null,i("peculiar-typography",{color:"grey_5"},t,":")),i("td",null,i("peculiar-typography",{class:"meta_value",monospace:s},r)))}render(){return i(r,null,i("table",null,i("tbody",null,this.renderRow(o.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(o.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(o.getString("serialNumber"),this.certificate.serialNumber,!0),this.renderRow(o.getString("version"),this.certificate.version),this.renderRow(o.getString("validity"),this.certificate.validity),this.renderRow(o.getString("issued"),e(this.certificate.notBefore)),this.renderRow(o.getString("expired"),e(this.certificate.notAfter)))))}};l.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";const n=class{constructor(i){t(this,i),this.size=24,this.width=4,this.box=50}render(){return i(r,null,i("div",{class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},i("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},i("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),i("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};n.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:#3584f7;stroke:rgba(var(--pv-color-primary-rgb), 1)}.circle_progress_backdrop{stroke:#d1d5d9;stroke:rgba(var(--pv-color-grey_3-rgb), 1)}";const h=class{constructor(i){t(this,i),this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let i=t;if(this.search){const r=new RegExp(`(${this.search})`,"gi");i=t.replace(r,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=i}resetHighlightSearch(t){const i=new RegExp(`</?${this.tag}>`,"g");return t.replace(i,"")}render(){return i(r,null,i("slot",null))}get host(){return s(this)}};h.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline}::slotted(mark){background-color:rgba(247, 168, 49, 0.4);background-color:rgba(var(--pv-color-attention-rgb), 0.4)}";export{a as peculiar_button_split,l as peculiar_certificate_summary,n as peculiar_circular_progress,h as peculiar_highlight_words}
4
+ import{r as t,h as i,H as r,g as s}from"./p-f7683ba5.js";import{l as o,a as e}from"./p-ec250cc4.js";import"./p-711b4e1e.js";const a=class{constructor(i){t(this,i),this.fill="stroke",this.actions=[],this.open=!1,this.onClickSplitButton=t=>{t.stopPropagation(),this.open=!this.open}}onClickActiveButton(t,i){this.open=!1,t(i)}renderActiveSplitState(){return this.open?i("div",{class:"button_split_container"},this.actions.map((t=>i("peculiar-button",{fill:"fill",class:"button_split_action",onClick:this.onClickActiveButton.bind(this,t.onClick)},t.text)))):null}render(){return i("div",{class:{button_split:!0}},i("peculiar-button",{fill:this.fill,onClick:this.onClick},i("slot",null)),i("peculiar-button",{fill:this.fill,onClick:this.onClickSplitButton,class:{button_split_with_icon:!0,m_open:this.open}},i("svg",{viewBox:"0 0 7 5",xmlns:"http://www.w3.org/2000/svg",class:"button_split_icon"},i("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.459.124c.934.001 1.442.994.84 1.644L4.425 3.794c-.44.475-1.244.475-1.684 0L.862 1.764C.26 1.115.77.12 1.705.122l3.754.003z"}))),this.renderActiveSplitState())}};a.style=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline-block;vertical-align:top;position:relative;white-space:nowrap;font-size:0}.button_split_icon{width:7px;height:5px;display:inline-block;vertical-align:middle}.button_split_with_icon{width:25px;border-bottom-left-radius:0;border-top-left-radius:0}.button_split_with_icon.m_open::part(base):before{position:fixed;width:100%;height:100%;top:0;left:0;content:""}.button_split_action{width:100%}.button_split_container{position:absolute;bottom:calc(100% + 1px);left:0;width:100%;border-radius:2px;-webkit-box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);box-shadow:0px -2px 1px rgb(var(--pv-color-light-rgb)), 0px 0px 10px rgba(var(--pv-color-dark-rgb), 0.0241168);z-index:1}.button_split>peculiar-button:first-of-type::part(base){border-top-right-radius:0;border-bottom-right-radius:0}.button_split>peculiar-button:last-of-type::part(base){border-top-left-radius:0;border-bottom-left-radius:0}.button_split>peculiar-button:not(:first-child){margin-left:-1px}';const l=class{constructor(i){t(this,i),this.showIssuer=!0}renderRow(t,r,s){return i("tr",null,i("td",null,i("peculiar-typography",{color:"grey_5"},t,":")),i("td",null,i("peculiar-typography",{class:"meta_value",monospace:s},r)))}render(){return i(r,null,i("table",null,i("tbody",null,this.renderRow(o.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(o.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(o.getString("serialNumber"),this.certificate.serialNumber,!0),this.renderRow(o.getString("version"),this.certificate.version),this.renderRow(o.getString("validity"),this.certificate.validity),this.renderRow(o.getString("issued"),e(this.certificate.notBefore)),this.renderRow(o.getString("expired"),e(this.certificate.notAfter)))))}};l.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}td{border:none;padding:0}table{width:100%;border-spacing:0;border-collapse:collapse}td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td:first-child{width:130px;padding-right:10px}table td:last-child{width:calc(100% - 130px)}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{width:100%}}";const n=class{constructor(i){t(this,i),this.size=24,this.width=4,this.box=50}render(){return i(r,null,i("div",{class:"circle_progress",style:{width:`${this.size}px`,height:`${this.size}px`}},i("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},i("circle",{class:"circle_progress_backdrop",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}),i("circle",{class:"circle_progress_circle",cx:this.box/2,cy:this.box/2,r:this.box/2-5,fill:"none",style:{strokeWidth:`${this.width}px`}}))))}};n.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%}@-webkit-keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes circular-rotate{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}@keyframes circular-dash{0%{stroke-dasharray:1, 200;stroke-dashoffset:0}50%{stroke-dasharray:100, 200;stroke-dashoffset:-15}to{stroke-dasharray:100, 200;stroke-dashoffset:-120}}.circle_progress{margin:0 auto}.circle_progress_svg{-webkit-animation:circular-rotate 1.4s linear infinite;animation:circular-rotate 1.4s linear infinite}.circle_progress_circle{stroke-linecap:round;-webkit-animation:circular-dash 1.4s ease-in-out infinite;animation:circular-dash 1.4s ease-in-out infinite;stroke-dasharray:80, 200;stroke-dashoffset:0;stroke:#3584f7;stroke:rgba(var(--pv-color-primary-rgb), 1)}.circle_progress_backdrop{stroke:#d1d5d9;stroke:rgba(var(--pv-color-grey_3-rgb), 1)}";const h=class{constructor(i){t(this,i),this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let i=t;if(this.search){const r=new RegExp(`(${this.search})`,"gi");i=t.replace(r,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=i}resetHighlightSearch(t){const i=new RegExp(`</?${this.tag}>`,"g");return t.replace(i,"")}render(){return i(r,null,i("slot",null))}get host(){return s(this)}};h.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:inline}::slotted(mark){background-color:rgba(247, 168, 49, 0.4);background-color:rgba(var(--pv-color-attention-rgb), 0.4)}";export{a as peculiar_button_split,l as peculiar_certificate_summary,n as peculiar_circular_progress,h as peculiar_highlight_words}
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{c as t,a as n}from"./p-cff9655c.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",e="second",i="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}},m=function(t,n,r){var e=String(t);return!e||e.length>=n?t:""+Array(n+1-e.length).join(r)+t},M={s:m,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),e=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+m(e,2,"0")+":"+m(i,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var e=12*(r.year()-n.year())+(r.month()-n.month()),i=n.clone().add(e,o),s=r-i<0,u=n.clone().add(e+(s?-1:1),o);return+(-(e+(r-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:i,s:e,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=y;var g=function(t){return t instanceof _},w=function t(n,r,e){var i;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();p[s]&&(i=s),r&&(p[s]=r,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;p[a]=n,i=a}return!e&&i&&(D=i),i||!e&&D},S=function(t,n){if(g(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=M;b.l=w,b.i=g,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var e=n.match(l);if(e){var i=e[2]-1||0,s=(e[7]||"0").substring(0,3);return r?new Date(Date.UTC(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)):new Date(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},m.isAfter=function(t,n){return S(t)<this.startOf(n)},m.isBefore=function(t,n){return this.endOf(n)<S(t)},m.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var e=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?e:e.endOf(u)},v=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},y=this.$W,m=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,m):l(0,m+1);case a:var p=this.$locale().weekStart||0,g=(y<p?y+7:y)-p;return l(h?M-g:M+(6-g),m);case u:case f:return v(D+"Hours",0);case s:return v(D+"Minutes",1);case i:return v(D+"Seconds",2);case e:return v(D+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[i]=d+"Minutes",a[e]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],v=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var y=this.clone().set(f,1);y.$d[l](v),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},m.set=function(t,n){return this.clone().$set(t,n)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),v=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return v(1);if(l===a)return v(7);var y=(f={},f[i]=t,f[s]=n,f[e]=1e3,f)[l]||1,m=this.$d.getTime()+r*y;return b.w(m,this)},m.subtract=function(t,n){return this.add(-1*t,n)},m.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var e=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var e=t<12?"AM":"PM";return r?e.toLowerCase():e},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:i};return e.replace(v,(function(t,n){return n||y[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,f,d){var l,v=b.p(f),y=S(r),m=(y.utcOffset()-this.utcOffset())*t,M=this-y,D=b.m(this,y);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(M-m)/6048e5,l[u]=(M-m)/864e5,l[s]=M/n,l[i]=M/t,l[e]=M/1e3,l)[v]||M,d?D:b.a(D)},m.daysInMonth=function(){return this.endOf(o).$D},m.$locale=function(){return p[this.$L]},m.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),e=w(t,n,!0);return e&&(r.$L=e),r},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),C=_.prototype;return S.prototype=C,[["$ms",r],["$s",e],["$m",i],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){C[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=g,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()})),e=t((function(t){t.exports=function(t,n,r){t=t||{};var e=n.prototype,i={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 s(t,n,r,i){return e.fromToBase(t,n,r,i)}r.en.relativeTime=i,e.fromToBase=function(n,e,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||i,d=t.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,v=0;v<l;v+=1){var y=d[v];y.d&&(o=u?r(n).diff(s,y.d,!0):s.diff(n,y.d,!0));var m=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,m<=y.r||!y.r){m<=1&&v>0&&(y=d[v-1]);var M=f[y.l];a&&(m=a(""+m)),h="string"==typeof M?M.replace("%d",m):M(m,e,y.l,c);break}}if(e)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},e.to=function(t,n){return s(t,n,this,!0)},e.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};e.toNow=function(t){return this.to(u(this),t)},e.fromNow=function(t){return this.from(u(this),t)}}}));
4
+ import{c as t,a as n}from"./p-711b4e1e.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",e="second",i="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var n=["th","st","nd","rd"],r=t%100;return"["+t+(n[(r-20)%10]||n[r]||n[0])+"]"}},m=function(t,n,r){var e=String(t);return!e||e.length>=n?t:""+Array(n+1-e.length).join(r)+t},M={s:m,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),e=Math.floor(r/60),i=r%60;return(n<=0?"+":"-")+m(e,2,"0")+":"+m(i,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var e=12*(r.year()-n.year())+(r.month()-n.month()),i=n.clone().add(e,o),s=r-i<0,u=n.clone().add(e+(s?-1:1),o);return+(-(e+(r-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:i,s:e,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",p={};p[D]=y;var g=function(t){return t instanceof _},w=function t(n,r,e){var i;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();p[s]&&(i=s),r&&(p[s]=r,i=s);var u=n.split("-");if(!i&&u.length>1)return t(u[0])}else{var a=n.name;p[a]=n,i=a}return!e&&i&&(D=i),i||!e&&D},S=function(t,n){if(g(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=M;b.l=w,b.i=g,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var e=n.match(l);if(e){var i=e[2]-1||0,s=(e[7]||"0").substring(0,3);return r?new Date(Date.UTC(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)):new Date(e[1],i,e[3]||1,e[4]||0,e[5]||0,e[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},m.isAfter=function(t,n){return S(t)<this.startOf(n)},m.isBefore=function(t,n){return this.endOf(n)<S(t)},m.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var e=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?e:e.endOf(u)},v=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},y=this.$W,m=this.$M,M=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,m):l(0,m+1);case a:var p=this.$locale().weekStart||0,g=(y<p?y+7:y)-p;return l(h?M-g:M+(6-g),m);case u:case f:return v(D+"Hours",0);case s:return v(D+"Minutes",1);case i:return v(D+"Seconds",2);case e:return v(D+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[i]=d+"Minutes",a[e]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],v=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var y=this.clone().set(f,1);y.$d[l](v),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l](v);return this.init(),this},m.set=function(t,n){return this.clone().$set(t,n)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),v=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return v(1);if(l===a)return v(7);var y=(f={},f[i]=t,f[s]=n,f[e]=1e3,f)[l]||1,m=this.$d.getTime()+r*y;return b.w(m,this)},m.subtract=function(t,n){return this.add(-1*t,n)},m.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var e=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,i,s){return t&&(t[r]||t(n,e))||i[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var e=t<12?"AM":"PM";return r?e.toLowerCase():e},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:i};return e.replace(v,(function(t,n){return n||y[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,f,d){var l,v=b.p(f),y=S(r),m=(y.utcOffset()-this.utcOffset())*t,M=this-y,D=b.m(this,y);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(M-m)/6048e5,l[u]=(M-m)/864e5,l[s]=M/n,l[i]=M/t,l[e]=M/1e3,l)[v]||M,d?D:b.a(D)},m.daysInMonth=function(){return this.endOf(o).$D},m.$locale=function(){return p[this.$L]},m.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),e=w(t,n,!0);return e&&(r.$L=e),r},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),C=_.prototype;return S.prototype=C,[["$ms",r],["$s",e],["$m",i],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){C[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=g,S.unix=function(t){return S(1e3*t)},S.en=p[D],S.Ls=p,S.p={},S}()})),e=t((function(t){t.exports=function(t,n,r){t=t||{};var e=n.prototype,i={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 s(t,n,r,i){return e.fromToBase(t,n,r,i)}r.en.relativeTime=i,e.fromToBase=function(n,e,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||i,d=t.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,v=0;v<l;v+=1){var y=d[v];y.d&&(o=u?r(n).diff(s,y.d,!0):s.diff(n,y.d,!0));var m=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,m<=y.r||!y.r){m<=1&&v>0&&(y=d[v-1]);var M=f[y.l];a&&(m=a(""+m)),h="string"==typeof M?M.replace("%d",m):M(m,e,y.l,c);break}}if(e)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},e.to=function(t,n){return s(t,n,this,!0)},e.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};e.toNow=function(t){return this.to(u(this),t)},e.fromNow=function(t){return this.from(u(this),t)}}}));
5
5
  /**
6
6
  * @license
7
7
  * Copyright (c) Peculiar Ventures, LLC.
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
3
  */
4
- import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-22d8ae9c",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-40808c02",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-610b85e3",[[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]]]],["p-6d37c8b5",[[1,"peculiar-link",{href:[513],type:[513]}]]],["p-57b89412",[[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}]]],["p-7de0bfb3",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-5fb5f008",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-918aeee4",[[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-893659f4",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
4
+ import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-81d33fb4",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]],["p-2f213160",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],defaultCertificate:[1,"default-certificate"],certificateDecoded:[32]}]]],["p-610b85e3",[[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]]]],["p-6d37c8b5",[[1,"peculiar-link",{href:[513],type:[513]}]]],["p-57b89412",[[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}]]],["p-81ae1305",[[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}]]],["p-9bfd4f58",[[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-crl-viewer",{certificate:[513],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}]]],["p-918aeee4",[[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-df53fbcc",[[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]]],e)));
@@ -1276,6 +1276,7 @@ export declare const OIDs: {
1276
1276
  '1.3.6.1.5.5.7.3.13': string;
1277
1277
  '1.3.6.1.5.5.7.3.14': string;
1278
1278
  '1.3.6.1.5.5.7.3.31': string;
1279
+ '1.3.6.1.5.5.7.3.46': string;
1279
1280
  '1.3.6.1.5.5.7.4': string;
1280
1281
  '1.3.6.1.5.5.7.4.1': string;
1281
1282
  '1.3.6.1.5.5.7.4.2': string;
@@ -21,7 +21,7 @@ export declare class CRL extends AsnData<CertificateList> {
21
21
  thumbprints: Record<string, string>;
22
22
  type: string;
23
23
  constructor(raw: string);
24
- getThumbprint(algorithm?: globalThis.AlgorithmIdentifier): Promise<void>;
24
+ getThumbprint(algorithm?: string): Promise<void>;
25
25
  get signature(): ISignature;
26
26
  get commonName(): string;
27
27
  parseExtensions(): void;
@@ -30,7 +30,7 @@ export declare class CSR extends AsnData<CertificationRequest> {
30
30
  get publicKey(): IPublicKey;
31
31
  get signature(): ISignature;
32
32
  get commonName(): string;
33
- getThumbprint(algorithm?: globalThis.AlgorithmIdentifier): Promise<void>;
33
+ getThumbprint(algorithm?: string): Promise<void>;
34
34
  parseAttributes(): void;
35
35
  exportAsBase64(): string;
36
36
  exportAsHexFormatted(): string;
@@ -30,7 +30,7 @@ export declare class X509AttributeCertificate extends AsnData<AttributeCertifica
30
30
  get signature(): ISignature;
31
31
  parseExtensions(): void;
32
32
  parseAttributes(): void;
33
- getThumbprint(algorithm?: globalThis.AlgorithmIdentifier): Promise<void>;
33
+ getThumbprint(algorithm?: string): Promise<void>;
34
34
  exportAsBase64(): string;
35
35
  exportAsHexFormatted(): string;
36
36
  exportAsPemFormatted(): string;
@@ -43,7 +43,7 @@ export declare class X509Certificate extends AsnData<Certificate> {
43
43
  exportAsBase64(): string;
44
44
  exportAsHexFormatted(): string;
45
45
  exportAsPemFormatted(): string;
46
- getThumbprint(algorithm?: globalThis.AlgorithmIdentifier): Promise<void>;
46
+ getThumbprint(algorithm?: string): Promise<void>;
47
47
  get commonName(): string;
48
48
  get issuerCommonName(): string;
49
49
  get isRoot(): boolean;
@@ -5,5 +5,6 @@ export type ColorType = 'dark'
5
5
  | 'attention'
6
6
  | 'primary';
7
7
 
8
+ // eslint-disable-next-line import/no-cycle
8
9
  export * from './components';
9
10
  export * from './index';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peculiar/certificates-viewer",
3
- "version": "3.8.0",
3
+ "version": "3.9.0",
4
4
  "private": false,
5
5
  "description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
6
6
  "keywords": [
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "6653289bcb06b0414ea225c3fe90cbe856246873"
75
+ "gitHead": "18d3fed5ef4b00cdc5d26a2ebd4b34883b170e15"
76
76
  }
@@ -1,11 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{A as t,e as s,C as r,N as e,E as i,f as n,g as o,h as a,j as h,R as u,k as c,l as m,m as f,n as l,o as g,p,q as E,r as b}from"./p-b44dc7c9.js";import{b as C,D as A}from"./p-cff9655c.js";import{d}from"./p-fec9d812.js";
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */class w extends t{constructor(t){super(s(t),r),this.thumbprints={},this.type="X.509 Certificate";const{tbsCertificate:i}=this.asn;this.serialNumber=C.Convert.ToHex(i.serialNumber),this.subject=new e(i.subject).toJSON(),this.issuer=new e(i.issuer).toJSON(),this.version=i.version+1;const n=i.validity.notBefore.utcTime||i.validity.notBefore.generalTime;if(!n)throw new Error("Cannot get 'notBefore' value");this.notBefore=n;const o=i.validity.notAfter.utcTime||i.validity.notAfter.generalTime;if(!o)throw new Error("Cannot get 'notAfter' value");this.notAfter=o,this.validity=d(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new i(n.serialize(t)))))}getPublicKeyInfo(t){const{subjectPublicKey:s,algorithm:r}=t;let e;return r.algorithm===o&&r.parameters&&(e=n.parse(r.parameters,a)),r.algorithm===h&&(e=n.parse(s,u)),r.algorithm===c&&(e=n.parse(s,m),e=e.map((t=>this.getPublicKeyInfo(t)))),{params:e,value:n.serialize(t),algorithm:r.algorithm}}get publicKey(){return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo)}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;let r;if(s.algorithm===f){const e=n.parse(t,l);r=n.parse(s.parameters,g).map(((t,s)=>Object.assign(Object.assign({},t),{value:e[s]})))}return{params:r,value:t,algorithm:s.algorithm}}exportAsBase64(){return C.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return p(C.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${E(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(t="SHA-1"){try{const s=await b(t,this.raw);s&&(this.thumbprints[t.name||t]=C.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const s=this.subject[t];if("CN"===s.shortName||"E"===s.shortName||"O"===s.shortName)return s.value}return""}get issuerCommonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const s=this.issuer[t];if("CN"===s.shortName)return s.value;if("E"===s.shortName)return s.value}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){return this.subject?this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}issuerToString(){return this.issuer?this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}downloadAsPEM(t){A.cert.asPEM(this.exportAsPemFormatted(),t||this.commonName)}downloadAsDER(t){A.cert.asDER(this.exportAsHexFormatted(),t||this.commonName)}}export{w as X}
@@ -1,69 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- import{h as e}from"./p-f7683ba5.js";import{l as a,a as n}from"./p-fec9d812.js";import{b as t}from"./p-cff9655c.js";import{_ as c,$ as o,a3 as s,u as i,a4 as f,a5 as l,a6 as r,a7 as d,a8 as b,a9 as u,aa as m,ab as v,ac as p,ad as x,ae as g,af as y,ag as h,ah as C,ai as N,aj as S,ak as A,al as D,am as I,an as j,ao as G,ap as T,aq as O,ar as k,as as P,at as L,au as R,av as V,aw as B,ax as $,ay as U,az as E,aA as K,aB as H,a0 as M,aC as X,aD as Y,aE as _,aF as q,aG as w,aH as z,aI as F,aJ as Q,aK as W,aL as J}from"./p-b44dc7c9.js";
5
- /**
6
- * @license
7
- * Copyright (c) Peculiar Ventures, LLC.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */function Z(e){const a=c[e];return a?`${a} (${e})`:e}
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */const ee=e=>`https://search.gleif.org/#/record/${e}`,ae=e=>`https://search.censys.io/search?resource=hosts&q=dns.names%3A${e}`,ne=e=>`https://search.censys.io/search?resource=hosts&q=ip%3A${e}`
19
- /**
20
- * @license
21
- * Copyright (c) Peculiar Ventures, LLC.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */,te=(a,n)=>e("tr",null,e("td",{colSpan:2},e("table",null,n))),ce=a=>{const{value:n}=a;return n?e("tr",{class:"title"},e("td",{colSpan:2},e("peculiar-typography",{type:"h6"},n))):null},oe=a=>{const{name:n,value:t,monospace:c,collapse:o,href:s,extraValue:i}=a;if(!n)return null;if(null==t)return null;let f;f=o?e("peculiar-text-hider",null,t):t;const l=!!t.toString();return e("tr",null,e("td",{colSpan:l?1:2},e("peculiar-typography",{color:"grey_5"},n,l?":":"")),l&&e("td",{class:{monospace:c}},function(e){return 0===e.indexOf("http")}
26
- /**
27
- * @license
28
- * Copyright (c) Peculiar Ventures, LLC.
29
- *
30
- * This source code is licensed under the MIT license found in the
31
- * LICENSE file in the root directory of this source tree.
32
- */(t.toString())||s?e("peculiar-link",{href:s||t.toString()},t):e("peculiar-typography",{monospace:c},f,i)))},se=t=>{const{serialNumber:c,version:o,validity:s,notBefore:i,notAfter:f,lastUpdate:l,nextUpdate:r,type:d}=t;return[e(ce,{value:a.getString("basicInformation")}),e(oe,{name:a.getString("type"),value:d}),e(oe,{name:a.getString("serialNumber"),value:c,monospace:!0}),e(oe,{name:a.getString("version"),value:o}),e(oe,{name:a.getString("validity"),value:s}),e(oe,{name:a.getString("issued"),value:i?n(i):void 0}),e(oe,{name:a.getString("expired"),value:f?n(f):void 0}),e(oe,{name:a.getString("lastUpdate"),value:l?n(l):void 0}),e(oe,{name:a.getString("nextUpdate"),value:r?n(r):void 0})]};
33
- /**
34
- * @license
35
- * Copyright (c) Peculiar Ventures, LLC.
36
- *
37
- * This source code is licensed under the MIT license found in the
38
- * LICENSE file in the root directory of this source tree.
39
- */
40
- function ie(e){var a;if(null===(a=e.params)||void 0===a?void 0:a.modulus){let a=e.params.modulus.byteLength;return a%2&&(a-=1),8*a}return null}function fe(e){var a;return(null===(a=e.params)||void 0===a?void 0:a.publicExponent)?3===e.params.publicExponent.byteLength?65537:3:null}const le=n=>{const{publicKey:c}=n;if(!c)return null;function o(n){var c;return[e(oe,{name:a.getString("algorithm"),value:Z(n.algorithm)}),e(oe,{name:a.getString("namedCurve"),value:Z(null===(c=n.params)||void 0===c?void 0:c.namedCurve)}),e(oe,{name:a.getString("exponent"),value:fe(n)}),e(oe,{name:a.getString("modulus"),value:ie(n)}),e(oe,{name:a.getString("value"),value:t.Convert.ToHex(n.value),monospace:!0,collapse:!0})]}return[e(ce,{value:a.getString("publicKeyInfo")}),o(c),Array.isArray(c.params)&&c.params.length&&c.params.map((a=>e(te,null,o(a))))]},re=n=>{const{name:t}=n;return[e(ce,{value:a.getString("subjectName")}),t.map((a=>e(oe,{name:a.name||a.type,value:a.value})))]},de=n=>{const{name:t,issuerDnLink:c}=n,o=a.getString("issuerName");return[e(ce,{value:c?e("peculiar-link",{href:c,type:"h6"},o):o}),t.map((a=>e(oe,{name:a.name||a.type,value:a.value})))]},be=n=>{const{signature:c}=n;if(!c)return null;function o(n){return[e(oe,{name:a.getString("algorithm"),value:Z(n.algorithm)}),e(oe,{name:a.getString("value"),value:t.Convert.ToHex(n.value),monospace:!0,collapse:!0})]}return[e(ce,{value:a.getString("signature")}),o(c),c.params&&c.params.length&&c.params.map((a=>e(te,null,o(a))))]},ue=n=>{const{thumbprints:t}=n;if(!t)return null;const c=Object.keys(t);return c.length?[e(ce,{value:a.getString("fingerprints")}),c.map((a=>e(oe,{name:a,value:t[a],monospace:!0})))]:null},me=(n,t)=>{const{extension:c}=n;return[e(oe,{name:"Name",value:Z(c.asn.extnID)}),e(oe,{name:"Critical",value:a.getString(c.asn.critical?"yes":"no")}),t,e("tr",null,e("td",{colSpan:2,class:"divider"},e("span",{class:"bg_fill"})))]},ve=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Usage",value:n.value.toJSON().join(", ")}))},pe=n=>{const{extension:t}=n;return e(me,{extension:t},e(oe,{name:"Certificate Authority",value:a.getString(t.value.cA?"yes":"no")}),e(oe,{name:"Path Length Constraint",value:t.value.pathLenConstraint}))},xe=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Purposes:",value:""}),n.value.map((a=>e(te,null,e(oe,{name:"Purpose",value:Z(a)}))))])},ge=a=>{const{extension:n,getSubjectKeyIdChildrenLink:c,getSubjectKeyIdSiblingsLink:o}=a,s=t.Convert.ToHex(n.value.buffer),i=c(s),f=o(s);return e(me,{extension:n},e(oe,{name:"Key ID",value:s,monospace:!0,extraValue:[i&&e("span",null," [",e("peculiar-link",{href:i},"children"),"]"),f&&e("span",null," [",e("peculiar-link",{href:f},"siblings"),"]")]}))},ye=a=>{const{extension:n,getAuthKeyIdParentLink:c,getAuthKeyIdSiblingsLink:o}=a,s=t.Convert.ToHex(n.value.keyIdentifier.buffer),i=c(s),f=o(s);return e(me,{extension:n},e(oe,{name:"Key ID",value:s,monospace:!0,extraValue:[i&&e("span",null," [",e("peculiar-link",{href:i},"parents"),"]"),f&&e("span",null," [",e("peculiar-link",{href:f},"siblings"),"]")]}))},he={otherName:"Other Name",rfc822Name:"RFC 822 Name",dNSName:"DNS Name",x400Address:"X400 Address",directoryName:"Directory Name",ediPartyName:"Edi Party Name ",uniformResourceIdentifier:"URI",iPAddress:"IP Address",registeredID:"Registered ID"},Ce=a=>{const{generalName:n,getDNSNameLink:d,getIPAddressLink:b}=a;return n?Object.keys(n).map((a=>{const u=n[a];if(u instanceof o)return[e(oe,{name:he[a]||a,value:""}),u.map((a=>a.map((a=>e(oe,{name:c[a.type]||a.type,value:a.value.toString()})))))];if(u instanceof s){try{const a=i.parse(u.value,f);return e(oe,{name:c[u.typeId]||u.typeId,value:a.toString()})}catch(e){}try{const a=i.parse(u.value,l);if(a.explicitText)return e(oe,{name:c[u.typeId]||u.typeId,value:a.explicitText.toString()})}catch(e){}return e(oe,{name:c[u.typeId]||u.typeId,value:t.Convert.ToHex(u.value),monospace:!0})}return t.BufferSourceConverter.isBufferSource(u)?e(oe,{name:he[a]||a,value:t.Convert.ToString(u)}):e(oe,u instanceof r?{name:he[a]||a,value:u.partyName.toString()}:"dNSName"===a?{name:he[a]||a,value:u,href:d(u)}:"iPAddress"===a?{name:he[a]||a,value:u,href:b(u)}:{name:he[a]||a,value:u})})):null},Ne=a=>{const{extension:n}=a;return e(me,{extension:n},n.value.map((n=>{var t,c;return[null===(t=n.distributionPoint)||void 0===t?void 0:t.fullName.map((n=>e(Ce,Object.assign({generalName:n},a)))),null===(c=n.cRLIssuer)||void 0===c?void 0:c.map((n=>e(Ce,Object.assign({generalName:n},a))))]})))},Se=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Descriptions:",value:""}),n.value.map((n=>e(te,null,e(oe,{name:"Method",value:Z(n.accessMethod)}),e(Ce,Object.assign({generalName:n.accessLocation},a)))))])},Ae=a=>{const{extension:n}=a;return e(me,{extension:n},n.value.map((n=>e(Ce,Object.assign({generalName:n},a)))))},De=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Policies:",value:""}),n.value.map((a=>e(te,null,e(oe,{name:"Policy ID",value:Z(a.policyIdentifier)}),a.policyQualifiers&&Boolean(a.policyQualifiers.length)&&[e(oe,{name:"Qualifiers:",value:""}),a.policyQualifiers.map((a=>{const n=[e(oe,{name:"Qualifier ID",value:Z(a.policyQualifierId)})];if("1.3.6.1.5.5.7.2.1"===a.policyQualifierId){const t=i.parse(a.qualifier,f);n.push(e(oe,{name:"Value",value:t.toString()}))}if("1.3.6.1.5.5.7.2.2"===a.policyQualifierId){const t=i.parse(a.qualifier,l);t.explicitText&&n.push(e(oe,{name:"Value",value:t.explicitText.toString()}))}return e(te,null,n)}))])))])},Ie={"9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5":"Akamai CT","39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9":"Alpha CT",a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638:"CNNIC CT",cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900:"Certly.IO","1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4":"Cloudflare “Nimbus2017”",db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64:"Cloudflare “Nimbus2018”","747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56":"Cloudflare “Nimbus2019”","5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558":"Cloudflare “Nimbus2020”","4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8":"Cloudflare “Nimbus2021”","41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6":"Cloudflare “Nimbus2022”","7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52":"Cloudflare “Nimbus2023”","6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5":"DigiCert Nessie2018",fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c:"DigiCert Nessie2019",c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565:"DigiCert Nessie2020",eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9:"DigiCert Nessie2021","51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5":"DigiCert Nessie2022",b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a:"DigiCert Nessie2023","5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd":"DigiCert Server","8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f":"DigiCert Server 2",c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360:"DigiCert Yeti2018",e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe:"DigiCert Yeti2019",f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273:"DigiCert Yeti2020","5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca":"DigiCert Yeti2021","2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02":"DigiCert Yeti2022","35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c":"DigiCert Yeti2023","717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668":"GDCA 1","14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a":"GDCA 2",c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa:"GDCA CT #1","924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01":"GDCA CT #2",fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28:"Google “Argon2017”",a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25:"Google “Argon2018”","63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d":"Google “Argon2019”",b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e:"Google “Argon2020”",f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3:"Google “Argon2021”","2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784":"Google “Argon2022”","68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4":"Google “Aviator”",c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6:"Google “Crucible”","1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb":"Google “Daedalus”","293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478":"Google “Icarus”",a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10:"Google “Pilot”",ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb:"Google “Rocketeer”",bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185:"Google “Skydiver”","52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03":"Google “Solera2018”","0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00":"Google “Solera2019”","1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7":"Google “Solera2020”",a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7:"Google “Solera2021”","697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3":"Google “Solera2022”",a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681:"Google “Submariner”",b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77:"Google “Testtube”",b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e:"Google “Xenon2018”","084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0":"Google “Xenon2019”","07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c":"Google “Xenon2020”","7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7":"Google “Xenon2021”","46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47":"Google “Xenon2022”","7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3":"Izenpe","8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566":"Izenpe “Argi”","296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd":"Let“s Encrypt ”Clicky”","537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440":"Nordu “flimsy”",aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd:"Nordu “plausible”",e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273:"PuChuangSiDa CT",cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6:"SHECA CT 1","32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623":"SHECA CT 2",db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98:"Sectigo (Comodo) “Dodo” CT","6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913":"Sectigo (Comodo) “Mammoth” CT","5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c":"Sectigo (Comodo) “Sabre” CT","34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef":"StartCom",ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc:"Symantec",a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2:"Symantec Deneb","15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f":"Symantec “Sirius”",bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5:"Symantec “Vega”",b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b:"Up In The Air “Behind the Sofa”",ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d:"Venafi","03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b":"Venafi Gen2 CT","41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263":"WoSign","63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7":"WoSign 2","9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b":"WoSign CT #1"},je=a=>{const{extension:t}=a;return e(me,{extension:t},Boolean(t.value.items.length)&&[e(oe,{name:"Signed Certificate Timestamps:",value:""}),t.value.toJSON().map((a=>e(te,null,e(oe,{name:"Version",value:a.version+1}),e(oe,{name:"Log Operator",value:Ie[a.logId]||a.logId}),e(oe,{name:"Log Key ID",value:a.logId,monospace:!0}),e(oe,{name:"Timestamp",value:n(a.timestamp)}),e(oe,{name:"Signature Algorithm",value:`${a.hashAlgorithm} ${a.signatureAlgorithm}`.toUpperCase()}),e(oe,{name:"Signature",value:a.signature,monospace:!0}))))])},Ge=a=>{var n,t;const{extension:c}=a;return e(me,{extension:c},null===(n=c.value.excludedSubtrees)||void 0===n?void 0:n.map((n=>e(Ce,Object.assign({generalName:n.base},a)))),null===(t=c.value.permittedSubtrees)||void 0===t?void 0:t.map((n=>e(Ce,Object.assign({generalName:n.base},a)))))},Te=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Template ID",value:n.value.templateID}),e(oe,{name:"Template Major Version",value:n.value.templateMajorVersion}),e(oe,{name:"Template Minor Version",value:n.value.templateMinorVersion}))},Oe=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Name",value:n.value.toString()}))},ke=a=>{const{extension:n}=a,t=n.value.getVersion();return e(me,{extension:n},e(oe,{name:"Certificate Index",value:t.certificateIndex}),e(oe,{name:"Key Index",value:t.keyIndex}))};
41
- /**
42
- * @license
43
- * Copyright (c) Peculiar Ventures, LLC.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE file in the root directory of this source tree.
47
- */var Pe,Le,Re,Ve;let Be=class{constructor(e){"string"==typeof e?this.alphabetic=e:"number"==typeof e&&(this.numeric=e)}};d([b({type:u.PrintableString})],Be.prototype,"alphabetic",void 0),d([b({type:u.PrintableString})],Be.prototype,"numeric",void 0),Be=d([m({type:v.Choice})],Be);class $e{constructor(e={}){this.currency=new Be,this.amount=0,this.exponent=0,Object.assign(this,e)}}d([b({type:Be})],$e.prototype,"currency",void 0),d([b({type:u.Integer})],$e.prototype,"amount",void 0),d([b({type:u.Integer})],$e.prototype,"exponent",void 0);let Ue=class extends $e{};Ue=d([m({type:v.Sequence})],Ue);let Ee=class{constructor(e=0){this.value=e}};d([b({type:u.Integer})],Ee.prototype,"value",void 0),Ee=d([m({type:v.Choice})],Ee);let Ke=class{constructor(e={}){this.url="",this.language="",Object.assign(this,e)}};d([b({type:u.IA5String})],Ke.prototype,"url",void 0),d([b({type:u.PrintableString})],Ke.prototype,"language",void 0),Ke=d([m({type:v.Sequence})],Ke);let He=Pe=class extends p{constructor(e){super(e),Object.setPrototypeOf(this,Pe.prototype)}};He=Pe=d([m({type:v.Sequence,itemType:Ke})],He);let Me=Le=class extends He{constructor(e){super(e),Object.setPrototypeOf(this,Le.prototype)}};Me=Le=d([m({type:v.Sequence,itemType:Ke})],Me);let Xe=Re=class extends p{constructor(e){super(e),Object.setPrototypeOf(this,Re.prototype)}};Xe=Re=d([m({type:v.Sequence,itemType:u.ObjectIdentifier})],Xe);let Ye=Ve=class extends p{constructor(e){super(e),Object.setPrototypeOf(this,Ve.prototype)}};Ye=Ve=d([m({type:v.Sequence,itemType:u.PrintableString})],Ye);const _e=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Statements:",value:""}),n.value.map((a=>e(te,null,e(oe,{name:"Statement ID",value:Z(a.statementId)}),function(a,n){if(!n.byteLength)return null;if(a===x){const a=i.parse(n,g);return e(oe,{name:"Semantics Identifier",value:Z(a.semanticsIdentifier)})}if("0.4.0.1862.1.6"===a){const a=i.parse(n,Xe);return e(oe,{name:"QC Types",value:a.map((e=>Z(e))).join(", ")})}if("0.4.0.1862.1.3"===a){const a=i.parse(n,Ee);return e(oe,{name:"Retention Period",value:`${a.value} years`})}if("0.4.0.1862.1.5"===a){const a=i.parse(n,He);return[e(oe,{name:"PDS Locations:",value:""}),a.map((a=>e(te,null,e(oe,{name:"URL",value:a.url}),e(oe,{name:"Language",value:a.language}))))]}return e(oe,{name:"Info",value:t.Convert.ToHex(n),monospace:!0})}(a.statementId,a.statementInfo))))])},qe=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Comment",value:n.value.value}))},we=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Type",value:n.value.toJSON().join(", ")}))},ze=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Role",value:n.value.text}))},Fe=a=>{const{extension:n,getLEILink:t}=a;return e(me,{extension:n},e(oe,{name:"Identifier",value:n.value.text,href:t(n.value.text)}))},Qe=n=>{const{extension:t}=n;return e(me,{extension:t},e(oe,{name:"Version",value:t.value.version}),e(Ce,Object.assign({generalName:t.value.location},n)),e(oe,{name:"Requires Auth",value:a.getString(t.value.requiresAuth?"yes":"no")}))},We=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Version",value:n.value.version}))},Je=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Reason",value:n.value.toJSON()}))};
48
- /**
49
- * @license
50
- * Copyright (c) Peculiar Ventures, LLC.
51
- *
52
- * This source code is licensed under the MIT license found in the
53
- * LICENSE file in the root directory of this source tree.
54
- */
55
- function Ze(e){return t.Convert.ToString(e.values[0])}
56
- /**
57
- * @license
58
- * Copyright (c) Peculiar Ventures, LLC.
59
- *
60
- * This source code is licensed under the MIT license found in the
61
- * LICENSE file in the root directory of this source tree.
62
- */const ea=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Attributes:",value:""}),n.value.map((a=>e(te,null,e(oe,{name:"Type",value:Z(a.type)}),e(oe,{name:"Value",value:Ze(a)}))))])},aa=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Value",value:n.value,monospace:!0}))},na=a=>{const{extension:t}=a;return e(me,{extension:t},e(oe,{name:"Not Before",value:n(t.value.notBefore)}),e(oe,{name:"Not After",value:n(t.value.notAfter)}))},ta=a=>{const{extension:n}=a;return e(me,{extension:n},e(oe,{name:"Version",value:n.value.entrustVers}),e(oe,{name:"Info Flags",value:n.value.entrustInfoFlags.toJSON().join(", ")}))},ca=a=>{const{extension:n}=a;return e(me,{extension:n},Boolean(n.value.length)&&[e(oe,{name:"Biometrics:",value:""}),n.value.map((a=>e(te,null,e(oe,{name:"OID",value:Z(a.typeOfBiometricData.biometricDataOid)}),e(oe,{name:"Type",value:a.typeOfBiometricData.predefinedBiometricType}),e(oe,{name:"Algorithm",value:Z(a.hashAlgorithm.algorithm)}),e(oe,{name:"Hash",value:t.Convert.ToHex(a.biometricDataHash.buffer),monospace:!0}),e(oe,{name:"Source Uri",value:a.sourceDataUri}))))])},oa=a=>{const{extension:n}=a,c=a=>a?a.map((a=>{const{imageDetails:n}=a;return[e(oe,{name:"Image Type",value:n.mediaType}),e(oe,{name:"Image Hash",value:t.Convert.ToHex(n.logotypeHash[0].hashValue),monospace:!0}),e(oe,{name:"Image URL",value:n.logotypeURI[0],monospace:!0,collapse:!0}),e(oe,{name:"Image Hash Algorithm",value:Z(n.logotypeHash[0].hashAlg.algorithm)})]})):null,o=a=>a?a.map((a=>{const{audioDetails:n}=a;return[e(oe,{name:"Audio Type",value:n.mediaType}),e(oe,{name:"Audio Hash",value:t.Convert.ToHex(n.logotypeHash[0].hashValue),monospace:!0}),e(oe,{name:"Audio URL",value:n.logotypeURI[0],monospace:!0,collapse:!0}),e(oe,{name:"Audio Hash Algorithm",value:Z(n.logotypeHash[0].hashAlg.algorithm)})]})):null,s=(a,n)=>{if(!n||!n.direct)return null;const{image:t,audio:s}=n.direct;return[e(oe,{name:"Type",value:a}),c(t),o(s),e("tr",null,e("td",null),e("td",null))]};return e(me,{extension:n},s("Subject",n.value.subjectLogo),s("Issuer",n.value.issuerLogo))},sa=a=>{const{extension:n}=a;return e(me,{extension:n},n.value.map(((a,n)=>[e(oe,{name:`Entry #${n+1}`,value:""}),e(oe,{name:"SPC",value:a.spc}),e(oe,{name:"Range",value:a.range?`start=${a.range.start} count==${a.range.count}`:null}),e(oe,{name:"One",value:a.one})])))},ia=a=>{const{extension:n}=a;return e(me,{extension:n},n.value.requireExplicitPolicy&&e(oe,{name:"Require Explicit Policy",value:y.toASN(n.value.requireExplicitPolicy).valueBlock.toString()}),n.value.inhibitPolicyMapping&&e(oe,{name:"Inhibit Policy Mapping",value:y.toASN(n.value.inhibitPolicyMapping).valueBlock.toString()}))},fa=a=>{const{extension:n}=a;return e(me,{extension:n},n.value.map(((a,n)=>[e(oe,{name:`Policy #${n+1}`,value:""}),e(oe,{name:"Issuer Domain",value:Z(a.issuerDomainPolicy)}),e(oe,{name:"Subject Domain",value:Z(a.subjectDomainPolicy)})])))},la=n=>{const{extension:t}=n;return e(me,{extension:t},e(oe,{name:a.getString("value"),value:t.value.value}))},ra=n=>{var t;const{extension:c}=n;return e(me,{extension:c},null===(t=c.value.distributionPoint)||void 0===t?void 0:t.fullName.map((a=>e(Ce,Object.assign({generalName:a},n)))),c.value.onlySomeReasons&&e(oe,{name:a.getString("onlyReasons"),value:c.value.onlySomeReasons.toJSON().join(", ")}),c.value.indirectCRL&&e(oe,{name:a.getString("indirectCRL"),value:a.getString("yes")}),c.value.onlyContainsUserCerts&&e(oe,{name:a.getString("onlyUserCertificates"),value:a.getString("yes")}),c.value.onlyContainsAttributeCerts&&e(oe,{name:a.getString("onlyAttributeCertificates"),value:a.getString("yes")}),c.value.onlyContainsCACerts&&e(oe,{name:a.getString("onlyCACertificates"),value:a.getString("yes")}))},da=a=>{const{extensions:n,title:t}=a;return n&&n.length?[e(ce,{value:t||"Extensions"}),n.map((n=>{try{return n.value instanceof h?e(ve,{extension:n}):n.value instanceof C?e(pe,{extension:n}):n.value instanceof N?e(xe,{extension:n}):n.value instanceof S?e(ge,Object.assign({extension:n},a)):n.value instanceof A?e(ye,Object.assign({extension:n},a)):n.value instanceof D?e(Ne,Object.assign({extension:n},a)):n.value instanceof I||n.value instanceof j?e(Se,Object.assign({extension:n},a)):n.value instanceof G?e(Ae,Object.assign({extension:n},a)):n.value instanceof T?e(De,{extension:n}):n.value instanceof O?e(je,{extension:n}):n.value instanceof k?e(Ge,Object.assign({extension:n},a)):n.value instanceof P?e(Te,{extension:n}):n.value instanceof L?e(Oe,{extension:n}):n.value instanceof R?e(ke,{extension:n}):n.value instanceof V?e(_e,{extension:n}):n.value instanceof B?e(qe,{extension:n}):n.value instanceof $?e(we,{extension:n}):n.value instanceof U?e(ze,{extension:n}):n.value instanceof E?e(Fe,Object.assign({extension:n},a)):n.value instanceof K?e(Qe,Object.assign({extension:n},a)):n.value instanceof H?e(We,{extension:n}):n.value instanceof M?e(Je,{extension:n}):n.value instanceof X?e(ea,{extension:n}):n.value instanceof Y?e(na,{extension:n}):n.value instanceof _?e(ta,{extension:n}):n.value instanceof q?e(ca,{extension:n}):n.value instanceof w?e(oa,{extension:n}):n.value instanceof z?e(sa,{extension:n}):n.value instanceof F?e(ia,{extension:n}):n.value instanceof Q?e(fa,{extension:n}):n.value instanceof W?e(la,{extension:n}):n.value instanceof J?e(ra,Object.assign({extension:n},a)):e("string"==typeof n.value?aa:me,{extension:n})}catch(e){return console.error("Error render extension:",n.asn.extnID),null}}))]:null},ba=n=>{const{certificate:t}=n;return[e(ce,{value:a.getString("miscellaneous")}),e("tr",null,e("td",{class:"vertical_align_middle"},e("peculiar-typography",{color:"grey_5"},a.getString("download"),":")),e("td",null,e("peculiar-button-split",{onClick:()=>t.downloadAsPEM(),actions:[{text:a.getString("download.der"),onClick:()=>t.downloadAsDER()}]},a.getString("download.pem"))))]};
63
- /**
64
- * @license
65
- * Copyright (c) Peculiar Ventures, LLC.
66
- *
67
- * This source code is licensed under the MIT license found in the
68
- * LICENSE file in the root directory of this source tree.
69
- */export{se as B,da as E,Ce as G,de as I,ba as M,le as P,oe as R,be as S,te as T,ce as a,ue as b,ee as c,ae as d,ne as e,re as f,Z as g}
@@ -1,18 +0,0 @@
1
- /*!
2
- * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
- */
4
- /**
5
- * @license
6
- * Copyright (c) Peculiar Ventures, LLC.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
11
- function t(t,r,e,n="application/octet-stream"){const i=new Blob([t],{type:n});if(navigator.msSaveBlob)return navigator.msSaveBlob(i,`${r}.${e}`),new Promise((t=>setTimeout(t,100)));const s=window.URL.createObjectURL(i),a=document.createElement("a"),o=document.createElement("iframe");return a.style.display="none",o.style.display="none",o.name=s,document.body.appendChild(o),a.href=s,a.target=s,a.download=`${r}.${e}`,document.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),document.body.removeChild(a),new Promise((t=>setTimeout((()=>{document.body.removeChild(o),t(void 0)}),100)))}var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,r,e){return t(e={path:r,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},e.exports),e.exports}var n=e((function(t,r){Object.defineProperty(r,"__esModule",{value:!0});class e{static isArrayBuffer(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t).slice().buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,r){if(t.constructor===r)return t;if(this.isArrayBuffer(t))return new r(t);if(this.isArrayBufferView(t))return new r(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,r){const n=e.toUint8Array(t),i=e.toUint8Array(r);if(n.length!==i.byteLength)return!1;for(let t=0;t<n.length;t++)if(n[t]!==i[t])return!1;return!0}static concat(...t){if(Array.isArray(t[0])){const r=t[0];let e=0;for(const t of r)e+=t.byteLength;const n=new Uint8Array(e);let i=0;for(const t of r){const r=this.toUint8Array(t);n.set(r,i),i+=r.length}return t[1]?this.toView(n,t[1]):n.buffer}return this.concat(t)}}class n{static fromString(t){const r=unescape(encodeURIComponent(t)),e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer}static toString(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return decodeURIComponent(escape(n))}}class i{static toString(t,r=!1){const n=e.toArrayBuffer(t),i=new DataView(n);let s="";for(let t=0;t<n.byteLength;t+=2){const e=i.getUint16(t,r);s+=String.fromCharCode(e)}return s}static fromString(t,r=!1){const e=new ArrayBuffer(2*t.length),n=new DataView(e);for(let e=0;e<t.length;e++)n.setUint16(2*e,t.charCodeAt(e),r);return e}}class s{static isHex(t){return"string"==typeof t&&/^[a-z0-9]+$/i.test(t)}static isBase64(t){return"string"==typeof t&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}static isBase64Url(t){return"string"==typeof t&&/^[a-zA-Z0-9-_]+$/i.test(t)}static ToString(t,r="utf8"){const n=e.toUint8Array(t);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return i.toString(n,!0);case"utf16":case"utf16be":return i.toString(n);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(t,r="utf8"){if(!t)return new ArrayBuffer(0);switch(r.toLowerCase()){case"utf8":return this.FromUtf8String(t);case"binary":return this.FromBinary(t);case"hex":return this.FromHex(t);case"base64":return this.FromBase64(t);case"base64url":return this.FromBase64Url(t);case"utf16le":return i.fromString(t,!0);case"utf16":case"utf16be":return i.fromString(t);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToBase64(t){const r=e.toUint8Array(t);if("undefined"!=typeof btoa){const t=this.ToString(r,"binary");return btoa(t)}return Buffer.from(r).toString("base64")}static FromBase64(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}static FromBase64Url(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(t){return this.ToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(t,r=s.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.FromBinary(t);case"utf8":return n.fromString(t);case"utf16":case"utf16be":return i.fromString(t);case"utf16le":case"usc2":return i.fromString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToUtf8String(t,r=s.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.ToBinary(t);case"utf8":return n.toString(t);case"utf16":case"utf16be":return i.toString(t);case"utf16le":case"usc2":return i.toString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromBinary(t){const r=t.length,e=new Uint8Array(r);for(let n=0;n<r;n++)e[n]=t.charCodeAt(n);return e.buffer}static ToBinary(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}static ToHex(t){const r=e.toUint8Array(t),n=[],i=r.length;for(let t=0;t<i;t++){const e=r[t].toString(16).padStart(2,"0");n.push(e)}return n.join("")}static FromHex(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!s.isHex(r))throw new TypeError("Argument 'hexString' is not HEX encoded");r.length%2&&(r=`0${r}`);const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2);e[t/2]=parseInt(n,16)}return e.buffer}static ToUtf16String(t,r=!1){return i.toString(t,r)}static FromUtf16String(t,r=!1){return i.fromString(t,r)}static Base64Padding(t){const r=4-t.length%4;if(r<4)for(let e=0;e<r;e++)t+="=";return t}static formatString(t){return(null==t?void 0:t.replace(/[\n\r\t ]/g,""))||""}}s.DEFAULT_UTF8_ENCODING="utf8",r.BufferSourceConverter=e,r.Convert=s,r.assign=function(t){const r=arguments[0];for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)r[t]=e[t]}return r},r.combine=function(...t){const r=t.map((t=>t.byteLength)).reduce(((t,r)=>t+r)),e=new Uint8Array(r);let n=0;return t.map((t=>new Uint8Array(t))).forEach((t=>{for(const r of t)e[n++]=r})),e.buffer},r.isEqual=function(t,r){if(!t||!r)return!1;if(t.byteLength!==r.byteLength)return!1;const e=new Uint8Array(t),n=new Uint8Array(r);for(let r=0;r<t.byteLength;r++)if(e[r]!==n[r])return!1;return!0}}));
12
- /**
13
- * @license
14
- * Copyright (c) Peculiar Ventures, LLC.
15
- *
16
- * This source code is licensed under the MIT license found in the
17
- * LICENSE file in the root directory of this source tree.
18
- */class i{}i.cert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-cert")}},i.attrCert={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"cer","application/pkix-attr-cert")}},i.csr={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"csr","application/pkcs10")}},i.crl={asPEM:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")},asDER:(r,e)=>{t(n.Convert.FromString(r),e,"crl","application/pkix-crl")}};export{i as D,r as a,n as b,e as c,t as d}