@peculiar/certificates-viewer 2.0.1 → 2.0.2-alpha.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.
- package/README.md +3 -3
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +23 -0
- package/dist/cjs/{download-cd98aa01.js → certification_request-96951e7b.js} +2880 -3313
- package/dist/cjs/{dom-760f300f.js → dom-f57e260e.js} +4 -1
- package/dist/cjs/download-5e7d5455.js +438 -0
- package/dist/cjs/{index-2973f90a.js → index-064e95c7.js} +287 -634
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/{l10n-e971a5ac.js → l10n-2e7def18.js} +72 -90
- package/dist/cjs/loader.cjs.js +12 -3
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +1426 -1391
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +66 -62
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +222 -217
- package/dist/cjs/peculiar.cjs.js +70 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +220 -205
- package/dist/collection/components/attribute-certificate-viewer/holder.js +27 -24
- package/dist/collection/components/attribute-certificate-viewer/issuer.js +11 -8
- package/dist/collection/components/button/button.css +2 -7
- package/dist/collection/components/button/button.js +125 -122
- package/dist/collection/components/button-split/button-split.js +103 -100
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +1 -3
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +158 -155
- package/dist/collection/components/certificate-summary/certificate-summary.js +75 -72
- package/dist/collection/components/certificate-viewer/attributes/activity_description_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/as_string_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/basic_attribute.js +11 -8
- package/dist/collection/components/certificate-viewer/attributes/challenge_password_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/index.js +45 -42
- package/dist/collection/components/certificate-viewer/attributes/insurance_value_attribute.js +7 -4
- package/dist/collection/components/certificate-viewer/attributes/name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/name_part.js +8 -5
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +5 -2
- package/dist/collection/components/certificate-viewer/attributes/unstructured_name_attribute.js +6 -3
- package/dist/collection/components/certificate-viewer/attributes/valuation_ranking_attribute.js +18 -15
- package/dist/collection/components/certificate-viewer/attributes/web_gdpr_attribute.js +13 -10
- package/dist/collection/components/certificate-viewer/basic_information.js +13 -10
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +255 -240
- package/dist/collection/components/certificate-viewer/extensions/archive_rev_info_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/as_string_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/attribute_value.js +4 -1
- package/dist/collection/components/certificate-viewer/extensions/authority_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/biometric_syntax_extension.js +12 -9
- package/dist/collection/components/certificate-viewer/extensions/ca_version_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_policies_extension.js +28 -25
- package/dist/collection/components/certificate-viewer/extensions/certificate_template_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/certificate_transparency_extension.js +13 -10
- package/dist/collection/components/certificate-viewer/extensions/crl_distribution_points_extension.js +11 -8
- package/dist/collection/components/certificate-viewer/extensions/crl_reason_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/enroll_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/entrust_version_info_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/extended_key_usage_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/general_name_part.js +55 -52
- package/dist/collection/components/certificate-viewer/extensions/index.js +112 -109
- package/dist/collection/components/certificate-viewer/extensions/info_access_syntax_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/key_usage_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/lei_role_extennsion.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/logotype_extension.js +49 -46
- package/dist/collection/components/certificate-viewer/extensions/name_constraints_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/netscape_cert_type_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/netscape_comment_extension.js +6 -3
- package/dist/collection/components/certificate-viewer/extensions/policy_constraints_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/policy_mappings_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/private_key_usage_period_extension.js +7 -4
- package/dist/collection/components/certificate-viewer/extensions/qc_statements_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_alternative_name_extension.js +5 -2
- package/dist/collection/components/certificate-viewer/extensions/subject_directory_attributes_extension.js +9 -6
- package/dist/collection/components/certificate-viewer/extensions/subject_key_identifier_extension.js +18 -15
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +8 -5
- package/dist/collection/components/certificate-viewer/extensions/tn_auth_list_extension.js +10 -7
- package/dist/collection/components/certificate-viewer/get_string_by_oid.js +8 -5
- package/dist/collection/components/certificate-viewer/issuer_name.js +9 -6
- package/dist/collection/components/certificate-viewer/miscellaneous.js +29 -26
- package/dist/collection/components/certificate-viewer/public_key.js +31 -28
- package/dist/collection/components/certificate-viewer/row.js +35 -32
- package/dist/collection/components/certificate-viewer/signature.js +12 -9
- package/dist/collection/components/certificate-viewer/subject_name.js +8 -5
- package/dist/collection/components/certificate-viewer/thumbprints.js +15 -12
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +1 -19
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +384 -381
- package/dist/collection/components/circular-progress/circular-progress.css +2 -24
- package/dist/collection/components/circular-progress/circular-progress.js +73 -70
- package/dist/collection/components/csr-viewer/csr-viewer.js +197 -188
- package/dist/collection/components/highlight-words/highlight-words.js +56 -53
- package/dist/collection/components/link/link.css +1 -3
- package/dist/collection/components/link/link.js +60 -57
- package/dist/collection/components/text-hider/text-hider.js +75 -72
- package/dist/collection/components/typography/typography.css +1 -3
- package/dist/collection/components/typography/typography.js +126 -123
- package/dist/collection/constants/logs.js +79 -76
- package/dist/collection/constants/oids.js +2301 -2298
- package/dist/collection/crypto/asn_data.js +33 -32
- package/dist/collection/crypto/attribute.js +52 -49
- package/dist/collection/crypto/csr.js +64 -61
- package/dist/collection/crypto/extension.js +126 -123
- package/dist/collection/crypto/index.js +3 -0
- package/dist/collection/crypto/name.js +33 -32
- package/dist/collection/crypto/provider.js +28 -25
- package/dist/collection/crypto/utils.js +24 -21
- package/dist/collection/crypto/x509_attribute_certificate.js +61 -58
- package/dist/collection/crypto/x509_certificate.js +107 -104
- package/dist/collection/index.js +5 -1
- package/dist/collection/utils/date_formatter.js +19 -16
- package/dist/collection/utils/download.js +18 -15
- package/dist/collection/utils/download_from_buffer.js +30 -25
- package/dist/collection/utils/history.js +5 -2
- package/dist/collection/utils/index.js +3 -0
- package/dist/collection/utils/is_link.js +4 -1
- package/dist/collection/utils/l10n.js +28 -25
- package/dist/collection/utils/parse_hash.js +16 -13
- package/dist/collection/utils/query_stringify.js +12 -9
- package/dist/collection/utils/read_file.js +43 -40
- package/dist/collection/utils/third_party_links.js +3 -0
- package/dist/collection/utils/validator.js +15 -12
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +20 -0
- package/dist/esm/{download-1ff0a3be.js → certification_request-48e8b956.js} +2898 -3328
- package/dist/esm/{dom-91ed8d21.js → dom-f1b08a97.js} +4 -1
- package/dist/esm/download-cf68ac2c.js +434 -0
- package/dist/esm/{index-5ef692cc.js → index-bbd484d9.js} +278 -624
- package/dist/esm/index.js +5 -0
- package/dist/esm/{l10n-c8cf6930.js → l10n-ead9928b.js} +71 -86
- package/dist/esm/{loader.mjs → loader.js} +11 -2
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +1425 -1390
- package/dist/esm/peculiar-certificate-summary_3.entry.js +66 -62
- package/dist/esm/peculiar-certificates-viewer.entry.js +222 -217
- package/dist/esm/peculiar.js +73 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/index.js +2 -2
- package/dist/esm-es5/_commonjsHelpers-bfbd2ad8.js +4 -0
- package/dist/esm-es5/certification_request-48e8b956.js +89 -0
- package/dist/esm-es5/dom-f1b08a97.js +24 -0
- package/dist/esm-es5/download-cf68ac2c.js +18 -0
- package/dist/esm-es5/index-bbd484d9.js +5 -0
- package/dist/esm-es5/index.js +4 -0
- package/dist/esm-es5/l10n-ead9928b.js +39 -0
- package/dist/esm-es5/loader.js +4 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +198 -1907
- package/dist/esm-es5/peculiar-certificate-summary_3.entry.js +4 -83
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +4 -290
- package/dist/esm-es5/peculiar.js +4 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +4 -0
- package/dist/peculiar/p-047b12d9.system.js +89 -0
- package/dist/peculiar/p-13e9d17d.system.entry.js +460 -0
- package/dist/peculiar/p-29cdd256.system.js +18 -0
- package/dist/peculiar/{p-75076c56.system.js → p-3929074b.system.js} +18 -15
- package/dist/peculiar/p-452d69af.entry.js +113 -0
- package/dist/peculiar/p-4f52a24f.system.js +39 -0
- package/dist/peculiar/p-5f7fbf05.system.entry.js +4 -0
- package/dist/peculiar/p-82033e2e.system.entry.js +4 -0
- package/dist/peculiar/p-886e9c53.js +87 -0
- package/dist/peculiar/p-88fbaf05.system.js +4 -0
- package/dist/peculiar/p-8df391dc.system.js +4 -0
- package/dist/peculiar/p-9837be14.system.js +5 -0
- package/dist/peculiar/p-9ae6b1f8.entry.js +4 -0
- package/dist/peculiar/{p-3d1015c2.js → p-9f4ee110.js} +5 -2
- package/dist/peculiar/p-c774ec0b.js +18 -0
- package/dist/peculiar/p-d09b762f.js +33 -0
- package/dist/peculiar/p-d0b55fbb.js +4 -0
- package/dist/peculiar/p-e5f99586.entry.js +4 -0
- package/dist/peculiar/p-ee0e2707.system.js +4 -0
- package/dist/peculiar/p-f7683ba5.js +5 -0
- package/dist/peculiar/peculiar.esm.js +4 -1
- package/dist/peculiar/peculiar.js +1 -3
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +56 -56
- package/dist/types/components/attribute-certificate-viewer/holder.d.ts +1 -1
- package/dist/types/components/attribute-certificate-viewer/issuer.d.ts +1 -1
- package/dist/types/components/button/button.d.ts +17 -17
- package/dist/types/components/button-split/button-split.d.ts +10 -10
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +16 -16
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -4
- package/dist/types/components/certificate-viewer/attributes/activity_description_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/as_string_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/basic_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/challenge_password_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/index.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/insurance_value_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/type_relationship_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/unstructured_name_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/valuation_ranking_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/attributes/web_gdpr_attribute.d.ts +1 -1
- package/dist/types/components/certificate-viewer/basic_information.d.ts +6 -6
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +66 -66
- package/dist/types/components/certificate-viewer/extensions/archive_rev_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/as_string_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/authority_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/basic_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/biometric_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/ca_version_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_policies_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_template_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/certificate_transparency_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_distribution_points_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/crl_reason_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/enroll_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/entrust_version_info_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/extended_key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/general_name_part.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/index.d.ts +2 -2
- package/dist/types/components/certificate-viewer/extensions/info_access_syntax_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/key_usage_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/lei_role_extennsion.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/logotype_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/name_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_cert_type_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/netscape_comment_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_constraints_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/policy_mappings_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/private_key_usage_period_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/qc_statements_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_alternative_name_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_directory_attributes_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/subject_key_identifier_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/timestamp_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/extensions/tn_auth_list_extension.d.ts +1 -1
- package/dist/types/components/certificate-viewer/issuer_name.d.ts +2 -2
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-viewer/public_key.d.ts +1 -1
- package/dist/types/components/certificate-viewer/row.d.ts +7 -7
- package/dist/types/components/certificate-viewer/signature.d.ts +1 -1
- package/dist/types/components/certificate-viewer/subject_name.d.ts +1 -1
- package/dist/types/components/certificate-viewer/thumbprints.d.ts +1 -1
- package/dist/types/components/certificate-viewer/types.d.ts +26 -0
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +64 -64
- package/dist/types/components/circular-progress/circular-progress.d.ts +10 -10
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +45 -45
- package/dist/types/components/highlight-words/highlight-words.d.ts +8 -8
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +4 -4
- package/dist/types/components/typography/typography.d.ts +18 -18
- package/dist/types/components.d.ts +11 -3
- package/dist/types/constants/logs.d.ts +76 -76
- package/dist/types/constants/oids.d.ts +2293 -2293
- package/dist/types/crypto/asn_data.d.ts +6 -6
- package/dist/types/crypto/attribute.d.ts +3 -3
- package/dist/types/crypto/csr.d.ts +19 -19
- package/dist/types/crypto/extension.d.ts +3 -3
- package/dist/types/crypto/name.d.ts +7 -7
- package/dist/types/crypto/provider.d.ts +15 -15
- package/dist/types/crypto/x509_attribute_certificate.d.ts +22 -22
- package/dist/types/crypto/x509_certificate.d.ts +28 -28
- package/dist/types/index.d.ts +2 -1
- package/dist/types/interface.d.ts +3 -0
- package/dist/types/stencil-public-runtime.d.ts +230 -217
- package/dist/types/utils/download.d.ts +8 -8
- package/dist/types/utils/download_from_buffer.d.ts +3 -3
- package/dist/types/utils/l10n.d.ts +43 -43
- package/dist/types/utils/read_file.d.ts +7 -7
- package/loader/cdn.js +3 -1
- package/loader/index.cjs.js +3 -1
- package/loader/index.d.ts +0 -1
- package/loader/index.es2017.js +5 -0
- package/loader/{index.mjs → index.js} +4 -2
- package/loader/package.json +4 -5
- package/package.json +15 -16
- package/dist/cjs/css-shim-1b988199.js +0 -6
- package/dist/cjs/patch-15ea31af.js +0 -112
- package/dist/cjs/shadow-css-376763e9.js +0 -385
- package/dist/esm/css-shim-5ce2b5c4.js +0 -4
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/patch-f8a17185.js +0 -109
- package/dist/esm/peculiar.mjs +0 -6
- package/dist/esm/shadow-css-95922619.js +0 -383
- package/dist/esm-es5/css-shim-5ce2b5c4.js +0 -122
- package/dist/esm-es5/dom-91ed8d21.js +0 -468
- package/dist/esm-es5/download-1ff0a3be.js +0 -12692
- package/dist/esm-es5/index-5ef692cc.js +0 -1839
- package/dist/esm-es5/index.mjs +0 -0
- package/dist/esm-es5/l10n-c8cf6930.js +0 -758
- package/dist/esm-es5/loader.mjs +0 -10
- package/dist/esm-es5/patch-f8a17185.js +0 -106
- package/dist/esm-es5/peculiar.mjs +0 -5
- package/dist/esm-es5/shadow-css-95922619.js +0 -408
- package/dist/index.mjs +0 -1
- package/dist/peculiar/p-0ad0b6e8.js +0 -1
- package/dist/peculiar/p-198d9121.js +0 -1
- package/dist/peculiar/p-294c4ef9.entry.js +0 -1
- package/dist/peculiar/p-3d339152.system.entry.js +0 -1
- package/dist/peculiar/p-4b7cd42f.js +0 -12
- package/dist/peculiar/p-50ea2036.system.js +0 -1
- package/dist/peculiar/p-557d912f.system.js +0 -1
- package/dist/peculiar/p-84e8326d.entry.js +0 -110
- package/dist/peculiar/p-94f96303.system.js +0 -100
- package/dist/peculiar/p-983b5210.system.entry.js +0 -1
- package/dist/peculiar/p-9f815f76.system.js +0 -1
- package/dist/peculiar/p-aa0a9b36.system.js +0 -1
- package/dist/peculiar/p-bd1f9066.system.js +0 -36
- package/dist/peculiar/p-bd949790.js +0 -1
- package/dist/peculiar/p-cf1841f8.js +0 -30
- package/dist/peculiar/p-dbdd61e7.entry.js +0 -1
- package/dist/peculiar/p-dc6b70b2.js +0 -100
- package/dist/peculiar/p-fb53799e.system.js +0 -1
- package/dist/peculiar/p-fc92385a.system.entry.js +0 -457
- package/dist/peculiar/p-fdad110e.system.js +0 -13
- package/dist/peculiar.js +0 -30
- package/loader/index.es2017.mjs +0 -3
- package/loader/node-main.js +0 -3
package/dist/esm-es5/loader.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-5ef692cc.js';
|
|
2
|
-
import { a as patchEsm } from './patch-f8a17185.js';
|
|
3
|
-
var defineCustomElements = function (win, options) {
|
|
4
|
-
if (typeof window === 'undefined')
|
|
5
|
-
return Promise.resolve();
|
|
6
|
-
return patchEsm().then(function () {
|
|
7
|
-
return bootstrapLazy([["peculiar-attribute-certificate-viewer_9", [[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", [[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", [[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);
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
export { defineCustomElements };
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { C as CSS, p as plt, w as win, a as promiseResolve, d as doc, N as NAMESPACE } from './index-5ef692cc.js';
|
|
2
|
-
/*
|
|
3
|
-
Stencil Client Patch v1.17.4 | MIT Licensed | https://stenciljs.com
|
|
4
|
-
*/
|
|
5
|
-
var noop = function () {
|
|
6
|
-
/* noop*/
|
|
7
|
-
};
|
|
8
|
-
var IS_DENO_ENV = typeof Deno !== 'undefined';
|
|
9
|
-
var IS_NODE_ENV = !IS_DENO_ENV &&
|
|
10
|
-
typeof global !== 'undefined' &&
|
|
11
|
-
typeof require === 'function' &&
|
|
12
|
-
!!global.process &&
|
|
13
|
-
typeof __filename === 'string' &&
|
|
14
|
-
(!global.origin || typeof global.origin !== 'string');
|
|
15
|
-
var IS_DENO_WINDOWS_ENV = IS_DENO_ENV && Deno.build.os === 'windows';
|
|
16
|
-
var getCurrentDirectory = IS_NODE_ENV ? process.cwd : IS_DENO_ENV ? Deno.cwd : function () { return '/'; };
|
|
17
|
-
var exit = IS_NODE_ENV ? process.exit : IS_DENO_ENV ? Deno.exit : noop;
|
|
18
|
-
var getDynamicImportFunction = function (namespace) { return "__sc_import_" + namespace.replace(/\s|-/g, '_'); };
|
|
19
|
-
var patchEsm = function () {
|
|
20
|
-
// NOTE!! This fn cannot use async/await!
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
if (!(CSS && CSS.supports && CSS.supports('color', 'var(--c)'))) {
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
return import(/* webpackChunkName: "polyfills-css-shim" */ './css-shim-5ce2b5c4.js').then(function () {
|
|
25
|
-
if ((plt.$cssShim$ = win.__cssshim)) {
|
|
26
|
-
return plt.$cssShim$.i();
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
// for better minification
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return promiseResolve();
|
|
35
|
-
};
|
|
36
|
-
var patchBrowser = function () {
|
|
37
|
-
{
|
|
38
|
-
// shim css vars
|
|
39
|
-
plt.$cssShim$ = win.__cssshim;
|
|
40
|
-
}
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
var scriptElm = Array.from(doc.querySelectorAll('script')).find(function (s) { return new RegExp("/" + NAMESPACE + "(\\.esm)?\\.js($|\\?|#)").test(s.src) || s.getAttribute('data-stencil-namespace') === NAMESPACE; });
|
|
43
|
-
var opts = scriptElm['data-opts'] || {};
|
|
44
|
-
if ('onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {
|
|
45
|
-
// Safari < v11 support: This IF is true if it's Safari below v11.
|
|
46
|
-
// This fn cannot use async/await since Safari didn't support it until v11,
|
|
47
|
-
// however, Safari 10 did support modules. Safari 10 also didn't support "nomodule",
|
|
48
|
-
// so both the ESM file and nomodule file would get downloaded. Only Safari
|
|
49
|
-
// has 'onbeforeload' in the script, and "history.scrollRestoration" was added
|
|
50
|
-
// to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.
|
|
51
|
-
// IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.
|
|
52
|
-
return {
|
|
53
|
-
then: function () {
|
|
54
|
-
/* promise noop */
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
{
|
|
59
|
-
opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;
|
|
60
|
-
{
|
|
61
|
-
patchDynamicImport(opts.resourcesUrl, scriptElm);
|
|
62
|
-
}
|
|
63
|
-
if (!win.customElements) {
|
|
64
|
-
// module support, but no custom elements support (Old Edge)
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
return import(/* webpackChunkName: "polyfills-dom" */ './dom-91ed8d21.js').then(function () { return opts; });
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return promiseResolve(opts);
|
|
70
|
-
};
|
|
71
|
-
var patchDynamicImport = function (base, orgScriptElm) {
|
|
72
|
-
var importFunctionName = getDynamicImportFunction(NAMESPACE);
|
|
73
|
-
try {
|
|
74
|
-
// test if this browser supports dynamic imports
|
|
75
|
-
// There is a caching issue in V8, that breaks using import() in Function
|
|
76
|
-
// By generating a random string, we can workaround it
|
|
77
|
-
// Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info
|
|
78
|
-
win[importFunctionName] = new Function('w', "return import(w);//" + Math.random());
|
|
79
|
-
}
|
|
80
|
-
catch (e) {
|
|
81
|
-
// this shim is specifically for browsers that do support "esm" imports
|
|
82
|
-
// however, they do NOT support "dynamic" imports
|
|
83
|
-
// basically this code is for old Edge, v18 and below
|
|
84
|
-
var moduleMap_1 = new Map();
|
|
85
|
-
win[importFunctionName] = function (src) {
|
|
86
|
-
var url = new URL(src, base).href;
|
|
87
|
-
var mod = moduleMap_1.get(url);
|
|
88
|
-
if (!mod) {
|
|
89
|
-
var script_1 = doc.createElement('script');
|
|
90
|
-
script_1.type = 'module';
|
|
91
|
-
script_1.crossOrigin = orgScriptElm.crossOrigin;
|
|
92
|
-
script_1.src = URL.createObjectURL(new Blob(["import * as m from '" + url + "'; window." + importFunctionName + ".m = m;"], { type: 'application/javascript' }));
|
|
93
|
-
mod = new Promise(function (resolve) {
|
|
94
|
-
script_1.onload = function () {
|
|
95
|
-
resolve(win[importFunctionName].m);
|
|
96
|
-
script_1.remove();
|
|
97
|
-
};
|
|
98
|
-
});
|
|
99
|
-
moduleMap_1.set(url, mod);
|
|
100
|
-
doc.head.appendChild(script_1);
|
|
101
|
-
}
|
|
102
|
-
return mod;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
export { patchEsm as a, patchBrowser as p };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-5ef692cc.js';
|
|
2
|
-
import { p as patchBrowser } from './patch-f8a17185.js';
|
|
3
|
-
patchBrowser().then(function (options) {
|
|
4
|
-
return bootstrapLazy([["peculiar-attribute-certificate-viewer_9", [[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", [[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", [[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);
|
|
5
|
-
});
|
|
@@ -1,408 +0,0 @@
|
|
|
1
|
-
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
2
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
3
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
4
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
5
|
-
r[k] = a[j];
|
|
6
|
-
return r;
|
|
7
|
-
};
|
|
8
|
-
/*
|
|
9
|
-
Stencil Client Platform v1.17.4 | MIT Licensed | https://stenciljs.com
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* @license
|
|
13
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
14
|
-
*
|
|
15
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
16
|
-
* found in the LICENSE file at https://angular.io/license
|
|
17
|
-
*
|
|
18
|
-
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
19
|
-
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
20
|
-
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
21
|
-
*/
|
|
22
|
-
var safeSelector = function (selector) {
|
|
23
|
-
var placeholders = [];
|
|
24
|
-
var index = 0;
|
|
25
|
-
var content;
|
|
26
|
-
// Replaces attribute selectors with placeholders.
|
|
27
|
-
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
|
28
|
-
selector = selector.replace(/(\[[^\]]*\])/g, function (_, keep) {
|
|
29
|
-
var replaceBy = "__ph-" + index + "__";
|
|
30
|
-
placeholders.push(keep);
|
|
31
|
-
index++;
|
|
32
|
-
return replaceBy;
|
|
33
|
-
});
|
|
34
|
-
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
|
35
|
-
// WS and "+" would otherwise be interpreted as selector separators.
|
|
36
|
-
content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, function (_, pseudo, exp) {
|
|
37
|
-
var replaceBy = "__ph-" + index + "__";
|
|
38
|
-
placeholders.push(exp);
|
|
39
|
-
index++;
|
|
40
|
-
return pseudo + replaceBy;
|
|
41
|
-
});
|
|
42
|
-
var ss = {
|
|
43
|
-
content: content,
|
|
44
|
-
placeholders: placeholders,
|
|
45
|
-
};
|
|
46
|
-
return ss;
|
|
47
|
-
};
|
|
48
|
-
var restoreSafeSelector = function (placeholders, content) {
|
|
49
|
-
return content.replace(/__ph-(\d+)__/g, function (_, index) { return placeholders[+index]; });
|
|
50
|
-
};
|
|
51
|
-
var _polyfillHost = '-shadowcsshost';
|
|
52
|
-
var _polyfillSlotted = '-shadowcssslotted';
|
|
53
|
-
// note: :host-context pre-processed to -shadowcsshostcontext.
|
|
54
|
-
var _polyfillHostContext = '-shadowcsscontext';
|
|
55
|
-
var _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
|
|
56
|
-
var _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
|
|
57
|
-
var _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
|
|
58
|
-
var _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
|
|
59
|
-
var _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
|
60
|
-
var _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
|
61
|
-
var _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
|
62
|
-
var _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
|
|
63
|
-
var _polyfillHostRe = /-shadowcsshost/gim;
|
|
64
|
-
var _colonHostRe = /:host/gim;
|
|
65
|
-
var _colonSlottedRe = /::slotted/gim;
|
|
66
|
-
var _colonHostContextRe = /:host-context/gim;
|
|
67
|
-
var _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
|
68
|
-
var stripComments = function (input) {
|
|
69
|
-
return input.replace(_commentRe, '');
|
|
70
|
-
};
|
|
71
|
-
var _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
|
72
|
-
var extractCommentsWithHash = function (input) {
|
|
73
|
-
return input.match(_commentWithHashRe) || [];
|
|
74
|
-
};
|
|
75
|
-
var _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
|
76
|
-
var _curlyRe = /([{}])/g;
|
|
77
|
-
var OPEN_CURLY = '{';
|
|
78
|
-
var CLOSE_CURLY = '}';
|
|
79
|
-
var BLOCK_PLACEHOLDER = '%BLOCK%';
|
|
80
|
-
var processRules = function (input, ruleCallback) {
|
|
81
|
-
var inputWithEscapedBlocks = escapeBlocks(input);
|
|
82
|
-
var nextBlockIndex = 0;
|
|
83
|
-
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function () {
|
|
84
|
-
var m = [];
|
|
85
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
86
|
-
m[_i] = arguments[_i];
|
|
87
|
-
}
|
|
88
|
-
var selector = m[2];
|
|
89
|
-
var content = '';
|
|
90
|
-
var suffix = m[4];
|
|
91
|
-
var contentPrefix = '';
|
|
92
|
-
if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
|
|
93
|
-
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
|
94
|
-
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
|
95
|
-
contentPrefix = '{';
|
|
96
|
-
}
|
|
97
|
-
var cssRule = {
|
|
98
|
-
selector: selector,
|
|
99
|
-
content: content,
|
|
100
|
-
};
|
|
101
|
-
var rule = ruleCallback(cssRule);
|
|
102
|
-
return "" + m[1] + rule.selector + m[3] + contentPrefix + rule.content + suffix;
|
|
103
|
-
});
|
|
104
|
-
};
|
|
105
|
-
var escapeBlocks = function (input) {
|
|
106
|
-
var inputParts = input.split(_curlyRe);
|
|
107
|
-
var resultParts = [];
|
|
108
|
-
var escapedBlocks = [];
|
|
109
|
-
var bracketCount = 0;
|
|
110
|
-
var currentBlockParts = [];
|
|
111
|
-
for (var partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
|
112
|
-
var part = inputParts[partIndex];
|
|
113
|
-
if (part === CLOSE_CURLY) {
|
|
114
|
-
bracketCount--;
|
|
115
|
-
}
|
|
116
|
-
if (bracketCount > 0) {
|
|
117
|
-
currentBlockParts.push(part);
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
if (currentBlockParts.length > 0) {
|
|
121
|
-
escapedBlocks.push(currentBlockParts.join(''));
|
|
122
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
|
123
|
-
currentBlockParts = [];
|
|
124
|
-
}
|
|
125
|
-
resultParts.push(part);
|
|
126
|
-
}
|
|
127
|
-
if (part === OPEN_CURLY) {
|
|
128
|
-
bracketCount++;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (currentBlockParts.length > 0) {
|
|
132
|
-
escapedBlocks.push(currentBlockParts.join(''));
|
|
133
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
|
134
|
-
}
|
|
135
|
-
var strEscapedBlocks = {
|
|
136
|
-
escapedString: resultParts.join(''),
|
|
137
|
-
blocks: escapedBlocks,
|
|
138
|
-
};
|
|
139
|
-
return strEscapedBlocks;
|
|
140
|
-
};
|
|
141
|
-
var insertPolyfillHostInCssText = function (selector) {
|
|
142
|
-
selector = selector
|
|
143
|
-
.replace(_colonHostContextRe, _polyfillHostContext)
|
|
144
|
-
.replace(_colonHostRe, _polyfillHost)
|
|
145
|
-
.replace(_colonSlottedRe, _polyfillSlotted);
|
|
146
|
-
return selector;
|
|
147
|
-
};
|
|
148
|
-
var convertColonRule = function (cssText, regExp, partReplacer) {
|
|
149
|
-
// m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
|
|
150
|
-
return cssText.replace(regExp, function () {
|
|
151
|
-
var m = [];
|
|
152
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
153
|
-
m[_i] = arguments[_i];
|
|
154
|
-
}
|
|
155
|
-
if (m[2]) {
|
|
156
|
-
var parts = m[2].split(',');
|
|
157
|
-
var r = [];
|
|
158
|
-
for (var i = 0; i < parts.length; i++) {
|
|
159
|
-
var p = parts[i].trim();
|
|
160
|
-
if (!p)
|
|
161
|
-
break;
|
|
162
|
-
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
|
163
|
-
}
|
|
164
|
-
return r.join(',');
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
return _polyfillHostNoCombinator + m[3];
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
var colonHostPartReplacer = function (host, part, suffix) {
|
|
172
|
-
return host + part.replace(_polyfillHost, '') + suffix;
|
|
173
|
-
};
|
|
174
|
-
var convertColonHost = function (cssText) {
|
|
175
|
-
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
|
176
|
-
};
|
|
177
|
-
var colonHostContextPartReplacer = function (host, part, suffix) {
|
|
178
|
-
if (part.indexOf(_polyfillHost) > -1) {
|
|
179
|
-
return colonHostPartReplacer(host, part, suffix);
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
return host + part + suffix + ', ' + part + ' ' + host + suffix;
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
var convertColonSlotted = function (cssText, slotScopeId) {
|
|
186
|
-
var slotClass = '.' + slotScopeId + ' > ';
|
|
187
|
-
var selectors = [];
|
|
188
|
-
cssText = cssText.replace(_cssColonSlottedRe, function () {
|
|
189
|
-
var m = [];
|
|
190
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
191
|
-
m[_i] = arguments[_i];
|
|
192
|
-
}
|
|
193
|
-
if (m[2]) {
|
|
194
|
-
var compound = m[2].trim();
|
|
195
|
-
var suffix = m[3];
|
|
196
|
-
var slottedSelector = slotClass + compound + suffix;
|
|
197
|
-
var prefixSelector = '';
|
|
198
|
-
for (var i = m[4] - 1; i >= 0; i--) {
|
|
199
|
-
var char = m[5][i];
|
|
200
|
-
if (char === '}' || char === ',') {
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
prefixSelector = char + prefixSelector;
|
|
204
|
-
}
|
|
205
|
-
var orgSelector = prefixSelector + slottedSelector;
|
|
206
|
-
var addedSelector = "" + prefixSelector.trimRight() + slottedSelector.trim();
|
|
207
|
-
if (orgSelector.trim() !== addedSelector.trim()) {
|
|
208
|
-
var updatedSelector = addedSelector + ", " + orgSelector;
|
|
209
|
-
selectors.push({
|
|
210
|
-
orgSelector: orgSelector,
|
|
211
|
-
updatedSelector: updatedSelector,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
return slottedSelector;
|
|
215
|
-
}
|
|
216
|
-
else {
|
|
217
|
-
return _polyfillHostNoCombinator + m[3];
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
return {
|
|
221
|
-
selectors: selectors,
|
|
222
|
-
cssText: cssText,
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
var convertColonHostContext = function (cssText) {
|
|
226
|
-
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
|
227
|
-
};
|
|
228
|
-
var convertShadowDOMSelectors = function (cssText) {
|
|
229
|
-
return _shadowDOMSelectorsRe.reduce(function (result, pattern) { return result.replace(pattern, ' '); }, cssText);
|
|
230
|
-
};
|
|
231
|
-
var makeScopeMatcher = function (scopeSelector) {
|
|
232
|
-
var lre = /\[/g;
|
|
233
|
-
var rre = /\]/g;
|
|
234
|
-
scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
|
|
235
|
-
return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
|
|
236
|
-
};
|
|
237
|
-
var selectorNeedsScoping = function (selector, scopeSelector) {
|
|
238
|
-
var re = makeScopeMatcher(scopeSelector);
|
|
239
|
-
return !re.test(selector);
|
|
240
|
-
};
|
|
241
|
-
var applySimpleSelectorScope = function (selector, scopeSelector, hostSelector) {
|
|
242
|
-
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
|
243
|
-
_polyfillHostRe.lastIndex = 0;
|
|
244
|
-
if (_polyfillHostRe.test(selector)) {
|
|
245
|
-
var replaceBy_1 = "." + hostSelector;
|
|
246
|
-
return selector
|
|
247
|
-
.replace(_polyfillHostNoCombinatorRe, function (_, selector) {
|
|
248
|
-
return selector.replace(/([^:]*)(:*)(.*)/, function (_, before, colon, after) {
|
|
249
|
-
return before + replaceBy_1 + colon + after;
|
|
250
|
-
});
|
|
251
|
-
})
|
|
252
|
-
.replace(_polyfillHostRe, replaceBy_1 + ' ');
|
|
253
|
-
}
|
|
254
|
-
return scopeSelector + ' ' + selector;
|
|
255
|
-
};
|
|
256
|
-
var applyStrictSelectorScope = function (selector, scopeSelector, hostSelector) {
|
|
257
|
-
var isRe = /\[is=([^\]]*)\]/g;
|
|
258
|
-
scopeSelector = scopeSelector.replace(isRe, function (_) {
|
|
259
|
-
var parts = [];
|
|
260
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
261
|
-
parts[_i - 1] = arguments[_i];
|
|
262
|
-
}
|
|
263
|
-
return parts[0];
|
|
264
|
-
});
|
|
265
|
-
var className = '.' + scopeSelector;
|
|
266
|
-
var _scopeSelectorPart = function (p) {
|
|
267
|
-
var scopedP = p.trim();
|
|
268
|
-
if (!scopedP) {
|
|
269
|
-
return '';
|
|
270
|
-
}
|
|
271
|
-
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
|
272
|
-
scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
// remove :host since it should be unnecessary
|
|
276
|
-
var t = p.replace(_polyfillHostRe, '');
|
|
277
|
-
if (t.length > 0) {
|
|
278
|
-
var matches = t.match(/([^:]*)(:*)(.*)/);
|
|
279
|
-
if (matches) {
|
|
280
|
-
scopedP = matches[1] + className + matches[2] + matches[3];
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return scopedP;
|
|
285
|
-
};
|
|
286
|
-
var safeContent = safeSelector(selector);
|
|
287
|
-
selector = safeContent.content;
|
|
288
|
-
var scopedSelector = '';
|
|
289
|
-
var startIndex = 0;
|
|
290
|
-
var res;
|
|
291
|
-
var sep = /( |>|\+|~(?!=))\s*/g;
|
|
292
|
-
// If a selector appears before :host it should not be shimmed as it
|
|
293
|
-
// matches on ancestor elements and not on elements in the host's shadow
|
|
294
|
-
// `:host-context(div)` is transformed to
|
|
295
|
-
// `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
|
|
296
|
-
// the `div` is not part of the component in the 2nd selectors and should not be scoped.
|
|
297
|
-
// Historically `component-tag:host` was matching the component so we also want to preserve
|
|
298
|
-
// this behavior to avoid breaking legacy apps (it should not match).
|
|
299
|
-
// The behavior should be:
|
|
300
|
-
// - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
|
|
301
|
-
// - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
|
|
302
|
-
// `:host-context(tag)`)
|
|
303
|
-
var hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
|
304
|
-
// Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
|
|
305
|
-
var shouldScope = !hasHost;
|
|
306
|
-
while ((res = sep.exec(selector)) !== null) {
|
|
307
|
-
var separator = res[1];
|
|
308
|
-
var part_1 = selector.slice(startIndex, res.index).trim();
|
|
309
|
-
shouldScope = shouldScope || part_1.indexOf(_polyfillHostNoCombinator) > -1;
|
|
310
|
-
var scopedPart = shouldScope ? _scopeSelectorPart(part_1) : part_1;
|
|
311
|
-
scopedSelector += scopedPart + " " + separator + " ";
|
|
312
|
-
startIndex = sep.lastIndex;
|
|
313
|
-
}
|
|
314
|
-
var part = selector.substring(startIndex);
|
|
315
|
-
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
|
316
|
-
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
|
317
|
-
// replace the placeholders with their original values
|
|
318
|
-
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
|
319
|
-
};
|
|
320
|
-
var scopeSelector = function (selector, scopeSelectorText, hostSelector, slotSelector) {
|
|
321
|
-
return selector
|
|
322
|
-
.split(',')
|
|
323
|
-
.map(function (shallowPart) {
|
|
324
|
-
if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
|
|
325
|
-
return shallowPart.trim();
|
|
326
|
-
}
|
|
327
|
-
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
|
328
|
-
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
return shallowPart.trim();
|
|
332
|
-
}
|
|
333
|
-
})
|
|
334
|
-
.join(', ');
|
|
335
|
-
};
|
|
336
|
-
var scopeSelectors = function (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) {
|
|
337
|
-
return processRules(cssText, function (rule) {
|
|
338
|
-
var selector = rule.selector;
|
|
339
|
-
var content = rule.content;
|
|
340
|
-
if (rule.selector[0] !== '@') {
|
|
341
|
-
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
|
342
|
-
}
|
|
343
|
-
else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
|
|
344
|
-
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
|
345
|
-
}
|
|
346
|
-
var cssRule = {
|
|
347
|
-
selector: selector.replace(/\s{2,}/g, ' ').trim(),
|
|
348
|
-
content: content,
|
|
349
|
-
};
|
|
350
|
-
return cssRule;
|
|
351
|
-
});
|
|
352
|
-
};
|
|
353
|
-
var scopeCssText = function (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) {
|
|
354
|
-
cssText = insertPolyfillHostInCssText(cssText);
|
|
355
|
-
cssText = convertColonHost(cssText);
|
|
356
|
-
cssText = convertColonHostContext(cssText);
|
|
357
|
-
var slotted = convertColonSlotted(cssText, slotScopeId);
|
|
358
|
-
cssText = slotted.cssText;
|
|
359
|
-
cssText = convertShadowDOMSelectors(cssText);
|
|
360
|
-
if (scopeId) {
|
|
361
|
-
cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
|
|
362
|
-
}
|
|
363
|
-
cssText = cssText.replace(/-shadowcsshost-no-combinator/g, "." + hostScopeId);
|
|
364
|
-
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
|
|
365
|
-
return {
|
|
366
|
-
cssText: cssText.trim(),
|
|
367
|
-
slottedSelectors: slotted.selectors,
|
|
368
|
-
};
|
|
369
|
-
};
|
|
370
|
-
var scopeCss = function (cssText, scopeId, commentOriginalSelector) {
|
|
371
|
-
var hostScopeId = scopeId + '-h';
|
|
372
|
-
var slotScopeId = scopeId + '-s';
|
|
373
|
-
var commentsWithHash = extractCommentsWithHash(cssText);
|
|
374
|
-
cssText = stripComments(cssText);
|
|
375
|
-
var orgSelectors = [];
|
|
376
|
-
if (commentOriginalSelector) {
|
|
377
|
-
var processCommentedSelector_1 = function (rule) {
|
|
378
|
-
var placeholder = "/*!@___" + orgSelectors.length + "___*/";
|
|
379
|
-
var comment = "/*!@" + rule.selector + "*/";
|
|
380
|
-
orgSelectors.push({ placeholder: placeholder, comment: comment });
|
|
381
|
-
rule.selector = placeholder + rule.selector;
|
|
382
|
-
return rule;
|
|
383
|
-
};
|
|
384
|
-
cssText = processRules(cssText, function (rule) {
|
|
385
|
-
if (rule.selector[0] !== '@') {
|
|
386
|
-
return processCommentedSelector_1(rule);
|
|
387
|
-
}
|
|
388
|
-
else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {
|
|
389
|
-
rule.content = processRules(rule.content, processCommentedSelector_1);
|
|
390
|
-
return rule;
|
|
391
|
-
}
|
|
392
|
-
return rule;
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
var scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
|
396
|
-
cssText = __spreadArrays([scoped.cssText], commentsWithHash).join('\n');
|
|
397
|
-
if (commentOriginalSelector) {
|
|
398
|
-
orgSelectors.forEach(function (_a) {
|
|
399
|
-
var placeholder = _a.placeholder, comment = _a.comment;
|
|
400
|
-
cssText = cssText.replace(placeholder, comment);
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
scoped.slottedSelectors.forEach(function (slottedSelector) {
|
|
404
|
-
cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
|
|
405
|
-
});
|
|
406
|
-
return cssText;
|
|
407
|
-
};
|
|
408
|
-
export { scopeCss };
|
package/dist/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './esm-es5/index.mjs';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};var t={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},r="{",i="}",u={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},e="--",o="@media",f="@";function s(n,t,r){n.lastIndex=0;var i=t.substring(r).match(n);if(i){var u=r+i.index;return{start:u,end:u+i[0].length}}return null}var a=/\bvar\(/,c=/\B--[\w-]+\s*:/,v=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,h=/^[\t ]+\n/gm;function l(n,t,r){var i=function(n,t){var r=s(a,n,t);if(!r)return null;var i=function(n,t){for(var r=0,i=t;i<n.length;i++){var u=n[i];if("("===u)r++;else if(")"===u&&--r<=0)return i+1}return i}(n,r.start),u=n.substring(r.end,i-1).split(","),e=u[0],o=u.slice(1);return{start:r.start,end:i,propName:e.trim(),fallback:o.length>0?o.join(",").trim():void 0}}(n,r);if(!i)return t.push(n.substring(r,n.length)),n.length;var u=i.propName,e=null!=i.fallback?d(i.fallback):void 0;return t.push(n.substring(r,i.start),(function(n){return function(n,t,r){return n[t]?n[t]:r?m(r,n):""}(n,u,e)})),i.end}function m(n,t){for(var r="",i=0;i<n.length;i++){var u=n[i];r+="string"==typeof u?u:u(t)}return r}function p(n,t){for(var r=!1,i=!1,u=t;u<n.length;u++){var e=n[u];if(r)i&&'"'===e&&(r=!1),i||"'"!==e||(r=!1);else if('"'===e)r=!0,i=!0;else if("'"===e)r=!0,i=!1;else{if(";"===e)return u+1;if("}"===e)return u}}return u}function d(n){var t=0;n=function(n){for(var t="",r=0;;){var i=s(c,n,r),u=i?i.start:n.length;if(t+=n.substring(r,u),!i)break;r=p(n,u)}return t}(n=n.replace(v,"")).replace(h,"");for(var r=[];t<n.length;)t=l(n,r,t);return r}function y(n){var t={};n.forEach((function(n){n.declarations.forEach((function(n){t[n.prop]=n.value}))}));for(var r={},i=Object.entries(t),u=function(){var n=!1;if(i.forEach((function(t){var i=t[0],u=m(t[1],r);u!==r[i]&&(r[i]=u,n=!0)})),!n)return"break"},e=0;e<10&&"break"!==u();e++);return r}function g(n,r){if(void 0===r&&(r=0),!n.rules)return[];var i=[];return n.rules.filter((function(n){return n.type===t.STYLE_RULE})).forEach((function(n){var t=function(n){for(var t,r=[];t=w.exec(n.trim());){var i=b(t[2]),u=i.value,e=i.important;r.push({prop:t[1].trim(),value:d(u),important:e})}return r}(n.cssText);t.length>0&&n.parsedSelector.split(",").forEach((function(n){n=n.trim(),i.push({selector:n,declarations:t,specificity:1,nu:r})})),r++})),i}var w=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function b(n){var t=(n=n.replace(/\s+/gim," ").trim()).endsWith("!important");return t&&(n=n.substr(0,n.length-10).trim()),{value:n,important:t}}function E(n){var t=[];return n.forEach((function(n){t.push.apply(t,n.selectors)})),t}function k(s){var a=function(s){return function n(r,i){var s=i.substring(r.start,r.end-1);if(r.parsedCssText=r.cssText=s.trim(),r.parent){s=(s=(s=function(n){return n.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var n=arguments[1],t=6-n.length;t--;)n="0"+n;return"\\"+n}))}(s=i.substring(r.previous?r.previous.end:r.parent.start,r.start-1))).replace(u.multipleSpaces," ")).substring(s.lastIndexOf(";")+1);var a=r.parsedSelector=r.selector=s.trim();r.atRule=0===a.indexOf(f),r.atRule?0===a.indexOf(o)?r.type=t.MEDIA_RULE:a.match(u.keyframesRule)&&(r.type=t.KEYFRAMES_RULE,r.keyframesName=r.selector.split(u.multipleSpaces).pop()):r.type=0===a.indexOf(e)?t.MIXIN_RULE:t.STYLE_RULE}var c=r.rules;if(c)for(var v=0,h=c.length,l=void 0;v<h&&(l=c[v]);v++)n(l,i);return r}(function(t){var u=new n;u.start=0,u.end=t.length;for(var e=u,o=0,f=t.length;o<f;o++)if(t[o]===r){e.rules||(e.rules=[]);var s=e,a=s.rules[s.rules.length-1]||null;(e=new n).start=o+1,e.parent=s,e.previous=a,s.rules.push(e)}else t[o]===i&&(e.end=o+1,e=e.parent||u);return u}(s=function(n){return n.replace(u.comments,"").replace(u.port,"")}(s)),s)}(s),c=d(s);return{original:s,template:c,selectors:g(a),usesCssVars:c.length>1}}function M(n,t){if(n.some((function(n){return n.styleEl===t})))return!1;var r=k(t.textContent);return r.styleEl=t,n.push(r),!0}function O(n){var t=y(E(n));n.forEach((function(n){n.usesCssVars&&(n.styleEl.textContent=m(n.template,t))}))}function R(n,t,r){return function(n,t,r){return n.replace(RegExp(t,"g"),r)}(n,"\\."+t,"."+r)}function A(n,t){return Array.from(n.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(n){return M(t,n)})).some(Boolean)}function L(n,t,r){var i=r.href;return fetch(i).then((function(n){return n.text()})).then((function(u){if(function(n){return n.indexOf("var(")>-1||$.test(n)}(u)&&r.parentNode){(function(n){return j.lastIndex=0,j.test(n)})(u)&&(u=function(n,t){var r=t.replace(/[^/]*$/,"");return n.replace(j,(function(n,t){return n.replace(t,r+t)}))}(u,i));var e=n.createElement("style");e.setAttribute("data-styles",""),e.textContent=u,M(t,e),r.parentNode.insertBefore(e,r),r.remove()}})).catch((function(n){console.error(n)}))}var $=/[\s;{]--[-a-zA-Z0-9]+\s*:/m,j=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim,P=function(){function n(n,t){this.win=n,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return n.prototype.i=function(){var n=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){n.win.requestAnimationFrame((function(){(function(n,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){A(n,t)&&O(t)})).observe(document.head,{childList:!0})})(n.doc,n.globalScopes),function(n,t){return A(n,t),function(n,t){for(var r=[],i=n.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),u=0;u<i.length;u++)r.push(L(n,t,i[u]));return Promise.all(r)}(n,t).then((function(){O(t)}))}(n.doc,n.globalScopes).then((function(){return t()}))}))})))},n.prototype.addLink=function(n){var t=this;return L(this.doc,this.globalScopes,n).then((function(){t.updateGlobal()}))},n.prototype.addGlobalStyle=function(n){M(this.globalScopes,n)&&this.updateGlobal()},n.prototype.createHostStyle=function(n,t,r,i){if(this.hostScopeMap.has(n))throw Error("host style already created");var u=this.registerHostTemplate(r,t,i),e=this.doc.createElement("style");return e.setAttribute("data-no-shim",""),u.usesCssVars?i?(e["s-sc"]=t=u.scopeId+"-"+this.count,e.textContent="/*needs update*/",this.hostStyleMap.set(n,e),this.hostScopeMap.set(n,function(n,t){var r=n.template.map((function(r){return"string"==typeof r?R(r,n.scopeId,t):r})),i=n.selectors.map((function(r){return Object.assign(Object.assign({},r),{selector:R(r.selector,n.scopeId,t)})}));return Object.assign(Object.assign({},n),{template:r,selectors:i,scopeId:t})}(u,t)),this.count++):(u.styleEl=e,u.usesCssVars||(e.textContent=m(u.template,{})),this.globalScopes.push(u),this.updateGlobal(),this.hostScopeMap.set(n,u)):e.textContent=r,e},n.prototype.removeHost=function(n){var t=this.hostStyleMap.get(n);t&&t.remove(),this.hostStyleMap.delete(n),this.hostScopeMap.delete(n)},n.prototype.updateHost=function(n){var t=this.hostScopeMap.get(n);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(n);if(r){var i=y(function(n,t,r){var i=[],u=function(n,t){for(var r=[];t;){var i=n.get(t);i&&r.push(i),t=t.parentElement}return r}(t,n);return r.forEach((function(n){return i.push(n)})),u.forEach((function(n){return i.push(n)})),function(n){return n.sort((function(n,t){return n.specificity===t.specificity?n.nu-t.nu:n.specificity-t.specificity})),n}(E(i).filter((function(t){return function(n,t){return":root"===t||"html"===t||n.matches(t)}(n,t.selector)})))}(n,this.hostScopeMap,this.globalScopes));r.textContent=m(t.template,i)}}},n.prototype.updateGlobal=function(){O(this.globalScopes)},n.prototype.registerHostTemplate=function(n,t,r){var i=this.scopesMap.get(t);return i||((i=k(n)).scopeId=t,i.isScoped=r,this.scopesMap.set(t,i)),i},n}();!function(n){!n||n.__cssshim||n.CSS&&n.CSS.supports&&n.CSS.supports("color","var(--c)")||(n.__cssshim=new P(n,n.document))}("undefined"!=typeof window&&window);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,p as o,w as s,a as t,d as n,N as r}from"./p-bd949790.js";const a="undefined"!=typeof Deno,p=!(a||"undefined"==typeof global||"function"!=typeof require||!global.process||"string"!=typeof __filename||global.origin&&"string"==typeof global.origin),c=(a&&Deno,p?process:a&&Deno,p?process:a&&Deno,()=>e&&e.supports&&e.supports("color","var(--c)")?t():__sc_import_peculiar("./p-0ad0b6e8.js").then(()=>(o.o=s.__cssshim)?(!1).i():0)),i=()=>{o.o=s.__cssshim;const e=Array.from(n.querySelectorAll("script")).find(e=>RegExp(`/${r}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===r),a=e["data-opts"]||{};return"onbeforeload"in e&&!history.scrollRestoration?{then(){}}:(a.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,s.location.href)).href,l(a.resourcesUrl,e),s.customElements?t(a):__sc_import_peculiar("./p-3d1015c2.js").then(()=>a))},l=(e,o)=>{const t="__sc_import_"+r.replace(/\s|-/g,"_");try{s[t]=Function("w","return import(w);//"+Math.random())}catch(a){const r=new Map;s[t]=a=>{const p=new URL(a,e).href;let c=r.get(p);if(!c){const e=n.createElement("script");e.type="module",e.crossOrigin=o.crossOrigin,e.src=URL.createObjectURL(new Blob([`import * as m from '${p}'; window.${t}.m = m;`],{type:"application/javascript"})),c=new Promise(o=>{e.onload=()=>{o(s[t].m),e.remove()}}),r.set(p,c),n.head.appendChild(e)}return c}}};export{c as a,i as p}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as r,H as s,g as i}from"./p-bd949790.js";import{l as e,a as o}from"./p-cf1841f8.js";const a=class{constructor(r){t(this,r),this.showIssuer=!0}renderRow(t,s,i){return r("tr",null,r("td",null,r("peculiar-typography",{color:"grey_5"},t,":")),r("td",null,r("peculiar-typography",{class:"meta_value",monospace:i},s)))}render(){return r(s,null,r("table",null,r("tbody",null,this.renderRow(e.getString("subjectName"),this.certificate.subjectToString()),this.showIssuer&&this.renderRow(e.getString("issuerName"),this.certificate.issuerToString()),this.renderRow(e.getString("serialNumber"),this.certificate.serialNumber,!0),this.renderRow(e.getString("version"),this.certificate.version),this.renderRow(e.getString("validity"),this.certificate.validity),this.renderRow(e.getString("issued"),o(this.certificate.notBefore)),this.renderRow(e.getString("expired"),o(this.certificate.notAfter)))))}};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: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 h=class{constructor(r){t(this,r),this.size=24,this.width=4,this.box=50}render(){return r(s,null,r("div",{class:"circle_progress",style:{width:this.size+"px",height:this.size+"px"}},r("svg",{class:"circle_progress_svg",viewBox:`0 0 ${this.box} ${this.box}`},r("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"}}),r("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"}}))))}};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: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 l=class{constructor(r){t(this,r),this.tag="mark"}componentDidLoad(){this.handleHighlightSearch()}componentDidUpdate(){this.handleHighlightSearch()}handleHighlightSearch(){const t=this.resetHighlightSearch(this.host.innerHTML);let r=t;if(this.search){const s=new RegExp(`(${this.search})`,"gi");r=t.replace(s,`<${this.tag}>$1</${this.tag}>`)}this.host.innerHTML=r}resetHighlightSearch(t){const r=new RegExp(`</?${this.tag}>`,"g");return t.replace(r,"")}render(){return r(s,null,r("slot",null))}get host(){return i(this)}};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: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_certificate_summary,h as peculiar_circular_progress,l as peculiar_highlight_words}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function n(e){try{s(o.next(e))}catch(t){i(t)}}function l(e){try{s(o["throw"](e))}catch(t){i(t)}}function s(e){e.done?r(e.value):a(e.value).then(n,l)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(e){return function(t){return s([e,t])}}function s(n){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,a&&(i=n[0]&2?a["return"]:n[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,n[1])).done)return i;if(a=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;a=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){r.label=n[1];break}if(n[0]===6&&r.label<i[1]){r.label=i[1];i=n;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(n);break}if(i[2])r.ops.pop();r.trys.pop();continue}n=t.call(e,r)}catch(l){n=[6,l];a=0}finally{o=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9f815f76.system.js","./p-bd1f9066.system.js","./p-94f96303.system.js"],(function(e){"use strict";var t,r,o,a,i,n,l,s;return{setters:[function(e){t=e.r;r=e.c;o=e.h;a=e.H},function(e){i=e.l},function(e){n=e.av;l=e.aq;s=e.O}],execute:function(){var c=':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::-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::-webkit-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}}';var d=e("peculiar_certificates_viewer",function(){function e(e){var o=this;t(this,e);this.detailsOpen=r(this,"detailsOpen",7);this.detailsClose=r(this,"detailsClose",7);this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.search="";this.certificatesDecoded=[];this.isDecodeInProcess=true;this.isHasTests=false;this.isHasRoots=false;this.handleClickDetails=function(e,t){t.stopPropagation();o.certificateSelectedForDetails=e;o.detailsOpen.emit(e)};this.handleModalClose=function(){o.certificateSelectedForDetails=undefined;o.detailsClose.emit()};this.handleSearch=function(e){o.search=e.target.value.trim()}}e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet()};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,a,i,l,s;return __generator(this,(function(c){switch(c.label){case 0:e=false;t=false;if(!Array.isArray(this.certificates)){return[2]}r=[];o=0,a=this.certificates;c.label=1;case 1:if(!(o<a.length))return[3,6];i=a[o];c.label=2;case 2:c.trys.push([2,4,,5]);l=new n(i.value);return[4,l.getThumbprint("SHA-1")];case 3:c.sent();r.push({body:l,tests:i.tests,name:i.name});if(!t&&l.isRoot){t=true}if(!e){if(i.tests&&(i.tests.expired||i.tests.revoked||i.tests.valid)){e=true}}return[3,5];case 4:s=c.sent();console.error("Error certificate parse:",s);return[3,5];case 5:o++;return[3,1];case 6:this.isHasTests=e;this.isHasRoots=t;this.isDecodeInProcess=false;this.certificatesDecoded=r;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e,t){t.stopPropagation();l.certificate.asPEM(e.body.exportAsPemFormatted(),e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e,t){t.stopPropagation();l.certificate.asPEM(e.body.exportAsHexFormatted(),e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=4;if(this.isHasTests){e+=1}if(!this.isHasRoots){e+=1}return e};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue();return o("tr",{class:"expanded_summary"},o("td",{colSpan:t},o("peculiar-certificate-summary",{certificate:e,showIssuer:!e.isRoot})))};e.prototype.renderCertificateTests=function(e){if(!e){return null}var t=[];if(e.valid){t.push(o("peculiar-button",{class:"button_table_action",href:e.valid,target:"_blank"},i.getString("valid")))}if(e.revoked){t.push(o("peculiar-button",{class:"button_table_action",href:e.revoked,target:"_blank"},i.getString("revoked")))}if(e.expired){t.push(o("peculiar-button",{class:"button_table_action",href:e.expired,target:"_blank"},i.getString("expired")))}return t};e.prototype.renderContentState=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,n){var l=n===e.expandedRow;var c=s[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var d=[c,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(d.indexOf(e.search.toLowerCase())===-1){return}}r.push([o("tr",{class:{expanded:l},onClick:e.handleClickRow.bind(e,n),key:n},!e.isHasRoots&&o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("issuer"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("name"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("publicKey"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},c))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("fingerprint")," (SHA-1):"),o("peculiar-typography",{class:"content",monospace:true},o("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("actions"),":"),o("span",{class:"content"},o("peculiar-button",{onClick:e.handleClickDetails.bind(e,a.body),class:"button_table_action"},i.getString("details")),o("peculiar-button-split",{onClick:e.handleClickDownloadAsPem.bind(e,a),actions:[{text:i.getString("download.der"),onClick:e.handleClickDownloadAsDer.bind(e,a)}],class:"button_table_action"},i.getString("download.pem")))),e.isHasTests&&o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("testURLs"),":"),o("span",{class:"content"},e.renderCertificateTests(a.tests)))),l&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return o("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},o("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),o("div",{class:"modal_container",role:"dialog",part:"presentation_container"},o("header",{class:"modal_title"},o("peculiar-typography",{type:"h4"},i.getString("certificateDetails")),o("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},o("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},o("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"})))),o("div",{class:"modal_content"},o("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return o("div",{class:"search_section"},o("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return o("div",{class:"loading_container"},o("peculiar-circular-progress",null))};e.prototype.renderBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderContentState();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return o(a,null,this.renderSearch(),o("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},o("thead",null,o("tr",null,!this.isHasRoots&&o("th",{class:"col_issuer"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("issuer"))),o("th",{class:"col_name"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("name"))),o("th",{class:"col_public_key"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("publicKey"))),o("th",{class:"col_fingerprint"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("fingerprint")," (SHA-1)")),o("th",{class:"col_actions"},o("peculiar-typography",{type:"h7",align:"center"},i.getString("actions"))),this.isHasTests&&o("th",{class:"col_tests"},o("peculiar-typography",{type:"h7",align:"center"},i.getString("testURLs"))))),o("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}());d.style=c}}}));
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*
|
|
8
|
-
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
|
9
|
-
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
|
10
|
-
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
|
11
|
-
*/
|
|
12
|
-
const s=/(-shadowcsshost)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))?([^,{]*)/gim,t=/(-shadowcsscontext)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))?([^,{]*)/gim,o=/(-shadowcssslotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))?([^,{]*)/gim,n=/-shadowcsshost-no-combinator([^\s]*)/,e=[/::shadow/g,/::content/g],c=/-shadowcsshost/gim,r=/:host/gim,h=/::slotted/gim,a=/:host-context/gim,d=/\/\*\s*[\s\S]*?\*\//g,l=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,i=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,g=/([{}])/g,u=(s,t)=>{const o=m(s);let n=0;return o.escapedString.replace(i,(...s)=>{const e=s[2];let c="",r=s[4],h="";r&&r.startsWith("{%BLOCK%")&&(c=o.blocks[n++],r=r.substring(8),h="{");const a=t({selector:e,content:c});return`${s[1]}${a.selector}${s[3]}${h}${a.content}${r}`})},m=s=>{const t=s.split(g),o=[],n=[];let e=0,c=[];for(let r=0;r<t.length;r++){const s=t[r];"}"===s&&e--,e>0?c.push(s):(c.length>0&&(n.push(c.join("")),o.push("%BLOCK%"),c=[]),o.push(s)),"{"===s&&e++}return c.length>0&&(n.push(c.join("")),o.push("%BLOCK%")),{escapedString:o.join(""),blocks:n}},w=(s,t,o)=>s.replace(t,(...s)=>{if(s[2]){const t=s[2].split(","),n=[];for(let e=0;e<t.length;e++){const c=t[e].trim();if(!c)break;n.push(o("-shadowcsshost-no-combinator",c,s[3]))}return n.join(",")}return"-shadowcsshost-no-combinator"+s[3]}),p=(s,t,o)=>s+t.replace("-shadowcsshost","")+o,$=(s,t,o)=>t.indexOf("-shadowcsshost")>-1?p(s,t,o):s+t+o+", "+t+" "+s+o,_=(s,t,o,e)=>u(s,s=>{let r=s.selector,h=s.content;return"@"!==s.selector[0]?r=((s,t,o,e)=>s.split(",").map(s=>e&&s.indexOf("."+e)>-1?s.trim():((s,t)=>!(s=>(s=s.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),RegExp("^("+s+")([>\\s~+[.,{:][\\s\\S]*)?$","m")))(t).test(s))(s,t)?((s,t,o)=>{const e="."+(t=t.replace(/\[is=([^\]]*)\]/g,(s,...t)=>t[0])),r=s=>{let r=s.trim();if(!r)return"";if(s.indexOf("-shadowcsshost-no-combinator")>-1)r=((s,t,o)=>{if(c.lastIndex=0,c.test(s)){const t="."+o;return s.replace(n,(s,o)=>o.replace(/([^:]*)(:*)(.*)/,(s,o,n,e)=>o+t+n+e)).replace(c,t+" ")}return t+" "+s})(s,t,o);else{const t=s.replace(c,"");if(t.length>0){const s=t.match(/([^:]*)(:*)(.*)/);s&&(r=s[1]+e+s[2]+s[3])}}return r},h=(s=>{const t=[];let o,n=0;return o=(s=s.replace(/(\[[^\]]*\])/g,(s,o)=>{const e=`__ph-${n}__`;return t.push(o),n++,e})).replace(/(:nth-[-\w]+)(\([^)]+\))/g,(s,o,e)=>{const c=`__ph-${n}__`;return t.push(e),n++,o+c}),{content:o,placeholders:t}})(s);let a,d="",l=0;const i=/( |>|\+|~(?!=))\s*/g;let g=!((s=h.content).indexOf("-shadowcsshost-no-combinator")>-1);for(;null!==(a=i.exec(s));){const t=a[1],o=s.slice(l,a.index).trim();g=g||o.indexOf("-shadowcsshost-no-combinator")>-1,d+=`${g?r(o):o} ${t} `,l=i.lastIndex}const u=s.substring(l);return g=g||u.indexOf("-shadowcsshost-no-combinator")>-1,d+=g?r(u):u,((s,t)=>t.replace(/__ph-(\d+)__/g,(t,o)=>s[+o]))(h.placeholders,d)})(s,t,o).trim():s.trim()).join(", "))(s.selector,t,o,e):(s.selector.startsWith("@media")||s.selector.startsWith("@supports")||s.selector.startsWith("@page")||s.selector.startsWith("@document"))&&(h=_(s.content,t,o,e)),{selector:r.replace(/\s{2,}/g," ").trim(),content:h}}),f=(n,c,i)=>{const g=c+"-h",m=c+"-s",f=(s=>s.match(l)||[])(n);n=(s=>s.replace(d,""))(n);const b=[];if(i){const s=s=>{const t=`/*!@___${b.length}___*/`;return b.push({placeholder:t,comment:`/*!@${s.selector}*/`}),s.selector=t+s.selector,s};n=u(n,t=>"@"!==t.selector[0]?s(t):t.selector.startsWith("@media")||t.selector.startsWith("@supports")||t.selector.startsWith("@page")||t.selector.startsWith("@document")?(t.content=u(t.content,s),t):t)}const x=((n,c,d,l)=>{const i=((s,t)=>{const n="."+t+" > ",e=[];return s=s.replace(o,(...s)=>{if(s[2]){const t=s[2].trim(),o=n+t+s[3];let c="";for(let n=s[4]-1;n>=0;n--){const t=s[5][n];if("}"===t||","===t)break;c=t+c}const r=c+o,h=`${c.trimRight()}${o.trim()}`;return r.trim()!==h.trim()&&e.push({orgSelector:r,updatedSelector:`${h}, ${r}`}),o}return"-shadowcsshost-no-combinator"+s[3]}),{selectors:e,cssText:s}})(n=(s=>w(s,t,$))(n=(t=>w(t,s,p))(n=(s=>s.replace(a,"-shadowcsscontext").replace(r,"-shadowcsshost").replace(h,"-shadowcssslotted"))(n))),l);return n=(s=>e.reduce((s,t)=>s.replace(t," "),s))(n=i.cssText),c&&(n=_(n,c,d,l)),{cssText:(n=(n=n.replace(/-shadowcsshost-no-combinator/g,"."+d)).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),slottedSelectors:i.selectors}})(n,c,g,m);return n=[x.cssText,...f].join("\n"),i&&b.forEach(({placeholder:s,comment:t})=>{n=n.replace(s,t)}),x.slottedSelectors.forEach(s=>{n=n.replace(s.orgSelector,s.updatedSelector)}),n};export{f as scopeCss}
|