diff --git a/dist/constants/oids-dictionary.d.ts b/dist/constants/oids-dictionary.d.ts index cedee7d..d0305b6 100644 --- a/dist/constants/oids-dictionary.d.ts +++ b/dist/constants/oids-dictionary.d.ts @@ -2,6 +2,10 @@ export declare const OIDS_DICTIONARY: { '1.2.643.2.2.34.6': string; '1.2.643.2.39.1.1': string; '1.2.643.3.131.1.1': string; + '1.2.643.100.4': string; + '1.2.643.100.1': string; + '1.2.643.100.5': string; + '1.2.643.100.3': string; '1.2.643.3.141.1.1': string; '1.2.643.3.141.1.2': string; '1.2.643.3.2.100.65.13.11': string; diff --git a/dist/crypto-pro-js.d.ts b/dist/crypto-pro-js.d.ts index c9989aa..4d07a3d 100644 --- a/dist/crypto-pro-js.d.ts +++ b/dist/crypto-pro-js.d.ts @@ -1,4 +1,4 @@ -// Type definitions for crypto-pro-js 2.3.2 +// Type definitions for crypto-pro-js 2.3.3 // Project: crypto-pro-js // Definitions by: Artem Vasilev https://github.com/kernusr diff --git a/dist/crypto-pro-js.js b/dist/crypto-pro-js.js index 4e4e380..b2b382a 100644 --- a/dist/crypto-pro-js.js +++ b/dist/crypto-pro-js.js @@ -2249,6 +2249,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.addAttachedSignature = void 0; var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -2379,6 +2380,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.addDetachedSignature = void 0; var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -2477,6 +2479,7 @@ exports.addDetachedSignature = _afterPluginsLoaded_1._afterPluginsLoaded(functio "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Certificate = void 0; var constants_1 = __webpack_require__(/*! ../../constants */ "./constants/index.ts"); var exportBase64_1 = __webpack_require__(/*! ./exportBase64 */ "./api/certificate/exportBase64.ts"); var getAlgorithm_1 = __webpack_require__(/*! ./getAlgorithm */ "./api/certificate/getAlgorithm.ts"); @@ -2540,6 +2543,7 @@ exports.Certificate = Certificate; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportBase64 = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2576,6 +2580,7 @@ exports.exportBase64 = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAlgorithm = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2619,6 +2624,7 @@ exports.getAlgorithm = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCadesProp = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2703,6 +2709,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDecodedExtendedKeyUsage = void 0; var constants_1 = __webpack_require__(/*! ../../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); /** @@ -2740,6 +2747,7 @@ exports.getDecodedExtendedKeyUsage = _afterPluginsLoaded_1._afterPluginsLoaded(f "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getExtendedKeyUsage = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2826,6 +2834,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getInfo = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _parseCertInfo_1 = __webpack_require__(/*! ../../helpers/_parseCertInfo */ "./helpers/_parseCertInfo.ts"); @@ -2907,6 +2916,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasExtendedKeyUsage = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); /** * Проверяет наличие ОИД'а (ОИД'ов) у сертификата @@ -2946,11 +2956,18 @@ exports.hasExtendedKeyUsage = _afterPluginsLoaded_1._afterPluginsLoaded(function "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate.ts")); +__exportStar(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate.ts"), exports); /***/ }), @@ -2965,6 +2982,7 @@ __export(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValid = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3038,6 +3056,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createAttachedSignature = void 0; var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -3167,6 +3186,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDetachedSignature = void 0; var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -3298,6 +3318,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createHash = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3396,6 +3417,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createXMLSignature = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3505,6 +3527,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllCertificates = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var getAllUserCertificates_1 = __webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts"); var getAllContainerCertificates_1 = __webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts"); @@ -3585,6 +3608,7 @@ exports.getAllCertificates = _afterPluginsLoaded_1._afterPluginsLoaded(function "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllContainerCertificates = void 0; var certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractCommonName_1 = __webpack_require__(/*! ../helpers/_extractCommonName */ "./helpers/_extractCommonName.ts"); @@ -3665,6 +3689,7 @@ exports.getAllContainerCertificates = _afterPluginsLoaded_1._afterPluginsLoaded( "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllUserCertificates = void 0; var certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractCommonName_1 = __webpack_require__(/*! ../helpers/_extractCommonName */ "./helpers/_extractCommonName.ts"); @@ -3780,6 +3805,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCertificate = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var getCertificates_1 = __webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts"); var getAllCertificates_1 = __webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts"); @@ -3869,6 +3895,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCertificates = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var getUserCertificates_1 = __webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts"); var getContainerCertificates_1 = __webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts"); @@ -3949,6 +3976,7 @@ exports.getCertificates = _afterPluginsLoaded_1._afterPluginsLoaded(function (re "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getContainerCertificates = void 0; var certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); @@ -4041,6 +4069,7 @@ exports.getContainerCertificates = _afterPluginsLoaded_1._afterPluginsLoaded(fun "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCspVersion = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -4079,6 +4108,7 @@ exports.getCspVersion = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPluginVersion = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -4120,6 +4150,7 @@ exports.getPluginVersion = _afterPluginsLoaded_1._afterPluginsLoaded(function () "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSystemInfo = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -4166,6 +4197,7 @@ exports.getSystemInfo = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUserCertificates = void 0; var certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); @@ -4256,28 +4288,35 @@ exports.getUserCertificates = _afterPluginsLoaded_1._afterPluginsLoaded(function "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./getCertificate */ "./api/getCertificate.ts")); -__export(__webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts")); -__export(__webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts")); -__export(__webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts")); -__export(__webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts")); -__export(__webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts")); -__export(__webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts")); -__export(__webpack_require__(/*! ./getSystemInfo */ "./api/getSystemInfo.ts")); -__export(__webpack_require__(/*! ./isValidSystemSetup */ "./api/isValidSystemSetup.ts")); -__export(__webpack_require__(/*! ./createXMLSignature */ "./api/createXMLSignature.ts")); -__export(__webpack_require__(/*! ./createDetachedSignature */ "./api/createDetachedSignature.ts")); -__export(__webpack_require__(/*! ./addDetachedSignature */ "./api/addDetachedSignature.ts")); -__export(__webpack_require__(/*! ./createAttachedSignature */ "./api/createAttachedSignature.ts")); -__export(__webpack_require__(/*! ./addAttachedSignature */ "./api/addAttachedSignature.ts")); -__export(__webpack_require__(/*! ./createHash */ "./api/createHash.ts")); -__export(__webpack_require__(/*! ./certificate */ "./api/certificate/index.ts")); -__export(__webpack_require__(/*! ./getCspVersion */ "./api/getCspVersion.ts")); -__export(__webpack_require__(/*! ./getPluginVersion */ "./api/getPluginVersion.ts")); +__exportStar(__webpack_require__(/*! ./getCertificate */ "./api/getCertificate.ts"), exports); +__exportStar(__webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getSystemInfo */ "./api/getSystemInfo.ts"), exports); +__exportStar(__webpack_require__(/*! ./isValidSystemSetup */ "./api/isValidSystemSetup.ts"), exports); +__exportStar(__webpack_require__(/*! ./createXMLSignature */ "./api/createXMLSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createDetachedSignature */ "./api/createDetachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./addDetachedSignature */ "./api/addDetachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createAttachedSignature */ "./api/createAttachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./addAttachedSignature */ "./api/addAttachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createHash */ "./api/createHash.ts"), exports); +__exportStar(__webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"), exports); +__exportStar(__webpack_require__(/*! ./getCspVersion */ "./api/getCspVersion.ts"), exports); +__exportStar(__webpack_require__(/*! ./getPluginVersion */ "./api/getPluginVersion.ts"), exports); /***/ }), @@ -4328,6 +4367,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValidSystemSetup = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _isSupportedCadesVersion_1 = __webpack_require__(/*! ../helpers/_isSupportedCadesVersion */ "./helpers/_isSupportedCadesVersion.ts"); @@ -4377,6 +4417,7 @@ exports.isValidSystemSetup = _afterPluginsLoaded_1._afterPluginsLoaded(function "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.XmlDsigGost3411UrlObsolete = exports.XmlDsigGost3411Url = exports.XmlDsigGost3410UrlObsolete = exports.XmlDsigGost3410Url = exports.TRUST_REVOCATION_STATUS_UNKNOWN = exports.TRUST_IS_UNTRUSTED_ROOT = exports.TRUST_IS_REVOKED = exports.TRUST_IS_PARTIAL_CHAIN = exports.TRUST_IS_NOT_VALID_FOR_USAGE = exports.TRUST_IS_NOT_TIME_VALID = exports.TRUST_IS_NOT_TIME_NESTED = exports.TRUST_IS_NOT_SIGNATURE_VALID = exports.TRUST_IS_CYCLIC = exports.TRUST_CTL_IS_NOT_VALID_FOR_USAGE = exports.TRUST_CTL_IS_NOT_TIME_VALID = exports.TRUST_CTL_IS_NOT_SIGNATURE_VALID = exports.LOG_LEVEL_INFO = exports.LOG_LEVEL_ERROR = exports.LOG_LEVEL_DEBUG = exports.CHECK_TRUSTED_ROOT = exports.CHECK_TIME_VALIDITY = exports.CHECK_SIGNATURE_VALIDITY = exports.CHECK_ONLINE_REVOCATION_STATUS = exports.CHECK_OFFLINE_REVOCATION_STATUS = exports.CHECK_NONE = exports.CAPICOM_STORE_OPEN_READ_WRITE = exports.CAPICOM_STORE_OPEN_READ_ONLY = exports.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = exports.CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = exports.CAPICOM_STORE_OPEN_EXISTING_ONLY = exports.CAPICOM_SMART_CARD_USER_STORE = exports.CAPICOM_PROPID_UNKNOWN = exports.CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = exports.CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = exports.CAPICOM_PROPID_SMART_CARD_DATA = exports.CAPICOM_PROPID_SIGNATURE_HASH = exports.CAPICOM_PROPID_SHA1_HASH = exports.CAPICOM_PROPID_RENEWAL = exports.CAPICOM_PROPID_PVK_FILE = exports.CAPICOM_PROPID_PUBKEY_HASH_RESERVED = exports.CAPICOM_PROPID_PUBKEY_ALG_PARA = exports.CAPICOM_PROPID_NEXT_UPDATE_LOCATION = exports.CAPICOM_PROPID_MD5_HASH = exports.CAPICOM_PROPID_LAST_USER = exports.CAPICOM_PROPID_LAST_RESERVED = exports.CAPICOM_PROPID_KEY_SPEC = exports.CAPICOM_PROPID_KEY_PROV_INFO = exports.CAPICOM_PROPID_KEY_PROV_HANDLE = exports.CAPICOM_PROPID_KEY_IDENTIFIER = exports.CAPICOM_PROPID_KEY_CONTEXT = exports.CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = exports.CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = exports.CAPICOM_PROPID_IE30_RESERVED = exports.CAPICOM_PROPID_HASH_PROP = exports.CAPICOM_PROPID_FRIENDLY_NAME = exports.CAPICOM_PROPID_FORTEZZA_DATA = exports.CAPICOM_PROPID_FIRST_USER = exports.CAPICOM_PROPID_FIRST_RESERVED = exports.CAPICOM_PROPID_EXTENDED_ERROR_INFO = exports.CAPICOM_PROPID_ENROLLMENT = exports.CAPICOM_PROPID_ENHKEY_USAGE = exports.CAPICOM_PROPID_EFS = exports.CAPICOM_PROPID_DESCRIPTION = exports.CAPICOM_PROPID_DATE_STAMP = exports.CAPICOM_PROPID_CTL_USAGE = exports.CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = exports.CAPICOM_PROPID_AUTO_ENROLL = exports.CAPICOM_PROPID_ARCHIVED_KEY_HASH = exports.CAPICOM_PROPID_ARCHIVED = exports.CAPICOM_PROPID_ACCESS_STATE = exports.CAPICOM_OID_OTHER = exports.CAPICOM_OID_KEY_USAGE_EXTENSION = exports.CAPICOM_MY_STORE = exports.CAPICOM_MEMORY_STORE = exports.CAPICOM_LOCAL_MACHINE_STORE = exports.CAPICOM_EKU_SMARTCARD_LOGON = exports.CAPICOM_EKU_OTHER = exports.CAPICOM_EKU_CLIENT_AUTH = exports.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = exports.CAPICOM_CURRENT_USER_STORE = exports.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = exports.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = exports.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = exports.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = exports.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = exports.CAPICOM_CERTIFICATE_FIND_TIME_VALID = exports.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = exports.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = exports.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = exports.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = exports.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = exports.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = exports.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = exports.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = exports.CAPICOM_CERTIFICATE_FIND_EXTENSION = exports.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = exports.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = exports.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = exports.CAPICOM_ACTIVE_DIRECTORY_USER_STORE = exports.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = exports.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = exports.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = exports.CADESCOM_SkipInstallToStore = exports.CADESCOM_STRING_TO_UCS2LE = exports.CADESCOM_PKCS7_TYPE = exports.CADESCOM_LOCAL_MACHINE_STORE = exports.CADESCOM_HASH_ALGORITHM_SHA_512 = exports.CADESCOM_HASH_ALGORITHM_SHA_384 = exports.CADESCOM_HASH_ALGORITHM_SHA_256 = exports.CADESCOM_HASH_ALGORITHM_SHA1 = exports.CADESCOM_HASH_ALGORITHM_MD5 = exports.CADESCOM_HASH_ALGORITHM_MD4 = exports.CADESCOM_HASH_ALGORITHM_MD2 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = exports.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = exports.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = exports.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = exports.CADESCOM_ENCRYPTION_ALGORITHM_DES = exports.CADESCOM_ENCRYPTION_ALGORITHM_AES = exports.CADESCOM_ENCRYPTION_ALGORITHM_3DES = exports.CADESCOM_ENCODE_BINARY = exports.CADESCOM_ENCODE_BASE64 = exports.CADESCOM_ENCODE_ANY = exports.CADESCOM_DISPLAY_DATA_NONE = exports.CADESCOM_DISPLAY_DATA_CONTENT = exports.CADESCOM_DISPLAY_DATA_ATTRIBUTE = exports.CADESCOM_CURRENT_USER_STORE = exports.CADESCOM_CONTAINER_STORE = exports.CADESCOM_CADES_X_LONG_TYPE_1 = exports.CADESCOM_CADES_T = exports.CADESCOM_CADES_DEFAULT = exports.CADESCOM_CADES_BES = exports.CADESCOM_BASE64_TO_BINARY = exports.CADESCOM_AllowUntrustedRoot = exports.CADESCOM_AllowUntrustedCertificate = exports.CADESCOM_AllowNone = exports.CADESCOM_AllowNoOutstandingRequest = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = exports.CADESCOM_ATTRIBUTE_OTHER = void 0; exports.CADESCOM_ATTRIBUTE_OTHER = -1; exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2; exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1; @@ -4539,14 +4580,21 @@ exports.XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gos "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./cades-constants */ "./constants/cades-constants.ts")); -__export(__webpack_require__(/*! ./issuer-tags-translations */ "./constants/issuer-tags-translations.ts")); -__export(__webpack_require__(/*! ./oids-dictionary */ "./constants/oids-dictionary.ts")); -__export(__webpack_require__(/*! ./subject-tags-translations */ "./constants/subject-tags-translations.ts")); +__exportStar(__webpack_require__(/*! ./cades-constants */ "./constants/cades-constants.ts"), exports); +__exportStar(__webpack_require__(/*! ./issuer-tags-translations */ "./constants/issuer-tags-translations.ts"), exports); +__exportStar(__webpack_require__(/*! ./oids-dictionary */ "./constants/oids-dictionary.ts"), exports); +__exportStar(__webpack_require__(/*! ./subject-tags-translations */ "./constants/subject-tags-translations.ts"), exports); /***/ }), @@ -4561,21 +4609,23 @@ __export(__webpack_require__(/*! ./subject-tags-translations */ "./constants/sub "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.ISSUER_TAGS_TRANSLATIONS = void 0; exports.ISSUER_TAGS_TRANSLATIONS = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Удостоверяющий центр' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Тип' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; @@ -4591,10 +4641,15 @@ exports.ISSUER_TAGS_TRANSLATIONS = [ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.OIDS_DICTIONARY = void 0; exports.OIDS_DICTIONARY = { '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации', '1.2.643.2.39.1.1': 'Использование в программных продуктах системы "1С:Предприятие 8"', '1.2.643.3.131.1.1': 'ИНН', + '1.2.643.100.4': 'ИНН организации', + '1.2.643.100.1': 'ОГРН', + '1.2.643.100.5': 'ОГРНИП', + '1.2.643.100.3': 'СНИЛС', '1.2.643.3.141.1.1': 'РНС ФСС', '1.2.643.3.141.1.2': 'КП ФСС', '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС "Госзакупки" Сахалинской области.', @@ -4649,23 +4704,25 @@ exports.OIDS_DICTIONARY = { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.SUBJECT_TAGS_TRANSLATIONS = void 0; exports.SUBJECT_TAGS_TRANSLATIONS = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Владелец' }, - { possibleNames: ['SN'], translation: 'Фамилия' }, - { possibleNames: ['G'], translation: 'Имя Отчество' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Отдел/подразделение' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Владелец' }, + { possibleNames: ['SN', 'surname'], translation: 'Фамилия' }, + { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; @@ -4680,11 +4737,18 @@ exports.SUBJECT_TAGS_TRANSLATIONS = [ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./api */ "./api/index.ts")); +__exportStar(__webpack_require__(/*! ./api */ "./api/index.ts"), exports); /***/ }), @@ -4735,6 +4799,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports._afterPluginsLoaded = void 0; var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var isSetLogLevel = false; var isPluginLoaded = false; @@ -4803,6 +4868,7 @@ exports._afterPluginsLoaded = function (fn) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._extractCommonName = void 0; exports._extractCommonName = function (subjectName) { var _a, _b; return (_b = (_a = subjectName.match(/CN="?(.+?)"?(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); }; @@ -4818,6 +4884,7 @@ exports._extractCommonName = function (subjectName) { var _a, _b; return (_b = ( "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._extractMeaningfulErrorMessage = void 0; exports._extractMeaningfulErrorMessage = function (error) { var _a; var errorContainer = ((_a = window.cadesplugin) === null || _a === void 0 ? void 0 : _a.getLastError) && window.cadesplugin.getLastError(error); @@ -4848,6 +4915,7 @@ exports._extractMeaningfulErrorMessage = function (error) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._generateCadesFn = exports.__createCadesPluginObject__ = exports.__cadesAsyncToken__ = void 0; // синтетические переменные, которые подменяются в рантайме exports.__cadesAsyncToken__ = {}; exports.__createCadesPluginObject__ = function () { @@ -4929,6 +4997,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) { } }; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesCert = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _getCadesUserCert_1 = __webpack_require__(/*! ./_getCadesUserCert */ "./helpers/_getCadesUserCert.ts"); var _getCadesContainerCert_1 = __webpack_require__(/*! ./_getCadesContainerCert */ "./helpers/_getCadesContainerCert.ts"); @@ -4973,6 +5042,7 @@ exports._getCadesCert = _afterPluginsLoaded_1._afterPluginsLoaded(function (thum "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesContainerCert = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ./_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -5050,6 +5120,7 @@ exports._getCadesContainerCert = _afterPluginsLoaded_1._afterPluginsLoaded(funct "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesUserCert = void 0; var _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); var _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); var _generateCadesFn_1 = __webpack_require__(/*! ./_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -5126,6 +5197,7 @@ exports._getCadesUserCert = _afterPluginsLoaded_1._afterPluginsLoaded(function ( "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getDateObj = void 0; /** * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера. * @@ -5147,6 +5219,7 @@ exports._getDateObj = function (dateObj) { return (dateObj.getVarDate ? dateObj. "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._isSupportedCSPVersion = void 0; var oldestSupportedCSPVersion = 4.0; exports._isSupportedCSPVersion = function (version) { var _a; @@ -5167,6 +5240,7 @@ exports._isSupportedCSPVersion = function (version) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._isSupportedCadesVersion = void 0; exports._isSupportedCadesVersion = function (version) { var match = version.match(/(\d+)\.(\d+)\.(\d+)/); if (!match) { @@ -5195,6 +5269,7 @@ exports._isSupportedCadesVersion = function (version) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._parseCertInfo = void 0; var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); /** * Парсит информацию из строки с информацией о сертификате diff --git a/dist/crypto-pro-js.js.map b/dist/crypto-pro-js.js.map index 5fb6987..dd6dd10 100644 --- a/dist/crypto-pro-js.js.map +++ b/dist/crypto-pro-js.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFY;;AAEZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,iDAAS;AAC/B,cAAc,mBAAO,CAAC,qEAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;AC5vDA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA;AACA,QAAQ,WAAW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,UAAC,GAAG,IAAK,UAAG,CAAC,aAAa,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,WAAI,KAAK,KAAK,EAAd,CAAc,CAAC,EAAhD,CAAgD,CAAC,0CACnG,WAAW,CAAC;YAEhB,IAAI,cAAc,EAAE;gBAClB,KAAK,GAAG,cAAc,CAAC;gBACvB,YAAY,GAAG,IAAI,CAAC;aACrB;YAED,OAAO,EAAE,WAAW,eAAE,KAAK,SAAE,YAAY,gBAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAC;;;;;;;;;;;;AClDF,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB,WAAW,UAAU,YAAY,aAAa;AACrG,+EAA+E,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAC1M,oEAAoE,iBAAiB,yBAAyB,WAAW;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,CAAC","file":"crypto-pro-js.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./crypto-pro-js.ts\");\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","export * from './certificate';\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Тип' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Владелец' },\n { possibleNames: ['SN'], translation: 'Фамилия' },\n { possibleNames: ['G'], translation: 'Имя Отчество' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","export * from './api';\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFY;;AAEZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,iDAAS;AAC/B,cAAc,mBAAO,CAAC,qEAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA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cAAc,SAAG,gBAAgB,CAAC,IAAI,CAAC,UAAC,GAAG,IAAK,UAAG,CAAC,aAAa,CAAC,IAAI,CAAC,UAAC,IAAI,IAAK,WAAI,KAAK,KAAK,EAAd,CAAc,CAAC,EAAhD,CAAgD,CAAC,0CACnG,WAAW,CAAC;YAEhB,IAAI,cAAc,EAAE;gBAClB,KAAK,GAAG,cAAc,CAAC;gBACvB,YAAY,GAAG,IAAI,CAAC;aACrB;YAED,OAAO,EAAE,WAAW,eAAE,KAAK,SAAE,YAAY,gBAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;KACJ;AACH,CAAC,CAAC;;;;;;;;;;;;AClDF,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB,WAAW,UAAU,YAAY,aAAa;AACrG,+EAA+E,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAC1M,oEAAoE,iBAAiB,yBAAyB,WAAW;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,CAAC","file":"crypto-pro-js.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./crypto-pro-js.ts\");\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","export * from './certificate';\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.100.4': 'ИНН организации',\n '1.2.643.100.1': 'ОГРН',\n '1.2.643.100.5': 'ОГРНИП',\n '1.2.643.100.3': 'СНИЛС',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Владелец' },\n { possibleNames: ['SN', 'surname'], translation: 'Фамилия' },\n { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","export * from './api';\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/crypto-pro-js.min.js b/dist/crypto-pro-js.min.js index 7b1b11a..ac438af 100644 --- a/dist/crypto-pro-js.min.js +++ b/dist/crypto-pro-js.min.js @@ -1,11 +1,11 @@ -!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("cryptoPro",[],r):"object"==typeof exports?exports.cryptoPro=r():e.cryptoPro=r()}(window,(function(){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)t.d(n,a,function(r){return e[r]}.bind(null,a));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=17)}([function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(a,_){function s(e){try{i(n.next(e))}catch(e){_(e)}}function o(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var r;e.done?a(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},a=this&&this.__generator||function(e,r){var t,n,a,_,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function o(_){return function(o){return function(_){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,n=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r._afterPluginsLoaded=void 0;var a=t(1),s=!1,o=!1;r._afterPluginsLoaded=function(e){var r=Boolean(window.Promise);return function(){for(var i=[],c=0;c0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r._getCadesCert=void 0;var a=t(0),s=t(38),o=t(39);r._getCadesCert=a._afterPluginsLoaded((function(e){return n(void 0,void 0,void 0,(function(){var r,t;return _(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,4]),[4,s._getCadesUserCert(e)];case 1:return r=n.sent(),[3,4];case 2:return t=n.sent(),console.log(t),[4,o._getCadesContainerCert(e)];case 3:return r=n.sent(),[3,4];case 4:return[2,r]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._extractCommonName=void 0,r._extractCommonName=function(e){var r,t;return null===(t=null===(r=e.match(/CN="?(.+?)"?(?:,|$)/))||void 0===r?void 0:r[1])||void 0===t?void 0:t.replace(/"{2}/g,'"')}},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._getDateObj=void 0,r._getDateObj=function(e){return e.getVarDate?e.getVarDate():e}},function(e,r,t){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var n=t(44),a=t(45),_=t(46);function s(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,r){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function g(e,r){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return B(e).length;default:if(n)return G(e).length;r=(""+r).toLowerCase(),n=!0}}function p(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return v(this,r,t);case"utf8":case"utf-8":return b(this,r,t);case"ascii":return S(this,r,t);case"latin1":case"binary":return P(this,r,t);case"base64":return w(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function C(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function E(e,r,t,n,a){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=a?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(a)return-1;t=e.length-1}else if(t<0){if(!a)return-1;t=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:h(e,r,t,n,a);if("number"==typeof r)return r&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):h(e,[r],t,n,a);throw new TypeError("val must be string, number or Buffer")}function h(e,r,t,n,a){var _,s=1,o=e.length,i=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;s=2,o/=2,i/=2,t/=2}function c(e,r){return 1===s?e[r]:e.readUInt16BE(r*s)}if(a){var u=-1;for(_=t;_o&&(t=o-i),_=t;_>=0;_--){for(var l=!0,d=0;da&&(n=a):n=a;var _=r.length;if(_%2!=0)throw new TypeError("Invalid hex string");n>_/2&&(n=_/2);for(var s=0;s>8,a=t%256,_.push(a),_.push(n);return _}(r,e.length-t),e,t,n)}function w(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function b(e,r,t){t=Math.min(e.length,t);for(var n=[],a=r;a239?4:c>223?3:c>191?2:1;if(a+l<=t)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(_=e[a+1]))&&(i=(31&c)<<6|63&_)>127&&(u=i);break;case 3:_=e[a+1],s=e[a+2],128==(192&_)&&128==(192&s)&&(i=(15&c)<<12|(63&_)<<6|63&s)>2047&&(i<55296||i>57343)&&(u=i);break;case 4:_=e[a+1],s=e[a+2],o=e[a+3],128==(192&_)&&128==(192&s)&&128==(192&o)&&(i=(15&c)<<18|(63&_)<<12|(63&s)<<6|63&o)>65535&&i<1114112&&(u=i)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),a+=l}return function(e){var r=e.length;if(r<=4096)return String.fromCharCode.apply(String,e);var t="",n=0;for(;n0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,r,t,n,a){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===n&&(n=0),void 0===a&&(a=this.length),r<0||t>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=t)return 0;if(n>=a)return-1;if(r>=t)return 1;if(this===e)return 0;for(var _=(a>>>=0)-(n>>>=0),s=(t>>>=0)-(r>>>=0),o=Math.min(_,s),c=this.slice(n,a),u=e.slice(r,t),l=0;la)&&(t=a),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var _=!1;;)switch(n){case"hex":return A(this,e,r,t);case"utf8":case"utf-8":return O(this,e,r,t);case"ascii":return T(this,e,r,t);case"latin1":case"binary":return M(this,e,r,t);case"base64":return y(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r,t);default:if(_)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),_=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,r,t){var n="";t=Math.min(e.length,t);for(var a=r;an)&&(t=n);for(var a="",_=r;_t)throw new RangeError("Trying to access beyond buffer length")}function D(e,r,t,n,a,_){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>a||r<_)throw new RangeError('"value" argument is out of bounds');if(t+n>e.length)throw new RangeError("Index out of range")}function N(e,r,t,n){r<0&&(r=65535+r+1);for(var a=0,_=Math.min(e.length-t,2);a<_;++a)e[t+a]=(r&255<<8*(n?a:1-a))>>>8*(n?a:1-a)}function x(e,r,t,n){r<0&&(r=4294967295+r+1);for(var a=0,_=Math.min(e.length-t,4);a<_;++a)e[t+a]=r>>>8*(n?a:3-a)&255}function F(e,r,t,n,a,_){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function L(e,r,t,n,_){return _||F(e,0,t,4),a.write(e,r,t,n,23,4),t+4}function k(e,r,t,n,_){return _||F(e,0,t,8),a.write(e,r,t,n,52,8),t+8}i.prototype.slice=function(e,r){var t,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(a*=256);)n+=this[e+--r]*a;return n},i.prototype.readUInt8=function(e,r){return r||m(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,r){return r||m(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,r){return r||m(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,r){return r||m(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,r){return r||m(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,r,t){e|=0,r|=0,t||m(e,r,this.length);for(var n=this[e],a=1,_=0;++_=(a*=128)&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(e,r,t){e|=0,r|=0,t||m(e,r,this.length);for(var n=r,a=1,_=this[e+--n];n>0&&(a*=256);)_+=this[e+--n]*a;return _>=(a*=128)&&(_-=Math.pow(2,8*r)),_},i.prototype.readInt8=function(e,r){return r||m(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,r){r||m(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,r){r||m(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,r){return r||m(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,r){return r||m(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,r){return r||m(e,4,this.length),a.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,r){return r||m(e,4,this.length),a.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,r){return r||m(e,8,this.length),a.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,r){return r||m(e,8,this.length),a.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,r,t,n){(e=+e,r|=0,t|=0,n)||D(this,e,r,t,Math.pow(2,8*t)-1,0);var a=1,_=0;for(this[r]=255&e;++_=0&&(_*=256);)this[r+a]=e/_&255;return r+t},i.prototype.writeUInt8=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},i.prototype.writeUInt16LE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):N(this,e,r,!0),r+2},i.prototype.writeUInt16BE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):N(this,e,r,!1),r+2},i.prototype.writeUInt32LE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):x(this,e,r,!0),r+4},i.prototype.writeUInt32BE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):x(this,e,r,!1),r+4},i.prototype.writeIntLE=function(e,r,t,n){if(e=+e,r|=0,!n){var a=Math.pow(2,8*t-1);D(this,e,r,t,a-1,-a)}var _=0,s=1,o=0;for(this[r]=255&e;++_>0)-o&255;return r+t},i.prototype.writeIntBE=function(e,r,t,n){if(e=+e,r|=0,!n){var a=Math.pow(2,8*t-1);D(this,e,r,t,a-1,-a)}var _=t-1,s=1,o=0;for(this[r+_]=255&e;--_>=0&&(s*=256);)e<0&&0===o&&0!==this[r+_+1]&&(o=1),this[r+_]=(e/s>>0)-o&255;return r+t},i.prototype.writeInt8=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},i.prototype.writeInt16LE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):N(this,e,r,!0),r+2},i.prototype.writeInt16BE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):N(this,e,r,!1),r+2},i.prototype.writeInt32LE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):x(this,e,r,!0),r+4},i.prototype.writeInt32BE=function(e,r,t){return e=+e,r|=0,t||D(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):x(this,e,r,!1),r+4},i.prototype.writeFloatLE=function(e,r,t){return L(this,e,r,!0,t)},i.prototype.writeFloatBE=function(e,r,t){return L(this,e,r,!1,t)},i.prototype.writeDoubleLE=function(e,r,t){return k(this,e,r,!0,t)},i.prototype.writeDoubleBE=function(e,r,t){return k(this,e,r,!1,t)},i.prototype.copy=function(e,r,t,n){if(t||(t=0),n||0===n||(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r=0;--a)e[a+r]=this[a+t];else if(_<1e3||!i.TYPED_ARRAY_SUPPORT)for(a=0;a<_;++a)e[a+r]=this[a+t];else Uint8Array.prototype.set.call(e,this.subarray(t,t+_),r);return _},i.prototype.fill=function(e,r,t,n){if("string"==typeof e){if("string"==typeof r?(n=r,r=0,t=this.length):"string"==typeof t&&(n=t,t=this.length),1===e.length){var a=e.charCodeAt(0);a<256&&(e=a)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(r<0||this.length>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(_=r;_55295&&t<57344){if(!a){if(t>56319){(r-=3)>-1&&_.push(239,191,189);continue}if(s+1===n){(r-=3)>-1&&_.push(239,191,189);continue}a=t;continue}if(t<56320){(r-=3)>-1&&_.push(239,191,189),a=t;continue}t=65536+(a-55296<<10|t-56320)}else a&&(r-=3)>-1&&_.push(239,191,189);if(a=null,t<128){if((r-=1)<0)break;_.push(t)}else if(t<2048){if((r-=2)<0)break;_.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;_.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;_.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return _}function B(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,r,t,n){for(var a=0;a=r.length||a>=e.length);++a)r[a+t]=e[a];return a}}).call(this,t(43))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(a,_){function s(e){try{i(n.next(e))}catch(e){_(e)}}function o(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var r;e.done?a(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},a=this&&this.__generator||function(e,r){var t,n,a,_,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function o(_){return function(o){return function(_){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,n=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]=33):"Firefox"===browserSpecs.name?(isFireFox=!0,browserSpecs.version>=52):"Chrome"===browserSpecs.name?browserSpecs.version>=42:"Safari"===browserSpecs.name?(isSafari=!0,browserSpecs.version>=12):void 0))}function CreateObject(e){if(isIOS())return call_ru_cryptopro_npcades_10_native_bridge("CreateObject",[e]);if(isIE()){if(e.match(/X509Enrollment/i))try{return document.getElementById("webClassFactory").CreateObject(e)}catch(r){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(r){return new ActiveXObject(e)}}return pluginObject.CreateObject(e)}function decimalToHexString(e){return e<0&&(e=4294967295+e+1),e.toString(16).toUpperCase()}function GetMessageFromException(e){var r=e.message;return r?e.number&&(r+=" (0x"+decimalToHexString(e.number)+")"):r=e,r}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(r){return GetMessageFromException(e)}}function ReleasePluginObjects(){return cpcsp_chrome_nmcades.ReleasePluginObjects()}function CreateObjectAsync(e){return pluginObject.CreateObjectAsync(e)}function call_ru_cryptopro_npcades_10_native_bridge(functionName,array){var tmpobj,ex;if(ru_cryptopro_npcades_10_native_bridge.call(functionName,array,(function(e,response){ex=e;var str="tmpobj="+response;eval(str),"string"==typeof tmpobj&&(tmpobj=tmpobj.replace(/\\\n/gm,"\n"),tmpobj=tmpobj.replace(/\\\r/gm,"\r"))})),ex)throw ex;return tmpobj}function show_firefox_missing_extension_dialog(){if(!window.cadesplugin_skip_extension_install){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.

Скачать расширение

",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible"}}function firefox_or_safari_nmcades_onload(){window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),isFireFoxExtensionLoaded=!0,cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){isIE()||isFireFox||isSafari||window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded")&&!cadesplugin_loaded_event_recieved){if(isFireFox||isSafari){var r=e.data.substring(e.data.indexOf("url:")+4);if(!r.match("^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$")&&!r.match("^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$"))return cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,'Bad url "'+r+'" for load CryptoPro Extension for CAdES Browser plug-in'),void plugin_loaded_error();var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",r),t.onerror=plugin_loaded_error,t.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(t)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error);cadesplugin_loaded_event_recieved=!0}}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e)):((e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e))}function load_npapi_plugin(){var e=document.createElement("object");if(e.setAttribute("id","cadesplugin_object"),e.setAttribute("type","application/x-cades"),e.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(e),pluginObject=document.getElementById("cadesplugin_object"),isIE()){var r=document.createElement("object");r.setAttribute("id","certEnrollClassFactory"),r.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),r.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(r);var t=document.createElement("object");t.setAttribute("id","webClassFactory"),t.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),t.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(t)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){void 0!==e&&"object"!=typeof e||(e="Плагин недоступен"),plugin_resolved=1,canPromise?plugin_reject(e):window.postMessage("cadesplugin_load_error","*")}function check_load_timeout(){1!==plugin_resolved&&(isFireFox&&(isFireFoxExtensionLoaded||show_firefox_missing_extension_dialog()),plugin_resolved=1,canPromise?plugin_reject("Истекло время ожидания загрузки плагина"):window.postMessage("cadesplugin_load_error","*"))}function createPromise(e){return new Promise(e)}function check_npapi_plugin(){try{CreateObject("CAdESCOM.About");plugin_loaded()}catch(r){document.getElementById("cadesplugin_object").style.display="none";var e=navigator.mimeTypes["application/x-cades"];if(e)plugin_loaded_error(e.enabledPlugin?"Плагин загружен, но не создаются обьекты":"Ошибка при загрузке плагина");else plugin_loaded_error("Плагин недоступен")}}function check_plugin_working(){var e=document.createElement("div");e.innerHTML="\x3c!--[if lt IE 9]>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0)for(;e>0;){var t=void 0;t=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),t=_generateCadesFn_1.__cadesAsyncToken__+t.EKUs,t=_generateCadesFn_1.__cadesAsyncToken__+t.Item(e),t=_generateCadesFn_1.__cadesAsyncToken__+t.OID,r.push(t),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return r})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(a,_){function s(e){try{i(n.next(e))}catch(e){_(e)}}function o(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var r;e.done?a(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},a=this&&this.__generator||function(e,r){var t,n,a,_,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function o(_){return function(o){return function(_){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,n=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(a,_){function s(e){try{i(n.next(e))}catch(e){_(e)}}function o(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var r;e.done?a(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,a,_,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function o(_){return function(o){return function(_){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,n=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0?s-4:s;for(t=0;t>16&255,i[u++]=r>>8&255,i[u++]=255&r;2===o&&(r=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,i[u++]=255&r);1===o&&(r=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,i[u++]=r>>8&255,i[u++]=255&r);return i},r.fromByteArray=function(e){for(var r,t=e.length,a=t%3,_=[],s=0,o=t-a;so?o:s+16383));1===a?(r=e[t-1],_.push(n[r>>2]+n[r<<4&63]+"==")):2===a&&(r=(e[t-2]<<8)+e[t-1],_.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return _.join("")};for(var n=[],a=[],_="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=r),[t,t===r?0:4-t%4]}function u(e,r,t){for(var a,_,s=[],o=r;o>18&63]+n[_>>12&63]+n[_>>6&63]+n[63&_]);return s.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,r){ +var n=t(44),_=t(45),a=t(46);function s(){return i.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,r){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function E(e,r){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Y(e).length;default:if(n)return G(e).length;r=(""+r).toLowerCase(),n=!0}}function f(e,r,t){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return b(this,r,t);case"utf8":case"utf-8":return y(this,r,t);case"ascii":return R(this,r,t);case"latin1":case"binary":return w(this,r,t);case"base64":return P(this,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,r,t);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,r,t){var n=e[r];e[r]=e[t],e[t]=n}function p(e,r,t,n,_){if(0===e.length)return-1;if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=_?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(_)return-1;t=e.length-1}else if(t<0){if(!_)return-1;t=0}if("string"==typeof r&&(r=i.from(r,n)),i.isBuffer(r))return 0===r.length?-1:A(e,r,t,n,_);if("number"==typeof r)return r&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?_?Uint8Array.prototype.indexOf.call(e,r,t):Uint8Array.prototype.lastIndexOf.call(e,r,t):A(e,[r],t,n,_);throw new TypeError("val must be string, number or Buffer")}function A(e,r,t,n,_){var a,s=1,o=e.length,i=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||r.length<2)return-1;s=2,o/=2,i/=2,t/=2}function c(e,r){return 1===s?e[r]:e.readUInt16BE(r*s)}if(_){var u=-1;for(a=t;ao&&(t=o-i),a=t;a>=0;a--){for(var l=!0,d=0;d_&&(n=_):n=_;var a=r.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;s>8,_=t%256,a.push(_),a.push(n);return a}(r,e.length-t),e,t,n)}function P(e,r,t){return 0===r&&t===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(r,t))}function y(e,r,t){t=Math.min(e.length,t);for(var n=[],_=r;_239?4:c>223?3:c>191?2:1;if(_+l<=t)switch(l){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[_+1]))&&(i=(31&c)<<6|63&a)>127&&(u=i);break;case 3:a=e[_+1],s=e[_+2],128==(192&a)&&128==(192&s)&&(i=(15&c)<<12|(63&a)<<6|63&s)>2047&&(i<55296||i>57343)&&(u=i);break;case 4:a=e[_+1],s=e[_+2],o=e[_+3],128==(192&a)&&128==(192&s)&&128==(192&o)&&(i=(15&c)<<18|(63&a)<<12|(63&s)<<6|63&o)>65535&&i<1114112&&(u=i)}null===u?(u=65533,l=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),_+=l}return function(e){var r=e.length;if(r<=4096)return String.fromCharCode.apply(String,e);var t="",n=0;for(;n0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,r,t,n,_){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===t&&(t=e?e.length:0),void 0===n&&(n=0),void 0===_&&(_=this.length),r<0||t>e.length||n<0||_>this.length)throw new RangeError("out of range index");if(n>=_&&r>=t)return 0;if(n>=_)return-1;if(r>=t)return 1;if(this===e)return 0;for(var a=(_>>>=0)-(n>>>=0),s=(t>>>=0)-(r>>>=0),o=Math.min(a,s),c=this.slice(n,_),u=e.slice(r,t),l=0;l_)&&(t=_),e.length>0&&(t<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return O(this,e,r,t);case"utf8":case"utf-8":return h(this,e,r,t);case"ascii":return T(this,e,r,t);case"latin1":case"binary":return I(this,e,r,t);case"base64":return M(this,e,r,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r,t);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function R(e,r,t){var n="";t=Math.min(e.length,t);for(var _=r;_n)&&(t=n);for(var _="",a=r;at)throw new RangeError("Trying to access beyond buffer length")}function N(e,r,t,n,_,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>_||re.length)throw new RangeError("Index out of range")}function m(e,r,t,n){r<0&&(r=65535+r+1);for(var _=0,a=Math.min(e.length-t,2);_>>8*(n?_:1-_)}function L(e,r,t,n){r<0&&(r=4294967295+r+1);for(var _=0,a=Math.min(e.length-t,4);_>>8*(n?_:3-_)&255}function F(e,r,t,n,_,a){if(t+n>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function x(e,r,t,n,a){return a||F(e,0,t,4),_.write(e,r,t,n,23,4),t+4}function U(e,r,t,n,a){return a||F(e,0,t,8),_.write(e,r,t,n,52,8),t+8}i.prototype.slice=function(e,r){var t,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(_*=256);)n+=this[e+--r]*_;return n},i.prototype.readUInt8=function(e,r){return r||D(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,r){return r||D(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,r){return r||D(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,r){return r||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,r){return r||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,r,t){e|=0,r|=0,t||D(e,r,this.length);for(var n=this[e],_=1,a=0;++a=(_*=128)&&(n-=Math.pow(2,8*r)),n},i.prototype.readIntBE=function(e,r,t){e|=0,r|=0,t||D(e,r,this.length);for(var n=r,_=1,a=this[e+--n];n>0&&(_*=256);)a+=this[e+--n]*_;return a>=(_*=128)&&(a-=Math.pow(2,8*r)),a},i.prototype.readInt8=function(e,r){return r||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,r){r||D(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,r){r||D(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,r){return r||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,r){return r||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,r){return r||D(e,4,this.length),_.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,r){return r||D(e,4,this.length),_.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,r){return r||D(e,8,this.length),_.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,r){return r||D(e,8,this.length),_.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,r,t,n){(e=+e,r|=0,t|=0,n)||N(this,e,r,t,Math.pow(2,8*t)-1,0);var _=1,a=0;for(this[r]=255&e;++a=0&&(a*=256);)this[r+_]=e/a&255;return r+t},i.prototype.writeUInt8=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},i.prototype.writeUInt16LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):m(this,e,r,!0),r+2},i.prototype.writeUInt16BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):m(this,e,r,!1),r+2},i.prototype.writeUInt32LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):L(this,e,r,!0),r+4},i.prototype.writeUInt32BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},i.prototype.writeIntLE=function(e,r,t,n){if(e=+e,r|=0,!n){var _=Math.pow(2,8*t-1);N(this,e,r,t,_-1,-_)}var a=0,s=1,o=0;for(this[r]=255&e;++a>0)-o&255;return r+t},i.prototype.writeIntBE=function(e,r,t,n){if(e=+e,r|=0,!n){var _=Math.pow(2,8*t-1);N(this,e,r,t,_-1,-_)}var a=t-1,s=1,o=0;for(this[r+a]=255&e;--a>=0&&(s*=256);)e<0&&0===o&&0!==this[r+a+1]&&(o=1),this[r+a]=(e/s>>0)-o&255;return r+t},i.prototype.writeInt8=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},i.prototype.writeInt16LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):m(this,e,r,!0),r+2},i.prototype.writeInt16BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):m(this,e,r,!1),r+2},i.prototype.writeInt32LE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):L(this,e,r,!0),r+4},i.prototype.writeInt32BE=function(e,r,t){return e=+e,r|=0,t||N(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},i.prototype.writeFloatLE=function(e,r,t){return x(this,e,r,!0,t)},i.prototype.writeFloatBE=function(e,r,t){return x(this,e,r,!1,t)},i.prototype.writeDoubleLE=function(e,r,t){return U(this,e,r,!0,t)},i.prototype.writeDoubleBE=function(e,r,t){return U(this,e,r,!1,t)},i.prototype.copy=function(e,r,t,n){if(t||(t=0),n||0===n||(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r=0;--_)e[_+r]=this[_+t];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(_=0;_>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(a=r;a55295&&t<57344){if(!_){if(t>56319){(r-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(r-=3)>-1&&a.push(239,191,189);continue}_=t;continue}if(t<56320){(r-=3)>-1&&a.push(239,191,189),_=t;continue}t=65536+(_-55296<<10|t-56320)}else _&&(r-=3)>-1&&a.push(239,191,189);if(_=null,t<128){if((r-=1)<0)break;a.push(t)}else if(t<2048){if((r-=2)<0)break;a.push(t>>6|192,63&t|128)}else if(t<65536){if((r-=3)<0)break;a.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return a}function Y(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,r,t,n){for(var _=0;_=r.length||_>=e.length);++_)r[_+t]=e[_];return _}}).call(this,t(43))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getCertificates=void 0;var a,s=t(0),o=t(10),i=t(12);r.getCertificates=s._afterPluginsLoaded((function(e){return void 0===e&&(e=!1),n(void 0,void 0,void 0,(function(){var r,t,n,s,c;return _(this,(function(_){switch(_.label){case 0:if(!e&&a)return[2,a];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.getUserCertificates(e)];case 2:return r=_.sent(),[3,4];case 3:return t=_.sent(),console.error(t),r=[],[3,4];case 4:return _.trys.push([4,6,,7]),[4,i.getContainerCertificates(e)];case 5:if(n=_.sent(),r)for(s=n.length-1,void 0;s;)r.find((function(e){return e.thumbprint===n[s].thumbprint}))||r.push(n[s]),s--;else r=n;return[3,7];case 6:return c=_.sent(),console.error(c),[3,7];case 7:if(!r)throw new Error("Нет доступных сертификатов");return[2,a=r]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUserCertificates=void 0;var certificate_1=__webpack_require__(4),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getUserCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{(r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),t=_generateCadesFn_1.__cadesAsyncToken__+r.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCadesProp=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getCadesProp=_afterPluginsLoaded_1._afterPluginsLoaded((function(propName){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate[propName]}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при обращении к свойству сертификата")}return e})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getContainerCertificates=void 0;var certificate_1=__webpack_require__(4),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getContainerCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{(r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),t=_generateCadesFn_1.__cadesAsyncToken__+r.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getAllCertificates=void 0;var a,s=t(0),o=t(14),i=t(15);r.getAllCertificates=s._afterPluginsLoaded((function(e){return void 0===e&&(e=!1),n(void 0,void 0,void 0,(function(){var r,t,n,s,c;return _(this,(function(_){switch(_.label){case 0:if(!e&&a)return[2,a];_.label=1;case 1:return _.trys.push([1,3,,4]),[4,o.getAllUserCertificates(e)];case 2:return r=_.sent(),[3,4];case 3:return t=_.sent(),console.error(t),r=[],[3,4];case 4:return _.trys.push([4,6,,7]),[4,i.getAllContainerCertificates(e)];case 5:if(n=_.sent(),r)for(s=n.length-1,void 0;s;)r.find((function(e){return e.thumbprint===n[s].thumbprint}))||r.push(n[s]),s--;else r=n;return[3,7];case 6:return c=_.sent(),console.error(c),[3,7];case 7:if(!r)throw new Error("Нет доступных сертификатов");return[2,a=r]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllUserCertificates=void 0;var certificate_1=__webpack_require__(4),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getAllUserCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllContainerCertificates=void 0;var certificate_1=__webpack_require__(4),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(6),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),certificatesCache;exports.getAllContainerCertificates=_afterPluginsLoaded_1._afterPluginsLoaded((function(resetCache){void 0===resetCache&&(resetCache=!1);var cadesplugin=window.cadesplugin;return!resetCache&&certificatesCache?certificatesCache:eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var n=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+r.Item(t);n.push(new certificate_1.Certificate(_,_extractCommonName_1._extractCommonName(_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName),_generateCadesFn_1.__cadesAsyncToken__+_.IssuerName,_generateCadesFn_1.__cadesAsyncToken__+_.SubjectName,_generateCadesFn_1.__cadesAsyncToken__+_.Thumbprint,_generateCadesFn_1.__cadesAsyncToken__+_.ValidFromDate,_generateCadesFn_1.__cadesAsyncToken__+_.ValidToDate)),t--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка обработки сертификатов")}return e.Close(),certificatesCache=n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSystemInfo=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getSystemInfo=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var sysInfo={cadesVersion:null,cspVersion:null};return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.PluginVersion,sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+e.CSPVersion(),sysInfo.cadesVersion||(sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.Version),sysInfo.cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cadesVersion.toString(),sysInfo.cspVersion=_generateCadesFn_1.__cadesAsyncToken__+sysInfo.cspVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении информации о системе")}return sysInfo})))}))},function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),_=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||r.hasOwnProperty(t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),_(t(18),r)},function(e,r,t){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,r,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,n){void 0===n&&(n=t),e[n]=r[t]}),_=this&&this.__exportStar||function(e,r){for(var t in e)"default"===t||r.hasOwnProperty(t)||n(r,e,t)};Object.defineProperty(r,"__esModule",{value:!0}),_(t(19),r),_(t(10),r),_(t(14),r),_(t(12),r),_(t(15),r),_(t(9),r),_(t(13),r),_(t(16),r),_(t(34),r),_(t(37),r),_(t(40),r),_(t(41),r),_(t(42),r),_(t(47),r),_(t(48),r),_(t(4),r),_(t(49),r),_(t(50),r)},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getCertificate=void 0;var a=t(0),s=t(9),o=t(13);r.getCertificate=a._afterPluginsLoaded((function(e,r){return void 0===r&&(r=!0),n(void 0,void 0,void 0,(function(){var t,n;return _(this,(function(_){switch(_.label){case 0:if(!e)throw new Error("Отпечаток не указан");return r?[4,s.getCertificates()]:[3,2];case 1:return t=_.sent(),[3,4];case 2:return[4,o.getAllCertificates()];case 3:t=_.sent(),_.label=4;case 4:if(!(n=t.find((function(r){return r.thumbprint===e}))))throw new Error('Сертификат с отпечатком: "'+e+'" не найден');return[2,n]}}))}))}))},function(module,exports){!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isSafari=0,isYandex=0,canPromise=!!window.Promise,cadesplugin_loaded_event_recieved=!1,isFireFoxExtensionLoaded=!1,cadesplugin;cadesplugin=canPromise?new Promise((function(e,r){plugin_resolve=e,plugin_reject=r})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,r){var t=ru_cryptopro_npcades_10_native_bridge.callbacks[e];t&&t.apply(null,r)},call:function(e,r,t){var n=t&&"function"==typeof t,_=n?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;n&&(ru_cryptopro_npcades_10_native_bridge.callbacks[_]=t);var a=document.createElement("IFRAME"),s=new Array("_CPNP_handle");try{a.setAttribute("src","cpnp-js-call:"+e+":"+_+":"+encodeURIComponent(JSON.stringify(r,s)))}catch(e){alert(e)}document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=null}};cadesplugin.JSModuleVersion="2.3.2",cadesplugin.async_spawn=async_spawn,cadesplugin.set=set_pluginObject,cadesplugin.set_log_level=set_log_level,cadesplugin.getLastError=getLastError,cadesplugin.is_capilite_enabled=is_capilite_enabled,isNativeMessageSupported()&&(cadesplugin.CreateObjectAsync=CreateObjectAsync,cadesplugin.ReleasePluginObjects=ReleasePluginObjects),isNativeMessageSupported()||(cadesplugin.CreateObject=CreateObject),window.cadesplugin_load_timeout?setTimeout(check_load_timeout,window.cadesplugin_load_timeout):setTimeout(check_load_timeout,2e4),set_constantValues(),cadesplugin.current_log_level=cadesplugin.LOG_LEVEL_ERROR,window.cadesplugin=cadesplugin,check_plugin_working()}function check_browser(){var e,r=navigator.userAgent,t=r.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(r)||[])[1]||""}:"Chrome"===t[1]&&null!=(e=r.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=r.match(/version\/(\d+)/i))&&t.splice(1,1,e[1]),{name:t[0],version:t[1]})}function cpcsp_console_log(e,r){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",r),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",r),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",r))):void 0}function set_log_level(e){e===cadesplugin.LOG_LEVEL_DEBUG||e===cadesplugin.LOG_LEVEL_INFO||e===cadesplugin.LOG_LEVEL_ERROR?(cadesplugin.current_log_level=e,cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = DEBUG"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = INFO"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO,"cadesplugin_api.js: log_level = ERROR"),isNativeMessageSupported()&&(cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_DEBUG&&window.postMessage("set_log_level=debug","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_INFO&&window.postMessage("set_log_level=info","*"),cadesplugin.current_log_level===cadesplugin.LOG_LEVEL_ERROR&&window.postMessage("set_log_level=error","*"))):cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,"cadesplugin_api.js: Incorrect log_level: "+e)}function set_constantValues(){cadesplugin.CAPICOM_MEMORY_STORE=0,cadesplugin.CAPICOM_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CAPICOM_SMART_CARD_USER_STORE=4,cadesplugin.CADESCOM_MEMORY_STORE=0,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_SMART_CARD_USER_STORE=4,cadesplugin.CADESCOM_CONTAINER_STORE=100,cadesplugin.CAPICOM_MY_STORE="My",cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,cadesplugin.CADESCOM_XADES_DEFAULT=16,cadesplugin.CADESCOM_XADES_BES=32,cadesplugin.CADESCOM_XADES_T=80,cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1=1488,cadesplugin.CADESCOM_XMLDSIG_TYPE=0,cadesplugin.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411",cadesplugin.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",cadesplugin.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",cadesplugin.XmlDsigGost3411Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256",cadesplugin.XmlDsigGost3410Url2012256="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256",cadesplugin.XmlDsigGost3411Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512",cadesplugin.XmlDsigGost3410Url2012512="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512",cadesplugin.CADESCOM_CADES_DEFAULT=0,cadesplugin.CADESCOM_CADES_BES=1,cadesplugin.CADESCOM_CADES_T=5,cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1=93,cadesplugin.CADESCOM_PKCS7_TYPE=65535,cadesplugin.CADESCOM_ENCODE_BASE64=0,cadesplugin.CADESCOM_ENCODE_BINARY=1,cadesplugin.CADESCOM_ENCODE_ANY=-1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE=9,cadesplugin.CAPICOM_OID_OTHER=0,cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION=10,cadesplugin.CAPICOM_EKU_CLIENT_AUTH=2,cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON=5,cadesplugin.CAPICOM_EKU_OTHER=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO=256,cadesplugin.CADESCOM_ATTRIBUTE_OTHER=-1,cadesplugin.CADESCOM_STRING_TO_UCS2LE=0,cadesplugin.CADESCOM_BASE64_TO_BINARY=1,cadesplugin.CADESCOM_DISPLAY_DATA_NONE=0,cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT=1,cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1=0,cadesplugin.CADESCOM_HASH_ALGORITHM_MD2=1,cadesplugin.CADESCOM_HASH_ALGORITHM_MD4=2,cadesplugin.CADESCOM_HASH_ALGORITHM_MD5=3,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256=4,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384=5,cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512=6,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,cadesplugin.LOG_LEVEL_DEBUG=4,cadesplugin.LOG_LEVEL_INFO=2,cadesplugin.LOG_LEVEL_ERROR=1,cadesplugin.CADESCOM_AllowNone=0,cadesplugin.CADESCOM_AllowNoOutstandingRequest=1,cadesplugin.CADESCOM_AllowUntrustedCertificate=2,cadesplugin.CADESCOM_AllowUntrustedRoot=4,cadesplugin.CADESCOM_SkipInstallToStore=268435456,cadesplugin.CADESCOM_InstallCertChainToContainer=536870912,cadesplugin.CADESCOM_UseContainerStore=1073741824,cadesplugin.ENABLE_CARRIER_TYPE_CSP=1,cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM=2,cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM=4,cadesplugin.ENABLE_ANY_CARRIER_TYPE=7,cadesplugin.DISABLE_EVERY_CARRIER_OPERATION=0,cadesplugin.ENABLE_CARRIER_OPEN_ENUM=1,cadesplugin.ENABLE_CARRIER_CREATE=2,cadesplugin.ENABLE_ANY_OPERATION=3,cadesplugin.CADESCOM_PRODUCT_CSP=0,cadesplugin.CADESCOM_PRODUCT_OCSP=1,cadesplugin.CADESCOM_PRODUCT_TSP=2,cadesplugin.MEDIA_TYPE_REGISTRY=1,cadesplugin.MEDIA_TYPE_HDIMAGE=2,cadesplugin.MEDIA_TYPE_CLOUD=4,cadesplugin.MEDIA_TYPE_SCARD=8,cadesplugin.XCN_CRYPT_STRING_BASE64HEADER=0,cadesplugin.AT_KEYEXCHANGE=1,cadesplugin.AT_SIGNATURE=2,cadesplugin.CARRIER_FLAG_REMOVABLE=1,cadesplugin.CARRIER_FLAG_UNIQUE=2,cadesplugin.CARRIER_FLAG_PROTECTED=4,cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER=8,cadesplugin.CARRIER_FLAG_SECURE_MESSAGING=16,cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE=64,cadesplugin.CARRIER_FLAG_VIRTUAL=128}function async_spawn(e){function r(e,r){var a;try{a=t[e](r)}catch(e){return Promise.reject(e)}return a.done?a.value:Promise.resolve(a.value).then(n,_)}var t=e(Array.prototype.slice.call(arguments,1)),n=r.bind(r,"next"),_=r.bind(r,"throw");return n()}function isIE(){return"IE"===browserSpecs.name||"MSIE"===browserSpecs.name}function isIOS(){return navigator.userAgent.match(/ipod/i)||navigator.userAgent.match(/ipad/i)||navigator.userAgent.match(/iphone/i)}function isNativeMessageSupported(){return!isIE()&&("Edg"===browserSpecs.name||("YaBrowser"===browserSpecs.name?(isYandex=!0,!0):"Opera"===browserSpecs.name?(isOpera=!0,browserSpecs.version>=33):"Firefox"===browserSpecs.name?(isFireFox=!0,browserSpecs.version>=52):"Chrome"===browserSpecs.name?browserSpecs.version>=42:"Safari"===browserSpecs.name?(isSafari=!0,browserSpecs.version>=12):void 0))}function CreateObject(e){if(isIOS())return call_ru_cryptopro_npcades_10_native_bridge("CreateObject",[e]);if(isIE()){if(e.match(/X509Enrollment/i))try{return document.getElementById("webClassFactory").CreateObject(e)}catch(r){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(r){return new ActiveXObject(e)}}return pluginObject.CreateObject(e)}function decimalToHexString(e){return e<0&&(e=4294967295+e+1),e.toString(16).toUpperCase()}function GetMessageFromException(e){var r=e.message;return r?e.number&&(r+=" (0x"+decimalToHexString(e.number)+")"):r=e,r}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(r){return GetMessageFromException(e)}}function ReleasePluginObjects(){return cpcsp_chrome_nmcades.ReleasePluginObjects()}function CreateObjectAsync(e){return pluginObject.CreateObjectAsync(e)}function call_ru_cryptopro_npcades_10_native_bridge(functionName,array){var tmpobj,ex;if(ru_cryptopro_npcades_10_native_bridge.call(functionName,array,(function(e,response){ex=e;var str="tmpobj="+response;eval(str),"string"==typeof tmpobj&&(tmpobj=tmpobj.replace(/\\\n/gm,"\n"),tmpobj=tmpobj.replace(/\\\r/gm,"\r"))})),ex)throw ex;return tmpobj}function show_firefox_missing_extension_dialog(){if(!window.cadesplugin_skip_extension_install){var e=document.createElement("div");e.id="cadesplugin_ovr",e.style="visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)",e.innerHTML="

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.

Скачать расширение

",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_close_install").addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.addEventListener("click",(function(){plugin_loaded_error("Плагин недоступен"),document.getElementById("cadesplugin_ovr").style.visibility="hidden"})),e.style.visibility="visible"}}function firefox_or_safari_nmcades_onload(){window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),isFireFoxExtensionLoaded=!0,cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){isIE()||isFireFox||isSafari||window.cadesplugin_extension_loaded_callback&&window.cadesplugin_extension_loaded_callback(),window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded")&&!cadesplugin_loaded_event_recieved){if(isFireFox||isSafari){var r=e.data.substring(e.data.indexOf("url:")+4);if(!r.match("^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$")&&!r.match("^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$"))return cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR,'Bad url "'+r+'" for load CryptoPro Extension for CAdES Browser plug-in'),void plugin_loaded_error();var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",r),t.onerror=plugin_loaded_error,t.onload=firefox_or_safari_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(t)}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error);cadesplugin_loaded_event_recieved=!0}}),!1)}function load_extension(){var e;isFireFox||isSafari?nmcades_api_onload():isOpera||isYandex?((e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e)):((e=document.createElement("script")).setAttribute("type","text/javascript"),e.setAttribute("src","chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js"),e.onerror=plugin_loaded_error,e.onload=nmcades_api_onload,document.getElementsByTagName("head")[0].appendChild(e))}function load_npapi_plugin(){var e=document.createElement("object");if(e.setAttribute("id","cadesplugin_object"),e.setAttribute("type","application/x-cades"),e.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(e),pluginObject=document.getElementById("cadesplugin_object"),isIE()){var r=document.createElement("object");r.setAttribute("id","certEnrollClassFactory"),r.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),r.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(r);var t=document.createElement("object");t.setAttribute("id","webClassFactory"),t.setAttribute("classid","clsid:B04C8637-10BD-484E-B0DA-B8A039F60024"),t.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(t)}}function plugin_loaded(){plugin_resolved=1,canPromise?plugin_resolve():window.postMessage("cadesplugin_loaded","*")}function plugin_loaded_error(e){void 0!==e&&"object"!=typeof e||(e="Плагин недоступен"),plugin_resolved=1,canPromise?plugin_reject(e):window.postMessage("cadesplugin_load_error","*")}function check_load_timeout(){1!==plugin_resolved&&(isFireFox&&(isFireFoxExtensionLoaded||show_firefox_missing_extension_dialog()),plugin_resolved=1,canPromise?plugin_reject("Истекло время ожидания загрузки плагина"):window.postMessage("cadesplugin_load_error","*"))}function createPromise(e){return new Promise(e)}function check_npapi_plugin(){try{CreateObject("CAdESCOM.About");plugin_loaded()}catch(r){document.getElementById("cadesplugin_object").style.display="none";var e=navigator.mimeTypes["application/x-cades"];if(e)plugin_loaded_error(e.enabledPlugin?"Плагин загружен, но не создаются обьекты":"Ошибка при загрузке плагина");else plugin_loaded_error("Плагин недоступен")}}function check_plugin_working(){var e=document.createElement("div");e.innerHTML="\x3c!--[if lt IE 9]>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getDecodedExtendedKeyUsage=void 0;var s=t(3),o=t(0);r.getDecodedExtendedKeyUsage=o._afterPluginsLoaded((function(){return _(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return[2,e.sent().reduce((function(e,r){var t;return n(n({},e),((t={})[r]=s.OIDS_DICTIONARY[r]||null,t))}),{})]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtendedKeyUsage=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getExtendedKeyUsage=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,r=[];try{if(e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),e=_generateCadesFn_1.__cadesAsyncToken__+e.EKUs,(e=_generateCadesFn_1.__cadesAsyncToken__+e.Count)>0)for(;e>0;){var t=void 0;t=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.ExtendedKeyUsage(),t=_generateCadesFn_1.__cadesAsyncToken__+t.EKUs,t=_generateCadesFn_1.__cadesAsyncToken__+t.Item(e),t=_generateCadesFn_1.__cadesAsyncToken__+t.OID,r.push(t),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return r})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.getInfo=void 0;var a=t(0),s=t(1),o=t(31),i=t(11);r.getInfo=a._afterPluginsLoaded((function(e,r){return n(this,void 0,void 0,(function(){var t,n;return _(this,(function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),[4,i.getCadesProp.call(this,r)];case 1:return t=_.sent(),[3,3];case 2:throw n=_.sent(),console.error(n),new Error(s._extractMeaningfulErrorMessage(n)||"Ошибка при извлечении информации из сертификата");case 3:return[2,o._parseCertInfo(e,t)]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._parseCertInfo=void 0;var n=t(3);r._parseCertInfo=function(e,r){var t=r.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);if(t)return t.map((function(r){var t,_,a,s=r.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/),o=null==s?void 0:s[1],i=null===(_=null===(t=null==s?void 0:s[2])||void 0===t?void 0:t.replace(/^"(.*)"/,"$1"))||void 0===_?void 0:_.replace(/"{2}/g,'"'),c=null==o?void 0:o.match(/^OID\.(.*)/),u=null==c?void 0:c[1],l=!1;if(u){var d=n.OIDS_DICTIONARY[u];d&&(o=d,l=!0)}var C=null===(a=e.find((function(e){return e.possibleNames.find((function(e){return e===o}))})))||void 0===a?void 0:a.translation;return C&&(o=C,l=!0),{description:i,title:o,isTranslated:l}}))}},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.hasExtendedKeyUsage=void 0;var a=t(0);r.hasExtendedKeyUsage=a._afterPluginsLoaded((function(e){return n(this,void 0,void 0,(function(){var r;return _(this,(function(t){switch(t.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return r=t.sent(),[2,Array.isArray(e)?e.every((function(e){return r.some((function(r){return r===e}))})):r.some((function(r){return r===e}))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValid=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.isValid=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.IsValid(),e=_generateCadesFn_1.__cadesAsyncToken__+e.Result}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при проверке сертификата")}return Boolean(e)})))}))},function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},_=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.isValidSystemSetup=void 0;var a=t(0),s=t(1),o=t(35),i=t(36),c=t(16);r.isValidSystemSetup=a._afterPluginsLoaded((function(){return n(void 0,void 0,void 0,(function(){var e,r;return _(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,c.getSystemInfo()];case 1:return e=t.sent(),[3,3];case 2:throw r=t.sent(),console.error(r),new Error(s._extractMeaningfulErrorMessage(r)||"Настройки ЭП на данной машине не верны");case 3:if(!o._isSupportedCadesVersion(e.cadesVersion))throw new Error("Не поддерживаемая версия плагина");if(!i._isSupportedCSPVersion(e.cspVersion))throw new Error("Не поддерживаемая версия CSP");return[2,!0]}}))}))}))},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._isSupportedCadesVersion=void 0,r._isSupportedCadesVersion=function(e){var r=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!r)return!1;var t=r[1],n=(r[2],r[3]);return!(Number(t)<2)&&!(2===Number(t)&&Number(n)<12438)}},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r._isSupportedCSPVersion=void 0;r._isSupportedCSPVersion=function(e){var r;return e=null===(r=e.match(/\d+?\b(?:\.\d+)?/))||void 0===r?void 0:r[0],Number(e)>=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createXMLSignature=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5);exports.createXMLSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,unencryptedMessage){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.SignedXML")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Certificate(cadesCertificate),_generateCadesFn_1.__cadesAsyncToken__,e.propset_CheckCertificate(!0),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(unencryptedMessage),_generateCadesFn_1.__cadesAsyncToken__,r.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED),_generateCadesFn_1.__cadesAsyncToken__,r.propset_SignatureMethod("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256"),_generateCadesFn_1.__cadesAsyncToken__,r.propset_DigestMethod("urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{t=_generateCadesFn_1.__cadesAsyncToken__+r.Sign(e)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return t})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getCadesUserCert=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesUserCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}if(!e)throw new Error("Не удалось получить доступ к хранилищу сертификатов");try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CAPICOM_CURRENT_USER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища пользователя")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов из хранилища пользователя")}if(!t)throw new Error("Нет доступных сертификатов в хранилище пользователя");try{if(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+r.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден в хранилище пользователя');n=_generateCadesFn_1.__cadesAsyncToken__+r.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата из хранилища пользователя")}return e.Close(),n})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._getCadesContainerCert=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesContainerCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.Store")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при попытке доступа к хранилищу")}if(!e)throw new Error("Не удалось получить доступ к хранилищу сертификатов");try{_generateCadesFn_1.__cadesAsyncToken__,e.Open(cadesplugin.CADESCOM_CONTAINER_STORE,cadesplugin.CAPICOM_MY_STORE,cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при открытии хранилища закрытого ключа")}try{r=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+r.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов из хранилища закрытого ключа")}if(!t)throw new Error("Нет доступных сертификатов в хранилище закрытого ключа");try{if(r=_generateCadesFn_1.__cadesAsyncToken__+r.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+r.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден в хранилище закрытого ключа');n=_generateCadesFn_1.__cadesAsyncToken__+r.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата из хранилища закрытого ключа")}return e.Close(),n})))}))},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDetachedSignature=void 0;var constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5),_getDateObj_1=__webpack_require__(7);exports.createDetachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,messageHash){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),n=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var _,a,s=_getDateObj_1._getDateObj(new Date);try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Name(constants_1.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME),_generateCadesFn_1.__cadesAsyncToken__,e.propset_Value(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,n.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+n.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке сертификата")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,r.SetHashValue(messageHash)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке хеша")}try{a=_generateCadesFn_1.__cadesAsyncToken__+t.SignHash(r,n,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDetachedSignature=void 0;var constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5),_getDateObj_1=__webpack_require__(7);exports.addDetachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,signedMessage,messageHash){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t,n;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),n=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var _,a,s=_getDateObj_1._getDateObj(new Date);try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Name(constants_1.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME),_generateCadesFn_1.__cadesAsyncToken__,e.propset_Value(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,n.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+n.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке сертификата")}try{_generateCadesFn_1.__cadesAsyncToken__,r.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,r.SetHashValue(messageHash)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке хеша")}try{_generateCadesFn_1.__cadesAsyncToken__,t.VerifyHash(r,signedMessage,cadesplugin.CADESCOM_PKCS7_TYPE),a=_generateCadesFn_1.__cadesAsyncToken__+t.CoSignHash(r,n,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createAttachedSignature=void 0;var constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5),_getDateObj_1=__webpack_require__(7);exports.createAttachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,unencryptedMessage){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var n,_,a,s=_getDateObj_1._getDateObj(new Date);try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Name(constants_1.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME),_generateCadesFn_1.__cadesAsyncToken__,e.propset_Value(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{n=Buffer.from(unencryptedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,r.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(n),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{a=_generateCadesFn_1.__cadesAsyncToken__+r.SignCades(t,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(e,r){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,r,t){"use strict";r.byteLength=function(e){var r=c(e),t=r[0],n=r[1];return 3*(t+n)/4-n},r.toByteArray=function(e){var r,t,n=c(e),s=n[0],o=n[1],i=new a(function(e,r,t){return 3*(r+t)/4-t}(0,s,o)),u=0,l=o>0?s-4:s;for(t=0;t>16&255,i[u++]=r>>8&255,i[u++]=255&r;2===o&&(r=_[e.charCodeAt(t)]<<2|_[e.charCodeAt(t+1)]>>4,i[u++]=255&r);1===o&&(r=_[e.charCodeAt(t)]<<10|_[e.charCodeAt(t+1)]<<4|_[e.charCodeAt(t+2)]>>2,i[u++]=r>>8&255,i[u++]=255&r);return i},r.fromByteArray=function(e){for(var r,t=e.length,_=t%3,a=[],s=0,o=t-_;so?o:s+16383));1===_?(r=e[t-1],a.push(n[r>>2]+n[r<<4&63]+"==")):2===_&&(r=(e[t-2]<<8)+e[t-1],a.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return a.join("")};for(var n=[],_=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=r),[t,t===r?0:4-t%4]}function u(e,r,t){for(var _,a,s=[],o=r;o>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return s.join("")}_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63},function(e,r){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ -r.read=function(e,r,t,n,a){var _,s,o=8*a-n-1,i=(1<>1,u=-7,l=t?a-1:0,d=t?-1:1,f=e[r+l];for(l+=d,_=f&(1<<-u)-1,f>>=-u,u+=o;u>0;_=256*_+e[r+l],l+=d,u-=8);for(s=_&(1<<-u)-1,_>>=-u,u+=n;u>0;s=256*s+e[r+l],l+=d,u-=8);if(0===_)_=1-c;else{if(_===i)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),_-=c}return(f?-1:1)*s*Math.pow(2,_-n)},r.write=function(e,r,t,n,a,_){var s,o,i,c=8*_-a-1,u=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:_-1,g=n?1:-1,p=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(o=isNaN(r)?1:0,s=u):(s=Math.floor(Math.log(r)/Math.LN2),r*(i=Math.pow(2,-s))<1&&(s--,i*=2),(r+=s+l>=1?d/i:d*Math.pow(2,1-l))*i>=2&&(s++,i/=2),s+l>=u?(o=0,s=u):s+l>=1?(o=(r*i-1)*Math.pow(2,a),s+=l):(o=r*Math.pow(2,l-1)*Math.pow(2,a),s=0));a>=8;e[t+f]=255&o,f+=g,o/=256,a-=8);for(s=s<0;e[t+f]=255&s,f+=g,s/=256,c-=8);e[t+f-g]|=128*p}},function(e,r){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(a,_){function s(e){try{i(n.next(e))}catch(e){_(e)}}function o(e){try{i(n.throw(e))}catch(e){_(e)}}function i(e){var r;e.done?a(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,a,_,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return _={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(_[Symbol.iterator]=function(){return this}),_;function o(_){return function(o){return function(_){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(a=2&_[0]?n.return:_[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,_[1])).done)return a;switch(n=0,a&&(_=[2&_[0],a.value]),_[0]){case 0:case 1:a=_;break;case 4:return s.label++,{value:_[1],done:!1};case 5:s.label++,n=_[1],_=[0];continue;case 7:_=s.ops.pop(),s.trys.pop();continue;default:if(!(a=s.trys,(a=a.length>0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]0&&a[a.length-1])||6!==_[0]&&2!==_[0])){s=0;continue}if(3===_[0]&&(!a||_[1]>a[0]&&_[1]>1,u=-7,l=t?_-1:0,d=t?-1:1,C=e[r+l];for(l+=d,a=C&(1<<-u)-1,C>>=-u,u+=o;u>0;a=256*a+e[r+l],l+=d,u-=8);for(s=a&(1<<-u)-1,a>>=-u,u+=n;u>0;s=256*s+e[r+l],l+=d,u-=8);if(0===a)a=1-c;else{if(a===i)return s?NaN:1/0*(C?-1:1);s+=Math.pow(2,n),a-=c}return(C?-1:1)*s*Math.pow(2,a-n)},r.write=function(e,r,t,n,_,a){var s,o,i,c=8*a-_-1,u=(1<>1,d=23===_?Math.pow(2,-24)-Math.pow(2,-77):0,C=n?0:a-1,E=n?1:-1,f=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(o=isNaN(r)?1:0,s=u):(s=Math.floor(Math.log(r)/Math.LN2),r*(i=Math.pow(2,-s))<1&&(s--,i*=2),(r+=s+l>=1?d/i:d*Math.pow(2,1-l))*i>=2&&(s++,i/=2),s+l>=u?(o=0,s=u):s+l>=1?(o=(r*i-1)*Math.pow(2,_),s+=l):(o=r*Math.pow(2,l-1)*Math.pow(2,_),s=0));_>=8;e[t+C]=255&o,C+=E,o/=256,_-=8);for(s=s<<_|o,c+=_;c>0;e[t+C]=255&s,C+=E,s/=256,c-=8);e[t+C-E]|=128*f}},function(e,r){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.addAttachedSignature=void 0;var constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2),_getCadesCert_1=__webpack_require__(5),_getDateObj_1=__webpack_require__(7);exports.addAttachedSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,signedMessage){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin,cadesCertificate;return __generator(this,(function(_a){switch(_a.label){case 0:return cadesplugin=window.cadesplugin,[4,_getCadesCert_1._getCadesCert(thumbprint)];case 1:return cadesCertificate=_a.sent(),[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),r=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CadesSignedData"),t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.CPSigner")}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации подписи")}var n,_,a,s=_getDateObj_1._getDateObj(new Date);try{_generateCadesFn_1.__cadesAsyncToken__,e.propset_Name(constants_1.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME),_generateCadesFn_1.__cadesAsyncToken__,e.propset_Value(s)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{n=Buffer.from(signedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),_=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,_.Add(e),_generateCadesFn_1.__cadesAsyncToken__,r.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,r.propset_Content(n),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,r.VerifyCades(signedMessage,cadesplugin.CADESCOM_PKCS7_TYPE),a=_generateCadesFn_1.__cadesAsyncToken__+r.CoSignCades(t,cadesplugin.CADESCOM_PKCS7_TYPE)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return a})))]}}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var __awaiter=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))((function(_,a){function s(e){try{i(n.next(e))}catch(e){a(e)}}function o(e){try{i(n.throw(e))}catch(e){a(e)}}function i(e){var r;e.done?_(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(s,o)}i((n=n.apply(e,r||[])).next())}))},__generator=this&&this.__generator||function(e,r){var t,n,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,n&&(_=2&a[0]?n.return:a[0]?n.throw||((_=n.return)&&_.call(n),0):n.next)&&!(_=_.call(n,a[1])).done)return _;switch(n=0,_&&(a=[2&a[0],_.value]),a[0]){case 0:case 1:_=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(_=s.trys,(_=_.length>0&&_[_.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!_||a[1]>_[0]&&a[1]<_[3])){s.label=a[1];break}if(6===a[0]&&s.label<_[1]){s.label=_[1],_=a;break}if(_&&s.label<_[2]){s.label=_[2],s.ops.push(a);break}_[2]&&s.ops.pop(),s.trys.pop();continue}a=r.call(e,s)}catch(e){a=[6,e],n=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,o])}}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createHash=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.createHash=_afterPluginsLoaded_1._afterPluginsLoaded((function(unencryptedMessage){return __awaiter(void 0,void 0,void 0,(function(){var cadesplugin;return __generator(this,(function(_a){return cadesplugin=window.cadesplugin,[2,eval(_generateCadesFn_1._generateCadesFn((function(){var e,r,t=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.HashedData");try{e=Buffer.from(unencryptedMessage).toString("base64")}catch(e){throw console.error(e),new Error("Ошибка при преобразовании сообщения в Base64")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256),_generateCadesFn_1.__cadesAsyncToken__,t.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,t.Hash(e)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при инициализации хэширования")}try{r=_generateCadesFn_1.__cadesAsyncToken__+t.Value}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при создании хэша")}return r})))]}))}))}))}).call(this,__webpack_require__(8).Buffer)},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCspVersion=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getCspVersion=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cspVersion=null;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),cspVersion=_generateCadesFn_1.__cadesAsyncToken__+e.CSPVersion(),cspVersion=_generateCadesFn_1.__cadesAsyncToken__+cspVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении версии системы")}return cspVersion})))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPluginVersion=void 0;var _afterPluginsLoaded_1=__webpack_require__(0),_generateCadesFn_1=__webpack_require__(2),_extractMeaningfulErrorMessage_1=__webpack_require__(1);exports.getPluginVersion=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesVersion=null;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CAdESCOM.About"),(cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.PluginVersion)||(cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+e.Version),cadesVersion=_generateCadesFn_1.__cadesAsyncToken__+cadesVersion.toString()}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении информации о плагине")}return cadesVersion})))}))}])})); //# sourceMappingURL=crypto-pro-js.min.js.map \ No newline at end of file diff --git a/dist/crypto-pro-js.min.js.map b/dist/crypto-pro-js.min.js.map index a609cfe..f0e43b0 100644 --- a/dist/crypto-pro-js.min.js.map +++ b/dist/crypto-pro-js.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isSetLogLevel","isPluginLoaded","_afterPluginsLoaded","fn","canPromise","Boolean","Promise","error","console","Error","_extractMeaningfulErrorMessage","cadesplugin","set_log_level","LOG_LEVEL_ERROR","apply","this","args","errorContainer","getLastError","message","test","searchResult","match","__cadesAsyncToken__","__createCadesPluginObject__","_generateCadesFn","callback","cadesGeneratorsAPI","CreateObjectAsync","callbackName","callbackLiteral","String","callbackArguments","callbackBody","replace","crossEnvCallbackLiteral","Function","join","_getCadesCert","thumbprint","_getCadesUserCert","cadesCertificate","log","_getCadesContainerCert","_extractCommonName","subjectName","_getDateObj","dateObj","getVarDate","base64","ieee754","isArray","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","length","RangeError","Uint8Array","__proto__","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","array","byteOffset","byteLength","undefined","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","write","slice","fromString","obj","isBuffer","len","checked","copy","buffer","val","type","data","fromObject","assertSize","size","toString","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","start","end","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","bidirectionalIndexOf","dir","isNaN","arrayIndexOf","indexOf","lastIndexOf","arr","indexSize","arrLength","valLength","read","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","push","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","Math","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","fromCharCode","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","global","foo","subarray","e","typedArraySupport","poolSize","_augment","species","configurable","fill","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","swap16","swap32","swap64","arguments","equals","inspect","max","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","Array","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","code","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","trim","stringtrim","base64clean","src","dst","certificatesCache","getCertificates","resetCache","getUserCertificates","availableCertificates","getContainerCertificates","find","cert","eval","cadesStore","cadesCertificates","cadesCertificatesCount","Open","CAPICOM_CURRENT_USER_STORE","CAPICOM_MY_STORE","CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED","Certificates","Find","CAPICOM_CERTIFICATE_FIND_TIME_VALID","CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY","CAPICOM_PROPID_KEY_PROV_INFO","Count","certificateList","Item","Certificate","SubjectName","IssuerName","Thumbprint","ValidFromDate","ValidToDate","Close","getCadesProp","propName","_cadesCertificate","propertyValue","CADESCOM_CONTAINER_STORE","getAllCertificates","getAllUserCertificates","getAllContainerCertificates","getSystemInfo","sysInfo","cadesVersion","cspVersion","cadesAbout","PluginVersion","CSPVersion","Version","getCertificate","validOnly","foundCertificate","pluginObject","plugin_resolved","plugin_reject","plugin_resolve","isOpera","isFireFox","isSafari","isYandex","cadesplugin_loaded_event_recieved","isFireFoxExtensionLoaded","resolve","reject","browserSpecs","check_browser","ru_cryptopro_npcades_10_native_bridge","callbacksCount","callbacks","resultForCallback","callbackId","resultArray","functionName","hasCallback","iframe","document","createElement","arrObjs","setAttribute","encodeURIComponent","JSON","stringify","alert","documentElement","appendChild","parentNode","removeChild","JSModuleVersion","async_spawn","set_pluginObject","is_capilite_enabled","isNativeMessageSupported","ReleasePluginObjects","CreateObject","cadesplugin_load_timeout","setTimeout","check_load_timeout","set_constantValues","current_log_level","check_plugin_working","tem","ua","navigator","userAgent","M","version","exec","appName","appVersion","splice","cpcsp_console_log","level","msg","LOG_LEVEL_DEBUG","LOG_LEVEL_INFO","info","postMessage","CAPICOM_MEMORY_STORE","CAPICOM_LOCAL_MACHINE_STORE","CAPICOM_SMART_CARD_USER_STORE","CADESCOM_MEMORY_STORE","CADESCOM_LOCAL_MACHINE_STORE","CADESCOM_CURRENT_USER_STORE","CADESCOM_SMART_CARD_USER_STORE","CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING","CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE","CADESCOM_XADES_DEFAULT","CADESCOM_XADES_BES","CADESCOM_XADES_T","CADESCOM_XADES_X_LONG_TYPE_1","CADESCOM_XMLDSIG_TYPE","XmlDsigGost3410UrlObsolete","XmlDsigGost3411UrlObsolete","XmlDsigGost3410Url","XmlDsigGost3411Url","XmlDsigGost3411Url2012256","XmlDsigGost3410Url2012256","XmlDsigGost3411Url2012512","XmlDsigGost3410Url2012512","CADESCOM_CADES_DEFAULT","CADESCOM_CADES_BES","CADESCOM_CADES_T","CADESCOM_CADES_X_LONG_TYPE_1","CADESCOM_PKCS7_TYPE","CADESCOM_ENCODE_BASE64","CADESCOM_ENCODE_BINARY","CADESCOM_ENCODE_ANY","CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT","CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN","CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY","CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME","CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME","CAPICOM_CERTIFICATE_FIND_SHA1_HASH","CAPICOM_CERTIFICATE_FIND_ISSUER_NAME","CAPICOM_CERTIFICATE_FIND_ROOT_NAME","CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME","CAPICOM_CERTIFICATE_FIND_EXTENSION","CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY","CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY","CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID","CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED","CAPICOM_CERTIFICATE_FIND_KEY_USAGE","CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE","CAPICOM_PROPID_ENHKEY_USAGE","CAPICOM_OID_OTHER","CAPICOM_OID_KEY_USAGE_EXTENSION","CAPICOM_EKU_CLIENT_AUTH","CAPICOM_EKU_SMARTCARD_LOGON","CAPICOM_EKU_OTHER","CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO","CADESCOM_ATTRIBUTE_OTHER","CADESCOM_STRING_TO_UCS2LE","CADESCOM_BASE64_TO_BINARY","CADESCOM_DISPLAY_DATA_NONE","CADESCOM_DISPLAY_DATA_CONTENT","CADESCOM_DISPLAY_DATA_ATTRIBUTE","CADESCOM_ENCRYPTION_ALGORITHM_RC2","CADESCOM_ENCRYPTION_ALGORITHM_RC4","CADESCOM_ENCRYPTION_ALGORITHM_DES","CADESCOM_ENCRYPTION_ALGORITHM_3DES","CADESCOM_ENCRYPTION_ALGORITHM_AES","CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89","CADESCOM_HASH_ALGORITHM_SHA1","CADESCOM_HASH_ALGORITHM_MD2","CADESCOM_HASH_ALGORITHM_MD4","CADESCOM_HASH_ALGORITHM_MD5","CADESCOM_HASH_ALGORITHM_SHA_256","CADESCOM_HASH_ALGORITHM_SHA_384","CADESCOM_HASH_ALGORITHM_SHA_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC","CADESCOM_AllowNone","CADESCOM_AllowNoOutstandingRequest","CADESCOM_AllowUntrustedCertificate","CADESCOM_AllowUntrustedRoot","CADESCOM_SkipInstallToStore","CADESCOM_InstallCertChainToContainer","CADESCOM_UseContainerStore","ENABLE_CARRIER_TYPE_CSP","ENABLE_CARRIER_TYPE_FKC_NO_SM","ENABLE_CARRIER_TYPE_FKC_SM","ENABLE_ANY_CARRIER_TYPE","DISABLE_EVERY_CARRIER_OPERATION","ENABLE_CARRIER_OPEN_ENUM","ENABLE_CARRIER_CREATE","ENABLE_ANY_OPERATION","CADESCOM_PRODUCT_CSP","CADESCOM_PRODUCT_OCSP","CADESCOM_PRODUCT_TSP","MEDIA_TYPE_REGISTRY","MEDIA_TYPE_HDIMAGE","MEDIA_TYPE_CLOUD","MEDIA_TYPE_SCARD","XCN_CRYPT_STRING_BASE64HEADER","AT_KEYEXCHANGE","AT_SIGNATURE","CARRIER_FLAG_REMOVABLE","CARRIER_FLAG_UNIQUE","CARRIER_FLAG_PROTECTED","CARRIER_FLAG_FUNCTIONAL_CARRIER","CARRIER_FLAG_SECURE_MESSAGING","CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE","CARRIER_FLAG_VIRTUAL","generatorFunc","continuer","verb","result","generator","err","done","then","onFulfilled","onRejected","isIE","isIOS","call_ru_cryptopro_npcades_10_native_bridge","getElementById","ActiveXObject","decimalToHexString","number","toUpperCase","GetMessageFromException","exception","cpcsp_chrome_nmcades","tmpobj","ex","response","show_firefox_missing_extension_dialog","cadesplugin_skip_extension_install","ovr","id","style","innerHTML","getElementsByTagName","addEventListener","plugin_loaded_error","visibility","firefox_or_safari_nmcades_onload","cadesplugin_extension_loaded_callback","check_chrome_plugin","plugin_loaded","nmcades_api_onload","event","url","substring","fileref","onerror","onload","load_extension","load_npapi_plugin","elem","elem1","elem2","createPromise","check_npapi_plugin","display","mimetype","mimeTypes","enabledPlugin","div","readyState","EnableInternalCSP","issuerName","validFrom","validTo","getOwnerInfo","getInfo","SUBJECT_TAGS_TRANSLATIONS","getIssuerInfo","ISSUER_TAGS_TRANSLATIONS","getExtendedKeyUsage","getDecodedExtendedKeyUsage","getAlgorithm","isValid","exportBase64","hasExtendedKeyUsage","oids","CAPICOM_ACTIVE_DIRECTORY_USER_STORE","CAPICOM_PROPID_ACCESS_STATE","CAPICOM_PROPID_ARCHIVED","CAPICOM_PROPID_ARCHIVED_KEY_HASH","CAPICOM_PROPID_AUTO_ENROLL","CAPICOM_PROPID_CROSS_CERT_DIST_POINTS","CAPICOM_PROPID_CTL_USAGE","CAPICOM_PROPID_DATE_STAMP","CAPICOM_PROPID_DESCRIPTION","CAPICOM_PROPID_EFS","CAPICOM_PROPID_ENROLLMENT","CAPICOM_PROPID_EXTENDED_ERROR_INFO","CAPICOM_PROPID_FIRST_RESERVED","CAPICOM_PROPID_FIRST_USER","CAPICOM_PROPID_FORTEZZA_DATA","CAPICOM_PROPID_FRIENDLY_NAME","CAPICOM_PROPID_HASH_PROP","CAPICOM_PROPID_IE30_RESERVED","CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH","CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH","CAPICOM_PROPID_KEY_CONTEXT","CAPICOM_PROPID_KEY_IDENTIFIER","CAPICOM_PROPID_KEY_PROV_HANDLE","CAPICOM_PROPID_KEY_SPEC","CAPICOM_PROPID_LAST_RESERVED","CAPICOM_PROPID_LAST_USER","CAPICOM_PROPID_MD5_HASH","CAPICOM_PROPID_NEXT_UPDATE_LOCATION","CAPICOM_PROPID_PUBKEY_ALG_PARA","CAPICOM_PROPID_PUBKEY_HASH_RESERVED","CAPICOM_PROPID_PVK_FILE","CAPICOM_PROPID_RENEWAL","CAPICOM_PROPID_SHA1_HASH","CAPICOM_PROPID_SIGNATURE_HASH","CAPICOM_PROPID_SMART_CARD_DATA","CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH","CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH","CAPICOM_PROPID_UNKNOWN","CAPICOM_STORE_OPEN_EXISTING_ONLY","CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED","CAPICOM_STORE_OPEN_READ_ONLY","CAPICOM_STORE_OPEN_READ_WRITE","CHECK_NONE","CHECK_OFFLINE_REVOCATION_STATUS","CHECK_ONLINE_REVOCATION_STATUS","CHECK_SIGNATURE_VALIDITY","CHECK_TIME_VALIDITY","CHECK_TRUSTED_ROOT","TRUST_CTL_IS_NOT_SIGNATURE_VALID","TRUST_CTL_IS_NOT_TIME_VALID","TRUST_CTL_IS_NOT_VALID_FOR_USAGE","TRUST_IS_CYCLIC","TRUST_IS_NOT_SIGNATURE_VALID","TRUST_IS_NOT_TIME_NESTED","TRUST_IS_NOT_TIME_VALID","TRUST_IS_NOT_VALID_FOR_USAGE","TRUST_IS_PARTIAL_CHAIN","TRUST_IS_REVOKED","TRUST_IS_UNTRUSTED_ROOT","TRUST_REVOCATION_STATUS_UNKNOWN","possibleNames","translation","OIDS_DICTIONARY","Export","cadesPublicKey","algorithmInfo","algorithm","oid","PublicKey","Algorithm","FriendlyName","Value","reduce","decodedOids","oidCode","count","OIDS","ExtendedKeyUsage","EKUs","cadesExtendedKeyUsage","OID","tags","entitiesPath","entities","_parseCertInfo","tagsTranslations","rawInfo","extractedEntities","map","group","segmentsMatch","title","description","oidIdentifierMatch","oidIdentifier","isTranslated","oidTranslation","tagTranslation","tag","certOids","every","oidToCheck","some","certOid","IsValid","Result","isValidSystemSetup","systemInfo","_isSupportedCadesVersion","_isSupportedCSPVersion","major","patch","createXMLSignature","unencryptedMessage","cadesSigner","cadesSignedXML","signature","propset_Certificate","propset_CheckCertificate","propset_Content","propset_SignatureType","propset_SignatureMethod","propset_DigestMethod","Sign","cadesCertificateList","certificatesCount","createDetachedSignature","messageHash","cadesAttrs","cadesHashedData","cadesSignedData","cadesAuthAttrs","currentTime","Date","propset_Name","propset_Value","AuthenticatedAttributes2","Add","propset_Options","propset_Algorithm","SetHashValue","SignHash","addDetachedSignature","signedMessage","VerifyHash","CoSignHash","createAttachedSignature","messageBase64","propset_ContentEncoding","SignCades","g","b64","lens","getLens","validLen","placeHoldersLen","tmp","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","parts","len2","encodeChunk","lookup","num","output","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","abs","LN2","addAttachedSignature","VerifyCades","CoSignCades","createHash","hash","propset_DataEncoding","Hash","getCspVersion","getPluginVersion"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,YAAa,GAAIH,GACE,iBAAZC,QACdA,QAAmB,UAAID,IAEvBD,EAAgB,UAAIC,IARtB,CASGK,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EA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qB,EAAgB1D,MAC7C,MAAOhoB,GAGP,MAFAC,QAAQD,MAAMA,GAER,IAAIE,MAAM,iCAAAC,+BAA+BH,IAAU,4BAG3D,OAAOivB,kB,2JCnDf,iDACA,wDACA,0CAOa,QAAAG,cAAgB,sBAAAzvB,qBAAoB,WAC/C,IAAIqT,WAAa,KAEjB,OAAOlC,KACL,mBAAA5P,kBAAiB,WACf,IAAI+R,EAEJ,IACEA,EAAa,mBAAAjS,oBAAsB,mBAAAC,4BAA4B,kBAE/D+R,WAAa,mBAAAhS,oBAAsBiS,EAAWE,aAE9CH,WAAa,mBAAAhS,oBAAsBgS,WAAW3N,WAC9C,MAAOrF,GAGP,MAFAC,QAAQD,MAAMA,GAER,IAAIE,MAAM,iCAAAC,+BAA+BH,IAAU,uCAG3D,OAAOgT,mB,iHC5Bb,iDACA,0CACA,wDAOa,QAAAqc,iBAAmB,sBAAA1vB,qBAAoB,WAClD,IAAIoT,aAAe,KAEnB,OAAOjC,KACL,mBAAA5P,kBAAiB,WACf,IAAI+R,EAEJ,IACEA,EAAa,mBAAAjS,oBAAsB,mBAAAC,4BAA4B,mBAE/D8R,aAAe,mBAAA/R,oBAAsBiS,EAAWC,iBAG9CH,aAAe,mBAAA/R,oBAAsBiS,EAAWG,SAGlDL,aAAe,mBAAA/R,oBAAsB+R,aAAa1N,WAClD,MAAOrF,GAGP,MAFAC,QAAQD,MAAMA,GAER,IAAIE,MAAM,iCAAAC,+BAA+BH,IAAU,6CAG3D,OAAO+S","file":"crypto-pro-js.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 17);\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","export * from './certificate';\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","export * from './api';\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Тип' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Владелец' },\n { possibleNames: ['SN'], translation: 'Фамилия' },\n { possibleNames: ['G'], translation: 'Имя Отчество' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isSetLogLevel","isPluginLoaded","_afterPluginsLoaded","fn","canPromise","Boolean","Promise","error","console","Error","_extractMeaningfulErrorMessage","cadesplugin","set_log_level","LOG_LEVEL_ERROR","apply","this","args","errorContainer","getLastError","message","test","searchResult","match","__cadesAsyncToken__","__createCadesPluginObject__","_generateCadesFn","callback","cadesGeneratorsAPI","CreateObjectAsync","callbackName","callbackLiteral","String","callbackArguments","callbackBody","replace","crossEnvCallbackLiteral","Function","join","_getCadesCert","thumbprint","_getCadesUserCert","cadesCertificate","log","_getCadesContainerCert","_extractCommonName","subjectName","_getDateObj","dateObj","getVarDate","base64","ieee754","isArray","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","length","RangeError","Uint8Array","__proto__","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","array","byteOffset","byteLength","undefined","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","write","slice","fromString","obj","isBuffer","len","checked","copy","buffer","val","type","data","fromObject","assertSize","size","toString","isView","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","start","end","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","b","bidirectionalIndexOf","dir","isNaN","arrayIndexOf","indexOf","lastIndexOf","arr","indexSize","arrLength","valLength","read","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","push","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","units","hi","lo","utf16leToBytes","fromByteArray","Math","min","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","fromCharCode","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","global","foo","subarray","e","typedArraySupport","poolSize","_augment","species","configurable","fill","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","swap16","swap32","swap64","arguments","equals","inspect","max","target","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","Array","_arr","ret","out","toHex","bytes","checkOffset","ext","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","floor","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","set","code","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","trim","stringtrim","base64clean","src","dst","certificatesCache","getCertificates","resetCache","getUserCertificates","availableCertificates","getContainerCertificates","find","cert","eval","cadesStore","cadesCertificates","cadesCertificatesCount","Open","CAPICOM_CURRENT_USER_STORE","CAPICOM_MY_STORE","CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED","Certificates","Find","CAPICOM_CERTIFICATE_FIND_TIME_VALID","CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY","CAPICOM_PROPID_KEY_PROV_INFO","Count","certificateList","Item","Certificate","SubjectName","IssuerName","Thumbprint","ValidFromDate","ValidToDate","Close","getCadesProp","propName","_cadesCertificate","propertyValue","CADESCOM_CONTAINER_STORE","getAllCertificates","getAllUserCertificates","getAllContainerCertificates","getSystemInfo","sysInfo","cadesVersion","cspVersion","cadesAbout","PluginVersion","CSPVersion","Version","getCertificate","validOnly","foundCertificate","pluginObject","plugin_resolved","plugin_reject","plugin_resolve","isOpera","isFireFox","isSafari","isYandex","cadesplugin_loaded_event_recieved","isFireFoxExtensionLoaded","resolve","reject","browserSpecs","check_browser","ru_cryptopro_npcades_10_native_bridge","callbacksCount","callbacks","resultForCallback","callbackId","resultArray","functionName","hasCallback","iframe","document","createElement","arrObjs","setAttribute","encodeURIComponent","JSON","stringify","alert","documentElement","appendChild","parentNode","removeChild","JSModuleVersion","async_spawn","set_pluginObject","is_capilite_enabled","isNativeMessageSupported","ReleasePluginObjects","CreateObject","cadesplugin_load_timeout","setTimeout","check_load_timeout","set_constantValues","current_log_level","check_plugin_working","tem","ua","navigator","userAgent","M","version","exec","appName","appVersion","splice","cpcsp_console_log","level","msg","LOG_LEVEL_DEBUG","LOG_LEVEL_INFO","info","postMessage","CAPICOM_MEMORY_STORE","CAPICOM_LOCAL_MACHINE_STORE","CAPICOM_SMART_CARD_USER_STORE","CADESCOM_MEMORY_STORE","CADESCOM_LOCAL_MACHINE_STORE","CADESCOM_CURRENT_USER_STORE","CADESCOM_SMART_CARD_USER_STORE","CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED","CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING","CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE","CADESCOM_XADES_DEFAULT","CADESCOM_XADES_BES","CADESCOM_XADES_T","CADESCOM_XADES_X_LONG_TYPE_1","CADESCOM_XMLDSIG_TYPE","XmlDsigGost3410UrlObsolete","XmlDsigGost3411UrlObsolete","XmlDsigGost3410Url","XmlDsigGost3411Url","XmlDsigGost3411Url2012256","XmlDsigGost3410Url2012256","XmlDsigGost3411Url2012512","XmlDsigGost3410Url2012512","CADESCOM_CADES_DEFAULT","CADESCOM_CADES_BES","CADESCOM_CADES_T","CADESCOM_CADES_X_LONG_TYPE_1","CADESCOM_PKCS7_TYPE","CADESCOM_ENCODE_BASE64","CADESCOM_ENCODE_BINARY","CADESCOM_ENCODE_ANY","CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT","CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN","CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY","CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME","CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME","CAPICOM_CERTIFICATE_FIND_SHA1_HASH","CAPICOM_CERTIFICATE_FIND_ISSUER_NAME","CAPICOM_CERTIFICATE_FIND_ROOT_NAME","CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME","CAPICOM_CERTIFICATE_FIND_EXTENSION","CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY","CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY","CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID","CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED","CAPICOM_CERTIFICATE_FIND_KEY_USAGE","CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE","CAPICOM_PROPID_ENHKEY_USAGE","CAPICOM_OID_OTHER","CAPICOM_OID_KEY_USAGE_EXTENSION","CAPICOM_EKU_CLIENT_AUTH","CAPICOM_EKU_SMARTCARD_LOGON","CAPICOM_EKU_OTHER","CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME","CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION","CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO","CADESCOM_ATTRIBUTE_OTHER","CADESCOM_STRING_TO_UCS2LE","CADESCOM_BASE64_TO_BINARY","CADESCOM_DISPLAY_DATA_NONE","CADESCOM_DISPLAY_DATA_CONTENT","CADESCOM_DISPLAY_DATA_ATTRIBUTE","CADESCOM_ENCRYPTION_ALGORITHM_RC2","CADESCOM_ENCRYPTION_ALGORITHM_RC4","CADESCOM_ENCRYPTION_ALGORITHM_DES","CADESCOM_ENCRYPTION_ALGORITHM_3DES","CADESCOM_ENCRYPTION_ALGORITHM_AES","CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89","CADESCOM_HASH_ALGORITHM_SHA1","CADESCOM_HASH_ALGORITHM_MD2","CADESCOM_HASH_ALGORITHM_MD4","CADESCOM_HASH_ALGORITHM_MD5","CADESCOM_HASH_ALGORITHM_SHA_256","CADESCOM_HASH_ALGORITHM_SHA_384","CADESCOM_HASH_ALGORITHM_SHA_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC","CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC","CADESCOM_AllowNone","CADESCOM_AllowNoOutstandingRequest","CADESCOM_AllowUntrustedCertificate","CADESCOM_AllowUntrustedRoot","CADESCOM_SkipInstallToStore","CADESCOM_InstallCertChainToContainer","CADESCOM_UseContainerStore","ENABLE_CARRIER_TYPE_CSP","ENABLE_CARRIER_TYPE_FKC_NO_SM","ENABLE_CARRIER_TYPE_FKC_SM","ENABLE_ANY_CARRIER_TYPE","DISABLE_EVERY_CARRIER_OPERATION","ENABLE_CARRIER_OPEN_ENUM","ENABLE_CARRIER_CREATE","ENABLE_ANY_OPERATION","CADESCOM_PRODUCT_CSP","CADESCOM_PRODUCT_OCSP","CADESCOM_PRODUCT_TSP","MEDIA_TYPE_REGISTRY","MEDIA_TYPE_HDIMAGE","MEDIA_TYPE_CLOUD","MEDIA_TYPE_SCARD","XCN_CRYPT_STRING_BASE64HEADER","AT_KEYEXCHANGE","AT_SIGNATURE","CARRIER_FLAG_REMOVABLE","CARRIER_FLAG_UNIQUE","CARRIER_FLAG_PROTECTED","CARRIER_FLAG_FUNCTIONAL_CARRIER","CARRIER_FLAG_SECURE_MESSAGING","CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE","CARRIER_FLAG_VIRTUAL","generatorFunc","continuer","verb","result","generator","err","done","then","onFulfilled","onRejected","isIE","isIOS","call_ru_cryptopro_npcades_10_native_bridge","getElementById","ActiveXObject","decimalToHexString","number","toUpperCase","GetMessageFromException","exception","cpcsp_chrome_nmcades","tmpobj","ex","response","show_firefox_missing_extension_dialog","cadesplugin_skip_extension_install","ovr","id","style","innerHTML","getElementsByTagName","addEventListener","plugin_loaded_error","visibility","firefox_or_safari_nmcades_onload","cadesplugin_extension_loaded_callback","check_chrome_plugin","plugin_loaded","nmcades_api_onload","event","url","substring","fileref","onerror","onload","load_extension","load_npapi_plugin","elem","elem1","elem2","createPromise","check_npapi_plugin","display","mimetype","mimeTypes","enabledPlugin","div","readyState","EnableInternalCSP","issuerName","validFrom","validTo","getOwnerInfo","getInfo","SUBJECT_TAGS_TRANSLATIONS","getIssuerInfo","ISSUER_TAGS_TRANSLATIONS","getExtendedKeyUsage","getDecodedExtendedKeyUsage","getAlgorithm","isValid","exportBase64","hasExtendedKeyUsage","oids","CAPICOM_ACTIVE_DIRECTORY_USER_STORE","CAPICOM_PROPID_ACCESS_STATE","CAPICOM_PROPID_ARCHIVED","CAPICOM_PROPID_ARCHIVED_KEY_HASH","CAPICOM_PROPID_AUTO_ENROLL","CAPICOM_PROPID_CROSS_CERT_DIST_POINTS","CAPICOM_PROPID_CTL_USAGE","CAPICOM_PROPID_DATE_STAMP","CAPICOM_PROPID_DESCRIPTION","CAPICOM_PROPID_EFS","CAPICOM_PROPID_ENROLLMENT","CAPICOM_PROPID_EXTENDED_ERROR_INFO","CAPICOM_PROPID_FIRST_RESERVED","CAPICOM_PROPID_FIRST_USER","CAPICOM_PROPID_FORTEZZA_DATA","CAPICOM_PROPID_FRIENDLY_NAME","CAPICOM_PROPID_HASH_PROP","CAPICOM_PROPID_IE30_RESERVED","CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH","CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH","CAPICOM_PROPID_KEY_CONTEXT","CAPICOM_PROPID_KEY_IDENTIFIER","CAPICOM_PROPID_KEY_PROV_HANDLE","CAPICOM_PROPID_KEY_SPEC","CAPICOM_PROPID_LAST_RESERVED","CAPICOM_PROPID_LAST_USER","CAPICOM_PROPID_MD5_HASH","CAPICOM_PROPID_NEXT_UPDATE_LOCATION","CAPICOM_PROPID_PUBKEY_ALG_PARA","CAPICOM_PROPID_PUBKEY_HASH_RESERVED","CAPICOM_PROPID_PVK_FILE","CAPICOM_PROPID_RENEWAL","CAPICOM_PROPID_SHA1_HASH","CAPICOM_PROPID_SIGNATURE_HASH","CAPICOM_PROPID_SMART_CARD_DATA","CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH","CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH","CAPICOM_PROPID_UNKNOWN","CAPICOM_STORE_OPEN_EXISTING_ONLY","CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED","CAPICOM_STORE_OPEN_READ_ONLY","CAPICOM_STORE_OPEN_READ_WRITE","CHECK_NONE","CHECK_OFFLINE_REVOCATION_STATUS","CHECK_ONLINE_REVOCATION_STATUS","CHECK_SIGNATURE_VALIDITY","CHECK_TIME_VALIDITY","CHECK_TRUSTED_ROOT","TRUST_CTL_IS_NOT_SIGNATURE_VALID","TRUST_CTL_IS_NOT_TIME_VALID","TRUST_CTL_IS_NOT_VALID_FOR_USAGE","TRUST_IS_CYCLIC","TRUST_IS_NOT_SIGNATURE_VALID","TRUST_IS_NOT_TIME_NESTED","TRUST_IS_NOT_TIME_VALID","TRUST_IS_NOT_VALID_FOR_USAGE","TRUST_IS_PARTIAL_CHAIN","TRUST_IS_REVOKED","TRUST_IS_UNTRUSTED_ROOT","TRUST_REVOCATION_STATUS_UNKNOWN","possibleNames","translation","OIDS_DICTIONARY","Export","cadesPublicKey","algorithmInfo","algorithm","oid","PublicKey","Algorithm","FriendlyName","Value","reduce","decodedOids","oidCode","count","OIDS","ExtendedKeyUsage","EKUs","cadesExtendedKeyUsage","OID","tags","entitiesPath","entities","_parseCertInfo","tagsTranslations","rawInfo","extractedEntities","map","group","segmentsMatch","title","description","oidIdentifierMatch","oidIdentifier","isTranslated","oidTranslation","tagTranslation","tag","certOids","every","oidToCheck","some","certOid","IsValid","Result","isValidSystemSetup","systemInfo","_isSupportedCadesVersion","_isSupportedCSPVersion","major","patch","createXMLSignature","unencryptedMessage","cadesSigner","cadesSignedXML","signature","propset_Certificate","propset_CheckCertificate","propset_Content","propset_SignatureType","propset_SignatureMethod","propset_DigestMethod","Sign","cadesCertificateList","certificatesCount","createDetachedSignature","messageHash","cadesAttrs","cadesHashedData","cadesSignedData","cadesAuthAttrs","currentTime","Date","propset_Name","propset_Value","AuthenticatedAttributes2","Add","propset_Options","propset_Algorithm","SetHashValue","SignHash","addDetachedSignature","signedMessage","VerifyHash","CoSignHash","createAttachedSignature","messageBase64","propset_ContentEncoding","SignCades","g","b64","lens","getLens","validLen","placeHoldersLen","tmp","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","parts","len2","encodeChunk","lookup","num","output","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","abs","LN2","addAttachedSignature","VerifyCades","CoSignCades","createHash","hash","propset_DataEncoding","Hash","getCspVersion","getPluginVersion"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACx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AA5P,kBAAiB,WACf,IAAI+R,EAEJ,IACEA,EAAa,mBAAAjS,oBAAsB,mBAAAC,4BAA4B,kBAE/D+R,WAAa,mBAAAhS,oBAAsBiS,EAAWE,aAE9CH,WAAa,mBAAAhS,oBAAsBgS,WAAW3N,WAC9C,MAAOrF,GAGP,MAFAC,QAAQD,MAAMA,GAER,IAAIE,MAAM,iCAAAC,+BAA+BH,IAAU,uCAG3D,OAAOgT,mB,iJC5Bb,iDACA,0CACA,wDAOa,QAAAqc,iBAAmB,sBAAA1vB,qBAAoB,WAClD,IAAIoT,aAAe,KAEnB,OAAOjC,KACL,mBAAA5P,kBAAiB,WACf,IAAI+R,EAEJ,IACEA,EAAa,mBAAAjS,oBAAsB,mBAAAC,4BAA4B,mBAE/D8R,aAAe,mBAAA/R,oBAAsBiS,EAAWC,iBAG9CH,aAAe,mBAAA/R,oBAAsBiS,EAAWG,SAGlDL,aAAe,mBAAA/R,oBAAsB+R,aAAa1N,WAClD,MAAOrF,GAGP,MAFAC,QAAQD,MAAMA,GAER,IAAIE,MAAM,iCAAAC,+BAA+BH,IAAU,6CAG3D,OAAO+S","file":"crypto-pro-js.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 17);\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","export * from './certificate';\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","export * from './api';\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.100.4': 'ИНН организации',\n '1.2.643.100.1': 'ОГРН',\n '1.2.643.100.5': 'ОГРНИП',\n '1.2.643.100.3': 'СНИЛС',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Владелец' },\n { possibleNames: ['SN', 'surname'], translation: 'Фамилия' },\n { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/helpers/_extractCommonName.d.ts b/dist/helpers/_extractCommonName.d.ts index 25df5a9..173ca6b 100644 --- a/dist/helpers/_extractCommonName.d.ts +++ b/dist/helpers/_extractCommonName.d.ts @@ -1 +1 @@ -export declare const _extractCommonName: (subjectName: string) => string; +export declare const _extractCommonName: (subjectName: string) => string | undefined; diff --git a/dist/helpers/_extractMeaningfulErrorMessage.d.ts b/dist/helpers/_extractMeaningfulErrorMessage.d.ts index 827d8d9..0233a1c 100644 --- a/dist/helpers/_extractMeaningfulErrorMessage.d.ts +++ b/dist/helpers/_extractMeaningfulErrorMessage.d.ts @@ -1 +1 @@ -export declare const _extractMeaningfulErrorMessage: (error: Error) => string; +export declare const _extractMeaningfulErrorMessage: (error: Error) => string | null; diff --git a/examples/script-tag/package-lock.json b/examples/script-tag/package-lock.json index 2c8ad9b..5921a65 100755 --- a/examples/script-tag/package-lock.json +++ b/examples/script-tag/package-lock.json @@ -1,14 +1,14 @@ { "name": "crypto-pro-example-es5-script-tag", - "version": "0.0.0", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "crypto-pro-example-es5-script-tag", - "version": "0.0.0", + "version": "2.3.3", "dependencies": { - "crypto-pro-js": "^2.3.2" + "crypto-pro-js": "^2.3.3" }, "devDependencies": { "node-static": "0.7.11", @@ -59,9 +59,12 @@ "dev": true }, "node_modules/crypto-pro-js": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.2.tgz", - "integrity": "sha512-XD5STnobroyuli5k/8udnv5oOwZpVhf1/3uoD7/FMSbBQSTstu1IOS+uckFC3I2LRvDOmdzntYAZqyY/1/NB1A==" + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.3.tgz", + "integrity": "sha512-ge6PXRw6pu2kXeaqwEpHvmQEuSRQWJcVfQfPfF5gGONIi+jUHFsvkeS5ojFcKKBDqFHnYUQXFZ1aMKDGdoVRqg==", + "engines": { + "node": "~16" + } }, "node_modules/fs.realpath": { "version": "1.0.0", @@ -311,9 +314,9 @@ "dev": true }, "crypto-pro-js": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.2.tgz", - "integrity": "sha512-XD5STnobroyuli5k/8udnv5oOwZpVhf1/3uoD7/FMSbBQSTstu1IOS+uckFC3I2LRvDOmdzntYAZqyY/1/NB1A==" + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/crypto-pro-js/-/crypto-pro-js-2.3.3.tgz", + "integrity": "sha512-ge6PXRw6pu2kXeaqwEpHvmQEuSRQWJcVfQfPfF5gGONIi+jUHFsvkeS5ojFcKKBDqFHnYUQXFZ1aMKDGdoVRqg==" }, "fs.realpath": { "version": "1.0.0", diff --git a/examples/script-tag/package.json b/examples/script-tag/package.json index 9c06481..b24fca9 100644 --- a/examples/script-tag/package.json +++ b/examples/script-tag/package.json @@ -1,6 +1,6 @@ { "name": "crypto-pro-example-es5-script-tag", - "version": "0.0.0", + "version": "2.3.3", "description": "Пример использования пакета crypto-pro через тэг script", "private": true, "scripts": { @@ -13,6 +13,6 @@ "symlink-dir": "3.1.2" }, "dependencies": { - "crypto-pro-js": "^2.3.2" + "crypto-pro-js": "^2.3.3" } } diff --git a/lib/constants/oids-dictionary.d.ts b/lib/constants/oids-dictionary.d.ts index cedee7d..d0305b6 100644 --- a/lib/constants/oids-dictionary.d.ts +++ b/lib/constants/oids-dictionary.d.ts @@ -2,6 +2,10 @@ export declare const OIDS_DICTIONARY: { '1.2.643.2.2.34.6': string; '1.2.643.2.39.1.1': string; '1.2.643.3.131.1.1': string; + '1.2.643.100.4': string; + '1.2.643.100.1': string; + '1.2.643.100.5': string; + '1.2.643.100.3': string; '1.2.643.3.141.1.1': string; '1.2.643.3.141.1.2': string; '1.2.643.3.2.100.65.13.11': string; diff --git a/lib/crypto-pro-js.d.ts b/lib/crypto-pro-js.d.ts index abe9c18..16d7c47 100644 --- a/lib/crypto-pro-js.d.ts +++ b/lib/crypto-pro-js.d.ts @@ -1,4 +1,4 @@ -// Type definitions for crypto-pro-js 2.3.2 +// Type definitions for crypto-pro-js 2.3.3 // Project: crypto-pro-js // Definitions by: Artem Vasilev https://github.com/kernusr diff --git a/lib/crypto-pro-js.js b/lib/crypto-pro-js.js index fa8b2b8..3a46a85 100644 --- a/lib/crypto-pro-js.js +++ b/lib/crypto-pro-js.js @@ -2222,6 +2222,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.addAttachedSignature = void 0; const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -2317,6 +2318,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.addDetachedSignature = void 0; const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -2407,6 +2409,7 @@ exports.addDetachedSignature = _afterPluginsLoaded_1._afterPluginsLoaded((thumbp "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.Certificate = void 0; const constants_1 = __webpack_require__(/*! ../../constants */ "./constants/index.ts"); const exportBase64_1 = __webpack_require__(/*! ./exportBase64 */ "./api/certificate/exportBase64.ts"); const getAlgorithm_1 = __webpack_require__(/*! ./getAlgorithm */ "./api/certificate/getAlgorithm.ts"); @@ -2469,6 +2472,7 @@ exports.Certificate = Certificate; "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.exportBase64 = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2505,6 +2509,7 @@ exports.exportBase64 = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAlgorithm = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2548,6 +2553,7 @@ exports.getAlgorithm = _afterPluginsLoaded_1._afterPluginsLoaded(function () { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCadesProp = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2594,6 +2600,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getDecodedExtendedKeyUsage = void 0; const constants_1 = __webpack_require__(/*! ../../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); /** @@ -2621,6 +2628,7 @@ exports.getDecodedExtendedKeyUsage = _afterPluginsLoaded_1._afterPluginsLoaded(f "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getExtendedKeyUsage = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2680,6 +2688,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getInfo = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _parseCertInfo_1 = __webpack_require__(/*! ../../helpers/_parseCertInfo */ "./helpers/_parseCertInfo.ts"); @@ -2727,6 +2736,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasExtendedKeyUsage = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); /** * Проверяет наличие ОИД'а (ОИД'ов) у сертификата @@ -2760,11 +2770,18 @@ exports.hasExtendedKeyUsage = _afterPluginsLoaded_1._afterPluginsLoaded(function "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate.ts")); +__exportStar(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate.ts"), exports); /***/ }), @@ -2779,6 +2796,7 @@ __export(__webpack_require__(/*! ./certificate */ "./api/certificate/certificate "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValid = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -2825,6 +2843,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createAttachedSignature = void 0; const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -2919,6 +2938,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDetachedSignature = void 0; const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -3015,6 +3035,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createHash = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3083,6 +3104,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.createXMLSignature = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3157,6 +3179,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllCertificates = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const getAllUserCertificates_1 = __webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts"); const getAllContainerCertificates_1 = __webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts"); @@ -3219,6 +3242,7 @@ exports.getAllCertificates = _afterPluginsLoaded_1._afterPluginsLoaded((resetCac "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllContainerCertificates = void 0; const certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractCommonName_1 = __webpack_require__(/*! ../helpers/_extractCommonName */ "./helpers/_extractCommonName.ts"); @@ -3298,6 +3322,7 @@ exports.getAllContainerCertificates = _afterPluginsLoaded_1._afterPluginsLoaded( "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAllUserCertificates = void 0; const certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractCommonName_1 = __webpack_require__(/*! ../helpers/_extractCommonName */ "./helpers/_extractCommonName.ts"); @@ -3385,6 +3410,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCertificate = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const getCertificates_1 = __webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts"); const getAllCertificates_1 = __webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts"); @@ -3435,6 +3461,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCertificates = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const getUserCertificates_1 = __webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts"); const getContainerCertificates_1 = __webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts"); @@ -3497,6 +3524,7 @@ exports.getCertificates = _afterPluginsLoaded_1._afterPluginsLoaded((resetCache "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getContainerCertificates = void 0; const certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); @@ -3588,6 +3616,7 @@ exports.getContainerCertificates = _afterPluginsLoaded_1._afterPluginsLoaded((re "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getCspVersion = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3626,6 +3655,7 @@ exports.getCspVersion = _afterPluginsLoaded_1._afterPluginsLoaded(() => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPluginVersion = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); @@ -3667,6 +3697,7 @@ exports.getPluginVersion = _afterPluginsLoaded_1._afterPluginsLoaded(() => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getSystemInfo = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ../helpers/_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -3713,6 +3744,7 @@ exports.getSystemInfo = _afterPluginsLoaded_1._afterPluginsLoaded(() => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getUserCertificates = void 0; const certificate_1 = __webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"); const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); @@ -3802,28 +3834,35 @@ exports.getUserCertificates = _afterPluginsLoaded_1._afterPluginsLoaded((resetCa "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./getCertificate */ "./api/getCertificate.ts")); -__export(__webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts")); -__export(__webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts")); -__export(__webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts")); -__export(__webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts")); -__export(__webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts")); -__export(__webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts")); -__export(__webpack_require__(/*! ./getSystemInfo */ "./api/getSystemInfo.ts")); -__export(__webpack_require__(/*! ./isValidSystemSetup */ "./api/isValidSystemSetup.ts")); -__export(__webpack_require__(/*! ./createXMLSignature */ "./api/createXMLSignature.ts")); -__export(__webpack_require__(/*! ./createDetachedSignature */ "./api/createDetachedSignature.ts")); -__export(__webpack_require__(/*! ./addDetachedSignature */ "./api/addDetachedSignature.ts")); -__export(__webpack_require__(/*! ./createAttachedSignature */ "./api/createAttachedSignature.ts")); -__export(__webpack_require__(/*! ./addAttachedSignature */ "./api/addAttachedSignature.ts")); -__export(__webpack_require__(/*! ./createHash */ "./api/createHash.ts")); -__export(__webpack_require__(/*! ./certificate */ "./api/certificate/index.ts")); -__export(__webpack_require__(/*! ./getCspVersion */ "./api/getCspVersion.ts")); -__export(__webpack_require__(/*! ./getPluginVersion */ "./api/getPluginVersion.ts")); +__exportStar(__webpack_require__(/*! ./getCertificate */ "./api/getCertificate.ts"), exports); +__exportStar(__webpack_require__(/*! ./getUserCertificates */ "./api/getUserCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllUserCertificates */ "./api/getAllUserCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getContainerCertificates */ "./api/getContainerCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllContainerCertificates */ "./api/getAllContainerCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getCertificates */ "./api/getCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getAllCertificates */ "./api/getAllCertificates.ts"), exports); +__exportStar(__webpack_require__(/*! ./getSystemInfo */ "./api/getSystemInfo.ts"), exports); +__exportStar(__webpack_require__(/*! ./isValidSystemSetup */ "./api/isValidSystemSetup.ts"), exports); +__exportStar(__webpack_require__(/*! ./createXMLSignature */ "./api/createXMLSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createDetachedSignature */ "./api/createDetachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./addDetachedSignature */ "./api/addDetachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createAttachedSignature */ "./api/createAttachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./addAttachedSignature */ "./api/addAttachedSignature.ts"), exports); +__exportStar(__webpack_require__(/*! ./createHash */ "./api/createHash.ts"), exports); +__exportStar(__webpack_require__(/*! ./certificate */ "./api/certificate/index.ts"), exports); +__exportStar(__webpack_require__(/*! ./getCspVersion */ "./api/getCspVersion.ts"), exports); +__exportStar(__webpack_require__(/*! ./getPluginVersion */ "./api/getPluginVersion.ts"), exports); /***/ }), @@ -3847,6 +3886,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.isValidSystemSetup = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ../helpers/_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ../helpers/_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _isSupportedCadesVersion_1 = __webpack_require__(/*! ../helpers/_isSupportedCadesVersion */ "./helpers/_isSupportedCadesVersion.ts"); @@ -3888,6 +3928,7 @@ exports.isValidSystemSetup = _afterPluginsLoaded_1._afterPluginsLoaded(() => __a "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.XmlDsigGost3411UrlObsolete = exports.XmlDsigGost3411Url = exports.XmlDsigGost3410UrlObsolete = exports.XmlDsigGost3410Url = exports.TRUST_REVOCATION_STATUS_UNKNOWN = exports.TRUST_IS_UNTRUSTED_ROOT = exports.TRUST_IS_REVOKED = exports.TRUST_IS_PARTIAL_CHAIN = exports.TRUST_IS_NOT_VALID_FOR_USAGE = exports.TRUST_IS_NOT_TIME_VALID = exports.TRUST_IS_NOT_TIME_NESTED = exports.TRUST_IS_NOT_SIGNATURE_VALID = exports.TRUST_IS_CYCLIC = exports.TRUST_CTL_IS_NOT_VALID_FOR_USAGE = exports.TRUST_CTL_IS_NOT_TIME_VALID = exports.TRUST_CTL_IS_NOT_SIGNATURE_VALID = exports.LOG_LEVEL_INFO = exports.LOG_LEVEL_ERROR = exports.LOG_LEVEL_DEBUG = exports.CHECK_TRUSTED_ROOT = exports.CHECK_TIME_VALIDITY = exports.CHECK_SIGNATURE_VALIDITY = exports.CHECK_ONLINE_REVOCATION_STATUS = exports.CHECK_OFFLINE_REVOCATION_STATUS = exports.CHECK_NONE = exports.CAPICOM_STORE_OPEN_READ_WRITE = exports.CAPICOM_STORE_OPEN_READ_ONLY = exports.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = exports.CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = exports.CAPICOM_STORE_OPEN_EXISTING_ONLY = exports.CAPICOM_SMART_CARD_USER_STORE = exports.CAPICOM_PROPID_UNKNOWN = exports.CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = exports.CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = exports.CAPICOM_PROPID_SMART_CARD_DATA = exports.CAPICOM_PROPID_SIGNATURE_HASH = exports.CAPICOM_PROPID_SHA1_HASH = exports.CAPICOM_PROPID_RENEWAL = exports.CAPICOM_PROPID_PVK_FILE = exports.CAPICOM_PROPID_PUBKEY_HASH_RESERVED = exports.CAPICOM_PROPID_PUBKEY_ALG_PARA = exports.CAPICOM_PROPID_NEXT_UPDATE_LOCATION = exports.CAPICOM_PROPID_MD5_HASH = exports.CAPICOM_PROPID_LAST_USER = exports.CAPICOM_PROPID_LAST_RESERVED = exports.CAPICOM_PROPID_KEY_SPEC = exports.CAPICOM_PROPID_KEY_PROV_INFO = exports.CAPICOM_PROPID_KEY_PROV_HANDLE = exports.CAPICOM_PROPID_KEY_IDENTIFIER = exports.CAPICOM_PROPID_KEY_CONTEXT = exports.CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = exports.CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = exports.CAPICOM_PROPID_IE30_RESERVED = exports.CAPICOM_PROPID_HASH_PROP = exports.CAPICOM_PROPID_FRIENDLY_NAME = exports.CAPICOM_PROPID_FORTEZZA_DATA = exports.CAPICOM_PROPID_FIRST_USER = exports.CAPICOM_PROPID_FIRST_RESERVED = exports.CAPICOM_PROPID_EXTENDED_ERROR_INFO = exports.CAPICOM_PROPID_ENROLLMENT = exports.CAPICOM_PROPID_ENHKEY_USAGE = exports.CAPICOM_PROPID_EFS = exports.CAPICOM_PROPID_DESCRIPTION = exports.CAPICOM_PROPID_DATE_STAMP = exports.CAPICOM_PROPID_CTL_USAGE = exports.CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = exports.CAPICOM_PROPID_AUTO_ENROLL = exports.CAPICOM_PROPID_ARCHIVED_KEY_HASH = exports.CAPICOM_PROPID_ARCHIVED = exports.CAPICOM_PROPID_ACCESS_STATE = exports.CAPICOM_OID_OTHER = exports.CAPICOM_OID_KEY_USAGE_EXTENSION = exports.CAPICOM_MY_STORE = exports.CAPICOM_MEMORY_STORE = exports.CAPICOM_LOCAL_MACHINE_STORE = exports.CAPICOM_EKU_SMARTCARD_LOGON = exports.CAPICOM_EKU_OTHER = exports.CAPICOM_EKU_CLIENT_AUTH = exports.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = exports.CAPICOM_CURRENT_USER_STORE = exports.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = exports.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = exports.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = exports.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = exports.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = exports.CAPICOM_CERTIFICATE_FIND_TIME_VALID = exports.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = exports.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = exports.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = exports.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = exports.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = exports.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = exports.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = exports.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = exports.CAPICOM_CERTIFICATE_FIND_EXTENSION = exports.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = exports.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = exports.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = exports.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = exports.CAPICOM_ACTIVE_DIRECTORY_USER_STORE = exports.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = exports.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = exports.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = exports.CADESCOM_SkipInstallToStore = exports.CADESCOM_STRING_TO_UCS2LE = exports.CADESCOM_PKCS7_TYPE = exports.CADESCOM_LOCAL_MACHINE_STORE = exports.CADESCOM_HASH_ALGORITHM_SHA_512 = exports.CADESCOM_HASH_ALGORITHM_SHA_384 = exports.CADESCOM_HASH_ALGORITHM_SHA_256 = exports.CADESCOM_HASH_ALGORITHM_SHA1 = exports.CADESCOM_HASH_ALGORITHM_MD5 = exports.CADESCOM_HASH_ALGORITHM_MD4 = exports.CADESCOM_HASH_ALGORITHM_MD2 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = exports.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = exports.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = exports.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = exports.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = exports.CADESCOM_ENCRYPTION_ALGORITHM_DES = exports.CADESCOM_ENCRYPTION_ALGORITHM_AES = exports.CADESCOM_ENCRYPTION_ALGORITHM_3DES = exports.CADESCOM_ENCODE_BINARY = exports.CADESCOM_ENCODE_BASE64 = exports.CADESCOM_ENCODE_ANY = exports.CADESCOM_DISPLAY_DATA_NONE = exports.CADESCOM_DISPLAY_DATA_CONTENT = exports.CADESCOM_DISPLAY_DATA_ATTRIBUTE = exports.CADESCOM_CURRENT_USER_STORE = exports.CADESCOM_CONTAINER_STORE = exports.CADESCOM_CADES_X_LONG_TYPE_1 = exports.CADESCOM_CADES_T = exports.CADESCOM_CADES_DEFAULT = exports.CADESCOM_CADES_BES = exports.CADESCOM_BASE64_TO_BINARY = exports.CADESCOM_AllowUntrustedRoot = exports.CADESCOM_AllowUntrustedCertificate = exports.CADESCOM_AllowNone = exports.CADESCOM_AllowNoOutstandingRequest = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = exports.CADESCOM_ATTRIBUTE_OTHER = void 0; exports.CADESCOM_ATTRIBUTE_OTHER = -1; exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2; exports.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1; @@ -4050,14 +4091,21 @@ exports.XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gos "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./cades-constants */ "./constants/cades-constants.ts")); -__export(__webpack_require__(/*! ./issuer-tags-translations */ "./constants/issuer-tags-translations.ts")); -__export(__webpack_require__(/*! ./oids-dictionary */ "./constants/oids-dictionary.ts")); -__export(__webpack_require__(/*! ./subject-tags-translations */ "./constants/subject-tags-translations.ts")); +__exportStar(__webpack_require__(/*! ./cades-constants */ "./constants/cades-constants.ts"), exports); +__exportStar(__webpack_require__(/*! ./issuer-tags-translations */ "./constants/issuer-tags-translations.ts"), exports); +__exportStar(__webpack_require__(/*! ./oids-dictionary */ "./constants/oids-dictionary.ts"), exports); +__exportStar(__webpack_require__(/*! ./subject-tags-translations */ "./constants/subject-tags-translations.ts"), exports); /***/ }), @@ -4072,21 +4120,23 @@ __export(__webpack_require__(/*! ./subject-tags-translations */ "./constants/sub "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.ISSUER_TAGS_TRANSLATIONS = void 0; exports.ISSUER_TAGS_TRANSLATIONS = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Удостоверяющий центр' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Тип' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; @@ -4102,10 +4152,15 @@ exports.ISSUER_TAGS_TRANSLATIONS = [ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.OIDS_DICTIONARY = void 0; exports.OIDS_DICTIONARY = { '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации', '1.2.643.2.39.1.1': 'Использование в программных продуктах системы "1С:Предприятие 8"', '1.2.643.3.131.1.1': 'ИНН', + '1.2.643.100.4': 'ИНН организации', + '1.2.643.100.1': 'ОГРН', + '1.2.643.100.5': 'ОГРНИП', + '1.2.643.100.3': 'СНИЛС', '1.2.643.3.141.1.1': 'РНС ФСС', '1.2.643.3.141.1.2': 'КП ФСС', '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС "Госзакупки" Сахалинской области.', @@ -4160,23 +4215,25 @@ exports.OIDS_DICTIONARY = { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports.SUBJECT_TAGS_TRANSLATIONS = void 0; exports.SUBJECT_TAGS_TRANSLATIONS = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Владелец' }, - { possibleNames: ['SN'], translation: 'Фамилия' }, - { possibleNames: ['G'], translation: 'Имя Отчество' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Отдел/подразделение' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Владелец' }, + { possibleNames: ['SN', 'surname'], translation: 'Фамилия' }, + { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; @@ -4191,11 +4248,18 @@ exports.SUBJECT_TAGS_TRANSLATIONS = [ "use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); +}; Object.defineProperty(exports, "__esModule", { value: true }); -__export(__webpack_require__(/*! ./api */ "./api/index.ts")); +__exportStar(__webpack_require__(/*! ./api */ "./api/index.ts"), exports); /***/ }), @@ -4219,6 +4283,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports._afterPluginsLoaded = void 0; const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); let isSetLogLevel = false; let isPluginLoaded = false; @@ -4272,6 +4337,7 @@ exports._afterPluginsLoaded = (fn) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._extractCommonName = void 0; exports._extractCommonName = (subjectName) => { var _a, _b; return (_b = (_a = subjectName.match(/CN="?(.+?)"?(?:,|$)/)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); }; @@ -4287,6 +4353,7 @@ exports._extractCommonName = (subjectName) => { var _a, _b; return (_b = (_a = s "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._extractMeaningfulErrorMessage = void 0; exports._extractMeaningfulErrorMessage = (error) => { var _a; let errorContainer = ((_a = window.cadesplugin) === null || _a === void 0 ? void 0 : _a.getLastError) && window.cadesplugin.getLastError(error); @@ -4317,6 +4384,7 @@ exports._extractMeaningfulErrorMessage = (error) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._generateCadesFn = exports.__createCadesPluginObject__ = exports.__cadesAsyncToken__ = void 0; // синтетические переменные, которые подменяются в рантайме exports.__cadesAsyncToken__ = {}; exports.__createCadesPluginObject__ = (...args) => ({}); @@ -4365,6 +4433,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesCert = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _getCadesUserCert_1 = __webpack_require__(/*! ./_getCadesUserCert */ "./helpers/_getCadesUserCert.ts"); const _getCadesContainerCert_1 = __webpack_require__(/*! ./_getCadesContainerCert */ "./helpers/_getCadesContainerCert.ts"); @@ -4399,6 +4468,7 @@ exports._getCadesCert = _afterPluginsLoaded_1._afterPluginsLoaded((thumbprint) = "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesContainerCert = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ./_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -4476,6 +4546,7 @@ exports._getCadesContainerCert = _afterPluginsLoaded_1._afterPluginsLoaded((thum "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getCadesUserCert = void 0; const _afterPluginsLoaded_1 = __webpack_require__(/*! ./_afterPluginsLoaded */ "./helpers/_afterPluginsLoaded.ts"); const _extractMeaningfulErrorMessage_1 = __webpack_require__(/*! ./_extractMeaningfulErrorMessage */ "./helpers/_extractMeaningfulErrorMessage.ts"); const _generateCadesFn_1 = __webpack_require__(/*! ./_generateCadesFn */ "./helpers/_generateCadesFn.ts"); @@ -4552,6 +4623,7 @@ exports._getCadesUserCert = _afterPluginsLoaded_1._afterPluginsLoaded((thumbprin "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._getDateObj = void 0; /** * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера. * @@ -4573,6 +4645,7 @@ exports._getDateObj = (dateObj) => (dateObj.getVarDate ? dateObj.getVarDate() : "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._isSupportedCSPVersion = void 0; const oldestSupportedCSPVersion = 4.0; exports._isSupportedCSPVersion = (version) => { var _a; @@ -4593,6 +4666,7 @@ exports._isSupportedCSPVersion = (version) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._isSupportedCadesVersion = void 0; exports._isSupportedCadesVersion = (version) => { const match = version.match(/(\d+)\.(\d+)\.(\d+)/); if (!match) { @@ -4621,6 +4695,7 @@ exports._isSupportedCadesVersion = (version) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); +exports._parseCertInfo = void 0; const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"); /** * Парсит информацию из строки с информацией о сертификате diff --git a/lib/crypto-pro-js.js.map b/lib/crypto-pro-js.js.map index 4c765ce..514eb70 100644 --- a/lib/crypto-pro-js.js.map +++ b/lib/crypto-pro-js.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFY;;AAEZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,iDAAS;AAC/B,cAAc,mBAAO,CAAC,qEAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;AC5vDA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB,WAAW,UAAU,YAAY,aAAa;AACrG,+EAA+E,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAC1M,oEAAoE,iBAAiB,yBAAyB,WAAW;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,CAAC","file":"crypto-pro-js.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./crypto-pro-js.ts\");\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","export * from './certificate';\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Тип' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN'], translation: 'Владелец' },\n { possibleNames: ['SN'], translation: 'Фамилия' },\n { possibleNames: ['G'], translation: 'Имя Отчество' },\n { possibleNames: ['C'], translation: 'Страна' },\n { possibleNames: ['S'], translation: 'Регион' },\n { possibleNames: ['STREET'], translation: 'Адрес' },\n { possibleNames: ['O'], translation: 'Компания' },\n { possibleNames: ['OU'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },\n { possibleNames: ['E'], translation: 'Email' },\n { possibleNames: ['L'], translation: 'Город' },\n];\n","export * from './api';\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://cryptoPro/webpack/universalModuleDefinition","webpack://cryptoPro/webpack/bootstrap","webpack://cryptoPro/../node_modules/base64-js/index.js","webpack://cryptoPro/../node_modules/buffer/index.js","webpack://cryptoPro/../node_modules/buffer/node_modules/isarray/index.js","webpack://cryptoPro/../node_modules/ieee754/index.js","webpack://cryptoPro/../node_modules/webpack/buildin/global.js","webpack://cryptoPro/./api/addAttachedSignature.ts","webpack://cryptoPro/./api/addDetachedSignature.ts","webpack://cryptoPro/./api/certificate/certificate.ts","webpack://cryptoPro/./api/certificate/exportBase64.ts","webpack://cryptoPro/./api/certificate/getAlgorithm.ts","webpack://cryptoPro/./api/certificate/getCadesProp.ts","webpack://cryptoPro/./api/certificate/getDecodedExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/getInfo.ts","webpack://cryptoPro/./api/certificate/hasExtendedKeyUsage.ts","webpack://cryptoPro/./api/certificate/index.ts","webpack://cryptoPro/./api/certificate/isValid.ts","webpack://cryptoPro/./api/createAttachedSignature.ts","webpack://cryptoPro/./api/createDetachedSignature.ts","webpack://cryptoPro/./api/createHash.ts","webpack://cryptoPro/./api/createXMLSignature.ts","webpack://cryptoPro/./api/getAllCertificates.ts","webpack://cryptoPro/./api/getAllContainerCertificates.ts","webpack://cryptoPro/./api/getAllUserCertificates.ts","webpack://cryptoPro/./api/getCertificate.ts","webpack://cryptoPro/./api/getCertificates.ts","webpack://cryptoPro/./api/getContainerCertificates.ts","webpack://cryptoPro/./api/getCspVersion.ts","webpack://cryptoPro/./api/getPluginVersion.ts","webpack://cryptoPro/./api/getSystemInfo.ts","webpack://cryptoPro/./api/getUserCertificates.ts","webpack://cryptoPro/./api/index.ts","webpack://cryptoPro/./api/isValidSystemSetup.ts","webpack://cryptoPro/./constants/cades-constants.ts","webpack://cryptoPro/./constants/index.ts","webpack://cryptoPro/./constants/issuer-tags-translations.ts","webpack://cryptoPro/./constants/oids-dictionary.ts","webpack://cryptoPro/./constants/subject-tags-translations.ts","webpack://cryptoPro/./crypto-pro-js.ts","webpack://cryptoPro/./helpers/_afterPluginsLoaded.ts","webpack://cryptoPro/./helpers/_extractCommonName.ts","webpack://cryptoPro/./helpers/_extractMeaningfulErrorMessage.ts","webpack://cryptoPro/./helpers/_generateCadesFn.ts","webpack://cryptoPro/./helpers/_getCadesCert.ts","webpack://cryptoPro/./helpers/_getCadesContainerCert.ts","webpack://cryptoPro/./helpers/_getCadesUserCert.ts","webpack://cryptoPro/./helpers/_getDateObj.ts","webpack://cryptoPro/./helpers/_isSupportedCSPVersion.ts","webpack://cryptoPro/./helpers/_isSupportedCadesVersion.ts","webpack://cryptoPro/./helpers/_parseCertInfo.ts","webpack://cryptoPro/./vendor/cadesplugin_api.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFY;;AAEZ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kCAAkC,SAAS;AAC3C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0CAA0C,UAAU;AACpD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACrJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEY;;AAEZ,aAAa,mBAAO,CAAC,qDAAW;AAChC,cAAc,mBAAO,CAAC,iDAAS;AAC/B,cAAc,mBAAO,CAAC,qEAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,qBAAqB,mDAAmD;AACxE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,UAAU;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA,uCAAuC,SAAS;AAChD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gDAAgD,EAAE;AAClD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,wBAAwB,QAAQ;AAChC;AACA,qBAAqB,eAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,qBAAqB,SAAS;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,OAAO;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,qBAAqB,QAAQ;AAC7B;AACA;AACA,GAAG;AACH;AACA,eAAe,SAAS;AACxB;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,mBAAmB,SAAS;AAC5B;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;AC5vDA,iBAAiB;;AAEjB;AACA;AACA;;;;;;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA;AACA,QAAQ,WAAW;;AAEnB;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qDAAqD;AACrD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,iBAAiB,WAAW,UAAU,YAAY,aAAa;AACrG,+EAA+E,aAAa,mBAAmB,uBAAuB,uBAAuB,cAAc,mBAAmB,YAAY;AAC1M,oEAAoE,iBAAiB,yBAAyB,WAAW;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,CAAC","file":"crypto-pro-js.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"cryptoPro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"cryptoPro\"] = factory();\n\telse\n\t\troot[\"cryptoPro\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./crypto-pro-js.ts\");\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет присоединенную подпись к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const addAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(signedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n void (__cadesAsyncToken__ + cadesSignedData.VerifyCades(signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE));\n signature = __cadesAsyncToken__ + cadesSignedData.CoSignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Добавляет отсоединенную подпись хеша к подписанному сообщению по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param signedMessage - подписанное сообщение\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const addDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, signedMessage: string | ArrayBuffer, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function addDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesSignedData.VerifyHash(cadesHashedData, signedMessage, cadesplugin.CADESCOM_PKCS7_TYPE)\n );\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.CoSignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { ISSUER_TAGS_TRANSLATIONS, SUBJECT_TAGS_TRANSLATIONS } from '../../constants';\nimport { TagTranslation } from '../../helpers/_parseCertInfo';\nimport { exportBase64 } from './exportBase64';\nimport { getAlgorithm } from './getAlgorithm';\nimport { getCadesProp } from './getCadesProp';\nimport { getDecodedExtendedKeyUsage, ExtendedKeysTranslations } from './getDecodedExtendedKeyUsage';\nimport { getExtendedKeyUsage } from './getExtendedKeyUsage';\nimport { getInfo } from './getInfo';\nimport { hasExtendedKeyUsage } from './hasExtendedKeyUsage';\nimport { isValid } from './isValid';\n\nexport type CadesCertificate = any;\n\nexport class Certificate {\n constructor(\n public _cadesCertificate: CadesCertificate,\n public name: string,\n public issuerName: string,\n public subjectName: string,\n public thumbprint: string,\n public validFrom: string,\n public validTo: string,\n ) {}\n\n public getOwnerInfo(): Promise {\n return getInfo.call(this, SUBJECT_TAGS_TRANSLATIONS, 'SubjectName');\n }\n\n public getIssuerInfo(): Promise {\n return getInfo.call(this, ISSUER_TAGS_TRANSLATIONS, 'IssuerName');\n }\n\n public getExtendedKeyUsage(): Promise {\n return getExtendedKeyUsage.call(this);\n }\n\n public getDecodedExtendedKeyUsage(): Promise {\n return getDecodedExtendedKeyUsage.call(this);\n }\n\n public getAlgorithm(): Promise {\n return getAlgorithm.call(this);\n }\n\n public getCadesProp(propName): Promise {\n return getCadesProp.call(this, propName);\n }\n\n public isValid(): Promise {\n return isValid.call(this);\n }\n\n public exportBase64(): Promise {\n return exportBase64.call(this);\n }\n\n public hasExtendedKeyUsage(oids): Promise {\n return hasExtendedKeyUsage.call(this, oids);\n }\n}\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Экспортирует сертификат в формате base64\n *\n * @returns сертификат в формате base64\n */\nexport const exportBase64 = _afterPluginsLoaded(function (): string {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function exportBase64(): string {\n let base64: string;\n\n try {\n base64 = __cadesAsyncToken__ + cadesCertificate.Export(0);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при экспорте сертификата');\n }\n\n return base64;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\ninterface AlgorithmInfo {\n algorithm: string;\n oid: string;\n}\n\n/**\n * Возвращает информацию об алгоритме сертификата\n *\n * @returns информацию об алгоритме и его OID'е\n */\nexport const getAlgorithm = _afterPluginsLoaded(function (): AlgorithmInfo {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getAlgorithm(): AlgorithmInfo {\n const algorithmInfo: AlgorithmInfo = {\n algorithm: null,\n oid: null,\n };\n let cadesPublicKey;\n\n try {\n cadesPublicKey = __cadesAsyncToken__ + cadesCertificate.PublicKey();\n cadesPublicKey = __cadesAsyncToken__ + cadesPublicKey.Algorithm;\n algorithmInfo.algorithm = __cadesAsyncToken__ + cadesPublicKey.FriendlyName;\n algorithmInfo.oid = __cadesAsyncToken__ + cadesPublicKey.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении алгоритма');\n }\n\n return algorithmInfo;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает указанное внутренее свойство у сертификата в формате Cades\n *\n * @param propName = наименование свойства\n * @returns значение запрошенного свойства\n */\nexport const getCadesProp = _afterPluginsLoaded(function (propName: string): any {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getCadesProp() {\n let propertyValue;\n\n try {\n propertyValue = __cadesAsyncToken__ + cadesCertificate[propName];\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при обращении к свойству сертификата');\n }\n\n return propertyValue;\n }),\n );\n});\n","import { OIDS_DICTIONARY } from '../../constants';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\nexport interface ExtendedKeysTranslations {\n [key: string]: string | null;\n}\n\n/**\n * Возвращает расшифрованные ОИД'ы сертификата\n *\n * @returns словарь расшифрованных ОИД'ов\n */\nexport const getDecodedExtendedKeyUsage = _afterPluginsLoaded(async function (): Promise {\n const certificateOids = await (this as Certificate).getExtendedKeyUsage();\n\n return certificateOids.reduce(\n (decodedOids, oidCode) => ({\n ...decodedOids,\n [oidCode]: OIDS_DICTIONARY[oidCode] || null,\n }),\n {},\n );\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Возвращает ОИД'ы сертификата\n *\n * @returns список ОИД'ов\n */\nexport const getExtendedKeyUsage = _afterPluginsLoaded(function (): string[] {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function getExtendedKeyUsage(): string[] {\n const OIDS: string[] = [];\n let count: any;\n\n try {\n count = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n count = __cadesAsyncToken__ + count.EKUs;\n count = __cadesAsyncToken__ + count.Count;\n\n if (count > 0) {\n while (count > 0) {\n let cadesExtendedKeyUsage;\n\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesCertificate.ExtendedKeyUsage();\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.EKUs;\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.Item(count);\n cadesExtendedKeyUsage = __cadesAsyncToken__ + cadesExtendedKeyUsage.OID;\n\n OIDS.push(cadesExtendedKeyUsage);\n\n count--;\n }\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || \"Ошибка при получении ОИД'ов\");\n }\n\n return OIDS;\n }),\n );\n});\n","import { TagsTranslations } from '../../constants/tags-translations';\nimport { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { _parseCertInfo, TagTranslation } from '../../helpers/_parseCertInfo';\nimport { getCadesProp } from './getCadesProp';\n\n/**\n * Возвращает расшифрованную информацию о сертификате из указанного свойства по тэгам\n *\n * @param tags = словарь\n * @param entitiesPath = путь к разбираемой сущности\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const getInfo = _afterPluginsLoaded(async function (\n tags: TagsTranslations[],\n entitiesPath: string,\n): Promise {\n let entities: string;\n\n try {\n entities = await getCadesProp.call(this, entitiesPath);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при извлечении информации из сертификата');\n }\n\n return _parseCertInfo(tags, entities);\n});\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет наличие ОИД'а (ОИД'ов) у сертификата\n *\n * @param oids - ОИД'ы для проверки\n * @returns флаг наличия ОИД'ов у сертификата\n */\nexport const hasExtendedKeyUsage = _afterPluginsLoaded(async function (oids: string | string[]): Promise {\n const certOids = await (this as Certificate).getExtendedKeyUsage();\n\n let result: boolean;\n\n if (Array.isArray(oids)) {\n result = oids.every((oidToCheck) => certOids.some((certOid) => certOid === oidToCheck));\n } else {\n result = certOids.some((certOid) => certOid === oids);\n }\n\n return result;\n});\n","export * from './certificate';\n","import { _afterPluginsLoaded } from '../../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, _generateCadesFn } from '../../helpers/_generateCadesFn';\nimport { Certificate } from './certificate';\n\n/**\n * Проверяет действительность сертификата\n *\n * @returns флаг валидности\n */\nexport const isValid = _afterPluginsLoaded(function (): boolean {\n const cadesCertificate = (this as Certificate)._cadesCertificate;\n\n return eval(\n _generateCadesFn(function isValid() {\n let isValid;\n\n try {\n isValid = __cadesAsyncToken__ + cadesCertificate.IsValid();\n isValid = __cadesAsyncToken__ + isValid.Result;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при проверке сертификата');\n }\n\n return Boolean(isValid);\n }),\n );\n});\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает присоединенную подпись сообщения по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param message - подписываемое сообщение\n * @returns подпись в формате PKCS#7\n */\nexport const createAttachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createAttachedSignature(): string {\n let cadesAttrs;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let messageBase64;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSignedData.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesSignedData.propset_Content(messageBase64));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedData.SignCades(cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\nimport { _getDateObj } from '../helpers/_getDateObj';\n\n/**\n * Создает отсоединенную подпись хеша по отпечатку сертификата\n *\n * @param thumbprint - отпечаток сертификата\n * @param messageHash - хеш подписываемого сообщения, сгенерированный по ГОСТ Р 34.11-2012 256 бит\n * @returns подпись в формате PKCS#7\n */\nexport const createDetachedSignature = _afterPluginsLoaded(\n async (thumbprint: string, messageHash: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createDetachedSignature(): string {\n let cadesAttrs;\n let cadesHashedData;\n let cadesSignedData;\n let cadesSigner;\n\n try {\n cadesAttrs = __cadesAsyncToken__ + __createCadesPluginObject__('CADESCOM.CPAttribute');\n cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n cadesSignedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CadesSignedData');\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n const currentTime = _getDateObj(new Date());\n\n try {\n void (__cadesAsyncToken__ + cadesAttrs.propset_Name(CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME));\n void (__cadesAsyncToken__ + cadesAttrs.propset_Value(currentTime));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке времени подписи');\n }\n\n let cadesAuthAttrs;\n\n try {\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n cadesAuthAttrs = __cadesAsyncToken__ + cadesSigner.AuthenticatedAttributes2;\n void (__cadesAsyncToken__ + cadesAuthAttrs.Add(cadesAttrs));\n void (__cadesAsyncToken__ + cadesSigner.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке сертификата');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.SetHashValue(messageHash));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при установке хеша');\n }\n\n let signature: string;\n\n try {\n signature =\n __cadesAsyncToken__ +\n cadesSignedData.SignHash(cadesHashedData, cadesSigner, cadesplugin.CADESCOM_PKCS7_TYPE);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит\n * https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D0%B8%D0%B1%D0%BE%D0%B3_(%D1%85%D0%B5%D1%88-%D1%84%D1%83%D0%BD%D0%BA%D1%86%D0%B8%D1%8F)\n *\n * @param unencryptedMessage - сообщение для хеширования\n *\n * @returns хеш\n */\nexport const createHash = _afterPluginsLoaded(\n async (unencryptedMessage: string | ArrayBuffer): Promise => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function createHash(): string {\n const cadesHashedData = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.HashedData');\n let messageBase64;\n let hash;\n\n try {\n messageBase64 = Buffer.from(unencryptedMessage).toString('base64');\n } catch (error) {\n console.error(error);\n\n throw new Error('Ошибка при преобразовании сообщения в Base64');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesHashedData.propset_Algorithm(cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256)\n );\n void (__cadesAsyncToken__ + cadesHashedData.propset_DataEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY));\n void (__cadesAsyncToken__ + cadesHashedData.Hash(messageBase64));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации хэширования');\n }\n\n try {\n hash = __cadesAsyncToken__ + cadesHashedData.Value;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при создании хэша');\n }\n\n return hash;\n }),\n );\n },\n);\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _getCadesCert } from '../helpers/_getCadesCert';\n\n/**\n * Создает XML подпись для документа в формате XML\n *\n * @param thumbprint - отпечаток сертификата\n * @param unencryptedMessage - подписываемое сообщение в формате XML\n * @returns подпись\n */\nexport const createXMLSignature = _afterPluginsLoaded(\n async (thumbprint: string, unencryptedMessage: string): Promise => {\n const { cadesplugin } = window;\n const cadesCertificate = await _getCadesCert(thumbprint);\n\n return eval(\n _generateCadesFn(function createXMLSignature(): string {\n let cadesSigner;\n let cadesSignedXML;\n\n try {\n cadesSigner = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.CPSigner');\n cadesSignedXML = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.SignedXML');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации подписи');\n }\n\n try {\n const signatureMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256';\n const digestMethod = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256';\n\n void (__cadesAsyncToken__ + cadesSigner.propset_Certificate(cadesCertificate));\n void (__cadesAsyncToken__ + cadesSigner.propset_CheckCertificate(true));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_Content(unencryptedMessage));\n void (\n __cadesAsyncToken__ +\n cadesSignedXML.propset_SignatureType(cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED)\n );\n void (__cadesAsyncToken__ + cadesSignedXML.propset_SignatureMethod(signatureMethod));\n void (__cadesAsyncToken__ + cadesSignedXML.propset_DigestMethod(digestMethod));\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при указании данных для подписи');\n }\n\n let signature: string;\n\n try {\n signature = __cadesAsyncToken__ + cadesSignedXML.Sign(cadesSigner);\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при подписании данных');\n }\n\n return signature;\n }),\n );\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе, без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getAllUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerAllCertificates: Certificate[] = await getAllContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerAllCertificates;\n } else {\n let containerAllCertificatesCount = containerAllCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerAllCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerAllCertificates[containerAllCertificatesCount]);\n }\n\n containerAllCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { CadesCertificate, Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает все сертификаты без фильтрации по дате и наличию приватного ключа\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getAllUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getAllUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getCertificates } from './getCertificates';\nimport { getAllCertificates } from './getAllCertificates';\n\n/**\n * Возвращает сертификат по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @param validOnly - проверять сертификаты по дате и наличию приватного ключа\n * @returns сертификат\n */\nexport const getCertificate = _afterPluginsLoaded(\n async (thumbprint: string, validOnly: boolean = true): Promise => {\n if (!thumbprint) {\n throw new Error('Отпечаток не указан');\n }\n\n let availableCertificates: Certificate[];\n\n if (validOnly) {\n availableCertificates = await getCertificates();\n } else {\n availableCertificates = await getAllCertificates();\n }\n\n const foundCertificate: Certificate = availableCertificates.find((cert) => cert.thumbprint === thumbprint);\n\n if (!foundCertificate) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден`);\n }\n\n return foundCertificate;\n },\n);\n","import { Certificate } from './certificate';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { getUserCertificates } from './getUserCertificates';\nimport { getContainerCertificates } from './getContainerCertificates';\nimport { getAllUserCertificates } from './getAllUserCertificates';\nimport { getAllContainerCertificates } from './getAllContainerCertificates';\n\nlet certificatesCache: Certificate[];\n/**\n * Возвращает список сертификатов, доступных пользователю из пользовательского хранилища и закрытых ключей, не установленных в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getCertificates = _afterPluginsLoaded(\n async (resetCache: boolean = false): Promise => {\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n let availableCertificates: Certificate[];\n\n try {\n availableCertificates = await getUserCertificates(resetCache);\n } catch (error) {\n console.error(error);\n\n availableCertificates = [];\n }\n\n try {\n const containerCertificates: Certificate[] = await getContainerCertificates(resetCache);\n\n if (!availableCertificates) {\n availableCertificates = containerCertificates;\n } else {\n let containerCertificatesCount = containerCertificates.length - 1;\n let foundAvailableCertificate;\n\n while (containerCertificatesCount) {\n foundAvailableCertificate = availableCertificates.find(\n (cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,\n );\n\n if (!foundAvailableCertificate) {\n availableCertificates.push(containerCertificates[containerCertificatesCount]);\n }\n\n containerCertificatesCount--;\n }\n }\n } catch (error) {\n console.error(error);\n }\n\n if (!availableCertificates) {\n throw new Error('Нет доступных сертификатов');\n }\n\n certificatesCache = availableCertificates;\n\n return certificatesCache;\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Начиная с версии плагина 2.0.13292 есть возможность получить сертификаты из закрытых ключей\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getContainerCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getContainerCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP\n */\nexport const getCspVersion = _afterPluginsLoaded((): string => {\n let cspVersion = null;\n\n return eval(\n _generateCadesFn(function getCspVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n cspVersion = __cadesAsyncToken__ + cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении версии системы');\n }\n\n return cspVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о плагине\n */\nexport const getPluginVersion = _afterPluginsLoaded((): string => {\n let cadesVersion = null;\n\n return eval(\n _generateCadesFn(function getPluginVersion(): string {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n\n if (!cadesVersion) {\n cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n cadesVersion = __cadesAsyncToken__ + cadesVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о плагине');\n }\n\n return cadesVersion;\n }),\n );\n});\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nexport interface SystemInfo {\n cadesVersion: string;\n cspVersion: string;\n}\n\n/**\n * Предоставляет информацию о системе\n *\n * @returns информацию о CSP и плагине\n */\nexport const getSystemInfo = _afterPluginsLoaded(\n (): SystemInfo => {\n const sysInfo = {\n cadesVersion: null,\n cspVersion: null,\n };\n\n return eval(\n _generateCadesFn(function getSystemInfo(): SystemInfo {\n let cadesAbout;\n\n try {\n cadesAbout = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.About');\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.PluginVersion;\n sysInfo.cspVersion = __cadesAsyncToken__ + cadesAbout.CSPVersion();\n\n if (!sysInfo.cadesVersion) {\n sysInfo.cadesVersion = __cadesAsyncToken__ + cadesAbout.Version;\n }\n\n sysInfo.cadesVersion = __cadesAsyncToken__ + sysInfo.cadesVersion.toString();\n sysInfo.cspVersion = __cadesAsyncToken__ + sysInfo.cspVersion.toString();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении информации о системе');\n }\n\n return sysInfo;\n }),\n );\n },\n);\n","import { CadesCertificate, Certificate } from './certificate';\nimport { CAPICOM_PROPID_KEY_PROV_INFO } from '../constants';\nimport { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractCommonName } from '../helpers/_extractCommonName';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from '../helpers/_generateCadesFn';\n\nlet certificatesCache: Certificate[];\n\n/**\n * Возвращает список сертификатов, доступных пользователю в системе\n *\n * @param resetCache = false - позволяет сбросить кэш ранее полученных сертификатов\n * @returns список сертификатов\n */\nexport const getUserCertificates = _afterPluginsLoaded((resetCache: boolean = false): Certificate[] => {\n const { cadesplugin } = window;\n\n if (!resetCache && certificatesCache) {\n return certificatesCache;\n }\n\n return eval(\n _generateCadesFn(function getUserCertificates(): Certificate[] {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища');\n }\n\n let cadesCertificates;\n let cadesCertificatesCount;\n\n try {\n cadesCertificates = __cadesAsyncToken__ + cadesStore.Certificates;\n\n if (cadesCertificates) {\n cadesCertificates =\n __cadesAsyncToken__ + cadesCertificates.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID);\n\n /**\n * Не рассматриваются сертификаты, в которых отсутствует закрытый ключ\n * или не действительны на данный момент\n */\n cadesCertificates =\n __cadesAsyncToken__ +\n cadesCertificates.Find(\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,\n CAPICOM_PROPID_KEY_PROV_INFO,\n );\n\n cadesCertificatesCount = __cadesAsyncToken__ + cadesCertificates.Count;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов');\n }\n\n if (!cadesCertificatesCount) {\n throw new Error('Нет доступных сертификатов');\n }\n\n const certificateList: Certificate[] = [];\n\n try {\n while (cadesCertificatesCount) {\n const cadesCertificate: CadesCertificate =\n __cadesAsyncToken__ + cadesCertificates.Item(cadesCertificatesCount);\n\n certificateList.push(\n new Certificate(\n cadesCertificate,\n _extractCommonName(__cadesAsyncToken__ + cadesCertificate.SubjectName),\n __cadesAsyncToken__ + cadesCertificate.IssuerName,\n __cadesAsyncToken__ + cadesCertificate.SubjectName,\n __cadesAsyncToken__ + cadesCertificate.Thumbprint,\n __cadesAsyncToken__ + cadesCertificate.ValidFromDate,\n __cadesAsyncToken__ + cadesCertificate.ValidToDate,\n ),\n );\n\n cadesCertificatesCount--;\n }\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка обработки сертификатов');\n }\n\n cadesStore.Close();\n\n certificatesCache = certificateList;\n\n return certificatesCache;\n }),\n );\n});\n","export * from './getCertificate';\nexport * from './getUserCertificates';\nexport * from './getAllUserCertificates';\nexport * from './getContainerCertificates';\nexport * from './getAllContainerCertificates';\nexport * from './getCertificates';\nexport * from './getAllCertificates';\nexport * from './getSystemInfo';\nexport * from './isValidSystemSetup';\nexport * from './createXMLSignature';\nexport * from './createDetachedSignature';\nexport * from './addDetachedSignature';\nexport * from './createAttachedSignature';\nexport * from './addAttachedSignature';\nexport * from './createHash';\nexport * from './certificate';\nexport * from './getCspVersion';\nexport * from './getPluginVersion';\n","import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from '../helpers/_extractMeaningfulErrorMessage';\nimport { _isSupportedCadesVersion } from '../helpers/_isSupportedCadesVersion';\nimport { _isSupportedCSPVersion } from '../helpers/_isSupportedCSPVersion';\nimport { getSystemInfo, SystemInfo } from './getSystemInfo';\n\n/**\n * Проверяет корректность настроек ЭП на машине\n *\n * @returns флаг корректности настроек\n */\nexport const isValidSystemSetup = _afterPluginsLoaded(\n async (): Promise => {\n let systemInfo: SystemInfo;\n\n try {\n systemInfo = await getSystemInfo();\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Настройки ЭП на данной машине не верны');\n }\n\n if (!_isSupportedCadesVersion(systemInfo.cadesVersion)) {\n throw new Error('Не поддерживаемая версия плагина');\n }\n\n if (!_isSupportedCSPVersion(systemInfo.cspVersion)) {\n throw new Error('Не поддерживаемая версия CSP');\n }\n\n return true;\n },\n);\n","export const CADESCOM_ATTRIBUTE_OTHER = -1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CADESCOM_AllowNoOutstandingRequest = 1;\nexport const CADESCOM_AllowNone = 0;\nexport const CADESCOM_AllowUntrustedCertificate = 2;\nexport const CADESCOM_AllowUntrustedRoot = 4;\nexport const CADESCOM_BASE64_TO_BINARY = 0x01;\nexport const CADESCOM_CADES_BES = 1;\nexport const CADESCOM_CADES_DEFAULT = 0;\nexport const CADESCOM_CADES_T = 5;\nexport const CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\nexport const CADESCOM_CONTAINER_STORE = 100;\nexport const CADESCOM_CURRENT_USER_STORE = 2;\nexport const CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\nexport const CADESCOM_DISPLAY_DATA_CONTENT = 1;\nexport const CADESCOM_DISPLAY_DATA_NONE = 0;\nexport const CADESCOM_ENCODE_ANY = -1;\nexport const CADESCOM_ENCODE_BASE64 = 0;\nexport const CADESCOM_ENCODE_BINARY = 1;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\nexport const CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\nexport const CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\nexport const CADESCOM_HASH_ALGORITHM_MD2 = 1;\nexport const CADESCOM_HASH_ALGORITHM_MD4 = 2;\nexport const CADESCOM_HASH_ALGORITHM_MD5 = 3;\nexport const CADESCOM_HASH_ALGORITHM_SHA1 = 0;\nexport const CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\nexport const CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\nexport const CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\nexport const CADESCOM_LOCAL_MACHINE_STORE = 1;\nexport const CADESCOM_PKCS7_TYPE = 65535;\nexport const CADESCOM_STRING_TO_UCS2LE = 0x00;\nexport const CADESCOM_SkipInstallToStore = 268435456;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\nexport const CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\nexport const CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\nexport const CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\nexport const CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\nexport const CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\nexport const CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\nexport const CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\nexport const CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\nexport const CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\nexport const CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\nexport const CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\nexport const CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\nexport const CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\nexport const CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\nexport const CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\nexport const CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\nexport const CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\nexport const CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\nexport const CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\nexport const CAPICOM_CURRENT_USER_STORE = 2;\nexport const CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\nexport const CAPICOM_EKU_CLIENT_AUTH = 2;\nexport const CAPICOM_EKU_OTHER = 0;\nexport const CAPICOM_EKU_SMARTCARD_LOGON = 5;\nexport const CAPICOM_LOCAL_MACHINE_STORE = 1;\nexport const CAPICOM_MEMORY_STORE = 0;\nexport const CAPICOM_MY_STORE = 'My';\nexport const CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\nexport const CAPICOM_OID_OTHER = 0;\nexport const CAPICOM_PROPID_ACCESS_STATE = 14;\nexport const CAPICOM_PROPID_ARCHIVED = 19;\nexport const CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65;\nexport const CAPICOM_PROPID_AUTO_ENROLL = 21;\nexport const CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23;\nexport const CAPICOM_PROPID_CTL_USAGE = 9;\nexport const CAPICOM_PROPID_DATE_STAMP = 27;\nexport const CAPICOM_PROPID_DESCRIPTION = 13;\nexport const CAPICOM_PROPID_EFS = 17;\nexport const CAPICOM_PROPID_ENHKEY_USAGE = 9;\nexport const CAPICOM_PROPID_ENROLLMENT = 26;\nexport const CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30;\nexport const CAPICOM_PROPID_FIRST_RESERVED = 66;\nexport const CAPICOM_PROPID_FIRST_USER = 0x00008000;\nexport const CAPICOM_PROPID_FORTEZZA_DATA = 18;\nexport const CAPICOM_PROPID_FRIENDLY_NAME = 11;\nexport const CAPICOM_PROPID_HASH_PROP = 3;\nexport const CAPICOM_PROPID_IE30_RESERVED = 7;\nexport const CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24;\nexport const CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28;\nexport const CAPICOM_PROPID_KEY_CONTEXT = 5;\nexport const CAPICOM_PROPID_KEY_IDENTIFIER = 20;\nexport const CAPICOM_PROPID_KEY_PROV_HANDLE = 1;\nexport const CAPICOM_PROPID_KEY_PROV_INFO = 2;\nexport const CAPICOM_PROPID_KEY_SPEC = 6;\nexport const CAPICOM_PROPID_LAST_RESERVED = 0x00007fff;\nexport const CAPICOM_PROPID_LAST_USER = 0x0000ffff;\nexport const CAPICOM_PROPID_MD5_HASH = 4;\nexport const CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10;\nexport const CAPICOM_PROPID_PUBKEY_ALG_PARA = 22;\nexport const CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8;\nexport const CAPICOM_PROPID_PVK_FILE = 12;\nexport const CAPICOM_PROPID_RENEWAL = 64;\nexport const CAPICOM_PROPID_SHA1_HASH = 3;\nexport const CAPICOM_PROPID_SIGNATURE_HASH = 15;\nexport const CAPICOM_PROPID_SMART_CARD_DATA = 16;\nexport const CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29;\nexport const CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25;\nexport const CAPICOM_PROPID_UNKNOWN = 0;\nexport const CAPICOM_SMART_CARD_USER_STORE = 4;\nexport const CAPICOM_STORE_OPEN_EXISTING_ONLY = 128;\nexport const CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256;\nexport const CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\nexport const CAPICOM_STORE_OPEN_READ_ONLY = 0;\nexport const CAPICOM_STORE_OPEN_READ_WRITE = 1;\nexport const CHECK_NONE = 0;\nexport const CHECK_OFFLINE_REVOCATION_STATUS = 16;\nexport const CHECK_ONLINE_REVOCATION_STATUS = 8;\nexport const CHECK_SIGNATURE_VALIDITY = 4;\nexport const CHECK_TIME_VALIDITY = 2;\nexport const CHECK_TRUSTED_ROOT = 1;\nexport const LOG_LEVEL_DEBUG = 4;\nexport const LOG_LEVEL_ERROR = 1;\nexport const LOG_LEVEL_INFO = 2;\nexport const TRUST_CTL_IS_NOT_SIGNATURE_VALID = 262144;\nexport const TRUST_CTL_IS_NOT_TIME_VALID = 131072;\nexport const TRUST_CTL_IS_NOT_VALID_FOR_USAGE = 524288;\nexport const TRUST_IS_CYCLIC = 128;\nexport const TRUST_IS_NOT_SIGNATURE_VALID = 8;\nexport const TRUST_IS_NOT_TIME_NESTED = 2;\nexport const TRUST_IS_NOT_TIME_VALID = 1;\nexport const TRUST_IS_NOT_VALID_FOR_USAGE = 16;\nexport const TRUST_IS_PARTIAL_CHAIN = 65536;\nexport const TRUST_IS_REVOKED = 4;\nexport const TRUST_IS_UNTRUSTED_ROOT = 32;\nexport const TRUST_REVOCATION_STATUS_UNKNOWN = 64;\nexport const XmlDsigGost3410Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411';\nexport const XmlDsigGost3410UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411';\nexport const XmlDsigGost3411Url = 'urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411';\nexport const XmlDsigGost3411UrlObsolete = 'http://www.w3.org/2001/04/xmldsig-more#gostr3411';\n","export * from './cades-constants';\nexport * from './issuer-tags-translations';\nexport * from './oids-dictionary';\nexport * from './subject-tags-translations';\n","import { TagsTranslations } from './tags-translations';\n\nexport const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","export const OIDS_DICTIONARY = {\n '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации',\n '1.2.643.2.39.1.1': 'Использование в программных продуктах системы \"1С:Предприятие 8\"',\n '1.2.643.3.131.1.1': 'ИНН',\n '1.2.643.100.4': 'ИНН организации',\n '1.2.643.100.1': 'ОГРН',\n '1.2.643.100.5': 'ОГРНИП',\n '1.2.643.100.3': 'СНИЛС',\n '1.2.643.3.141.1.1': 'РНС ФСС',\n '1.2.643.3.141.1.2': 'КП ФСС',\n '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС \"Госзакупки\" Сахалинской области.',\n '1.2.643.3.8.100.1': 'Сертификат типа \"ekey-ГОСТ\"',\n '1.2.643.3.8.100.1.1': 'Общее использование в системах ИОК без права заверения финансовых документов',\n '1.2.643.3.8.100.1.10':\n 'Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы',\n '1.2.643.3.8.100.1.11':\n 'Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области',\n '1.2.643.3.8.100.1.12': 'Использование в системе государственного заказа Иркутской области',\n '1.2.643.3.8.100.1.13':\n 'Использование в электронной торговой площадке агентства государственного заказа Красноярского края',\n '1.2.643.3.8.100.1.14': 'Использование в электронной торговой площадке \"Тендер\"',\n '1.2.643.3.8.100.1.2': 'Передача отчетности по ТКС',\n '1.2.643.3.8.100.1.3': 'Оформление взаимных обязательств, соглашений, договоров, актов и т.п.',\n '1.2.643.3.8.100.1.4': 'Внутрикорпоративный документооборот',\n '1.2.643.3.8.100.1.5': 'Использование в системах электронной торговли',\n '1.2.643.3.8.100.1.6': 'Использование в торгово-закупочной системе \"ЭЛЕКТРА\"',\n '1.2.643.3.8.100.1.7': 'Использование в системе Портал государственных закупок Ставропольского края.',\n '1.2.643.3.8.100.1.8': 'Использование в Единой системе электронной торговли B2B-Center и B2G.',\n '1.2.643.3.8.100.1.9':\n 'Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа',\n '1.2.643.5.1.24.2.1.3':\n 'Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.1.3.1':\n 'Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя',\n '1.2.643.5.1.24.2.2.2': 'Формирование документов как результата оказания услуги со стороны органов регистрации прав',\n '1.2.643.5.1.24.2.2.3':\n 'Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя',\n '1.2.643.6.2.1.7.1':\n 'Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций',\n '1.2.643.6.2.1.7.2':\n 'Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов',\n '1.2.643.6.3':\n 'Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений',\n '1.2.643.6.3.1.1': 'Использование на электронных площадок отобранных для проведения аукционах в электронной форме',\n '1.2.643.6.3.1.2.1': 'Тип участника - Юридическое лицо',\n '1.2.643.6.3.1.2.2': 'Тип участника - Физическое лицо',\n '1.2.643.6.3.1.2.3': 'Тип участника - Индивидуальный предприниматель',\n '1.2.643.6.3.1.3.1': 'Участник размещения заказа',\n '1.2.643.6.3.1.4.1': 'Администратор организации',\n '1.2.643.6.3.1.4.2': 'Уполномоченный специалист',\n '1.2.643.6.3.1.4.3': 'Специалист с правом подписи контракта',\n '1.2.840.113549.1.9.2': 'Неструктурированное имя',\n '1.3.6.1.4.1.24138.1.1.8.1': 'Обеспечение юридической значимости в Системе \"Электронная Торговая Площадка\"',\n '1.3.6.1.4.1.29919.21': 'Использование в системе Портал государственных закупок Ростовской области \"Рефери\".',\n '1.3.6.1.5.5.7.3.2': 'Проверка подлинности клиента',\n '1.3.6.1.5.5.7.3.4': 'Защищенная электронная почта',\n '1.3.643.3.8.100.15': 'Использование в ЭТП \"uTender\"',\n};\n","import { TagsTranslations } from './tags-translations';\n\nexport const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [\n { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' },\n { possibleNames: ['CN', 'commonName'], translation: 'Владелец' },\n { possibleNames: ['SN', 'surname'], translation: 'Фамилия' },\n { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' },\n { possibleNames: ['C', 'countryName'], translation: 'Страна' },\n { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' },\n { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' },\n { possibleNames: ['O', 'organizationName'], translation: 'Компания' },\n { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' },\n { possibleNames: ['T', 'TITLE'], translation: 'Должность' },\n { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },\n { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },\n { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },\n { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' },\n { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' },\n { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' },\n { possibleNames: ['L', 'localityName'], translation: 'Город' },\n];\n","export * from './api';\n","import { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\n\ntype Unpromisify = T extends Promise ? R : T;\n\nlet isSetLogLevel = false;\nlet isPluginLoaded = false;\n\nexport const _afterPluginsLoaded = any>(\n fn: T,\n): ((...args: Parameters) => Promise>>) => {\n const canPromise = Boolean(window.Promise);\n\n return async function (...args: Parameters): Promise>> {\n if (!isPluginLoaded) {\n try {\n require('../vendor/cadesplugin_api');\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при подключении модуля для работы с Cades plugin',\n );\n }\n\n isPluginLoaded = true;\n }\n\n const { cadesplugin } = window;\n\n if (!canPromise) {\n throw new Error('Необходим полифилл для Promise');\n }\n\n if (!cadesplugin) {\n throw new Error('Не подключен модуль для работы с Cades plugin');\n }\n\n if (!isSetLogLevel) {\n cadesplugin.set_log_level(cadesplugin.LOG_LEVEL_ERROR);\n\n isSetLogLevel = true;\n }\n\n try {\n await cadesplugin;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при инициализации модуля для работы с Cades plugin',\n );\n }\n\n return await fn.apply(this, args);\n };\n};\n","export const _extractCommonName = (subjectName: string): string | undefined =>\n subjectName.match(/CN=\"?(.+?)\"?(?:,|$)/)?.[1]?.replace(/\"{2}/g, '\"');\n","export const _extractMeaningfulErrorMessage = (error: Error): string | null => {\n let errorContainer = window.cadesplugin?.getLastError && window.cadesplugin.getLastError(error);\n\n if (!errorContainer?.message) {\n if (!error.message) {\n return null;\n }\n\n errorContainer = error;\n }\n\n const containsRussianLetters = /[а-яА-Я]/.test(errorContainer.message);\n\n if (!containsRussianLetters) {\n return null;\n }\n\n const searchResult = errorContainer.message.match(/^(.*?)(?:(?:\\.?\\s?\\(?(0x[0-9a-zA-Z]{1,8})\\)?)|(?:\\.?$))/);\n\n return searchResult ? searchResult[1] + (searchResult[2] ? ' (Код ошибки: ' + searchResult[2] + ')' : '') : null;\n};\n","// синтетические переменные, которые подменяются в рантайме\nexport const __cadesAsyncToken__ = {};\nexport const __createCadesPluginObject__ = (...args): any => ({});\n\nfunction getGeneratorConstructor(): GeneratorFunction {\n return new Function('', 'return Object.getPrototypeOf(function*(){}).constructor')();\n}\n\nexport const _generateCadesFn = (callback: Function): string => {\n const { cadesplugin } = window;\n const cadesGeneratorsAPI = Boolean(cadesplugin.CreateObjectAsync);\n const callbackName = callback.name || 'dynamicFn';\n const callbackLiteral = String(callback);\n const callbackArguments = callbackLiteral.match(/^function[\\s\\w]*?\\((.*?)\\)/)?.[1] || '';\n const callbackBody = callbackLiteral.replace(/^.*?{([\\s\\S]*?)}$/, '$1');\n let crossEnvCallbackLiteral = String(\n new (cadesGeneratorsAPI ? getGeneratorConstructor() : Function)(callbackArguments, callbackBody),\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__createCadesPluginObject__(\\([\\s\\S]*?\\))/gm,\n `cadesplugin.CreateObject${cadesGeneratorsAPI ? 'Async' : ''}$1`,\n );\n\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(\n /\\w+?\\.__cadesAsyncToken__\\s*?\\+\\s*?\\b/gm,\n cadesGeneratorsAPI ? 'yield ' : '',\n );\n\n if (!cadesGeneratorsAPI) {\n crossEnvCallbackLiteral = crossEnvCallbackLiteral.replace(/propset_(.*?)\\((.*?)\\)/gm, '$1 = $2');\n }\n\n return [\n cadesGeneratorsAPI ? `cadesplugin.async_spawn(${crossEnvCallbackLiteral});` : `(${crossEnvCallbackLiteral})();`,\n `//# sourceURL=crypto-pro_${callbackName}.js`,\n ].join('');\n};\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _getCadesUserCert } from './_getCadesUserCert';\nimport { _getCadesContainerCert } from './_getCadesContainerCert';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesCert = _afterPluginsLoaded(\n async (thumbprint: string): Promise => {\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificate = await _getCadesUserCert(thumbprint);\n } catch (error) {\n console.log(error);\n\n cadesCertificate = await _getCadesContainerCert(thumbprint);\n }\n\n return cadesCertificate;\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища закрытого ключа\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesContainerCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CADESCOM_CONTAINER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища закрытого ключа');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) ||\n 'Ошибка получения списка сертификатов из хранилища закрытого ключа',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище закрытого ключа');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище закрытого ключа`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","import { CadesCertificate } from '../api/certificate';\nimport { _afterPluginsLoaded } from './_afterPluginsLoaded';\nimport { _extractMeaningfulErrorMessage } from './_extractMeaningfulErrorMessage';\nimport { __cadesAsyncToken__, __createCadesPluginObject__, _generateCadesFn } from './_generateCadesFn';\n\n/**\n * Возвращает сертификат в формате Cades по отпечатку из хранилища пользователя\n *\n * @param thumbprint - отпечаток сертификата\n * @returns сертификат в формате Cades\n */\nexport const _getCadesUserCert = _afterPluginsLoaded(\n (thumbprint: string): CadesCertificate => {\n const { cadesplugin } = window;\n\n return eval(\n _generateCadesFn(function _getCadesCert() {\n let cadesStore;\n\n try {\n cadesStore = __cadesAsyncToken__ + __createCadesPluginObject__('CAdESCOM.Store');\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при попытке доступа к хранилищу');\n }\n\n if (!cadesStore) {\n throw new Error('Не удалось получить доступ к хранилищу сертификатов');\n }\n\n try {\n void (\n __cadesAsyncToken__ +\n cadesStore.Open(\n cadesplugin.CAPICOM_CURRENT_USER_STORE,\n cadesplugin.CAPICOM_MY_STORE,\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED,\n )\n );\n } catch (error) {\n console.error(error);\n\n throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при открытии хранилища пользователя');\n }\n\n let cadesCertificateList;\n let certificatesCount;\n\n try {\n cadesCertificateList = __cadesAsyncToken__ + cadesStore.Certificates;\n certificatesCount = __cadesAsyncToken__ + cadesCertificateList.Count;\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',\n );\n }\n\n if (!certificatesCount) {\n throw new Error('Нет доступных сертификатов в хранилище пользователя');\n }\n\n let cadesCertificate: CadesCertificate;\n\n try {\n cadesCertificateList =\n __cadesAsyncToken__ + cadesCertificateList.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH, thumbprint);\n\n const count = __cadesAsyncToken__ + cadesCertificateList.Count;\n\n if (!count) {\n throw new Error(`Сертификат с отпечатком: \"${thumbprint}\" не найден в хранилище пользователя`);\n }\n\n cadesCertificate = __cadesAsyncToken__ + cadesCertificateList.Item(1);\n } catch (error) {\n console.error(error);\n\n throw new Error(\n _extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',\n );\n }\n\n cadesStore.Close();\n\n return cadesCertificate;\n }),\n );\n },\n);\n","/**\n * Возвращает объект даты, совместимый с Cades plugin'ом, зависящий от браузера.\n *\n * В IE необходимо использовать специфичный формат \"VT_DATE\"\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Microsoft_Extensions/Date.getVarDate\n */\nexport const _getDateObj = (dateObj): Date => (dateObj.getVarDate ? dateObj.getVarDate() : dateObj);\n","const oldestSupportedCSPVersion = 4.0;\n\nexport const _isSupportedCSPVersion = (version: string): boolean => {\n version = version.match(/\\d+?\\b(?:\\.\\d+)?/)?.[0];\n\n return Number(version) >= oldestSupportedCSPVersion;\n};\n","export const _isSupportedCadesVersion = (version: string): boolean => {\n const match = version.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n\n if (!match) {\n return false;\n }\n\n const [, major, minor, patch] = match;\n\n if (Number(major) < 2) {\n return false;\n }\n\n if (Number(major) === 2 && Number(patch) < 12438) {\n return false;\n }\n\n return true;\n};\n","import { OIDS_DICTIONARY } from '../constants';\nimport { TagsTranslations } from '../constants/tags-translations';\n\nexport interface TagTranslation {\n description: string;\n title: string;\n isTranslated: boolean;\n}\n\n/**\n * Парсит информацию из строки с информацией о сертификате\n *\n * @param tagsTranslations - словарь с расшифровками тэгов\n * @param rawInfo - данные для парсинга\n * @returns расшифрованная информация по отдельным тэгам\n */\nexport const _parseCertInfo = (tagsTranslations: TagsTranslations[], rawInfo: string): TagTranslation[] => {\n const extractedEntities: string[] = rawInfo.match(/([а-яА-Яa-zA-Z0-9\\s.]+)=(?:(\"[^\"]+?\")|(.+?))(?:,|$)/g);\n\n if (extractedEntities) {\n return extractedEntities.map((group) => {\n const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\\s.]+)=(.+?),?$/);\n let title = segmentsMatch?.[1];\n // Вырезаем лишние кавычки\n const description = segmentsMatch?.[2]?.replace(/^\"(.*)\"/, '$1')?.replace(/\"{2}/g, '\"');\n const oidIdentifierMatch = title?.match(/^OID\\.(.*)/);\n const oidIdentifier = oidIdentifierMatch?.[1];\n let isTranslated = false;\n\n // Если нашли в тайтле ОИД, пытаемся его расшифровать\n if (oidIdentifier) {\n const oidTranslation = OIDS_DICTIONARY[oidIdentifier];\n\n if (oidTranslation) {\n title = oidTranslation;\n isTranslated = true;\n }\n }\n\n const tagTranslation = tagsTranslations.find((tag) => tag.possibleNames.find((name) => name === title))\n ?.translation;\n\n if (tagTranslation) {\n title = tagTranslation;\n isTranslated = true;\n }\n\n return { description, title, isTranslated };\n });\n }\n};\n",";(function () {\r\n //already loaded\r\n if(window.cadesplugin)\r\n return;\r\n\r\n var pluginObject;\r\n var plugin_resolved = 0;\r\n var plugin_reject;\r\n var plugin_resolve;\r\n var isOpera = 0;\r\n var isFireFox = 0;\r\n var isSafari = 0;\r\n var isYandex = 0;\r\n var canPromise = !!window.Promise;\r\n var cadesplugin_loaded_event_recieved = false;\r\n var isFireFoxExtensionLoaded = false;\r\n var cadesplugin;\r\n\r\n if(canPromise)\r\n {\r\n cadesplugin = new Promise(function(resolve, reject)\r\n {\r\n plugin_resolve = resolve;\r\n plugin_reject = reject;\r\n });\r\n } else\r\n {\r\n cadesplugin = {};\r\n }\r\n\r\n function check_browser() {\r\n var ua= navigator.userAgent, tem, M= ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\r\n if(/trident/i.test(M[1])){\r\n tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\r\n return { name:'IE', version:(tem[1] || '')};\r\n }\r\n if(M[1] === 'Chrome'){\r\n tem = ua.match(/\\b(OPR|Edg|YaBrowser)\\/(\\d+)/);\r\n if (tem != null)\r\n return { name: tem[1].replace('OPR', 'Opera'), version: tem[2] };\r\n }\r\n M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];\r\n if ((tem = ua.match(/version\\/(\\d+)/i)) != null)\r\n M.splice(1, 1, tem[1]);\r\n return {name:M[0],version:M[1]};\r\n }\r\n var browserSpecs = check_browser();\r\n\r\n function cpcsp_console_log(level, msg){\r\n //IE9 не может писать в консоль если не открыта вкладка developer tools\r\n if(typeof(console) === 'undefined')\r\n return;\r\n if (level <= cadesplugin.current_log_level ){\r\n if (level === cadesplugin.LOG_LEVEL_DEBUG)\r\n console.log(\"DEBUG: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_INFO)\r\n console.info(\"INFO: %s\", msg);\r\n if (level === cadesplugin.LOG_LEVEL_ERROR)\r\n console.error(\"ERROR: %s\", msg);\r\n return;\r\n }\r\n }\r\n\r\n function set_log_level(level){\r\n if (!((level === cadesplugin.LOG_LEVEL_DEBUG) ||\r\n (level === cadesplugin.LOG_LEVEL_INFO) ||\r\n (level === cadesplugin.LOG_LEVEL_ERROR))){\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"cadesplugin_api.js: Incorrect log_level: \" + level);\r\n return;\r\n }\r\n cadesplugin.current_log_level = level;\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = DEBUG\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = INFO\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_INFO, \"cadesplugin_api.js: log_level = ERROR\");\r\n if(isNativeMessageSupported())\r\n {\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_DEBUG)\r\n window.postMessage(\"set_log_level=debug\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_INFO)\r\n window.postMessage(\"set_log_level=info\", \"*\");\r\n if (cadesplugin.current_log_level === cadesplugin.LOG_LEVEL_ERROR)\r\n window.postMessage(\"set_log_level=error\", \"*\");\r\n }\r\n }\r\n\r\n function set_constantValues()\r\n {\r\n cadesplugin.CAPICOM_MEMORY_STORE = 0;\r\n cadesplugin.CAPICOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CAPICOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CAPICOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_MEMORY_STORE = 0;\r\n cadesplugin.CADESCOM_LOCAL_MACHINE_STORE = 1;\r\n cadesplugin.CADESCOM_CURRENT_USER_STORE = 2;\r\n cadesplugin.CADESCOM_SMART_CARD_USER_STORE = 4;\r\n cadesplugin.CADESCOM_CONTAINER_STORE = 100;\r\n\r\n cadesplugin.CAPICOM_MY_STORE = \"My\";\r\n\r\n cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;\r\n cadesplugin.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;\r\n\r\n cadesplugin.CADESCOM_XADES_DEFAULT = 0x00000010;\r\n cadesplugin.CADESCOM_XADES_BES = 0x00000020;\r\n cadesplugin.CADESCOM_XADES_T = 0x00000050;\r\n cadesplugin.CADESCOM_XADES_X_LONG_TYPE_1 = 0x000005d0;\r\n cadesplugin.CADESCOM_XMLDSIG_TYPE = 0x00000000;\r\n\r\n cadesplugin.XmlDsigGost3410UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411UrlObsolete = \"http://www.w3.org/2001/04/xmldsig-more#gostr3411\";\r\n cadesplugin.XmlDsigGost3410Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411\";\r\n cadesplugin.XmlDsigGost3411Url = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411\";\r\n\r\n cadesplugin.XmlDsigGost3411Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3410Url2012256 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256\";\r\n cadesplugin.XmlDsigGost3411Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512\";\r\n cadesplugin.XmlDsigGost3410Url2012512 = \"urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512\";\r\n\r\n cadesplugin.CADESCOM_CADES_DEFAULT = 0;\r\n cadesplugin.CADESCOM_CADES_BES = 1;\r\n cadesplugin.CADESCOM_CADES_T = 0x5;\r\n cadesplugin.CADESCOM_CADES_X_LONG_TYPE_1 = 0x5d;\r\n cadesplugin.CADESCOM_PKCS7_TYPE = 0xffff;\r\n\r\n cadesplugin.CADESCOM_ENCODE_BASE64 = 0;\r\n cadesplugin.CADESCOM_ENCODE_BINARY = 1;\r\n cadesplugin.CADESCOM_ENCODE_ANY = -1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;\r\n\r\n cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;\r\n cadesplugin.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;\r\n\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;\r\n cadesplugin.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;\r\n\r\n cadesplugin.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;\r\n\r\n cadesplugin.CAPICOM_PROPID_ENHKEY_USAGE = 9;\r\n\r\n cadesplugin.CAPICOM_OID_OTHER = 0;\r\n cadesplugin.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;\r\n\r\n cadesplugin.CAPICOM_EKU_CLIENT_AUTH = 2;\r\n cadesplugin.CAPICOM_EKU_SMARTCARD_LOGON = 5;\r\n cadesplugin.CAPICOM_EKU_OTHER = 0;\r\n\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;\r\n cadesplugin.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 0x100;\r\n cadesplugin.CADESCOM_ATTRIBUTE_OTHER = -1;\r\n\r\n cadesplugin.CADESCOM_STRING_TO_UCS2LE = 0;\r\n cadesplugin.CADESCOM_BASE64_TO_BINARY = 1;\r\n\r\n cadesplugin.CADESCOM_DISPLAY_DATA_NONE = 0;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_CONTENT = 1;\r\n cadesplugin.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;\r\n\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;\r\n cadesplugin.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;\r\n\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA1 = 0;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD2 = 1;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD4 = 2;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_MD5 = 3;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;\r\n cadesplugin.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;\r\n\r\n cadesplugin.LOG_LEVEL_DEBUG = 4;\r\n cadesplugin.LOG_LEVEL_INFO = 2;\r\n cadesplugin.LOG_LEVEL_ERROR = 1;\r\n\r\n cadesplugin.CADESCOM_AllowNone = 0;\r\n cadesplugin.CADESCOM_AllowNoOutstandingRequest = 0x1;\r\n cadesplugin.CADESCOM_AllowUntrustedCertificate = 0x2;\r\n cadesplugin.CADESCOM_AllowUntrustedRoot = 0x4;\r\n cadesplugin.CADESCOM_SkipInstallToStore = 0x10000000;\r\n cadesplugin.CADESCOM_InstallCertChainToContainer = 0x20000000;\r\n cadesplugin.CADESCOM_UseContainerStore = 0x40000000;\r\n\r\n cadesplugin.ENABLE_CARRIER_TYPE_CSP = 0x01;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_NO_SM = 0x02;\r\n cadesplugin.ENABLE_CARRIER_TYPE_FKC_SM = 0x04;\r\n cadesplugin.ENABLE_ANY_CARRIER_TYPE = 0x07;\r\n\r\n cadesplugin.DISABLE_EVERY_CARRIER_OPERATION = 0x00;\r\n cadesplugin.ENABLE_CARRIER_OPEN_ENUM = 0x01;\r\n cadesplugin.ENABLE_CARRIER_CREATE = 0x02;\r\n cadesplugin.ENABLE_ANY_OPERATION = 0x03;\r\n\r\n cadesplugin.CADESCOM_PRODUCT_CSP = 0;\r\n cadesplugin.CADESCOM_PRODUCT_OCSP = 1;\r\n cadesplugin.CADESCOM_PRODUCT_TSP = 2;\r\n\r\n cadesplugin.MEDIA_TYPE_REGISTRY = 0x00000001;\r\n cadesplugin.MEDIA_TYPE_HDIMAGE = 0x00000002;\r\n cadesplugin.MEDIA_TYPE_CLOUD = 0x00000004;\r\n cadesplugin.MEDIA_TYPE_SCARD = 0x00000008;\r\n\r\n cadesplugin.XCN_CRYPT_STRING_BASE64HEADER = 0;\r\n cadesplugin.AT_KEYEXCHANGE = 1;\r\n cadesplugin.AT_SIGNATURE = 2;\r\n\r\n cadesplugin.CARRIER_FLAG_REMOVABLE = 1;\r\n cadesplugin.CARRIER_FLAG_UNIQUE = 2;\r\n cadesplugin.CARRIER_FLAG_PROTECTED = 4;\r\n cadesplugin.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;\r\n cadesplugin.CARRIER_FLAG_SECURE_MESSAGING = 16;\r\n cadesplugin.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;\r\n cadesplugin.CARRIER_FLAG_VIRTUAL = 128;\r\n }\r\n\r\n function async_spawn(generatorFunc) {\r\n function continuer(verb, arg) {\r\n var result;\r\n try {\r\n result = generator[verb](arg);\r\n } catch (err) {\r\n return Promise.reject(err);\r\n }\r\n if (result.done) {\r\n return result.value;\r\n } else {\r\n return Promise.resolve(result.value).then(onFulfilled, onRejected);\r\n }\r\n }\r\n var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));\r\n var onFulfilled = continuer.bind(continuer, \"next\");\r\n var onRejected = continuer.bind(continuer, \"throw\");\r\n return onFulfilled();\r\n }\r\n\r\n function isIE() {\r\n // var retVal = ((\"Microsoft Internet Explorer\" == navigator.appName) || // IE < 11\r\n // navigator.userAgent.match(/Trident\\/./i)); // IE 11\r\n return (browserSpecs.name === 'IE' || browserSpecs.name === 'MSIE');\r\n }\r\n\r\n function isIOS() {\r\n return (navigator.userAgent.match(/ipod/i) ||\r\n navigator.userAgent.match(/ipad/i) ||\r\n navigator.userAgent.match(/iphone/i));\r\n }\r\n\r\n function isNativeMessageSupported()\r\n {\r\n // В IE работаем через NPAPI\r\n if(isIE())\r\n return false;\r\n // В Edge работаем через NativeMessage\r\n if (browserSpecs.name === 'Edg') {\r\n return true;\r\n }\r\n if (browserSpecs.name === 'YaBrowser') {\r\n isYandex = true;\r\n return true;\r\n }\r\n // В Chrome, Firefox, Safari и Opera работаем через асинхронную версию в зависимости от версии\r\n if(browserSpecs.name === 'Opera') {\r\n isOpera = true;\r\n if(browserSpecs.version >= 33){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Firefox') {\r\n isFireFox = true;\r\n if(browserSpecs.version >= 52){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n if(browserSpecs.name === 'Chrome') {\r\n if(browserSpecs.version >= 42){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n //В Сафари начиная с 12 версии нет NPAPI\r\n if(browserSpecs.name === 'Safari') {\r\n isSafari = true;\r\n if(browserSpecs.version >= 12) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n // Функция активации объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObject(name) {\r\n if (isIOS()) {\r\n // На iOS для создания объектов используется функция\r\n // call_ru_cryptopro_npcades_10_native_bridge, определенная в IOS_npcades_supp.js\r\n return call_ru_cryptopro_npcades_10_native_bridge(\"CreateObject\", [name]);\r\n }\r\n if (isIE()) {\r\n // В Internet Explorer создаются COM-объекты\r\n if (name.match(/X509Enrollment/i)) {\r\n try {\r\n // Объекты CertEnroll пробуем создавать через нашу фабрику,\r\n // если не получилось то через CX509EnrollmentWebClassFactory\r\n var objCertEnrollClassFactory = document.getElementById(\"webClassFactory\");\r\n return objCertEnrollClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n try {\r\n var objWebClassFactory = document.getElementById(\"certEnrollClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (err) {\r\n throw (\"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS\");\r\n }\r\n }\r\n }\r\n // Объекты CAPICOM и CAdESCOM создаются через CAdESCOM.WebClassFactory\r\n try {\r\n var objWebClassFactory = document.getElementById(\"webClassFactory\");\r\n return objWebClassFactory.CreateObject(name);\r\n }\r\n catch (e) {\r\n // Для версий плагина ниже 2.0.12538\r\n return new ActiveXObject(name);\r\n }\r\n }\r\n // создаются объекты NPAPI\r\n return pluginObject.CreateObject(name);\r\n }\r\n\r\n function decimalToHexString(number) {\r\n if (number < 0) {\r\n number = 0xFFFFFFFF + number + 1;\r\n }\r\n\r\n return number.toString(16).toUpperCase();\r\n }\r\n\r\n function GetMessageFromException(e) {\r\n var err = e.message;\r\n if (!err) {\r\n err = e;\r\n } else if (e.number) {\r\n err += \" (0x\" + decimalToHexString(e.number) + \")\";\r\n }\r\n return err;\r\n }\r\n\r\n function getLastError(exception) {\r\n if(isNativeMessageSupported() || isIE() || isIOS() ) {\r\n return GetMessageFromException(exception);\r\n }\r\n\r\n try {\r\n return pluginObject.getLastError();\r\n } catch(e) {\r\n return GetMessageFromException(exception);\r\n }\r\n }\r\n\r\n // Функция для удаления созданных объектов\r\n function ReleasePluginObjects() {\r\n return cpcsp_chrome_nmcades.ReleasePluginObjects();\r\n }\r\n\r\n // Функция активации асинхронных объектов КриптоПро ЭЦП Browser plug-in\r\n function CreateObjectAsync(name) {\r\n return pluginObject.CreateObjectAsync(name);\r\n }\r\n\r\n //Функции для IOS\r\n var ru_cryptopro_npcades_10_native_bridge = {\r\n callbacksCount : 1,\r\n callbacks : {},\r\n\r\n // Automatically called by native layer when a result is available\r\n resultForCallback : function resultForCallback(callbackId, resultArray) {\r\n var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];\r\n if (!callback) return;\r\n callback.apply(null,resultArray);\r\n },\r\n\r\n // Use this in javascript to request native objective-c code\r\n // functionName : string (I think the name is explicit :p)\r\n // args : array of arguments\r\n // callback : function with n-arguments that is going to be called when the native code returned\r\n call : function call(functionName, args, callback) {\r\n var hasCallback = callback && typeof callback === \"function\";\r\n var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;\r\n\r\n if (hasCallback)\r\n ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;\r\n\r\n var iframe = document.createElement(\"IFRAME\");\r\n var arrObjs = new Array(\"_CPNP_handle\");\r\n try{\r\n iframe.setAttribute(\"src\", \"cpnp-js-call:\" + functionName + \":\" + callbackId+ \":\" + encodeURIComponent(JSON.stringify(args, arrObjs)));\r\n } catch(e){\r\n alert(e);\r\n }\r\n document.documentElement.appendChild(iframe);\r\n iframe.parentNode.removeChild(iframe);\r\n iframe = null;\r\n }\r\n };\r\n\r\n function call_ru_cryptopro_npcades_10_native_bridge(functionName, array){\r\n var tmpobj;\r\n var ex;\r\n ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e, response){\r\n ex = e;\r\n var str='tmpobj='+response;\r\n eval(str);\r\n if (typeof (tmpobj) === \"string\"){\r\n tmpobj = tmpobj.replace(/\\\\\\n/gm, \"\\n\");\r\n tmpobj = tmpobj.replace(/\\\\\\r/gm, \"\\r\");\r\n }\r\n });\r\n if(ex)\r\n throw ex;\r\n return tmpobj;\r\n }\r\n\r\n function show_firefox_missing_extension_dialog()\r\n {\r\n if (!window.cadesplugin_skip_extension_install)\r\n {\r\n var ovr = document.createElement('div');\r\n ovr.id = \"cadesplugin_ovr\";\r\n ovr.style = \"visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)\";\r\n ovr.innerHTML = \"
\" +\r\n \"\" +\r\n \"

Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.\" +\r\n \"

Скачать расширение

\" +\r\n \"
\";\r\n document.getElementsByTagName(\"Body\")[0].appendChild(ovr);\r\n document.getElementById(\"cadesplugin_close_install\").addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n\r\n ovr.addEventListener('click',function()\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n document.getElementById(\"cadesplugin_ovr\").style.visibility = 'hidden';\r\n });\r\n ovr.style.visibility=\"visible\";\r\n }\r\n }\r\n function firefox_or_safari_nmcades_onload() {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n isFireFoxExtensionLoaded = true;\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n\r\n function nmcades_api_onload() {\r\n if (!isIE() && !isFireFox && !isSafari) {\r\n if (window.cadesplugin_extension_loaded_callback)\r\n window.cadesplugin_extension_loaded_callback();\r\n }\r\n window.postMessage(\"cadesplugin_echo_request\", \"*\");\r\n window.addEventListener(\"message\", function (event){\r\n if (typeof(event.data) !== \"string\" || !event.data.match(\"cadesplugin_loaded\"))\r\n return;\r\n if (cadesplugin_loaded_event_recieved)\r\n return;\r\n if(isFireFox || isSafari)\r\n {\r\n // Для Firefox, Сафари вместе с сообщением cadesplugin_loaded прилетает url для загрузки nmcades_plugin_api.js\r\n var url = event.data.substring(event.data.indexOf(\"url:\") + 4);\r\n if (!url.match(\"^moz-extension://[a-zA-Z0-9-]+/nmcades_plugin_api.js$\")\r\n && !url.match(\"^safari-extension://[a-zA-Z0-9-]+/[a-zA-Z0-9]+/nmcades_plugin_api.js$\"))\r\n {\r\n cpcsp_console_log(cadesplugin.LOG_LEVEL_ERROR, \"Bad url \\\"\" + url + \"\\\" for load CryptoPro Extension for CAdES Browser plug-in\");\r\n plugin_loaded_error();\r\n return;\r\n }\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", url);\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = firefox_or_safari_nmcades_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }else {\r\n cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);\r\n }\r\n cadesplugin_loaded_event_recieved = true;\r\n }, false);\r\n }\r\n\r\n //Загружаем расширения для Chrome, Opera, YaBrowser, FireFox, Edge, Safari\r\n function load_extension()\r\n {\r\n if(isFireFox || isSafari){\r\n // вызываем callback руками т.к. нам нужно узнать ID расширения. Он уникальный для браузера.\r\n nmcades_api_onload();\r\n } else {\r\n // в асинхронном варианте для Yandex и Opera подключаем расширение из Opera store.\r\n if (isOpera || isYandex) {\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n } else {\r\n // для Chrome, Chromium, Chromium Edge расширение из Chrome store\r\n var fileref = document.createElement('script');\r\n fileref.setAttribute(\"type\", \"text/javascript\");\r\n fileref.setAttribute(\"src\", \"chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js\");\r\n fileref.onerror = plugin_loaded_error;\r\n fileref.onload = nmcades_api_onload;\r\n document.getElementsByTagName(\"head\")[0].appendChild(fileref);\r\n }\r\n }\r\n }\r\n\r\n //Загружаем плагин для NPAPI\r\n function load_npapi_plugin()\r\n {\r\n var elem = document.createElement('object');\r\n elem.setAttribute(\"id\", \"cadesplugin_object\");\r\n elem.setAttribute(\"type\", \"application/x-cades\");\r\n elem.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem);\r\n pluginObject = document.getElementById(\"cadesplugin_object\");\r\n if(isIE())\r\n {\r\n var elem1 = document.createElement('object');\r\n elem1.setAttribute(\"id\", \"certEnrollClassFactory\");\r\n elem1.setAttribute(\"classid\", \"clsid:884e2049-217d-11da-b2a4-000e7bbb2b09\");\r\n elem1.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem1);\r\n var elem2 = document.createElement('object');\r\n elem2.setAttribute(\"id\", \"webClassFactory\");\r\n elem2.setAttribute(\"classid\", \"clsid:B04C8637-10BD-484E-B0DA-B8A039F60024\");\r\n elem2.setAttribute(\"style\", \"visibility: hidden\");\r\n document.getElementsByTagName(\"body\")[0].appendChild(elem2);\r\n }\r\n }\r\n\r\n //Отправляем событие что все ок.\r\n function plugin_loaded()\r\n {\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_resolve();\r\n }else {\r\n window.postMessage(\"cadesplugin_loaded\", \"*\");\r\n }\r\n }\r\n\r\n //Отправляем событие что сломались.\r\n function plugin_loaded_error(msg)\r\n {\r\n if(typeof(msg) === 'undefined' || typeof(msg) === 'object')\r\n msg = \"Плагин недоступен\";\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(msg);\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n }\r\n\r\n //проверяем что у нас хоть какое то событие ушло, и если не уходило кидаем еще раз ошибку\r\n function check_load_timeout()\r\n {\r\n if(plugin_resolved === 1)\r\n return;\r\n if(isFireFox)\r\n {\r\n if (!isFireFoxExtensionLoaded)\r\n show_firefox_missing_extension_dialog();\r\n }\r\n plugin_resolved = 1;\r\n if(canPromise)\r\n {\r\n plugin_reject(\"Истекло время ожидания загрузки плагина\");\r\n } else {\r\n window.postMessage(\"cadesplugin_load_error\", \"*\");\r\n }\r\n\r\n }\r\n\r\n //Вспомогательная функция для NPAPI\r\n function createPromise(arg)\r\n {\r\n return new Promise(arg);\r\n }\r\n\r\n function check_npapi_plugin (){\r\n try {\r\n var oAbout = CreateObject(\"CAdESCOM.About\");\r\n plugin_loaded();\r\n }\r\n catch (err) {\r\n document.getElementById(\"cadesplugin_object\").style.display = 'none';\r\n // Объект создать не удалось, проверим, установлен ли\r\n // вообще плагин. Такая возможность есть не во всех браузерах\r\n var mimetype = navigator.mimeTypes[\"application/x-cades\"];\r\n if (mimetype) {\r\n var plugin = mimetype.enabledPlugin;\r\n if (plugin) {\r\n plugin_loaded_error(\"Плагин загружен, но не создаются обьекты\");\r\n }else\r\n {\r\n plugin_loaded_error(\"Ошибка при загрузке плагина\");\r\n }\r\n }else\r\n {\r\n plugin_loaded_error(\"Плагин недоступен\");\r\n }\r\n }\r\n }\r\n\r\n //Проверяем работает ли плагин\r\n function check_plugin_working()\r\n {\r\n var div = document.createElement(\"div\");\r\n div.innerHTML = \"\";\r\n var isIeLessThan9 = (div.getElementsByTagName(\"i\").length === 1);\r\n if (isIeLessThan9) {\r\n plugin_loaded_error(\"Internet Explorer версии 8 и ниже не поддерживается\");\r\n return;\r\n }\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n load_extension();\r\n }else if(!canPromise) {\r\n window.addEventListener(\"message\", function (event){\r\n if (event.data !== \"cadesplugin_echo_request\")\r\n return;\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n },\r\n false);\r\n }else\r\n {\r\n if(document.readyState === \"complete\"){\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n } else {\r\n window.addEventListener(\"load\", function (event) {\r\n load_npapi_plugin();\r\n check_npapi_plugin();\r\n }, false);\r\n }\r\n }\r\n }\r\n\r\n function set_pluginObject(obj)\r\n {\r\n pluginObject = obj;\r\n }\r\n\r\n function is_capilite_enabled()\r\n {\r\n if ((typeof (cadesplugin.EnableInternalCSP) !== 'undefined') && cadesplugin.EnableInternalCSP)\r\n return true;\r\n return false;\r\n };\r\n\r\n //Export\r\n cadesplugin.JSModuleVersion = \"2.3.2\";\r\n cadesplugin.async_spawn = async_spawn;\r\n cadesplugin.set = set_pluginObject;\r\n cadesplugin.set_log_level = set_log_level;\r\n cadesplugin.getLastError = getLastError;\r\n cadesplugin.is_capilite_enabled = is_capilite_enabled;\r\n\r\n if(isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObjectAsync = CreateObjectAsync;\r\n cadesplugin.ReleasePluginObjects = ReleasePluginObjects;\r\n }\r\n\r\n if(!isNativeMessageSupported())\r\n {\r\n cadesplugin.CreateObject = CreateObject;\r\n }\r\n\r\n if(window.cadesplugin_load_timeout)\r\n {\r\n setTimeout(check_load_timeout, window.cadesplugin_load_timeout);\r\n }\r\n else\r\n {\r\n setTimeout(check_load_timeout, 20000);\r\n }\r\n\r\n set_constantValues();\r\n\r\n cadesplugin.current_log_level = cadesplugin.LOG_LEVEL_ERROR;\r\n window.cadesplugin = cadesplugin;\r\n check_plugin_working();\r\n}());\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/helpers/_extractCommonName.d.ts b/lib/helpers/_extractCommonName.d.ts index 25df5a9..173ca6b 100644 --- a/lib/helpers/_extractCommonName.d.ts +++ b/lib/helpers/_extractCommonName.d.ts @@ -1 +1 @@ -export declare const _extractCommonName: (subjectName: string) => string; +export declare const _extractCommonName: (subjectName: string) => string | undefined; diff --git a/lib/helpers/_extractMeaningfulErrorMessage.d.ts b/lib/helpers/_extractMeaningfulErrorMessage.d.ts index 827d8d9..0233a1c 100644 --- a/lib/helpers/_extractMeaningfulErrorMessage.d.ts +++ b/lib/helpers/_extractMeaningfulErrorMessage.d.ts @@ -1 +1 @@ -export declare const _extractMeaningfulErrorMessage: (error: Error) => string; +export declare const _extractMeaningfulErrorMessage: (error: Error) => string | null; diff --git a/package-lock.json b/package-lock.json index 35a92d8..c5f9c78 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "crypto-pro-js", - "version": "2.3.2", + "version": "2.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "crypto-pro-js", - "version": "2.3.2", + "version": "2.3.3", "license": "MIT", "devDependencies": { "@types/jest": "25.1.4", diff --git a/package.json b/package.json index 5992f65..b811a65 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crypto-pro-js", - "version": "2.3.2", + "version": "2.3.3", "description": "Асинхронный JavaScript API для работы с КриптоПРО ЭЦП Browser Plug-In. Forked from https://github.com/vgoma/crypto-pro", "main": "./lib/crypto-pro-js.js", "types": "./lib/crypto-pro-js.d.ts", diff --git a/src/constants/issuer-tags-translations.ts b/src/constants/issuer-tags-translations.ts index aa64417..48ec0eb 100644 --- a/src/constants/issuer-tags-translations.ts +++ b/src/constants/issuer-tags-translations.ts @@ -1,18 +1,19 @@ import { TagsTranslations } from './tags-translations'; export const ISSUER_TAGS_TRANSLATIONS: TagsTranslations[] = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Удостоверяющий центр' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Тип' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Удостоверяющий центр' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Тип' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; diff --git a/src/constants/oids-dictionary.ts b/src/constants/oids-dictionary.ts index f4c2a7d..95015e1 100755 --- a/src/constants/oids-dictionary.ts +++ b/src/constants/oids-dictionary.ts @@ -2,6 +2,10 @@ export const OIDS_DICTIONARY = { '1.2.643.2.2.34.6': 'Пользователь Центра Регистрации', '1.2.643.2.39.1.1': 'Использование в программных продуктах системы "1С:Предприятие 8"', '1.2.643.3.131.1.1': 'ИНН', + '1.2.643.100.4': 'ИНН организации', + '1.2.643.100.1': 'ОГРН', + '1.2.643.100.5': 'ОГРНИП', + '1.2.643.100.3': 'СНИЛС', '1.2.643.3.141.1.1': 'РНС ФСС', '1.2.643.3.141.1.2': 'КП ФСС', '1.2.643.3.2.100.65.13.11': 'Использование в системе АИС "Госзакупки" Сахалинской области.', diff --git a/src/constants/subject-tags-translations.ts b/src/constants/subject-tags-translations.ts index e6b1003..ea671dc 100644 --- a/src/constants/subject-tags-translations.ts +++ b/src/constants/subject-tags-translations.ts @@ -1,20 +1,21 @@ import { TagsTranslations } from './tags-translations'; export const SUBJECT_TAGS_TRANSLATIONS: TagsTranslations[] = [ - { possibleNames: ['UnstructuredName'], translation: 'Неструктурированное имя' }, - { possibleNames: ['CN'], translation: 'Владелец' }, - { possibleNames: ['SN'], translation: 'Фамилия' }, - { possibleNames: ['G'], translation: 'Имя Отчество' }, - { possibleNames: ['C'], translation: 'Страна' }, - { possibleNames: ['S'], translation: 'Регион' }, - { possibleNames: ['STREET'], translation: 'Адрес' }, - { possibleNames: ['O'], translation: 'Компания' }, - { possibleNames: ['OU'], translation: 'Отдел/подразделение' }, - { possibleNames: ['T'], translation: 'Должность' }, + { possibleNames: ['UN', 'UnstructuredName'], translation: 'Неструктурированное имя' }, + { possibleNames: ['CN', 'commonName'], translation: 'Владелец' }, + { possibleNames: ['SN', 'surname'], translation: 'Фамилия' }, + { possibleNames: ['G', 'givenName', 'gn'], translation: 'Имя Отчество' }, + { possibleNames: ['C', 'countryName'], translation: 'Страна' }, + { possibleNames: ['S', 'ST', 'stateOrProvinceName'], translation: 'Регион' }, + { possibleNames: ['STREET', 'streetAddress'], translation: 'Адрес' }, + { possibleNames: ['O', 'organizationName'], translation: 'Компания' }, + { possibleNames: ['OU', 'organizationalUnitName'], translation: 'Отдел/подразделение' }, + { possibleNames: ['T', 'TITLE'], translation: 'Должность' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, - { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' }, - { possibleNames: ['E'], translation: 'Email' }, - { possibleNames: ['L'], translation: 'Город' }, + { possibleNames: ['ИНН', 'ИННФЛ', 'ИНН ФЛ', 'INN', 'ИНН физического лица'], translation: 'ИНН' }, + { possibleNames: ['ИННЮЛ', 'ИНН ЮЛ', 'INN LE', 'INNLE', 'ИНН организации'], translation: 'ИНН организации' }, + { possibleNames: ['E', 'email', 'emailAddress', 'pkcs9email'], translation: 'Email' }, + { possibleNames: ['L', 'localityName'], translation: 'Город' }, ]; diff --git a/src/helpers/_parseCertInfo.test.ts b/src/helpers/_parseCertInfo.test.ts index adec6d6..cbc3697 100644 --- a/src/helpers/_parseCertInfo.test.ts +++ b/src/helpers/_parseCertInfo.test.ts @@ -18,8 +18,8 @@ describe('_parseCertInfo', () => { 'OID.1.2.643.6.3.1.4.1=Петров', 'UNKNOWN=неизвестный тэг', 'E=email@example.ru', - 'INN=007811514257', - 'ИНН организации=007811514257', + 'INN=997811514257', + 'ИНН ЮЛ=007811514257', 'OGRN=1127847087885', 'SNILS=11617693460', ].join(', '); @@ -96,13 +96,13 @@ describe('_parseCertInfo', () => { isTranslated: true, }, { - description: '007811514257', + description: '997811514257', title: 'ИНН', isTranslated: true, }, { description: '007811514257', - title: 'ИНН', + title: 'ИНН организации', isTranslated: true, }, { @@ -128,8 +128,8 @@ describe('_parseCertInfo', () => { 'L=Санкт-Петербург', 'S=78 Санкт-Петербург', 'C=RU', - 'INN=007813317783', - 'ИНН организации=007813317783', + 'INN=997813317783', + 'INNLE=007813317783', 'OGRN=1057810150892', 'E=uc@sampokey.ru', ].join(', '); @@ -176,13 +176,13 @@ describe('_parseCertInfo', () => { isTranslated: true, }, { - description: '007813317783', + description: '997813317783', title: 'ИНН', isTranslated: true, }, { description: '007813317783', - title: 'ИНН', + title: 'ИНН организации', isTranslated: true, }, {