@peculiar/certificates-viewer 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cjs/{certification_request-878e786a.js → certification_request-cde57123.js} +137 -266
  2. package/dist/cjs/csr-78378ed0.js +150 -0
  3. package/dist/cjs/download-6724f3a7.js +79 -0
  4. package/dist/cjs/{download-5e7d5455.js → index-ff818d4d.js} +0 -72
  5. package/dist/cjs/index.cjs.js +2 -1
  6. package/dist/cjs/l10n-a048a686.js +145 -0
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/peculiar-attribute-certificate-viewer_2.cjs.entry.js +479 -0
  9. package/dist/cjs/peculiar-button_5.cjs.entry.js +148 -0
  10. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +173 -0
  11. package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +1 -1
  12. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +124 -0
  13. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -4
  14. package/dist/cjs/peculiar.cjs.js +1 -1
  15. package/dist/cjs/public_key-2f5bd471.js +1104 -0
  16. package/dist/cjs/x509_attribute_certificate-cc325b70.js +87 -0
  17. package/dist/cjs/x509_certificate-51a97033.js +139 -0
  18. package/dist/collection/components/certificate-decoder/certificate-decoder.js +54 -23
  19. package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +1 -1
  20. package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +1 -1
  21. package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +1 -1
  22. package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +1 -1
  23. package/dist/collection/utils/index.js +0 -1
  24. package/dist/collection/www-copy/index.js +80 -0
  25. package/dist/esm/{certification_request-3402a181.js → certification_request-c0674647.js} +76 -205
  26. package/dist/esm/csr-c1b6a176.js +147 -0
  27. package/dist/esm/download-735fb2eb.js +76 -0
  28. package/dist/esm/{download-cf68ac2c.js → index-0ba131b0.js} +1 -71
  29. package/dist/esm/index.js +2 -1
  30. package/dist/esm/l10n-ac28fa92.js +141 -0
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/peculiar-attribute-certificate-viewer_2.entry.js +474 -0
  33. package/dist/esm/peculiar-button_5.entry.js +140 -0
  34. package/dist/esm/peculiar-certificate-decoder.entry.js +169 -0
  35. package/dist/esm/peculiar-certificate-summary_3.entry.js +1 -1
  36. package/dist/esm/peculiar-certificate-viewer.entry.js +120 -0
  37. package/dist/esm/peculiar-certificates-viewer.entry.js +5 -3
  38. package/dist/esm/peculiar.js +1 -1
  39. package/dist/esm/public_key-38c9ddc8.js +1089 -0
  40. package/dist/esm/x509_attribute_certificate-a6d4aa15.js +85 -0
  41. package/dist/esm/x509_certificate-12f6d344.js +137 -0
  42. package/dist/peculiar/index.esm.js +1 -1
  43. package/dist/peculiar/p-006865d7.js +4 -0
  44. package/dist/peculiar/p-17c4da7b.js +11 -0
  45. package/dist/peculiar/{p-b09a1f0b.entry.js → p-38635919.entry.js} +1 -1
  46. package/dist/peculiar/p-3f8d1008.entry.js +4 -0
  47. package/dist/peculiar/p-42da7f97.js +11 -0
  48. package/dist/peculiar/p-464e0943.js +87 -0
  49. package/dist/peculiar/p-4f4c1d30.js +12 -0
  50. package/dist/peculiar/p-6011646e.entry.js +11 -0
  51. package/dist/peculiar/p-6bfd077c.entry.js +18 -0
  52. package/dist/peculiar/p-6c510523.js +18 -0
  53. package/dist/peculiar/p-986cc770.entry.js +11 -0
  54. package/dist/peculiar/p-b765873e.js +78 -0
  55. package/dist/peculiar/p-d7a13cb4.js +18 -0
  56. package/dist/peculiar/p-dafae164.entry.js +4 -0
  57. package/dist/peculiar/peculiar.esm.js +1 -1
  58. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +13 -1
  59. package/dist/types/components.d.ts +20 -0
  60. package/dist/types/utils/index.d.ts +0 -1
  61. package/package.json +2 -3
  62. package/dist/cjs/l10n-d4a77087.js +0 -767
  63. package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +0 -2187
  64. package/dist/collection/utils/history.js +0 -19
  65. package/dist/collection/utils/parse_hash.js +0 -28
  66. package/dist/collection/utils/query_stringify.js +0 -21
  67. package/dist/esm/l10n-9ac63748.js +0 -762
  68. package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +0 -2175
  69. package/dist/peculiar/p-08538084.entry.js +0 -113
  70. package/dist/peculiar/p-3fc37750.entry.js +0 -4
  71. package/dist/peculiar/p-8ad24aa3.js +0 -87
  72. package/dist/peculiar/p-99797a49.js +0 -34
  73. package/dist/peculiar/p-c774ec0b.js +0 -18
  74. package/dist/types/utils/history.d.ts +0 -9
  75. package/dist/types/utils/parse_hash.d.ts +0 -9
  76. package/dist/types/utils/query_stringify.d.ts +0 -8
