!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] * @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){ /*! 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]