crypto-pro-js/dist/crypto-pro.min.js
2020-07-04 09:37:44 +03:00

2 lines
64 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("cryptoPro",[],n):"object"==typeof exports?exports.cryptoPro=n():e.cryptoPro=n()}(window,(function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var _=n[r]={i:r,l:!1,exports:{}};return e[r].call(_.exports,_,_.exports,t),_.l=!0,_.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},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,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var _ in e)t.d(r,_,function(n){return e[n]}.bind(null,_));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=8)}([function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(1),s=!1,i=!1;n._afterPluginsLoaded=function(e){var n=Boolean(window.Promise);return function(){for(var o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];return r(this,void 0,void 0,(function(){var r,c;return _(this,(function(_){switch(_.label){case 0:if(!i){try{t(11)}catch(e){throw console.error(e),new Error(a._extractMeaningfulErrorMessage(e)||"Ошибка при подключении модуля для работы с Cades plugin")}i=!0}if(r=window.cadesplugin,!n)throw new Error("Необходим полифилл для Promise");if(!r)throw new Error("Не подключен модуль для работы с Cades plugin");s||(r.set_log_level(r.LOG_LEVEL_ERROR),s=!0),_.label=1;case 1:return _.trys.push([1,3,,4]),[4,r];case 2:return _.sent(),[3,4];case 3:throw c=_.sent(),console.error(c),new Error(a._extractMeaningfulErrorMessage(c)||"Ошибка при инициализации модуля для работы с Cades plugin");case 4:return[4,e.apply(this,o)];case 5:return[2,_.sent()]}}))}))}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._extractMeaningfulErrorMessage=function(e){var n,t=(null===(n=window.cadesplugin)||void 0===n?void 0:n.getLastError)&&window.cadesplugin.getLastError(e);if(!(null==t?void 0:t.message)){if(!e.message)return null;t=e}if(!/[а-яА-Я]/.test(t.message))return null;var r=t.message.match(/^(.*?)(?:(?:\.?\s?\(?0x)|(?:\.?$))/);return r?r[1]:null}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.__cadesAsyncToken__={},n.__createCadesPluginObject__=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return{}},n._generateCadesFn=function(e){var n,t=window.cadesplugin,r=Boolean(t.CreateObjectAsync),_=e.name||"dynamicFn",a=String(e),s=(null===(n=a.match(/^function[\s\w]*?\((.*?)\)/))||void 0===n?void 0:n[1])||"",i=a.replace(/^.*?{([\s\S]*?)}$/,"$1"),o=String(new(r?new Function("","return Object.getPrototypeOf(function*(){}).constructor")():Function)(s,i));return o=(o=o.replace(/\w+?\.__createCadesPluginObject__(\([\s\S]*?\))/gm,"cadesplugin.CreateObject"+(r?"Async":"")+"$1")).replace(/\w+?\.__cadesAsyncToken__\s*?\+\s*?\b/gm,r?"yield ":""),r||(o=o.replace(/propset_(.*?)\((.*?)\)/gm,"$1 = $2")),[r?"cadesplugin.async_spawn("+o+");":"("+o+")();","//# sourceURL=crypto-pro_"+_+".js"].join("")}},function(e,n,t){"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r(t(13)),r(t(14)),r(t(15)),r(t(16))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var certificate_1=__webpack_require__(5),constants_1=__webpack_require__(3),_afterPluginsLoaded_1=__webpack_require__(0),_extractCommonName_1=__webpack_require__(25),_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,n,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{(n=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates)&&(n=_generateCadesFn_1.__cadesAsyncToken__+n.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_TIME_VALID),n=_generateCadesFn_1.__cadesAsyncToken__+n.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY,constants_1.CAPICOM_PROPID_KEY_PROV_INFO),t=_generateCadesFn_1.__cadesAsyncToken__+n.Count)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");var r=[];try{for(;t;){var _=_generateCadesFn_1.__cadesAsyncToken__+n.Item(t);r.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=r})))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(12))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!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});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,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(t(9))},function(e,n,t){"use strict";function r(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}Object.defineProperty(n,"__esModule",{value:!0}),r(t(10)),r(t(4)),r(t(7)),r(t(26)),r(t(29)),r(t(5))},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(4);n.getCertificate=a._afterPluginsLoaded((function(e){return r(void 0,void 0,void 0,(function(){var n,t;return _(this,(function(r){switch(r.label){case 0:if(!e)throw new Error("Отпечаток не указан");return[4,s.getUserCertificates()];case 1:if(n=r.sent(),!(t=n.find((function(n){return n.thumbprint===e}))))throw new Error('Сертификат с отпечатком: "'+e+'" не найден');return[2,t]}}))}))}))},function(module,exports){!function(){if(!window.cadesplugin){var pluginObject,plugin_resolved=0,plugin_reject,plugin_resolve,isOpera=0,isFireFox=0,isEdge=0,isSafari=0,failed_extensions=0,canPromise=!!window.Promise,cadesplugin;cadesplugin=canPromise?new Promise((function(e,n){plugin_resolve=e,plugin_reject=n})):{};var browserSpecs=check_browser(),ru_cryptopro_npcades_10_native_bridge={callbacksCount:1,callbacks:{},resultForCallback:function(e,n){var t=ru_cryptopro_npcades_10_native_bridge.callbacks[e];t&&t.apply(null,n)},call:function(e,n,t){var r=t&&"function"==typeof t,_=r?ru_cryptopro_npcades_10_native_bridge.callbacksCount++:0;r&&(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(n,s)))}catch(e){alert(e)}document.documentElement.appendChild(a),a.parentNode.removeChild(a),a=null}};cadesplugin.JSModuleVersion="2.1.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,n=navigator.userAgent,t=n.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(t[1])?{name:"IE",version:(e=/\brv[ :]+(\d+)/g.exec(n)||[])[1]||""}:"Chrome"===t[1]&&null!=(e=n.match(/\b(OPR|Edge)\/(\d+)/))?{name:e[1].replace("OPR","Opera"),version:e[2]}:(t=t[2]?[t[1],t[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(e=n.match(/version\/(\d+)/i))&&t.splice(1,1,e[1]),{name:t[0],version:t[1]})}function cpcsp_console_log(e,n){if("undefined"!=typeof console)return e<=cadesplugin.current_log_level?(e===cadesplugin.LOG_LEVEL_DEBUG&&console.log("DEBUG: %s",n),e===cadesplugin.LOG_LEVEL_INFO&&console.info("INFO: %s",n),void(e===cadesplugin.LOG_LEVEL_ERROR&&console.error("ERROR: %s",n))):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_LOCAL_MACHINE_STORE=1,cadesplugin.CAPICOM_CURRENT_USER_STORE=2,cadesplugin.CADESCOM_LOCAL_MACHINE_STORE=1,cadesplugin.CADESCOM_CURRENT_USER_STORE=2,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.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.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_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}function async_spawn(e){function n(e,n){var a;try{a=t[e](n)}catch(e){return Promise.reject(e)}return a.done?a.value:Promise.resolve(a.value).then(r,_)}var t=e(Array.prototype.slice.call(arguments,1)),r=n.bind(n,"next"),_=n.bind(n,"throw");return r()}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()&&("Edge"===browserSpecs.name?(isEdge=!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(n){try{return document.getElementById("certEnrollClassFactory").CreateObject(e)}catch(e){throw"Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS"}}try{return document.getElementById("webClassFactory").CreateObject(e)}catch(n){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 n=e.message;return n?e.number&&(n+=" (0x"+decimalToHexString(e.number)+")"):n=e,n}function getLastError(e){if(isNativeMessageSupported()||isIE()||isIOS())return GetMessageFromException(e);try{return pluginObject.getLastError()}catch(n){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="<div id='cadesplugin_ovr_item' style='position:relative; width:400px; margin:100px auto; background-color:#fff; border:2px solid #000; padding:10px; text-align:center; opacity: 1; z-index: 1500'><button id='cadesplugin_close_install' style='float: right; font-size: 10px; background: transparent; border: 1; margin: -5px'>X</button><p>Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.<p><a href='https://www.cryptopro.ru/sites/default/files/products/cades/extensions/firefox_cryptopro_extension_latest.xpi'>Скачать расширение</a></p></div>",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 install_opera_extension(){window.cadesplugin_skip_extension_install?plugin_loaded_error("Плагин недоступен"):document.addEventListener("DOMContentLoaded",(function(){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="<div id='cadesplugin_ovr_item' style='position:relative; width:400px; margin:100px auto; background-color:#fff; border:2px solid #000; padding:10px; text-align:center; opacity: 1; z-index: 1500'><button id='cadesplugin_close_install' style='float: right; font-size: 10px; background: transparent; border: 1; margin: -5px'>X</button><p>Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо установить расширение из каталога дополнений Opera.<p><button id='cadesplugin_install' style='font:12px Arial'>Установить расширение</button></p></div>",document.getElementsByTagName("Body")[0].appendChild(e),document.getElementById("cadesplugin_install").addEventListener("click",(function(e){opr.addons.installExtension("epebfcehmdedogndhlcacafjaacknbcm",(function(){document.getElementById("cadesplugin_ovr").style.visibility="hidden",location.reload()}),(function(){}))})),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",document.getElementById("cadesplugin_ovr_item").addEventListener("click",(function(e){e.stopPropagation()}))}))}function firefox_or_edge_nmcades_onload(){cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}function nmcades_api_onload(){window.postMessage("cadesplugin_echo_request","*"),window.addEventListener("message",(function(e){if("string"==typeof e.data&&e.data.match("cadesplugin_loaded"))if(isFireFox||isEdge||isSafari){var n=e.data.substring(e.data.indexOf("url:")+4),t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",n),t.onerror=plugin_loaded_error,t.onload=firefox_or_edge_nmcades_onload,document.getElementsByTagName("head")[0].appendChild(t),failed_extensions++}else cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded,plugin_loaded_error)}),!1)}function load_extension(){if(isFireFox||isEdge||isSafari)nmcades_api_onload();else{var e=document.createElement("script");e.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),(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)}}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 n=document.createElement("object");n.setAttribute("id","certEnrollClassFactory"),n.setAttribute("classid","clsid:884e2049-217d-11da-b2a4-000e7bbb2b09"),n.setAttribute("style","visibility: hidden"),document.getElementsByTagName("body")[0].appendChild(n);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){if(isNativeMessageSupported()){if(++failed_extensions<2)return;if(isOpera&&(void 0===e||"object"==typeof e))return void install_opera_extension()}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&&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(n){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]><i></i><![endif]--\x3e",1===e.getElementsByTagName("i").length?plugin_loaded_error("Internet Explorer версии 8 и ниже не поддерживается"):isNativeMessageSupported()?load_extension():canPromise?"complete"===document.readyState?(load_npapi_plugin(),check_npapi_plugin()):window.addEventListener("load",(function(e){load_npapi_plugin(),check_npapi_plugin()}),!1):window.addEventListener("message",(function(e){"cadesplugin_echo_request"===e.data&&(load_npapi_plugin(),check_npapi_plugin())}),!1)}function set_pluginObject(e){pluginObject=e}function is_capilite_enabled(){return!(void 0===cadesplugin.EnableInternalCSP||!cadesplugin.EnableInternalCSP)}}()},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(3),_=t(17),a=t(18),s=t(6),i=t(19),o=t(20),c=t(21),l=t(23),u=t(24),d=function(){function e(e,n,t,r,_,a,s){this._cadesCertificate=e,this.name=n,this.issuerName=t,this.subjectName=r,this.thumbprint=_,this.validFrom=a,this.validTo=s}return e.prototype.getOwnerInfo=function(){return c.getInfo.call(this,r.SUBJECT_TAGS_TRANSLATIONS,"SubjectName")},e.prototype.getIssuerInfo=function(){return c.getInfo.call(this,r.ISSUER_TAGS_TRANSLATIONS,"IssuerName")},e.prototype.getExtendedKeyUsage=function(){return o.getExtendedKeyUsage.call(this)},e.prototype.getDecodedExtendedKeyUsage=function(){return i.getDecodedExtendedKeyUsage.call(this)},e.prototype.getAlgorithm=function(){return a.getAlgorithm.call(this)},e.prototype.getCadesProp=function(e){return s.getCadesProp.call(this,e)},e.prototype.isValid=function(){return u.isValid.call(this)},e.prototype.exportBase64=function(){return _.exportBase64.call(this)},e.prototype.hasExtendedKeyUsage=function(e){return l.hasExtendedKeyUsage.call(this,e)},e}();n.Certificate=d},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CADESCOM_ATTRIBUTE_OTHER=-1,n.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,n.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,n.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,n.CADESCOM_AllowNoOutstandingRequest=1,n.CADESCOM_AllowNone=0,n.CADESCOM_AllowUntrustedCertificate=2,n.CADESCOM_AllowUntrustedRoot=4,n.CADESCOM_BASE64_TO_BINARY=1,n.CADESCOM_CADES_BES=1,n.CADESCOM_CADES_DEFAULT=0,n.CADESCOM_CADES_T=5,n.CADESCOM_CADES_X_LONG_TYPE_1=93,n.CADESCOM_CONTAINER_STORE=100,n.CADESCOM_CURRENT_USER_STORE=2,n.CADESCOM_DISPLAY_DATA_ATTRIBUTE=2,n.CADESCOM_DISPLAY_DATA_CONTENT=1,n.CADESCOM_DISPLAY_DATA_NONE=0,n.CADESCOM_ENCODE_ANY=-1,n.CADESCOM_ENCODE_BASE64=0,n.CADESCOM_ENCODE_BINARY=1,n.CADESCOM_ENCRYPTION_ALGORITHM_3DES=3,n.CADESCOM_ENCRYPTION_ALGORITHM_AES=4,n.CADESCOM_ENCRYPTION_ALGORITHM_DES=2,n.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89=25,n.CADESCOM_ENCRYPTION_ALGORITHM_RC2=0,n.CADESCOM_ENCRYPTION_ALGORITHM_RC4=1,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411=100,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256=101,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC=111,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512=102,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC=112,n.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC=110,n.CADESCOM_HASH_ALGORITHM_MD2=1,n.CADESCOM_HASH_ALGORITHM_MD4=2,n.CADESCOM_HASH_ALGORITHM_MD5=3,n.CADESCOM_HASH_ALGORITHM_SHA1=0,n.CADESCOM_HASH_ALGORITHM_SHA_256=4,n.CADESCOM_HASH_ALGORITHM_SHA_384=5,n.CADESCOM_HASH_ALGORITHM_SHA_512=6,n.CADESCOM_LOCAL_MACHINE_STORE=1,n.CADESCOM_PKCS7_TYPE=65535,n.CADESCOM_STRING_TO_UCS2LE=0,n.CADESCOM_SkipInstallToStore=268435456,n.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED=0,n.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING=1,n.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE=2,n.CAPICOM_ACTIVE_DIRECTORY_USER_STORE=3,n.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION=2,n.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME=1,n.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME=0,n.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY=7,n.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY=8,n.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY=6,n.CAPICOM_CERTIFICATE_FIND_EXTENSION=5,n.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME=2,n.CAPICOM_CERTIFICATE_FIND_KEY_USAGE=12,n.CAPICOM_CERTIFICATE_FIND_ROOT_NAME=3,n.CAPICOM_CERTIFICATE_FIND_SHA1_HASH=0,n.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME=1,n.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME=4,n.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED=11,n.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID=10,n.CAPICOM_CERTIFICATE_FIND_TIME_VALID=9,n.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT=0,n.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY=2,n.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN=1,n.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME=1,n.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME=0,n.CAPICOM_CURRENT_USER_STORE=2,n.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE=128,n.CAPICOM_EKU_CLIENT_AUTH=2,n.CAPICOM_EKU_OTHER=0,n.CAPICOM_EKU_SMARTCARD_LOGON=5,n.CAPICOM_LOCAL_MACHINE_STORE=1,n.CAPICOM_MEMORY_STORE=0,n.CAPICOM_MY_STORE="My",n.CAPICOM_OID_KEY_USAGE_EXTENSION=10,n.CAPICOM_OID_OTHER=0,n.CAPICOM_PROPID_ACCESS_STATE=14,n.CAPICOM_PROPID_ARCHIVED=19,n.CAPICOM_PROPID_ARCHIVED_KEY_HASH=65,n.CAPICOM_PROPID_AUTO_ENROLL=21,n.CAPICOM_PROPID_CROSS_CERT_DIST_POINTS=23,n.CAPICOM_PROPID_CTL_USAGE=9,n.CAPICOM_PROPID_DATE_STAMP=27,n.CAPICOM_PROPID_DESCRIPTION=13,n.CAPICOM_PROPID_EFS=17,n.CAPICOM_PROPID_ENHKEY_USAGE=9,n.CAPICOM_PROPID_ENROLLMENT=26,n.CAPICOM_PROPID_EXTENDED_ERROR_INFO=30,n.CAPICOM_PROPID_FIRST_RESERVED=66,n.CAPICOM_PROPID_FIRST_USER=32768,n.CAPICOM_PROPID_FORTEZZA_DATA=18,n.CAPICOM_PROPID_FRIENDLY_NAME=11,n.CAPICOM_PROPID_HASH_PROP=3,n.CAPICOM_PROPID_IE30_RESERVED=7,n.CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH=24,n.CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH=28,n.CAPICOM_PROPID_KEY_CONTEXT=5,n.CAPICOM_PROPID_KEY_IDENTIFIER=20,n.CAPICOM_PROPID_KEY_PROV_HANDLE=1,n.CAPICOM_PROPID_KEY_PROV_INFO=2,n.CAPICOM_PROPID_KEY_SPEC=6,n.CAPICOM_PROPID_LAST_RESERVED=32767,n.CAPICOM_PROPID_LAST_USER=65535,n.CAPICOM_PROPID_MD5_HASH=4,n.CAPICOM_PROPID_NEXT_UPDATE_LOCATION=10,n.CAPICOM_PROPID_PUBKEY_ALG_PARA=22,n.CAPICOM_PROPID_PUBKEY_HASH_RESERVED=8,n.CAPICOM_PROPID_PVK_FILE=12,n.CAPICOM_PROPID_RENEWAL=64,n.CAPICOM_PROPID_SHA1_HASH=3,n.CAPICOM_PROPID_SIGNATURE_HASH=15,n.CAPICOM_PROPID_SMART_CARD_DATA=16,n.CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH=29,n.CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH=25,n.CAPICOM_PROPID_UNKNOWN=0,n.CAPICOM_SMART_CARD_USER_STORE=4,n.CAPICOM_STORE_OPEN_EXISTING_ONLY=128,n.CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED=256,n.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED=2,n.CAPICOM_STORE_OPEN_READ_ONLY=0,n.CAPICOM_STORE_OPEN_READ_WRITE=1,n.CHECK_NONE=0,n.CHECK_OFFLINE_REVOCATION_STATUS=16,n.CHECK_ONLINE_REVOCATION_STATUS=8,n.CHECK_SIGNATURE_VALIDITY=4,n.CHECK_TIME_VALIDITY=2,n.CHECK_TRUSTED_ROOT=1,n.LOG_LEVEL_DEBUG=4,n.LOG_LEVEL_ERROR=1,n.LOG_LEVEL_INFO=2,n.TRUST_CTL_IS_NOT_SIGNATURE_VALID=262144,n.TRUST_CTL_IS_NOT_TIME_VALID=131072,n.TRUST_CTL_IS_NOT_VALID_FOR_USAGE=524288,n.TRUST_IS_CYCLIC=128,n.TRUST_IS_NOT_SIGNATURE_VALID=8,n.TRUST_IS_NOT_TIME_NESTED=2,n.TRUST_IS_NOT_TIME_VALID=1,n.TRUST_IS_NOT_VALID_FOR_USAGE=16,n.TRUST_IS_PARTIAL_CHAIN=65536,n.TRUST_IS_REVOKED=4,n.TRUST_IS_UNTRUSTED_ROOT=32,n.TRUST_REVOCATION_STATUS_UNKNOWN=64,n.XmlDsigGost3410Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411",n.XmlDsigGost3410UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411",n.XmlDsigGost3411Url="urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411",n.XmlDsigGost3411UrlObsolete="http://www.w3.org/2001/04/xmldsig-more#gostr3411"},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:["ОГРН","OGRN"],translation:"ОГРН"},{possibleNames:["ОГРНИП","OGRNIP"],translation:"ОГРНИП"},{possibleNames:["СНИЛС","SNILS"],translation:"СНИЛС"},{possibleNames:["ИНН","INN","ИНН организации"],translation:"ИНН"},{possibleNames:["E"],translation:"Email"},{possibleNames:["L"],translation:"Город"}]},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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.3.141.1.1":"РНС ФСС","1.2.643.3.141.1.2":"КП ФСС","1.2.643.3.2.100.65.13.11":'Использование в системе АИС "Госзакупки" Сахалинской области.',"1.2.643.3.8.100.1":'Сертификат типа "ekey-ГОСТ"',"1.2.643.3.8.100.1.1":"Общее использование в системах ИОК без права заверения финансовых документов","1.2.643.3.8.100.1.10":"Для участия в электронных торгах и подписания государственного контракта в информационных системах Тендерного комитета города Москвы уполномоченными лицами участников размещения государственного заказа города Москвы","1.2.643.3.8.100.1.11":"Подписание электронных документов в автоматизированной информационной системе размещения государственного и муниципального заказа Саратовской области","1.2.643.3.8.100.1.12":"Использование в системе государственного заказа Иркутской области","1.2.643.3.8.100.1.13":"Использование в электронной торговой площадке агентства государственного заказа Красноярского края","1.2.643.3.8.100.1.14":'Использование в электронной торговой площадке "Тендер"',"1.2.643.3.8.100.1.2":"Передача отчетности по ТКС","1.2.643.3.8.100.1.3":"Оформление взаимных обязательств, соглашений, договоров, актов и т.п.","1.2.643.3.8.100.1.4":"Внутрикорпоративный документооборот","1.2.643.3.8.100.1.5":"Использование в системах электронной торговли","1.2.643.3.8.100.1.6":'Использование в торгово-закупочной системе "ЭЛЕКТРА"',"1.2.643.3.8.100.1.7":"Использование в системе Портал государственных закупок Ставропольского края.","1.2.643.3.8.100.1.8":"Использование в Единой системе электронной торговли B2B-Center и B2G.","1.2.643.3.8.100.1.9":"Для участия в электронных торгах и подписания государственного контракта в электронной площадке ОАО «ЕЭТП» уполномоченными лицами участников размещения государственного или муниципального заказа","1.2.643.5.1.24.2.1.3":"Формирование документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя","1.2.643.5.1.24.2.1.3.1":"Формирование кадастровым инженером документов для получения государственных услуг в сфере ведения государственного кадастра недвижимости со стороны заявителя","1.2.643.5.1.24.2.2.2":"Формирование документов как результата оказания услуги со стороны органов регистрации прав","1.2.643.5.1.24.2.2.3":"Формирование документов для получения государственных услуг в сфере государственной регистрации прав на недвижимое имущество и сделок с ним со стороны заявителя","1.2.643.6.2.1.7.1":"Использование единоличным исполнительным органом юридического лица или уполномоченными представителями юридического лица в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских и иных прав и обязанностей в сфере негосударственного пенсионного обеспечения, негосударственного пенсионного страхования, в сфере деятельности паевых инвестиционных фондов, акционерных инвестиционных фондов, профессиональных участников рынка ценных бумаг, а также связанной с обслуживанием указанной деятельности услуг кредитных и иных организаций","1.2.643.6.2.1.7.2":"Использование физическим лицом в отношениях, связанных с возникновением, исполнением (осуществлением) и прекращением гражданских прав и обязанностей в отношении инвестиционных паев паевых инвестиционных фондов, в том числе отношения, связанные с учетом и/или фиксацией прав на инвестиционные паи паевых инвестиционных фондов","1.2.643.6.3":"Использование в электронных торговых системах и в программном обеспечении, связанным с обменом электронных сообщений","1.2.643.6.3.1.1":"Использование на электронных площадок отобранных для проведения аукционах в электронной форме","1.2.643.6.3.1.2.1":"Тип участника - Юридическое лицо","1.2.643.6.3.1.2.2":"Тип участника - Физическое лицо","1.2.643.6.3.1.2.3":"Тип участника - Индивидуальный предприниматель","1.2.643.6.3.1.3.1":"Участник размещения заказа","1.2.643.6.3.1.4.1":"Администратор организации","1.2.643.6.3.1.4.2":"Уполномоченный специалист","1.2.643.6.3.1.4.3":"Специалист с правом подписи контракта","1.2.840.113549.1.9.2":"Неструктурированное имя","1.3.6.1.4.1.24138.1.1.8.1":'Обеспечение юридической значимости в Системе "Электронная Торговая Площадка"',"1.3.6.1.4.1.29919.21":'Использование в системе Портал государственных закупок Ростовской области "Рефери".',"1.3.6.1.5.5.7.3.2":"Проверка подлинности клиента","1.3.6.1.5.5.7.3.4":"Защищенная электронная почта","1.3.643.3.8.100.15":'Использование в ЭТП "uTender"'}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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:["ОГРН","OGRN"],translation:"ОГРН"},{possibleNames:["ОГРНИП","OGRNIP"],translation:"ОГРНИП"},{possibleNames:["СНИЛС","SNILS"],translation:"СНИЛС"},{possibleNames:["ИНН","INN","ИНН организации"],translation:"ИНН"},{possibleNames:["E"],translation:"Email"},{possibleNames:["L"],translation:"Город"}]},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.exportBase64=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e;try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.Export(0)}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});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports.getAlgorithm=_afterPluginsLoaded_1._afterPluginsLoaded((function(){var cadesCertificate=this._cadesCertificate;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,n={algorithm:null,oid:null};try{e=_generateCadesFn_1.__cadesAsyncToken__+cadesCertificate.PublicKey(),e=_generateCadesFn_1.__cadesAsyncToken__+e.Algorithm,n.algorithm=_generateCadesFn_1.__cadesAsyncToken__+e.FriendlyName,n.oid=_generateCadesFn_1.__cadesAsyncToken__+e.Value}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении алгоритма")}return n})))}))},function(e,n,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var _ in n=arguments[t])Object.prototype.hasOwnProperty.call(n,_)&&(e[_]=n[_]);return e}).apply(this,arguments)},_=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},a=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var s=t(3),i=t(0);n.getDecodedExtendedKeyUsage=i._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,n){var t;return r(r({},e),((t={})[n]=s.OIDS_DICTIONARY[n]||null,t))}),{})]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!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,n=[];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,n.push(t),e--}}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении ОИД'ов")}return n})))}))},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(1),i=t(22),o=t(6);n.getInfo=a._afterPluginsLoaded((function(e,n){return r(this,void 0,void 0,(function(){var t,r;return _(this,(function(_){switch(_.label){case 0:return _.trys.push([0,2,,3]),[4,o.getCadesProp.call(this,n)];case 1:return t=_.sent(),[3,3];case 2:throw r=_.sent(),console.error(r),new Error(s._extractMeaningfulErrorMessage(r)||"Ошибка при извлечении информации из сертификата");case 3:return[2,i._parseCertInfo(e,t)]}}))}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=t(3);n._parseCertInfo=function(e,n){var t=n.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);if(t)return t.map((function(n){var t,_,a,s=n.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/),i=null==s?void 0:s[1],o=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==i?void 0:i.match(/^OID\.(.*)/),l=null==c?void 0:c[1],u=!1;if(l){var d=r.OIDS_DICTIONARY[l];d&&(i=d,u=!0)}var C=null===(a=e.find((function(e){return e.possibleNames.find((function(e){return e===i}))})))||void 0===a?void 0:a.translation;return C&&(i=C,u=!0),{description:o,title:i,isTranslated:u}}))}},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0);n.hasExtendedKeyUsage=a._afterPluginsLoaded((function(e){return r(this,void 0,void 0,(function(){var n;return _(this,(function(t){switch(t.label){case 0:return[4,this.getExtendedKeyUsage()];case 1:return n=t.sent(),[2,Array.isArray(e)?e.every((function(e){return n.some((function(n){return n===e}))})):n.some((function(n){return n===e}))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!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,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._extractCommonName=function(e){var n;return null===(n=e.match(/CN=(.+?)(?:,|$)/))||void 0===n?void 0:n[1]}},function(e,n,t){"use strict";var r=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},_=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(n,"__esModule",{value:!0});var a=t(0),s=t(1),i=t(27),o=t(28),c=t(7);n.isValidSystemSetup=a._afterPluginsLoaded((function(){return r(void 0,void 0,void 0,(function(){var e,n;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 n=t.sent(),console.error(n),new Error(s._extractMeaningfulErrorMessage(n)||"Настройки ЭП на данной машине не верны");case 3:if(!i._isSupportedCadesVersion(e.cadesVersion))throw new Error("Не поддерживаемая версия плагина");if(!o._isSupportedCSPVersion(e.cspVersion))throw new Error("Не поддерживаемая версия CSP");return[2,!0]}}))}))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._isSupportedCadesVersion=function(e){var n=e.match(/(\d+)\.(\d+)\.(\d+)/);if(!n)return!1;var t=n[1],r=(n[2],n[3]);return!(Number(t)<2)&&!(2===Number(t)&&Number(r)<12438)}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n._isSupportedCSPVersion=function(e){var n;return e=null===(n=e.match(/\d+?\b(?:\.\d+)?/))||void 0===n?void 0:n[0],Number(e)>=4}},function(module,exports,__webpack_require__){"use strict";var __awaiter=this&&this.__awaiter||function(e,n,t,r){return new(t||(t=Promise))((function(_,a){function s(e){try{o(r.next(e))}catch(e){a(e)}}function i(e){try{o(r.throw(e))}catch(e){a(e)}}function o(e){var n;e.done?_(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,i)}o((r=r.apply(e,n||[])).next())}))},__generator=this&&this.__generator||function(e,n){var t,r,_,a,s={label:0,sent:function(){if(1&_[0])throw _[1];return _[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(a){return function(i){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(_=2&a[0]?r.return:a[0]?r.throw||((_=r.return)&&_.call(r),0):r.next)&&!(_=_.call(r,a[1])).done)return _;switch(r=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++,r=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=n.call(e,s)}catch(e){a=[6,e],r=0}finally{t=_=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,i])}}};Object.defineProperty(exports,"__esModule",{value:!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__(30),_getDateObj_1=__webpack_require__(31);exports.createSignature=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint,dataBase64,detachedSignature){return void 0===detachedSignature&&(detachedSignature=!0),__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,n,t;try{e=_generateCadesFn_1.__cadesAsyncToken__+_generateCadesFn_1.__createCadesPluginObject__("CADESCOM.CPAttribute"),n=_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 r,_,a=_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(a)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при установке времени подписи")}try{_generateCadesFn_1.__cadesAsyncToken__,t.propset_Certificate(cadesCertificate),r=_generateCadesFn_1.__cadesAsyncToken__+t.AuthenticatedAttributes2,_generateCadesFn_1.__cadesAsyncToken__,r.Add(e),_generateCadesFn_1.__cadesAsyncToken__,n.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY),_generateCadesFn_1.__cadesAsyncToken__,n.propset_Content(dataBase64),_generateCadesFn_1.__cadesAsyncToken__,t.propset_Options(cadesplugin.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при указании данных для подписи")}try{_=_generateCadesFn_1.__cadesAsyncToken__+n.SignCades(t,cadesplugin.CADESCOM_CADES_BES,detachedSignature)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при подписании данных")}return _})))]}}))}))}))},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _afterPluginsLoaded_1=__webpack_require__(0),_extractMeaningfulErrorMessage_1=__webpack_require__(1),_generateCadesFn_1=__webpack_require__(2);exports._getCadesCert=_afterPluginsLoaded_1._afterPluginsLoaded((function(thumbprint){var cadesplugin=window.cadesplugin;return eval(_generateCadesFn_1._generateCadesFn((function(){var e,n,t,r;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{n=_generateCadesFn_1.__cadesAsyncToken__+e.Certificates,t=_generateCadesFn_1.__cadesAsyncToken__+n.Count}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка получения списка сертификатов")}if(!t)throw new Error("Нет доступных сертификатов");try{if(n=_generateCadesFn_1.__cadesAsyncToken__+n.Find(cadesplugin.CAPICOM_CERTIFICATE_FIND_SHA1_HASH,thumbprint),!(_generateCadesFn_1.__cadesAsyncToken__+n.Count))throw new Error('Сертификат с отпечатком: "'+thumbprint+'" не найден');r=_generateCadesFn_1.__cadesAsyncToken__+n.Item(1)}catch(e){throw console.error(e),new Error(_extractMeaningfulErrorMessage_1._extractMeaningfulErrorMessage(e)||"Ошибка при получении сертификата")}return e.Close(),r})))}))},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n._getDateObj=function(e){return e.getVarDate?e.getVarDate():e}}])}));
//# sourceMappingURL=crypto-pro.min.js.map