@@ -0,0 +1,173 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ 'use strict';
5
+
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-064e95c7.js');
9
+ const certification_request = require('./certification_request-cde57123.js');
10
+ require('./l10n-a048a686.js');
11
+ const x509_certificate = require('./x509_certificate-51a97033.js');
12
+ const x509_attribute_certificate = require('./x509_attribute_certificate-cc325b70.js');
13
+ const csr = require('./csr-78378ed0.js');
14
+ require('./index-ff818d4d.js');
15
+ require('./_commonjsHelpers-cb1f949a.js');
16
+
17
+ /**
18
+ * @license
19
+ * Copyright (c) Peculiar Ventures, LLC.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */
24
+ /**
25
+ * Read file as Binary string
26
+ *
27
+ * @example
28
+ * ```js
29
+ * const file = new File(['file'], 'file.pdf', { type: 'text/plain' });
30
+ * readAsBinaryString(file)
31
+ * .then(result => console.log('Readed success', result))
32
+ * .catch(err => console.log('An error occured when reading file', err));
33
+ * ```
34
+ */
35
+ function readAsBinaryString(file) {
36
+ return new Promise((resolve, reject) => {
37
+ const reader = new FileReader();
38
+ reader.onload = () => resolve({
39
+ value: reader.result,
40
+ fileName: file.name,
41
+ fileSize: file.size,
42
+ sourceMime: file.type,
43
+ });
44
+ reader.onerror = () => reject(reader.error);
45
+ reader.readAsBinaryString(file);
46
+ });
47
+ }
48
+
49
+ const certificateDecoderCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";
50
+
51
+ const CertificateDecoder = class {
52
+ constructor(hostRef) {
53
+ index.registerInstance(this, hostRef);
54
+ this.successParse = index.createEvent(this, "successParse", 7);
55
+ this.clearCertificate = index.createEvent(this, "clearCertificate", 7);
56
+ this.onClickDecode = () => {
57
+ const { value } = this.inputPaste;
58
+ if (value) {
59
+ this.decode(value);
60
+ }
61
+ };
62
+ this.onClickExample = () => {
63
+ this.decode(this.certificateExample);
64
+ };
65
+ this.onClickClear = () => {
66
+ this.clearValue();
67
+ };
68
+ this.onChangeInputFile = async (e) => {
69
+ const element = e.target;
70
+ if (element.files) {
71
+ const file = await readAsBinaryString(element.files[0]);
72
+ if (typeof file.value === 'string') {
73
+ this.decode(file.value);
74
+ }
75
+ element.value = '';
76
+ }
77
+ };
78
+ this.onDropFile = async (e) => {
79
+ e.stopPropagation();
80
+ e.preventDefault();
81
+ const element = e.dataTransfer;
82
+ if (element.files) {
83
+ const file = await readAsBinaryString(element.files[0]);
84
+ if (typeof file.value === 'string') {
85
+ this.decode(file.value);
86
+ }
87
+ }
88
+ };
89
+ }
90
+ componentDidLoad() {
91
+ if (this.defaultCertificate) {
92
+ /**
93
+ * Prevent Stencil warning about re-render
94
+ */
95
+ setTimeout(() => this.decode(this.defaultCertificate), 100);
96
+ }
97
+ }
98
+ clearValue() {
99
+ this.inputPaste.value = '';
100
+ this.certificateDecoded = null;
101
+ this.clearCertificate.emit();
102
+ }
103
+ setValue(value) {
104
+ this.certificateDecoded = value;
105
+ this.inputPaste.value = value.exportAsPemFormatted();
106
+ this.successParse.emit(value.exportAsBase64());
107
+ }
108
+ decode(certificate) {
109
+ const isPem = certification_request.isPem(certificate);
110
+ const isX509Pem = certification_request.isX509Pem(certificate);
111
+ const isPkcs10Pem = certification_request.isPkcs10Pem(certificate);
112
+ const isX509AttributePem = certification_request.isX509AttributePem(certificate);
113
+ let decoded;
114
+ let decodeError;
115
+ if (isPem && !(isX509Pem || isX509AttributePem || isPkcs10Pem)) {
116
+ this.clearValue();
117
+ alert('Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
118
+ return;
119
+ }
120
+ try {
121
+ if (isX509Pem) {
122
+ decoded = new x509_certificate.X509Certificate(certificate);
123
+ }
124
+ if (isX509AttributePem) {
125
+ decoded = new x509_attribute_certificate.X509AttributeCertificate(certificate);
126
+ }
127
+ if (isPkcs10Pem) {
128
+ decoded = new csr.CSR(certificate);
129
+ }
130
+ }
131
+ catch (error) {
132
+ decodeError = error;
133
+ }
134
+ if (!decoded) {
135
+ try {
136
+ decoded = new x509_certificate.X509Certificate(certificate);
137
+ }
138
+ catch (error) {
139
+ decodeError = error;
140
+ }
141
+ }
142
+ if (!decoded) {
143
+ try {
144
+ decoded = new x509_attribute_certificate.X509AttributeCertificate(certificate);
145
+ }
146
+ catch (error) {
147
+ decodeError = error;
148
+ }
149
+ }
150
+ if (!decoded) {
151
+ try {
152
+ decoded = new csr.CSR(certificate);
153
+ }
154
+ catch (error) {
155
+ decodeError = error;
156
+ }
157
+ }
158
+ if (!decoded) {
159
+ this.clearValue();
160
+ console.log(decodeError);
161
+ alert('Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest.');
162
+ }
163
+ else {
164
+ this.setValue(decoded);
165
+ }
166
+ }
167
+ render() {
168
+ return (index.h(index.Host, null, index.h("textarea", { placeholder: "Certificate DER or PEM", class: "textarea", ref: (el) => { this.inputPaste = el; }, onDrop: this.onDropFile }), index.h("div", { class: "controls" }, index.h("peculiar-button", { fill: "fill", class: "button", onClick: this.onClickDecode }, "Decode"), index.h("peculiar-button", { class: "button" }, "Choose file", index.h("input", { type: "file", class: "input_file", accept: "application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req", onChange: this.onChangeInputFile, value: "" })), index.h("peculiar-button", { class: "button", onClick: this.onClickClear }, "Clear"), this.certificateExample && (index.h("peculiar-button", { class: "button", onClick: this.onClickExample }, "Example"))), this.certificateDecoded instanceof x509_certificate.X509Certificate && (index.h("peculiar-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof x509_attribute_certificate.X509AttributeCertificate && (index.h("peculiar-attribute-certificate-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true })), this.certificateDecoded instanceof csr.CSR && (index.h("peculiar-csr-viewer", { certificate: this.certificateDecoded, class: "viewer", download: true }))));
169
+ }
170
+ };
171
+ CertificateDecoder.style = certificateDecoderCss;
172
+
173
+ exports.peculiar_certificate_decoder = CertificateDecoder;
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-064e95c7.js');
9
- const l10n = require('./l10n-d4a77087.js');
9
+ const l10n = require('./l10n-a048a686.js');
10
10
  require('./_commonjsHelpers-cb1f949a.js');
