var Oidc=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),t.exports=n(292)},function(t,e,n){(function(t){"use strict";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(2),n(287),n(289),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(3),n(50),n(51),n(52),n(53),n(55),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(68),n(70),n(72),n(74),n(77),n(78),n(79),n(83),n(85),n(87),n(91),n(92),n(93),n(94),n(96),n(97),n(98),n(99),n(100),n(101),n(102),n(104),n(105),n(106),n(108),n(109),n(110),n(112),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(130),n(131),n(135),n(136),n(137),n(138),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(158),n(159),n(165),n(166),n(168),n(169),n(170),n(173),n(174),n(175),n(176),n(177),n(179),n(180),n(181),n(182),n(185),n(187),n(188),n(189),n(191),n(193),n(195),n(196),n(197),n(199),n(200),n(201),n(202),n(208),n(211),n(212),n(214),n(215),n(218),n(219),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(242),n(243),n(244),n(245),n(246),n(247),n(249),n(250),n(251),n(252),n(253),n(254),n(256),n(257),n(259),n(260),n(261),n(262),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(285),n(286),t.exports=n(5)},function(t,e,n){"use strict";var r=n(4),i=n(5),s=n(6),o=n(7),a=n(9),u=n(18),c=n(22).KEY,f=n(8),h=n(23),l=n(24),d=n(19),p=n(25),g=n(26),y=n(39),v=n(42),m=n(12),S=n(29),b=n(16),w=n(17),E=n(43),x=n(46),A=n(48),R=n(11),F=A.f,_=R.f,K=x.f,P=r.Symbol,U=r.JSON,O=U&&U.stringify,C=!1,I="prototype",j=p("_hidden"),D=p("toPrimitive"),T={}.propertyIsEnumerable,J=h("symbol-registry"),H=h("symbols"),B=Object[I],N="function"==typeof P,k=r.QObject,M=o&&f(function(){return 7!=E(_({},"a",{get:function(){return _(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=F(B,e);r&&delete B[e],_(t,e,n),r&&t!==B&&_(B,e,r)}:_,V=function(t){var e=H[t]=E(P[I]);return e._k=t,o&&C&&M(B,t,{configurable:!0,set:function(e){s(this,j)&&s(this[j],t)&&(this[j][t]=!1),M(this,t,w(1,e))}}),e},L=N&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},q=function(t,e,n){return m(t),e=b(e,!0),m(n),s(H,e)?(n.enumerable?(s(t,j)&&t[j][e]&&(t[j][e]=!1),n=E(n,{enumerable:w(0,!1)})):(s(t,j)||_(t,j,w(1,{})),t[j][e]=!0),M(t,e,n)):_(t,e,n)},W=function(t,e){m(t);for(var n,r=y(e=S(e)),i=0,s=r.length;s>i;)q(t,n=r[i++],e[n]);return t},z=function(t,e){return void 0===e?E(t):W(E(t),e)},Y=function(t){var e=T.call(this,t=b(t,!0));return e||!s(this,t)||!s(H,t)||s(this,j)&&this[j][t]?e:!0},G=function(t,e){var n=F(t=S(t),e=b(e,!0));return!n||!s(H,e)||s(t,j)&&t[j][e]||(n.enumerable=!0),n},X=function(t){for(var e,n=K(S(t)),r=[],i=0;n.length>i;)s(H,e=n[i++])||e==j||e==c||r.push(e);return r},$=function(t){for(var e,n=K(S(t)),r=[],i=0;n.length>i;)s(H,e=n[i++])&&r.push(H[e]);return r},Z=function(t){if(void 0!==t&&!L(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&v(e)||(e=function(t,e){return n&&(e=n.call(this,t,e)),L(e)?void 0:e}),r[1]=e,O.apply(U,r)}},Q=f(function(){var t=P();return"[null]"!=O([t])||"{}"!=O({a:t})||"{}"!=O(Object(t))});N||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");return V(d(arguments.length>0?arguments[0]:void 0))},u(P[I],"toString",function(){return this._k}),A.f=G,R.f=q,n(47).f=x.f=X,n(41).f=Y,n(40).f=$,o&&!n(49)&&u(B,"propertyIsEnumerable",Y,!0)),a(a.G+a.W+a.F*!N,{Symbol:P});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;){var nt=tt[et++],rt=i.Symbol,it=p(nt);nt in rt||_(rt,nt,{value:N?it:V(it)})}k&&k[I]&&k[I].findChild||(C=!0),a(a.S+a.F*!N,"Symbol",{"for":function(t){return s(J,t+="")?J[t]:J[t]=P(t)},keyFor:function(t){if(L(t))return g(J,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){C=!0},useSimple:function(){C=!1}}),a(a.S+a.F*!N,"Object",{create:z,defineProperty:q,defineProperties:W,getOwnPropertyDescriptor:G,getOwnPropertyNames:X,getOwnPropertySymbols:$}),U&&a(a.S+a.F*(!N||Q),"JSON",{stringify:Z}),P[I][D]||n(10)(P[I],D,P[I].valueOf),l(P,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.2.2"};"number"==typeof __e&&(__e=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(4),i=n(5),s=n(10),o=n(18),a=n(20),u="prototype",c=function(t,e,n){var f,h,l,d,p=t&c.F,g=t&c.G,y=t&c.S,v=t&c.P,m=t&c.B,S=g?r:y?r[e]||(r[e]={}):(r[e]||{})[u],b=g?i:i[e]||(i[e]={}),w=b[u]||(b[u]={});g&&(n=e);for(f in n)h=!p&&S&&void 0!==S[f],l=(h?S:n)[f],d=m&&h?a(l,r):v&&"function"==typeof l?a(Function.call,l):l,S&&o(S,f,l,t&c.U),b[f]!=l&&s(b,f,d),v&&w[f]!=l&&(w[f]=l)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){var r=n(11),i=n(17);t.exports=n(7)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(12),i=n(14),s=n(16),o=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=s(e,!0),r(n),i)try{return o(t,e,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(13),i=n(4).document,s=r(i)&&r(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(4),i=n(10),s=n(6),o=n(19)("src"),a="toString",u=Function[a],c=(""+u).split(a);n(5).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(s(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(s(n,o)||i(n,o,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,a,function(){return"function"==typeof this&&this[o]||u.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(19)("meta"),i=n(13),s=n(6),o=n(11).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(8)(function(){return u(Object.preventExtensions({}))}),f=function(t){o(t,r,{value:{i:"O"+ ++a,w:{}}})},h=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!s(t,r)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[r].i},l=function(t,e){if(!s(t,r)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[r].w},d=function(t){return c&&p.NEED&&u(t)&&!s(t,r)&&f(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:h,getWeak:l,onFreeze:d}},function(t,e,n){var r=n(4),i="__core-js_shared__",s=r[i]||(r[i]={});t.exports=function(t){return s[t]||(s[t]={})}},function(t,e,n){var r=n(11).f,i=n(6),s=n(25)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:e})}},function(t,e,n){var r=n(23)("wks"),i=n(19),s=n(4).Symbol,o="function"==typeof s;t.exports=function(t){return r[t]||(r[t]=o&&s[t]||(o?s:i)("Symbol."+t))}},function(t,e,n){var r=n(27),i=n(29);t.exports=function(t,e){for(var n,s=i(t),o=r(s),a=o.length,u=0;a>u;)if(s[n=o[u++]]===e)return n}},function(t,e,n){var r=n(28),i=n(38);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(6),i=n(29),s=n(33)(!1),o=n(37)("IE_PROTO");t.exports=function(t,e){var n,a=i(t),u=0,c=[];for(n in a)n!=o&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~s(c,n)||c.push(n));return c}},function(t,e,n){var r=n(30),i=n(32);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(31);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(29),i=n(34),s=n(36);t.exports=function(t){return function(e,n,o){var a,u=r(e),c=i(u.length),f=s(o,c);if(t&&n!=n){for(;c>f;)if(a=u[f++],a!=a)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(35),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(35),i=Math.max,s=Math.min;t.exports=function(t,e){return t=r(t),0>t?i(t+e,0):s(t,e)}},function(t,e,n){var r=n(23)("keys"),i=n(19);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(27),i=n(40),s=n(41);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var o,a=n(t),u=s.f,c=0;a.length>c;)u.call(t,o=a[c++])&&e.push(o);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(31);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(12),i=n(44),s=n(38),o=n(37)("IE_PROTO"),a=function(){},u="prototype",c=function(){var t,e=n(15)("iframe"),r=s.length,i=">";for(e.style.display="none",n(45).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("u;)r.f(t,n=o[u++],e[n]);return t}},function(t,e,n){t.exports=n(4).document&&document.documentElement},function(t,e,n){var r=n(29),i=n(47).f,s={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return i(t)}catch(e){return o.slice()}};t.exports.f=function(t){return o&&"[object Window]"==s.call(t)?a(t):i(r(t))}},function(t,e,n){var r=n(28),i=n(38).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(41),i=n(17),s=n(29),o=n(16),a=n(6),u=n(14),c=Object.getOwnPropertyDescriptor;e.f=n(7)?c:function(t,e){if(t=s(t),e=o(e,!0),u)try{return c(t,e)}catch(n){}return a(t,e)?i(!r.f.call(t,e),t[e]):void 0}},function(t,e){t.exports=!1},function(t,e,n){var r=n(9);r(r.S,"Object",{create:n(43)})},function(t,e,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(9);r(r.S+r.F*!n(7),"Object",{defineProperties:n(44)})},function(t,e,n){var r=n(29),i=n(48).f;n(54)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(9),i=n(5),s=n(8);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],o={};o[t]=e(n),r(r.S+r.F*s(function(){n(1)}),"Object",o)}},function(t,e,n){var r=n(56),i=n(57);n(54)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(32);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(6),i=n(56),s=n(37)("IE_PROTO"),o=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?o:null}},function(t,e,n){var r=n(56),i=n(27);n(54)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(54)("getOwnPropertyNames",function(){return n(46).f})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(54)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13);n(54)("isFrozen",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(13);n(54)("isSealed",function(t){return function(e){return r(e)?t?t(e):!1:!0}})},function(t,e,n){var r=n(13);n(54)("isExtensible",function(t){return function(e){return r(e)?t?t(e):!0:!1}})},function(t,e,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(67)})},function(t,e,n){"use strict";var r=n(27),i=n(40),s=n(41),o=n(56),a=n(30),u=Object.assign;t.exports=!u||n(8)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=o(t),u=arguments.length,c=1,f=i.f,h=s.f;u>c;)for(var l,d=a(arguments[c++]),p=f?r(d).concat(f(d)):r(d),g=p.length,y=0;g>y;)h.call(d,l=p[y++])&&(n[l]=d[l]);return n}:u},function(t,e,n){var r=n(9);r(r.S,"Object",{is:n(69)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(9);r(r.S,"Object",{setPrototypeOf:n(71).set})},function(t,e,n){var r=n(13),i=n(12),s=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(20)(Function.call,n(48).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return s(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:s}},function(t,e,n){"use strict";var r=n(73),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(31),i=n(25)("toStringTag"),s="Arguments"==r(function(){return arguments}()),o=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=o(e=Object(t),i))?n:s?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var r=n(9);r(r.P,"Function",{bind:n(75)})},function(t,e,n){"use strict";var r=n(21),i=n(13),s=n(76),o=[].slice,a={},u=function(t,e,n){if(!(e in a)){for(var r=[],i=0;e>i;i++)r[i]="a["+i+"]";a[e]=Function("F,a","return new F("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?u(e,r.length,r):s(e,r,t)};return i(e.prototype)&&(a.prototype=e.prototype),a}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(11).f,i=n(17),s=n(6),o=Function.prototype,a=/^\s*function ([^ (]*)/,u="name";u in o||n(7)&&r(o,u,{configurable:!0,get:function(){var t=(""+this).match(a),e=t?t[1]:"";return s(this,u)||r(this,u,i(5,e)),e}})},function(t,e,n){"use strict";var r=n(13),i=n(57),s=n(25)("hasInstance"),o=Function.prototype;s in o||n(11).f(o,s,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(9),i=n(80);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(4).parseInt,i=n(81).trim,s=n(82),o=/^[\-+]?0[xX]/;t.exports=8!==r(s+"08")||22!==r(s+"0x16")?function(t,e){var n=i(String(t),3);return r(n,e>>>0||(o.test(n)?16:10))}:r},function(t,e,n){var r=n(9),i=n(32),s=n(8),o=n(82),a="["+o+"]",u="
",c=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),h=function(t,e,n){var i={},a=s(function(){return!!o[t]()||u[t]()!=u}),c=i[t]=a?e(l):o[t];n&&(i[n]=c),r(r.P+r.F*a,"String",i)},l=h.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(f,"")),t};t.exports=h},function(t,e){t.exports=" \n\x0B\f\r \u2028\u2029\ufeff"},function(t,e,n){var r=n(9),i=n(84);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(4).parseFloat,i=n(81).trim;t.exports=1/r(n(82)+"-0")!==-(1/0)?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(4),i=n(6),s=n(31),o=n(86),a=n(16),u=n(8),c=n(47).f,f=n(48).f,h=n(11).f,l=n(81).trim,d="Number",p=r[d],g=p,y=p.prototype,v=s(n(43)(y))==d,m="trim"in String.prototype,S=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){e=m?e.trim():l(e,3);var n,r,i,s=e.charCodeAt(0);if(43===s||45===s){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===s){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var o,u=e.slice(2),c=0,f=u.length;f>c;c++)if(o=u.charCodeAt(c),48>o||o>i)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(v?u(function(){y.valueOf.call(n)}):s(n)!=d)?o(new g(S(e)),n,p):S(e)};for(var b,w=n(7)?c(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;w.length>E;E++)i(g,b=w[E])&&!i(p,b)&&h(p,b,f(g,b));p.prototype=y,y.constructor=p,n(18)(r,d,p)}},function(t,e,n){var r=n(13),i=n(71).set;t.exports=function(t,e,n){var s,o=e.constructor;return o!==n&&"function"==typeof o&&(s=o.prototype)!==n.prototype&&r(s)&&i&&i(t,s),t}},function(t,e,n){"use strict";var r=n(9),i=(n(88),n(35)),s=n(89),o=n(90),a=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",h="0",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+o.call(h,7-n.length)+n}return e},g=function(t,e,n){return 0===e?n:e%2===1?g(t,e-1,n*t):g(t*t,e/2,n)},y=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!a&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0))||!n(8)(function(){a.call({})})),"Number",{toFixed:function(t){var e,n,r,a,u=s(this,f),c=i(t),v="",m=h;if(0>c||c>20)throw RangeError(f);if(u!=u)return"NaN";if(-1e21>=u||u>=1e21)return String(u);if(0>u&&(v="-",u=-u),u>1e-21)if(e=y(u*g(2,69,1))-69,n=0>e?u*g(2,-e,1):u/g(2,e,1),n*=4503599627370496,e=52-e,e>0){for(l(0,n),r=c;r>=7;)l(1e7,0),r-=7;for(l(g(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<0?(a=m.length,m=v+(c>=a?"0."+o.call(h,c-a)+m:m.slice(0,a-c)+"."+m.slice(a-c))):m=v+m,m}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(31);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(35),i=n(32);t.exports=function(t){var e=String(i(this)),n="",s=r(t);if(0>s||s==1/0)throw RangeError("Count can't be negative");for(;s>0;(s>>>=1)&&(e+=e))1&s&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(9),i=n(8),s=n(89),o=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==o.call(1,void 0)})||!i(function(){o.call({})})),"Number",{toPrecision:function(t){var e=s(this,"Number#toPrecision: incorrect invocation!");return void 0===t?o.call(e):o.call(e,t)}})},function(t,e,n){var r=n(9);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(9),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(9);r(r.S,"Number",{isInteger:n(95)})},function(t,e,n){var r=n(13),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(9);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(9),i=n(95),s=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&s(t)<=9007199254740991}})},function(t,e,n){var r=n(9);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(9);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(9),i=n(84);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(9),i=n(80);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(9),i=n(103),s=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+s(t-1)*s(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?0>t?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(9),s=Math.asinh;i(i.S+i.F*!(s&&1/s(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(9),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(9),i=n(107);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},function(t,e,n){var r=n(9);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(9),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(9),i=n(111);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(9),i=n(107),s=Math.pow,o=s(2,-52),a=s(2,-23),u=s(2,127)*(2-a),c=s(2,-126),f=function(t){return t+1/o-1/o};r(r.S,"Math",{fround:function(t){var e,n,r=Math.abs(t),s=i(t);return c>r?s*f(r/c/a)*c*a:(e=(1+a/o)*r,n=e-(e-r),n>u||n!=n?s*(1/0):s*n)}})},function(t,e,n){var r=n(9),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,s=0,o=0,a=arguments.length,u=0;a>o;)n=i(arguments[o++]),n>u?(r=u/n,s=s*r*r+1,u=n):n>0?(r=n/u,s+=r*r):s+=n;return u===1/0?1/0:u*Math.sqrt(s)}})},function(t,e,n){var r=n(9),i=Math.imul;r(r.S+r.F*n(8)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,s=n&r,o=n&i;return 0|s*o+((n&r>>>16)*o+s*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{log10:function(t){return Math.log(t)/Math.LN10}})},function(t,e,n){var r=n(9);r(r.S,"Math",{log1p:n(103)})},function(t,e,n){var r=n(9);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(9);r(r.S,"Math",{sign:n(107)})},function(t,e,n){var r=n(9),i=n(111),s=Math.exp;r(r.S+r.F*n(8)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(s(t-1)-s(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(9),i=n(111),s=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(s(t)+s(-t))}})},function(t,e,n){var r=n(9);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(9),i=n(36),s=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,o=0;r>o;){if(e=+arguments[o++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(65536>e?s(e):s(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(9),i=n(29),s=n(34);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=s(e.length),r=arguments.length,o=[],a=0;n>a;)o.push(String(e[a++])),r>a&&o.push(String(arguments[a]));return o.join("")}})},function(t,e,n){"use strict";n(81)("trim",function(t){return function(){return t(this,3)}})},function(t,e,n){"use strict";var r=n(126)(!0);n(127)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(35),i=n(32);t.exports=function(t){return function(e,n){var s,o,a=String(i(e)),u=r(n),c=a.length;return 0>u||u>=c?t?"":void 0:(s=a.charCodeAt(u),55296>s||s>56319||u+1===c||(o=a.charCodeAt(u+1))<56320||o>57343?t?a.charAt(u):s:t?a.slice(u,u+2):(s-55296<<10)+(o-56320)+65536)}}},function(t,e,n){"use strict";var r=n(49),i=n(9),s=n(18),o=n(10),a=n(6),u=n(128),c=n(129),f=n(24),h=n(57),l=n(25)("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",g="keys",y="values",v=function(){return this};t.exports=function(t,e,n,m,S,b,w){c(n,e,m);var E,x,A,R=function(t){if(!d&&t in P)return P[t];switch(t){case g:return function(){return new n(this,t)};case y:return function(){return new n(this,t)}}return function(){return new n(this,t)}},F=e+" Iterator",_=S==y,K=!1,P=t.prototype,U=P[l]||P[p]||S&&P[S],O=U||R(S),C=S?_?R("entries"):O:void 0,I="Array"==e?P.entries||U:U;if(I&&(A=h(I.call(new t)),A!==Object.prototype&&(f(A,F,!0),r||a(A,l)||o(A,l,v))),_&&U&&U.name!==y&&(K=!0,O=function(){return U.call(this)}),r&&!w||!d&&!K&&P[l]||o(P,l,O),u[e]=O,u[F]=v,S)if(E={values:_?O:R(y),keys:b?O:R(g),entries:C},w)for(x in E)x in P||s(P,x,E[x]);else i(i.P+i.F*(d||K),e,E);return E}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(43),i=n(17),s=n(24),o={};n(10)(o,n(25)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(o,{next:i(1,n)}),s(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(9),i=n(126)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(9),i=n(34),s=n(132),o="endsWith",a=""[o];r(r.P+r.F*n(134)(o),"String",{endsWith:function(t){var e=s(this,t,o),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),c=String(t);return a?a.call(e,c,u):e.slice(u-c.length,u)===c}})},function(t,e,n){var r=n(133),i=n(32);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(13),i=n(31),s=n(25)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(25)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},function(t,e,n){"use strict";var r=n(9),i=n(132),s="includes";r(r.P+r.F*n(134)(s),"String",{includes:function(t){return!!~i(this,t,s).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(9);r(r.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var r=n(9),i=n(34),s=n(132),o="startsWith",a=""[o];r(r.P+r.F*n(134)(o),"String",{startsWith:function(t){var e=s(this,t,o),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(139)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(9),i=n(8),s=n(32),o=/"/g,a=function(t,e,n,r){var i=String(s(t)),a="<"+e;return""!==n&&(a+=" "+n+'="'+String(r).replace(o,""")+'"'),a+">"+i+""+e+">"};t.exports=function(t,e){var n={};n[t]=e(a),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(139)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(139)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(139)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(139)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(139)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(139)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(139)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(139)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(139)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(139)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(139)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(139)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(9);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16);r(r.P+r.F*n(8)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=s(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){"use strict";var r=n(9),i=n(8),s=Date.prototype.getTime,o=function(t){return t>9?t:"0"+t};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=0>e?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+o(t.getUTCMonth()+1)+"-"+o(t.getUTCDate())+"T"+o(t.getUTCHours())+":"+o(t.getUTCMinutes())+":"+o(t.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}})},function(t,e,n){var r=Date.prototype,i="Invalid Date",s="toString",o=r[s],a=r.getTime;new Date(NaN)+""!=i&&n(18)(r,s,function(){var t=a.call(this);return t===t?o.call(this):i;
})},function(t,e,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(157))},function(t,e,n){"use strict";var r=n(12),i=n(16),s="number";t.exports=function(t){if("string"!==t&&t!==s&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),t!=s)}},function(t,e,n){var r=n(9);r(r.S,"Array",{isArray:n(42)})},function(t,e,n){"use strict";var r=n(20),i=n(9),s=n(56),o=n(160),a=n(161),u=n(34),c=n(162),f=n(163);i(i.S+i.F*!n(164)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,h,l=s(t),d="function"==typeof this?this:Array,p=arguments.length,g=p>1?arguments[1]:void 0,y=void 0!==g,v=0,m=f(l);if(y&&(g=r(g,p>2?arguments[2]:void 0,2)),void 0==m||d==Array&&a(m))for(e=u(l.length),n=new d(e);e>v;v++)c(n,v,y?g(l[v],v):l[v]);else for(h=m.call(l),n=new d;!(i=h.next()).done;v++)c(n,v,y?o(h,g,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){var r=n(12);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(s){var o=t["return"];throw void 0!==o&&r(o.call(t)),s}}},function(t,e,n){var r=n(128),i=n(25)("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||s[i]===t)}},function(t,e,n){"use strict";var r=n(11),i=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(73),i=n(25)("iterator"),s=n(128);t.exports=n(5).getIteratorMethod=function(t){return void 0!=t?t[i]||t["@@iterator"]||s[r(t)]:void 0}},function(t,e,n){var r=n(25)("iterator"),i=!1;try{var s=[7][r]();s["return"]=function(){i=!0},Array.from(s,function(){throw 2})}catch(o){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var s=[7],o=s[r]();o.next=function(){return{done:n=!0}},s[r]=function(){return o},t(s)}catch(a){}return n}},function(t,e,n){"use strict";var r=n(9),i=n(162);r(r.S+r.F*n(8)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(9),i=n(29),s=[].join;r(r.P+r.F*(n(30)!=Object||!n(167)(s)),"Array",{join:function(t){return s.call(i(this),void 0===t?",":t)}})},function(t,e,n){var r=n(8);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(9),i=n(45),s=n(31),o=n(36),a=n(34),u=[].slice;r(r.P+r.F*n(8)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=a(this.length),r=s(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=o(t,n),c=o(e,n),f=a(c-i),h=Array(f),l=0;f>l;l++)h[l]="String"==r?this.charAt(i+l):this[i+l];return h}})},function(t,e,n){"use strict";var r=n(9),i=n(21),s=n(56),o=n(8),a=[].sort,u=[1,2,3];r(r.P+r.F*(o(function(){u.sort(void 0)})||!o(function(){u.sort(null)})||!n(167)(a)),"Array",{sort:function(t){return void 0===t?a.call(s(this)):a.call(s(this),i(t))}})},function(t,e,n){"use strict";var r=n(9),i=n(171)(0),s=n(167)([].forEach,!0);r(r.P+r.F*!s,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,e,n){var r=n(20),i=n(30),s=n(56),o=n(34),a=n(172);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,h=6==t,l=5==t||h,d=e||a;return function(e,a,p){for(var g,y,v=s(e),m=i(v),S=r(a,p,3),b=o(m.length),w=0,E=n?d(e,b):u?d(e,0):void 0;b>w;w++)if((l||w in m)&&(g=m[w],y=S(g,w,v),t))if(n)E[w]=y;else if(y)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:E.push(g)}else if(f)return!1;return h?-1:c||f?f:E}}},function(t,e,n){var r=n(13),i=n(42),s=n(25)("species");t.exports=function(t,e){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[s],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},function(t,e,n){"use strict";var r=n(9),i=n(171)(1);r(r.P+r.F*!n(167)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(171)(2);r(r.P+r.F*!n(167)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(171)(3);r(r.P+r.F*!n(167)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(171)(4);r(r.P+r.F*!n(167)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(178);r(r.P+r.F*!n(167)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(21),i=n(56),s=n(30),o=n(34);t.exports=function(t,e,n,a,u){r(e);var c=i(t),f=s(c),h=o(c.length),l=u?h-1:0,d=u?-1:1;if(2>n)for(;;){if(l in f){a=f[l],l+=d;break}if(l+=d,u?0>l:l>=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?l>=0:h>l;l+=d)l in f&&(a=e(a,f[l],l,c));return a}},function(t,e,n){"use strict";var r=n(9),i=n(178);r(r.P+r.F*!n(167)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(9),i=n(33)(!1),s=[].indexOf,o=!!s&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!n(167)(s)),"Array",{indexOf:function(t){return o?s.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(9),i=n(29),s=n(35),o=n(34),a=[].lastIndexOf,u=!!a&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(167)(a)),"Array",{lastIndexOf:function(t){if(u)return a.apply(this,arguments)||0;var e=i(this),n=o(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,s(arguments[1]))),0>r&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(9);r(r.P,"Array",{copyWithin:n(183)}),n(184)("copyWithin")},function(t,e,n){"use strict";var r=n(56),i=n(36),s=n(34);t.exports=[].copyWithin||function(t,e){var n=r(this),o=s(n.length),a=i(t,o),u=i(e,o),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?o:i(c,o))-u,o-a),h=1;for(a>u&&u+f>a&&(h=-1,u+=f-1,a+=f-1);f-- >0;)u in n?n[a]=n[u]:delete n[a],a+=h,u+=h;return n}},function(t,e,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(9);r(r.P,"Array",{fill:n(186)}),n(184)("fill")},function(t,e,n){"use strict";var r=n(56),i=n(36),s=n(34);t.exports=function(t){for(var e=r(this),n=s(e.length),o=arguments.length,a=i(o>1?arguments[1]:void 0,n),u=o>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>a;)e[a++]=t;return e}},function(t,e,n){"use strict";var r=n(9),i=n(171)(5),s="find",o=!0;s in[]&&Array(1)[s](function(){o=!1}),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(184)(s)},function(t,e,n){"use strict";var r=n(9),i=n(171)(6),s="findIndex",o=!0;s in[]&&Array(1)[s](function(){o=!1}),r(r.P+r.F*o,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(184)(s)},function(t,e,n){n(190)("Array")},function(t,e,n){"use strict";var r=n(4),i=n(11),s=n(7),o=n(25)("species");t.exports=function(t){var e=r[t];s&&e&&!e[o]&&i.f(e,o,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(184),i=n(192),s=n(128),o=n(29);t.exports=n(127)(Array,"Array",function(t,e){this._t=o(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(86),s=n(11).f,o=n(47).f,a=n(133),u=n(194),c=r.RegExp,f=c,h=c.prototype,l=/a/g,d=/a/g,p=new c(l)!==l;if(n(7)&&(!p||n(8)(function(){return d[n(25)("match")]=!1,c(l)!=l||c(d)==d||"/a/i"!=c(l,"i")}))){c=function(t,e){var n=this instanceof c,r=a(t),s=void 0===e;return!n&&r&&t.constructor===c&&s?t:i(p?new f(r&&!s?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&s?u.call(t):e),n?this:h,c)};for(var g=(function(t){t in c||s(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})}),y=o(f),v=0;y.length>v;)g(y[v++]);h.constructor=c,c.prototype=h,n(18)(r,"RegExp",c)}n(190)("RegExp")},function(t,e,n){"use strict";var r=n(12);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";n(196);var r=n(12),i=n(194),s=n(7),o="toString",a=/./[o],u=function(t){n(18)(RegExp.prototype,o,t,!0)};n(8)(function(){return"/a/b"!=a.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!s&&t instanceof RegExp?i.call(t):void 0)}):a.name!=o&&u(function(){return a.call(this)})},function(t,e,n){n(7)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(194)})},function(t,e,n){n(198)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";var r=n(10),i=n(18),s=n(8),o=n(32),a=n(25);t.exports=function(t,e,n){var u=a(t),c=n(o,u,""[t]),f=c[0],h=c[1];s(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,f),r(RegExp.prototype,u,2==e?function(t,e){return h.call(t,this,e)}:function(t){return h.call(t,this)}))}},function(t,e,n){n(198)("replace",2,function(t,e,n){return[function(r,i){"use strict";var s=t(this),o=void 0==r?void 0:r[e];return void 0!==o?o.call(r,s,i):n.call(String(s),r,i)},n]})},function(t,e,n){n(198)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(198)("split",2,function(t,e,r){"use strict";var i=n(133),s=r,o=[].push,a="split",u="length",c="lastIndex";if("c"=="abbc"[a](/(b)*/)[1]||4!="test"[a](/(?:)/,-1)[u]||2!="ab"[a](/(?:ab)*/)[u]||4!="."[a](/(.?)(.?)/)[u]||"."[a](/()()/)[u]>1||""[a](/.?/)[u]){var f=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return s.call(n,t,e);var r,a,h,l,d,p=[],g=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),y=0,v=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,g+"g");for(f||(r=new RegExp("^"+m.source+"$(?!\\s)",g));(a=m.exec(n))&&(h=a.index+a[0][u],!(h>y&&(p.push(n.slice(y,a.index)),!f&&a[u]>1&&a[0].replace(r,function(){for(d=1;d1&&a.index=v)));)m[c]===a.index&&m[c]++;return y===n[u]?!l&&m.test("")||p.push(""):p.push(n.slice(y)),p[u]>v?p.slice(0,v):p}}else"0"[a](void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:s.call(this,t,e)});return[function(n,i){var s=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,s,i):r.call(String(s),n,i)},r]})},function(t,e,n){"use strict";var r,i,s,o=n(49),a=n(4),u=n(20),c=n(73),f=n(9),h=n(13),l=(n(12),n(21)),d=n(88),p=n(203),g=(n(71).set,n(204)),y=n(205).set,v=n(206),m="Promise",S=a.TypeError,b=a.process,w=a[m],b=a.process,E="process"==c(b),x=function(){},A=!!function(){try{var t=w.resolve(1),e=(t.constructor={})[n(25)("species")]=function(t){t(x,x)};return(E||"function"==typeof PromiseRejectionEvent)&&t.then(x)instanceof e}catch(r){}}(),R=function(t,e){return t===e||t===w&&e===s},F=function(t){var e;return h(t)&&"function"==typeof(e=t.then)?e:!1},_=function(t){return R(w,t)?new K(t):new i(t)},K=i=function(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw S("Bad Promise constructor");e=t,n=r}),this.resolve=l(e),this.reject=l(n)},P=function(t){try{t()}catch(e){return{error:e}}},U=function(t,e){if(!t._n){t._n=!0;var n=t._c;v(function(){for(var r=t._v,i=1==t._s,s=0,o=function(e){var n,s,o=i?e.ok:e.fail,a=e.resolve,u=e.reject,c=e.domain;try{o?(i||(2==t._h&&I(t),t._h=1),o===!0?n=r:(c&&c.enter(),n=o(r),c&&c.exit()),n===e.promise?u(S("Promise-chain cycle")):(s=F(n))?s.call(n,a,u):a(n)):u(r)}catch(f){u(f)}};n.length>s;)o(n[s++]);t._c=[],t._n=!1,e&&!t._h&&O(t)})}},O=function(t){y.call(a,function(){var e,n,r,i=t._v;if(C(t)&&(e=P(function(){E?b.emit("unhandledRejection",i,t):(n=a.onunhandledrejection)?n({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=E||C(t)?2:1),t._a=void 0,e)throw e.error})},C=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!C(e.promise))return!1;return!0},I=function(t){y.call(a,function(){var e;E?b.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})})},j=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),U(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw S("Promise can't be resolved itself");(e=F(t))?v(function(){var r={_w:n,_d:!1};try{e.call(t,u(D,r,1),u(j,r,1))}catch(i){j.call(r,i)}}):(n._v=t,n._s=1,U(n,!1))}catch(r){j.call({_w:n,_d:!1},r)}}};A||(w=function(t){d(this,w,m,"_h"),l(t),r.call(this);try{t(u(D,this,1),u(j,this,1))}catch(e){j.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(207)(w.prototype,{then:function(t,e){var n=_(g(this,w));return n.ok="function"==typeof t?t:!0,n.fail="function"==typeof e&&e,n.domain=E?b.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&U(this,!1),n.promise},"catch":function(t){return this.then(void 0,t)}}),K=function(){var t=new r;this.promise=t,this.resolve=u(D,t,1),this.reject=u(j,t,1)}),f(f.G+f.W+f.F*!A,{Promise:w}),n(24)(w,m),n(190)(m),s=n(5)[m],f(f.S+f.F*!A,m,{reject:function(t){var e=_(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(o||!A),m,{resolve:function(t){if(t instanceof w&&R(t.constructor,this))return t;var e=_(this),n=e.resolve;return n(t),e.promise}}),f(f.S+f.F*!(A&&n(164)(function(t){w.all(t)["catch"](x)})),m,{all:function(t){var e=this,n=_(e),r=n.resolve,i=n.reject,s=P(function(){var n=[],s=0,o=1;p(t,!1,function(t){var a=s++,u=!1;n.push(void 0),o++,e.resolve(t).then(function(t){u||(u=!0,n[a]=t,--o||r(n))},i)}),--o||r(n)});return s&&i(s.error),n.promise},race:function(t){var e=this,n=_(e),r=n.reject,i=P(function(){p(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(t,e,n){var r=n(20),i=n(160),s=n(161),o=n(12),a=n(34),u=n(163);t.exports=function(t,e,n,c,f){var h,l,d,p=f?function(){return t}:u(t),g=r(n,c,e?2:1),y=0;if("function"!=typeof p)throw TypeError(t+" is not iterable!");if(s(p))for(h=a(t.length);h>y;y++)e?g(o(l=t[y])[0],l[1]):g(t[y]);else for(d=p.call(t);!(l=d.next()).done;)i(d,g,l.value,e)}},function(t,e,n){var r=n(12),i=n(21),s=n(25)("species");t.exports=function(t,e){var n,o=r(t).constructor;return void 0===o||void 0==(n=r(o)[s])?e:i(n)}},function(t,e,n){var r,i,s,o=n(20),a=n(76),u=n(45),c=n(15),f=n(4),h=f.process,l=f.setImmediate,d=f.clearImmediate,p=f.MessageChannel,g=0,y={},v="onreadystatechange",m=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},S=function(t){m.call(t.data)};l&&d||(l=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++g]=function(){a("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete y[t]},"process"==n(31)(h)?r=function(t){h.nextTick(o(m,t,1))}:p?(i=new p,s=i.port2,i.port1.onmessage=S,r=o(s.postMessage,s,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",S,!1)):r=v in c("script")?function(t){u.appendChild(c("script"))[v]=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(o(m,t,1),0)}),t.exports={set:l,clear:d}},function(t,e,n){var r,i,s,o=n(4),a=n(205).set,u=o.MutationObserver||o.WebKitMutationObserver,c=o.process,f=o.Promise,h="process"==n(31)(c),l=function(){var t,e;for(h&&(t=c.domain)&&t.exit();r;)e=r.fn,e(),r=r.next;i=void 0,t&&t.enter()};if(h)s=function(){c.nextTick(l)};else if(u){var d=!0,p=document.createTextNode("");new u(l).observe(p,{characterData:!0}),s=function(){p.data=d=!d}}else s=f&&f.resolve?function(){f.resolve().then(l)}:function(){a.call(o,l)};t.exports=function(t){var e={fn:t,next:void 0};i&&(i.next=e),r||(r=e,s()),i=e}},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(209);t.exports=n(210)("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(11).f,i=n(43),s=(n(10),n(207)),o=n(20),a=n(88),u=n(32),c=n(203),f=n(127),h=n(192),l=n(190),d=n(7),p=n(22).fastKey,g=d?"_s":"size",y=function(t,e){var n,r=p(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var h=t(function(t,r){a(t,h,e,"_i"),t._i=i(null),t._f=void 0,t._l=void 0,t[g]=0,void 0!=r&&c(r,n,t[f],t)});return s(h.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[g]=0},"delete":function(t){var e=this,n=y(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[g]--}return!!n},forEach:function(t){a(this,h,"forEach");for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),d&&r(h.prototype,"size",{get:function(){return u(this[g])}}),h},def:function(t,e,n){var r,i,s=y(t,e);return s?s.v=n:(t._l=s={i:i=p(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[g]++,"F"!==i&&(t._i[i]=s)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?h(0,n.k):"values"==e?h(0,n.v):h(0,[n.k,n.v]):(t._t=void 0,h(1))},n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(4),i=n(9),s=n(18),o=n(207),a=n(22),u=n(203),c=n(88),f=n(13),h=n(8),l=n(164),d=n(24),p=n(86);t.exports=function(t,e,n,g,y,v){var m=r[t],S=m,b=y?"set":"add",w=S&&S.prototype,E={},x=function(t){var e=w[t];s(w,t,"delete"==t?function(t){return v&&!f(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return v&&!f(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof S&&(v||w.forEach&&!h(function(){(new S).entries().next()}))){var A=new S,R=A[b](v?{}:-0,1)!=A,F=h(function(){A.has(1)}),_=l(function(t){new S(t)}),K=!v&&h(function(){for(var t=new S,e=5;e--;)t[b](e,e);return!t.has(-0)});_||(S=e(function(e,n){c(e,S,t);var r=p(new m,e,S);return void 0!=n&&u(n,y,r[b],r),r}),S.prototype=w,w.constructor=S),(F||K)&&(x("delete"),x("has"),y&&x("get")),(K||R)&&x(b),v&&w.clear&&delete w.clear}else S=g.getConstructor(e,t,y,b),o(S.prototype,n),a.NEED=!0;return d(S,t),E[t]=S,i(i.G+i.W+i.F*(S!=m),E),v||g.setStrong(S,t,y),S}},function(t,e,n){"use strict";var r=n(209);t.exports=n(210)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(171)(0),s=n(18),o=n(22),a=n(67),u=n(213),c=n(13),f=(n(6),o.getWeak),h=Object.isExtensible,l=u.ufstore,d={},p=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},g={get:function(t){if(c(t)){var e=f(t);return e===!0?l(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},y=t.exports=n(210)("WeakMap",p,g,u,!0,!0);7!=(new y).set((Object.freeze||Object)(d),7).get(d)&&(r=u.getConstructor(p),a(r.prototype,g),o.NEED=!0,i(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];s(e,t,function(e,i){if(c(e)&&!h(e)){this._f||(this._f=new r);var s=this._f[t](e,i);return"set"==t?this:s}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(207),i=n(22).getWeak,s=n(12),o=n(13),a=n(88),u=n(203),c=n(171),f=n(6),h=c(5),l=c(6),d=0,p=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return h(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);return e?e[1]:void 0},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=l(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,s){var c=t(function(t,r){a(t,c,e,"_i"),t._i=d++,t._l=void 0,void 0!=r&&u(r,n,t[s],t)});return r(c.prototype,{"delete":function(t){if(!o(t))return!1;var e=i(t);return e===!0?p(this)["delete"](t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!o(t))return!1;var e=i(t);return e===!0?p(this).has(t):e&&f(e,this._i)}}),c},def:function(t,e,n){var r=i(s(e),!0);return r===!0?p(t).set(e,n):r[t._i]=n,t},ufstore:p}},function(t,e,n){"use strict";var r=n(213);n(210)("WeakSet",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(9),i=n(216),s=n(217),o=n(12),a=n(36),u=n(34),c=n(13),f=(n(25)("typed_array"),n(4).ArrayBuffer),h=n(204),l=s.ArrayBuffer,d=s.DataView,p=i.ABV&&f.isView,g=l.prototype.slice,y=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(f!==l),{ArrayBuffer:l}),r(r.S+r.F*!i.CONSTR,v,{isView:function(t){return p&&p(t)||c(t)&&y in t}}),r(r.P+r.U+r.F*n(8)(function(){return!new l(2).slice(1,void 0).byteLength}),v,{slice:function(t,e){if(void 0!==g&&void 0===e)return g.call(o(this),t);for(var n=o(this).byteLength,r=a(t,n),i=a(void 0===e?n:e,n),s=new(h(this,l))(u(i-r)),c=new d(this),f=new d(s),p=0;i>r;)f.setUint8(p++,c.getUint8(r++));return s}}),n(190)(v)},function(t,e,n){for(var r,i=n(4),s=n(10),o=n(19),a=o("typed_array"),u=o("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,h=0,l=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l>h;)(r=i[d[h++]])?(s(r.prototype,a,!0),s(r.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:a,VIEW:u}},function(t,e,n){"use strict";var r=n(4),i=n(7),s=n(49),o=n(216),a=n(10),u=n(207),c=n(8),f=n(88),h=n(35),l=n(34),d=n(47).f,p=n(11).f,g=n(186),y=n(24),v="ArrayBuffer",m="DataView",S="prototype",b="Wrong length!",w="Wrong index!",E=r[v],x=r[m],A=r.Math,R=(r.parseInt,r.RangeError),F=r.Infinity,_=E,K=A.abs,P=A.pow,U=(A.min,A.floor),O=A.log,C=A.LN2,I="buffer",j="byteLength",D="byteOffset",T=i?"_b":I,J=i?"_l":j,H=i?"_o":D,B=function(t,e,n){var r,i,s,o=Array(n),a=8*n-e-1,u=(1<>1,f=23===e?P(2,-24)-P(2,-77):0,h=0,l=0>t||0===t&&0>1/t?1:0;for(t=K(t),t!=t||t===F?(i=t!=t?1:0,r=u):(r=U(O(t)/C),t*(s=P(2,-r))<1&&(r--,s*=2),t+=r+c>=1?f/s:f*P(2,1-c),t*s>=2&&(r++,s/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*s-1)*P(2,e),r+=c):(i=t*P(2,c-1)*P(2,e),r=0));e>=8;o[h++]=255&i,i/=256,e-=8);for(r=r<0;o[h++]=255&r,r/=256,a-=8);return o[--h]|=128*l,o},N=function(t,e,n){var r,i=8*n-e-1,s=(1<>1,a=i-7,u=n-1,c=t[u--],f=127&c;for(c>>=7;a>0;f=256*f+t[u],u--,a-=8);for(r=f&(1<<-a)-1,f>>=-a,a+=e;a>0;r=256*r+t[u],u--,a-=8);if(0===f)f=1-o;else{if(f===s)return r?NaN:c?-F:F;r+=P(2,e),f-=o}return(c?-1:1)*r*P(2,f-e)},k=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},M=function(t){return[255&t]},V=function(t){return[255&t,t>>8&255]},L=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},q=function(t){return B(t,52,8)},W=function(t){return B(t,23,4)},z=function(t,e,n){p(t[S],e,{get:function(){return this[n]}})},Y=function(t,e,n,r){var i=+n,s=h(i);if(i!=s||0>s||s+e>t[J])throw R(w);var o=t[T]._b,a=s+t[H],u=o.slice(a,a+e);return r?u:u.reverse()},G=function(t,e,n,r,i,s){var o=+n,a=h(o);if(o!=a||0>a||a+e>t[J])throw R(w);for(var u=t[T]._b,c=a+t[H],f=r(+i),l=0;e>l;l++)u[c+l]=f[s?l:e-l-1]},X=function(t,e){f(t,E,v);var n=+e,r=l(n);if(n!=r)throw R(b);return r};if(o.ABV){if(!c(function(){new E})||!c(function(){new E(.5)})){E=function(t){return new _(X(this,t))};for(var $,Z=E[S]=_[S],Q=d(_),tt=0;Q.length>tt;)($=Q[tt++])in E||a(E,$,_[$]);s||(Z.constructor=E)}var et=new x(new E(2)),nt=x[S].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||u(x[S],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else E=function(t){var e=X(this,t);this._b=g.call(Array(e),0),this[J]=e},x=function(t,e,n){f(this,x,m),f(t,E,m);var r=t[J],i=h(e);if(0>i||i>r)throw R("Wrong offset!");if(n=void 0===n?r-i:l(n),i+n>r)throw R(b);this[T]=t,this[H]=i,this[J]=n},i&&(z(E,j,"_l"),z(x,I,"_b"),z(x,j,"_l"),z(x,D,"_o")),u(x[S],{getInt8:function(t){return Y(this,1,t)[0]<<24>>24},getUint8:function(t){return Y(this,1,t)[0]},getInt16:function(t){var e=Y(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Y(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return k(Y(this,4,t,arguments[1]))},getUint32:function(t){return k(Y(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return N(Y(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return N(Y(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){G(this,1,t,M,e)},setUint8:function(t,e){G(this,1,t,M,e)},setInt16:function(t,e){G(this,2,t,V,e,arguments[2])},setUint16:function(t,e){G(this,2,t,V,e,arguments[2])},setInt32:function(t,e){G(this,4,t,L,e,arguments[2])},setUint32:function(t,e){G(this,4,t,L,e,arguments[2])},setFloat32:function(t,e){G(this,4,t,W,e,arguments[2])},setFloat64:function(t,e){G(this,8,t,q,e,arguments[2])}});y(E,v),y(x,m),a(x[S],o.VIEW,!0),e[v]=E,e[m]=x},function(t,e,n){var r=n(9);r(r.G+r.W+r.F*!n(216).ABV,{DataView:n(217).DataView})},function(t,e,n){n(220)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(7)){var r=n(49),i=n(4),s=n(8),o=n(9),a=n(216),u=n(217),c=n(20),f=n(88),h=n(17),l=n(10),d=n(207),p=(n(95),n(35)),g=n(34),y=n(36),v=n(16),m=n(6),S=n(69),b=n(73),w=n(13),E=n(56),x=n(161),A=n(43),R=n(57),F=n(47).f,_=(n(221),n(163)),K=n(19),P=n(25),U=n(171),O=n(33),C=n(204),I=n(191),j=n(128),D=n(164),T=n(190),J=n(186),H=n(183),B=n(11),N=n(48),k=B.f,M=N.f,V=i.RangeError,L=i.TypeError,q=i.Uint8Array,W="ArrayBuffer",z="Shared"+W,Y="BYTES_PER_ELEMENT",G="prototype",X=Array[G],$=u.ArrayBuffer,Z=u.DataView,Q=U(0),tt=U(2),et=U(3),nt=U(4),rt=U(5),it=U(6),st=O(!0),ot=O(!1),at=I.values,ut=I.keys,ct=I.entries,ft=X.lastIndexOf,ht=X.reduce,lt=X.reduceRight,dt=X.join,pt=X.sort,gt=X.slice,yt=X.toString,vt=X.toLocaleString,mt=P("iterator"),St=P("toStringTag"),bt=K("typed_constructor"),wt=K("def_constructor"),Et=a.CONSTR,xt=a.TYPED,At=a.VIEW,Rt="Wrong length!",Ft=U(1,function(t,e){return Ct(C(t,t[wt]),e)}),_t=s(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),Kt=!!q&&!!q[G].set&&s(function(){new q(1).set({})}),Pt=function(t,e){if(void 0===t)throw L(Rt);var n=+t,r=g(t);if(e&&!S(n,r))throw V(Rt);return r},Ut=function(t,e){var n=p(t);if(0>n||n%e)throw V("Wrong offset!");return n},Ot=function(t){if(w(t)&&xt in t)return t;throw L(t+" is not a typed array!")},Ct=function(t,e){if(!(w(t)&&bt in t))throw L("It is not a typed array constructor!");return new t(e)},It=function(t,e){return jt(C(t,t[wt]),e)},jt=function(t,e){for(var n=0,r=e.length,i=Ct(t,r);r>n;)i[n]=e[n++];return i},Dt=function(t,e,n){k(t,e,{get:function(){return this._d[n]}})},Tt=function(t){var e,n,r,i,s,o,a=E(t),u=arguments.length,f=u>1?arguments[1]:void 0,h=void 0!==f,l=_(a);if(void 0!=l&&!x(l)){for(o=l.call(a),r=[],e=0;!(s=o.next()).done;e++)r.push(s.value);a=r}for(h&&u>2&&(f=c(f,arguments[2],2)),e=0,n=g(a.length),i=Ct(this,n);n>e;e++)i[e]=h?f(a[e],e):a[e];return i},Jt=function(){for(var t=0,e=arguments.length,n=Ct(this,e);e>t;)n[t]=arguments[t++];return n},Ht=!!q&&s(function(){vt.call(new q(1))}),Bt=function(){return vt.apply(Ht?gt.call(Ot(this)):Ot(this),arguments)},Nt={copyWithin:function(t,e){return H.call(Ot(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return J.apply(Ot(this),arguments)},filter:function(t){return It(this,tt(Ot(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Ot(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Ot(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Ot(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return ot(Ot(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return st(Ot(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return dt.apply(Ot(this),arguments)},lastIndexOf:function(t){return ft.apply(Ot(this),arguments)},map:function(t){return Ft(Ot(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Ot(this),arguments)},reduceRight:function(t){return lt.apply(Ot(this),arguments)},reverse:function(){for(var t,e=this,n=Ot(e).length,r=Math.floor(n/2),i=0;r>i;)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return et(Ot(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Ot(this),t)},subarray:function(t,e){var n=Ot(this),r=n.length,i=y(t,r);return new(C(n,n[wt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===e?r:y(e,r))-i))}},kt=function(t,e){return It(this,gt.call(Ot(this),t,e))},Mt=function(t){Ot(this);var e=Ut(arguments[1],1),n=this.length,r=E(t),i=g(r.length),s=0;if(i+e>n)throw V(Rt);for(;i>s;)this[e+s]=r[s++]},Vt={entries:function(){return ct.call(Ot(this))},keys:function(){return ut.call(Ot(this))},values:function(){return at.call(Ot(this))}},Lt=function(t,e){return w(t)&&t[xt]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},qt=function(t,e){return Lt(t,e=v(e,!0))?h(2,t[e]):M(t,e)},Wt=function(t,e,n){return!(Lt(t,e=v(e,!0))&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?k(t,e,n):(t[e]=n.value,t)};Et||(N.f=qt,B.f=Wt),o(o.S+o.F*!Et,"Object",{getOwnPropertyDescriptor:qt,defineProperty:Wt}),s(function(){yt.call({})})&&(yt=vt=function(){return dt.call(this)});var zt=d({},Nt);d(zt,Vt),l(zt,mt,Vt.values),d(zt,{slice:kt,set:Mt,constructor:function(){},toString:yt,toLocaleString:Bt}),Dt(zt,"buffer","b"),Dt(zt,"byteOffset","o"),Dt(zt,"byteLength","l"),Dt(zt,"length","e"),k(zt,St,{get:function(){return this[xt]}}),t.exports=function(t,e,n,u){u=!!u;var c=t+(u?"Clamped":"")+"Array",h="Uint8Array"!=c,d="get"+t,p="set"+t,y=i[c],v=y||{},m=y&&R(y),S=!y||!a.ABV,E={},x=y&&y[G],_=function(t,n){var r=t._d;return r.v[d](n*e+r.o,_t)},K=function(t,n,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](n*e+i.o,r,_t)},P=function(t,e){k(t,e,{get:function(){return _(this,e)},set:function(t){return K(this,e,t)},enumerable:!0})};S?(y=n(function(t,n,r,i){f(t,y,c,"_d");var s,o,a,u,h=0,d=0;if(w(n)){if(!(n instanceof $||(u=b(n))==W||u==z))return xt in n?jt(y,n):Tt.call(y,n);s=n,d=Ut(r,e);var p=n.byteLength;if(void 0===i){if(p%e)throw V(Rt);if(o=p-d,0>o)throw V(Rt)}else if(o=g(i)*e,o+d>p)throw V(Rt);a=o/e}else a=Pt(n,!0),o=a*e,s=new $(o);for(l(t,"_d",{b:s,o:d,l:o,e:a,v:new Z(s)});a>h;)P(t,h++)}),x=y[G]=A(zt),l(x,"constructor",y)):D(function(t){new y(null),new y(t)},!0)||(y=n(function(t,n,r,i){f(t,y,c);var s;return w(n)?n instanceof $||(s=b(n))==W||s==z?void 0!==i?new v(n,Ut(r,e),i):void 0!==r?new v(n,Ut(r,e)):new v(n):xt in n?jt(y,n):Tt.call(y,n):new v(Pt(n,h))}),Q(m!==Function.prototype?F(v).concat(F(m)):F(v),function(t){t in y||l(y,t,v[t])}),y[G]=x,r||(x.constructor=y));var U=x[mt],O=!!U&&("values"==U.name||void 0==U.name),C=Vt.values;l(y,bt,!0),l(x,xt,c),l(x,At,!0),l(x,wt,y),(u?new y(1)[St]==c:St in x)||k(x,St,{get:function(){return c}}),E[c]=y,o(o.G+o.W+o.F*(y!=v),E),o(o.S,c,{BYTES_PER_ELEMENT:e,from:Tt,of:Jt}),Y in x||l(x,Y,e),o(o.P,c,Nt),T(c),o(o.P+o.F*Kt,c,{set:Mt}),o(o.P+o.F*!O,c,Vt),o(o.P+o.F*(x.toString!=yt),c,{toString:yt}),o(o.P+o.F*s(function(){new y(1).slice()}),c,{slice:kt}),o(o.P+o.F*(s(function(){
return[1,2].toLocaleString()!=new y([1,2]).toLocaleString()})||!s(function(){x.toLocaleString.call([1,2])})),c,{toLocaleString:Bt}),j[c]=O?U:C,r||O||l(x,mt,C)}}else t.exports=function(){}},function(t,e,n){var r=n(73),i=n(25)("iterator"),s=n(128);t.exports=n(5).isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||s.hasOwnProperty(r(e))}},function(t,e,n){n(220)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},function(t,e,n){n(220)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){n(220)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){var r=n(9),i=Function.apply;r(r.S,"Reflect",{apply:function(t,e,n){return i.call(t,e,n)}})},function(t,e,n){var r=n(9),i=n(43),s=n(21),o=n(12),a=n(13),u=n(75);r(r.S+r.F*n(8)(function(){function t(){}return!(Reflect.construct(function(){},[],t)instanceof t)}),"Reflect",{construct:function(t,e){s(t);var n=arguments.length<3?t:s(arguments[2]);if(t==n){if(void 0!=e)switch(o(e).length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(u.apply(t,r))}var c=n.prototype,f=i(a(c)?c:Object.prototype),h=Function.apply.call(t,f,e);return a(h)?h:f}})},function(t,e,n){var r=n(11),i=n(9),s=n(12),o=n(16);i(i.S+i.F*n(8)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){s(t),e=o(e,!0),s(n);try{return r.f(t,e,n),!0}catch(i){return!1}}})},function(t,e,n){var r=n(9),i=n(48).f,s=n(12);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=i(s(t),e);return n&&!n.configurable?!1:delete t[e]}})},function(t,e,n){"use strict";var r=n(9),i=n(12),s=function(t){this._t=i(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(129)(s,"Object",function(){var t,e=this,n=e._k;do if(e._i>=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new s(t)}})},function(t,e,n){function r(t,e){var n,a,f=arguments.length<3?t:arguments[2];return c(t)===f?t[e]:(n=i.f(t,e))?o(n,"value")?n.value:void 0!==n.get?n.get.call(f):void 0:u(a=s(t))?r(a,e,f):void 0}var i=n(48),s=n(57),o=n(6),a=n(9),u=n(13),c=n(12);a(a.S,"Reflect",{get:r})},function(t,e,n){var r=n(48),i=n(9),s=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(s(t),e)}})},function(t,e,n){var r=n(9),i=n(57),s=n(12);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(s(t))}})},function(t,e,n){var r=n(9);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(9),i=n(12),s=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),s?s(t):!0}})},function(t,e,n){var r=n(9);r(r.S,"Reflect",{ownKeys:n(241)})},function(t,e,n){var r=n(47),i=n(40),s=n(12),o=n(4).Reflect;t.exports=o&&o.ownKeys||function(t){var e=r.f(s(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(9),i=n(12),s=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return s&&s(t),!0}catch(e){return!1}}})},function(t,e,n){function r(t,e,n){var u,l,d=arguments.length<4?t:arguments[3],p=s.f(f(t),e);if(!p){if(h(l=o(t)))return r(l,e,n,d);p=c(0)}return a(p,"value")?p.writable!==!1&&h(d)?(u=s.f(d,e)||c(0),u.value=n,i.f(d,e,u),!0):!1:void 0===p.set?!1:(p.set.call(d,n),!0)}var i=n(11),s=n(48),o=n(57),a=n(6),u=n(9),c=n(17),f=n(12),h=n(13);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(9),i=n(71);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(n){return!1}}})},function(t,e,n){"use strict";var r=n(9),i=n(33)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(184)("includes")},function(t,e,n){"use strict";var r=n(9),i=n(126)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(9),i=n(248);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(34),i=n(90),s=n(32);t.exports=function(t,e,n,o){var a=String(s(t)),u=a.length,c=void 0===n?" ":String(n),f=r(e);if(u>=f)return a;""==c&&(c=" ");var h=f-u,l=i.call(c,Math.ceil(h/c.length));return l.length>h&&(l=l.slice(0,h)),o?l+a:a+l}},function(t,e,n){"use strict";var r=n(9),i=n(248);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(81)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(81)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(9),i=n(32),s=n(34),o=n(133),a=n(194),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(129)(c,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!o(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):a.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=s(t.lastIndex),new c(r,e)}})},function(t,e,n){var r=n(9),i=n(241),s=n(29),o=n(48),a=n(162);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n=s(t),r=o.f,u=i(n),c={},f=0;u.length>f;)a(c,e=u[f++],r(n,e));return c}})},function(t,e,n){var r=n(9),i=n(255)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(27),i=n(29),s=n(41).f;t.exports=function(t){return function(e){for(var n,o=i(e),a=r(o),u=a.length,c=0,f=[];u>c;)s.call(o,n=a[c++])&&f.push(t?[n,o[n]]:o[n]);return f}}},function(t,e,n){var r=n(9),i=n(255)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(21),o=n(11);n(7)&&r(r.P+n(258),"Object",{__defineGetter__:function(t,e){o.f(i(this),t,{get:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){t.exports=n(49)||!n(8)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(4)[t]})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(21),o=n(11);n(7)&&r(r.P+n(258),"Object",{__defineSetter__:function(t,e){o.f(i(this),t,{set:s(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16),o=n(57),a=n(48).f;n(7)&&r(r.P+n(258),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=s(t,!0);do if(e=a(n,r))return e.get;while(n=o(n))}})},function(t,e,n){"use strict";var r=n(9),i=n(56),s=n(16),o=n(57),a=n(48).f;n(7)&&r(r.P+n(258),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=s(t,!0);do if(e=a(n,r))return e.set;while(n=o(n))}})},function(t,e,n){var r=n(9);r(r.P+r.R,"Map",{toJSON:n(263)("Map")})},function(t,e,n){var r=n(73),i=n(264);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(203);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(9);r(r.P+r.R,"Set",{toJSON:n(263)("Set")})},function(t,e,n){var r=n(9);r(r.S,"System",{global:n(4)})},function(t,e,n){var r=n(9),i=n(31);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,s=e>>>0,o=n>>>0;return s+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(9);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,s=e>>>0,o=n>>>0;return s-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(9);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,i=+e,s=r&n,o=i&n,a=r>>16,u=i>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>16)+((s*u>>>0)+(c&n)>>16)}})},function(t,e,n){var r=n(9);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,i=+e,s=r&n,o=i&n,a=r>>>16,u=i>>>16,c=(a*o>>>0)+(s*o>>>16);return a*u+(c>>>16)+((s*u>>>0)+(c&n)>>>16)}})},function(t,e,n){var r=n(273),i=n(12),s=r.key,o=r.set;r.exp({defineMetadata:function(t,e,n,r){o(t,e,i(n),s(r))}})},function(t,e,n){var r=n(208),i=n(9),s=n(23)("metadata"),o=s.store||(s.store=new(n(212))),a=function(t,e,n){var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}var s=i.get(e);if(!s){if(!n)return;i.set(e,s=new r)}return s},u=function(t,e,n){var r=a(e,n,!1);return void 0===r?!1:r.has(t)},c=function(t,e,n){var r=a(e,n,!1);return void 0===r?void 0:r.get(t)},f=function(t,e,n,r){a(n,r,!0).set(t,e)},h=function(t,e){var n=a(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},l=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},d=function(t){i(i.S,"Reflect",t)};t.exports={store:o,map:a,has:u,get:c,set:f,keys:h,key:l,exp:d}},function(t,e,n){var r=n(273),i=n(12),s=r.key,o=r.map,a=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:s(arguments[2]),r=o(i(e),n,!1);if(void 0===r||!r["delete"](t))return!1;if(r.size)return!0;var u=a.get(e);return u["delete"](n),!!u.size||a["delete"](e)}})},function(t,e,n){var r=n(273),i=n(12),s=n(57),o=r.has,a=r.get,u=r.key,c=function(t,e,n){var r=o(t,e,n);if(r)return a(t,e,n);var i=s(e);return null!==i?c(t,i,n):void 0};r.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(211),i=n(264),s=n(273),o=n(12),a=n(57),u=s.keys,c=s.key,f=function(t,e){var n=u(t,e),s=a(t);if(null===s)return n;var o=f(s,e);return o.length?n.length?i(new r(n.concat(o))):o:n};s.exp({getMetadataKeys:function(t){return f(o(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(273),i=n(12),s=r.get,o=r.key;r.exp({getOwnMetadata:function(t,e){return s(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(273),i=n(12),s=r.keys,o=r.key;r.exp({getOwnMetadataKeys:function(t){return s(i(t),arguments.length<2?void 0:o(arguments[1]))}})},function(t,e,n){var r=n(273),i=n(12),s=n(57),o=r.has,a=r.key,u=function(t,e,n){var r=o(t,e,n);if(r)return!0;var i=s(e);return null!==i?u(t,i,n):!1};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(273),i=n(12),s=r.has,o=r.key;r.exp({hasOwnMetadata:function(t,e){return s(t,i(e),arguments.length<3?void 0:o(arguments[2]))}})},function(t,e,n){var r=n(273),i=n(12),s=n(21),o=r.key,a=r.set;r.exp({metadata:function(t,e){return function(n,r){a(t,e,(void 0!==r?i:s)(n),o(r))}}})},function(t,e,n){var r=n(4),i=n(9),s=n(76),o=n(283),a=r.navigator,u=!!a&&/MSIE .\./.test(a.userAgent),c=function(t){return u?function(e,n){return t(s(o,[].slice.call(arguments,2),"function"==typeof e?e:Function(e)),n)}:t};i(i.G+i.B+i.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(t,e,n){"use strict";var r=n(284),i=n(76),s=n(21);t.exports=function(){for(var t=s(this),e=arguments.length,n=Array(e),o=0,a=r._,u=!1;e>o;)(n[o]=arguments[o++])===a&&(u=!0);return function(){var r,s=this,o=arguments.length,c=0,f=0;if(!u&&!o)return i(t,n,s);if(r=n.slice(),u)for(;e>c;c++)r[c]===a&&(r[c]=arguments[f++]);for(;o>f;)r.push(arguments[f++]);return i(t,r,s)}}},function(t,e,n){t.exports=n(4)},function(t,e,n){var r=n(9),i=n(205);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(191),i=n(18),s=n(4),o=n(10),a=n(128),u=n(25),c=u("iterator"),f=u("toStringTag"),h=a.Array,l=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;5>d;d++){var p,g=l[d],y=s[g],v=y&&y.prototype;if(v){v[c]||o(v,c,h),v[f]||o(v,f,g),a[g]=h;for(p in r)v[p]||i(v,p,r[p],!0)}}},function(t,e,n){(function(e,n){!function(e){"use strict";function r(t,e,n,r){var i=Object.create((e||s).prototype),o=new p(r||[]);return i._invoke=h(t,n,o),i}function i(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(r){return{type:"throw",arg:r}}}function s(){}function o(){}function a(){}function u(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function c(t){this.arg=t}function f(t){function e(e,n){var r=t[e](n),i=r.value;return i instanceof c?Promise.resolve(i.arg).then(s,o):Promise.resolve(i).then(function(t){return r.value=t,r})}function r(t,n){function r(){return e(t,n)}return i=i?i.then(r,r):new Promise(function(t){t(r())})}"object"==typeof n&&n.domain&&(e=n.domain.bind(e));var i,s=e.bind(t,"next"),o=e.bind(t,"throw");e.bind(t,"return"),this._invoke=r}function h(t,e,n){var r=E;return function(s,o){if(r===A)throw new Error("Generator is already running");if(r===R){if("throw"===s)throw o;return y()}for(;;){var a=n.delegate;if(a){if("return"===s||"throw"===s&&a.iterator[s]===v){n.delegate=null;var u=a.iterator["return"];if(u){var c=i(u,a.iterator,o);if("throw"===c.type){s="throw",o=c.arg;continue}}if("return"===s)continue}var c=i(a.iterator[s],a.iterator,o);if("throw"===c.type){n.delegate=null,s="throw",o=c.arg;continue}s="next",o=v;var f=c.arg;if(!f.done)return r=x,f;n[a.resultName]=f.value,n.next=a.nextLoc,n.delegate=null}if("next"===s)n._sent=o,r===x?n.sent=o:n.sent=v;else if("throw"===s){if(r===E)throw r=R,o;n.dispatchException(o)&&(s="next",o=v)}else"return"===s&&n.abrupt("return",o);r=A;var c=i(t,e,n);if("normal"===c.type){r=n.done?R:x;var f={value:c.arg,done:n.done};if(c.arg!==F)return f;n.delegate&&"next"===s&&(o=v)}else"throw"===c.type&&(r=R,s="throw",o=c.arg)}}}function l(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function d(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function p(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(l,this),this.reset(!0)}function g(t){if(t){var e=t[S];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var o=m.call(i,"catchLoc"),a=m.call(i,"finallyLoc");if(o&&a){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),d(n),F}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;d(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:g(t),resultName:e,nextLoc:n},F}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}(),n(288))},function(t,e){function n(){c=!1,o.length?u=o.concat(u):f=-1,u.length&&r()}function r(){if(!c){var t=setTimeout(n);c=!0;for(var e=u.length;e;){for(o=u,u=[];++f1)for(var n=1;n=u){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.info.apply(c,Array.from(e))}},t.warn=function(){if(f>=a){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.warn.apply(c,Array.from(e))}},t.error=function(){if(f>=o){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];c.error.apply(c,Array.from(e))}},r(t,null,[{key:"NONE",get:function(){return s}},{key:"ERROR",get:function(){return o}},{key:"WARN",get:function(){return a}},{key:"INFO",get:function(){return u}},{key:"level",get:function(){return f},set:function(t){if(!(t>=s&&u>=t))throw new Error("Invalid log level");f=t}},{key:"logger",get:function(){return c},set:function(t){if(!(t.info&&t.warn&&t.error))throw new Error("Invalid logger");c=t}}]),t}();e["default"]=h,h.reset(),t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n=0&&(t=t.substr(r+1));for(var i,s={},a=/([^&=]+)=([^&]*)/g,c=0;i=a.exec(t);)if(s[decodeURIComponent(i[1])]=decodeURIComponent(i[2]),c++>50)return o["default"].error("response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var f in s)return s;return{}},t}();e["default"]=c,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0?this._created=o:this._created=parseInt(Date.now()/1e3)}return t.prototype.toStorageString=function(){return a["default"].info("State.toStorageString"),JSON.stringify({id:this.id,nonce:this.nonce,data:this.data,created:this.created})},t.fromStorageString=function(e){return a["default"].info("State.fromStorageString"),new t(JSON.parse(e))},t.clearStaleState=function(e,n){a["default"].info("State.clearStaleState");var r=Date.now()/1e3-n;return e.getAllKeys().then(function(n){a["default"].info("got keys",n);var i=[],s=!0,o=!1,u=void 0;try{for(var c,f=function(){var n=c.value;l=e.get(n).then(function(i){var s=!1;if(i)try{var o=t.fromStorageString(i);a["default"].info("got item from key: ",n,o.created),o.created<=r&&(s=!0)}catch(u){a["default"].error("Error parsing state for key",n,u.message),s=!0}else a["default"].info("no item in storage for key: ",n),s=!0;return s?(a["default"].info("removed item for key: ",n),e.remove(n)):void 0}),i.push(l)},h=n[Symbol.iterator]();!(s=(c=h.next()).done);s=!0){var l;f()}}catch(d){o=!0,u=d}finally{try{!s&&h["return"]&&h["return"]()}finally{if(o)throw u}}return a["default"].info("waiting on promise count:",i.length),Promise.all(i)})},s(t,[{key:"id",get:function(){return this._id}},{key:"nonce",get:function(){return this._nonce}},{key:"data",get:function(){return this._data}},{key:"created",get:function(){return this._created}}]),t}();e["default"]=f,t.exports=e["default"]},function(t,e){"use strict";function n(){for(var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx",e="0123456789abcdef",n=0,r="",i=0;i0){var s=parseInt(Date.now()/1e3);this.expires_at=s+r}}return s(t,[{key:"expires_in",get:function(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}}},{key:"expired",get:function(){var t=this.expires_in;return void 0!==t?0>=t:void 0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf(u)>=0}}]),t}();e["default"]=c,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(293),o=r(s),a=n(301),u=r(a),c=n(302),f=r(c),h=function l(t){var e=t.url,n=t.id_token_hint,r=t.post_logout_redirect_uri,s=t.data;if(i(this,l),!e)throw o["default"].error("No url passed to SignoutRequest"),new Error("url");s&&(this.state=new f["default"]({data:s}),e=u["default"].addQueryParam(e,"state",this.state.id)),n&&(e=u["default"].addQueryParam(e,"id_token_hint",n)),r&&(e=u["default"].addQueryParam(e,"post_logout_redirect_uri",r)),this.url=e};e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(301),o=r(s),a=function u(t){i(this,u);var e=o["default"].parseUrlFragment(t,"?");this.error=e.error,this.error_description=e.error_description,this.error_uri=e.error_uri,this.state=e.state};e["default"]=a,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(293),o=r(s),a=n(298),u=r(a),c=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=e.prefix,r=void 0===n?"oidc.":n,s=e.store,o=void 0===s?u["default"].localStorage:s;i(this,t),this._store=o,this._prefix=r}return t.prototype.set=function(t,e){return o["default"].info("WebStorageStateStore.set",t),t=this._prefix+t,this._store.setItem(t,e),Promise.resolve()},t.prototype.get=function(t){o["default"].info("WebStorageStateStore.get",t),t=this._prefix+t;var e=this._store.getItem(t);return Promise.resolve(e)},t.prototype.remove=function(t){o["default"].info("WebStorageStateStore.remove",t),t=this._prefix+t;var e=this._store.getItem(t);return this._store.removeItem(t),Promise.resolve(e)},t.prototype.getAllKeys=function(){o["default"].info("WebStorageStateStore.getAllKeys");for(var t=[],e=0;e>6)+ar.charAt(63&n);if(e+1==t.length?(n=parseInt(t.substring(e,e+1),16),r+=ar.charAt(n<<2)):e+2==t.length&&(n=parseInt(t.substring(e,e+2),16),r+=ar.charAt(n>>2)+ar.charAt((3&n)<<4)),ur)for(;(3&r.length)>0;)r+=ur;return r}function i(t){var e,n,r,i="",s=0;for(e=0;er||(0==s?(i+=h(r>>2),n=3&r,s=1):1==s?(i+=h(n<<2|r>>4),n=15&r,s=2):2==s?(i+=h(n),i+=h(r>>2),n=3&r,s=3):(i+=h(n<<2|r>>4),i+=h(15&r),s=0));return 1==s&&(i+=h(n<<2)),i}function s(t){var e,n=i(t),r=new Array;for(e=0;2*e=0;){var o=e*this[t++]+n[r]+i;i=Math.floor(o/67108864),n[r++]=67108863&o}return i}function c(t,e,n,r,i,s){for(var o=32767&e,a=e>>15;--s>=0;){var u=32767&this[t],c=this[t++]>>15,f=a*u+c*o;u=o*u+((32767&f)<<15)+n[r]+(1073741823&i),i=(u>>>30)+(f>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i}function f(t,e,n,r,i,s){for(var o=16383&e,a=e>>14;--s>=0;){var u=16383&this[t],c=this[t++]>>14,f=a*u+c*o;u=o*u+((16383&f)<<14)+n[r]+i,i=(u>>28)+(f>>14)+a*c,n[r++]=268435455&u}return i}function h(t){return pr.charAt(t)}function l(t,e){var n=gr[t.charCodeAt(e)];return null==n?-1:n}function d(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s}function p(t){this.t=1,this.s=0>t?-1:0,t>0?this[0]=t:-1>t?this[0]=t+this.DV:this.t=0}function g(t){var e=a();return e.fromInt(t),e}function y(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,s=0;--r>=0;){var a=8==n?255&t[r]:l(t,r);0>a?"-"==t.charAt(r)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t}function m(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var n,r=(1<0)for(a>a)>0&&(i=!0,s=h(n));o>=0;)e>a?(n=(this[o]&(1<>(a+=this.DB-e)):(n=this[o]>>(a-=e)&r,0>=a&&(a+=this.DB,--o)),n>0&&(i=!0),i&&(s+=h(n));return i?s:"0"}function S(){var t=a();return o.ZERO.subTo(this,t),t}function b(){return this.s<0?this.negate():this}function w(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(e=n-t.t,0!=e)return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0}function E(t){var e,n=1;return 0!=(e=t>>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function x(){return this.t<=0?0:this.DB*(this.t-1)+E(this[this.t-1]^this.s&this.DM)}function A(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s}function R(t,e){for(var n=t;n=0;--n)e[n+o+1]=this[n]>>i|a,a=(this[n]&s)<=0;--n)e[n]=0;e[o]=a,e.t=this.t+o+1,e.s=this.s,e.clamp()}function _(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)return void(e.t=0);var r=t%this.DB,i=this.DB-r,s=(1<>r;for(var o=n+1;o>r;r>0&&(e[this.t-n-1]|=(this.s&s)<n;)r+=this[n]-t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=0>r?-1:0,-1>r?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()}function P(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[n]=0;for(n=0;n=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()}function O(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(f,s),i.lShiftTo(f,n)):(r.copyTo(s),i.copyTo(n));var h=s.t,l=s[h-1];if(0!=l){var d=l*(1<1?s[h-2]>>this.F2:0),p=this.FV/d,g=(1<=0&&(n[n.t++]=1,n.subTo(S,n)),o.ONE.dlShiftTo(h,S),S.subTo(s,s);s.t=0;){var b=n[--v]==l?this.DM:Math.floor(n[v]*p+(n[v-1]+y)*g);if((n[v]+=s.am(0,b,n,m,0,h))0&&n.rShiftTo(f,n),0>u&&o.ZERO.subTo(n,n)}}}function C(t){var e=a();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(o.ZERO)>0&&t.subTo(e,e),e}function I(t){this.m=t}function j(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t}function D(t){return t}function T(t){t.divRemTo(this.m,null,t)}function J(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function H(t,e){t.squareTo(e),this.reduce(e)}function B(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return e=e*(2-(15&t)*e)&15,e=e*(2-(255&t)*e)&255,e=e*(2-((65535&t)*e&65535))&65535,e=e*(2-t*e%this.DV)%this.DV,e>0?this.DV-e:-e}function N(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e}function M(t){var e=a();return t.copyTo(e),this.reduce(e),e}function V(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(n=e+this.m.t,t[n]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)}function L(t,e){t.squareTo(e),this.reduce(e)}function q(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function W(){return 0==(this.t>0?1&this[0]:this.s)}function z(t,e){if(t>4294967295||1>t)return o.ONE;var n=a(),r=a(),i=e.convert(this),s=E(t)-1;for(i.copyTo(n);--s>=0;)if(e.sqrTo(n,r),(t&1<0)e.mulTo(r,i,n);else{var u=n;n=r,r=u}return e.revert(n)}function Y(t,e){var n;return n=256>t||e.isEven()?new I(e):new N(e),this.exp(t,n)}function G(){var t=a();return this.copyTo(t),t}function X(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function Z(){return 0==this.t?this.s:this[0]<<16>>16}function Q(t){return Math.floor(Math.LN2*this.DB/Math.log(t))}function tt(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function et(t){if(null==t&&(t=10),0==this.signum()||2>t||t>36)return"0";var e=this.chunkSize(t),n=Math.pow(t,e),r=g(n),i=a(),s=a(),o="";for(this.divRemTo(r,i,s);i.signum()>0;)o=(n+s.intValue()).toString(t).substr(1)+o,i.divRemTo(r,i,s);return s.intValue().toString(t)+o}function nt(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),r=Math.pow(e,n),i=!1,s=0,a=0,u=0;uc?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(a=e*a+c,++s>=n&&(this.dMultiply(r),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&o.ZERO.subTo(this,this)}function rt(t,e,n){if("number"==typeof e)if(2>t)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(o.ONE.shiftLeft(t-1),ht,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(o.ONE.shiftLeft(t-1),this);else{var r=new Array,i=7&t;r.length=(t>>3)+1,e.nextBytes(r),i>0?r[0]&=(1<0)for(r>r)!=(this.s&this.DM)>>r&&(e[i++]=n|this.s<=0;)8>r?(n=(this[t]&(1<>(r+=this.DB-8)):(n=this[t]>>(r-=8)&255,0>=r&&(r+=this.DB,--t)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(e[i++]=n);return e}function st(t){return 0==this.compareTo(t)}function ot(t){return this.compareTo(t)<0?this:t}function at(t){return this.compareTo(t)>0?this:t}function ut(t,e,n){var r,i,s=Math.min(t.t,this.t);for(r=0;s>r;++r)n[r]=e(this[r],t[r]);if(t.tt?this.rShiftTo(-t,e):this.lShiftTo(t,e),e}function St(t){var e=a();return 0>t?this.lShiftTo(-t,e):this.rShiftTo(t,e),e}function bt(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function wt(){for(var t=0;t=this.t?0!=this.s:0!=(this[e]&1<n;)r+=this[n]+t[n],e[n++]=r&this.DM,r>>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=0>r?-1:0,r>0?e[n++]=r:-1>r&&(e[n++]=this.DV+r),e.t=n,e.clamp()}function Ut(t){var e=a();return this.addTo(t,e),e}function Ot(t){var e=a();return this.subTo(t,e),e}function Ct(t){var e=a();return this.multiplyTo(t,e),e}function It(){var t=a();return this.squareTo(t),t}function jt(t){var e=a();return this.divRemTo(t,e,null),e}function Dt(t){var e=a();return this.divRemTo(t,null,e),e}function Tt(t){var e=a(),n=a();return this.divRemTo(t,e,n),new Array(e,n)}function Jt(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()}function Ht(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}}function Bt(){}function Nt(t){return t}function kt(t,e,n){t.multiplyTo(e,n)}function Mt(t,e){t.squareTo(e)}function Vt(t){return this.exp(t,new Bt)}function Lt(t,e,n){var r=Math.min(this.t+t.t,e);for(n.s=0,n.t=r;r>0;)n[--r]=0;var i;for(i=n.t-this.t;i>r;++r)n[r+this.t]=this.am(0,t[r],n,r,0,this.t);for(i=Math.min(t.t,e);i>r;++r)this.am(0,t[r],n,r,0,e-r);n.clamp()}function qt(t,e,n){--e;var r=n.t=this.t+t.t-e;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(e-this.t,0);r2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=a();return t.copyTo(e),this.reduce(e),e}function Yt(t){return t}function Gt(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)}function Xt(t,e){t.squareTo(e),this.reduce(e)}function $t(t,e,n){t.multiplyTo(e,n),this.reduce(n)}function Zt(t,e){var n,r,i=t.bitLength(),s=g(1);if(0>=i)return s;n=18>i?1:48>i?3:144>i?4:768>i?5:6,r=8>i?new I(e):e.isEven()?new Wt(e):new N(e);var o=new Array,u=3,c=n-1,f=(1<1){var h=a();for(r.sqrTo(o[1],h);f>=u;)o[u]=a(),r.mulTo(h,o[u-2],o[u]),u+=2}var l,d,p=t.t-1,y=!0,v=a();for(i=E(t[p])-1;p>=0;){for(i>=c?l=t[p]>>i-c&f:(l=(t[p]&(1<0&&(l|=t[p-1]>>this.DB+i-c)),u=n;0==(1&l);)l>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),y)o[l].copyTo(s),y=!1;else{for(;u>1;)r.sqrTo(s,v),r.sqrTo(v,s),u-=2;u>0?r.sqrTo(s,v):(d=s,s=v,v=d),r.mulTo(v,o[l],s)}for(;p>=0&&0==(t[p]&1<s)return e;for(s>i&&(s=i),s>0&&(e.rShiftTo(s,e),n.rShiftTo(s,n));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),e.compareTo(n)>=0?(e.subTo(n,e),e.rShiftTo(1,e)):(n.subTo(e,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n}function te(t){if(0>=t)return 0;var e=this.DV%t,n=this.s<0?t-1:0;if(this.t>0)if(0==e)n=this[0]%t;else for(var r=this.t-1;r>=0;--r)n=(e*n+this[r])%t;return n}function ee(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return o.ZERO;for(var n=t.clone(),r=this.clone(),i=g(1),s=g(0),a=g(0),u=g(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;r.isEven();)r.rShiftTo(1,r),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(r)>=0?(n.subTo(r,n),e&&i.subTo(a,i),s.subTo(u,s)):(r.subTo(n,r),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=r.compareTo(o.ONE)?o.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u}function ne(t){var e,n=this.abs();if(1==n.t&&n[0]<=yr[yr.length-1]){for(e=0;er;)r*=yr[i++];for(r=n.modInt(r);i>e;)if(r%yr[e++]==0)return!1}return n.millerRabin(t)}function re(t){var e=this.subtract(o.ONE),n=e.getLowestSetBit();if(0>=n)return!1;var r=e.shiftRight(n);t=t+1>>1,t>yr.length&&(t=yr.length);for(var i=a(),s=0;t>s;++s){i.fromInt(yr[Math.floor(Math.random()*yr.length)]);var u=i.modPow(r,this);if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(e)){for(var c=1;c++e;++e)this.S[e]=e;for(n=0,e=0;256>e;++e)n=n+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[n],this.S[n]=r;this.i=0,this.j=0}function oe(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}function ae(){return new ie}function ue(t){Sr[br++]^=255&t,Sr[br++]^=t>>8&255,Sr[br++]^=t>>16&255,Sr[br++]^=t>>24&255,br>=wr&&(br-=wr)}function ce(){ue((new Date).getTime())}function fe(){if(null==mr){for(ce(),mr=ae(),mr.init(Sr),br=0;br=0&&e>0;){var i=t.charCodeAt(r--);128>i?n[--e]=i:i>127&&2048>i?(n[--e]=63&i|128,n[--e]=i>>6|192):(n[--e]=63&i|128,n[--e]=i>>6&63|128,n[--e]=i>>12|224)}n[--e]=0;for(var s=new le,a=new Array;e>2;){for(a[0]=0;0==a[0];)s.nextBytes(a);n[--e]=a[0]}return n[--e]=2,n[--e]=0,new o(n)}function ge(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function ye(t,e,n){if(t.length+2*Rr+2>e)throw"Message too long for RSA";var r,i="";for(r=0;r0&&e.length>0?(this.n=de(t,16),this.e=parseInt(e,16)):alert("Invalid RSA public key")}function Se(t){return t.modPowInt(this.e,this.n)}function be(t){var e=pe(t,this.n.bitLength()+7>>3);if(null==e)return null;var n=this.doPublic(e);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r}function we(t,e){var n=ye(t,this.n.bitLength()+7>>3,e);if(null==n)return null;var r=this.doPublic(n);if(null==r)return null;var i=r.toString(16);return 0==(1&i.length)?i:"0"+i}function Ee(t,e){for(var n=t.toByteArray(),r=0;r=n.length)return null;for(var i="";++rs?i+=String.fromCharCode(s):s>191&&224>s?(i+=String.fromCharCode((31&s)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&s)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i}function xe(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i])),i+=1;return r}function Ae(t,e,n){t=t.toByteArray();var r;for(r=0;r0&&e.length>0?(this.n=de(t,16),this.e=parseInt(e,16),this.d=de(n,16)):alert("Invalid RSA private key")}function Fe(t,e,n,r,i,s,o,a){if(this.isPrivate=!0,null==t)throw"RSASetPrivateEx N == null";if(null==e)throw"RSASetPrivateEx E == null";if(0==t.length)throw"RSASetPrivateEx N.length == 0";if(0==e.length)throw"RSASetPrivateEx E.length == 0";null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=de(t,16),this.e=parseInt(e,16),this.d=de(n,16),this.p=de(r,16),this.q=de(i,16),this.dmp1=de(s,16),this.dmq1=de(o,16),this.coeff=de(a,16)):alert("Invalid RSA private key in RSASetPrivateEx")}function _e(t,e){var n=new le,r=t>>1;this.e=parseInt(e,16);for(var i=new o(e,16);;){for(;this.p=new o(t-r,1,n),0!=this.p.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.p.isProbablePrime(10););for(;this.q=new o(r,1,n),0!=this.q.subtract(o.ONE).gcd(i).compareTo(o.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var a=this.p.subtract(o.ONE),u=this.q.subtract(o.ONE),c=a.multiply(u);if(0==c.gcd(i).compareTo(o.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(c),this.dmp1=this.d.mod(a),this.dmq1=this.d.mod(u),this.coeff=this.q.modInverse(this.p);break}}}function Ke(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),n=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(n)<0;)e=e.add(this.p);return e.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)}function Pe(t){var e=de(t,16),n=this.doPrivate(e);return null==n?null:Ee(n,this.n.bitLength()+7>>3)}function Ue(t,e){var n=de(t,16),r=this.doPrivate(n);return null==r?null:Ae(r,this.n.bitLength()+7>>3,e)}function Oe(t,e){this.x=e,this.q=t}function Ce(t){return t==this?!0:this.q.equals(t.q)&&this.x.equals(t.x)}function Ie(){return this.x}function je(){return new Oe(this.q,this.x.negate().mod(this.q))}function De(t){return new Oe(this.q,this.x.add(t.toBigInteger()).mod(this.q))}function Te(t){return new Oe(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}function Je(t){return new Oe(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}function He(){return new Oe(this.q,this.x.square().mod(this.q))}function Be(t){return new Oe(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}function Ne(t,e,n,r){this.curve=t,this.x=e,this.y=n,null==r?this.z=o.ONE:this.z=r,this.zinv=null}function ke(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Me(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}function Ve(t){if(t==this)return!0;if(this.isInfinity())return t.isInfinity();if(t.isInfinity())return this.isInfinity();var e,n;return e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),e.equals(o.ZERO)?(n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q),n.equals(o.ZERO)):!1}function Le(){return null==this.x&&null==this.y?!0:this.z.equals(o.ZERO)&&!this.y.toBigInteger().equals(o.ZERO)}function qe(){return new Ne(this.curve,this.x,this.y.negate(),this.z)}function We(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q),n=t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q);if(o.ZERO.equals(n))return o.ZERO.equals(e)?this.twice():this.curve.getInfinity();var r=new o("3"),i=this.x.toBigInteger(),s=this.y.toBigInteger(),a=(t.x.toBigInteger(),t.y.toBigInteger(),n.square()),u=a.multiply(n),c=i.multiply(a),f=e.square().multiply(this.z),h=f.subtract(c.shiftLeft(1)).multiply(t.z).subtract(u).multiply(n).mod(this.curve.q),l=c.multiply(r).multiply(e).subtract(s.multiply(u)).subtract(f.multiply(e)).multiply(t.z).add(e.multiply(u)).mod(this.curve.q),d=u.multiply(this.z).multiply(t.z).mod(this.curve.q);return new Ne(this.curve,this.curve.fromBigInteger(h),this.curve.fromBigInteger(l),d)}function ze(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new o("3"),e=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),s=this.curve.a.toBigInteger(),a=e.square().multiply(t);o.ZERO.equals(s)||(a=a.add(this.z.square().multiply(s))),a=a.mod(this.curve.q);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),c=a.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.square().multiply(a)).mod(this.curve.q),f=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new Ne(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(c),f)}function Ye(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new o("3")),i=this.negate(),s=this;for(e=r.bitLength()-2;e>0;--e){s=s.twice();var a=r.testBit(e),u=n.testBit(e);a!=u&&(s=s.add(a?this:i))}return s}function Ge(t,e,n){var r;r=t.bitLength()>n.bitLength()?t.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),s=this.add(e);r>=0;)i=i.twice(),t.testBit(r)?i=n.testBit(r)?i.add(s):i.add(this):n.testBit(r)&&(i=i.add(e)),--r;return i}function Xe(t,e,n){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(n),this.infinity=new Ne(this,null,null)}function $e(){return this.q}function Ze(){return this.a}function Qe(){return this.b}function tn(t){return t==this?!0:this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}function en(){return this.infinity}function nn(t){return new Oe(this.q,t)}function rn(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(t.length-2)/2,n=t.substr(2,e),r=t.substr(e+2,e);return new Ne(this,this.fromBigInteger(new o(n,16)),this.fromBigInteger(new o(r,16)));default:return null}}function sn(t){for(var e=new Array,n=0;nr||r>255)throw"integer not in range 0-255";var i=("00"+r.toString(16)).slice(-2);return i}).join("");return e}catch(n){throw"malformed integer array string: "+n}}function Kn(t){var e=t;return e=e.replace("-----BEGIN RSA PRIVATE KEY-----",""),e=e.replace("-----END RSA PRIVATE KEY-----",""),e=e.replace(/[ \n]+/g,"")}function Pn(t){var e=new Array,n=_r.getStartPosOfV_AtObj(t,0),r=_r.getPosOfNextSibling_AtObj(t,n),i=_r.getPosOfNextSibling_AtObj(t,r),s=_r.getPosOfNextSibling_AtObj(t,i),o=_r.getPosOfNextSibling_AtObj(t,s),a=_r.getPosOfNextSibling_AtObj(t,o),u=_r.getPosOfNextSibling_AtObj(t,a),c=_r.getPosOfNextSibling_AtObj(t,u),f=_r.getPosOfNextSibling_AtObj(t,c);return e.push(n,r,i,s,o,a,u,c,f),e}function Un(t){var e=Pn(t),n=_r.getHexOfV_AtObj(t,e[0]),r=_r.getHexOfV_AtObj(t,e[1]),i=_r.getHexOfV_AtObj(t,e[2]),s=_r.getHexOfV_AtObj(t,e[3]),o=_r.getHexOfV_AtObj(t,e[4]),a=_r.getHexOfV_AtObj(t,e[5]),u=_r.getHexOfV_AtObj(t,e[6]),c=_r.getHexOfV_AtObj(t,e[7]),f=_r.getHexOfV_AtObj(t,e[8]),h=new Array;return h.push(n,r,i,s,o,a,u,c,f),h}function On(t){var e=Un(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Cn(t){var e=Kn(t),n=i(e),r=Un(n);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])}function In(t,e){for(var n="",r=e/4-t.length,i=0;r>i;i++)n+="0";return n+t}function jn(t,e){var n=function(t){return KJUR.crypto.Util.hashString(t,e)},r=n(t);return this.signWithMessageHash(r,e)}function Dn(t,e){var n=KJUR.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),r=de(n,16),i=this.doPrivate(r),s=i.toString(16);return In(s,this.n.bitLength())}function Tn(t){return jn.call(this,t,"sha1")}function Jn(t){return jn.call(this,t,"sha256")}function Hn(t,e,n){for(var r="",i=0;r.length>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function Bn(t,e,n){var r=function(t){return KJUR.crypto.Util.hashHex(t,e)},i=r(wn(t));return void 0===n&&(n=-1),this.signWithMessageHashPSS(i,e,n)}function Nn(t,e,n){var r,i=bn(t),s=i.length,a=this.n.bitLength()-1,u=Math.ceil(a/8),c=function(t){return KJUR.crypto.Util.hashHex(t,e)};if(-1===n||void 0===n)n=s;else if(-2===n)n=u-s-2;else if(-2>n)throw"invalid salt length";if(s+n+2>u)throw"data too long";var f="";n>0&&(f=new Array(n),(new le).nextBytes(f),f=String.fromCharCode.apply(String,f));var h=bn(c(wn("\x00\x00\x00\x00\x00\x00\x00\x00"+i+f))),l=[];for(r=0;u-n-s-2>r;r+=1)l[r]=0;var d=String.fromCharCode.apply(String,l)+""+f,p=Hn(h,d.length,c),g=[];for(r=0;r>8*u-a&255;for(g[0]&=~y,r=0;s>r;r++)g.push(h.charCodeAt(r));return g.push(188),In(this.doPrivate(new o(g)).toString(16),this.n.bitLength())}function kn(t,e,n){var r=new ve;r.setPublic(e,n);var i=r.doPublic(t);return i}function Mn(t,e,n){var r=kn(t,e,n),i=r.toString(16).replace(/^1f+00/,"");return i}function Vn(t){for(var e in KJUR.crypto.Util.DIGESTINFOHEAD){var n=KJUR.crypto.Util.DIGESTINFOHEAD[e],r=n.length;if(t.substring(0,r)==n){var i=[e,t.substring(r)];return i}}return[]}function Ln(t,e,n,r){var i=Mn(e,n,r),s=Vn(i);if(0==s.length)return!1;var o=s[0],a=s[1],u=function(t){return KJUR.crypto.Util.hashString(t,o)},c=u(t);return a==c}function qn(t,e){var n=de(t,16),r=Ln(e,n,this.n.toString(16),this.e.toString(16));return r}function Wn(t,e){e=e.replace(Ir,""),e=e.replace(/[ \n]+/g,"");var n=de(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=Vn(i);if(0==s.length)return!1;var o=s[0],a=s[1],u=function(t){return KJUR.crypto.Util.hashString(t,o)},c=u(t);return a==c}function zn(t,e){e=e.replace(Ir,""),e=e.replace(/[ \n]+/g,"");var n=de(e,16);if(n.bitLength()>this.n.bitLength())return 0;var r=this.doPublic(n),i=r.toString(16).replace(/^1f+00/,""),s=Vn(i);if(0==s.length)return!1;var o=(s[0],s[1]);return o==t}function Yn(t,e,n,r){var i=function(t){return KJUR.crypto.Util.hashHex(t,n)},s=i(wn(t));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(s,e,n,r)}function Gn(t,e,n,r){var i=new o(e,16);if(i.bitLength()>this.n.bitLength())return!1;var s,a=function(t){return KJUR.crypto.Util.hashHex(t,n)},u=bn(t),c=u.length,f=this.n.bitLength()-1,h=Math.ceil(f/8);if(-1===r||void 0===r)r=c;else if(-2===r)r=h-c-2;else if(-2>r)throw"invalid salt length";if(c+r+2>h)throw"data too long";var l=this.doPublic(i).toByteArray();for(s=0;s>8*h-f&255;if(0!==(d.charCodeAt(0)&g))throw"bits beyond keysize not zero";var y=Hn(p,d.length,a),v=[];for(s=0;ss;s+=1)if(0!==v[s])throw"leftmost octets not zero";if(1!==v[m])throw"0x01 marker not found";return p===bn(a(wn("\x00\x00\x00\x00\x00\x00\x00\x00"+u+String.fromCharCode.apply(String,v.slice(-r)))))}function Xn(){this.subjectPublicKeyRSA=null,this.subjectPublicKeyRSA_hN=null,this.subjectPublicKeyRSA_hE=null,this.hex=null,this.getSerialNumberHex=function(){return _r.getDecendantHexVByNthList(this.hex,0,[0,1])},this.getSignatureAlgorithmField=function(){var t=_r.getDecendantHexVByNthList(this.hex,0,[0,2,0]),e=KJUR.asn1.ASN1Util.oidHexToInt(t),n=KJUR.asn1.x509.OID.oid2name(e);return n},this.getIssuerHex=function(){return _r.getDecendantHexTLVByNthList(this.hex,0,[0,3])},this.getIssuerString=function(){return Xn.hex2dn(_r.getDecendantHexTLVByNthList(this.hex,0,[0,3]))},this.getSubjectHex=function(){return _r.getDecendantHexTLVByNthList(this.hex,0,[0,5])},this.getSubjectString=function(){return Xn.hex2dn(_r.getDecendantHexTLVByNthList(this.hex,0,[0,5]))},this.getNotBefore=function(){var t=_r.getDecendantHexVByNthList(this.hex,0,[0,4,0]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.getNotAfter=function(){var t=_r.getDecendantHexVByNthList(this.hex,0,[0,4,1]);return t=t.replace(/(..)/g,"%$1"),t=decodeURIComponent(t)},this.readCertPEM=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e),r=new ve;r.setPublic(n[0],n[1]),this.subjectPublicKeyRSA=r,this.subjectPublicKeyRSA_hN=n[0],this.subjectPublicKeyRSA_hE=n[1],this.hex=e},this.readCertPEMWithoutRSAInit=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e);this.subjectPublicKeyRSA.setPublic(n[0],n[1]),this.subjectPublicKeyRSA_hN=n[0],this.subjectPublicKeyRSA_hE=n[1],this.hex=e},this.getInfo=function(){var t="Basic Fields\n";t+=" serial number: "+this.getSerialNumberHex()+"\n",t+=" signature algorithm: "+this.getSignatureAlgorithmField()+"\n",t+=" issuer: "+this.getIssuerString()+"\n",t+=" notBefore: "+this.getNotBefore()+"\n",t+=" notAfter: "+this.getNotAfter()+"\n",t+=" subject: "+this.getSubjectString()+"\n",t+=" subject public key info: \n";var e=Xn.getSubjectPublicKeyInfoPosFromCertHex(this.hex),n=_r.getHexOfTLV_AtObj(this.hex,e),r=Cr.getKey(n,null,"pkcs8pub");r instanceof ve&&(t+=" key algorithm: RSA\n",t+=" n="+r.n.toString(16).substr(0,16)+"...\n",t+=" e="+r.e.toString(16)+"\n"),t+="X509v3 Extensions:\n";for(var i=Xn.getV3ExtInfoListOfCertHex(this.hex),s=0;s":">",'"':""","'":"'","/":"/","`":"`"},a=["toString","valueOf"],u={isArray:function(t){return e.toString.apply(t)===n},isBoolean:function(t){return"boolean"==typeof t},isFunction:function(t){return"function"==typeof t||e.toString.apply(t)===r},isNull:function(t){return null===t},isNumber:function(t){return"number"==typeof t&&isFinite(t)},isObject:function(e){return e&&("object"==typeof e||t.isFunction(e))||!1},isString:function(t){return"string"==typeof t},isUndefined:function(t){return"undefined"==typeof t},_IEEnumFix:ir.env.ua.ie?function(n,r){var i,s,o;for(i=0;i"'\/`]/g,function(t){return o[t]})},extend:function(n,r,i){if(!r||!n)throw new Error("extend failed, please check that all dependencies are included.");var s,o=function(){};if(o.prototype=r.prototype,n.prototype=new o,n.prototype.constructor=n,n.superclass=r.prototype,r.prototype.constructor==e.constructor&&(r.prototype.constructor=r),i){for(s in i)t.hasOwnProperty(i,s)&&(n.prototype[s]=i[s]);t._IEEnumFix(n.prototype,i)}},augmentObject:function(e,n){if(!n||!e)throw new Error("Absorb failed, verify dependencies.");var r,i,s=arguments,o=s[2];if(o&&o!==!0)for(r=2;r ";if(!t.isObject(e))return e+"";if(e instanceof Date||"nodeType"in e&&"tagName"in e)return e;if(t.isFunction(e))return a;if(n=t.isNumber(n)?n:3,t.isArray(e)){for(s.push("["),r=0,i=e.length;i>r;r+=1)t.isObject(e[r])?s.push(n>0?t.dump(e[r],n-1):o):s.push(e[r]),s.push(u);s.length>1&&s.pop(),s.push("]")}else{s.push("{");for(r in e)t.hasOwnProperty(e,r)&&(s.push(r+c),t.isObject(e[r])?s.push(n>0?t.dump(e[r],n-1):o):s.push(e[r]),s.push(u));s.length>1&&s.pop(),s.push("}")}return s.join("")},substitute:function(e,n,r,s){for(var o,a,u,c,f,h,l,d,p,g=[],y=e.length,v="dump",m=" ",S="{",b="}";o=e.lastIndexOf(S,y),!(0>o||(a=e.indexOf(b,o),o+1>a));)l=e.substring(o+1,a),c=l,h=null,u=c.indexOf(m),u>-1&&(h=c.substring(u+1),c=c.substring(0,u)),f=n[c],r&&(f=r(c,f,h)),t.isObject(f)?t.isArray(f)?f=t.dump(f,parseInt(h,10)):(h=h||"",d=h.indexOf(v),d>-1&&(h=h.substring(4)),p=f.toString(),f=p===i||d>-1?t.dump(f,parseInt(h,10)):p):t.isString(f)||t.isNumber(f)||(f="~-"+g.length+"-~",g[g.length]=l),e=e.substring(0,o)+f+e.substring(a+1),s===!1&&(y=o-1);for(o=g.length-1;o>=0;o-=1)e=e.replace(new RegExp("~-"+o+"-~"),"{"+g[o]+"}","g");return e},trim:function(t){try{return t.replace(/^\s+|\s+$/g,"")}catch(e){return t}},merge:function(){var e,n={},r=arguments,i=r.length;for(e=0;i>e;e+=1)t.augmentObject(n,r[e],!0);return n},later:function(e,n,r,i,o){e=e||0,n=n||{};var a,u,c=r,f=i;if(t.isString(r)&&(c=n[r]),!c)throw new TypeError("method undefined");return t.isUndefined(i)||t.isArray(f)||(f=[i]),a=function(){c.apply(n,f||s)},u=o?setInterval(a,e):setTimeout(a,e),{interval:o,cancel:function(){this.interval?clearInterval(u):clearTimeout(u)}}},isValue:function(e){return t.isObject(e)||t.isString(e)||t.isNumber(e)||t.isBoolean(e)}};t.hasOwnProperty=e.hasOwnProperty?function(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}:function(e,n){return!t.isUndefined(e[n])&&e.constructor.prototype[n]!==e[n]},u.augmentObject(t,u,!0),ir.util.Lang=t,t.augment=t.augmentProto,ir.augment=t.augmentProto,ir.extend=t.extend}(),ir.register("yahoo",ir,{version:"2.9.0",build:"2800"});var sr=sr||function(t,e){var n={},r=n.lib={},i=r.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var n=new t;return e&&n.mixIn(e),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=r.WordArray=i.extend({init:function(t,n){t=this.words=t||[],
n!=e?this.sigBytes=n:this.sigBytes=4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var s=0;i>s;s++){var o=n[s>>>2]>>>24-s%4*8&255;e[r+s>>>2]|=o<<24-(r+s)%4*8}else for(var s=0;i>s;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n=[],r=0;e>r;r+=4)n.push(4294967296*t.random()|0);return new s.init(n,e)}}),o=n.enc={},a=o.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;n>i;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((15&s).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new s.init(n,e/2)}},u=o.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;n>i;i++){var s=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;e>r;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new s.init(n,e)}},c=o.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=4*o,u=i/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*o,f=t.min(4*c,i);if(c){for(var h=0;c>h;h+=o)this._doProcessBlock(r,h);var l=r.splice(0,c);n.sigBytes-=f}return new s.init(l,f)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),h=(r.Hasher=f.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new h.HMAC.init(t,n).finalize(e)}}}),n.algo={});return n}(Math);!function(t){var e=sr,n=e.lib,r=n.Base,i=n.WordArray,e=e.x64={};e.Word=r.extend({init:function(t,e){this.high=t,this.low=e}}),e.WordArray=r.extend({init:function(e,n){e=this.words=e||[],this.sigBytes=n!=t?n:8*e.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;e>r;r++){var s=t[r];n.push(s.high),n.push(s.low)}return i.create(n,this.sigBytes)},clone:function(){for(var t=r.clone.call(this),e=t.words=this.words.slice(0),n=e.length,i=0;n>i;i++)e[i]=e[i].clone();return t}})}(),sr.lib.Cipher||function(t){var e=sr,n=e.lib,r=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,o=e.enc.Base64,a=e.algo.EvpKDF,u=n.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,n,r){return("string"==typeof n?p:d).encrypt(t,e,n,r)},decrypt:function(e,n,r){return("string"==typeof n?p:d).decrypt(t,e,n,r)}}}});n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var c=e.mode={},f=function(e,n,r){var i=this._iv;i?this._iv=t:i=this._prevBlock;for(var s=0;r>s;s++)e[n+s]^=i[s]},h=(n.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}})).extend();h.Encryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize;f.call(this,t,e,r),n.encryptBlock(t,e),this._prevBlock=t.slice(e,e+r)}}),h.Decryptor=h.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=t.slice(e,e+r);n.decryptBlock(t,e),f.call(this,t,e,r),this._prevBlock=i}}),c=c.CBC=h,h=(e.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,n=n-t.sigBytes%n,r=n<<24|n<<16|n<<8|n,s=[],o=0;n>o;o+=4)s.push(r);n=i.create(s,n),t.concat(n)},unpad:function(t){t.sigBytes-=255&t.words[t.sigBytes-1>>>2]}},n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:c,padding:h}),reset:function(){u.reset.call(this);var t=this.cfg,e=t.iv,t=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=t.createEncryptor;else n=t.createDecryptor,this._minBufferSize=1;this._mode=n.call(t,this,e&&e.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var l=n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),c=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return t=t.salt,(t?i.create([1398893684,1701076831]).concat(t).concat(e):e).toString(o)},parse:function(t){t=o.parse(t);var e=t.words;if(1398893684==e[0]&&1701076831==e[1]){var n=i.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return l.create({ciphertext:t,salt:n})}},d=n.SerializableCipher=r.extend({cfg:r.extend({format:c}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r);return e=i.finalize(e),i=i.cfg,l.create({ciphertext:e,key:n,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),e=(e.kdf={}).OpenSSL={execute:function(t,e,n,r){return r||(r=i.random(8)),t=a.create({keySize:e+n}).compute(t,r),n=i.create(t.words.slice(e),4*n),t.sigBytes=4*e,l.create({key:t,iv:n,salt:r})}},p=n.PasswordBasedCipher=d.extend({cfg:d.cfg.extend({kdf:e}),encrypt:function(t,e,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,t.keySize,t.ivSize),r.iv=n.iv,t=d.encrypt.call(this,t,e,n.key,r),t.mixIn(n),t},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),n=r.kdf.execute(n,t.keySize,t.ivSize,e.salt),r.iv=n.iv,d.decrypt.call(this,t,e,n.key,r)}})}(),function(){for(var t=sr,e=t.lib.BlockCipher,n=t.algo,r=[],i=[],s=[],o=[],a=[],u=[],c=[],f=[],h=[],l=[],d=[],p=0;256>p;p++)d[p]=128>p?p<<1:p<<1^283;for(var g=0,y=0,p=0;256>p;p++){var v=y^y<<1^y<<2^y<<3^y<<4,v=v>>>8^255&v^99;r[g]=v,i[v]=g;var m=d[g],S=d[m],b=d[S],w=257*d[v]^16843008*v;s[g]=w<<24|w>>>8,o[g]=w<<16|w>>>16,a[g]=w<<8|w>>>24,u[g]=w,w=16843009*b^65537*S^257*m^16843008*g,c[v]=w<<24|w>>>8,f[v]=w<<16|w>>>16,h[v]=w<<8|w>>>24,l[v]=w,g?(g=m^d[d[d[b^m]]],y^=d[d[y]]):g=y=1}var E=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes/4,t=4*((this._nRounds=n+6)+1),i=this._keySchedule=[],s=0;t>s;s++)if(n>s)i[s]=e[s];else{var o=i[s-1];s%n?n>6&&4==s%n&&(o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o]):(o=o<<8|o>>>24,o=r[o>>>24]<<24|r[o>>>16&255]<<16|r[o>>>8&255]<<8|r[255&o],o^=E[s/n|0]<<24),i[s]=i[s-n]^o}for(e=this._invKeySchedule=[],n=0;t>n;n++)s=t-n,o=n%4?i[s]:i[s-4],e[n]=4>n||4>=s?o:c[r[o>>>24]]^f[r[o>>>16&255]]^h[r[o>>>8&255]]^l[r[255&o]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,o,a,u,r)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,c,f,h,l,i),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,s,o,a){for(var u=this._nRounds,c=t[e]^n[0],f=t[e+1]^n[1],h=t[e+2]^n[2],l=t[e+3]^n[3],d=4,p=1;u>p;p++)var g=r[c>>>24]^i[f>>>16&255]^s[h>>>8&255]^o[255&l]^n[d++],y=r[f>>>24]^i[h>>>16&255]^s[l>>>8&255]^o[255&c]^n[d++],v=r[h>>>24]^i[l>>>16&255]^s[c>>>8&255]^o[255&f]^n[d++],l=r[l>>>24]^i[c>>>16&255]^s[f>>>8&255]^o[255&h]^n[d++],c=g,f=y,h=v;g=(a[c>>>24]<<24|a[f>>>16&255]<<16|a[h>>>8&255]<<8|a[255&l])^n[d++],y=(a[f>>>24]<<24|a[h>>>16&255]<<16|a[l>>>8&255]<<8|a[255&c])^n[d++],v=(a[h>>>24]<<24|a[l>>>16&255]<<16|a[c>>>8&255]<<8|a[255&f])^n[d++],l=(a[l>>>24]<<24|a[c>>>16&255]<<16|a[f>>>8&255]<<8|a[255&h])^n[d++],t[e]=g,t[e+1]=y,t[e+2]=v,t[e+3]=l},keySize:8});t.AES=e._createHelper(n)}(),function(){function t(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<n;n++){var r=o[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(t=this._subKeys=[],r=0;16>r;r++){for(var i=t[r]=[],s=u[r],n=0;24>n;n++)i[n/6|0]|=e[(a[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=e[28+(a[n+24]-1+s)%28]<<31-n%6;for(i[0]=i[0]<<1|i[0]>>>31,n=1;7>n;n++)i[n]>>>=4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(e=this._invSubKeys=[],n=0;16>n;n++)e[n]=t[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(n,r,i){this._lBlock=n[r],this._rBlock=n[r+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var s=0;16>s;s++){for(var o=i[s],a=this._lBlock,u=this._rBlock,h=0,l=0;8>l;l++)h|=c[l][((u^o[l])&f[l])>>>0];this._lBlock=u,this._rBlock=a^h}i=this._lBlock,this._lBlock=this._rBlock,this._rBlock=i,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),n[r]=this._lBlock,n[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});n.DES=r._createHelper(h),s=s.TripleDES=r.extend({_doReset:function(){var t=this._key.words;this._des1=h.createEncryptor(i.create(t.slice(0,2))),this._des2=h.createEncryptor(i.create(t.slice(2,4))),this._des3=h.createEncryptor(i.create(t.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2}),n.TripleDES=r._createHelper(s)}(),function(){var t=sr,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp(),t=[];for(var i=0;n>i;i+=3)for(var s=(e[i>>>2]>>>24-8*(i%4)&255)<<16|(e[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|e[i+2>>>2]>>>24-8*((i+2)%4)&255,o=0;4>o&&n>i+.75*o;o++)t.push(r.charAt(s>>>6*(3-o)&63));if(e=r.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var n=t.length,r=this._map,i=r.charAt(64);i&&(i=t.indexOf(i),-1!=i&&(n=i));for(var i=[],s=0,o=0;n>o;o++)if(o%4){var a=r.indexOf(t.charAt(o-1))<<2*(o%4),u=r.indexOf(t.charAt(o))>>>6-2*(o%4);i[s>>>2]|=(a|u)<<24-8*(s%4),s++}return e.create(i,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,n,r,i,s,o){return t=t+(e&n|~e&r)+i+o,(t<>>32-s)+e}function n(t,e,n,r,i,s,o){return t=t+(e&r|n&~r)+i+o,(t<>>32-s)+e}function r(t,e,n,r,i,s,o){return t=t+(e^n^r)+i+o,(t<>>32-s)+e}function i(t,e,n,r,i,s,o){return t=t+(n^(e|~r))+i+o,(t<>>32-s)+e}for(var s=sr,o=s.lib,a=o.WordArray,u=o.Hasher,o=s.algo,c=[],f=0;64>f;f++)c[f]=4294967296*t.abs(t.sin(f+1))|0;o=o.MD5=u.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,s){for(var o=0;16>o;o++){var a=s+o,u=t[a];t[a]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var o=this._hash.words,a=t[s+0],u=t[s+1],f=t[s+2],h=t[s+3],l=t[s+4],d=t[s+5],p=t[s+6],g=t[s+7],y=t[s+8],v=t[s+9],m=t[s+10],S=t[s+11],b=t[s+12],w=t[s+13],E=t[s+14],x=t[s+15],A=o[0],R=o[1],F=o[2],_=o[3],A=e(A,R,F,_,a,7,c[0]),_=e(_,A,R,F,u,12,c[1]),F=e(F,_,A,R,f,17,c[2]),R=e(R,F,_,A,h,22,c[3]),A=e(A,R,F,_,l,7,c[4]),_=e(_,A,R,F,d,12,c[5]),F=e(F,_,A,R,p,17,c[6]),R=e(R,F,_,A,g,22,c[7]),A=e(A,R,F,_,y,7,c[8]),_=e(_,A,R,F,v,12,c[9]),F=e(F,_,A,R,m,17,c[10]),R=e(R,F,_,A,S,22,c[11]),A=e(A,R,F,_,b,7,c[12]),_=e(_,A,R,F,w,12,c[13]),F=e(F,_,A,R,E,17,c[14]),R=e(R,F,_,A,x,22,c[15]),A=n(A,R,F,_,u,5,c[16]),_=n(_,A,R,F,p,9,c[17]),F=n(F,_,A,R,S,14,c[18]),R=n(R,F,_,A,a,20,c[19]),A=n(A,R,F,_,d,5,c[20]),_=n(_,A,R,F,m,9,c[21]),F=n(F,_,A,R,x,14,c[22]),R=n(R,F,_,A,l,20,c[23]),A=n(A,R,F,_,v,5,c[24]),_=n(_,A,R,F,E,9,c[25]),F=n(F,_,A,R,h,14,c[26]),R=n(R,F,_,A,y,20,c[27]),A=n(A,R,F,_,w,5,c[28]),_=n(_,A,R,F,f,9,c[29]),F=n(F,_,A,R,g,14,c[30]),R=n(R,F,_,A,b,20,c[31]),A=r(A,R,F,_,d,4,c[32]),_=r(_,A,R,F,y,11,c[33]),F=r(F,_,A,R,S,16,c[34]),R=r(R,F,_,A,E,23,c[35]),A=r(A,R,F,_,u,4,c[36]),_=r(_,A,R,F,l,11,c[37]),F=r(F,_,A,R,g,16,c[38]),R=r(R,F,_,A,m,23,c[39]),A=r(A,R,F,_,w,4,c[40]),_=r(_,A,R,F,a,11,c[41]),F=r(F,_,A,R,h,16,c[42]),R=r(R,F,_,A,p,23,c[43]),A=r(A,R,F,_,v,4,c[44]),_=r(_,A,R,F,b,11,c[45]),F=r(F,_,A,R,x,16,c[46]),R=r(R,F,_,A,f,23,c[47]),A=i(A,R,F,_,a,6,c[48]),_=i(_,A,R,F,g,10,c[49]),F=i(F,_,A,R,E,15,c[50]),R=i(R,F,_,A,d,21,c[51]),A=i(A,R,F,_,b,6,c[52]),_=i(_,A,R,F,h,10,c[53]),F=i(F,_,A,R,m,15,c[54]),R=i(R,F,_,A,u,21,c[55]),A=i(A,R,F,_,y,6,c[56]),_=i(_,A,R,F,x,10,c[57]),F=i(F,_,A,R,p,15,c[58]),R=i(R,F,_,A,w,21,c[59]),A=i(A,R,F,_,l,6,c[60]),_=i(_,A,R,F,S,10,c[61]),F=i(F,_,A,R,f,15,c[62]),R=i(R,F,_,A,v,21,c[63]);o[0]=o[0]+A|0,o[1]=o[1]+R|0,o[2]=o[2]+F|0,o[3]=o[3]+_|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var s=t.floor(r/4294967296);for(n[(i+64>>>9<<4)+15]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),n[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),e.sigBytes=4*(n.length+1),this._process(),e=this._hash,n=e.words,r=0;4>r;r++)i=n[r],n[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=u.clone.call(this);return t._hash=this._hash.clone(),t}}),s.MD5=u._createHelper(o),s.HmacMD5=u._createHmacHelper(o)}(Math),function(){var t=sr,e=t.lib,n=e.WordArray,r=e.Hasher,i=[],e=t.algo.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],s=n[1],o=n[2],a=n[3],u=n[4],c=0;80>c;c++){if(16>c)i[c]=0|t[e+c];else{var f=i[c-3]^i[c-8]^i[c-14]^i[c-16];i[c]=f<<1|f>>>31}f=(r<<5|r>>>27)+u+i[c],f=20>c?f+((s&o|~s&a)+1518500249):40>c?f+((s^o^a)+1859775393):60>c?f+((s&o|s&a|o&a)-1894007588):f+((s^o^a)-899497514),u=a,a=o,o=s<<30|s>>>2,s=r,r=f}n[0]=n[0]+r|0,n[1]=n[1]+s|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),e[(r+64>>>9<<4)+15]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(e),t.HmacSHA1=r._createHmacHelper(e)}(),function(t){for(var e=sr,n=e.lib,r=n.WordArray,i=n.Hasher,n=e.algo,s=[],o=[],a=function(t){return 4294967296*(t-(0|t))|0},u=2,c=0;64>c;){var f;t:{f=u;for(var h=t.sqrt(f),l=2;h>=l;l++)if(!(f%l)){f=!1;break t}f=!0}f&&(8>c&&(s[c]=a(t.pow(u,.5))),o[c]=a(t.pow(u,1/3)),c++),u++}var d=[],n=n.SHA256=i.extend({_doReset:function(){this._hash=new r.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],a=n[3],u=n[4],c=n[5],f=n[6],h=n[7],l=0;64>l;l++){if(16>l)d[l]=0|t[e+l];else{var p=d[l-15],g=d[l-2];d[l]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[l-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+d[l-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&f)+o[l]+d[l],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&s^i&s),h=f,f=c,c=u,u=a+p|0,a=s,s=i,i=r,r=p+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+f|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=t.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=i._createHelper(n),e.HmacSHA256=i._createHmacHelper(n)}(Math),function(){var t=sr,e=t.lib.WordArray,n=t.algo,r=n.SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(n),t.HmacSHA224=r._createHmacHelper(n)}(),function(){function t(){return i.create.apply(i,arguments)}for(var e=sr,n=e.lib.Hasher,r=e.x64,i=r.Word,s=r.WordArray,r=e.algo,o=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=t();r=r.SHA512=n.extend({_doReset:function(){this._hash=new s.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],s=n[2],u=n[3],c=n[4],f=n[5],h=n[6],n=n[7],l=r.high,d=r.low,p=i.high,g=i.low,y=s.high,v=s.low,m=u.high,S=u.low,b=c.high,w=c.low,E=f.high,x=f.low,A=h.high,R=h.low,F=n.high,_=n.low,K=l,P=d,U=p,O=g,C=y,I=v,j=m,D=S,T=b,J=w,H=E,B=x,N=A,k=R,M=F,V=_,L=0;80>L;L++){var q=a[L];if(16>L)var W=q.high=0|t[e+2*L],z=q.low=0|t[e+2*L+1];else{var W=a[L-15],z=W.high,Y=W.low,W=(z>>>1|Y<<31)^(z>>>8|Y<<24)^z>>>7,Y=(Y>>>1|z<<31)^(Y>>>8|z<<24)^(Y>>>7|z<<25),G=a[L-2],z=G.high,X=G.low,G=(z>>>19|X<<13)^(z<<3|X>>>29)^z>>>6,X=(X>>>19|z<<13)^(X<<3|z>>>29)^(X>>>6|z<<26),z=a[L-7],$=z.high,Z=a[L-16],Q=Z.high,Z=Z.low,z=Y+z.low,W=W+$+(Y>>>0>z>>>0?1:0),z=z+X,W=W+G+(X>>>0>z>>>0?1:0),z=z+Z,W=W+Q+(Z>>>0>z>>>0?1:0);q.high=W,q.low=z}var $=T&H^~T&N,Z=J&B^~J&k,q=K&U^K&C^U&C,tt=P&O^P&I^O&I,Y=(K>>>28|P<<4)^(K<<30|P>>>2)^(K<<25|P>>>7),G=(P>>>28|K<<4)^(P<<30|K>>>2)^(P<<25|K>>>7),X=o[L],et=X.high,nt=X.low,X=V+((J>>>14|T<<18)^(J>>>18|T<<14)^(J<<23|T>>>9)),Q=M+((T>>>14|J<<18)^(T>>>18|J<<14)^(T<<23|J>>>9))+(V>>>0>X>>>0?1:0),X=X+Z,Q=Q+$+(Z>>>0>X>>>0?1:0),X=X+nt,Q=Q+et+(nt>>>0>X>>>0?1:0),X=X+z,Q=Q+W+(z>>>0>X>>>0?1:0),z=G+tt,q=Y+q+(G>>>0>z>>>0?1:0),M=N,V=k,N=H,k=B,H=T,B=J,J=D+X|0,T=j+Q+(D>>>0>J>>>0?1:0)|0,j=C,D=I,C=U,I=O,U=K,O=P,P=X+z|0,K=Q+q+(X>>>0>P>>>0?1:0)|0}d=r.low=d+P,r.high=l+K+(P>>>0>d>>>0?1:0),g=i.low=g+O,i.high=p+U+(O>>>0>g>>>0?1:0),v=s.low=v+I,s.high=y+C+(I>>>0>v>>>0?1:0),S=u.low=S+D,u.high=m+j+(D>>>0>S>>>0?1:0),w=c.low=w+J,c.high=b+T+(J>>>0>w>>>0?1:0),x=f.low=x+B,f.high=E+H+(B>>>0>x>>>0?1:0),R=h.low=R+k,h.high=A+N+(k>>>0>R>>>0?1:0),_=n.low=_+V,n.high=F+M+(V>>>0>_>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[(r+128>>>10<<5)+30]=Math.floor(n/4294967296),e[(r+128>>>10<<5)+31]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=n._createHelper(r),e.HmacSHA512=n._createHmacHelper(r)}(),function(){var t=sr,e=t.x64,n=e.Word,r=e.WordArray,e=t.algo,i=e.SHA512,e=e.SHA384=i.extend({_doReset:function(){this._hash=new r.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var t=i._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=i._createHelper(e),t.HmacSHA384=i._createHmacHelper(e)}(),function(){var t=sr,e=t.lib,n=e.WordArray,r=e.Hasher,e=t.algo,i=n.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),s=n.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),o=n.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),a=n.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n.create([0,1518500249,1859775393,2400959708,2840853838]),c=n.create([1352829926,1548603684,1836072691,2053994217,0]),e=e.RIPEMD160=r.extend({_doReset:function(){this._hash=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;16>n;n++){var r=e+n,f=t[r];t[r]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h,l,d,p,g,y,v,m,S,b,r=this._hash.words,f=u.words,w=c.words,E=i.words,x=s.words,A=o.words,R=a.words;y=h=r[0],v=l=r[1],m=d=r[2],S=p=r[3],b=g=r[4];for(var F,n=0;80>n;n+=1)F=h+t[e+E[n]]|0,F=16>n?F+((l^d^p)+f[0]):32>n?F+((l&d|~l&p)+f[1]):48>n?F+(((l|~d)^p)+f[2]):64>n?F+((l&p|d&~p)+f[3]):F+((l^(d|~p))+f[4]),F|=0,F=F<>>32-A[n],F=F+g|0,h=g,g=p,p=d<<10|d>>>22,d=l,l=F,F=y+t[e+x[n]]|0,F=16>n?F+((v^(m|~S))+w[0]):32>n?F+((v&S|m&~S)+w[1]):48>n?F+(((v|~m)^S)+w[2]):64>n?F+((v&m|~v&S)+w[3]):F+((v^m^S)+w[4]),F|=0,F=F<>>32-R[n],F=F+b|0,y=b,b=S,S=m<<10|m>>>22,
m=v,v=F;F=r[1]+d+S|0,r[1]=r[2]+p+b|0,r[2]=r[3]+g+y|0,r[3]=r[4]+h+v|0,r[4]=r[0]+l+m|0,r[0]=F},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;for(e[r>>>5]|=128<<24-r%32,e[(r+64>>>9<<4)+14]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process(),t=this._hash,e=t.words,n=0;5>n;n++)r=e[n],e[n]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);return t},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.RIPEMD160=r._createHelper(e),t.HmacRIPEMD160=r._createHmacHelper(e)}(Math),function(){var t=sr,e=t.enc.Utf8;t.algo.HMAC=t.lib.Base.extend({init:function(t,n){t=this._hasher=new t.init,"string"==typeof n&&(n=e.parse(n));var r=t.blockSize,i=4*r;n.sigBytes>i&&(n=t.finalize(n)),n.clamp();for(var s=this._oKey=n.clone(),o=this._iKey=n.clone(),a=s.words,u=o.words,c=0;r>c;c++)a[c]^=1549556828,u[c]^=909522486;s.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher;return t=e.finalize(t),e.reset(),e.finalize(this._oKey.clone().concat(t))}})}(),function(){var t=sr,e=t.lib,n=e.Base,r=e.WordArray,e=t.algo,i=e.HMAC,s=e.PBKDF2=n.extend({cfg:n.extend({keySize:4,hasher:e.SHA1,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,s=i.create(n.hasher,t),o=r.create(),a=r.create([1]),u=o.words,c=a.words,f=n.keySize,n=n.iterations;u.lengthg;g++){p=s.finalize(p),s.reset();for(var y=p.words,v=0;d>v;v++)l[v]^=y[v]}o.concat(h),c[0]++}return o.sigBytes=4*f,o}});t.PBKDF2=function(t,e,n){return s.create(n).compute(t,e)}}();var or,ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ur="=",cr=0xdeadbeefcafe,fr=15715070==(16777215&cr);fr&&"Microsoft Internet Explorer"==nr.appName?(o.prototype.am=c,or=30):fr&&"Netscape"!=nr.appName?(o.prototype.am=u,or=26):(o.prototype.am=f,or=28),o.prototype.DB=or,o.prototype.DM=(1<=dr;++dr)gr[lr++]=dr;for(lr="a".charCodeAt(0),dr=10;36>dr;++dr)gr[lr++]=dr;for(lr="A".charCodeAt(0),dr=10;36>dr;++dr)gr[lr++]=dr;I.prototype.convert=j,I.prototype.revert=D,I.prototype.reduce=T,I.prototype.mulTo=J,I.prototype.sqrTo=H,N.prototype.convert=k,N.prototype.revert=M,N.prototype.reduce=V,N.prototype.mulTo=q,N.prototype.sqrTo=L,o.prototype.copyTo=d,o.prototype.fromInt=p,o.prototype.fromString=y,o.prototype.clamp=v,o.prototype.dlShiftTo=A,o.prototype.drShiftTo=R,o.prototype.lShiftTo=F,o.prototype.rShiftTo=_,o.prototype.subTo=K,o.prototype.multiplyTo=P,o.prototype.squareTo=U,o.prototype.divRemTo=O,o.prototype.invDigit=B,o.prototype.isEven=W,o.prototype.exp=z,o.prototype.toString=m,o.prototype.negate=S,o.prototype.abs=b,o.prototype.compareTo=w,o.prototype.bitLength=x,o.prototype.mod=C,o.prototype.modPowInt=Y,o.ZERO=g(0),o.ONE=g(1),Bt.prototype.convert=Nt,Bt.prototype.revert=Nt,Bt.prototype.mulTo=kt,Bt.prototype.sqrTo=Mt,Wt.prototype.convert=zt,Wt.prototype.revert=Yt,Wt.prototype.reduce=Gt,Wt.prototype.mulTo=$t,Wt.prototype.sqrTo=Xt;var yr=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],vr=(1<<26)/yr[yr.length-1];o.prototype.chunkSize=Q,o.prototype.toRadix=et,o.prototype.fromRadix=nt,o.prototype.fromNumber=rt,o.prototype.bitwiseTo=ut,o.prototype.changeBit=Rt,o.prototype.addTo=Pt,o.prototype.dMultiply=Jt,o.prototype.dAddOffset=Ht,o.prototype.multiplyLowerTo=Lt,o.prototype.multiplyUpperTo=qt,o.prototype.modInt=te,o.prototype.millerRabin=re,o.prototype.clone=G,o.prototype.intValue=X,o.prototype.byteValue=$,o.prototype.shortValue=Z,o.prototype.signum=tt,o.prototype.toByteArray=it,o.prototype.equals=st,o.prototype.min=ot,o.prototype.max=at,o.prototype.and=ft,o.prototype.or=lt,o.prototype.xor=pt,o.prototype.andNot=yt,o.prototype.not=vt,o.prototype.shiftLeft=mt,o.prototype.shiftRight=St,o.prototype.getLowestSetBit=wt,o.prototype.bitCount=xt,o.prototype.testBit=At,o.prototype.setBit=Ft,o.prototype.clearBit=_t,o.prototype.flipBit=Kt,o.prototype.add=Ut,o.prototype.subtract=Ot,o.prototype.multiply=Ct,o.prototype.divide=jt,o.prototype.remainder=Dt,o.prototype.divideAndRemainder=Tt,o.prototype.modPow=Zt,o.prototype.modInverse=ee,o.prototype.pow=Vt,o.prototype.gcd=Qt,o.prototype.isProbablePrime=ne,o.prototype.square=It,ie.prototype.init=se,ie.prototype.next=oe;var mr,Sr,br,wr=256;if(null==Sr){Sr=new Array,br=0;var Er;if(rr.crypto&&rr.crypto.getRandomValues){var xr=new Uint8Array(32);for(rr.crypto.getRandomValues(xr),Er=0;32>Er;++Er)Sr[br++]=xr[Er]}if("Netscape"==nr.appName&&nr.appVersion<"5"&&rr.crypto){var Ar=rr.crypto.random(32);for(Er=0;Erbr;)Er=Math.floor(65536*Math.random()),Sr[br++]=Er>>>8,Sr[br++]=255&Er;br=0,ce()}le.prototype.nextBytes=he;var Rr=20;ve.prototype.doPublic=Se,ve.prototype.setPublic=me,ve.prototype.encrypt=be,ve.prototype.encryptOAEP=we,ve.prototype.type="RSA";var Rr=20;ve.prototype.doPrivate=Ke,ve.prototype.setPrivate=Re,ve.prototype.setPrivateEx=Fe,ve.prototype.generate=_e,ve.prototype.decrypt=Pe,ve.prototype.decryptOAEP=Ue,Oe.prototype.equals=Ce,Oe.prototype.toBigInteger=Ie,Oe.prototype.negate=je,Oe.prototype.add=De,Oe.prototype.subtract=Te,Oe.prototype.multiply=Je,Oe.prototype.square=He,Oe.prototype.divide=Be,Ne.prototype.getX=ke,Ne.prototype.getY=Me,Ne.prototype.equals=Ve,Ne.prototype.isInfinity=Le,Ne.prototype.negate=qe,Ne.prototype.add=We,Ne.prototype.twice=ze,Ne.prototype.multiply=Ye,Ne.prototype.multiplyTwo=Ge,Xe.prototype.getQ=$e,Xe.prototype.getA=Ze,Xe.prototype.getB=Qe,Xe.prototype.equals=tn,Xe.prototype.getInfinity=en,Xe.prototype.fromBigInteger=nn,Xe.prototype.decodePointHex=rn,Oe.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},Ne.prototype.getEncoded=function(t){var e=function(t,e){var n=t.toByteArrayUnsigned();if(en.length;)n.unshift(0);return n},n=this.getX().toBigInteger(),r=this.getY().toBigInteger(),i=e(n,32);return t?r.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(e(r,32))),i},Ne.decodeFrom=function(t,e){var n=(e[0],e.length-1),r=e.slice(1,1+n/2),i=e.slice(1+n/2,1+n);r.unshift(0),i.unshift(0);var s=new o(r),a=new o(i);return new Ne(t,t.fromBigInteger(s),t.fromBigInteger(a))},Ne.decodeFromHex=function(t,e){var n=(e.substr(0,2),e.length-2),r=e.substr(2,n/2),i=e.substr(2+n/2,n/2),s=new o(r,16),a=new o(i,16);return new Ne(t,t.fromBigInteger(s),t.fromBigInteger(a))},Ne.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),n=t.y.subtract(this.y),r=n.divide(e),i=r.square().subtract(this.x).subtract(t.x),s=r.multiply(this.x.subtract(i)).subtract(this.y);return new Ne(this.curve,i,s)},Ne.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(o.valueOf(2)),e=this.curve.fromBigInteger(o.valueOf(3)),n=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),r=n.square().subtract(this.x.multiply(t)),i=n.multiply(this.x.subtract(r)).subtract(this.y);return new Ne(this.curve,r,i)},Ne.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,n=t,r=n.multiply(new o("3")),i=this.negate(),s=this;for(e=r.bitLength()-2;e>0;--e){s=s.twice();var a=r.testBit(e),u=n.testBit(e);a!=u&&(s=s.add2D(a?this:i))}return s},Ne.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),n=this.curve.getA().toBigInteger(),r=this.curve.getB().toBigInteger(),i=this.curve.getQ(),s=e.multiply(e).mod(i),o=t.multiply(t).multiply(t).add(n.multiply(t)).add(r).mod(i);return s.equals(o)},Ne.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},Ne.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),n=this.getY().toBigInteger();if(e.compareTo(o.ONE)<0||e.compareTo(t.subtract(o.ONE))>0)throw new Error("x coordinate out of bounds");if(n.compareTo(o.ONE)<0||n.compareTo(t.subtract(o.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var Fr=function(){function t(t,e,n){return e?o[e]:String.fromCharCode(parseInt(n,16))}var e="(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)",n='(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))',r='(?:"'+n+'*")',i=new RegExp("(?:false|true|null|[\\{\\}\\[\\]]|"+e+"|"+r+")","g"),s=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),o={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},a=new String(""),u="\\",c=({"{":Object,"[":Array},Object.hasOwnProperty);return function(e,n){var r,o=e.match(i),f=o[0],h=!1;"{"===f?r={}:"["===f?r=[]:(r=[],h=!0);for(var l,d=[r],p=1-h,g=o.length;g>p;++p){f=o[p];var y;switch(f.charCodeAt(0)){default:y=d[0],y[l||y.length]=+f,l=void 0;break;case 34:if(f=f.substring(1,f.length-1),-1!==f.indexOf(u)&&(f=f.replace(s,t)),y=d[0],!l){if(!(y instanceof Array)){l=f||a;break}l=y.length}y[l]=f,l=void 0;break;case 91:y=d[0],d.unshift(y[l||y.length]=[]),l=void 0;break;case 93:d.shift();break;case 102:y=d[0],y[l||y.length]=!1,l=void 0;break;case 110:y=d[0],y[l||y.length]=null,l=void 0;break;case 116:y=d[0],y[l||y.length]=!0,l=void 0;break;case 123:y=d[0],d.unshift(y[l||y.length]={}),l=void 0;break;case 125:d.shift()}}if(h){if(1!==d.length)throw new Error;r=r[0]}else if(d.length)throw new Error;if(n){var v=function(t,e){var r=t[e];if(r&&"object"==typeof r){var i=null;for(var s in r)if(c.call(r,s)&&r!==t){var o=v(r,s);void 0!==o?r[s]=o:(i||(i=[]),i.push(s))}if(i)for(var a=i.length;--a>=0;)delete r[i[a]]}return n.call(t,e,r)};r=v({"":r},"")}return r}}();"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.asn1&&KJUR.asn1||(KJUR.asn1={}),KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if("-"!=e.substr(0,1))e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var n=e.substr(1),r=n.length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var i="",s=0;r>s;s++)i+="f";var a=new o(i,16),u=a.xor(t).add(o.ONE);e=u.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){var n=(KJUR.asn1,sr.enc.Hex.parse(t)),r=sr.enc.Base64.stringify(n),i=r.replace(/(.{64})/g,"$1\r\n");return i=i.replace(/\r\n$/,""),"-----BEGIN "+e+"-----\r\n"+i+"\r\n-----END "+e+"-----\r\n"},this.newObject=function(t){var e=KJUR.asn1,n=Object.keys(t);if(1!=n.length)throw"key of param shall be only one.";var r=n[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+r+":"))throw"undefined key: "+r;if("bool"==r)return new e.DERBoolean(t[r]);if("int"==r)return new e.DERInteger(t[r]);if("bitstr"==r)return new e.DERBitString(t[r]);if("octstr"==r)return new e.DEROctetString(t[r]);if("null"==r)return new e.DERNull(t[r]);if("oid"==r)return new e.DERObjectIdentifier(t[r]);if("enum"==r)return new e.DEREnumerated(t[r]);if("utf8str"==r)return new e.DERUTF8String(t[r]);if("numstr"==r)return new e.DERNumericString(t[r]);if("prnstr"==r)return new e.DERPrintableString(t[r]);if("telstr"==r)return new e.DERTeletexString(t[r]);if("ia5str"==r)return new e.DERIA5String(t[r]);if("utctime"==r)return new e.DERUTCTime(t[r]);if("gentime"==r)return new e.DERGeneralizedTime(t[r]);if("seq"==r){for(var i=t[r],s=[],o=0;ou;u++)a+="0";i=a+i;for(var u=0;ue)return n;var r=n.length/2;if(r>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var i=128+r;return i.toString(16)+n},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},KJUR.asn1.DERAbstractString=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=un(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t?this.setString(t):"undefined"!=typeof t.str?this.setString(t.str):"undefined"!=typeof t.hex&&this.setStringHex(t.hex))},ir.lang.extend(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractTime=function(t){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){utc=t.getTime()+6e4*t.getTimezoneOffset();var e=new Date(utc);return e},this.formatDate=function(t,e,n){var r=this.zeroPadding,i=this.localDateToUTC(t),s=String(i.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=r(String(i.getMonth()+1),2),a=r(String(i.getDate()),2),u=r(String(i.getHours()),2),c=r(String(i.getMinutes()),2),f=r(String(i.getSeconds()),2),h=s+o+a+u+c+f;if(n===!0){var l=i.getMilliseconds();if(0!=l){var d=r(String(l),3);d=d.replace(/[0]+$/,""),h=h+"."+d}}return h+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=un(t)},this.setByDateValue=function(t,e,n,r,i,s){var o=new Date(Date.UTC(t,e-1,n,r,i,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},ir.lang.extend(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object),KJUR.asn1.DERAbstractStructured=function(t){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,"undefined"!=typeof t&&"undefined"!=typeof t.array&&(this.asn1Array=t.array)},ir.lang.extend(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object),KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},ir.lang.extend(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object),KJUR.asn1.DERInteger=function(t){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new o(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("undefined"!=typeof t.bigint?this.setByBigInteger(t.bigint):"undefined"!=typeof t["int"]?this.setByInteger(t["int"]):"number"==typeof t?this.setByInteger(t):"undefined"!=typeof t.hex&&this.setValueHex(t.hex))},ir.lang.extend(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object),KJUR.asn1.DERBitString=function(t){KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(0>t||t>7)throw"unused bits shall be from 0 to 7: u = "+t;var n="0"+t;this.hTLV=null,this.isModified=!0,this.hV=n+e},this.setByBinaryString=function(t){t=t.replace(/0+$/,"");var e=8-t.length%8;8==e&&(e=0);for(var n=0;e>=n;n++)t+="0";for(var r="",n=0;nn;n++)e[n]=!1;return e},this.getFreshValueHex=function(){return this.hV},"undefined"!=typeof t&&("string"==typeof t&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):"undefined"!=typeof t.hex?this.setHexValueIncludingUnusedBits(t.hex):"undefined"!=typeof t.bin?this.setByBinaryString(t.bin):"undefined"!=typeof t.array&&this.setByBooleanArray(t.array))},ir.lang.extend(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object),KJUR.asn1.DEROctetString=function(t){KJUR.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"},ir.lang.extend(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString),KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},ir.lang.extend(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object),KJUR.asn1.DERObjectIdentifier=function(t){var e=function(t){var e=t.toString(16);return 1==e.length&&(e="0"+e),e},n=function(t){var n="",r=new o(t,10),i=r.toString(2),s=7-i.length%7;7==s&&(s=0);for(var a="",u=0;s>u;u++)a+="0";i=a+i;for(var u=0;u0&&10>n?n+1:-2},this.getHexOfL_AtObj=function(t,e){var n=this.getByteLengthOfL_AtObj(t,e);return 1>n?"":t.substring(e+2,e+2+2*n)},this.getIntOfL_AtObj=function(t,e){var n=this.getHexOfL_AtObj(t,e);if(""==n)return-1;var r;return r=parseInt(n.substring(0,1))<8?new o(n,16):new o(n.substring(2),16),r.intValue()},this.getStartPosOfV_AtObj=function(t,e){var n=this.getByteLengthOfL_AtObj(t,e);return 0>n?n:e+2*(n+1)},this.getHexOfV_AtObj=function(t,e){var n=this.getStartPosOfV_AtObj(t,e),r=this.getIntOfL_AtObj(t,e);return t.substring(n,n+2*r)},this.getHexOfTLV_AtObj=function(t,e){var n=t.substr(e,2),r=this.getHexOfL_AtObj(t,e),i=this.getHexOfV_AtObj(t,e);return n+r+i},this.getPosOfNextSibling_AtObj=function(t,e){var n=this.getStartPosOfV_AtObj(t,e),r=this.getIntOfL_AtObj(t,e);return n+2*r},this.getPosArrayOfChildren_AtObj=function(t,e){var n=new Array,r=this.getStartPosOfV_AtObj(t,e);n.push(r);for(var i=this.getIntOfL_AtObj(t,e),s=r,o=0;;){var a=this.getPosOfNextSibling_AtObj(t,s);if(null==a||a-r>=2*i)break;if(o>=200)break;n.push(a),s=a,o++}return n},this.getNthChildIndex_AtObj=function(t,e,n){var r=this.getPosArrayOfChildren_AtObj(t,e);return r[n]},this.getDecendantIndexByNthList=function(t,e,n){if(0==n.length)return e;var r=n.shift(),i=this.getPosArrayOfChildren_AtObj(t,e);return this.getDecendantIndexByNthList(t,i[r],n)},this.getDecendantHexTLVByNthList=function(t,e,n){var r=this.getDecendantIndexByNthList(t,e,n);return this.getHexOfTLV_AtObj(t,r)},this.getDecendantHexVByNthList=function(t,e,n){var r=this.getDecendantIndexByNthList(t,e,n);return this.getHexOfV_AtObj(t,r)}};_r.getVbyList=function(t,e,n,r){var i=this.getDecendantIndexByNthList(t,e,n);if(void 0===i)throw"can't find nthList object";if(void 0!==r&&t.substr(i,2)!=r)throw"checking tag doesn't match: "+t.substr(i,2)+"!="+r;return this.getHexOfV_AtObj(t,i)},_r.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},n=[],r=t.substr(0,2),i=parseInt(r,16);n[0]=new String(Math.floor(i/40)),n[1]=new String(i%40);for(var s=t.substr(2),o=[],a=0;a0&&(f=f+"."+u.join(".")),f},_r.dump=function(t,e,n,r){var i=function(t,e){if(t.length<=2*e)return t;var n=t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e);return n};void 0===e&&(e={ommit_long_octet:32}),void 0===n&&(n=0),void 0===r&&(r="");var s=e.ommit_long_octet;if("01"==t.substr(n,2)){var o=_r.getHexOfV_AtObj(t,n);return"00"==o?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n"}if("02"==t.substr(n,2)){var o=_r.getHexOfV_AtObj(t,n);return r+"INTEGER "+i(o,s)+"\n"}if("03"==t.substr(n,2)){var o=_r.getHexOfV_AtObj(t,n);return r+"BITSTRING "+i(o,s)+"\n"}if("04"==t.substr(n,2)){var o=_r.getHexOfV_AtObj(t,n);if(_r.isASN1HEX(o)){var a=r+"OCTETSTRING, encapsulates\n";return a+=_r.dump(o,e,0,r+" ")}return r+"OCTETSTRING "+i(o,s)+"\n"}if("05"==t.substr(n,2))return r+"NULL\n";if("06"==t.substr(n,2)){var u=_r.getHexOfV_AtObj(t,n),c=KJUR.asn1.ASN1Util.oidHexToInt(u),f=KJUR.asn1.x509.OID.oid2name(c),h=c.replace(/\./g," ");return""!=f?r+"ObjectIdentifier "+f+" ("+h+")\n":r+"ObjectIdentifier ("+h+")\n"}if("0c"==t.substr(n,2))return r+"UTF8String '"+Sn(_r.getHexOfV_AtObj(t,n))+"'\n";if("13"==t.substr(n,2))return r+"PrintableString '"+Sn(_r.getHexOfV_AtObj(t,n))+"'\n";if("14"==t.substr(n,2))return r+"TeletexString '"+Sn(_r.getHexOfV_AtObj(t,n))+"'\n";if("16"==t.substr(n,2))return r+"IA5String '"+Sn(_r.getHexOfV_AtObj(t,n))+"'\n";if("17"==t.substr(n,2))return r+"UTCTime "+Sn(_r.getHexOfV_AtObj(t,n))+"\n";if("18"==t.substr(n,2))return r+"GeneralizedTime "+Sn(_r.getHexOfV_AtObj(t,n))+"\n";if("30"==t.substr(n,2)){if("3000"==t.substr(n,4))return r+"SEQUENCE {}\n";var a=r+"SEQUENCE\n",l=_r.getPosArrayOfChildren_AtObj(t,n),d=e;if((2==l.length||3==l.length)&&"06"==t.substr(l[0],2)&&"04"==t.substr(l[l.length-1],2)){var p=_r.getHexOfV_AtObj(t,l[0]),c=KJUR.asn1.ASN1Util.oidHexToInt(p),f=KJUR.asn1.x509.OID.oid2name(c),g=JSON.parse(JSON.stringify(e));g.x509ExtName=f,d=g}for(var y=0;y0){var e=new KJUR.asn1.DERSequence({array:this.extensionsArray}),n=new KJUR.asn1.DERTaggedObject({explicit:!0,tag:"a3",obj:e});this.asn1Array.push(n)}var r=new KJUR.asn1.DERSequence({array:this.asn1Array});return this.hTLV=r.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},ir.lang.extend(KJUR.asn1.x509.TBSCertificate,KJUR.asn1.ASN1Object),KJUR.asn1.x509.Extension=function(t){KJUR.asn1.x509.Extension.superclass.constructor.call(this),this.getEncodedHex=function(){var t=new KJUR.asn1.DERObjectIdentifier({oid:this.oid}),e=new KJUR.asn1.DEROctetString({hex:this.getExtnValueHex()}),n=new Array;n.push(t),this.critical&&n.push(new KJUR.asn1.DERBoolean),n.push(e);var r=new KJUR.asn1.DERSequence({array:n});return r.getEncodedHex()},this.critical=!1,"undefined"!=typeof t&&"undefined"!=typeof t.critical&&(this.critical=t.critical)},ir.lang.extend(KJUR.asn1.x509.Extension,KJUR.asn1.ASN1Object),KJUR.asn1.x509.KeyUsage=function(t){KJUR.asn1.x509.KeyUsage.superclass.constructor.call(this,t),this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.15","undefined"!=typeof t&&"undefined"!=typeof t.bin&&(this.asn1ExtnValue=new KJUR.asn1.DERBitString(t))},ir.lang.extend(KJUR.asn1.x509.KeyUsage,KJUR.asn1.x509.Extension),KJUR.asn1.x509.BasicConstraints=function(t){KJUR.asn1.x509.BasicConstraints.superclass.constructor.call(this,t),this.getExtnValueHex=function(){var t=new Array;this.cA&&t.push(new KJUR.asn1.DERBoolean),this.pathLen>-1&&t.push(new KJUR.asn1.DERInteger({"int":this.pathLen}));var e=new KJUR.asn1.DERSequence({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,"undefined"!=typeof t&&("undefined"!=typeof t.cA&&(this.cA=t.cA),"undefined"!=typeof t.pathLen&&(this.pathLen=t.pathLen))},ir.lang.extend(KJUR.asn1.x509.BasicConstraints,KJUR.asn1.x509.Extension),KJUR.asn1.x509.CRLDistributionPoints=function(t){KJUR.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,t),this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.setByDPArray=function(t){this.asn1ExtnValue=new KJUR.asn1.DERSequence({array:t})},this.setByOneURI=function(t){var e=new KJUR.asn1.x509.GeneralNames([{uri:t}]),n=new KJUR.asn1.x509.DistributionPointName(e),r=new KJUR.asn1.x509.DistributionPoint({dpobj:n});this.setByDPArray([r])},this.oid="2.5.29.31","undefined"!=typeof t&&("undefined"!=typeof t.array?this.setByDPArray(t.array):"undefined"!=typeof t.uri&&this.setByOneURI(t.uri))},ir.lang.extend(KJUR.asn1.x509.CRLDistributionPoints,KJUR.asn1.x509.Extension),KJUR.asn1.x509.ExtKeyUsage=function(t){KJUR.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,t),this.setPurposeArray=function(t){this.asn1ExtnValue=new KJUR.asn1.DERSequence;for(var e=0;e0){var t=new KJUR.asn1.DERSequence({array:this.aRevokedCert});this.asn1Array.push(t)}var e=new KJUR.asn1.DERSequence({array:this.asn1Array});return this.hTLV=e.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize=function(){this.asn1Version=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1ThisUpdate=null,this.asn1NextUpdate=null,this.aRevokedCert=new Array},this._initialize()},ir.lang.extend(KJUR.asn1.x509.TBSCertList,KJUR.asn1.ASN1Object),KJUR.asn1.x509.CRLEntry=function(t){KJUR.asn1.x509.CRLEntry.superclass.constructor.call(this),this.setCertSerial=function(t){this.sn=new KJUR.asn1.DERInteger(t)},this.setRevocationDate=function(t){this.time=new KJUR.asn1.x509.Time(t)},this.getEncodedHex=function(){var t=new KJUR.asn1.DERSequence({array:[this.sn,this.time]});return this.TLV=t.getEncodedHex(),this.TLV},"undefined"!=typeof t&&("undefined"!=typeof t.time&&this.setRevocationDate(t.time),"undefined"!=typeof t.sn&&this.setCertSerial(t.sn))},ir.lang.extend(KJUR.asn1.x509.CRLEntry,KJUR.asn1.ASN1Object),KJUR.asn1.x509.X500Name=function(t){if(KJUR.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=new Array,this.setByString=function(t){var e=t.split("/");e.shift();for(var n=0;n0&&(n=new e.DERTaggedObject({obj:this.dUnsignedAttrs,
tag:"a1",explicit:!1}));var r=[this.dCMSVersion,this.dSignerIdentifier,this.dDigestAlgorithm,t,this.dSigAlg,this.dSig];null!=n&&r.push(n);var i=new e.DERSequence({array:r});return this.hTLV=i.getEncodedHex(),this.hTLV}},ir.lang.extend(KJUR.asn1.cms.SignerInfo,KJUR.asn1.ASN1Object),KJUR.asn1.cms.EncapsulatedContentInfo=function(t){KJUR.asn1.cms.EncapsulatedContentInfo.superclass.constructor.call(this);var e=KJUR.asn1;KJUR.asn1.cms,KJUR.asn1.x509,this.dEContentType=new e.DERObjectIdentifier({name:"data"}),this.dEContent=null,this.isDetached=!1,this.eContentValueHex=null,this.setContentType=function(t){t.match(/^[0-2][.][0-9.]+$/)?this.dEContentType=new e.DERObjectIdentifier({oid:t}):this.dEContentType=new e.DERObjectIdentifier({name:t})},this.setContentValue=function(t){"undefined"!=typeof t&&("string"==typeof t.hex?this.eContentValueHex=t.hex:"string"==typeof t.str&&(this.eContentValueHex=mn(t.str)))},this.setContentValueHex=function(t){this.eContentValueHex=t},this.setContentValueStr=function(t){this.eContentValueHex=mn(t)},this.getEncodedHex=function(){if("string"!=typeof this.eContentValueHex)throw"eContentValue not yet set";var t=new e.DEROctetString({hex:this.eContentValueHex});this.dEContent=new e.DERTaggedObject({obj:t,tag:"a0",explicit:!0});var n=[this.dEContentType];this.isDetached||n.push(this.dEContent);var r=new e.DERSequence({array:n});return this.hTLV=r.getEncodedHex(),this.hTLV}},ir.lang.extend(KJUR.asn1.cms.EncapsulatedContentInfo,KJUR.asn1.ASN1Object),KJUR.asn1.cms.ContentInfo=function(t){KJUR.asn1.cms.ContentInfo.superclass.constructor.call(this);var e=KJUR.asn1,n=(KJUR.asn1.cms,KJUR.asn1.x509);this.dContentType=null,this.dContent=null,this.setContentType=function(t){"string"==typeof t&&(this.dContentType=n.OID.name2obj(t))},this.getEncodedHex=function(){var t=new e.DERTaggedObject({obj:this.dContent,tag:"a0",explicit:!0}),n=new e.DERSequence({array:[this.dContentType,t]});return this.hTLV=n.getEncodedHex(),this.hTLV},"undefined"!=typeof t&&(t.type&&this.setContentType(t.type),t.obj&&t.obj instanceof e.ASN1Object&&(this.dContent=t.obj))},ir.lang.extend(KJUR.asn1.cms.ContentInfo,KJUR.asn1.ASN1Object),KJUR.asn1.cms.SignedData=function(t){KJUR.asn1.cms.SignedData.superclass.constructor.call(this);var e=KJUR.asn1,n=KJUR.asn1.cms,r=KJUR.asn1.x509;this.dCMSVersion=new e.DERInteger({"int":1}),this.dDigestAlgs=null,this.digestAlgNameList=[],this.dEncapContentInfo=new n.EncapsulatedContentInfo,this.dCerts=null,this.certificateList=[],this.crlList=[],this.signerInfoList=[new n.SignerInfo],this.addCertificatesByPEM=function(t){var n=Cr.getHexFromPEM(t),r=new e.ASN1Object;r.hTLV=n,this.certificateList.push(r)},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;if(null==this.dDigestAlgs){for(var t=[],n=0;n0){var a=new e.DERSet({array:this.certificateList});this.dCerts=new e.DERTaggedObject({obj:a,tag:"a0",explicit:!1})}null!=this.dCerts&&o.push(this.dCerts);var u=new e.DERSet({array:this.signerInfoList});o.push(u);var c=new e.DERSequence({array:o});return this.hTLV=c.getEncodedHex(),this.hTLV},this.getContentInfo=function(){this.getEncodedHex();var t=new n.ContentInfo({type:"signed-data",obj:this});return t},this.getContentInfoEncodedHex=function(){var t=this.getContentInfo(),e=t.getEncodedHex();return e},this.getPEM=function(){var t=this.getContentInfoEncodedHex(),n=e.ASN1Util.getPEMStringFromHex(t,"CMS");return n}},ir.lang.extend(KJUR.asn1.cms.SignedData,KJUR.asn1.ASN1Object),KJUR.asn1.cms.CMSUtil=new function(){},KJUR.asn1.cms.CMSUtil.newSignedData=function(t){var e=KJUR.asn1.cms,n=KJUR.asn1.cades,r=new e.SignedData;if(r.dEncapContentInfo.setContentValue(t.content),"object"==typeof t.certs)for(var i=0;ie.length&&(n=e.length);for(var r=0;n>r;r++)if(t.charCodeAt(r)!=e.charCodeAt(r))return r;return t.length!=e.length?n:-1};"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.crypto&&KJUR.crypto||(KJUR.crypto={}),KJUR.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:sr.algo.MD5,sha1:sr.algo.SHA1,sha224:sr.algo.SHA224,sha256:sr.algo.SHA256,sha384:sr.algo.SHA384,sha512:sr.algo.SHA512,ripemd160:sr.algo.RIPEMD160},this.getDigestInfoHex=function(t,e){if("undefined"==typeof this.DIGESTINFOHEAD[e])throw"alg not supported in Util.DIGESTINFOHEAD: "+e;return this.DIGESTINFOHEAD[e]+t},this.getPaddedDigestInfoHex=function(t,e,n){var r=this.getDigestInfoHex(t,e),i=n/4;if(r.length+22>i)throw"key is too short for SigAlg: keylen="+n+","+e;for(var s="0001",o="00"+r,a="",u=i-s.length-o.length,c=0;u>c;c+=2)a+="ff";var f=s+a+o;return f},this.hashString=function(t,e){var n=new KJUR.crypto.MessageDigest({alg:e});return n.digestString(t)},this.hashHex=function(t,e){var n=new KJUR.crypto.MessageDigest({alg:e});return n.digestHex(t)},this.sha1=function(t){var e=new KJUR.crypto.MessageDigest({alg:"sha1",prov:"cryptojs"});return e.digestString(t)},this.sha256=function(t){var e=new KJUR.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"});return e.digestString(t)},this.sha256Hex=function(t){var e=new KJUR.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"});return e.digestHex(t)},this.sha512=function(t){var e=new KJUR.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"});return e.digestString(t)},this.sha512Hex=function(t){var e=new KJUR.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"});return e.digestHex(t)},this.md5=function(t){var e=new KJUR.crypto.MessageDigest({alg:"md5",prov:"cryptojs"});return e.digestString(t)},this.ripemd160=function(t){var e=new KJUR.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"});return e.digestString(t)},this.getCryptoJSMDByName=function(t){}},KJUR.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(null!=t&&void 0===e&&(e=KJUR.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(n){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+n}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sr.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return t.toString(sr.enc.Hex)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}if(-1!=":sha256:".indexOf(t)&&"sjcl"==e){try{this.md=new sjcl.hash.sha256}catch(n){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+n}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sjcl.codec.hex.toBits(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return sjcl.codec.hex.fromBits(t)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==t&&void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=KJUR.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},KJUR.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(t=t.toLowerCase(),null==t&&(t="hmacsha1"),t=t.toLowerCase(),"hmac"!=t.substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=KJUR.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var n=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(n)&&"cryptojs"==e){try{var r=KJUR.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[n];this.mac=sr.algo.HMAC.create(r,this.pass)}catch(i){throw"setAlgAndProvider hash alg set fail hashAlg="+n+"/"+i}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=sr.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){var t=this.mac.finalize();return t.toString(sr.enc.Hex)},this.doFinalString=function(t){return this.updateString(t),this.doFinal()},this.doFinalHex=function(t){return this.updateHex(t),this.doFinal()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(t){if("string"==typeof t){var e=t;return t.length%2!=1&&t.match(/^[0-9A-Fa-f]+$/)||(e=wn(t)),
void(this.pass=sr.enc.Hex.parse(e))}if("object"!=typeof t)throw"KJUR.crypto.Mac unsupported password type: "+t;var e=null;if(void 0!==t.hex){if(t.hex.length%2!=0||!t.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+t.hex;e=t.hex}if(void 0!==t.utf8&&(e=mn(t.utf8)),void 0!==t.rstr&&(e=wn(t.rstr)),void 0!==t.b64&&(e=i(t.b64)),void 0!==t.b64u&&(e=gn(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=sr.enc.Hex.parse(e)},void 0!==t&&(void 0!==t.pass&&this.setPassword(t.pass),void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=KJUR.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},KJUR.crypto.Signature=function(t){var e=null;if(this._setAlgNames=function(){this.algName.match(/^(.+)with(.+)$/)&&(this.mdAlgName=RegExp.$1.toLowerCase(),this.pubkeyAlgName=RegExp.$2.toLowerCase())},this._zeroPaddingOfSignature=function(t,e){for(var n="",r=e/4-t.length,i=0;r>i;i++)n+="0";return n+t},this.setAlgAndProvider=function(t,e){if(this._setAlgNames(),"cryptojs/jsrsa"!=e)throw"provider not supported: "+e;if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new KJUR.crypto.MessageDigest({alg:this.mdAlgName})}catch(n){throw"setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+n}this.init=function(t,e){var n=null;try{n=void 0===e?Cr.getKey(t):Cr.getKey(t,e)}catch(r){throw"init failed:"+r}if(n.isPrivate===!0)this.prvKey=n,this.state="SIGN";else{if(n.isPublic!==!0)throw"init failed.:"+n;this.pubKey=n,this.state="VERIFY"}},this.initSign=function(t){"string"==typeof t.ecprvhex&&"string"==typeof t.eccurvename?(this.ecprvhex=t.ecprvhex,this.eccurvename=t.eccurvename):this.prvKey=t,this.state="SIGN"},this.initVerifyByPublicKey=function(t){"string"==typeof t.ecpubhex&&"string"==typeof t.eccurvename?(this.ecpubhex=t.ecpubhex,this.eccurvename=t.eccurvename):t instanceof KJUR.crypto.ECDSA?this.pubKey=t:t instanceof ve&&(this.pubKey=t),this.state="VERIFY"},this.initVerifyByCertificatePEM=function(t){var e=new Xn;e.readCertPEM(t),this.pubKey=e.subjectPublicKeyRSA,this.state="VERIFY"},this.updateString=function(t){this.md.updateString(t)},this.updateHex=function(t){this.md.updateHex(t)},this.sign=function(){if(this.sHashHex=this.md.digest(),"undefined"!=typeof this.ecprvhex&&"undefined"!=typeof this.eccurvename){var t=new KJUR.crypto.ECDSA({curve:this.eccurvename});this.hSign=t.signHex(this.sHashHex,this.ecprvhex)}else if(this.prvKey instanceof ve&&"rsaandmgf1"==this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof ve&&"rsa"==this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof KJUR.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof KJUR.crypto.DSA))throw"Signature: unsupported public key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(t){return this.updateString(t),this.sign()},this.signHex=function(t){return this.updateHex(t),this.sign()},this.verify=function(t){if(this.sHashHex=this.md.digest(),"undefined"!=typeof this.ecpubhex&&"undefined"!=typeof this.eccurvename){var e=new KJUR.crypto.ECDSA({curve:this.eccurvename});return e.verifyHex(this.sHashHex,t,this.ecpubhex)}if(this.pubKey instanceof ve&&"rsaandmgf1"==this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,t,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof ve&&"rsa"==this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(this.pubKey instanceof KJUR.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);if(this.pubKey instanceof KJUR.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,t);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(t,e){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.initVerifyByPublicKey=function(t){throw"initVerifyByPublicKey(rsaPubKeyy) not supported for this alg:prov="+this.algProvName},this.initVerifyByCertificatePEM=function(t){throw"initVerifyByCertificatePEM(certPEM) not supported for this alg:prov="+this.algProvName},this.initSign=function(t){throw"initSign(prvKey) not supported for this alg:prov="+this.algProvName},this.updateString=function(t){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(t){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(t){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(t){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=t,void 0!==t&&(void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov?this.provName=KJUR.crypto.Util.DEFAULTPROVIDER[this.algName]:this.provName=t.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==t.psssaltlen&&(this.pssSaltLen=t.psssaltlen),void 0!==t.prvkeypem)){if(void 0!==t.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{var e=new ve;e.readPrivateKeyFromPEMString(t.prvkeypem),this.initSign(e)}catch(n){throw"fatal error to load pem private key: "+n}}},KJUR.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.crypto&&KJUR.crypto||(KJUR.crypto={}),KJUR.crypto.ECDSA=function(t){var e="secp256r1",n=new le;this.type="EC",this.getBigRandom=function(t){return new o(t.bitLength(),n).mod(t.subtract(o.ONE)).add(o.ONE)},this.setNamedCurve=function(t){this.ecparams=KJUR.crypto.ECParameterDB.getByName(t),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=t},this.setPrivateKeyHex=function(t){this.isPrivate=!0,this.prvKeyHex=t},this.setPublicKeyHex=function(t){this.isPublic=!0,this.pubKeyHex=t},this.generateKeyPairHex=function(){var t=this.ecparams.n,e=this.getBigRandom(t),n=this.ecparams.G.multiply(e),r=n.getX().toBigInteger(),i=n.getY().toBigInteger(),s=this.ecparams.keylen/4,o=("0000000000"+e.toString(16)).slice(-s),a=("0000000000"+r.toString(16)).slice(-s),u=("0000000000"+i.toString(16)).slice(-s),c="04"+a+u;return this.setPrivateKeyHex(o),this.setPublicKeyHex(c),{ecprvhex:o,ecpubhex:c}},this.signWithMessageHash=function(t){return this.signHex(t,this.prvKeyHex)},this.signHex=function(t,e){var n=new o(e,16),r=this.ecparams.n,i=new o(t,16);do var s=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(s),c=u.getX().toBigInteger().mod(r);while(c.compareTo(o.ZERO)<=0);var f=s.modInverse(r).multiply(i.add(n.multiply(c))).mod(r);return KJUR.crypto.ECDSA.biRSSigToASN1Sig(c,f)},this.sign=function(t,e){var n=e,r=this.ecparams.n,i=o.fromByteArrayUnsigned(t);do var s=this.getBigRandom(r),a=this.ecparams.G,u=a.multiply(s),c=u.getX().toBigInteger().mod(r);while(c.compareTo(o.ZERO)<=0);var f=s.modInverse(r).multiply(i.add(n.multiply(c))).mod(r);return this.serializeSig(c,f)},this.verifyWithMessageHash=function(t,e){return this.verifyHex(t,e,this.pubKeyHex)},this.verifyHex=function(t,e,n){var r,i,s=KJUR.crypto.ECDSA.parseSigHex(e);r=s.r,i=s.s;var a;a=Ne.decodeFromHex(this.ecparams.curve,n);var u=new o(t,16);return this.verifyRaw(u,r,i,a)},this.verify=function(t,e,n){var r,i;if(Bitcoin.Util.isArray(e)){var s=this.parseSig(e);r=s.r,i=s.s}else{if("object"!=typeof e||!e.r||!e.s)throw"Invalid value for signature";r=e.r,i=e.s}var a;if(n instanceof Ne)a=n;else{if(!Bitcoin.Util.isArray(n))throw"Invalid format for pubkey value, must be byte array or ECPointFp";a=Ne.decodeFrom(this.ecparams.curve,n)}var u=o.fromByteArrayUnsigned(t);return this.verifyRaw(u,r,i,a)},this.verifyRaw=function(t,e,n,r){var i=this.ecparams.n,s=this.ecparams.G;if(e.compareTo(o.ONE)<0||e.compareTo(i)>=0)return!1;if(n.compareTo(o.ONE)<0||n.compareTo(i)>=0)return!1;var a=n.modInverse(i),u=t.multiply(a).mod(i),c=e.multiply(a).mod(i),f=s.multiply(u).add(r.multiply(c)),h=f.getX().toBigInteger().mod(i);return h.equals(e)},this.serializeSig=function(t,e){var n=t.toByteArraySigned(),r=e.toByteArraySigned(),i=[];return i.push(2),i.push(n.length),i=i.concat(n),i.push(2),i.push(r.length),i=i.concat(r),i.unshift(i.length),i.unshift(48),i},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(e=2,2!=t[e])throw new Error("First element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);if(e+=2+t[e+1],2!=t[e])throw new Error("Second element in signature must be a DERInteger");var r=t.slice(e+2,e+2+t[e+1]);e+=2+t[e+1];var i=o.fromByteArrayUnsigned(n),s=o.fromByteArrayUnsigned(r);return{r:i,s:s}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(0>e||e>7)throw"Invalid signature type";var n=this.ecparams.n,r=o.fromByteArrayUnsigned(t.slice(1,33)).mod(n),i=o.fromByteArrayUnsigned(t.slice(33,65)).mod(n);return{r:r,s:i,i:e}},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName=e),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},KJUR.crypto.ECDSA.parseSigHex=function(t){var e=KJUR.crypto.ECDSA.parseSigHexInHexRS(t),n=new o(e.r,16),r=new o(e.s,16);return{r:n,s:r}},KJUR.crypto.ECDSA.parseSigHexInHexRS=function(t){if("30"!=t.substr(0,2))throw"signature is not a ASN.1 sequence";var e=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"number of signature ASN.1 sequence elements seem wrong";var n=e[0],r=e[1];if("02"!=t.substr(n,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=t.substr(r,2))throw"2nd item of sequene of signature is not ASN.1 integer";var i=_r.getHexOfV_AtObj(t,n),s=_r.getHexOfV_AtObj(t,r);return{r:i,s:s}},KJUR.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=KJUR.crypto.ECDSA.parseSigHexInHexRS(t),n=e.r,r=e.s;if("00"==n.substr(0,2)&&n.length/2*8%128==8&&(n=n.substr(2)),"00"==r.substr(0,2)&&r.length/2*8%128==8&&(r=r.substr(2)),n.length/2*8%128!=0)throw"unknown ECDSA sig r length error";if(r.length/2*8%128!=0)throw"unknown ECDSA sig s length error";return n+r},KJUR.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var e=t.substr(0,t.length/2),n=t.substr(t.length/2);return KJUR.crypto.ECDSA.hexRSSigToASN1Sig(e,n)},KJUR.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var n=new o(t,16),r=new o(e,16);return KJUR.crypto.ECDSA.biRSSigToASN1Sig(n,r)},KJUR.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var n=new KJUR.asn1.DERInteger({bigint:t}),r=new KJUR.asn1.DERInteger({bigint:e}),i=new KJUR.asn1.DERSequence({array:[n,r]});return i.getEncodedHex()},"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.crypto&&KJUR.crypto||(KJUR.crypto={}),KJUR.crypto.ECParameterDB=new function(){function t(t){return new o(t,16)}var e={},n={};this.getByName=function(t){var r=t;if("undefined"!=typeof n[r]&&(r=n[t]),"undefined"!=typeof e[r])return e[r];throw"unregistered EC curve name: "+r},this.regist=function(r,i,s,o,a,u,c,f,h,l,d,p){e[r]={};var g=t(s),y=t(o),v=t(a),m=t(u),S=t(c),b=new Xe(g,y,v),w=b.decodePointHex("04"+f+h);e[r].name=r,e[r].keylen=i,e[r].curve=b,e[r].G=w,e[r].n=m,e[r].h=S,e[r].oid=d,e[r].info=p;for(var E=0;E11&&10!=e&&8>e?2:e;case 28:return e>11&&8>e?11:e;case 32:return e>10&&8>e?8:e;default:return util.print_debug("DSA select hash algorithm: returning null for an unknown length of q"),null}}function n(t,e,n,r,i,s,a,u){var c=KJUR.crypto.Util.hashString(r,t.toLowerCase()),c=c.substr(0,s.bitLength()/4),f=new o(c,16);if(o.ZERO.compareTo(e)>0||e.compareTo(s)>0||o.ZERO.compareTo(n)>0||n.compareTo(s)>0)return util.print_error("invalid DSA Signature"),null;var h=n.modInverse(s),l=f.multiply(h).mod(s),d=e.multiply(h).mod(s),p=a.modPow(l,i).multiply(u.modPow(d,i)).mod(i).mod(s);return 0==p.compareTo(e)}function r(t,e){if(!(e.compareTo(t)<=0)){for(var n=e.subtract(t),r=i(n.bitLength());r>n;)r=i(n.bitLength());return t.add(r)}}function i(t){if(0>t)return null;var e=Math.floor((t+7)/8),n=s(e);return t%8>0&&(n=String.fromCharCode(Math.pow(2,t%8)-1&n.charCodeAt(0))+n.substring(1)),new o(u(n),16)}function s(t){for(var e="",n=0;t>n;n++)e+=String.fromCharCode(a());return e}function a(){var t=new Uint32Array(1);return rr.crypto.getRandomValues(t),255&t[0]}function u(t){if(null==t)return"";for(var e,n=[],r=t.length,i=0;r>i;){for(e=t[i++].charCodeAt().toString(16);e.length<2;)e="0"+e;n.push(""+e)}return n.join("")}this.p=null,this.q=null,this.g=null,this.y=null,this.x=null,this.type="DSA",this.setPrivate=function(t,e,n,r,i){this.isPrivate=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=i},this.setPublic=function(t,e,n,r){this.isPublic=!0,this.p=t,this.q=e,this.g=n,this.y=r,this.x=null},this.signWithMessageHash=function(t){var e=this.p,n=this.q,i=this.g,s=(this.y,this.x),a=(t.substr(0,n.bitLength()/4),new o(t,16)),u=r(o.ONE.add(o.ONE),n.subtract(o.ONE)),c=i.modPow(u,e).mod(n),f=u.modInverse(n).multiply(a.add(s.multiply(c))).mod(n),h=KJUR.asn1.ASN1Util.jsonToASN1HEX({seq:[{"int":{bigint:c}},{"int":{bigint:f}}]});return h},this.verifyWithMessageHash=function(t,e){var n=this.p,r=this.q,i=this.g,s=this.y,a=this.parseASN1Signature(e),u=a[0],c=a[1],t=t.substr(0,r.bitLength()/4),f=new o(t,16);if(o.ZERO.compareTo(u)>0||u.compareTo(r)>0||o.ZERO.compareTo(c)>0||c.compareTo(r)>0)throw"invalid DSA signature";var h=c.modInverse(r),l=f.multiply(h).mod(r),d=u.multiply(h).mod(r),p=i.modPow(l,n).multiply(s.modPow(d,n)).mod(n).mod(r);return 0==p.compareTo(u)},this.parseASN1Signature=function(t){try{var e=new o(_r.getVbyList(t,0,[0],"02"),16),n=new o(_r.getVbyList(t,0,[1],"02"),16);return[e,n]}catch(r){throw"malformed DSA signature"}},this.select_hash_algorithm=e,this.sign=t,this.verify=n,this.getRandomBigIntegerInRange=r,this.getRandomBigInteger=i,this.getRandomBytes=s};var Or=function(){var t=function(t,e,r){return n(sr.AES,t,e,r)},e=function(t,e,r){return n(sr.TripleDES,t,e,r)},n=function(t,e,n,r){var i=sr.enc.Hex.parse(e),s=sr.enc.Hex.parse(n),o=sr.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=i;var u=t.decrypt(a,s,{iv:o});return sr.enc.Hex.stringify(u)},r=function(t,e,n){return o(sr.AES,t,e,n)},s=function(t,e,n){return o(sr.TripleDES,t,e,n)},o=function(t,e,n,r){var i=sr.enc.Hex.parse(e),s=sr.enc.Hex.parse(n),o=sr.enc.Hex.parse(r),a=t.encrypt(i,s,{iv:o}),u=sr.enc.Hex.parse(a.toString()),c=sr.enc.Base64.stringify(u);return c},a={"AES-256-CBC":{proc:t,eproc:r,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:r,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:r,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:s,keylen:24,ivlen:8}},u=function(t){return a[t].proc},c=function(t){var e=sr.lib.WordArray.random(t),n=sr.enc.Hex.stringify(e);return n},f=function(t){var e={};t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"))&&(e.cipher=RegExp.$1,e.ivsalt=RegExp.$2),t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"))&&(e.type=RegExp.$1);var n=-1,r=0;-1!=t.indexOf("\r\n\r\n")&&(n=t.indexOf("\r\n\r\n"),r=2),-1!=t.indexOf("\n\n")&&(n=t.indexOf("\n\n"),r=1);var i=t.indexOf("-----END");if(-1!=n&&-1!=i){var s=t.substring(n+2*r,i-r);s=s.replace(/\s+/g,""),e.data=s}return e},h=function(t,e,n){for(var r=n.substring(0,16),i=sr.enc.Hex.parse(r),s=sr.enc.Utf8.parse(e),o=a[t].keylen+a[t].ivlen,u="",c=null;;){var f=sr.algo.MD5.create();if(null!=c&&f.update(c),f.update(s),f.update(i),c=f.finalize(),u+=sr.enc.Hex.stringify(c),u.length>=2*o)break}var h={};return h.keyhex=u.substr(0,2*a[t].keylen),h.ivhex=u.substr(2*a[t].keylen,2*a[t].ivlen),h},l=function(t,e,n,r){var i=sr.enc.Base64.parse(t),s=sr.enc.Hex.stringify(i),o=a[e].proc,u=o(s,n,r);return u},d=function(t,e,n,r){var i=a[e].eproc,s=i(t,n,r);return s};return{version:"1.0.5",getHexFromPEM:function(t,e){var n=t;if(-1==n.indexOf("BEGIN "+e))throw"can't find PEM header: "+e;n=n.replace("-----BEGIN "+e+"-----",""),n=n.replace("-----END "+e+"-----","");var r=n.replace(/\s+/g,""),s=i(r);return s},getDecryptedKeyHexByKeyIV:function(t,e,n,r){var i=u(e);return i(t,n,r)},parsePKCS5PEM:function(t){return f(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,n){return h(t,e,n)},decryptKeyB64:function(t,e,n,r){return l(t,e,n,r)},getDecryptedKeyHex:function(t,e){var n=f(t),r=(n.type,n.cipher),i=n.ivsalt,s=n.data,o=h(r,e,i),a=o.keyhex,u=l(s,r,a,i);return u},getRSAKeyFromEncryptedPKCS5PEM:function(t,e){var n=this.getDecryptedKeyHex(t,e),r=new ve;return r.readPrivateKeyFromASN1HexString(n),r},getEryptedPKCS5PEMFromPrvKeyHex:function(t,e,n,r){var i="";if("undefined"!=typeof n&&null!=n||(n="AES-256-CBC"),"undefined"==typeof a[n])throw"PKCS5PKEY unsupported algorithm: "+n;if("undefined"==typeof r||null==r){var s=a[n].ivlen,o=c(s);r=o.toUpperCase()}var u=h(n,e,r),f=u.keyhex,l=d(t,n,f,r),p=l.replace(/(.{64})/g,"$1\r\n"),i="-----BEGIN RSA PRIVATE KEY-----\r\n";return i+="Proc-Type: 4,ENCRYPTED\r\n",i+="DEK-Info: "+n+","+r+"\r\n",i+="\r\n",i+=p,i+="\r\n-----END RSA PRIVATE KEY-----\r\n"},getEryptedPKCS5PEMFromRSAKey:function(t,e,n,r){var i=new KJUR.asn1.DERInteger({"int":0}),s=new KJUR.asn1.DERInteger({bigint:t.n}),o=new KJUR.asn1.DERInteger({"int":t.e}),a=new KJUR.asn1.DERInteger({bigint:t.d}),u=new KJUR.asn1.DERInteger({bigint:t.p}),c=new KJUR.asn1.DERInteger({bigint:t.q}),f=new KJUR.asn1.DERInteger({bigint:t.dmp1}),h=new KJUR.asn1.DERInteger({bigint:t.dmq1}),l=new KJUR.asn1.DERInteger({bigint:t.coeff}),d=new KJUR.asn1.DERSequence({array:[i,s,o,a,u,c,f,h,l]}),p=d.getEncodedHex();return this.getEryptedPKCS5PEMFromPrvKeyHex(p,e,n,r)},newEncryptedPKCS5PEM:function(t,e,n,r){"undefined"!=typeof e&&null!=e||(e=1024),"undefined"!=typeof n&&null!=n||(n="10001");var i=new ve;i.generate(e,n);var s=null;return s="undefined"==typeof r||null==r?this.getEncryptedPKCS5PEMFromRSAKey(pkey,t):this.getEncryptedPKCS5PEMFromRSAKey(pkey,t,r)},getRSAKeyFromPlainPKCS8PEM:function(t){if(t.match(/ENCRYPTED/))throw"pem shall be not ENCRYPTED";var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getRSAKeyFromPlainPKCS8Hex(e);return n},getRSAKeyFromPlainPKCS8Hex:function(t){var e=_r.getPosArrayOfChildren_AtObj(t,0);if(3!=e.length)throw"outer DERSequence shall have 3 elements: "+e.length;var n=_r.getHexOfTLV_AtObj(t,e[1]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmIdentifier is not rsaEnc: "+n;var n=_r.getHexOfTLV_AtObj(t,e[1]),r=_r.getHexOfTLV_AtObj(t,e[2]),i=_r.getHexOfV_AtObj(r,0),s=new ve;return s.readPrivateKeyFromASN1HexString(i),s},parseHexOfEncryptedPKCS8:function(t){var e={},n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed format: SEQUENCE(0).items != 2: "+n.length;e.ciphertext=_r.getHexOfV_AtObj(t,n[1]);var r=_r.getPosArrayOfChildren_AtObj(t,n[0]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+r.length;if("2a864886f70d01050d"!=_r.getHexOfV_AtObj(t,r[0]))throw"this only supports pkcs5PBES2";var i=_r.getPosArrayOfChildren_AtObj(t,r[1]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+i.length;var s=_r.getPosArrayOfChildren_AtObj(t,i[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length;if("2a864886f70d0307"!=_r.getHexOfV_AtObj(t,s[0]))throw"this only supports TripleDES";e.encryptionSchemeAlg="TripleDES",e.encryptionSchemeIV=_r.getHexOfV_AtObj(t,s[1]);var o=_r.getPosArrayOfChildren_AtObj(t,i[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+o.length;if("2a864886f70d01050c"!=_r.getHexOfV_AtObj(t,o[0]))throw"this only supports pkcs5PBKDF2";var a=_r.getPosArrayOfChildren_AtObj(t,o[1]);if(a.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+a.length;e.pbkdf2Salt=_r.getHexOfV_AtObj(t,a[0]);var u=_r.getHexOfV_AtObj(t,a[1]);try{e.pbkdf2Iter=parseInt(u,16)}catch(c){throw"malformed format pbkdf2Iter: "+u}return e},getPBKDF2KeyHexFromParam:function(t,e){var n=sr.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,i=sr.PBKDF2(e,n,{keySize:6,iterations:r}),s=sr.enc.Hex.stringify(i);return s},getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var n=this.getHexFromPEM(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Or.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=sr.enc.Hex.parse(r.ciphertext);var o=sr.enc.Hex.parse(i),a=sr.enc.Hex.parse(r.encryptionSchemeIV),u=sr.TripleDES.decrypt(s,o,{iv:a}),c=sr.enc.Hex.stringify(u);return c},getRSAKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getRSAKeyFromPlainPKCS8Hex(n);return r},getKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getKeyFromPlainPrivatePKCS8Hex(n);return r},parsePlainPrivatePKCS8Hex:function(t){var e={};if(e.algparam=null,"30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var n=_r.getPosArrayOfChildren_AtObj(t,0);if(3!=n.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(n[1],2))throw"malformed PKCS8 private key(code:003)";var r=_r.getPosArrayOfChildren_AtObj(t,n[1]);if(2!=r.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(r[0],2))throw"malformed PKCS8 private key(code:005)";if(e.algoid=_r.getHexOfV_AtObj(t,r[0]),"06"==t.substr(r[1],2)&&(e.algparam=_r.getHexOfV_AtObj(t,r[1])),"04"!=t.substr(n[2],2))throw"malformed PKCS8 private key(code:006)";return e.keyidx=_r.getStartPosOfV_AtObj(t,n[2]),e},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getKeyFromPlainPrivatePKCS8Hex(e);return n},getKeyFromPlainPrivatePKCS8Hex:function(t){var e=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==e.algoid){this.parsePrivateRawRSAKeyHexAtObj(t,e);var n=e.key,r=new ve;return r.setPrivateEx(n.n,n.e,n.d,n.p,n.q,n.dp,n.dq,n.co),r}if("2a8648ce3d0201"==e.algoid){if(this.parsePrivateRawECKeyHexAtObj(t,e),void 0===KJUR.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=KJUR.crypto.OID.oidhex2name[e.algparam],r=new KJUR.crypto.ECDSA({curve:i,prv:e.key});return r}throw"unsupported private key algorithm"},getRSAKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getRSAKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8Hex:function(t){var e=this.parsePublicPKCS8Hex(t);if("2a864886f70d010101"==e.algoid){var n=this.parsePublicRawRSAKeyHex(e.key),r=new ve;return r.setPublic(n.n,n.e),r}if("2a8648ce3d0201"==e.algoid){if(void 0===KJUR.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=KJUR.crypto.OID.oidhex2name[e.algparam],r=new KJUR.crypto.ECDSA({curve:i,pub:e.key});return r}throw"unsupported public key algorithm"},parsePublicRawRSAKeyHex:function(t){var e={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(n[0],2))throw"malformed RSA key(code:003)";if(e.n=_r.getHexOfV_AtObj(t,n[0]),"02"!=t.substr(n[1],2))throw"malformed RSA key(code:004)";return e.e=_r.getHexOfV_AtObj(t,n[1]),e},parsePrivateRawRSAKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed RSA private key(code:001)";var r=_r.getPosArrayOfChildren_AtObj(t,n);if(9!=r.length)throw"malformed RSA private key(code:002)";e.key={},e.key.n=_r.getHexOfV_AtObj(t,r[1]),e.key.e=_r.getHexOfV_AtObj(t,r[2]),e.key.d=_r.getHexOfV_AtObj(t,r[3]),e.key.p=_r.getHexOfV_AtObj(t,r[4]),e.key.q=_r.getHexOfV_AtObj(t,r[5]),e.key.dp=_r.getHexOfV_AtObj(t,r[6]),e.key.dq=_r.getHexOfV_AtObj(t,r[7]),e.key.co=_r.getHexOfV_AtObj(t,r[8])},parsePrivateRawECKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed ECC private key(code:001)";var r=_r.getPosArrayOfChildren_AtObj(t,n);if(3!=r.length)throw"malformed ECC private key(code:002)";if("04"!=t.substr(r[1],2))throw"malformed ECC private key(code:003)";e.key=_r.getHexOfV_AtObj(t,r[1])},parsePublicPKCS8Hex:function(t){var e={};e.algparam=null;var n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"outer DERSequence shall have 2 elements: "+n.length;var r=n[0];if("30"!=t.substr(r,2))throw"malformed PKCS8 public key(code:001)";var i=_r.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(i[0],2))throw"malformed PKCS8 public key(code:003)";if(e.algoid=_r.getHexOfV_AtObj(t,i[0]),"06"==t.substr(i[1],2)&&(e.algparam=_r.getHexOfV_AtObj(t,i[1])),"03"!=t.substr(n[1],2))throw"malformed PKCS8 public key(code:004)";return e.key=_r.getHexOfV_AtObj(t,n[1]).substr(2),e},getRSAKeyFromPublicPKCS8Hex:function(t){var e=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"outer DERSequence shall have 2 elements: "+e.length;var n=_r.getHexOfTLV_AtObj(t,e[0]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmId is not rsaEncryption";if("03"!=t.substr(e[1],2))throw"PKCS8 Public Key is not BITSTRING encapslated.";var r=_r.getStartPosOfV_AtObj(t,e[1])+2;if("30"!=t.substr(r,2))throw"PKCS8 Public Key is not SEQUENCE.";var i=_r.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"inner DERSequence shall have 2 elements: "+i.length;if("02"!=t.substr(i[0],2))throw"N is not ASN.1 INTEGER";if("02"!=t.substr(i[1],2))throw"E is not ASN.1 INTEGER";var s=_r.getHexOfV_AtObj(t,i[0]),o=_r.getHexOfV_AtObj(t,i[1]),a=new ve;return a.setPublic(s,o),a}}}(),Cr=function(){var t=function(t,e,n){return r(sr.AES,t,e,n)},e=function(t,e,n){return r(sr.TripleDES,t,e,n)},n=function(t,e,n){return r(sr.DES,t,e,n)},r=function(t,e,n,r){var i=sr.enc.Hex.parse(e),s=sr.enc.Hex.parse(n),o=sr.enc.Hex.parse(r),a={};a.key=s,a.iv=o,a.ciphertext=i;var u=t.decrypt(a,s,{iv:o});return sr.enc.Hex.stringify(u)},s=function(t,e,n){return c(sr.AES,t,e,n)},a=function(t,e,n){return c(sr.TripleDES,t,e,n)},u=function(t,e,n){return c(sr.DES,t,e,n)},c=function(t,e,n,r){var i=sr.enc.Hex.parse(e),s=sr.enc.Hex.parse(n),o=sr.enc.Hex.parse(r),a=t.encrypt(i,s,{iv:o}),u=sr.enc.Hex.parse(a.toString()),c=sr.enc.Base64.stringify(u);return c},f={"AES-256-CBC":{proc:t,eproc:s,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:s,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:s,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:e,eproc:a,keylen:24,ivlen:8},"DES-CBC":{proc:n,eproc:u,keylen:8,ivlen:8}},h=function(t){return f[t].proc},l=function(t){var e=sr.lib.WordArray.random(t),n=sr.enc.Hex.stringify(e);
return n},d=function(t){var e={};t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"))&&(e.cipher=RegExp.$1,e.ivsalt=RegExp.$2),t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"))&&(e.type=RegExp.$1);var n=-1,r=0;-1!=t.indexOf("\r\n\r\n")&&(n=t.indexOf("\r\n\r\n"),r=2),-1!=t.indexOf("\n\n")&&(n=t.indexOf("\n\n"),r=1);var i=t.indexOf("-----END");if(-1!=n&&-1!=i){var s=t.substring(n+2*r,i-r);s=s.replace(/\s+/g,""),e.data=s}return e},p=function(t,e,n){for(var r=n.substring(0,16),i=sr.enc.Hex.parse(r),s=sr.enc.Utf8.parse(e),o=f[t].keylen+f[t].ivlen,a="",u=null;;){var c=sr.algo.MD5.create();if(null!=u&&c.update(u),c.update(s),c.update(i),u=c.finalize(),a+=sr.enc.Hex.stringify(u),a.length>=2*o)break}var h={};return h.keyhex=a.substr(0,2*f[t].keylen),h.ivhex=a.substr(2*f[t].keylen,2*f[t].ivlen),h},g=function(t,e,n,r){var i=sr.enc.Base64.parse(t),s=sr.enc.Hex.stringify(i),o=f[e].proc,a=o(s,n,r);return a},y=function(t,e,n,r){var i=f[e].eproc,s=i(t,n,r);return s};return{version:"1.0.0",getHexFromPEM:function(t,e){var n=t;if(-1==n.indexOf("-----BEGIN "))throw"can't find PEM header: "+e;"string"==typeof e&&""!=e?(n=n.replace("-----BEGIN "+e+"-----",""),n=n.replace("-----END "+e+"-----","")):(n=n.replace(/-----BEGIN [^-]+-----/,""),n=n.replace(/-----END [^-]+-----/,""));var r=n.replace(/\s+/g,""),s=i(r);return s},getDecryptedKeyHexByKeyIV:function(t,e,n,r){var i=h(e);return i(t,n,r)},parsePKCS5PEM:function(t){return d(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,n){return p(t,e,n)},decryptKeyB64:function(t,e,n,r){return g(t,e,n,r)},getDecryptedKeyHex:function(t,e){var n=d(t),r=(n.type,n.cipher),i=n.ivsalt,s=n.data,o=p(r,e,i),a=o.keyhex,u=g(s,r,a,i);return u},getRSAKeyFromEncryptedPKCS5PEM:function(t,e){var n=this.getDecryptedKeyHex(t,e),r=new ve;return r.readPrivateKeyFromASN1HexString(n),r},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,n,r,i){var s="";if("undefined"!=typeof r&&null!=r||(r="AES-256-CBC"),"undefined"==typeof f[r])throw"KEYUTIL unsupported algorithm: "+r;if("undefined"==typeof i||null==i){var o=f[r].ivlen,a=l(o);i=a.toUpperCase()}var u=p(r,n,i),c=u.keyhex,h=y(e,r,c,i),d=h.replace(/(.{64})/g,"$1\r\n"),s="-----BEGIN "+t+" PRIVATE KEY-----\r\n";return s+="Proc-Type: 4,ENCRYPTED\r\n",s+="DEK-Info: "+r+","+i+"\r\n",s+="\r\n",s+=d,s+="\r\n-----END "+t+" PRIVATE KEY-----\r\n"},getEncryptedPKCS5PEMFromRSAKey:function(t,e,n,r){var i=new KJUR.asn1.DERInteger({"int":0}),s=new KJUR.asn1.DERInteger({bigint:t.n}),o=new KJUR.asn1.DERInteger({"int":t.e}),a=new KJUR.asn1.DERInteger({bigint:t.d}),u=new KJUR.asn1.DERInteger({bigint:t.p}),c=new KJUR.asn1.DERInteger({bigint:t.q}),f=new KJUR.asn1.DERInteger({bigint:t.dmp1}),h=new KJUR.asn1.DERInteger({bigint:t.dmq1}),l=new KJUR.asn1.DERInteger({bigint:t.coeff}),d=new KJUR.asn1.DERSequence({array:[i,s,o,a,u,c,f,h,l]}),p=d.getEncodedHex();return this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",p,e,n,r)},newEncryptedPKCS5PEM:function(t,e,n,r){"undefined"!=typeof e&&null!=e||(e=1024),"undefined"!=typeof n&&null!=n||(n="10001");var i=new ve;i.generate(e,n);var s=null;return s="undefined"==typeof r||null==r?this.getEncryptedPKCS5PEMFromRSAKey(i,t):this.getEncryptedPKCS5PEMFromRSAKey(i,t,r)},getRSAKeyFromPlainPKCS8PEM:function(t){if(t.match(/ENCRYPTED/))throw"pem shall be not ENCRYPTED";var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getRSAKeyFromPlainPKCS8Hex(e);return n},getRSAKeyFromPlainPKCS8Hex:function(t){var e=_r.getPosArrayOfChildren_AtObj(t,0);if(3!=e.length)throw"outer DERSequence shall have 3 elements: "+e.length;var n=_r.getHexOfTLV_AtObj(t,e[1]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmIdentifier is not rsaEnc: "+n;var n=_r.getHexOfTLV_AtObj(t,e[1]),r=_r.getHexOfTLV_AtObj(t,e[2]),i=_r.getHexOfV_AtObj(r,0),s=new ve;return s.readPrivateKeyFromASN1HexString(i),s},parseHexOfEncryptedPKCS8:function(t){var e={},n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed format: SEQUENCE(0).items != 2: "+n.length;e.ciphertext=_r.getHexOfV_AtObj(t,n[1]);var r=_r.getPosArrayOfChildren_AtObj(t,n[0]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+r.length;if("2a864886f70d01050d"!=_r.getHexOfV_AtObj(t,r[0]))throw"this only supports pkcs5PBES2";var i=_r.getPosArrayOfChildren_AtObj(t,r[1]);if(2!=r.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+i.length;var s=_r.getPosArrayOfChildren_AtObj(t,i[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+s.length;if("2a864886f70d0307"!=_r.getHexOfV_AtObj(t,s[0]))throw"this only supports TripleDES";e.encryptionSchemeAlg="TripleDES",e.encryptionSchemeIV=_r.getHexOfV_AtObj(t,s[1]);var o=_r.getPosArrayOfChildren_AtObj(t,i[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+o.length;if("2a864886f70d01050c"!=_r.getHexOfV_AtObj(t,o[0]))throw"this only supports pkcs5PBKDF2";var a=_r.getPosArrayOfChildren_AtObj(t,o[1]);if(a.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+a.length;e.pbkdf2Salt=_r.getHexOfV_AtObj(t,a[0]);var u=_r.getHexOfV_AtObj(t,a[1]);try{e.pbkdf2Iter=parseInt(u,16)}catch(c){throw"malformed format pbkdf2Iter: "+u}return e},getPBKDF2KeyHexFromParam:function(t,e){var n=sr.enc.Hex.parse(t.pbkdf2Salt),r=t.pbkdf2Iter,i=sr.PBKDF2(e,n,{keySize:6,iterations:r}),s=sr.enc.Hex.stringify(i);return s},getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var n=this.getHexFromPEM(t,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Cr.getPBKDF2KeyHexFromParam(r,e),s={};s.ciphertext=sr.enc.Hex.parse(r.ciphertext);var o=sr.enc.Hex.parse(i),a=sr.enc.Hex.parse(r.encryptionSchemeIV),u=sr.TripleDES.decrypt(s,o,{iv:a}),c=sr.enc.Hex.stringify(u);return c},getRSAKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getRSAKeyFromPlainPKCS8Hex(n);return r},getKeyFromEncryptedPKCS8PEM:function(t,e){var n=this.getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e),r=this.getKeyFromPlainPrivatePKCS8Hex(n);return r},parsePlainPrivatePKCS8Hex:function(t){var e={};if(e.algparam=null,"30"!=t.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var n=_r.getPosArrayOfChildren_AtObj(t,0);if(3!=n.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=t.substr(n[1],2))throw"malformed PKCS8 private key(code:003)";var r=_r.getPosArrayOfChildren_AtObj(t,n[1]);if(2!=r.length)throw"malformed PKCS8 private key(code:004)";if("06"!=t.substr(r[0],2))throw"malformed PKCS8 private key(code:005)";if(e.algoid=_r.getHexOfV_AtObj(t,r[0]),"06"==t.substr(r[1],2)&&(e.algparam=_r.getHexOfV_AtObj(t,r[1])),"04"!=t.substr(n[2],2))throw"malformed PKCS8 private key(code:006)";return e.keyidx=_r.getStartPosOfV_AtObj(t,n[2]),e},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PRIVATE KEY"),n=this.getKeyFromPlainPrivatePKCS8Hex(e);return n},getKeyFromPlainPrivatePKCS8Hex:function(t){var e=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==e.algoid){this.parsePrivateRawRSAKeyHexAtObj(t,e);var n=e.key,r=new ve;return r.setPrivateEx(n.n,n.e,n.d,n.p,n.q,n.dp,n.dq,n.co),r}if("2a8648ce3d0201"==e.algoid){if(this.parsePrivateRawECKeyHexAtObj(t,e),void 0===KJUR.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=KJUR.crypto.OID.oidhex2name[e.algparam],r=new KJUR.crypto.ECDSA({curve:i});return r.setPublicKeyHex(e.pubkey),r.setPrivateKeyHex(e.key),r.isPublic=!1,r}if("2a8648ce380401"==e.algoid){var s=_r.getVbyList(t,0,[1,1,0],"02"),a=_r.getVbyList(t,0,[1,1,1],"02"),u=_r.getVbyList(t,0,[1,1,2],"02"),c=_r.getVbyList(t,0,[2,0],"02"),f=new o(s,16),h=new o(a,16),l=new o(u,16),d=new o(c,16),r=new KJUR.crypto.DSA;return r.setPrivate(f,h,l,null,d),r}throw"unsupported private key algorithm"},getRSAKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getRSAKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8PEM:function(t){var e=this.getHexFromPEM(t,"PUBLIC KEY"),n=this.getKeyFromPublicPKCS8Hex(e);return n},getKeyFromPublicPKCS8Hex:function(t){var e=this.parsePublicPKCS8Hex(t);if("2a864886f70d010101"==e.algoid){var n=this.parsePublicRawRSAKeyHex(e.key),r=new ve;return r.setPublic(n.n,n.e),r}if("2a8648ce3d0201"==e.algoid){if(void 0===KJUR.crypto.OID.oidhex2name[e.algparam])throw"KJUR.crypto.OID.oidhex2name undefined: "+e.algparam;var i=KJUR.crypto.OID.oidhex2name[e.algparam],r=new KJUR.crypto.ECDSA({curve:i,pub:e.key});return r}if("2a8648ce380401"==e.algoid){var s=e.algparam,a=_r.getHexOfV_AtObj(e.key,0),r=new KJUR.crypto.DSA;return r.setPublic(new o(s.p,16),new o(s.q,16),new o(s.g,16),new o(a,16)),r}throw"unsupported public key algorithm"},parsePublicRawRSAKeyHex:function(t){var e={};if("30"!=t.substr(0,2))throw"malformed RSA key(code:001)";var n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"malformed RSA key(code:002)";if("02"!=t.substr(n[0],2))throw"malformed RSA key(code:003)";if(e.n=_r.getHexOfV_AtObj(t,n[0]),"02"!=t.substr(n[1],2))throw"malformed RSA key(code:004)";return e.e=_r.getHexOfV_AtObj(t,n[1]),e},parsePrivateRawRSAKeyHexAtObj:function(t,e){var n=e.keyidx;if("30"!=t.substr(n,2))throw"malformed RSA private key(code:001)";var r=_r.getPosArrayOfChildren_AtObj(t,n);if(9!=r.length)throw"malformed RSA private key(code:002)";e.key={},e.key.n=_r.getHexOfV_AtObj(t,r[1]),e.key.e=_r.getHexOfV_AtObj(t,r[2]),e.key.d=_r.getHexOfV_AtObj(t,r[3]),e.key.p=_r.getHexOfV_AtObj(t,r[4]),e.key.q=_r.getHexOfV_AtObj(t,r[5]),e.key.dp=_r.getHexOfV_AtObj(t,r[6]),e.key.dq=_r.getHexOfV_AtObj(t,r[7]),e.key.co=_r.getHexOfV_AtObj(t,r[8])},parsePrivateRawECKeyHexAtObj:function(t,e){var n=e.keyidx,r=_r.getVbyList(t,n,[1],"04"),i=_r.getVbyList(t,n,[2,0],"03").substr(2);e.key=r,e.pubkey=i},parsePublicPKCS8Hex:function(t){var e={};e.algparam=null;var n=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=n.length)throw"outer DERSequence shall have 2 elements: "+n.length;var r=n[0];if("30"!=t.substr(r,2))throw"malformed PKCS8 public key(code:001)";var i=_r.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"malformed PKCS8 public key(code:002)";if("06"!=t.substr(i[0],2))throw"malformed PKCS8 public key(code:003)";if(e.algoid=_r.getHexOfV_AtObj(t,i[0]),"06"==t.substr(i[1],2)?e.algparam=_r.getHexOfV_AtObj(t,i[1]):"30"==t.substr(i[1],2)&&(e.algparam={},e.algparam.p=_r.getVbyList(t,i[1],[0],"02"),e.algparam.q=_r.getVbyList(t,i[1],[1],"02"),e.algparam.g=_r.getVbyList(t,i[1],[2],"02")),"03"!=t.substr(n[1],2))throw"malformed PKCS8 public key(code:004)";return e.key=_r.getHexOfV_AtObj(t,n[1]).substr(2),e},getRSAKeyFromPublicPKCS8Hex:function(t){var e=_r.getPosArrayOfChildren_AtObj(t,0);if(2!=e.length)throw"outer DERSequence shall have 2 elements: "+e.length;var n=_r.getHexOfTLV_AtObj(t,e[0]);if("300d06092a864886f70d0101010500"!=n)throw"PKCS8 AlgorithmId is not rsaEncryption";if("03"!=t.substr(e[1],2))throw"PKCS8 Public Key is not BITSTRING encapslated.";var r=_r.getStartPosOfV_AtObj(t,e[1])+2;if("30"!=t.substr(r,2))throw"PKCS8 Public Key is not SEQUENCE.";var i=_r.getPosArrayOfChildren_AtObj(t,r);if(2!=i.length)throw"inner DERSequence shall have 2 elements: "+i.length;if("02"!=t.substr(i[0],2))throw"N is not ASN.1 INTEGER";if("02"!=t.substr(i[1],2))throw"E is not ASN.1 INTEGER";var s=_r.getHexOfV_AtObj(t,i[0]),o=_r.getHexOfV_AtObj(t,i[1]),a=new ve;return a.setPublic(s,o),a}}}();Cr.getKey=function(t,e,n){if("undefined"!=typeof ve&&t instanceof ve)return t;if("undefined"!=typeof KJUR.crypto.ECDSA&&t instanceof KJUR.crypto.ECDSA)return t;if("undefined"!=typeof KJUR.crypto.DSA&&t instanceof KJUR.crypto.DSA)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new KJUR.crypto.ECDSA({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new KJUR.crypto.ECDSA({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var r=new ve;return r.setPublic(t.n,t.e),r}if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.co&&void 0===t.qi){var r=new ve;return r.setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),r}if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p){var r=new ve;return r.setPrivate(t.n,t.e,t.d),r}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x){var r=new KJUR.crypto.DSA;return r.setPublic(t.p,t.q,t.g,t.y),r}if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x){var r=new KJUR.crypto.DSA;return r.setPrivate(t.p,t.q,t.g,t.y,t.x),r}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d){var r=new ve;return r.setPublic(gn(t.n),gn(t.e)),r}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0!==t.p&&void 0!==t.q&&void 0!==t.dp&&void 0!==t.dq&&void 0!==t.qi){var r=new ve;return r.setPrivateEx(gn(t.n),gn(t.e),gn(t.d),gn(t.p),gn(t.q),gn(t.dp),gn(t.dq),gn(t.qi)),r}if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d){var r=new ve;return r.setPrivate(gn(t.n),gn(t.e),gn(t.d)),r}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var i=new KJUR.crypto.ECDSA({curve:t.crv}),s=i.ecparams.keylen/4,a=("0000000000"+gn(t.x)).slice(-s),u=("0000000000"+gn(t.y)).slice(-s),c="04"+a+u;return i.setPublicKeyHex(c),i}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){var i=new KJUR.crypto.ECDSA({curve:t.crv}),s=i.ecparams.keylen/4,f=("0000000000"+gn(t.d)).slice(-s);return i.setPrivateKeyHex(f),i}if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Xn.getPublicKeyFromCertPEM(t);if("pkcs8pub"===n)return Cr.getKeyFromPublicPKCS8Hex(t);if(-1!=t.indexOf("-END PUBLIC KEY-"))return Cr.getKeyFromPublicPKCS8PEM(t);if("pkcs5prv"===n){var r=new ve;return r.readPrivateKeyFromASN1HexString(t),r}if("pkcs5prv"===n){var r=new ve;return r.readPrivateKeyFromASN1HexString(t),r}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var h=Cr.getHexFromPEM(t,"RSA PRIVATE KEY");return Cr.getKey(h,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var l=this.getHexFromPEM(t,"DSA PRIVATE KEY"),d=_r.getVbyList(l,0,[1],"02"),p=_r.getVbyList(l,0,[2],"02"),g=_r.getVbyList(l,0,[3],"02"),y=_r.getVbyList(l,0,[4],"02"),v=_r.getVbyList(l,0,[5],"02"),r=new KJUR.crypto.DSA;return r.setPrivate(new o(d,16),new o(p,16),new o(g,16),new o(y,16),new o(v,16)),r}if(-1!=t.indexOf("-END PRIVATE KEY-"))return Cr.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return Cr.getRSAKeyFromEncryptedPKCS5PEM(t,e);if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var l=Cr.getDecryptedKeyHex(t,e),r=_r.getVbyList(l,0,[1],"04"),m=_r.getVbyList(l,0,[2,0],"06"),S=_r.getVbyList(l,0,[3,0],"03").substr(2),b="";if(void 0===KJUR.crypto.OID.oidhex2name[m])throw"undefined OID(hex) in KJUR.crypto.OID: "+m;b=KJUR.crypto.OID.oidhex2name[m];var i=new KJUR.crypto.ECDSA({name:b});return i.setPublicKeyHex(S),i.setPrivateKeyHex(r),i.isPublic=!1,i}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var l=Cr.getDecryptedKeyHex(t,e),d=_r.getVbyList(l,0,[1],"02"),p=_r.getVbyList(l,0,[2],"02"),g=_r.getVbyList(l,0,[3],"02"),y=_r.getVbyList(l,0,[4],"02"),v=_r.getVbyList(l,0,[5],"02"),r=new KJUR.crypto.DSA;return r.setPrivate(new o(d,16),new o(p,16),new o(g,16),new o(y,16),new o(v,16)),r}if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return Cr.getKeyFromEncryptedPKCS8PEM(t,e);throw"not supported argument"},Cr.generateKeypair=function(t,e){if("RSA"==t){var n=e,r=new ve;r.generate(n,"10001"),r.isPrivate=!0,r.isPublic=!0;var i=new ve,s=r.n.toString(16),o=r.e.toString(16);i.setPublic(s,o),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}if("EC"==t){var u=e,c=new KJUR.crypto.ECDSA({curve:u}),f=c.generateKeyPairHex(),r=new KJUR.crypto.ECDSA({curve:u});r.setPrivateKeyHex(f.ecprvhex),r.isPrivate=!0,r.isPublic=!1;var i=new KJUR.crypto.ECDSA({curve:u});i.setPublicKeyHex(f.ecpubhex),i.isPrivate=!1,i.isPublic=!0;var a={};return a.prvKeyObj=r,a.pubKeyObj=i,a}throw"unknown algorithm: "+t},Cr.getPEM=function(t,e,n,r,i){function s(t){var e=KJUR.asn1.ASN1Util.newObject({seq:[{"int":0},{"int":{bigint:t.n}},{"int":t.e},{"int":{bigint:t.d}},{"int":{bigint:t.p}},{"int":{bigint:t.q}},{"int":{bigint:t.dmp1}},{"int":{bigint:t.dmq1}},{"int":{bigint:t.coeff}}]});return e}function o(t){var e=KJUR.asn1.ASN1Util.newObject({seq:[{"int":1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]});return e}function a(t){var e=KJUR.asn1.ASN1Util.newObject({seq:[{"int":0},{"int":{bigint:t.p}},{"int":{bigint:t.q}},{"int":{bigint:t.g}},{"int":{bigint:t.y}},{"int":{bigint:t.x}}]});return e}var u=KJUR.asn1,c=KJUR.crypto;if(("undefined"!=typeof ve&&t instanceof ve||"undefined"!=typeof c.DSA&&t instanceof c.DSA||"undefined"!=typeof c.ECDSA&&t instanceof c.ECDSA)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e)){var f=new KJUR.asn1.x509.SubjectPublicKeyInfo(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"PUBLIC KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof ve&&t instanceof ve&&(void 0===n||null==n)&&1==t.isPrivate){var f=s(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"RSA PRIVATE KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof ve&&t instanceof KJUR.crypto.ECDSA&&(void 0===n||null==n)&&1==t.isPrivate){var l=new KJUR.asn1.DERObjectIdentifier({name:t.curveName}),d=l.getEncodedHex(),p=o(t),g=p.getEncodedHex(),y="";return y+=u.ASN1Util.getPEMStringFromHex(d,"EC PARAMETERS"),y+=u.ASN1Util.getPEMStringFromHex(g,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&"undefined"!=typeof KJUR.crypto.DSA&&t instanceof KJUR.crypto.DSA&&(void 0===n||null==n)&&1==t.isPrivate){var f=a(t),h=f.getEncodedHex();return u.ASN1Util.getPEMStringFromHex(h,"DSA PRIVATE KEY")}if("PKCS5PRV"==e&&"undefined"!=typeof ve&&t instanceof ve&&void 0!==n&&null!=n&&1==t.isPrivate){var f=s(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",h,n,r)}if("PKCS5PRV"==e&&"undefined"!=typeof KJUR.crypto.ECDSA&&t instanceof KJUR.crypto.ECDSA&&void 0!==n&&null!=n&&1==t.isPrivate){var f=o(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",h,n,r)}if("PKCS5PRV"==e&&"undefined"!=typeof KJUR.crypto.DSA&&t instanceof KJUR.crypto.DSA&&void 0!==n&&null!=n&&1==t.isPrivate){var f=a(t),h=f.getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",h,n,r)}var v=function(t,e){var n=m(t,e),r=new KJUR.asn1.ASN1Util.newObject({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:n.pbkdf2Salt}},{"int":n.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:n.encryptionSchemeIV}}]}]}]},{octstr:{hex:n.ciphertext}}]});return r.getEncodedHex()},m=function(t,e){var n=100,r=sr.lib.WordArray.random(8),i="DES-EDE3-CBC",s=sr.lib.WordArray.random(8),o=sr.PBKDF2(e,r,{keySize:6,iterations:n}),a=sr.enc.Hex.parse(t),u=sr.TripleDES.encrypt(a,o,{iv:s})+"",c={};return c.ciphertext=u,c.pbkdf2Salt=sr.enc.Hex.stringify(r),c.pbkdf2Iter=n,c.encryptionSchemeAlg=i,c.encryptionSchemeIV=sr.enc.Hex.stringify(s),c};if("PKCS8PRV"==e&&"undefined"!=typeof ve&&t instanceof ve&&1==t.isPrivate){var S=s(t),b=S.getEncodedHex(),f=KJUR.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"rsaEncryption"}},{"null":!0}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&"undefined"!=typeof KJUR.crypto.ECDSA&&t instanceof KJUR.crypto.ECDSA&&1==t.isPrivate){var S=new KJUR.asn1.ASN1Util.newObject({seq:[{"int":1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}),b=S.getEncodedHex(),f=KJUR.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&"undefined"!=typeof KJUR.crypto.DSA&&t instanceof KJUR.crypto.DSA&&1==t.isPrivate){var S=new KJUR.asn1.DERInteger({bigint:t.x}),b=S.getEncodedHex(),f=KJUR.asn1.ASN1Util.newObject({seq:[{"int":0},{seq:[{oid:{name:"dsa"}},{seq:[{"int":{bigint:t.p}},{"int":{bigint:t.q}},{"int":{bigint:t.g}}]}]},{octstr:{hex:b}}]}),h=f.getEncodedHex();if(void 0===n||null==n)return u.ASN1Util.getPEMStringFromHex(h,"PRIVATE KEY");var g=v(h,n);return u.ASN1Util.getPEMStringFromHex(g,"ENCRYPTED PRIVATE KEY")}throw"unsupported object nor format"},Cr.getKeyFromCSRPEM=function(t){var e=Cr.getHexFromPEM(t,"CERTIFICATE REQUEST"),n=Cr.getKeyFromCSRHex(e);return n},Cr.getKeyFromCSRHex=function(t){var e=Cr.parseCSRHex(t),n=Cr.getKey(e.p8pubkeyhex,null,"pkcs8pub");return n},Cr.parseCSRHex=function(t){var e={},n=t;if("30"!=n.substr(0,2))throw"malformed CSR(code:001)";var r=_r.getPosArrayOfChildren_AtObj(n,0);if(r.length<1)throw"malformed CSR(code:002)";if("30"!=n.substr(r[0],2))throw"malformed CSR(code:003)";var i=_r.getPosArrayOfChildren_AtObj(n,r[0]);if(i.length<3)throw"malformed CSR(code:004)";return e.p8pubkeyhex=_r.getHexOfTLV_AtObj(n,i[2]),e},ve.prototype.readPrivateKeyFromPEMString=Cn,ve.prototype.readPrivateKeyFromASN1HexString=On;var Ir=new RegExp("");Ir.compile("[^0-9a-f]","gi"),ve.prototype.signWithMessageHash=Dn,ve.prototype.signString=jn,ve.prototype.signStringWithSHA1=Tn,ve.prototype.signStringWithSHA256=Jn,ve.prototype.sign=jn,ve.prototype.signWithSHA1=Tn,ve.prototype.signWithSHA256=Jn,ve.prototype.signWithMessageHashPSS=Nn,ve.prototype.signStringPSS=Bn,ve.prototype.signPSS=Bn,ve.SALT_LEN_HLEN=-1,ve.SALT_LEN_MAX=-2,ve.prototype.verifyWithMessageHash=zn,ve.prototype.verifyString=Wn,ve.prototype.verifyHexSignatureForMessage=qn,ve.prototype.verify=Wn,ve.prototype.verifyHexSignatureForByteArrayMessage=qn,ve.prototype.verifyWithMessageHashPSS=Gn,ve.prototype.verifyStringPSS=Yn,ve.prototype.verifyPSS=Yn,ve.SALT_LEN_RECOVER=-2,Xn.pemToBase64=function(t){var e=t;return e=e.replace("-----BEGIN CERTIFICATE-----",""),e=e.replace("-----END CERTIFICATE-----",""),e=e.replace(/[ \n]+/g,"")},Xn.pemToHex=function(t){var e=Xn.pemToBase64(t),n=i(e);return n},Xn.getSubjectPublicKeyPosFromCertHex=function(t){var e=Xn.getSubjectPublicKeyInfoPosFromCertHex(t);if(-1==e)return-1;var n=_r.getPosArrayOfChildren_AtObj(t,e);if(2!=n.length)return-1;var r=n[1];if("03"!=t.substring(r,r+2))return-1;var i=_r.getStartPosOfV_AtObj(t,r);return"00"!=t.substring(i,i+2)?-1:i+2},Xn.getSubjectPublicKeyInfoPosFromCertHex=function(t){var e=_r.getStartPosOfV_AtObj(t,0),n=_r.getPosArrayOfChildren_AtObj(t,e);return n.length<1?-1:"a003020102"==t.substring(n[0],n[0]+10)?n.length<6?-1:n[6]:n.length<5?-1:n[5]},Xn.getPublicKeyHexArrayFromCertHex=function(t){var e=Xn.getSubjectPublicKeyPosFromCertHex(t),n=_r.getPosArrayOfChildren_AtObj(t,e);if(2!=n.length)return[];var r=_r.getHexOfV_AtObj(t,n[0]),i=_r.getHexOfV_AtObj(t,n[1]);return null!=r&&null!=i?[r,i]:[]},Xn.getHexTbsCertificateFromCert=function(t){var e=_r.getStartPosOfV_AtObj(t,0);return e},Xn.getPublicKeyHexArrayFromCertPEM=function(t){var e=Xn.pemToHex(t),n=Xn.getPublicKeyHexArrayFromCertHex(e);return n},Xn.hex2dn=function(t){for(var e="",n=_r.getPosArrayOfChildren_AtObj(t,0),r=0;ra;a++)o[a]=Xn.getV3ExtItemInfo_AtObj(t,i[a]);return o},Xn.getV3ExtItemInfo_AtObj=function(t,e){var n={};n.posTLV=e;var r=_r.getPosArrayOfChildren_AtObj(t,e);if(2!=r.length&&3!=r.length)throw"malformed X.509v3 Ext (code:001)";if("06"!=t.substr(r[0],2))throw"malformed X.509v3 Ext (code:002)";var i=_r.getHexOfV_AtObj(t,r[0]);n.oid=_r.hextooidstr(i),n.critical=!1,3==r.length&&(n.critical=!0);var s=r[r.length-1];if("04"!=t.substr(s,2))throw"malformed X.509v3 Ext (code:003)";return n.posV=_r.getStartPosOfV_AtObj(t,s),n},Xn.getHexOfTLV_V3ExtValue=function(t,e){var n=Xn.getPosOfTLV_V3ExtValue(t,e);return-1==n?null:_r.getHexOfTLV_AtObj(t,n)},Xn.getHexOfV_V3ExtValue=function(t,e){var n=Xn.getPosOfTLV_V3ExtValue(t,e);return-1==n?null:_r.getHexOfV_AtObj(t,n)},Xn.getPosOfTLV_V3ExtValue=function(t,e){var n=e;if(e.match(/^[0-9.]+$/)||(n=KJUR.asn1.x509.OID.name2oid(e)),""==n)return-1;for(var r=Xn.getV3ExtInfoListOfCertHex(t),i=0;i0){var l=":"+n.join(":")+":";if(-1==l.indexOf(":"+f+":"))throw"algorithm '"+f+"' not accepted in the list"}if("none"!=f&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Cr.getKey(e)),!("RS"!=h&&"PS"!=h||e instanceof ve))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==h&&!(e instanceof KJUR.crypto.ECDSA))throw"key shall be a ECDSA obj for ES* algs";var d=null;if(void 0===r.jwsalg2sigalg[c.alg])throw"unsupported alg name: "+f;if(d=r.jwsalg2sigalg[f],"none"==d)throw"not supported";if("Hmac"==d.substr(0,4)){var p=null;if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var g=new KJUR.crypto.Mac({alg:d,pass:e});return g.updateString(a),p=g.doFinal(),u==p}if(-1!=d.indexOf("withECDSA")){var y=null;try{y=KJUR.crypto.ECDSA.concatSigToASN1Sig(u)}catch(v){return!1}var m=new KJUR.crypto.Signature({alg:d});return m.init(e),m.updateString(a),m.verify(y)}var m=new KJUR.crypto.Signature({alg:d});return m.init(e),m.updateString(a),m.verify(u)},KJUR.jws.JWS.parse=function(t){var e,n,r,i=t.split("."),s={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],n=i[1],3==i.length&&(r=i[2]),s.headerObj=KJUR.jws.JWS.readSafeJSONString(Pr(e)),s.payloadObj=KJUR.jws.JWS.readSafeJSONString(Pr(n)),s.headerPP=JSON.stringify(s.headerObj,null," "),null==s.payloadObj?s.payloadPP=Pr(n):s.payloadPP=JSON.stringify(s.payloadObj,null," "),void 0!==r&&(s.sigHex=gn(r)),s},KJUR.jws.JWS.verifyJWT=function(t,e,n){var r=KJUR.jws.JWS,i=t.split("."),s=i[0],o=i[1],a=(gn(i[2]),r.readSafeJSONString(Pr(s))),u=r.readSafeJSONString(Pr(o));if(void 0===a.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!r.inArray(a.alg,n.alg))return!1;if(void 0!==u.iss&&"object"==typeof n.iss&&!r.inArray(u.iss,n.iss))return!1;if(void 0!==u.sub&&"object"==typeof n.sub&&!r.inArray(u.sub,n.sub))return!1;if(void 0!==u.aud&&"object"==typeof n.aud)if("string"==typeof u.aud){if(!r.inArray(u.aud,n.aud))return!1}else if("object"==typeof u.aud&&!r.includedArray(u.aud,n.aud))return!1;var c=KJUR.jws.IntDate.getNow();return void 0!==n.verifyAt&&"number"==typeof n.verifyAt&&(c=n.verifyAt),void 0!==u.exp&&"number"==typeof u.exp&&u.exp=50&&100>r)r=1900+r;else{if(!(r>=0&&50>r))throw"malformed year string for UTCTime";r=2e3+r}}var i=parseInt(RegExp.$2)-1,s=parseInt(RegExp.$3),o=parseInt(RegExp.$4),a=parseInt(RegExp.$5),u=parseInt(RegExp.$6),c=new Date(Date.UTC(r,i,s,o,a,u));return~~(c/1e3)}throw"unsupported format: "+t},KJUR.jws.IntDate.getNow=function(){var t=~~(new Date/1e3);return t},KJUR.jws.IntDate.intDate2UTCString=function(t){var e=new Date(1e3*t);return e.toUTCString()},KJUR.jws.IntDate.intDate2Zulu=function(t){var e=new Date(1e3*t),n=("0000"+e.getUTCFullYear()).slice(-4),r=("00"+(e.getUTCMonth()+1)).slice(-2),i=("00"+e.getUTCDate()).slice(-2),s=("00"+e.getUTCHours()).slice(-2),o=("00"+e.getUTCMinutes()).slice(-2),a=("00"+e.getUTCSeconds()).slice(-2);return n+r+i+s+o+a+"Z"},"undefined"!=typeof KJUR&&KJUR||(KJUR={}),"undefined"!=typeof KJUR.jws&&KJUR.jws||(KJUR.jws={}),KJUR.jws.JWSJS=function(){var t=KJUR.jws.JWS;this.aHeader=[],this.sPayload="",this.aSignature=[],this.init=function(){this.aHeader=[],this.sPayload="",this.aSignature=[]},this.initWithJWS=function(t){this.init();var e=new KJUR.jws.JWS;e.parseJWS(t),this.aHeader.push(e.parsedJWS.headB64U),this.sPayload=e.parsedJWS.payloadB64U,this.aSignature.push(e.parsedJWS.sigvalB64U)},this.addSignatureByHeaderKey=function(t,e){var n=Pr(this.sPayload),r=new KJUR.jws.JWS;r.generateJWSByP1PrvKey(t,n,e),this.aHeader.push(r.parsedJWS.headB64U),this.aSignature.push(r.parsedJWS.sigvalB64U)},this.addSignatureByHeaderPayloadKey=function(t,e,n){var r=new KJUR.jws.JWS;r.generateJWSByP1PrvKey(t,e,n),this.aHeader.push(r.parsedJWS.headB64U),this.sPayload=r.parsedJWS.payloadB64U,this.aSignature.push(r.parsedJWS.sigvalB64U)},this.verifyWithCerts=function(t){if(this.aHeader.length!=t.length)throw"num headers does not match with num certs";if(this.aSignature.length!=t.length)throw"num signatures does not match with num certs";for(var e=this.sPayload,n="",r=0;r1?arguments[1]:"utf8"):u(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function o(e,n){if(e=g(e,0>n?0:0|y(n)),!t.TYPED_ARRAY_SUPPORT)for(var r=0;n>r;r++)e[r]=0;return e}function a(t,e,n){"string"==typeof n&&""!==n||(n="utf8");var r=0|m(e,n);return t=g(t,r),t.write(e,n),t}function u(e,n){if(t.isBuffer(n))return c(e,n);if(X(n))return f(e,n);if(null==n)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(n.buffer instanceof ArrayBuffer)return h(e,n);if(n instanceof ArrayBuffer)return l(e,n)}return n.length?d(e,n):p(e,n)}function c(t,e){var n=0|y(e.length);return t=g(t,n),e.copy(t,0,0,n),t}function f(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function h(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function l(e,n){return t.TYPED_ARRAY_SUPPORT?(n.byteLength,e=t._augment(new Uint8Array(n))):e=h(e,new Uint8Array(n)),e}function d(t,e){var n=0|y(e.length);t=g(t,n);for(var r=0;n>r;r+=1)t[r]=255&e[r];return t}function p(t,e){var n,r=0;"Buffer"===e.type&&X(e.data)&&(n=e.data,r=0|y(n.length)),t=g(t,r);for(var i=0;r>i;i+=1)t[i]=255&n[i];return t}function g(e,n){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(n)),e.__proto__=t.prototype):(e.length=n,e._isBuffer=!0);var r=0!==n&&n<=t.poolSize>>>1;return r&&(e.parent=$),e}function y(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function v(e,n){if(!(this instanceof v))return new v(e,n);var r=new t(e,n);return delete r.parent,r}function m(t,e){"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(t).length;default:if(r)return V(t).length;e=(""+e).toLowerCase(),r=!0}}function S(t,e,n){var r=!1;if(e=0|e,n=void 0===n||n===1/0?this.length:0|n,t||(t="utf8"),0>e&&(e=0),n>this.length&&(n=this.length),e>=n)return"";for(;;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return _(this,e,n);case"ascii":return P(this,e,n);case"binary":return U(this,e,n);case"base64":return F(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var s=e.length;if(s%2!==0)throw new Error("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;r>o;o++){var a=parseInt(e.substr(2*o,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[n+o]=a}return o}function w(t,e,n,r){return z(V(e,t.length-n),t,n,r)}function E(t,e,n,r){return z(L(e),t,n,r)}function x(t,e,n,r){return E(t,e,n,r)}function A(t,e,n,r){return z(W(e),t,n,r)}function R(t,e,n,r){return z(q(e,t.length-n),t,n,r)}function F(t,e,n){return 0===e&&n===t.length?Y.fromByteArray(t):Y.fromByteArray(t.slice(e,n))}function _(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;n>i;){var s=t[i],o=null,a=s>239?4:s>223?3:s>191?2:1;if(n>=i+a){var u,c,f,h;switch(a){case 1:128>s&&(o=s);break;case 2:u=t[i+1],128===(192&u)&&(h=(31&s)<<6|63&u,h>127&&(o=h));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(h=(15&s)<<12|(63&u)<<6|63&c,h>2047&&(55296>h||h>57343)&&(o=h));break;case 4:u=t[i+1],c=t[i+2],f=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&f)&&(h=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&f,h>65535&&1114112>h&&(o=h))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return K(r)}function K(t){var e=t.length;if(Z>=e)return String.fromCharCode.apply(String,t);for(var n="",r=0;e>r;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Z));return n}function P(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(127&t[i]);return r}function U(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;n>i;i++)r+=String.fromCharCode(t[i]);return r}function O(t,e,n){var r=t.length;(!e||0>e)&&(e=0),(!n||0>n||n>r)&&(n=r);for(var i="",s=e;n>s;s++)i+=M(t[s]);return i}function C(t,e,n){for(var r=t.slice(e,n),i="",s=0;st)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,n,r,i,s,o){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(n>s||o>n)throw new RangeError("value is out of bounds");if(r+i>e.length)throw new RangeError("index out of range")}function D(t,e,n,r){0>e&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-n,2);s>i;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function T(t,e,n,r){0>e&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-n,4);s>i;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function J(t,e,n,r,i,s){if(e>i||s>e)throw new RangeError("value is out of bounds");if(n+r>t.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function H(t,e,n,r,i){return i||J(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return i||J(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,e,n,r,52,8),n+8}function N(t){if(t=k(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function k(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function M(t){return 16>t?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var n,r=t.length,i=null,s=[],o=0;r>o;o++){if(n=t.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(56320>n){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,128>n){if((e-=1)<0)break;s.push(n)}else if(2048>n){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(65536>n){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(t){for(var e=[],n=0;n>8,i=n%256,s.push(i),s.push(r);return s}function W(t){return Y.toByteArray(N(t))}function z(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);i++)e[i+n]=t[i];return i}var Y=n(313),G=n(314),X=n(315);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var $={};t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,i=n.length,s=0,o=Math.min(r,i);o>s&&e[s]===n[s];)++s;return s!==o&&(r=e[s],i=n[s]),i>r?-1:r>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!X(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var r;if(void 0===n)for(n=0,r=0;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,n){function r(t,e,n){for(var r=-1,i=0;n+i2147483647?n=2147483647:-2147483648>n&&(n=-2147483648),n>>=0,0===this.length)return-1;if(n>=this.length)return-1;if(0>n&&(n=Math.max(this.length+n,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,n);if(t.isBuffer(e))return r(this,e,n);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,n):r(this,[e],n);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},t.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=e,e=0|n,n=i}var s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(0>n||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return E(this,t,e,n);case"binary":return x(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>n?(n+=r,0>n&&(n=0)):n>r&&(n=r),e>n&&(n=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,n));else{var s=n-e;i=new t(s,void 0);for(var o=0;s>o;o++)i[o]=this[o+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=this[t],i=1,s=0;++s0&&(i*=256);)r+=this[t+--e]*i;return r},t.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=this[t],i=1,s=0;++s=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t=0|t,e=0|e,n||I(t,e,this.length);for(var r=e,i=1,s=this[t+--r];r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},t.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){t=+t,e=0|e,n=0|n,r||j(this,t,e,n,Math.pow(2,8*n),0);var i=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+i]=t/s&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):D(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):D(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):T(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):T(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);j(this,t,e,n,i-1,-i)}var s=0,o=1,a=0>t?1:0;for(this[e]=255&t;++s>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e=0|e,!r){var i=Math.pow(2,8*n-1);j(this,t,e,n,i-1,-i)}var s=n-1,o=1,a=0>t?1:0;for(this[e+s]=255&t;--s>=0&&(o*=256);)this[e+s]=(t/o>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):D(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):D(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):T(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n=0|n,r||j(this,e,n,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):T(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return H(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return H(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,i){if(r||(r=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===e.length||0===this.length)return 0;if(0>n)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-nr&&i>n)for(s=o-1;s>=0;s--)e[s+n]=this[s+r];else if(1e3>o||!t.TYPED_ARRAY_SUPPORT)for(s=0;o>s;s++)e[s+n]=this[s+r];else e._set(this.subarray(r,r+o),n);return o},t.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),e>n)throw new RangeError("end < start");if(n!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof t)for(r=e;n>r;r++)this[r]=t;else{var i=V(t.toString()),s=i.length;for(r=e;n>r;r++)this[r]=i[r%s]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),n=0,r=e.length;r>n;n+=1)e[n]=this[n];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=Q.get,e.set=Q.set,e.write=Q.write,e.toString=Q.toString,e.toLocaleString=Q.toString,e.toJSON=Q.toJSON,e.equals=Q.equals,e.compare=Q.compare,e.indexOf=Q.indexOf,e.copy=Q.copy,e.slice=Q.slice,e.readUIntLE=Q.readUIntLE,e.readUIntBE=Q.readUIntBE,e.readUInt8=Q.readUInt8,e.readUInt16LE=Q.readUInt16LE,e.readUInt16BE=Q.readUInt16BE,e.readUInt32LE=Q.readUInt32LE,e.readUInt32BE=Q.readUInt32BE,e.readIntLE=Q.readIntLE,e.readIntBE=Q.readIntBE,e.readInt8=Q.readInt8,e.readInt16LE=Q.readInt16LE,e.readInt16BE=Q.readInt16BE,e.readInt32LE=Q.readInt32LE,e.readInt32BE=Q.readInt32BE,e.readFloatLE=Q.readFloatLE,e.readFloatBE=Q.readFloatBE,e.readDoubleLE=Q.readDoubleLE,e.readDoubleBE=Q.readDoubleBE,e.writeUInt8=Q.writeUInt8,e.writeUIntLE=Q.writeUIntLE,e.writeUIntBE=Q.writeUIntBE,e.writeUInt16LE=Q.writeUInt16LE,e.writeUInt16BE=Q.writeUInt16BE,e.writeUInt32LE=Q.writeUInt32LE,e.writeUInt32BE=Q.writeUInt32BE,e.writeIntLE=Q.writeIntLE,e.writeIntBE=Q.writeIntBE,e.writeInt8=Q.writeInt8,e.writeInt16LE=Q.writeInt16LE,e.writeInt16BE=Q.writeInt16BE,e.writeInt32LE=Q.writeInt32LE,e.writeInt32BE=Q.writeInt32BE,e.writeFloatLE=Q.writeFloatLE,e.writeFloatBE=Q.writeFloatBE,e.writeDoubleLE=Q.writeDoubleLE,e.writeDoubleBE=Q.writeDoubleBE,e.fill=Q.fill,e.inspect=Q.inspect,e.toArrayBuffer=Q.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,n(312).Buffer,function(){return this}())},function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===o||e===h?62:e===a||e===l?63:u>e?-1:u+10>e?e-u+26+26:f+26>e?e-f:c+26>e?e-c+26:void 0}function n(t){function n(t){c[h++]=t}var r,i,o,a,u,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;u="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,c=new s(3*t.length/4-u),o=u>0?t.length-4:t.length;var h=0;for(r=0,i=0;o>r;r+=4,i+=3)a=e(t.charAt(r))<<18|e(t.charAt(r+1))<<12|e(t.charAt(r+2))<<6|e(t.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=e(t.charAt(r))<<2|e(t.charAt(r+1))>>4,n(255&a)):1===u&&(a=e(t.charAt(r))<<10|e(t.charAt(r+1))<<4|e(t.charAt(r+2))>>2,n(a>>8&255),n(255&a)),c}function i(t){function e(t){return r.charAt(t)}function n(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,s,o,a=t.length%3,u="";for(i=0,o=t.length-a;o>i;i+=3)s=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=n(s);switch(a){case 1:s=t[t.length-1],u+=e(s>>2),u+=e(s<<4&63),u+="==";break;case 2:s=(t[t.length-2]<<8)+t[t.length-1],u+=e(s>>10),u+=e(s>>4&63),u+=e(s<<2&63),u+="="}return u}var s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),f="A".charCodeAt(0),h="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=n,t.fromByteArray=i}(e)},function(t,e){e.read=function(t,e,n,r,i){var s,o,a=8*i-r-1,u=(1<>1,f=-7,h=n?i-1:0,l=n?-1:1,d=t[e+h];for(h+=l,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[e+h],h+=l,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=r;f>0;o=256*o+t[e+h],h+=l,f-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(d?-1:1)*(1/0);o+=Math.pow(2,r),s-=c}return(d?-1:1)*o*Math.pow(2,s-r)},e.write=function(t,e,n,r,i,s){var o,a,u,c=8*s-i-1,f=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:s-1,p=r?1:-1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=f):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),e+=o+h>=1?l/u:l*Math.pow(2,1-h),e*u>=2&&(o++,u/=2),o+h>=f?(a=0,o=f):o+h>=1?(a=(e*u-1)*Math.pow(2,i),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[n+d]=255&a,d+=p,a/=256,i-=8);for(o=o<0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e){},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n=t:void 0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),t}();e["default"]=u,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0){var n=e-this._accessTokenExpiringNotificationTime;0>=n&&(n=1),o["default"].info("registering expiring timer in:",n),this._accessTokenExpiring.init(n)}var r=e+1;o["default"].info("registering expired timer in:",r),this._accessTokenExpired.init(r)}},t.prototype.unload=function(){o["default"].info("AccessTokenEvents.unload"),this._cancelTimers()},t.prototype._cancelTimers=function(){o["default"].info("canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},t.prototype.addAccessTokenExpiring=function(t){this._accessTokenExpiring.addHandler(t)},t.prototype.removeAccessTokenExpiring=function(t){this._accessTokenExpiring.removeHandler(t)},t.prototype.addAccessTokenExpired=function(t){this._accessTokenExpired.addHandler(t)},t.prototype.removeAccessTokenExpired=function(t){this._accessTokenExpired.removeHandler(t)},t}();e["default"]=f,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(293),u=(r(a),n(298)),c=r(u),f=n(329),h=r(f),l=function(t){function e(n){var r=arguments.length<=1||void 0===arguments[1]?c["default"].timer:arguments[1];i(this,e);var o=s(this,t.call(this,n));return o._timer=r,o}return o(e,t),e.prototype.init=function(t){this.cancel(),0>=t&&(t=1),this._timerHandle=this._timer.setTimeout(this._callback.bind(this),1e3*t)},e.prototype.cancel=function(){this._timerHandle&&(this._timer.clearTimeout(this._timerHandle),this._timerHandle=null)},e.prototype._callback=function(){this._timerHandle=null,t.prototype.raise.call(this)},e}(h["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(293),o=r(s),a=function(){function t(e){i(this,t),this._name=e,this._callbacks=[]}return t.prototype.addHandler=function(t){this._callbacks.push(t)},t.prototype.removeHandler=function(t){var e=this._callbacks.findIndex(function(e){return e===t});e>=0&&this._callbacks.splice(e,1)},t.prototype.raise=function(){o["default"].info("Raising event: "+this._name);var t=!0,e=!1,n=void 0;try{for(var r,i=this._callbacks[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var s=r.value;s.apply(void 0,arguments)}}catch(a){e=!0,n=a}finally{try{!t&&i["return"]&&i["return"]()}finally{if(e)throw n}}},t}();e["default"]=a,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=n(293),o=r(s),a=function(){function t(e){i(this,t),this._userManager=e,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring.bind(this))}return t.prototype._tokenExpiring=function(){var t=this;o["default"].info("SilentRenewService automatically renewing access token"),this._userManager.signinSilent().then(function(t){o["default"].info("Silent token renewal successful")},function(e){o["default"].error("Error from signinSilent:",e.message),t._userManager.events._raiseSilentRenewError(e)})},t}();e["default"]=a,t.exports=e["default"]}]);