11
11
 
12
12
  const certificateSummaryCss = ":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%}}";
@@ -0,0 +1,124 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ 'use strict';
5
+
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-064e95c7.js');
9
+ const x509_certificate = require('./x509_certificate-51a97033.js');
10
+ require('./certification_request-cde57123.js');
11
+ require('./index-ff818d4d.js');
12
+ const l10n = require('./l10n-a048a686.js');
13
+ const public_key = require('./public_key-2f5bd471.js');
14
+ require('./_commonjsHelpers-cb1f949a.js');
15
+ require('./csr-78378ed0.js');
16
+ require('./download-6724f3a7.js');
17
+
18
+ /**
19
+ * @license
20
+ * Copyright (c) Peculiar Ventures, LLC.
21
+ *
22
+ * This source code is licensed under the MIT license found in the
23
+ * LICENSE file in the root directory of this source tree.
24
+ */
25
+ const IssuerName = (props) => {
26
+ const { name, issuerDnLink } = props;
27
+ const title = l10n.l10n.getString('issuerName');
28
+ return [
29
+ index.h(public_key.RowTitle, { value: issuerDnLink ? (index.h("peculiar-link", { href: issuerDnLink, type: "h6" }, title)) : title }),
30
+ name.map((n) => (index.h(public_key.RowValue, { name: n.name || n.type, value: n.value }))),
31
+ ];
32
+ };
33
+
34
+ const certificateViewerCss = ":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 .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}";
35
+
36
+ const CertificateViewer = class {
37
+ constructor(hostRef) {
38
+ index.registerInstance(this, hostRef);
39
+ this.isDecodeInProcess = true;
40
+ this.getAuthKeyIdParentLink = (value) => {
41
+ var _a;
42
+ return (_a = this.authKeyIdParentLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
43
+ };
44
+ this.getAuthKeyIdSiblingsLink = (value) => {
45
+ var _a;
46
+ return (_a = this.authKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{authKeyId}}', value);
47
+ };
48
+ this.getSubjectKeyIdChildrenLink = (value) => {
49
+ var _a;
50
+ return (_a = this.subjectKeyIdChildrenLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
51
+ };
52
+ this.getSubjectKeyIdSiblingsLink = (value) => {
53
+ var _a;
54
+ return (_a = this.subjectKeyIdSiblingsLink) === null || _a === void 0 ? void 0 : _a.replace('{{subjectKeyId}}', value);
55
+ };
56
+ }
57
+ componentWillLoad() {
58
+ this.decodeCertificate(this.certificate);
59
+ }
60
+ async decodeCertificate(certificate) {
61
+ this.isDecodeInProcess = true;
62
+ try {
63
+ if (certificate instanceof x509_certificate.X509Certificate) {
64
+ this.certificateDecoded = certificate;
65
+ }
66
+ else if (typeof certificate === 'string') {
67
+ this.certificateDecoded = new x509_certificate.X509Certificate(certificate);
68
+ }
69
+ else {
70
+ return;
71
+ }
72
+ this.certificateDecoded.parseExtensions();
73
+ await this.certificateDecoded.getThumbprint('SHA-1');
74
+ await this.certificateDecoded.getThumbprint('SHA-256');
75
+ }
76
+ catch (error) {
77
+ this.certificateDecodeError = error;
78
+ console.error('Error certificate parse:', error);
79
+ }
80
+ this.isDecodeInProcess = false;
81
+ }
82
+ /**
83
+ * Rerun decodeCertificate if previuos value not equal current value
84
+ */
85
+ watchCertificateAndDecode(newValue, oldValue) {
86
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
87
+ if (newValue !== oldValue) {
88
+ this.decodeCertificate(newValue);
89
+ }
90
+ return;
91
+ }
92
+ if (newValue instanceof x509_certificate.X509Certificate && oldValue instanceof x509_certificate.X509Certificate) {
93
+ if (newValue.serialNumber !== oldValue.serialNumber) {
94
+ this.decodeCertificate(newValue);
95
+ }
96
+ }
97
+ }
98
+ getIssuerDnLink() {
99
+ return this.issuerDnLink;
100
+ }
101
+ // eslint-disable-next-line class-methods-use-this
102
+ renderErrorState() {
103
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There was an error decoding this certificate.")));
104
+ }
105
+ // eslint-disable-next-line class-methods-use-this
106
+ renderEmptyState() {
107
+ return (index.h("div", { class: "status_wrapper" }, index.h("peculiar-typography", { type: "b1", class: "interaction_text" }, "There is no certificate available.")));
108
+ }
109
+ render() {
110
+ if (this.certificateDecodeError) {
111
+ return this.renderErrorState();
112
+ }
113
+ if (!this.certificateDecoded) {
114
+ return this.renderEmptyState();
115
+ }
116
+ return (index.h(index.Host, { "data-view": this.view }, index.h("table", null, index.h(public_key.BasicInformation, Object.assign({}, this.certificateDecoded)), index.h(public_key.SubjectName, { name: this.certificateDecoded.subject }), index.h(IssuerName, { name: this.certificateDecoded.issuer, issuerDnLink: this.getIssuerDnLink() }), index.h(public_key.PublicKey, { publicKey: this.certificateDecoded.publicKey }), index.h(public_key.Signature, { signature: this.certificateDecoded.signature }), index.h(public_key.Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), index.h(public_key.Extensions, { extensions: this.certificateDecoded.extensions, getLEILink: public_key.getLEILink, getDNSNameLink: public_key.getDNSNameLink, getIPAddressLink: public_key.getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (index.h(public_key.Miscellaneous, { certificate: this.certificateDecoded })))));
117
+ }
118
+ static get watchers() { return {
119
+ "certificate": ["watchCertificateAndDecode"]
120
+ }; }
121
+ };
122
+ CertificateViewer.style = certificateViewerCss;
123
+
124
+ exports.peculiar_certificate_viewer = CertificateViewer;
@@ -6,9 +6,11 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-064e95c7.js');
9
- const certification_request = require('./certification_request-878e786a.js');
10
- const download = require('./download-5e7d5455.js');
11
- const l10n = require('./l10n-d4a77087.js');
9
+ const x509_certificate = require('./x509_certificate-51a97033.js');
10
+ const certification_request = require('./certification_request-cde57123.js');
11
+ require('./index-ff818d4d.js');
12
+ const l10n = require('./l10n-a048a686.js');
13
+ const download = require('./download-6724f3a7.js');
12
14
  require('./_commonjsHelpers-cb1f949a.js');
13
15
 
14
16
  const certificatesViewerCss = ":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}}";
@@ -76,7 +78,7 @@ const CertificatesViewer = class {
76
78
  // eslint-disable-next-line no-restricted-syntax
77
79
  for (const certificate of this.certificates) {
78
80
  try {
79
- const decoded = new certification_request.X509Certificate(certificate.value);
81
+ const decoded = new x509_certificate.X509Certificate(certificate.value);
80
82
  await decoded.getThumbprint('SHA-1');
81
83
  data.push({
82
84
  body: decoded,
@@ -71,5 +71,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
71
71
  };
72
72
 
73
73
  patchBrowser().then(options => {
74
- return index.bootstrapLazy([["peculiar-attribute-certificate-viewer_9.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"certificateDecoded":[32]}],[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-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"view":[513],"isDecodeInProcess":[32]}],[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]}],[1,"peculiar-button-split",{"onClick":[16],"fill":[1],"actions":[16],"open":[32]}],[1,"peculiar-text-hider",{"opened":[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{"href":[513],"type":[513]}],[1,"peculiar-typography",{"type":[513],"color":[1],"align":[1],"ellipsis":[4],"monospace":[4]}],[1,"peculiar-button",{"fill":[1],"disabled":[516],"href":[1],"target":[1],"onClick":[16]}]]],["peculiar-certificate-summary_3.cjs",[[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]],["peculiar-certificates-viewer.cjs",[[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]}]]]], options);
74
+ return index.bootstrapLazy([["peculiar-button_5.cjs",[[1,"peculiar-button-split",{"onClick":[16],"fill":[1],"actions":[16],"open":[32]}],[1,"peculiar-text-hider",{"opened":[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{"href":[513],"type":[513]}],[1,"peculiar-typography",{"type":[513],"color":[1],"align":[1],"ellipsis":[4],"monospace":[4]}],[1,"peculiar-button",{"fill":[1],"disabled":[516],"href":[1],"target":[1],"onClick":[16]}]]],["peculiar-certificates-viewer.cjs",[[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]}]]],["peculiar-attribute-certificate-viewer_2.cjs",[[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-csr-viewer",{"certificate":[513],"download":[4],"subjectKeyIdChildrenLink":[513,"subject-key-id-children-link"],"subjectKeyIdSiblingsLink":[513,"subject-key-id-siblings-link"],"view":[513],"isDecodeInProcess":[32]}]]],["peculiar-certificate-viewer.cjs",[[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]}]]],["peculiar-certificate-decoder.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"defaultCertificate":[1,"default-certificate"],"certificateDecoded":[32]}]]],["peculiar-certificate-summary_3.cjs",[[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]]], options);
75
75
  });