/* Minification failed. Returning unminified contents.
(71,98392-98400): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: hASN1Sig
(71,7187-7190): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: utc
 */
/*!
 * Vue.js v2.5.21
 * (c) 2014-2018 Evan You
 * Released under the MIT License.
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function i(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return"[object Object]"===a.call(e)}function c(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function l(e){var t=parseFloat(e);return isNaN(t)?e:t}function f(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var p=f("slot,component",!0),d=f("key,ref,slot,slot-scope,is");function v(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var h=Object.prototype.hasOwnProperty;function m(e,t){return h.call(e,t)}function y(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var g=/-(\w)/g,_=y(function(e){return e.replace(g,function(e,t){return t?t.toUpperCase():""})}),b=y(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),$=/\B([A-Z])/g,w=y(function(e){return e.replace($,"-$1").toLowerCase()});var C=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function x(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function k(e,t){for(var n in t)e[n]=t[n];return e}function A(e){for(var t={},n=0;n<e.length;n++)e[n]&&k(t,e[n]);return t}function O(e,t,n){}var S=function(e,t,n){return!1},T=function(e){return e};function N(e,t){if(e===t)return!0;var n=o(e),r=o(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),a=Array.isArray(t);if(i&&a)return e.length===t.length&&e.every(function(e,n){return N(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every(function(n){return N(e[n],t[n])})}catch(e){return!1}}function j(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function E(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var I="data-server-rendered",L=["component","directive","filter"],M=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],D={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:S,isReservedAttr:S,isUnknownElement:S,getTagNamespace:O,parsePlatformTagName:T,mustUseProp:S,async:!0,_lifecycleHooks:M};function P(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var F=/[^\w.$]/;var R,H="__proto__"in{},B="undefined"!=typeof window,U="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,V=U&&WXEnvironment.platform.toLowerCase(),z=B&&window.navigator.userAgent.toLowerCase(),K=z&&/msie|trident/.test(z),J=z&&z.indexOf("msie 9.0")>0,q=z&&z.indexOf("edge/")>0,W=(z&&z.indexOf("android"),z&&/iphone|ipad|ipod|ios/.test(z)||"ios"===V),G=(z&&/chrome\/\d+/.test(z),{}.watch),Z=!1;if(B)try{var X={};Object.defineProperty(X,"passive",{get:function(){Z=!0}}),window.addEventListener("test-passive",null,X)}catch(e){}var Y=function(){return void 0===R&&(R=!B&&!U&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),R},Q=B&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ee(e){return"function"==typeof e&&/native code/.test(e.toString())}var te,ne="undefined"!=typeof Symbol&&ee(Symbol)&&"undefined"!=typeof Reflect&&ee(Reflect.ownKeys);te="undefined"!=typeof Set&&ee(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var re=O,ie=0,oe=function(){this.id=ie++,this.subs=[]};oe.prototype.addSub=function(e){this.subs.push(e)},oe.prototype.removeSub=function(e){v(this.subs,e)},oe.prototype.depend=function(){oe.target&&oe.target.addDep(this)},oe.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},oe.target=null;var ae=[];function se(e){ae.push(e),oe.target=e}function ce(){ae.pop(),oe.target=ae[ae.length-1]}var ue=function(e,t,n,r,i,o,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},le={child:{configurable:!0}};le.child.get=function(){return this.componentInstance},Object.defineProperties(ue.prototype,le);var fe=function(e){void 0===e&&(e="");var t=new ue;return t.text=e,t.isComment=!0,t};function pe(e){return new ue(void 0,void 0,void 0,String(e))}function de(e){var t=new ue(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ve=Array.prototype,he=Object.create(ve);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=ve[e];P(he,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var me=Object.getOwnPropertyNames(he),ye=!0;function ge(e){ye=e}var _e=function(e){var t;this.value=e,this.dep=new oe,this.vmCount=0,P(e,"__ob__",this),Array.isArray(e)?(H?(t=he,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];P(e,o,t[o])}}(e,he,me),this.observeArray(e)):this.walk(e)};function be(e,t){var n;if(o(e)&&!(e instanceof ue))return m(e,"__ob__")&&e.__ob__ instanceof _e?n=e.__ob__:ye&&!Y()&&(Array.isArray(e)||s(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new _e(e)),t&&n&&n.vmCount++,n}function $e(e,t,n,r,i){var o=new oe,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!i&&be(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return oe.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(t)&&function e(t){for(var n=void 0,r=0,i=t.length;r<i;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),Array.isArray(n)&&e(n)}(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!=t&&r!=r||s&&!c||(c?c.call(e,t):n=t,u=!i&&be(t),o.notify())}})}}function we(e,t,n){if(Array.isArray(e)&&c(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?($e(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ce(e,t){if(Array.isArray(e)&&c(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||m(e,t)&&(delete e[t],n&&n.dep.notify())}}_e.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)$e(e,t[n])},_e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)be(e[t])};var xe=D.optionMergeStrategies;function ke(e,t){if(!t)return e;for(var n,r,i,o=Object.keys(t),a=0;a<o.length;a++)r=e[n=o[a]],i=t[n],m(e,n)?r!==i&&s(r)&&s(i)&&ke(r,i):we(e,n,i);return e}function Ae(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?ke(r,i):i}:t?e?function(){return ke("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Oe(e,t){return t?e?e.concat(t):Array.isArray(t)?t:[t]:e}function Se(e,t,n,r){var i=Object.create(e||null);return t?k(i,t):i}xe.data=function(e,t,n){return n?Ae(e,t,n):t&&"function"!=typeof t?e:Ae(e,t)},M.forEach(function(e){xe[e]=Oe}),L.forEach(function(e){xe[e+"s"]=Se}),xe.watch=function(e,t,n,r){if(e===G&&(e=void 0),t===G&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in k(i,e),t){var a=i[o],s=t[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},xe.props=xe.methods=xe.inject=xe.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return k(i,e),t&&k(i,t),i},xe.provide=Ae;var Te=function(e,t){return void 0===t?e:t};function Ne(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[_(i)]={type:null});else if(s(n))for(var a in n)i=n[a],o[_(a)]=s(i)?i:{type:i};e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(s(n))for(var o in n){var a=n[o];r[o]=s(a)?k({from:o},a):{from:a}}}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=Ne(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=Ne(e,t.mixins[r],n);var o,a={};for(o in e)c(o);for(o in t)m(e,o)||c(o);function c(r){var i=xe[r]||Te;a[r]=i(e[r],t[r],n,r)}return a}function je(e,t,n,r){if("string"==typeof n){var i=e[t];if(m(i,n))return i[n];var o=_(n);if(m(i,o))return i[o];var a=b(o);return m(i,a)?i[a]:i[n]||i[o]||i[a]}}function Ee(e,t,n,r){var i=t[e],o=!m(n,e),a=n[e],s=Me(Boolean,i.type);if(s>-1)if(o&&!m(i,"default"))a=!1;else if(""===a||a===w(e)){var c=Me(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=function(e,t,n){if(!m(t,"default"))return;var r=t.default;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ie(t.type)?r.call(e):r}(r,i,e);var u=ye;ge(!0),be(a),ge(u)}return a}function Ie(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Le(e,t){return Ie(e)===Ie(t)}function Me(e,t){if(!Array.isArray(t))return Le(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Le(t[n],e))return n;return-1}function De(e,t,n){if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Pe(e,r,"errorCaptured hook")}}Pe(e,t,n)}function Pe(e,t,n){if(D.errorHandler)try{return D.errorHandler.call(null,e,t,n)}catch(e){Fe(e,null,"config.errorHandler")}Fe(e,t,n)}function Fe(e,t,n){if(!B&&!U||"undefined"==typeof console)throw e;console.error(e)}var Re,He,Be=[],Ue=!1;function Ve(){Ue=!1;var e=Be.slice(0);Be.length=0;for(var t=0;t<e.length;t++)e[t]()}var ze=!1;if("undefined"!=typeof setImmediate&&ee(setImmediate))He=function(){setImmediate(Ve)};else if("undefined"==typeof MessageChannel||!ee(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())He=function(){setTimeout(Ve,0)};else{var Ke=new MessageChannel,Je=Ke.port2;Ke.port1.onmessage=Ve,He=function(){Je.postMessage(1)}}if("undefined"!=typeof Promise&&ee(Promise)){var qe=Promise.resolve();Re=function(){qe.then(Ve),W&&setTimeout(O)}}else Re=He;function We(e,t){var n;if(Be.push(function(){if(e)try{e.call(t)}catch(e){De(e,t,"nextTick")}else n&&n(t)}),Ue||(Ue=!0,ze?He():Re()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}var Ge=new te;function Ze(e){!function e(t,n){var r,i;var a=Array.isArray(t);if(!a&&!o(t)||Object.isFrozen(t)||t instanceof ue)return;if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(a)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,Ge),Ge.clear()}var Xe,Ye=y(function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}});function Qe(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),i=0;i<r.length;i++)r[i].apply(null,e)}return t.fns=e,t}function et(e,n,i,o,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=Ye(c),t(u)||(t(l)?(t(u.fns)&&(u=e[c]=Qe(u)),r(f.once)&&(u=e[c]=a(f.name,u,f.capture)),i(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,e[c]=l));for(c in n)t(e[c])&&o((f=Ye(c)).name,n[c],f.capture)}function tt(e,i,o){var a;e instanceof ue&&(e=e.data.hook||(e.data.hook={}));var s=e[i];function c(){o.apply(this,arguments),v(a.fns,c)}t(s)?a=Qe([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=Qe([s,c]),a.merged=!0,e[i]=a}function nt(e,t,r,i,o){if(n(t)){if(m(t,r))return e[r]=t[r],o||delete t[r],!0;if(m(t,i))return e[r]=t[i],o||delete t[i],!0}return!1}function rt(e){return i(e)?[pe(e)]:Array.isArray(e)?function e(o,a){var s=[];var c,u,l,f;for(c=0;c<o.length;c++)t(u=o[c])||"boolean"==typeof u||(l=s.length-1,f=s[l],Array.isArray(u)?u.length>0&&(it((u=e(u,(a||"")+"_"+c))[0])&&it(f)&&(s[l]=pe(f.text+u[0].text),u.shift()),s.push.apply(s,u)):i(u)?it(f)?s[l]=pe(f.text+u):""!==u&&s.push(pe(u)):it(u)&&it(f)?s[l]=pe(f.text+u.text):(r(o._isVList)&&n(u.tag)&&t(u.key)&&n(a)&&(u.key="__vlist"+a+"_"+c+"__"),s.push(u)));return s}(e):void 0}function it(e){return n(e)&&n(e.text)&&!1===e.isComment}function ot(e,t){return(e.__esModule||ne&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function at(e){return e.isComment&&e.asyncFactory}function st(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];if(n(r)&&(n(r.componentOptions)||at(r)))return r}}function ct(e,t){Xe.$on(e,t)}function ut(e,t){Xe.$off(e,t)}function lt(e,t){var n=Xe;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function ft(e,t,n){Xe=e,et(t,n||{},ct,ut,lt),Xe=void 0}function pt(e,t){var n={};if(!e)return n;for(var r=0,i=e.length;r<i;r++){var o=e[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==t&&o.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(dt)&&delete n[u];return n}function dt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function vt(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?vt(e[n],t):t[e[n].key]=e[n].fn;return t}var ht=null;function mt(e){var t=ht;return ht=e,function(){ht=t}}function yt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function gt(e,t){if(t){if(e._directInactive=!1,yt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)gt(e.$children[n]);_t(e,"activated")}}function _t(e,t){se();var n=e.$options[t];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(e)}catch(n){De(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t),ce()}var bt=[],$t=[],wt={},Ct=!1,xt=!1,kt=0;function At(){var e,t;for(xt=!0,bt.sort(function(e,t){return e.id-t.id}),kt=0;kt<bt.length;kt++)(e=bt[kt]).before&&e.before(),t=e.id,wt[t]=null,e.run();var n=$t.slice(),r=bt.slice();kt=bt.length=$t.length=0,wt={},Ct=xt=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,gt(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&_t(r,"updated")}}(r),Q&&D.devtools&&Q.emit("flush")}var Ot=0,St=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ot,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new te,this.newDepIds=new te,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!F.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=O)),this.value=this.lazy?void 0:this.get()};St.prototype.get=function(){var e;se(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;De(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&Ze(e),ce(),this.cleanupDeps()}return e},St.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},St.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},St.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==wt[t]){if(wt[t]=!0,xt){for(var n=bt.length-1;n>kt&&bt[n].id>e.id;)n--;bt.splice(n+1,0,e)}else bt.push(e);Ct||(Ct=!0,We(At))}}(this)},St.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||o(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){De(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},St.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},St.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},St.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Tt={enumerable:!0,configurable:!0,get:O,set:O};function Nt(e,t,n){Tt.get=function(){return this[t][n]},Tt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Tt)}function jt(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&ge(!1);var o=function(o){i.push(o);var a=Ee(o,t,n,e);$e(r,o,a),o in e||Nt(e,"_props",o)};for(var a in t)o(a);ge(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?O:C(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;s(t=e._data="function"==typeof t?function(e,t){se();try{return e.call(t,t)}catch(e){return De(e,t,"data()"),{}}finally{ce()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];r&&m(r,o)||(void 0,36!==(a=(o+"").charCodeAt(0))&&95!==a&&Nt(e,"_data",o))}var a;be(t,!0)}(e):be(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=Y();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;r||(n[i]=new St(e,a||O,O,Et)),i in e||It(e,i,o)}}(e,t.computed),t.watch&&t.watch!==G&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)Dt(e,n,r[i]);else Dt(e,n,r)}}(e,t.watch)}var Et={lazy:!0};function It(e,t,n){var r=!Y();"function"==typeof n?(Tt.get=r?Lt(t):Mt(n),Tt.set=O):(Tt.get=n.get?r&&!1!==n.cache?Lt(t):Mt(n.get):O,Tt.set=n.set||O),Object.defineProperty(e,t,Tt)}function Lt(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),oe.target&&t.depend(),t.value}}function Mt(e){return function(){return e.call(this,this)}}function Dt(e,t,n,r){return s(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Pt(e,t){if(e){for(var n=Object.create(null),r=ne?Reflect.ownKeys(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):Object.keys(e),i=0;i<r.length;i++){for(var o=r[i],a=e[o].from,s=t;s;){if(s._provided&&m(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[o]){var c=e[o].default;n[o]="function"==typeof c?c.call(t):c}}return n}}function Ft(e,t){var r,i,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),i=0,a=e.length;i<a;i++)r[i]=t(e[i],i);else if("number"==typeof e)for(r=new Array(e),i=0;i<e;i++)r[i]=t(i+1,i);else if(o(e))for(s=Object.keys(e),r=new Array(s.length),i=0,a=s.length;i<a;i++)c=s[i],r[i]=t(e[c],c,i);return n(r)||(r=[]),r._isVList=!0,r}function Rt(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=k(k({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function Ht(e){return je(this.$options,"filters",e)||T}function Bt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Ut(e,t,n,r,i){var o=D.keyCodes[t]||n;return i&&r&&!D.keyCodes[t]?Bt(i,r):o?Bt(o,e):r?w(r)!==t:void 0}function Vt(e,t,n,r,i){if(n)if(o(n)){var a;Array.isArray(n)&&(n=A(n));var s=function(o){if("class"===o||"style"===o||d(o))a=e;else{var s=e.attrs&&e.attrs.type;a=r||D.mustUseProp(t,s,o)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=_(o);o in a||c in a||(a[o]=n[o],i&&((e.on||(e.on={}))["update:"+c]=function(e){n[o]=e}))};for(var c in n)s(c)}else;return e}function zt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(Jt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r)}function Kt(e,t,n){return Jt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Jt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&qt(e[r],t+"_"+r,n);else qt(e,t,n)}function qt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Wt(e,t){if(t)if(s(t)){var n=e.on=e.on?k({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Gt(e){e._o=Kt,e._n=l,e._s=u,e._l=Ft,e._t=Rt,e._q=N,e._i=j,e._m=zt,e._f=Ht,e._k=Ut,e._b=Vt,e._v=pe,e._e=fe,e._u=vt,e._g=Wt}function Zt(t,n,i,o,a){var s,c=a.options;m(o,"_uid")?(s=Object.create(o))._original=o:(s=o,o=o._original);var u=r(c._compiled),l=!u;this.data=t,this.props=n,this.children=i,this.parent=o,this.listeners=t.on||e,this.injections=Pt(c.inject,o),this.slots=function(){return pt(i,o)},u&&(this.$options=c,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||e),c._scopeId?this._c=function(e,t,n,r){var i=an(s,e,t,n,r,l);return i&&!Array.isArray(i)&&(i.fnScopeId=c._scopeId,i.fnContext=o),i}:this._c=function(e,t,n,r){return an(s,e,t,n,r,l)}}function Xt(e,t,n,r,i){var o=de(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function Yt(e,t){for(var n in t)e[_(n)]=t[n]}Gt(Zt.prototype);var Qt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var r=e;Qt.prepatch(r,r)}else{(e.componentInstance=function(e,t){var r={_isComponent:!0,_parentVnode:e,parent:t},i=e.data.inlineTemplate;n(i)&&(r.render=i.render,r.staticRenderFns=i.staticRenderFns);return new e.componentOptions.Ctor(r)}(e,ht)).$mount(t?e.elm:void 0,t)}},prepatch:function(t,n){var r=n.componentOptions;!function(t,n,r,i,o){var a=!!(o||t.$options._renderChildren||i.data.scopedSlots||t.$scopedSlots!==e);if(t.$options._parentVnode=i,t.$vnode=i,t._vnode&&(t._vnode.parent=i),t.$options._renderChildren=o,t.$attrs=i.data.attrs||e,t.$listeners=r||e,n&&t.$options.props){ge(!1);for(var s=t._props,c=t.$options._propKeys||[],u=0;u<c.length;u++){var l=c[u],f=t.$options.props;s[l]=Ee(l,f,n,t)}ge(!0),t.$options.propsData=n}r=r||e;var p=t.$options._parentListeners;t.$options._parentListeners=r,ft(t,r,p),a&&(t.$slots=pt(o,i.context),t.$forceUpdate())}(n.componentInstance=t.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,_t(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,$t.push(t)):gt(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(!(n&&(t._directInactive=!0,yt(t))||t._inactive)){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);_t(t,"deactivated")}}(t,!0):t.$destroy())}},en=Object.keys(Qt);function tn(i,a,s,c,u){if(!t(i)){var l=s.$options._base;if(o(i)&&(i=l.extend(i)),"function"==typeof i){var f;if(t(i.cid)&&void 0===(i=function(e,i,a){if(r(e.error)&&n(e.errorComp))return e.errorComp;if(n(e.resolved))return e.resolved;if(r(e.loading)&&n(e.loadingComp))return e.loadingComp;if(!n(e.contexts)){var s=e.contexts=[a],c=!0,u=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0)},l=E(function(t){e.resolved=ot(t,i),c||u(!0)}),f=E(function(t){n(e.errorComp)&&(e.error=!0,u(!0))}),p=e(l,f);return o(p)&&("function"==typeof p.then?t(e.resolved)&&p.then(l,f):n(p.component)&&"function"==typeof p.component.then&&(p.component.then(l,f),n(p.error)&&(e.errorComp=ot(p.error,i)),n(p.loading)&&(e.loadingComp=ot(p.loading,i),0===p.delay?e.loading=!0:setTimeout(function(){t(e.resolved)&&t(e.error)&&(e.loading=!0,u(!1))},p.delay||200)),n(p.timeout)&&setTimeout(function(){t(e.resolved)&&f(null)},p.timeout))),c=!1,e.loading?e.loadingComp:e.resolved}e.contexts.push(a)}(f=i,l,s)))return function(e,t,n,r,i){var o=fe();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(f,a,s,c,u);a=a||{},cn(i),n(a.model)&&function(e,t){var r=e.model&&e.model.prop||"value",i=e.model&&e.model.event||"input";(t.props||(t.props={}))[r]=t.model.value;var o=t.on||(t.on={}),a=o[i],s=t.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[i]=[s].concat(a)):o[i]=s}(i.options,a);var p=function(e,r,i){var o=r.options.props;if(!t(o)){var a={},s=e.attrs,c=e.props;if(n(s)||n(c))for(var u in o){var l=w(u);nt(a,c,u,l,!0)||nt(a,s,u,l,!1)}return a}}(a,i);if(r(i.options.functional))return function(t,r,i,o,a){var s=t.options,c={},u=s.props;if(n(u))for(var l in u)c[l]=Ee(l,u,r||e);else n(i.attrs)&&Yt(c,i.attrs),n(i.props)&&Yt(c,i.props);var f=new Zt(i,c,a,o,t),p=s.render.call(null,f._c,f);if(p instanceof ue)return Xt(p,i,f.parent,s);if(Array.isArray(p)){for(var d=rt(p)||[],v=new Array(d.length),h=0;h<d.length;h++)v[h]=Xt(d[h],i,f.parent,s);return v}}(i,p,a,s,c);var d=a.on;if(a.on=a.nativeOn,r(i.options.abstract)){var v=a.slot;a={},v&&(a.slot=v)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<en.length;n++){var r=en[n],i=t[r],o=Qt[r];i===o||i&&i._merged||(t[r]=i?nn(o,i):o)}}(a);var h=i.options.name||u;return new ue("vue-component-"+i.cid+(h?"-"+h:""),a,void 0,void 0,void 0,s,{Ctor:i,propsData:p,listeners:d,tag:u,children:c},f)}}}function nn(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var rn=1,on=2;function an(e,a,s,c,u,l){return(Array.isArray(s)||i(s))&&(u=c,c=s,s=void 0),r(l)&&(u=on),function(e,i,a,s,c){if(n(a)&&n(a.__ob__))return fe();n(a)&&n(a.is)&&(i=a.is);if(!i)return fe();Array.isArray(s)&&"function"==typeof s[0]&&((a=a||{}).scopedSlots={default:s[0]},s.length=0);c===on?s=rt(s):c===rn&&(s=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(s));var u,l;if("string"==typeof i){var f;l=e.$vnode&&e.$vnode.ns||D.getTagNamespace(i),u=D.isReservedTag(i)?new ue(D.parsePlatformTagName(i),a,s,void 0,void 0,e):a&&a.pre||!n(f=je(e.$options,"components",i))?new ue(i,a,s,void 0,void 0,e):tn(f,a,e,s,i)}else u=tn(i,a,e,s);return Array.isArray(u)?u:n(u)?(n(l)&&function e(i,o,a){i.ns=o;"foreignObject"===i.tag&&(o=void 0,a=!0);if(n(i.children))for(var s=0,c=i.children.length;s<c;s++){var u=i.children[s];n(u.tag)&&(t(u.ns)||r(a)&&"svg"!==u.tag)&&e(u,o,a)}}(u,l),n(a)&&function(e){o(e.style)&&Ze(e.style);o(e.class)&&Ze(e.class)}(a),u):fe()}(e,a,s,c,u)}var sn=0;function cn(e){var t=e.options;if(e.super){var n=cn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.extendOptions,i=e.sealedOptions;for(var o in n)n[o]!==i[o]&&(t||(t={}),t[o]=un(n[o],r[o],i[o]));return t}(e);r&&k(e.extendOptions,r),(t=e.options=Ne(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function un(e,t,n){if(Array.isArray(e)){var r=[];n=Array.isArray(n)?n:[n],t=Array.isArray(t)?t:[t];for(var i=0;i<e.length;i++)(t.indexOf(e[i])>=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function ln(e){this._init(e)}function fn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name,a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=Ne(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)Nt(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)It(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,L.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=k({},a.options),i[r]=a,a}}function pn(e){return e&&(e.Ctor.options.name||e.tag)}function dn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:(n=e,"[object RegExp]"===a.call(n)&&e.test(t));var n}function vn(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=pn(a.componentOptions);s&&!t(s)&&hn(n,o,r,i)}}}function hn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,v(n,t)}!function(t){t.prototype._init=function(t){var n=this;n._uid=sn++,n._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(n,t):n.$options=Ne(cn(n.constructor),t||{},n),n._renderProxy=n,n._self=n,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(n),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&ft(e,t)}(n),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,i=r&&r.context;t.$slots=pt(n._renderChildren,i),t.$scopedSlots=e,t._c=function(e,n,r,i){return an(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return an(t,e,n,r,i,!0)};var o=r&&r.data;$e(t,"$attrs",o&&o.attrs||e,null,!0),$e(t,"$listeners",n._parentListeners||e,null,!0)}(n),_t(n,"beforeCreate"),function(e){var t=Pt(e.$options.inject,e);t&&(ge(!1),Object.keys(t).forEach(function(n){$e(e,n,t[n])}),ge(!0))}(n),jt(n),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(n),_t(n,"created"),n.$options.el&&n.$mount(n.$options.el)}}(ln),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=we,e.prototype.$delete=Ce,e.prototype.$watch=function(e,t,n){if(s(t))return Dt(this,e,t,n);(n=n||{}).user=!0;var r=new St(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){De(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(ln),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o=n._events[e];if(!o)return n;if(!t)return n._events[e]=null,n;if(t)for(var a,s=o.length;s--;)if((a=o[s])===t||a.fn===t){o.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this._events[e];if(t){t=t.length>1?x(t):t;for(var n=x(arguments,1),r=0,i=t.length;r<i;r++)try{t[r].apply(this,n)}catch(t){De(t,this,'event handler for "'+e+'"')}}return this}}(ln),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=mt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){_t(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||v(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),_t(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(ln),function(t){Gt(t.prototype),t.prototype.$nextTick=function(e){return We(e,this)},t.prototype._render=function(){var t,n=this,r=n.$options,i=r.render,o=r._parentVnode;o&&(n.$scopedSlots=o.data.scopedSlots||e),n.$vnode=o;try{t=i.call(n._renderProxy,n.$createElement)}catch(e){De(e,n,"render"),t=n._vnode}return t instanceof ue||(t=fe()),t.parent=o,t}}(ln);var mn=[String,RegExp,Array],yn={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:mn,exclude:mn,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)hn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){vn(e,function(e){return dn(t,e)})}),this.$watch("exclude",function(t){vn(e,function(e){return!dn(t,e)})})},render:function(){var e=this.$slots.default,t=st(e),n=t&&t.componentOptions;if(n){var r=pn(n),i=this.include,o=this.exclude;if(i&&(!r||!dn(i,r))||o&&r&&dn(o,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,v(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&hn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return D}};Object.defineProperty(e,"config",t),e.util={warn:re,extend:k,mergeOptions:Ne,defineReactive:$e},e.set=we,e.delete=Ce,e.nextTick=We,e.options=Object.create(null),L.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,k(e.options.components,yn),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=x(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ne(this.options,e),this}}(e),fn(e),function(e){L.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}(e)}(ln),Object.defineProperty(ln.prototype,"$isServer",{get:Y}),Object.defineProperty(ln.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(ln,"FunctionalRenderContext",{value:Zt}),ln.version="2.5.21";var gn=f("style,class"),_n=f("input,textarea,option,select,progress"),bn=function(e,t,n){return"value"===n&&_n(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},$n=f("contenteditable,draggable,spellcheck"),wn=f("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Cn="http://www.w3.org/1999/xlink",xn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},kn=function(e){return xn(e)?e.slice(6,e.length):""},An=function(e){return null==e||!1===e};function On(e){for(var t=e.data,r=e,i=e;n(i.componentInstance);)(i=i.componentInstance._vnode)&&i.data&&(t=Sn(i.data,t));for(;n(r=r.parent);)r&&r.data&&(t=Sn(t,r.data));return function(e,t){if(n(e)||n(t))return Tn(e,Nn(t));return""}(t.staticClass,t.class)}function Sn(e,t){return{staticClass:Tn(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function Tn(e,t){return e?t?e+" "+t:e:t||""}function Nn(e){return Array.isArray(e)?function(e){for(var t,r="",i=0,o=e.length;i<o;i++)n(t=Nn(e[i]))&&""!==t&&(r&&(r+=" "),r+=t);return r}(e):o(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var jn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},En=f("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),In=f("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Ln=function(e){return En(e)||In(e)};function Mn(e){return In(e)?"svg":"math"===e?"math":void 0}var Dn=Object.create(null);var Pn=f("text,number,password,search,email,tel,url");function Fn(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}var Rn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)},createElementNS:function(e,t){return document.createElementNS(jn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Hn={create:function(e,t){Bn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Bn(e,!0),Bn(t))},destroy:function(e){Bn(e,!0)}};function Bn(e,t){var r=e.data.ref;if(n(r)){var i=e.context,o=e.componentInstance||e.elm,a=i.$refs;t?Array.isArray(a[r])?v(a[r],o):a[r]===o&&(a[r]=void 0):e.data.refInFor?Array.isArray(a[r])?a[r].indexOf(o)<0&&a[r].push(o):a[r]=[o]:a[r]=o}}var Un=new ue("",{},[]),Vn=["create","activate","update","remove","destroy"];function zn(e,i){return e.key===i.key&&(e.tag===i.tag&&e.isComment===i.isComment&&n(e.data)===n(i.data)&&function(e,t){if("input"!==e.tag)return!0;var r,i=n(r=e.data)&&n(r=r.attrs)&&r.type,o=n(r=t.data)&&n(r=r.attrs)&&r.type;return i===o||Pn(i)&&Pn(o)}(e,i)||r(e.isAsyncPlaceholder)&&e.asyncFactory===i.asyncFactory&&t(i.asyncFactory.error))}function Kn(e,t,r){var i,o,a={};for(i=t;i<=r;++i)n(o=e[i].key)&&(a[o]=i);return a}var Jn={create:qn,update:qn,destroy:function(e){qn(e,Un)}};function qn(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===Un,a=t===Un,s=Gn(e.data.directives,e.context),c=Gn(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,Xn(i,"update",t,e),i.def&&i.def.componentUpdated&&l.push(i)):(Xn(i,"bind",t,e),i.def&&i.def.inserted&&u.push(i));if(u.length){var f=function(){for(var n=0;n<u.length;n++)Xn(u[n],"inserted",t,e)};o?tt(t,"insert",f):f()}l.length&&tt(t,"postpatch",function(){for(var n=0;n<l.length;n++)Xn(l[n],"componentUpdated",t,e)});if(!o)for(n in s)c[n]||Xn(s[n],"unbind",e,e,a)}(e,t)}var Wn=Object.create(null);function Gn(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=Wn),i[Zn(r)]=r,r.def=je(t.$options,"directives",r.name);return i}function Zn(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Xn(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){De(r,n.context,"directive "+e.name+" "+t+" hook")}}var Yn=[Hn,Jn];function Qn(e,r){var i=r.componentOptions;if(!(n(i)&&!1===i.Ctor.options.inheritAttrs||t(e.data.attrs)&&t(r.data.attrs))){var o,a,s=r.elm,c=e.data.attrs||{},u=r.data.attrs||{};for(o in n(u.__ob__)&&(u=r.data.attrs=k({},u)),u)a=u[o],c[o]!==a&&er(s,o,a);for(o in(K||q)&&u.value!==c.value&&er(s,"value",u.value),c)t(u[o])&&(xn(o)?s.removeAttributeNS(Cn,kn(o)):$n(o)||s.removeAttribute(o))}}function er(e,t,n){e.tagName.indexOf("-")>-1?tr(e,t,n):wn(t)?An(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):$n(t)?e.setAttribute(t,An(n)||"false"===n?"false":"true"):xn(t)?An(n)?e.removeAttributeNS(Cn,kn(t)):e.setAttributeNS(Cn,t,n):tr(e,t,n)}function tr(e,t,n){if(An(n))e.removeAttribute(t);else{if(K&&!J&&("TEXTAREA"===e.tagName||"INPUT"===e.tagName)&&"placeholder"===t&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var nr={create:Qn,update:Qn};function rr(e,r){var i=r.elm,o=r.data,a=e.data;if(!(t(o.staticClass)&&t(o.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=On(r),c=i._transitionClasses;n(c)&&(s=Tn(s,Nn(c))),s!==i._prevClass&&(i.setAttribute("class",s),i._prevClass=s)}}var ir,or,ar,sr,cr,ur,lr={create:rr,update:rr},fr=/[\w).+\-_$\]]/;function pr(e){var t,n,r,i,o,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(u)47===t&&92!==n&&(u=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||l||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&fr.test(h)||(u=!0)}}else void 0===i?(d=r+1,i=e.slice(0,r).trim()):m();function m(){(o||(o=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===i?i=e.slice(0,r).trim():0!==d&&m(),o)for(r=0;r<o.length;r++)i=dr(i,o[r]);return i}function dr(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),i=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==i?","+i:i)}function vr(e){console.error("[Vue compiler]: "+e)}function hr(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function mr(e,t,n){(e.props||(e.props=[])).push({name:t,value:n}),e.plain=!1}function yr(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n}),e.plain=!1}function gr(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function _r(e,t,n,r,i,o){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:i,modifiers:o}),e.plain=!1}function br(t,n,r,i,o,a){var s;i=i||e,"click"===n&&(i.right?(n="contextmenu",delete i.right):i.middle&&(n="mouseup")),i.capture&&(delete i.capture,n="!"+n),i.once&&(delete i.once,n="~"+n),i.passive&&(delete i.passive,n="&"+n),i.native?(delete i.native,s=t.nativeEvents||(t.nativeEvents={})):s=t.events||(t.events={});var c={value:r.trim()};i!==e&&(c.modifiers=i);var u=s[n];Array.isArray(u)?o?u.unshift(c):u.push(c):s[n]=u?o?[c,u]:[u,c]:c,t.plain=!1}function $r(e,t,n){var r=wr(e,":"+t)||wr(e,"v-bind:"+t);if(null!=r)return pr(r);if(!1!==n){var i=wr(e,t);if(null!=i)return JSON.stringify(i)}}function wr(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var i=e.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===t){i.splice(o,1);break}return n&&delete e.attrsMap[t],r}function Cr(e,t,n){var r=n||{},i=r.number,o="$$v";r.trim&&(o="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(o="_n("+o+")");var a=xr(t,o);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function xr(e,t){var n=function(e){if(e=e.trim(),ir=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<ir-1)return(sr=e.lastIndexOf("."))>-1?{exp:e.slice(0,sr),key:'"'+e.slice(sr+1)+'"'}:{exp:e,key:null};or=e,sr=cr=ur=0;for(;!Ar();)Or(ar=kr())?Tr(ar):91===ar&&Sr(ar);return{exp:e.slice(0,cr),key:e.slice(cr+1,ur)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function kr(){return or.charCodeAt(++sr)}function Ar(){return sr>=ir}function Or(e){return 34===e||39===e}function Sr(e){var t=1;for(cr=sr;!Ar();)if(Or(e=kr()))Tr(e);else if(91===e&&t++,93===e&&t--,0===t){ur=sr;break}}function Tr(e){for(var t=e;!Ar()&&(e=kr())!==t;);}var Nr,jr="__r",Er="__c";function Ir(e,t,n){var r=Nr;return function i(){null!==t.apply(null,arguments)&&Mr(e,i,n,r)}}function Lr(e,t,n,r){var i;t=(i=t)._withTask||(i._withTask=function(){ze=!0;try{return i.apply(null,arguments)}finally{ze=!1}}),Nr.addEventListener(e,t,Z?{capture:n,passive:r}:n)}function Mr(e,t,n,r){(r||Nr).removeEventListener(e,t._withTask||t,n)}function Dr(e,r){if(!t(e.data.on)||!t(r.data.on)){var i=r.data.on||{},o=e.data.on||{};Nr=r.elm,function(e){if(n(e[jr])){var t=K?"change":"input";e[t]=[].concat(e[jr],e[t]||[]),delete e[jr]}n(e[Er])&&(e.change=[].concat(e[Er],e.change||[]),delete e[Er])}(i),et(i,o,Lr,Mr,Ir,r.context),Nr=void 0}}var Pr={create:Dr,update:Dr};function Fr(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var i,o,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(i in n(c.__ob__)&&(c=r.data.domProps=k({},c)),s)t(c[i])&&(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var u=t(o)?"":String(o);Rr(a,u)&&(a.value=u)}else a[i]=o}}}function Rr(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,i=e._vModifiers;if(n(i)){if(i.lazy)return!1;if(i.number)return l(r)!==l(t);if(i.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var Hr={create:Fr,update:Fr},Br=y(function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach(function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t});function Ur(e){var t=Vr(e.style);return e.staticStyle?k(e.staticStyle,t):t}function Vr(e){return Array.isArray(e)?A(e):"string"==typeof e?Br(e):e}var zr,Kr=/^--/,Jr=/\s*!important$/,qr=function(e,t,n){if(Kr.test(t))e.style.setProperty(t,n);else if(Jr.test(n))e.style.setProperty(t,n.replace(Jr,""),"important");else{var r=Gr(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Wr=["Webkit","Moz","ms"],Gr=y(function(e){if(zr=zr||document.createElement("div").style,"filter"!==(e=_(e))&&e in zr)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Wr.length;n++){var r=Wr[n]+t;if(r in zr)return r}});function Zr(e,r){var i=r.data,o=e.data;if(!(t(i.staticStyle)&&t(i.style)&&t(o.staticStyle)&&t(o.style))){var a,s,c=r.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},f=u||l,p=Vr(r.data.style)||{};r.data.normalizedStyle=n(p.__ob__)?k({},p):p;var d=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Ur(i.data))&&k(r,n);(n=Ur(e.data))&&k(r,n);for(var o=e;o=o.parent;)o.data&&(n=Ur(o.data))&&k(r,n);return r}(r,!0);for(s in f)t(d[s])&&qr(c,s,"");for(s in d)(a=d[s])!==f[s]&&qr(c,s,null==a?"":a)}}var Xr={create:Zr,update:Zr},Yr=/\s+/;function Qr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Yr).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ei(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Yr).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function ti(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&k(t,ni(e.name||"v")),k(t,e),t}return"string"==typeof e?ni(e):void 0}}var ni=y(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),ri=B&&!J,ii="transition",oi="animation",ai="transition",si="transitionend",ci="animation",ui="animationend";ri&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(ai="WebkitTransition",si="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ci="WebkitAnimation",ui="webkitAnimationEnd"));var li=B?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function fi(e){li(function(){li(e)})}function pi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Qr(e,t))}function di(e,t){e._transitionClasses&&v(e._transitionClasses,t),ei(e,t)}function vi(e,t,n){var r=mi(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===ii?si:ui,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),e.addEventListener(s,l)}var hi=/\b(transform|all)(,|$)/;function mi(e,t){var n,r=window.getComputedStyle(e),i=(r[ai+"Delay"]||"").split(", "),o=(r[ai+"Duration"]||"").split(", "),a=yi(i,o),s=(r[ci+"Delay"]||"").split(", "),c=(r[ci+"Duration"]||"").split(", "),u=yi(s,c),l=0,f=0;return t===ii?a>0&&(n=ii,l=a,f=o.length):t===oi?u>0&&(n=oi,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?ii:oi:null)?n===ii?o.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===ii&&hi.test(r[ai+"Property"])}}function yi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return gi(t)+gi(e[n])}))}function gi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function _i(e,r){var i=e.elm;n(i._leaveCb)&&(i._leaveCb.cancelled=!0,i._leaveCb());var a=ti(e.data.transition);if(!t(a)&&!n(i._enterCb)&&1===i.nodeType){for(var s=a.css,c=a.type,u=a.enterClass,f=a.enterToClass,p=a.enterActiveClass,d=a.appearClass,v=a.appearToClass,h=a.appearActiveClass,m=a.beforeEnter,y=a.enter,g=a.afterEnter,_=a.enterCancelled,b=a.beforeAppear,$=a.appear,w=a.afterAppear,C=a.appearCancelled,x=a.duration,k=ht,A=ht.$vnode;A&&A.parent;)k=(A=A.parent).context;var O=!k._isMounted||!e.isRootInsert;if(!O||$||""===$){var S=O&&d?d:u,T=O&&h?h:p,N=O&&v?v:f,j=O&&b||m,I=O&&"function"==typeof $?$:y,L=O&&w||g,M=O&&C||_,D=l(o(x)?x.enter:x),P=!1!==s&&!J,F=wi(I),R=i._enterCb=E(function(){P&&(di(i,N),di(i,T)),R.cancelled?(P&&di(i,S),M&&M(i)):L&&L(i),i._enterCb=null});e.data.show||tt(e,"insert",function(){var t=i.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),I&&I(i,R)}),j&&j(i),P&&(pi(i,S),pi(i,T),fi(function(){di(i,S),R.cancelled||(pi(i,N),F||($i(D)?setTimeout(R,D):vi(i,c,R)))})),e.data.show&&(r&&r(),I&&I(i,R)),P||F||R()}}}function bi(e,r){var i=e.elm;n(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var a=ti(e.data.transition);if(t(a)||1!==i.nodeType)return r();if(!n(i._leaveCb)){var s=a.css,c=a.type,u=a.leaveClass,f=a.leaveToClass,p=a.leaveActiveClass,d=a.beforeLeave,v=a.leave,h=a.afterLeave,m=a.leaveCancelled,y=a.delayLeave,g=a.duration,_=!1!==s&&!J,b=wi(v),$=l(o(g)?g.leave:g),w=i._leaveCb=E(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(di(i,f),di(i,p)),w.cancelled?(_&&di(i,u),m&&m(i)):(r(),h&&h(i)),i._leaveCb=null});y?y(C):C()}function C(){w.cancelled||(!e.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),d&&d(i),_&&(pi(i,u),pi(i,p),fi(function(){di(i,u),w.cancelled||(pi(i,f),b||($i($)?setTimeout(w,$):vi(i,c,w)))})),v&&v(i,w),_||b||w())}}function $i(e){return"number"==typeof e&&!isNaN(e)}function wi(e){if(t(e))return!1;var r=e.fns;return n(r)?wi(Array.isArray(r)?r[0]:r):(e._length||e.length)>1}function Ci(e,t){!0!==t.data.show&&_i(t)}var xi=function(e){var o,a,s={},c=e.modules,u=e.nodeOps;for(o=0;o<Vn.length;++o)for(s[Vn[o]]=[],a=0;a<c.length;++a)n(c[a][Vn[o]])&&s[Vn[o]].push(c[a][Vn[o]]);function l(e){var t=u.parentNode(e);n(t)&&u.removeChild(t,e)}function p(e,t,i,o,a,c,l){if(n(e.elm)&&n(c)&&(e=c[l]=de(e)),e.isRootInsert=!a,!function(e,t,i,o){var a=e.data;if(n(a)){var c=n(e.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(e,!1),n(e.componentInstance))return d(e,t),v(i,e.elm,o),r(c)&&function(e,t,r,i){for(var o,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,n(o=a.data)&&n(o=o.transition)){for(o=0;o<s.activate.length;++o)s.activate[o](Un,a);t.push(a);break}v(r,e.elm,i)}(e,t,i,o),!0}}(e,t,i,o)){var f=e.data,p=e.children,m=e.tag;n(m)?(e.elm=e.ns?u.createElementNS(e.ns,m):u.createElement(m,e),g(e),h(e,p,t),n(f)&&y(e,t),v(i,e.elm,o)):r(e.isComment)?(e.elm=u.createComment(e.text),v(i,e.elm,o)):(e.elm=u.createTextNode(e.text),v(i,e.elm,o))}}function d(e,t){n(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(y(e,t),g(e)):(Bn(e),t.push(e))}function v(e,t,r){n(e)&&(n(r)?u.parentNode(r)===e&&u.insertBefore(e,t,r):u.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)p(t[r],n,e.elm,null,!0,t,r);else i(e.text)&&u.appendChild(e.elm,u.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return n(e.tag)}function y(e,t){for(var r=0;r<s.create.length;++r)s.create[r](Un,e);n(o=e.data.hook)&&(n(o.create)&&o.create(Un,e),n(o.insert)&&t.push(e))}function g(e){var t;if(n(t=e.fnScopeId))u.setStyleScope(e.elm,t);else for(var r=e;r;)n(t=r.context)&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t),r=r.parent;n(t=ht)&&t!==e.context&&t!==e.fnContext&&n(t=t.$options._scopeId)&&u.setStyleScope(e.elm,t)}function _(e,t,n,r,i,o){for(;r<=i;++r)p(n[r],o,e,t,!1,n,r)}function b(e){var t,r,i=e.data;if(n(i))for(n(t=i.hook)&&n(t=t.destroy)&&t(e),t=0;t<s.destroy.length;++t)s.destroy[t](e);if(n(t=e.children))for(r=0;r<e.children.length;++r)b(e.children[r])}function $(e,t,r,i){for(;r<=i;++r){var o=t[r];n(o)&&(n(o.tag)?(w(o),b(o)):l(o.elm))}}function w(e,t){if(n(t)||n(e.data)){var r,i=s.remove.length+1;for(n(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&l(e)}return n.listeners=t,n}(e.elm,i),n(r=e.componentInstance)&&n(r=r._vnode)&&n(r.data)&&w(r,t),r=0;r<s.remove.length;++r)s.remove[r](e,t);n(r=e.data.hook)&&n(r=r.remove)?r(e,t):t()}else l(e.elm)}function C(e,t,r,i){for(var o=r;o<i;o++){var a=t[o];if(n(a)&&zn(e,a))return o}}function x(e,i,o,a,c,l){if(e!==i){n(i.elm)&&n(a)&&(i=a[c]=de(i));var f=i.elm=e.elm;if(r(e.isAsyncPlaceholder))n(i.asyncFactory.resolved)?O(e.elm,i,o):i.isAsyncPlaceholder=!0;else if(r(i.isStatic)&&r(e.isStatic)&&i.key===e.key&&(r(i.isCloned)||r(i.isOnce)))i.componentInstance=e.componentInstance;else{var d,v=i.data;n(v)&&n(d=v.hook)&&n(d=d.prepatch)&&d(e,i);var h=e.children,y=i.children;if(n(v)&&m(i)){for(d=0;d<s.update.length;++d)s.update[d](e,i);n(d=v.hook)&&n(d=d.update)&&d(e,i)}t(i.text)?n(h)&&n(y)?h!==y&&function(e,r,i,o,a){for(var s,c,l,f=0,d=0,v=r.length-1,h=r[0],m=r[v],y=i.length-1,g=i[0],b=i[y],w=!a;f<=v&&d<=y;)t(h)?h=r[++f]:t(m)?m=r[--v]:zn(h,g)?(x(h,g,o,i,d),h=r[++f],g=i[++d]):zn(m,b)?(x(m,b,o,i,y),m=r[--v],b=i[--y]):zn(h,b)?(x(h,b,o,i,y),w&&u.insertBefore(e,h.elm,u.nextSibling(m.elm)),h=r[++f],b=i[--y]):zn(m,g)?(x(m,g,o,i,d),w&&u.insertBefore(e,m.elm,h.elm),m=r[--v],g=i[++d]):(t(s)&&(s=Kn(r,f,v)),t(c=n(g.key)?s[g.key]:C(g,r,f,v))?p(g,o,e,h.elm,!1,i,d):zn(l=r[c],g)?(x(l,g,o,i,d),r[c]=void 0,w&&u.insertBefore(e,l.elm,h.elm)):p(g,o,e,h.elm,!1,i,d),g=i[++d]);f>v?_(e,t(i[y+1])?null:i[y+1].elm,i,d,y,o):d>y&&$(0,r,f,v)}(f,h,y,o,l):n(y)?(n(e.text)&&u.setTextContent(f,""),_(f,null,y,0,y.length-1,o)):n(h)?$(0,h,0,h.length-1):n(e.text)&&u.setTextContent(f,""):e.text!==i.text&&u.setTextContent(f,i.text),n(v)&&n(d=v.hook)&&n(d=d.postpatch)&&d(e,i)}}}function k(e,t,i){if(r(i)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var o=0;o<t.length;++o)t[o].data.hook.insert(t[o])}var A=f("attrs,class,staticClass,staticStyle,key");function O(e,t,i,o){var a,s=t.tag,c=t.data,u=t.children;if(o=o||c&&c.pre,t.elm=e,r(t.isComment)&&n(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(n(c)&&(n(a=c.hook)&&n(a=a.init)&&a(t,!0),n(a=t.componentInstance)))return d(t,i),!0;if(n(s)){if(n(u))if(e.hasChildNodes())if(n(a=c)&&n(a=a.domProps)&&n(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var l=!0,f=e.firstChild,p=0;p<u.length;p++){if(!f||!O(f,u[p],i,o)){l=!1;break}f=f.nextSibling}if(!l||f)return!1}else h(t,u,i);if(n(c)){var v=!1;for(var m in c)if(!A(m)){v=!0,y(t,i);break}!v&&c.class&&Ze(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,i,o,a){if(!t(i)){var c,l=!1,f=[];if(t(e))l=!0,p(i,f);else{var d=n(e.nodeType);if(!d&&zn(e,i))x(e,i,f,null,null,a);else{if(d){if(1===e.nodeType&&e.hasAttribute(I)&&(e.removeAttribute(I),o=!0),r(o)&&O(e,i,f))return k(i,f,!0),e;c=e,e=new ue(u.tagName(c).toLowerCase(),{},[],void 0,c)}var v=e.elm,h=u.parentNode(v);if(p(i,f,v._leaveCb?null:h,u.nextSibling(v)),n(i.parent))for(var y=i.parent,g=m(i);y;){for(var _=0;_<s.destroy.length;++_)s.destroy[_](y);if(y.elm=i.elm,g){for(var w=0;w<s.create.length;++w)s.create[w](Un,y);var C=y.data.hook.insert;if(C.merged)for(var A=1;A<C.fns.length;A++)C.fns[A]()}else Bn(y);y=y.parent}n(h)?$(0,[e],0,0):n(e.tag)&&b(e)}}return k(i,f,l),i.elm}n(e)&&b(e)}}({nodeOps:Rn,modules:[nr,lr,Pr,Hr,Xr,B?{create:Ci,activate:Ci,remove:function(e,t){!0!==e.data.show?bi(e,t):t()}}:{}].concat(Yn)});J&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Ei(e,"input")});var ki={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?tt(n,"postpatch",function(){ki.componentUpdated(e,t,n)}):Ai(e,t,n.context),e._vOptions=[].map.call(e.options,Ti)):("textarea"===n.tag||Pn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Ni),e.addEventListener("compositionend",ji),e.addEventListener("change",ji),J&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Ai(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,Ti);if(i.some(function(e,t){return!N(e,r[t])}))(e.multiple?t.value.some(function(e){return Si(e,i)}):t.value!==t.oldValue&&Si(t.value,i))&&Ei(e,"change")}}};function Ai(e,t,n){Oi(e,t,n),(K||q)&&setTimeout(function(){Oi(e,t,n)},0)}function Oi(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],i)o=j(r,Ti(a))>-1,a.selected!==o&&(a.selected=o);else if(N(Ti(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Si(e,t){return t.every(function(t){return!N(t,e)})}function Ti(e){return"_value"in e?e._value:e.value}function Ni(e){e.target.composing=!0}function ji(e){e.target.composing&&(e.target.composing=!1,Ei(e.target,"input"))}function Ei(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Ii(e){return!e.componentInstance||e.data&&e.data.transition?e:Ii(e.componentInstance._vnode)}var Li={model:ki,show:{bind:function(e,t,n){var r=t.value,i=(n=Ii(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,_i(n,function(){e.style.display=o})):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=Ii(n)).data&&n.data.transition?(n.data.show=!0,r?_i(n,function(){e.style.display=e.__vOriginalDisplay}):bi(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},Mi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Di(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Di(st(t.children)):e}function Pi(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[_(o)]=i[o];return t}function Fi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ri=function(e){return e.tag||at(e)},Hi=function(e){return"show"===e.name},Bi={name:"transition",props:Mi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(Ri)).length){var r=this.mode,o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var a=Di(o);if(!a)return o;if(this._leaving)return Fi(e,o);var s="__transition-"+this._uid+"-";a.key=null==a.key?a.isComment?s+"comment":s+a.tag:i(a.key)?0===String(a.key).indexOf(s)?a.key:s+a.key:a.key;var c=(a.data||(a.data={})).transition=Pi(this),u=this._vnode,l=Di(u);if(a.data.directives&&a.data.directives.some(Hi)&&(a.data.show=!0),l&&l.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(a,l)&&!at(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var f=l.data.transition=k({},c);if("out-in"===r)return this._leaving=!0,tt(f,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Fi(e,o);if("in-out"===r){if(at(a))return u;var p,d=function(){p()};tt(c,"afterEnter",d),tt(c,"enterCancelled",d),tt(f,"delayLeave",function(e){p=e})}}return o}}},Ui=k({tag:String,moveClass:String},Mi);function Vi(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function zi(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ki(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete Ui.mode;var Ji={Transition:Bi,TransitionGroup:{props:Ui,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=mt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Pi(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):l.push(p)}this.kept=e(t,null,u),this.removed=l}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Vi),e.forEach(zi),e.forEach(Ki),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;pi(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(si,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(si,e),n._moveCb=null,di(n,t))})}}))},methods:{hasMove:function(e,t){if(!ri)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){ei(n,e)}),Qr(n,t),n.style.display="none",this.$el.appendChild(n);var r=mi(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};ln.config.mustUseProp=bn,ln.config.isReservedTag=Ln,ln.config.isReservedAttr=gn,ln.config.getTagNamespace=Mn,ln.config.isUnknownElement=function(e){if(!B)return!0;if(Ln(e))return!1;if(e=e.toLowerCase(),null!=Dn[e])return Dn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Dn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Dn[e]=/HTMLUnknownElement/.test(t.toString())},k(ln.options.directives,Li),k(ln.options.components,Ji),ln.prototype.__patch__=B?xi:O,ln.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=fe),_t(e,"beforeMount"),r=function(){e._update(e._render(),n)},new St(e,r,O,{before:function(){e._isMounted&&!e._isDestroyed&&_t(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,_t(e,"mounted")),e}(this,e=e&&B?Fn(e):void 0,t)},B&&setTimeout(function(){D.devtools&&Q&&Q.emit("init",ln)},0);var qi=/\{\{((?:.|\r?\n)+?)\}\}/g,Wi=/[-.*+?^${}()|[\]\/\\]/g,Gi=y(function(e){var t=e[0].replace(Wi,"\\$&"),n=e[1].replace(Wi,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")});var Zi={staticKeys:["staticClass"],transformNode:function(e,t){t.warn;var n=wr(e,"class");n&&(e.staticClass=JSON.stringify(n));var r=$r(e,"class",!1);r&&(e.classBinding=r)},genData:function(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}};var Xi,Yi={staticKeys:["staticStyle"],transformNode:function(e,t){t.warn;var n=wr(e,"style");n&&(e.staticStyle=JSON.stringify(Br(n)));var r=$r(e,"style",!1);r&&(e.styleBinding=r)},genData:function(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}},Qi=function(e){return(Xi=Xi||document.createElement("div")).innerHTML=e,Xi.textContent},eo=f("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),to=f("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),no=f("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),ro=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,io="[a-zA-Z_][\\w\\-\\.]*",oo="((?:"+io+"\\:)?"+io+")",ao=new RegExp("^<"+oo),so=/^\s*(\/?)>/,co=new RegExp("^<\\/"+oo+"[^>]*>"),uo=/^<!DOCTYPE [^>]+>/i,lo=/^<!\--/,fo=/^<!\[/,po=f("script,style,textarea",!0),vo={},ho={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},mo=/&(?:lt|gt|quot|amp);/g,yo=/&(?:lt|gt|quot|amp|#10|#9);/g,go=f("pre,textarea",!0),_o=function(e,t){return e&&go(e)&&"\n"===t[0]};function bo(e,t){var n=t?yo:mo;return e.replace(n,function(e){return ho[e]})}var $o,wo,Co,xo,ko,Ao,Oo,So,To=/^@|^v-on:/,No=/^v-|^@|^:/,jo=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Eo=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Io=/^\(|\)$/g,Lo=/:(.*)$/,Mo=/^:|^v-bind:/,Do=/\.[^.]+/g,Po=y(Qi);function Fo(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}(t),parent:n,children:[]}}function Ro(e,t){$o=t.warn||vr,Ao=t.isPreTag||S,Oo=t.mustUseProp||S,So=t.getTagNamespace||S,Co=hr(t.modules,"transformNode"),xo=hr(t.modules,"preTransformNode"),ko=hr(t.modules,"postTransformNode"),wo=t.delimiters;var n,r,i=[],o=!1!==t.preserveWhitespace,a=!1,s=!1;function c(e){e.pre&&(a=!1),Ao(e.tag)&&(s=!1);for(var n=0;n<ko.length;n++)ko[n](e,t)}return function(e,t){for(var n,r,i=[],o=t.expectHTML,a=t.isUnaryTag||S,s=t.canBeLeftOpenTag||S,c=0;e;){if(n=e,r&&po(r)){var u=0,l=r.toLowerCase(),f=vo[l]||(vo[l]=new RegExp("([\\s\\S]*?)(</"+l+"[^>]*>)","i")),p=e.replace(f,function(e,n,r){return u=r.length,po(l)||"noscript"===l||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),_o(l,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});c+=e.length-p.length,e=p,A(l,c-u,c)}else{var d=e.indexOf("<");if(0===d){if(lo.test(e)){var v=e.indexOf("--\x3e");if(v>=0){t.shouldKeepComment&&t.comment(e.substring(4,v)),C(v+3);continue}}if(fo.test(e)){var h=e.indexOf("]>");if(h>=0){C(h+2);continue}}var m=e.match(uo);if(m){C(m[0].length);continue}var y=e.match(co);if(y){var g=c;C(y[0].length),A(y[1],g,c);continue}var _=x();if(_){k(_),_o(_.tagName,e)&&C(1);continue}}var b=void 0,$=void 0,w=void 0;if(d>=0){for($=e.slice(d);!(co.test($)||ao.test($)||lo.test($)||fo.test($)||(w=$.indexOf("<",1))<0);)d+=w,$=e.slice(d);b=e.substring(0,d),C(d)}d<0&&(b=e,e=""),t.chars&&b&&t.chars(b)}if(e===n){t.chars&&t.chars(e);break}}function C(t){c+=t,e=e.substring(t)}function x(){var t=e.match(ao);if(t){var n,r,i={tagName:t[1],attrs:[],start:c};for(C(t[0].length);!(n=e.match(so))&&(r=e.match(ro));)C(r[0].length),i.attrs.push(r);if(n)return i.unarySlash=n[1],C(n[0].length),i.end=c,i}}function k(e){var n=e.tagName,c=e.unarySlash;o&&("p"===r&&no(n)&&A(r),s(n)&&r===n&&A(n));for(var u=a(n)||!!c,l=e.attrs.length,f=new Array(l),p=0;p<l;p++){var d=e.attrs[p],v=d[3]||d[4]||d[5]||"",h="a"===n&&"href"===d[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;f[p]={name:d[1],value:bo(v,h)}}u||(i.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f}),r=n),t.start&&t.start(n,f,u,e.start,e.end)}function A(e,n,o){var a,s;if(null==n&&(n=c),null==o&&(o=c),e)for(s=e.toLowerCase(),a=i.length-1;a>=0&&i[a].lowerCasedTag!==s;a--);else a=0;if(a>=0){for(var u=i.length-1;u>=a;u--)t.end&&t.end(i[u].tag,n,o);i.length=a,r=a&&i[a-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,o):"p"===s&&(t.start&&t.start(e,[],!1,n,o),t.end&&t.end(e,n,o))}A()}(e,{warn:$o,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,o,u){var l=r&&r.ns||So(e);K&&"svg"===l&&(o=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];zo.test(r.name)||(r.name=r.name.replace(Ko,""),t.push(r))}return t}(o));var f,p=Fo(e,o,r);l&&(p.ns=l),"style"!==(f=p).tag&&("script"!==f.tag||f.attrsMap.type&&"text/javascript"!==f.attrsMap.type)||Y()||(p.forbidden=!0);for(var d=0;d<xo.length;d++)p=xo[d](p,t)||p;if(a||(!function(e){null!=wr(e,"v-pre")&&(e.pre=!0)}(p),p.pre&&(a=!0)),Ao(p.tag)&&(s=!0),a?function(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}(p):p.processed||(Bo(p),function(e){var t=wr(e,"v-if");if(t)e.if=t,Uo(e,{exp:t,block:e});else{null!=wr(e,"v-else")&&(e.else=!0);var n=wr(e,"v-else-if");n&&(e.elseif=n)}}(p),function(e){null!=wr(e,"v-once")&&(e.once=!0)}(p),Ho(p,t)),n?i.length||n.if&&(p.elseif||p.else)&&Uo(n,{exp:p.elseif,block:p}):n=p,r&&!p.forbidden)if(p.elseif||p.else)!function(e,t){var n=function(e){var t=e.length;for(;t--;){if(1===e[t].type)return e[t];e.pop()}}(t.children);n&&n.if&&Uo(n,{exp:e.elseif,block:e})}(p,r);else if(p.slotScope){r.plain=!1;var v=p.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[v]=p}else r.children.push(p),p.parent=r;u?c(p):(r=p,i.push(p))},end:function(){var e=i[i.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!s&&e.children.pop(),i.length-=1,r=i[i.length-1],c(e)},chars:function(e){if(r&&(!K||"textarea"!==r.tag||r.attrsMap.placeholder!==e)){var t,n,i=r.children;if(e=s||e.trim()?"script"===(t=r).tag||"style"===t.tag?e:Po(e):o&&i.length?" ":"")!a&&" "!==e&&(n=function(e,t){var n=t?Gi(t):qi;if(n.test(e)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(i=r.index)>c&&(s.push(o=e.slice(c,i)),a.push(JSON.stringify(o)));var u=pr(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<e.length&&(s.push(o=e.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}(e,wo))?i.push({type:2,expression:n.expression,tokens:n.tokens,text:e}):" "===e&&i.length&&" "===i[i.length-1].text||i.push({type:3,text:e})}},comment:function(e){r.children.push({type:3,text:e,isComment:!0})}}),n}function Ho(e,t){var n,r;(r=$r(n=e,"key"))&&(n.key=r),e.plain=!e.key&&!e.attrsList.length,function(e){var t=$r(e,"ref");t&&(e.ref=t,e.refInFor=function(e){var t=e;for(;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}(e))}(e),function(e){if("slot"===e.tag)e.slotName=$r(e,"name");else{var t;"template"===e.tag?(t=wr(e,"scope"),e.slotScope=t||wr(e,"slot-scope")):(t=wr(e,"slot-scope"))&&(e.slotScope=t);var n=$r(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||yr(e,"slot",n))}}(e),function(e){var t;(t=$r(e,"is"))&&(e.component=t);null!=wr(e,"inline-template")&&(e.inlineTemplate=!0)}(e);for(var i=0;i<Co.length;i++)e=Co[i](e,t)||e;!function(e){var t,n,r,i,o,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=i=c[t].name,o=c[t].value,No.test(r))if(e.hasBindings=!0,(a=Vo(r))&&(r=r.replace(Do,"")),Mo.test(r))r=r.replace(Mo,""),o=pr(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=_(r))&&(r="innerHTML")),a.camel&&(r=_(r)),a.sync&&br(e,"update:"+_(r),xr(o,"$event"))),s||!e.component&&Oo(e.tag,e.attrsMap.type,r)?mr(e,r,o):yr(e,r,o);else if(To.test(r))r=r.replace(To,""),br(e,r,o,a,!1);else{var u=(r=r.replace(No,"")).match(Lo),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),_r(e,r,i,o,l,a)}else yr(e,r,JSON.stringify(o)),!e.component&&"muted"===r&&Oo(e.tag,e.attrsMap.type,r)&&mr(e,r,"true")}(e)}function Bo(e){var t;if(t=wr(e,"v-for")){var n=function(e){var t=e.match(jo);if(!t)return;var n={};n.for=t[2].trim();var r=t[1].trim().replace(Io,""),i=r.match(Eo);i?(n.alias=r.replace(Eo,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r;return n}(t);n&&k(e,n)}}function Uo(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function Vo(e){var t=e.match(Do);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}var zo=/^xmlns:NS\d+/,Ko=/^NS\d+:/;function Jo(e){return Fo(e.tag,e.attrsList.slice(),e.parent)}var qo=[Zi,Yi,{preTransformNode:function(e,t){if("input"===e.tag){var n,r=e.attrsMap;if(!r["v-model"])return;if((r[":type"]||r["v-bind:type"])&&(n=$r(e,"type")),r.type||n||!r["v-bind"]||(n="("+r["v-bind"]+").type"),n){var i=wr(e,"v-if",!0),o=i?"&&("+i+")":"",a=null!=wr(e,"v-else",!0),s=wr(e,"v-else-if",!0),c=Jo(e);Bo(c),gr(c,"type","checkbox"),Ho(c,t),c.processed=!0,c.if="("+n+")==='checkbox'"+o,Uo(c,{exp:c.if,block:c});var u=Jo(e);wr(u,"v-for",!0),gr(u,"type","radio"),Ho(u,t),Uo(c,{exp:"("+n+")==='radio'"+o,block:u});var l=Jo(e);return wr(l,"v-for",!0),gr(l,":type",n),Ho(l,t),Uo(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}}];var Wo,Go,Zo={expectHTML:!0,modules:qo,directives:{model:function(e,t,n){var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;if(e.component)return Cr(e,r,i),!1;if("select"===o)!function(e,t,n){var r='var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"});";r=r+" "+xr(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),br(e,"change",r,null,!0)}(e,r,i);else if("input"===o&&"checkbox"===a)!function(e,t,n){var r=n&&n.number,i=$r(e,"value")||"null",o=$r(e,"true-value")||"true",a=$r(e,"false-value")||"false";mr(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),br(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+xr(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+xr(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+xr(t,"$$c")+"}",null,!0)}(e,r,i);else if("input"===o&&"radio"===a)!function(e,t,n){var r=n&&n.number,i=$r(e,"value")||"null";mr(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),br(e,"change",xr(t,i),null,!0)}(e,r,i);else if("input"===o||"textarea"===o)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?jr:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var f=xr(t,l);c&&(f="if($event.target.composing)return;"+f),mr(e,"value","("+t+")"),br(e,u,f,null,!0),(s||a)&&br(e,"blur","$forceUpdate()")}(e,r,i);else if(!D.isReservedTag(o))return Cr(e,r,i),!1;return!0},text:function(e,t){t.value&&mr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&mr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:eo,mustUseProp:bn,canBeLeftOpenTag:to,isReservedTag:Ln,getTagNamespace:Mn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(qo)},Xo=y(function(e){return f("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function Yo(e,t){e&&(Wo=Xo(t.staticKeys||""),Go=t.isReservedTag||S,function e(t){t.static=function(e){if(2===e.type)return!1;if(3===e.type)return!0;return!(!e.pre&&(e.hasBindings||e.if||e.for||p(e.tag)||!Go(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Wo)))}(t);if(1===t.type){if(!Go(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var n=0,r=t.children.length;n<r;n++){var i=t.children[n];e(i),i.static||(t.static=!1)}if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++){var s=t.ifConditions[o].block;e(s),s.static||(t.static=!1)}}}(e),function e(t,n){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=n),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var r=0,i=t.children.length;r<i;r++)e(t.children[r],n||!!t.for);if(t.ifConditions)for(var o=1,a=t.ifConditions.length;o<a;o++)e(t.ifConditions[o].block,n)}}(e,!1))}var Qo=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,ea=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ta={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},na={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},ra=function(e){return"if("+e+")return null;"},ia={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ra("$event.target !== $event.currentTarget"),ctrl:ra("!$event.ctrlKey"),shift:ra("!$event.shiftKey"),alt:ra("!$event.altKey"),meta:ra("!$event.metaKey"),left:ra("'button' in $event && $event.button !== 0"),middle:ra("'button' in $event && $event.button !== 1"),right:ra("'button' in $event && $event.button !== 2")};function oa(e,t){var n=t?"nativeOn:{":"on:{";for(var r in e)n+='"'+r+'":'+aa(r,e[r])+",";return n.slice(0,-1)+"}"}function aa(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return aa(e,t)}).join(",")+"]";var n=ea.test(t.value),r=Qo.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(ia[s])o+=ia[s],ta[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;o+=ra(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=function(e){return"if(!('button' in $event)&&"+e.map(sa).join("&&")+")return null;"}(a)),o&&(i+=o),"function($event){"+i+(n?"return "+t.value+"($event)":r?"return ("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function sa(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=ta[e],r=na[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var ca={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:O},ua=function(e){this.options=e,this.warn=e.warn||vr,this.transforms=hr(e.modules,"transformCode"),this.dataGenFns=hr(e.modules,"genData"),this.directives=k(k({},ca),e.directives);var t=e.isReservedTag||S;this.maybeComponent=function(e){return!(t(e.tag)&&!e.component)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function la(e,t){var n=new ua(t);return{render:"with(this){return "+(e?fa(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function fa(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return pa(e,t);if(e.once&&!e.onceProcessed)return da(e,t);if(e.for&&!e.forProcessed)return function(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||fa)(e,t)+"})"}(e,t);if(e.if&&!e.ifProcessed)return va(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=ya(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return _(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];!o&&!a||r||(i+=",null");o&&(i+=","+o);a&&(i+=(o?"":",null")+","+a);return i+")"}(e,t);var n;if(e.component)n=function(e,t,n){var r=t.inlineTemplate?null:ya(t,n,!0);return"_c("+e+","+ha(t,n)+(r?","+r:"")+")"}(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=ha(e,t));var i=e.inlineTemplate?null:ya(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<t.transforms.length;o++)n=t.transforms[o](e,n);return n}return ya(e,t)||"void 0"}function pa(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+fa(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function da(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return va(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+fa(e,t)+","+t.onceId+++","+n+")":fa(e,t)}return pa(e,t)}function va(e,t,n,r){return e.ifProcessed=!0,function e(t,n,r,i){if(!t.length)return i||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+a(o.block)+":"+e(t,n,r,i):""+a(o.block);function a(e){return r?r(e,n):e.once?da(e,n):fa(e,n)}}(e.ifConditions.slice(),t,n,r)}function ha(e,t){var n="{",r=function(e,t){var n=e.directives;if(!n)return;var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=t.directives[o.name];u&&(a=!!u(e,o,t.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}if(c)return s.slice(0,-1)+"]"}(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var i=0;i<t.dataGenFns.length;i++)n+=t.dataGenFns[i](e);if(e.attrs&&(n+="attrs:{"+ba(e.attrs)+"},"),e.props&&(n+="domProps:{"+ba(e.props)+"},"),e.events&&(n+=oa(e.events,!1)+","),e.nativeEvents&&(n+=oa(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=function(e,t){return"scopedSlots:_u(["+Object.keys(e).map(function(n){return ma(n,e[n],t)}).join(",")+"])"}(e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var o=function(e,t){var n=e.children[0];if(1===n.type){var r=la(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}(e,t);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function ma(e,t,n){return t.for&&!t.forProcessed?function(e,t,n){var r=t.for,i=t.alias,o=t.iterator1?","+t.iterator1:"",a=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,"_l(("+r+"),function("+i+o+a+"){return "+ma(e,t,n)+"})"}(e,t,n):"{key:"+e+",fn:"+("function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?"("+t.if+")?"+(ya(t,n)||"undefined")+":undefined":ya(t,n)||"undefined":fa(t,n))+"}")+"}"}function ya(e,t,n,r,i){var o=e.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||fa)(a,t)+s}var c=n?function(e,t){for(var n=0,r=0;r<e.length;r++){var i=e[r];if(1===i.type){if(ga(i)||i.ifConditions&&i.ifConditions.some(function(e){return ga(e.block)})){n=2;break}(t(i)||i.ifConditions&&i.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}(o,t.maybeComponent):0,u=i||_a;return"["+o.map(function(e){return u(e,t)}).join(",")+"]"+(c?","+c:"")}}function ga(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function _a(e,t){return 1===e.type?fa(e,t):3===e.type&&e.isComment?(r=e,"_e("+JSON.stringify(r.text)+")"):"_v("+(2===(n=e).type?n.expression:$a(JSON.stringify(n.text)))+")";var n,r}function ba(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+$a(r.value)+","}return t.slice(0,-1)}function $a(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b");function wa(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),O}}var Ca,xa,ka=(Ca=function(e,t){var n=Ro(e.trim(),t);!1!==t.optimize&&Yo(n,t);var r=la(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(e){function t(t,n){var r=Object.create(e),i=[],o=[];if(r.warn=function(e,t){(t?o:i).push(e)},n)for(var a in n.modules&&(r.modules=(e.modules||[]).concat(n.modules)),n.directives&&(r.directives=k(Object.create(e.directives||null),n.directives)),n)"modules"!==a&&"directives"!==a&&(r[a]=n[a]);var s=Ca(t,r);return s.errors=i,s.tips=o,s}return{compile:t,compileToFunctions:function(e){var t=Object.create(null);return function(n,r,i){(r=k({},r)).warn,delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(t[o])return t[o];var a=e(n,r),s={},c=[];return s.render=wa(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return wa(e,c)}),t[o]=s}}(t)}})(Zo),Aa=(ka.compile,ka.compileToFunctions);function Oa(e){return(xa=xa||document.createElement("div")).innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',xa.innerHTML.indexOf("&#10;")>0}var Sa=!!B&&Oa(!1),Ta=!!B&&Oa(!0),Na=y(function(e){var t=Fn(e);return t&&t.innerHTML}),ja=ln.prototype.$mount;return ln.prototype.$mount=function(e,t){if((e=e&&Fn(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Na(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=function(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}(e));if(r){var i=Aa(r,{shouldDecodeNewlines:Sa,shouldDecodeNewlinesForHref:Ta,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return ja.call(this,e,t)},ln.compile=Aa,ln});;
/**
 * Skipped minification because the original files appears to be already minified.
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VuejsPaginate=t():e.VuejsPaginate=t()}(this,function(){return function(e){function t(s){if(n[s])return n[s].exports;var a=n[s]={exports:{},id:s,loaded:!1};return e[s].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}var a=n(1),i=s(a);e.exports=i.default},function(e,t,n){n(2);var s=n(6)(n(7),n(8),"data-v-82963a40",null);e.exports=s.exports},function(e,t,n){var s=n(3);"string"==typeof s&&(s=[[e.id,s,""]]);n(5)(s,{});s.locals&&(e.exports=s.locals)},function(e,t,n){t=e.exports=n(4)(),t.push([e.id,"a[data-v-82963a40]{cursor:pointer}",""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},a=0;a<this.length;a++){var i=this[a][0];"number"==typeof i&&(s[i]=!0)}for(a=0;a<t.length;a++){var r=t[a];"number"==typeof r[0]&&s[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),e.push(r))}},e}},function(e,t,n){function s(e,t){for(var n=0;n<e.length;n++){var s=e[n],a=c[s.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](s.parts[i]);for(;i<s.parts.length;i++)a.parts.push(l(s.parts[i],t))}else{for(var r=[],i=0;i<s.parts.length;i++)r.push(l(s.parts[i],t));c[s.id]={id:s.id,refs:1,parts:r}}}}function a(e){for(var t=[],n={},s=0;s<e.length;s++){var a=e[s],i=a[0],r=a[1],o=a[2],l=a[3],u={css:r,media:o,sourceMap:l};n[i]?n[i].parts.push(u):t.push(n[i]={id:i,parts:[u]})}return t}function i(e,t){var n=g(),s=C[C.length-1];if("top"===e.insertAt)s?s.nextSibling?n.insertBefore(t,s.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),C.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function r(e){e.parentNode.removeChild(e);var t=C.indexOf(e);t>=0&&C.splice(t,1)}function o(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function l(e,t){var n,s,a;if(t.singleton){var i=v++;n=h||(h=o(t)),s=u.bind(null,n,i,!1),a=u.bind(null,n,i,!0)}else n=o(t),s=d.bind(null,n),a=function(){r(n)};return s(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;s(e=t)}else a()}}function u(e,t,n,s){var a=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=b(t,a);else{var i=document.createTextNode(a),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(i,r[t]):e.appendChild(i)}}function d(e,t){var n=t.css,s=t.media,a=t.sourceMap;if(s&&e.setAttribute("media",s),a&&(n+="\n/*# sourceURL="+a.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var c={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},f=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=p(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,v=0,C=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=f()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=a(e);return s(n,t),function(e){for(var i=[],r=0;r<n.length;r++){var o=n[r],l=c[o.id];l.refs--,i.push(l)}if(e){var u=a(e);s(u,t)}for(var r=0;r<i.length;r++){var l=i[r];if(0===l.refs){for(var d=0;d<l.parts.length;d++)l.parts[d]();delete c[l.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=function(e,t,n,s){var a,i=e=e||{},r=typeof e.default;"object"!==r&&"function"!==r||(a=e,i=e.default);var o="function"==typeof i?i.options:i;if(t&&(o.render=t.render,o.staticRenderFns=t.staticRenderFns),n&&(o._scopeId=n),s){var l=o.computed||(o.computed={});Object.keys(s).forEach(function(e){var t=s[e];l[e]=function(){return t}})}return{esModule:a,exports:i,options:o}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{value:{type:Number},pageCount:{type:Number,required:!0},forcePage:{type:Number},clickHandler:{type:Function,default:function(){}},pageRange:{type:Number,default:3},marginPages:{type:Number,default:1},prevText:{type:String,default:"Prev"},nextText:{type:String,default:"Next"},breakViewText:{type:String,default:"…"},containerClass:{type:String},pageClass:{type:String},pageLinkClass:{type:String},prevClass:{type:String},prevLinkClass:{type:String},nextClass:{type:String},nextLinkClass:{type:String},breakViewClass:{type:String},breakViewLinkClass:{type:String},activeClass:{type:String,default:"active"},disabledClass:{type:String,default:"disabled"},noLiSurround:{type:Boolean,default:!1},firstLastButton:{type:Boolean,default:!1},firstButtonText:{type:String,default:"First"},lastButtonText:{type:String,default:"Last"},hidePrevNext:{type:Boolean,default:!1}},beforeUpdate:function(){void 0!==this.forcePage&&this.forcePage!==this.selected&&(this.selected=this.forcePage)},computed:{selected:{get:function(){return this.value||this.innerValue},set:function(e){this.innerValue=e}},pages:function(){var e=this,t={};if(this.pageCount<=this.pageRange)for(var n=0;n<this.pageCount;n++){var s={index:n,content:n+1,selected:n===this.selected-1};t[n]=s}else{for(var a=Math.floor(this.pageRange/2),i=function(n){var s={index:n,content:n+1,selected:n===e.selected-1};t[n]=s},r=function(e){var n={disabled:!0,breakView:!0};t[e]=n},o=0;o<this.marginPages;o++)i(o);var l=0;this.selected-a>0&&(l=this.selected-1-a);var u=l+this.pageRange-1;u>=this.pageCount&&(u=this.pageCount-1,l=u-this.pageRange+1);for(var d=l;d<=u&&d<=this.pageCount-1;d++)i(d);l>this.marginPages&&r(l-1),u+1<this.pageCount-this.marginPages&&r(u+1);for(var c=this.pageCount-1;c>=this.pageCount-this.marginPages;c--)i(c)}return t}},data:function(){return{innerValue:1}},methods:{handlePageSelected:function(e){this.selected!==e&&(this.innerValue=e,this.$emit("input",e),this.clickHandler(e))},prevPage:function(){this.selected<=1||this.handlePageSelected(this.selected-1)},nextPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.selected+1)},firstPageSelected:function(){return 1===this.selected},lastPageSelected:function(){return this.selected===this.pageCount||0===this.pageCount},selectFirstPage:function(){this.selected<=1||this.handlePageSelected(1)},selectLastPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.pageCount)}}}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.noLiSurround?n("div",{class:e.containerClass},[e.firstLastButton?n("a",{class:[e.pageLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){e.selectFirstPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.selectFirstPage():null}}}):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():n("a",{class:[e.prevLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){e.prevPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.prevPage():null}}}),e._v(" "),e._l(e.pages,function(t){return[t.breakView?n("a",{class:[e.pageLinkClass,e.breakViewLinkClass,t.disabled?e.disabledClass:""],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?n("a",{class:[e.pageLinkClass,t.selected?e.activeClass:"",e.disabledClass],attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):n("a",{class:[e.pageLinkClass,t.selected?e.activeClass:""],attrs:{tabindex:"0"},on:{click:function(n){e.handlePageSelected(t.index+1)},keyup:function(n){return"button"in n||!e._k(n.keyCode,"enter",13)?void e.handlePageSelected(t.index+1):null}}},[e._v(e._s(t.content))])]}),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():n("a",{class:[e.nextLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){e.nextPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.nextPage():null}}}),e._v(" "),e.firstLastButton?n("a",{class:[e.pageLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){e.selectLastPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.selectLastPage():null}}}):e._e()],2):n("ul",{class:e.containerClass},[e.firstLastButton?n("li",{class:[e.pageClass,e.firstPageSelected()?e.disabledClass:""]},[n("a",{class:e.pageLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){e.selectFirstPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.selectFirstPage():null}}})]):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():n("li",{class:[e.prevClass,e.firstPageSelected()?e.disabledClass:""]},[n("a",{class:e.prevLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){e.prevPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.prevPage():null}}})]),e._v(" "),e._l(e.pages,function(t){return n("li",{class:[e.pageClass,t.selected?e.activeClass:"",t.disabled?e.disabledClass:"",t.breakView?e.breakViewClass:""]},[t.breakView?n("a",{class:[e.pageLinkClass,e.breakViewLinkClass],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?n("a",{class:e.pageLinkClass,attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):n("a",{class:e.pageLinkClass,attrs:{tabindex:"0"},on:{click:function(n){e.handlePageSelected(t.index+1)},keyup:function(n){return"button"in n||!e._k(n.keyCode,"enter",13)?void e.handlePageSelected(t.index+1):null}}},[e._v(e._s(t.content))])])}),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():n("li",{class:[e.nextClass,e.lastPageSelected()?e.disabledClass:""]},[n("a",{class:e.nextLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){e.nextPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.nextPage():null}}})]),e._v(" "),e.firstLastButton?n("li",{class:[e.pageClass,e.lastPageSelected()?e.disabledClass:""]},[n("a",{class:e.pageLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){e.selectLastPage()},keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13)?void e.selectLastPage():null}}})]):e._e()],2)},staticRenderFns:[]}}])});;
// Repo: https://github.com/verlok/lazyload
var _extends = Object.assign || function (t) { for (var e = 1; e < arguments.length; e++){ var n = arguments[e]; for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]) } return t }, _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }; !function (t, e) { "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.LazyLoad = e() }(this, function () { "use strict"; function t(t, e, n) { var o = e._settings; !n && h(t) || (O(o.callback_enter, t), B.indexOf(t.tagName) > -1 && (S(t, e), L(t, o.class_loading)), I(t, e), _(t), O(o.callback_set, t)) } var e = function (t, e) { return e ? t.replace(/\.(jpe?g|png)/gi, ".webp") : t }, n = "undefined" != typeof window, o = n && !("onscroll" in window) || "undefined" != typeof navigator && /(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent), r = n && "IntersectionObserver" in window, i = n && "classList" in document.createElement("p"), a = n && "createImageBitmap" in window, s = n && "fetch" in window, c = !1; !function (t) { a && s ? fetch("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=").then(function (e) { return e && void 0 !== e.blob ? e.blob() : t(!1) }).then(function (e) { return t(!!window.createImageBitmap(e)) }) : t(!1) }(function (t) { c = t }); var l = { elements_selector: "img", container: o || n ? document : null, threshold: 300, thresholds: null, data_src: "src", data_srcset: "srcset", data_sizes: "sizes", data_bg: "bg", class_loading: "loading", class_loaded: "loaded", class_error: "error", load_delay: 0, callback_load: null, callback_error: null, callback_set: null, callback_enter: null, callback_finish: null, to_webp: !1 }, u = function (t) { return _extends({}, l, t) }, d = function (t, e) { return t.getAttribute("data-" + e) }, f = function (t, e, n) { var o = "data-" + e; null !== n ? t.setAttribute(o, n) : t.removeAttribute(o) }, _ = function (t) { return f(t, "was-processed", "true") }, h = function (t) { return "true" === d(t, "was-processed") }, v = function (t, e) { return f(t, "ll-timeout", e) }, b = function (t) { return d(t, "ll-timeout") }, g = function (t) { return t.filter(function (t) { return !h(t) }) }, m = function (t, e) { return t.filter(function (t) { return t !== e }) }, p = function (t, e) { var n, o = new t(e); try { n = new CustomEvent("LazyLoad::Initialized", { detail: { instance: o } }) } catch (t) { (n = document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized", !1, !1, { instance: o }) } window.dispatchEvent(n) }, y = function (t, e, n, o) { for (var r, i = 0; r = t.children[i]; i += 1)if ("SOURCE" === r.tagName) { var a = d(r, n); w(r, e, a, o) } }, w = function (t, n, o, r) { o && t.setAttribute(n, e(o, r)) }, A = function (t, n) { var o = c && n.to_webp, r = d(t, n.data_src), i = d(t, n.data_bg); if (r) { var a = e(r, o); t.style.backgroundImage = 'url("' + a + '")' } if (i) { var s = e(i, o); t.style.backgroundImage = s } }, E = { IMG: function (t, e) { var n = c && e.to_webp, o = e.data_srcset, r = t.parentNode; r && "PICTURE" === r.tagName && y(r, "srcset", o, n); var i = d(t, e.data_sizes); w(t, "sizes", i); var a = d(t, o); w(t, "srcset", a, n); var s = d(t, e.data_src); w(t, "src", s, n) }, IFRAME: function (t, e) { var n = d(t, e.data_src); w(t, "src", n) }, VIDEO: function (t, e) { var n = e.data_src, o = d(t, n); y(t, "src", n), w(t, "src", o), t.load() } }, I = function (t, e) { var n = e._settings, o = t.tagName, r = E[o]; if (r) return r(t, n), e._updateLoadingCount(1), void (e._elements = m(e._elements, t)); A(t, n) }, L = function (t, e) { i ? t.classList.add(e) : t.className += (t.className ? " " : "") + e }, k = function (t, e) { i ? t.classList.remove(e) : t.className = t.className.replace(new RegExp("(^|\\s+)" + e + "(\\s+|$)"), " ").replace(/^\s+/, "").replace(/\s+$/, "") }, O = function (t, e) { t && t(e) }, C = function (t, e, n) { t.addEventListener(e, n) }, z = function (t, e, n) { t.removeEventListener(e, n) }, N = function (t, e, n) { C(t, "load", e), C(t, "loadeddata", e), C(t, "error", n) }, x = function (t, e, n) { z(t, "load", e), z(t, "loadeddata", e), z(t, "error", n) }, R = function (t, e, n) { var o = n._settings, r = e ? o.class_loaded : o.class_error, i = e ? o.callback_load : o.callback_error, a = t.target; k(a, o.class_loading), L(a, r), O(i, a), n._updateLoadingCount(-1) }, S = function (t, e) { var n = function n(r) { R(r, !0, e), x(t, n, o) }, o = function o(r) { R(r, !1, e), x(t, n, o) }; N(t, n, o) }, B = ["IMG", "IFRAME", "VIDEO"], M = function (e, n, o) { t(e, o), n.unobserve(e) }, j = function (t) { var e = b(t); e && (clearTimeout(e), v(t, null)) }, T = function (t, e, n) { var o = n._settings.load_delay, r = b(t); r || (r = setTimeout(function () { M(t, e, n), j(t) }, o), v(t, r)) }, U = function (t) { return t.isIntersecting || t.intersectionRatio > 0 }, G = function (t) { return { root: t.container === document ? null : t.container, rootMargin: t.thresholds || t.threshold + "px" } }, V = function (t, e) { this._settings = u(t), this._setObserver(), this._loadingCount = 0, this.update(e) }; return V.prototype = { _manageIntersection: function (t) { var e = this._observer, n = this._settings.load_delay, o = t.target; n ? U(t) ? T(o, e, this) : j(o) : U(t) && M(o, e, this) }, _onIntersection: function (t) { t.forEach(this._manageIntersection.bind(this)) }, _setObserver: function () { r && (this._observer = new IntersectionObserver(this._onIntersection.bind(this), G(this._settings))) }, _updateLoadingCount: function (t) { this._loadingCount += t, 0 === this._elements.length && 0 === this._loadingCount && O(this._settings.callback_finish) }, update: function (t) { var e = this, n = this._settings, r = t || n.container.querySelectorAll(n.elements_selector); this._elements = g(Array.prototype.slice.call(r)), !o && this._observer ? this._elements.forEach(function (t) { e._observer.observe(t) }) : this.loadAll() }, destroy: function () { var t = this; this._observer && (this._elements.forEach(function (e) { t._observer.unobserve(e) }), this._observer = null), this._elements = null, this._settings = null }, load: function (e, n) { t(e, this, n) }, loadAll: function () { var t = this; this._elements.forEach(function (e) { t.load(e) }) } }, n && function (t, e) { if (e) if (e.length) for (var n, o = 0; n = e[o]; o += 1)p(t, n); else p(t, e) }(V, window.lazyLoadOptions), V });
//# sourceMappingURL=lazyload.min.js.map
;
var Oidc = function (t) { var e = {}; function __webpack_require__(r) { if (e[r]) return e[r].exports; var n = e[r] = { i: r, l: !1, exports: {} }; return t[r].call(n.exports, n, n.exports, __webpack_require__), n.l = !0, n.exports } return __webpack_require__.m = t, __webpack_require__.c = e, __webpack_require__.d = function (t, e, r) { __webpack_require__.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r }) }, __webpack_require__.r = function (t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) }, __webpack_require__.t = function (t, e) { if (1 & e && (t = __webpack_require__(t)), 8 & e) return t; if (4 & e && "object" == typeof t && t && t.__esModule) return t; var r = Object.create(null); if (__webpack_require__.r(r), Object.defineProperty(r, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t) for (var n in t) __webpack_require__.d(r, n, function (e) { return t[e] }.bind(null, n)); return r }, __webpack_require__.n = function (t) { var e = t && t.__esModule ? function getDefault() { return t.default } : function getModuleExports() { return t }; return __webpack_require__.d(e, "a", e), e }, __webpack_require__.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, __webpack_require__.p = "", __webpack_require__(__webpack_require__.s = 374) }([function (t, e, r) { var n = r(3), i = r(27), o = r(14), s = r(13), a = r(21), u = function (t, e, r) { var c, f, h, l, p = t & u.F, g = t & u.G, d = t & u.S, v = t & u.P, y = t & u.B, m = g ? n : d ? n[e] || (n[e] = {}) : (n[e] || {}).prototype, S = g ? i : i[e] || (i[e] = {}), _ = S.prototype || (S.prototype = {}); for (c in g && (r = e), r) h = ((f = !p && m && void 0 !== m[c]) ? m : r)[c], l = y && f ? a(h, n) : v && "function" == typeof h ? a(Function.call, h) : h, m && s(m, c, h, t & u.U), S[c] != h && o(S, c, l), v && _[c] != h && (_[c] = h) }; n.core = i, u.F = 1, u.G = 2, u.S = 4, u.P = 8, u.B = 16, u.W = 32, u.U = 64, u.R = 128, t.exports = u }, function (t, e, r) { var n = r(5); t.exports = function (t) { if (!n(t)) throw TypeError(t + " is not an object!"); return t } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(); var i = { debug: function debug() { }, info: function info() { }, warn: function warn() { }, error: function error() { } }, o = void 0, s = void 0; (e.Log = function () { function Log() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, Log) } return Log.reset = function reset() { s = 3, o = i }, Log.debug = function debug() { if (s >= 4) { for (var t = arguments.length, e = Array(t), r = 0; r < t; r++)e[r] = arguments[r]; o.debug.apply(o, Array.from(e)) } }, Log.info = function info() { if (s >= 3) { for (var t = arguments.length, e = Array(t), r = 0; r < t; r++)e[r] = arguments[r]; o.info.apply(o, Array.from(e)) } }, Log.warn = function warn() { if (s >= 2) { for (var t = arguments.length, e = Array(t), r = 0; r < t; r++)e[r] = arguments[r]; o.warn.apply(o, Array.from(e)) } }, Log.error = function error() { if (s >= 1) { for (var t = arguments.length, e = Array(t), r = 0; r < t; r++)e[r] = arguments[r]; o.error.apply(o, Array.from(e)) } }, n(Log, null, [{ key: "NONE", get: function get() { return 0 } }, { key: "ERROR", get: function get() { return 1 } }, { key: "WARN", get: function get() { return 2 } }, { key: "INFO", get: function get() { return 3 } }, { key: "DEBUG", get: function get() { return 4 } }, { key: "level", get: function get() { return s }, set: function set(t) { if (!(0 <= t && t <= 4)) throw new Error("Invalid log level"); s = t } }, { key: "logger", get: function get() { return o }, set: function set(t) { if (!t.debug && t.info && (t.debug = t.info), !(t.debug && t.info && t.warn && t.error)) throw new Error("Invalid logger"); o = t } }]), Log }()).reset() }, function (t, e) { var r = t.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); "number" == typeof __g && (__g = r) }, function (t, e) { t.exports = function (t) { try { return !!t() } catch (t) { return !0 } } }, function (t, e) { t.exports = function (t) { return "object" == typeof t ? null !== t : "function" == typeof t } }, function (t, e, r) { var n = r(66)("wks"), i = r(42), o = r(3).Symbol, s = "function" == typeof o; (t.exports = function (t) { return n[t] || (n[t] = s && o[t] || (s ? o : i)("Symbol." + t)) }).store = n }, function (t, e, r) { var n = r(24), i = Math.min; t.exports = function (t) { return t > 0 ? i(n(t), 9007199254740991) : 0 } }, function (t, e, r) { var n = r(1), i = r(145), o = r(26), s = Object.defineProperty; e.f = r(9) ? Object.defineProperty : function defineProperty(t, e, r) { if (n(t), e = o(e, !0), n(r), i) try { return s(t, e, r) } catch (t) { } if ("get" in r || "set" in r) throw TypeError("Accessors not supported!"); return "value" in r && (t[e] = r.value), t } }, function (t, e, r) { t.exports = !r(4)(function () { return 7 != Object.defineProperty({}, "a", { get: function () { return 7 } }).a }) }, function (t, e, r) { var n = r(25); t.exports = function (t) { return Object(n(t)) } }, function (t, e) { t.exports = function (t) { if ("function" != typeof t) throw TypeError(t + " is not a function!"); return t } }, function (t, e, r) { var n = r(0), i = r(4), o = r(25), s = /"/g, a = function (t, e, r, n) { var i = String(o(t)), a = "<" + e; return "" !== r && (a += " " + r + '="' + String(n).replace(s, "&quot;") + '"'), a + ">" + i + "</" + e + ">" }; t.exports = function (t, e) { var r = {}; r[t] = e(a), n(n.P + n.F * i(function () { var e = ""[t]('"'); return e !== e.toLowerCase() || e.split('"').length > 3 }), "String", r) } }, function (t, e, r) { var n = r(3), i = r(14), o = r(18), s = r(42)("src"), a = Function.toString, u = ("" + a).split("toString"); r(27).inspectSource = function (t) { return a.call(t) }, (t.exports = function (t, e, r, a) { var c = "function" == typeof r; c && (o(r, "name") || i(r, "name", e)), t[e] !== r && (c && (o(r, s) || i(r, s, t[e] ? "" + t[e] : u.join(String(e)))), t === n ? t[e] = r : a ? t[e] ? t[e] = r : i(t, e, r) : (delete t[e], i(t, e, r))) })(Function.prototype, "toString", function toString() { return "function" == typeof this && this[s] || a.call(this) }) }, function (t, e, r) { var n = r(8), i = r(43); t.exports = r(9) ? function (t, e, r) { return n.f(t, e, i(1, r)) } : function (t, e, r) { return t[e] = r, t } }, function (t, e, r) { var n = r(18), i = r(10), o = r(96)("IE_PROTO"), s = Object.prototype; t.exports = Object.getPrototypeOf || function (t) { return t = i(t), n(t, o) ? t[o] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? s : null } }, function (t, e, r) { var n = r(51), i = r(43), o = r(17), s = r(26), a = r(18), u = r(145), c = Object.getOwnPropertyDescriptor; e.f = r(9) ? c : function getOwnPropertyDescriptor(t, e) { if (t = o(t), e = s(e, !0), u) try { return c(t, e) } catch (t) { } if (a(t, e)) return i(!n.f.call(t, e), t[e]) } }, function (t, e, r) { var n = r(52), i = r(25); t.exports = function (t) { return n(i(t)) } }, function (t, e) { var r = {}.hasOwnProperty; t.exports = function (t, e) { return r.call(t, e) } }, function (t, e, r) { "use strict"; var n = r(4); t.exports = function (t, e) { return !!t && n(function () { e ? t.call(null, function () { }, 1) : t.call(null) }) } }, function (t, e) { var r = {}.toString; t.exports = function (t) { return r.call(t).slice(8, -1) } }, function (t, e, r) { var n = r(11); t.exports = function (t, e, r) { if (n(t), void 0 === e) return t; switch (r) { case 1: return function (r) { return t.call(e, r) }; case 2: return function (r, n) { return t.call(e, r, n) }; case 3: return function (r, n, i) { return t.call(e, r, n, i) } }return function () { return t.apply(e, arguments) } } }, function (t, e, r) { var n = r(21), i = r(52), o = r(10), s = r(7), a = r(79); t.exports = function (t, e) { var r = 1 == t, u = 2 == t, c = 3 == t, f = 4 == t, h = 6 == t, l = 5 == t || h, p = e || a; return function (e, a, g) { for (var d, v, y = o(e), m = i(y), S = n(a, g, 3), _ = s(m.length), b = 0, F = r ? p(e, _) : u ? p(e, 0) : void 0; _ > b; b++)if ((l || b in m) && (v = S(d = m[b], b, y), t)) if (r) F[b] = v; else if (v) switch (t) { case 3: return !0; case 5: return d; case 6: return b; case 2: F.push(d) } else if (f) return !1; return h ? -1 : c || f ? f : F } } }, function (t, e, r) { var n = r(0), i = r(27), o = r(4); t.exports = function (t, e) { var r = (i.Object || {})[t] || Object[t], s = {}; s[t] = e(r), n(n.S + n.F * o(function () { r(1) }), "Object", s) } }, function (t, e) { var r = Math.ceil, n = Math.floor; t.exports = function (t) { return isNaN(t = +t) ? 0 : (t > 0 ? n : r)(t) } }, function (t, e) { t.exports = function (t) { if (void 0 == t) throw TypeError("Can't call method on  " + t); return t } }, function (t, e, r) { var n = r(5); t.exports = function (t, e) { if (!n(t)) return t; var r, i; if (e && "function" == typeof (r = t.toString) && !n(i = r.call(t))) return i; if ("function" == typeof (r = t.valueOf) && !n(i = r.call(t))) return i; if (!e && "function" == typeof (r = t.toString) && !n(i = r.call(t))) return i; throw TypeError("Can't convert object to primitive value") } }, function (t, e) { var r = t.exports = { version: "2.5.5" }; "number" == typeof __e && (__e = r) }, function (t, e, r) { var n = r(124), i = r(0), o = r(66)("metadata"), s = o.store || (o.store = new (r(121))), a = function (t, e, r) { var i = s.get(t); if (!i) { if (!r) return; s.set(t, i = new n) } var o = i.get(e); if (!o) { if (!r) return; i.set(e, o = new n) } return o }; t.exports = { store: s, map: a, has: function (t, e, r) { var n = a(e, r, !1); return void 0 !== n && n.has(t) }, get: function (t, e, r) { var n = a(e, r, !1); return void 0 === n ? void 0 : n.get(t) }, set: function (t, e, r, n) { a(r, n, !0).set(t, e) }, keys: function (t, e) { var r = a(t, e, !1), n = []; return r && r.forEach(function (t, e) { n.push(e) }), n }, key: function (t) { return void 0 === t || "symbol" == typeof t ? t : String(t) }, exp: function (t) { i(i.S, "Reflect", t) } } }, function (t, e, r) { "use strict"; if (r(9)) { var n = r(41), i = r(3), o = r(4), s = r(0), a = r(56), u = r(73), c = r(21), f = r(35), h = r(43), l = r(14), p = r(33), g = r(24), d = r(7), v = r(119), y = r(39), m = r(26), S = r(18), _ = r(50), b = r(5), F = r(10), w = r(82), E = r(38), x = r(15), A = r(37).f, P = r(80), k = r(42), I = r(6), C = r(22), R = r(65), B = r(58), T = r(77), M = r(46), O = r(61), U = r(36), D = r(78), N = r(129), L = r(8), j = r(16), H = L.f, K = j.f, V = i.RangeError, W = i.TypeError, q = i.Uint8Array, J = Array.prototype, z = u.ArrayBuffer, G = u.DataView, Y = C(0), X = C(2), $ = C(3), Q = C(4), Z = C(5), tt = C(6), et = R(!0), rt = R(!1), nt = T.values, it = T.keys, ot = T.entries, st = J.lastIndexOf, at = J.reduce, ut = J.reduceRight, ct = J.join, ft = J.sort, ht = J.slice, lt = J.toString, pt = J.toLocaleString, gt = I("iterator"), dt = I("toStringTag"), vt = k("typed_constructor"), yt = k("def_constructor"), mt = a.CONSTR, St = a.TYPED, _t = a.VIEW, bt = C(1, function (t, e) { return At(B(t, t[yt]), e) }), Ft = o(function () { return 1 === new q(new Uint16Array([1]).buffer)[0] }), wt = !!q && !!q.prototype.set && o(function () { new q(1).set({}) }), Et = function (t, e) { var r = g(t); if (r < 0 || r % e) throw V("Wrong offset!"); return r }, xt = function (t) { if (b(t) && St in t) return t; throw W(t + " is not a typed array!") }, At = function (t, e) { if (!(b(t) && vt in t)) throw W("It is not a typed array constructor!"); return new t(e) }, Pt = function (t, e) { return kt(B(t, t[yt]), e) }, kt = function (t, e) { for (var r = 0, n = e.length, i = At(t, n); n > r;)i[r] = e[r++]; return i }, It = function (t, e, r) { H(t, e, { get: function () { return this._d[r] } }) }, Ct = function from(t) { var e, r, n, i, o, s, a = F(t), u = arguments.length, f = u > 1 ? arguments[1] : void 0, h = void 0 !== f, l = P(a); if (void 0 != l && !w(l)) { for (s = l.call(a), n = [], e = 0; !(o = s.next()).done; e++)n.push(o.value); a = n } for (h && u > 2 && (f = c(f, arguments[2], 2)), e = 0, r = d(a.length), i = At(this, r); r > e; e++)i[e] = h ? f(a[e], e) : a[e]; return i }, Rt = function of() { for (var t = 0, e = arguments.length, r = At(this, e); e > t;)r[t] = arguments[t++]; return r }, Bt = !!q && o(function () { pt.call(new q(1)) }), Tt = function toLocaleString() { return pt.apply(Bt ? ht.call(xt(this)) : xt(this), arguments) }, Mt = { copyWithin: function copyWithin(t, e) { return N.call(xt(this), t, e, arguments.length > 2 ? arguments[2] : void 0) }, every: function every(t) { return Q(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, fill: function fill(t) { return D.apply(xt(this), arguments) }, filter: function filter(t) { return Pt(this, X(xt(this), t, arguments.length > 1 ? arguments[1] : void 0)) }, find: function find(t) { return Z(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, findIndex: function findIndex(t) { return tt(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, forEach: function forEach(t) { Y(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, indexOf: function indexOf(t) { return rt(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, includes: function includes(t) { return et(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, join: function join(t) { return ct.apply(xt(this), arguments) }, lastIndexOf: function lastIndexOf(t) { return st.apply(xt(this), arguments) }, map: function map(t) { return bt(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, reduce: function reduce(t) { return at.apply(xt(this), arguments) }, reduceRight: function reduceRight(t) { return ut.apply(xt(this), arguments) }, reverse: function reverse() { for (var t, e = xt(this).length, r = Math.floor(e / 2), n = 0; n < r;)t = this[n], this[n++] = this[--e], this[e] = t; return this }, some: function some(t) { return $(xt(this), t, arguments.length > 1 ? arguments[1] : void 0) }, sort: function sort(t) { return ft.call(xt(this), t) }, subarray: function subarray(t, e) { var r = xt(this), n = r.length, i = y(t, n); return new (B(r, r[yt]))(r.buffer, r.byteOffset + i * r.BYTES_PER_ELEMENT, d((void 0 === e ? n : y(e, n)) - i)) } }, Ot = function slice(t, e) { return Pt(this, ht.call(xt(this), t, e)) }, Ut = function set(t) { xt(this); var e = Et(arguments[1], 1), r = this.length, n = F(t), i = d(n.length), o = 0; if (i + e > r) throw V("Wrong length!"); for (; o < i;)this[e + o] = n[o++] }, Dt = { entries: function entries() { return ot.call(xt(this)) }, keys: function keys() { return it.call(xt(this)) }, values: function values() { return nt.call(xt(this)) } }, Nt = function (t, e) { return b(t) && t[St] && "symbol" != typeof e && e in t && String(+e) == String(e) }, Lt = function getOwnPropertyDescriptor(t, e) { return Nt(t, e = m(e, !0)) ? h(2, t[e]) : K(t, e) }, jt = function defineProperty(t, e, r) { return !(Nt(t, e = m(e, !0)) && b(r) && S(r, "value")) || S(r, "get") || S(r, "set") || r.configurable || S(r, "writable") && !r.writable || S(r, "enumerable") && !r.enumerable ? H(t, e, r) : (t[e] = r.value, t) }; mt || (j.f = Lt, L.f = jt), s(s.S + s.F * !mt, "Object", { getOwnPropertyDescriptor: Lt, defineProperty: jt }), o(function () { lt.call({}) }) && (lt = pt = function toString() { return ct.call(this) }); var Ht = p({}, Mt); p(Ht, Dt), l(Ht, gt, Dt.values), p(Ht, { slice: Ot, set: Ut, constructor: function () { }, toString: lt, toLocaleString: Tt }), It(Ht, "buffer", "b"), It(Ht, "byteOffset", "o"), It(Ht, "byteLength", "l"), It(Ht, "length", "e"), H(Ht, dt, { get: function () { return this[St] } }), t.exports = function (t, e, r, u) { var c = t + ((u = !!u) ? "Clamped" : "") + "Array", h = "get" + t, p = "set" + t, g = i[c], y = g || {}, m = g && x(g), S = !g || !a.ABV, F = {}, w = g && g.prototype, P = function (t, r) { H(t, r, { get: function () { return function (t, r) { var n = t._d; return n.v[h](r * e + n.o, Ft) }(this, r) }, set: function (t) { return function (t, r, n) { var i = t._d; u && (n = (n = Math.round(n)) < 0 ? 0 : n > 255 ? 255 : 255 & n), i.v[p](r * e + i.o, n, Ft) }(this, r, t) }, enumerable: !0 }) }; S ? (g = r(function (t, r, n, i) { f(t, g, c, "_d"); var o, s, a, u, h = 0, p = 0; if (b(r)) { if (!(r instanceof z || "ArrayBuffer" == (u = _(r)) || "SharedArrayBuffer" == u)) return St in r ? kt(g, r) : Ct.call(g, r); o = r, p = Et(n, e); var y = r.byteLength; if (void 0 === i) { if (y % e) throw V("Wrong length!"); if ((s = y - p) < 0) throw V("Wrong length!") } else if ((s = d(i) * e) + p > y) throw V("Wrong length!"); a = s / e } else a = v(r), o = new z(s = a * e); for (l(t, "_d", { b: o, o: p, l: s, e: a, v: new G(o) }); h < a;)P(t, h++) }), w = g.prototype = E(Ht), l(w, "constructor", g)) : o(function () { g(1) }) && o(function () { new g(-1) }) && O(function (t) { new g, new g(null), new g(1.5), new g(t) }, !0) || (g = r(function (t, r, n, i) { var o; return f(t, g, c), b(r) ? r instanceof z || "ArrayBuffer" == (o = _(r)) || "SharedArrayBuffer" == o ? void 0 !== i ? new y(r, Et(n, e), i) : void 0 !== n ? new y(r, Et(n, e)) : new y(r) : St in r ? kt(g, r) : Ct.call(g, r) : new y(v(r)) }), Y(m !== Function.prototype ? A(y).concat(A(m)) : A(y), function (t) { t in g || l(g, t, y[t]) }), g.prototype = w, n || (w.constructor = g)); var k = w[gt], I = !!k && ("values" == k.name || void 0 == k.name), C = Dt.values; l(g, vt, !0), l(w, St, c), l(w, _t, !0), l(w, yt, g), (u ? new g(1)[dt] == c : dt in w) || H(w, dt, { get: function () { return c } }), F[c] = g, s(s.G + s.W + s.F * (g != y), F), s(s.S, c, { BYTES_PER_ELEMENT: e }), s(s.S + s.F * o(function () { y.of.call(g, 1) }), c, { from: Ct, of: Rt }), "BYTES_PER_ELEMENT" in w || l(w, "BYTES_PER_ELEMENT", e), s(s.P, c, Mt), U(c), s(s.P + s.F * wt, c, { set: Ut }), s(s.P + s.F * !I, c, Dt), n || w.toString == lt || (w.toString = lt), s(s.P + s.F * o(function () { new g(1).slice() }), c, { slice: Ot }), s(s.P + s.F * (o(function () { return [1, 2].toLocaleString() != new g([1, 2]).toLocaleString() }) || !o(function () { w.toLocaleString.call([1, 2]) })), c, { toLocaleString: Tt }), M[c] = I ? k : C, n || I || l(w, gt, C) } } else t.exports = function () { } }, function (t, e, r) { var n = r(6)("unscopables"), i = Array.prototype; void 0 == i[n] && r(14)(i, n, {}), t.exports = function (t) { i[n][t] = !0 } }, function (t, e, r) { var n = r(42)("meta"), i = r(5), o = r(18), s = r(8).f, a = 0, u = Object.isExtensible || function () { return !0 }, c = !r(4)(function () { return u(Object.preventExtensions({})) }), f = function (t) { s(t, n, { value: { i: "O" + ++a, w: {} } }) }, h = t.exports = { KEY: n, NEED: !1, fastKey: function (t, e) { if (!i(t)) return "symbol" == typeof t ? t : ("string" == typeof t ? "S" : "P") + t; if (!o(t, n)) { if (!u(t)) return "F"; if (!e) return "E"; f(t) } return t[n].i }, getWeak: function (t, e) { if (!o(t, n)) { if (!u(t)) return !0; if (!e) return !1; f(t) } return t[n].w }, onFreeze: function (t) { return c && h.NEED && u(t) && !o(t, n) && f(t), t } } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(); var i = { setInterval: function (t) { function setInterval(e, r) { return t.apply(this, arguments) } return setInterval.toString = function () { return t.toString() }, setInterval }(function (t, e) { return setInterval(t, e) }), clearInterval: function (t) { function clearInterval(e) { return t.apply(this, arguments) } return clearInterval.toString = function () { return t.toString() }, clearInterval }(function (t) { return clearInterval(t) }) }, o = !1, s = null; e.Global = function () { function Global() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, Global) } return Global._testing = function _testing() { o = !0 }, Global.setXMLHttpRequest = function setXMLHttpRequest(t) { s = t }, n(Global, null, [{ key: "location", get: function get() { if (!o) return location } }, { key: "localStorage", get: function get() { if (!o && "undefined" != typeof window) return localStorage } }, { key: "sessionStorage", get: function get() { if (!o && "undefined" != typeof window) return sessionStorage } }, { key: "XMLHttpRequest", get: function get() { if (!o && "undefined" != typeof window) return s || XMLHttpRequest } }, { key: "timer", get: function get() { if (!o) return i } }]), Global }() }, function (t, e, r) { var n = r(13); t.exports = function (t, e, r) { for (var i in e) n(t, i, e[i], r); return t } }, function (t, e, r) { var n = r(21), i = r(131), o = r(82), s = r(1), a = r(7), u = r(80), c = {}, f = {}; (e = t.exports = function (t, e, r, h, l) { var p, g, d, v, y = l ? function () { return t } : u(t), m = n(r, h, e ? 2 : 1), S = 0; if ("function" != typeof y) throw TypeError(t + " is not iterable!"); if (o(y)) { for (p = a(t.length); p > S; S++)if ((v = e ? m(s(g = t[S])[0], g[1]) : m(t[S])) === c || v === f) return v } else for (d = y.call(t); !(g = d.next()).done;)if ((v = i(d, m, g.value, e)) === c || v === f) return v }).BREAK = c, e.RETURN = f }, function (t, e) { t.exports = function (t, e, r, n) { if (!(t instanceof e) || void 0 !== n && n in t) throw TypeError(r + ": incorrect invocation!"); return t } }, function (t, e, r) { "use strict"; var n = r(3), i = r(8), o = r(9), s = r(6)("species"); t.exports = function (t) { var e = n[t]; o && e && !e[s] && i.f(e, s, { configurable: !0, get: function () { return this } }) } }, function (t, e, r) { var n = r(143), i = r(95).concat("length", "prototype"); e.f = Object.getOwnPropertyNames || function getOwnPropertyNames(t) { return n(t, i) } }, function (t, e, r) { var n = r(1), i = r(142), o = r(95), s = r(96)("IE_PROTO"), a = function () { }, u = function () { var t, e = r(98)("iframe"), n = o.length; for (e.style.display = "none", r(94).appendChild(e), e.src = "javascript:", (t = e.contentWindow.document).open(), t.write("<script>document.F=Object<\/script>"), t.close(), u = t.F; n--;)delete u.prototype[o[n]]; return u() }; t.exports = Object.create || function create(t, e) { var r; return null !== t ? (a.prototype = n(t), r = new a, a.prototype = null, r[s] = t) : r = u(), void 0 === e ? r : i(r, e) } }, function (t, e, r) { var n = r(24), i = Math.max, o = Math.min; t.exports = function (t, e) { return (t = n(t)) < 0 ? i(t + e, 0) : o(t, e) } }, function (t, e, r) { var n = r(143), i = r(95); t.exports = Object.keys || function keys(t) { return n(t, i) } }, function (t, e) { t.exports = !1 }, function (t, e) { var r = 0, n = Math.random(); t.exports = function (t) { return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++r + n).toString(36)) } }, function (t, e) { t.exports = function (t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.MetadataService = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(69); e.MetadataService = function () { function MetadataService(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o.JsonService; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, MetadataService), !t) throw i.Log.error("MetadataService: No settings passed to MetadataService"), new Error("settings"); this._settings = t, this._jsonService = new e(["application/jwk-set+json"]) } return MetadataService.prototype.getMetadata = function getMetadata() { var t = this; return this._settings.metadata ? (i.Log.debug("MetadataService.getMetadata: Returning metadata from settings"), Promise.resolve(this._settings.metadata)) : this.metadataUrl ? (i.Log.debug("MetadataService.getMetadata: getting metadata from", this.metadataUrl), this._jsonService.getJson(this.metadataUrl).then(function (e) { return i.Log.debug("MetadataService.getMetadata: json received"), t._settings.metadata = e, e })) : (i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"), Promise.reject(new Error("No authority or metadataUrl configured on settings"))) }, MetadataService.prototype.getIssuer = function getIssuer() { return this._getMetadataProperty("issuer") }, MetadataService.prototype.getAuthorizationEndpoint = function getAuthorizationEndpoint() { return this._getMetadataProperty("authorization_endpoint") }, MetadataService.prototype.getUserInfoEndpoint = function getUserInfoEndpoint() { return this._getMetadataProperty("userinfo_endpoint") }, MetadataService.prototype.getTokenEndpoint = function getTokenEndpoint() { var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]; return this._getMetadataProperty("token_endpoint", t) }, MetadataService.prototype.getCheckSessionIframe = function getCheckSessionIframe() { return this._getMetadataProperty("check_session_iframe", !0) }, MetadataService.prototype.getEndSessionEndpoint = function getEndSessionEndpoint() { return this._getMetadataProperty("end_session_endpoint", !0) }, MetadataService.prototype.getRevocationEndpoint = function getRevocationEndpoint() { return this._getMetadataProperty("revocation_endpoint", !0) }, MetadataService.prototype.getKeysEndpoint = function getKeysEndpoint() { return this._getMetadataProperty("jwks_uri", !0) }, MetadataService.prototype._getMetadataProperty = function _getMetadataProperty(t) { var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; return i.Log.debug("MetadataService.getMetadataProperty for: " + t), this.getMetadata().then(function (r) { if (i.Log.debug("MetadataService.getMetadataProperty: metadata recieved"), void 0 === r[t]) { if (!0 === e) return void i.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property " + t); throw i.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property " + t), new Error("Metadata does not contain property " + t) } return r[t] }) }, MetadataService.prototype.getSigningKeys = function getSigningKeys() { var t = this; return this._settings.signingKeys ? (i.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"), Promise.resolve(this._settings.signingKeys)) : this._getMetadataProperty("jwks_uri").then(function (e) { return i.Log.debug("MetadataService.getSigningKeys: jwks_uri received", e), t._jsonService.getJson(e).then(function (e) { if (i.Log.debug("MetadataService.getSigningKeys: key set received", e), !e.keys) throw i.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"), new Error("Missing keys on keyset"); return t._settings.signingKeys = e.keys, t._settings.signingKeys }) }) }, n(MetadataService, [{ key: "metadataUrl", get: function get() { return this._metadataUrl || (this._settings.metadataUrl ? this._metadataUrl = this._settings.metadataUrl : (this._metadataUrl = this._settings.authority, this._metadataUrl && this._metadataUrl.indexOf(".well-known/openid-configuration") < 0 && ("/" !== this._metadataUrl[this._metadataUrl.length - 1] && (this._metadataUrl += "/"), this._metadataUrl += ".well-known/openid-configuration"))), this._metadataUrl } }]), MetadataService }() }, function (t, e, r) { var n = r(5); t.exports = function (t, e) { if (!n(t) || t._t !== e) throw TypeError("Incompatible receiver, " + e + " required!"); return t } }, function (t, e) { t.exports = {} }, function (t, e, r) { var n = r(0), i = r(25), o = r(4), s = r(92), a = "[" + s + "]", u = RegExp("^" + a + a + "*"), c = RegExp(a + a + "*$"), f = function (t, e, r) { var i = {}, a = o(function () { return !!s[t]() || "​" != "​"[t]() }), u = i[t] = a ? e(h) : s[t]; r && (i[r] = u), n(n.P + n.F * a, "String", i) }, h = f.trim = function (t, e) { return t = String(i(t)), 1 & e && (t = t.replace(u, "")), 2 & e && (t = t.replace(c, "")), t }; t.exports = f }, function (t, e, r) { var n = r(8).f, i = r(18), o = r(6)("toStringTag"); t.exports = function (t, e, r) { t && !i(t = r ? t : t.prototype, o) && n(t, o, { configurable: !0, value: e }) } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.UrlUtility = void 0; var n = r(2), i = r(32); e.UrlUtility = function () { function UrlUtility() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, UrlUtility) } return UrlUtility.addQueryParam = function addQueryParam(t, e, r) { return t.indexOf("?") < 0 && (t += "?"), "?" !== t[t.length - 1] && (t += "&"), t += encodeURIComponent(e), t += "=", t += encodeURIComponent(r) }, UrlUtility.parseUrlFragment = function parseUrlFragment(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "#", r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : i.Global; "string" != typeof t && (t = r.location.href); var o = t.lastIndexOf(e); o >= 0 && (t = t.substr(o + 1)), "?" === e && (o = t.indexOf("#")) >= 0 && (t = t.substr(0, o)); for (var s, a = {}, u = /([^&=]+)=([^&]*)/g, c = 0; s = u.exec(t);)if (a[decodeURIComponent(s[1])] = decodeURIComponent(s[2]), c++ > 50) return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters", t), { error: "Response exceeded expected number of parameters" }; for (var f in a) return a; return {} }, UrlUtility }() }, function (t, e, r) { var n = r(20), i = r(6)("toStringTag"), o = "Arguments" == n(function () { return arguments }()); t.exports = function (t) { var e, r, s; return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (r = function (t, e) { try { return t[e] } catch (t) { } }(e = Object(t), i)) ? r : o ? n(e) : "Object" == (s = n(e)) && "function" == typeof e.callee ? "Arguments" : s } }, function (t, e) { e.f = {}.propertyIsEnumerable }, function (t, e, r) { var n = r(20); t.exports = Object("z").propertyIsEnumerable(0) ? Object : function (t) { return "String" == n(t) ? t.split("") : Object(t) } }, function (t, e, r) { "use strict"; var n = r(0), i = r(11), o = r(21), s = r(34); t.exports = function (t) { n(n.S, t, { from: function from(t) { var e, r, n, a, u = arguments[1]; return i(this), (e = void 0 !== u) && i(u), void 0 == t ? new this : (r = [], e ? (n = 0, a = o(u, arguments[2], 2), s(t, !1, function (t) { r.push(a(t, n++)) })) : s(t, !1, r.push, r), new this(r)) } }) } }, function (t, e, r) { "use strict"; var n = r(0); t.exports = function (t) { n(n.S, t, { of: function of() { for (var t = arguments.length, e = new Array(t); t--;)e[t] = arguments[t]; return new this(e) } }) } }, function (t, e, r) { "use strict"; t.exports = r(41) || !r(4)(function () { var t = Math.random(); __defineSetter__.call(null, t, function () { }), delete r(3)[t] }) }, function (t, e, r) { for (var n, i = r(3), o = r(14), s = r(42), a = s("typed_array"), u = s("view"), c = !(!i.ArrayBuffer || !i.DataView), f = c, h = 0, l = "Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(","); h < 9;)(n = i[l[h++]]) ? (o(n.prototype, a, !0), o(n.prototype, u, !0)) : f = !1; t.exports = { ABV: c, CONSTR: f, TYPED: a, VIEW: u } }, function (t, e, r) { "use strict"; var n = r(3), i = r(0), o = r(13), s = r(33), a = r(31), u = r(34), c = r(35), f = r(5), h = r(4), l = r(61), p = r(48), g = r(91); t.exports = function (t, e, r, d, v, y) { var m = n[t], S = m, _ = v ? "set" : "add", b = S && S.prototype, F = {}, w = function (t) { var e = b[t]; o(b, t, "delete" == t ? function (t) { return !(y && !f(t)) && e.call(this, 0 === t ? 0 : t) } : "has" == t ? function has(t) { return !(y && !f(t)) && e.call(this, 0 === t ? 0 : t) } : "get" == t ? function get(t) { return y && !f(t) ? void 0 : e.call(this, 0 === t ? 0 : t) } : "add" == t ? function add(t) { return e.call(this, 0 === t ? 0 : t), this } : function set(t, r) { return e.call(this, 0 === t ? 0 : t, r), this }) }; if ("function" == typeof S && (y || b.forEach && !h(function () { (new S).entries().next() }))) { var E = new S, x = E[_](y ? {} : -0, 1) != E, A = h(function () { E.has(1) }), P = l(function (t) { new S(t) }), k = !y && h(function () { for (var t = new S, e = 5; e--;)t[_](e, e); return !t.has(-0) }); P || ((S = e(function (e, r) { c(e, S, t); var n = g(new m, e, S); return void 0 != r && u(r, v, n[_], n), n })).prototype = b, b.constructor = S), (A || k) && (w("delete"), w("has"), v && w("get")), (k || x) && w(_), y && b.clear && delete b.clear } else S = d.getConstructor(e, t, v, _), s(S.prototype, r), a.NEED = !0; return p(S, t), F[t] = S, i(i.G + i.W + i.F * (S != m), F), y || d.setStrong(S, t, v), S } }, function (t, e, r) { var n = r(1), i = r(11), o = r(6)("species"); t.exports = function (t, e) { var r, s = n(t).constructor; return void 0 === s || void 0 == (r = n(s)[o]) ? e : i(r) } }, function (t, e, r) { "use strict"; var n = r(14), i = r(13), o = r(4), s = r(25), a = r(6); t.exports = function (t, e, r) { var u = a(t), c = r(s, u, ""[t]), f = c[0], h = c[1]; o(function () { var e = {}; return e[u] = function () { return 7 }, 7 != ""[t](e) }) && (i(String.prototype, t, f), n(RegExp.prototype, u, 2 == e ? function (t, e) { return h.call(t, this, e) } : function (t) { return h.call(t, this) })) } }, function (t, e, r) { "use strict"; var n = r(1); t.exports = function () { var t = n(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, r) { var n = r(6)("iterator"), i = !1; try { var o = [7][n](); o.return = function () { i = !0 }, Array.from(o, function () { throw 2 }) } catch (t) { } t.exports = function (t, e) { if (!e && !i) return !1; var r = !1; try { var o = [7], s = o[n](); s.next = function () { return { done: r = !0 } }, o[n] = function () { return s }, t(o) } catch (t) { } return r } }, function (t, e, r) { var n = r(5), i = r(20), o = r(6)("match"); t.exports = function (t) { var e; return n(t) && (void 0 !== (e = t[o]) ? !!e : "RegExp" == i(t)) } }, function (t, e, r) { var n = r(20); t.exports = Array.isArray || function isArray(t) { return "Array" == n(t) } }, function (t, e) { e.f = Object.getOwnPropertySymbols }, function (t, e, r) { var n = r(17), i = r(7), o = r(39); t.exports = function (t) { return function (e, r, s) { var a, u = n(e), c = i(u.length), f = o(s, c); if (t && r != r) { for (; c > f;)if ((a = u[f++]) != a) return !0 } else for (; c > f; f++)if ((t || f in u) && u[f] === r) return t || f || 0; return !t && -1 } } }, function (t, e, r) { var n = r(3), i = n["__core-js_shared__"] || (n["__core-js_shared__"] = {}); t.exports = function (t) { return i[t] || (i[t] = {}) } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.State = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = function _interopRequireDefault(t) { return t && t.__esModule ? t : { default: t } }(r(107)); e.State = function () { function State() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.id, r = t.data, n = t.created; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, State), this._id = e || (0, o.default)(), this._data = r, this._created = "number" == typeof n && n > 0 ? n : parseInt(Date.now() / 1e3) } return State.prototype.toStorageString = function toStorageString() { return i.Log.debug("State.toStorageString"), JSON.stringify({ id: this.id, data: this.data, created: this.created }) }, State.fromStorageString = function fromStorageString(t) { return i.Log.debug("State.fromStorageString"), new State(JSON.parse(t)) }, State.clearStaleState = function clearStaleState(t, e) { var r = Date.now() / 1e3 - e; return t.getAllKeys().then(function (e) { i.Log.debug("State.clearStaleState: got keys", e); for (var n = [], o = function _loop(o) { var s = e[o]; a = t.get(s).then(function (e) { var n = !1; if (e) try { var o = State.fromStorageString(e); i.Log.debug("State.clearStaleState: got item from key: ", s, o.created), o.created <= r && (n = !0) } catch (t) { i.Log.error("State.clearStaleState: Error parsing state for key", s, t.message), n = !0 } else i.Log.debug("State.clearStaleState: no item in storage for key: ", s), n = !0; if (n) return i.Log.debug("State.clearStaleState: removed item for key: ", s), t.remove(s) }), n.push(a) }, s = 0; s < e.length; s++) { var a; o(s) } return i.Log.debug("State.clearStaleState: waiting on promise count:", n.length), Promise.all(n) }) }, n(State, [{ key: "id", get: function get() { return this._id } }, { key: "data", get: function get() { return this._data } }, { key: "created", get: function get() { return this._created } }]), State }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.JoseUtil = void 0; var n = r(168), i = r(2); var o = ["RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512"]; e.JoseUtil = function () { function JoseUtil() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, JoseUtil) } return JoseUtil.parseJwt = function parseJwt(t) { i.Log.debug("JoseUtil.parseJwt"); try { var e = n.jws.JWS.parse(t); return { header: e.headerObj, payload: e.payloadObj } } catch (t) { i.Log.error(t) } }, JoseUtil.validateJwt = function validateJwt(t, e, r, o, s, a) { i.Log.debug("JoseUtil.validateJwt"); try { if ("RSA" === e.kty) if (e.e && e.n) e = n.KEYUTIL.getKey(e); else { if (!e.x5c || !e.x5c.length) return i.Log.error("JoseUtil.validateJwt: RSA key missing key material", e), Promise.reject(new Error("RSA key missing key material")); var u = (0, n.b64tohex)(e.x5c[0]); e = n.X509.getPublicKeyFromCertHex(u) } else { if ("EC" !== e.kty) return i.Log.error("JoseUtil.validateJwt: Unsupported key type", e && e.kty), Promise.reject(new Error("Unsupported key type: " + e && e.kty)); if (!(e.crv && e.x && e.y)) return i.Log.error("JoseUtil.validateJwt: EC key missing key material", e), Promise.reject(new Error("EC key missing key material")); e = n.KEYUTIL.getKey(e) } return JoseUtil._validateJwt(t, e, r, o, s, a) } catch (t) { return i.Log.error(t && t.message || t), Promise.reject("JWT validation failed") } }, JoseUtil.validateJwtAttributes = function validateJwtAttributes(t, e, r, n, o) { n || (n = 0), o || (o = parseInt(Date.now() / 1e3)); var s = JoseUtil.parseJwt(t).payload; if (!s.iss) return i.Log.error("JoseUtil._validateJwt: issuer was not provided"), Promise.reject(new Error("issuer was not provided")); if (s.iss !== e) return i.Log.error("JoseUtil._validateJwt: Invalid issuer in token", s.iss), Promise.reject(new Error("Invalid issuer in token: " + s.iss)); if (!s.aud) return i.Log.error("JoseUtil._validateJwt: aud was not provided"), Promise.reject(new Error("aud was not provided")); if (!(s.aud === r || Array.isArray(s.aud) && s.aud.indexOf(r) >= 0)) return i.Log.error("JoseUtil._validateJwt: Invalid audience in token", s.aud), Promise.reject(new Error("Invalid audience in token: " + s.aud)); if (s.azp && s.azp !== r) return i.Log.error("JoseUtil._validateJwt: Invalid azp in token", s.azp), Promise.reject(new Error("Invalid azp in token: " + s.azp)); var a = o + n, u = o - n; return s.iat ? a < s.iat ? (i.Log.error("JoseUtil._validateJwt: iat is in the future", s.iat), Promise.reject(new Error("iat is in the future: " + s.iat))) : s.nbf && a < s.nbf ? (i.Log.error("JoseUtil._validateJwt: nbf is in the future", s.nbf), Promise.reject(new Error("nbf is in the future: " + s.nbf))) : s.exp ? s.exp < u ? (i.Log.error("JoseUtil._validateJwt: exp is in the past", s.exp), Promise.reject(new Error("exp is in the past:" + s.exp))) : Promise.resolve(s) : (i.Log.error("JoseUtil._validateJwt: exp was not provided"), Promise.reject(new Error("exp was not provided"))) : (i.Log.error("JoseUtil._validateJwt: iat was not provided"), Promise.reject(new Error("iat was not provided"))) }, JoseUtil._validateJwt = function _validateJwt(t, e, r, s, a, u) { return JoseUtil.validateJwtAttributes(t, r, s, a, u).then(function (r) { try { return n.jws.JWS.verify(t, e, o) ? r : (i.Log.error("JoseUtil._validateJwt: signature validation failed"), Promise.reject(new Error("signature validation failed"))) } catch (t) { return i.Log.error(t && t.message || t), Promise.reject(new Error("signature validation failed")) } }) }, JoseUtil.hashString = function hashString(t, e) { try { return n.crypto.Util.hashString(t, e) } catch (t) { i.Log.error(t) } }, JoseUtil.hexToBase64Url = function hexToBase64Url(t) { try { return (0, n.hextob64u)(t) } catch (t) { i.Log.error(t) } }, JoseUtil }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.JsonService = void 0; var n = r(2), i = r(32); e.JsonService = function () { function JsonService() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : null, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : i.Global.XMLHttpRequest; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, JsonService), t && Array.isArray(t) ? this._contentTypes = t.slice() : this._contentTypes = [], this._contentTypes.push("application/json"), this._XMLHttpRequest = e } return JsonService.prototype.getJson = function getJson(t, e) { var r = this; if (!t) throw n.Log.error("JsonService.getJson: No url passed"), new Error("url"); return n.Log.debug("JsonService.getJson, url: ", t), new Promise(function (i, o) { var s = new r._XMLHttpRequest; s.open("GET", t); var a = r._contentTypes; s.onload = function () { if (n.Log.debug("JsonService.getJson: HTTP response received, status", s.status), 200 === s.status) { var e = s.getResponseHeader("Content-Type"); if (e) if (a.find(function (t) { if (e.startsWith(t)) return !0 })) try { return void i(JSON.parse(s.responseText)) } catch (t) { return n.Log.error("JsonService.getJson: Error parsing JSON response", t.message), void o(t) } o(Error("Invalid response Content-Type: " + e + ", from URL: " + t)) } else o(Error(s.statusText + " (" + s.status + ")")) }, s.onerror = function () { n.Log.error("JsonService.getJson: network error"), o(Error("Network Error")) }, e && (n.Log.debug("JsonService.getJson: token passed, setting Authorization header"), s.setRequestHeader("Authorization", "Bearer " + e)), s.send() }) }, JsonService.prototype.postForm = function postForm(t, e) { var r = this; if (!t) throw n.Log.error("JsonService.postForm: No url passed"), new Error("url"); return n.Log.debug("JsonService.postForm, url: ", t), new Promise(function (i, o) { var s = new r._XMLHttpRequest; s.open("POST", t); var a = r._contentTypes; s.onload = function () { if (n.Log.debug("JsonService.postForm: HTTP response received, status", s.status), 200 !== s.status) { if (400 === s.status) if (r = s.getResponseHeader("Content-Type")) if (a.find(function (t) { if (r.startsWith(t)) return !0 })) try { var e = JSON.parse(s.responseText); if (e && e.error) return n.Log.error("JsonService.postForm: Error from server: ", e.error), void o(new Error(e.error)) } catch (t) { return n.Log.error("JsonService.postForm: Error parsing JSON response", t.message), void o(t) } o(Error(s.statusText + " (" + s.status + ")")) } else { var r; if ((r = s.getResponseHeader("Content-Type")) && a.find(function (t) { if (r.startsWith(t)) return !0 })) try { return void i(JSON.parse(s.responseText)) } catch (t) { return n.Log.error("JsonService.postForm: Error parsing JSON response", t.message), void o(t) } o(Error("Invalid response Content-Type: " + r + ", from URL: " + t)) } }, s.onerror = function () { n.Log.error("JsonService.postForm: network error"), o(Error("Network Error")) }; var u = ""; for (var c in e) { var f = e[c]; f && (u.length > 0 && (u += "&"), u += encodeURIComponent(c), u += "=", u += encodeURIComponent(f)) } s.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), s.send(u) }) }, JsonService }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.WebStorageStateStore = void 0; var n = r(2), i = r(32); e.WebStorageStateStore = function () { function WebStorageStateStore() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.prefix, r = void 0 === e ? "oidc." : e, n = t.store, o = void 0 === n ? i.Global.localStorage : n; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, WebStorageStateStore), this._store = o, this._prefix = r } return WebStorageStateStore.prototype.set = function set(t, e) { return n.Log.debug("WebStorageStateStore.set", t), t = this._prefix + t, this._store.setItem(t, e), Promise.resolve() }, WebStorageStateStore.prototype.get = function get(t) { n.Log.debug("WebStorageStateStore.get", t), t = this._prefix + t; var e = this._store.getItem(t); return Promise.resolve(e) }, WebStorageStateStore.prototype.remove = function remove(t) { n.Log.debug("WebStorageStateStore.remove", t), t = this._prefix + t; var e = this._store.getItem(t); return this._store.removeItem(t), Promise.resolve(e) }, WebStorageStateStore.prototype.getAllKeys = function getAllKeys() { n.Log.debug("WebStorageStateStore.getAllKeys"); for (var t = [], e = 0; e < this._store.length; e++) { var r = this._store.key(e); 0 === r.indexOf(this._prefix) && t.push(r.substr(this._prefix.length)) } return Promise.resolve(t) }, WebStorageStateStore }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.OidcClientSettings = void 0; var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, i = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), o = r(2), s = r(70), a = r(170), u = r(44); var c = "id_token", f = "openid", h = 900, l = 300; e.OidcClientSettings = function () { function OidcClientSettings() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.authority, r = t.metadataUrl, i = t.metadata, o = t.signingKeys, p = t.client_id, g = t.client_secret, d = t.response_type, v = void 0 === d ? c : d, y = t.scope, m = void 0 === y ? f : y, S = t.redirect_uri, _ = t.post_logout_redirect_uri, b = t.prompt, F = t.display, w = t.max_age, E = t.ui_locales, x = t.acr_values, A = t.resource, P = t.response_mode, k = t.filterProtocolClaims, I = void 0 === k || k, C = t.loadUserInfo, R = void 0 === C || C, B = t.staleStateAge, T = void 0 === B ? h : B, M = t.clockSkew, O = void 0 === M ? l : M, U = t.stateStore, D = void 0 === U ? new s.WebStorageStateStore : U, N = t.ResponseValidatorCtor, L = void 0 === N ? a.ResponseValidator : N, j = t.MetadataServiceCtor, H = void 0 === j ? u.MetadataService : j, K = t.extraQueryParams, V = void 0 === K ? {} : K; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, OidcClientSettings), this._authority = e, this._metadataUrl = r, this._metadata = i, this._signingKeys = o, this._client_id = p, this._client_secret = g, this._response_type = v, this._scope = m, this._redirect_uri = S, this._post_logout_redirect_uri = _, this._prompt = b, this._display = F, this._max_age = w, this._ui_locales = E, this._acr_values = x, this._resource = A, this._response_mode = P, this._filterProtocolClaims = !!I, this._loadUserInfo = !!R, this._staleStateAge = T, this._clockSkew = O, this._stateStore = D, this._validator = new L(this), this._metadataService = new H(this), this._extraQueryParams = "object" === (void 0 === V ? "undefined" : n(V)) ? V : {} } return i(OidcClientSettings, [{ key: "client_id", get: function get() { return this._client_id }, set: function set(t) { if (this._client_id) throw o.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."), new Error("client_id has already been assigned."); this._client_id = t } }, { key: "client_secret", get: function get() { return this._client_secret } }, { key: "response_type", get: function get() { return this._response_type } }, { key: "scope", get: function get() { return this._scope } }, { key: "redirect_uri", get: function get() { return this._redirect_uri } }, { key: "post_logout_redirect_uri", get: function get() { return this._post_logout_redirect_uri } }, { key: "prompt", get: function get() { return this._prompt } }, { key: "display", get: function get() { return this._display } }, { key: "max_age", get: function get() { return this._max_age } }, { key: "ui_locales", get: function get() { return this._ui_locales } }, { key: "acr_values", get: function get() { return this._acr_values } }, { key: "resource", get: function get() { return this._resource } }, { key: "response_mode", get: function get() { return this._response_mode } }, { key: "authority", get: function get() { return this._authority }, set: function set(t) { if (this._authority) throw o.Log.error("OidcClientSettings.set_authority: authority has already been assigned."), new Error("authority has already been assigned."); this._authority = t } }, { key: "metadataUrl", get: function get() { return this._metadataUrl || (this._metadataUrl = this.authority, this._metadataUrl && this._metadataUrl.indexOf(".well-known/openid-configuration") < 0 && ("/" !== this._metadataUrl[this._metadataUrl.length - 1] && (this._metadataUrl += "/"), this._metadataUrl += ".well-known/openid-configuration")), this._metadataUrl } }, { key: "metadata", get: function get() { return this._metadata }, set: function set(t) { this._metadata = t } }, { key: "signingKeys", get: function get() { return this._signingKeys }, set: function set(t) { this._signingKeys = t } }, { key: "filterProtocolClaims", get: function get() { return this._filterProtocolClaims } }, { key: "loadUserInfo", get: function get() { return this._loadUserInfo } }, { key: "staleStateAge", get: function get() { return this._staleStateAge } }, { key: "clockSkew", get: function get() { return this._clockSkew } }, { key: "stateStore", get: function get() { return this._stateStore } }, { key: "validator", get: function get() { return this._validator } }, { key: "metadataService", get: function get() { return this._metadataService } }, { key: "extraQueryParams", get: function get() { return this._extraQueryParams }, set: function set(t) { "object" === (void 0 === t ? "undefined" : n(t)) ? this._extraQueryParams = t : this._extraQueryParams = {} } }]), OidcClientSettings }() }, function (t, e, r) { var n = r(3).navigator; t.exports = n && n.userAgent || "" }, function (t, e, r) { "use strict"; var n = r(3), i = r(9), o = r(41), s = r(56), a = r(14), u = r(33), c = r(4), f = r(35), h = r(24), l = r(7), p = r(119), g = r(37).f, d = r(8).f, v = r(78), y = r(48), m = "prototype", S = "Wrong index!", _ = n.ArrayBuffer, b = n.DataView, F = n.Math, w = n.RangeError, E = n.Infinity, x = _, A = F.abs, P = F.pow, k = F.floor, I = F.log, C = F.LN2, R = i ? "_b" : "buffer", B = i ? "_l" : "byteLength", T = i ? "_o" : "byteOffset"; function packIEEE754(t, e, r) { var n, i, o, s = new Array(r), a = 8 * r - e - 1, u = (1 << a) - 1, c = u >> 1, f = 23 === e ? P(2, -24) - P(2, -77) : 0, h = 0, l = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; for ((t = A(t)) != t || t === E ? (i = t != t ? 1 : 0, n = u) : (n = k(I(t) / C), t * (o = P(2, -n)) < 1 && (n-- , o *= 2), (t += n + c >= 1 ? f / o : f * P(2, 1 - c)) * o >= 2 && (n++ , o /= 2), n + c >= u ? (i = 0, n = u) : n + c >= 1 ? (i = (t * o - 1) * P(2, e), n += c) : (i = t * P(2, c - 1) * P(2, e), n = 0)); e >= 8; s[h++] = 255 & i, i /= 256, e -= 8); for (n = n << e | i, a += e; a > 0; s[h++] = 255 & n, n /= 256, a -= 8); return s[--h] |= 128 * l, s } function unpackIEEE754(t, e, r) { var n, i = 8 * r - e - 1, o = (1 << i) - 1, s = o >> 1, a = i - 7, u = r - 1, c = t[u--], f = 127 & c; for (c >>= 7; a > 0; f = 256 * f + t[u], u-- , a -= 8); for (n = f & (1 << -a) - 1, f >>= -a, a += e; a > 0; n = 256 * n + t[u], u-- , a -= 8); if (0 === f) f = 1 - s; else { if (f === o) return n ? NaN : c ? -E : E; n += P(2, e), f -= s } return (c ? -1 : 1) * n * P(2, f - e) } function unpackI32(t) { return t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0] } function packI8(t) { return [255 & t] } function packI16(t) { return [255 & t, t >> 8 & 255] } function packI32(t) { return [255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255] } function packF64(t) { return packIEEE754(t, 52, 8) } function packF32(t) { return packIEEE754(t, 23, 4) } function addGetter(t, e, r) { d(t[m], e, { get: function () { return this[r] } }) } function get(t, e, r, n) { var i = p(+r); if (i + e > t[B]) throw w(S); var o = t[R]._b, s = i + t[T], a = o.slice(s, s + e); return n ? a : a.reverse() } function set(t, e, r, n, i, o) { var s = p(+r); if (s + e > t[B]) throw w(S); for (var a = t[R]._b, u = s + t[T], c = n(+i), f = 0; f < e; f++)a[u + f] = c[o ? f : e - f - 1] } if (s.ABV) { if (!c(function () { _(1) }) || !c(function () { new _(-1) }) || c(function () { return new _, new _(1.5), new _(NaN), "ArrayBuffer" != _.name })) { for (var M, O = (_ = function ArrayBuffer(t) { return f(this, _), new x(p(t)) })[m] = x[m], U = g(x), D = 0; U.length > D;)(M = U[D++]) in _ || a(_, M, x[M]); o || (O.constructor = _) } var N = new b(new _(2)), L = b[m].setInt8; N.setInt8(0, 2147483648), N.setInt8(1, 2147483649), !N.getInt8(0) && N.getInt8(1) || u(b[m], { setInt8: function setInt8(t, e) { L.call(this, t, e << 24 >> 24) }, setUint8: function setUint8(t, e) { L.call(this, t, e << 24 >> 24) } }, !0) } else _ = function ArrayBuffer(t) { f(this, _, "ArrayBuffer"); var e = p(t); this._b = v.call(new Array(e), 0), this[B] = e }, b = function DataView(t, e, r) { f(this, b, "DataView"), f(t, _, "DataView"); var n = t[B], i = h(e); if (i < 0 || i > n) throw w("Wrong offset!"); if (i + (r = void 0 === r ? n - i : l(r)) > n) throw w("Wrong length!"); this[R] = t, this[T] = i, this[B] = r }, i && (addGetter(_, "byteLength", "_l"), addGetter(b, "buffer", "_b"), addGetter(b, "byteLength", "_l"), addGetter(b, "byteOffset", "_o")), u(b[m], { getInt8: function getInt8(t) { return get(this, 1, t)[0] << 24 >> 24 }, getUint8: function getUint8(t) { return get(this, 1, t)[0] }, getInt16: function getInt16(t) { var e = get(this, 2, t, arguments[1]); return (e[1] << 8 | e[0]) << 16 >> 16 }, getUint16: function getUint16(t) { var e = get(this, 2, t, arguments[1]); return e[1] << 8 | e[0] }, getInt32: function getInt32(t) { return unpackI32(get(this, 4, t, arguments[1])) }, getUint32: function getUint32(t) { return unpackI32(get(this, 4, t, arguments[1])) >>> 0 }, getFloat32: function getFloat32(t) { return unpackIEEE754(get(this, 4, t, arguments[1]), 23, 4) }, getFloat64: function getFloat64(t) { return unpackIEEE754(get(this, 8, t, arguments[1]), 52, 8) }, setInt8: function setInt8(t, e) { set(this, 1, t, packI8, e) }, setUint8: function setUint8(t, e) { set(this, 1, t, packI8, e) }, setInt16: function setInt16(t, e) { set(this, 2, t, packI16, e, arguments[2]) }, setUint16: function setUint16(t, e) { set(this, 2, t, packI16, e, arguments[2]) }, setInt32: function setInt32(t, e) { set(this, 4, t, packI32, e, arguments[2]) }, setUint32: function setUint32(t, e) { set(this, 4, t, packI32, e, arguments[2]) }, setFloat32: function setFloat32(t, e) { set(this, 4, t, packF32, e, arguments[2]) }, setFloat64: function setFloat64(t, e) { set(this, 8, t, packF64, e, arguments[2]) } }); y(_, "ArrayBuffer"), y(b, "DataView"), a(b[m], s.VIEW, !0), e.ArrayBuffer = _, e.DataView = b }, function (t, e, r) { "use strict"; var n = r(11); t.exports.f = function (t) { return new function PromiseCapability(t) { var e, r; this.promise = new t(function (t, n) { if (void 0 !== e || void 0 !== r) throw TypeError("Bad Promise constructor"); e = t, r = n }), this.resolve = n(e), this.reject = n(r) }(t) } }, function (t, e, r) { var n = r(3), i = r(76).set, o = n.MutationObserver || n.WebKitMutationObserver, s = n.process, a = n.Promise, u = "process" == r(20)(s); t.exports = function () { var t, e, r, c = function () { var n, i; for (u && (n = s.domain) && n.exit(); t;) { i = t.fn, t = t.next; try { i() } catch (n) { throw t ? r() : e = void 0, n } } e = void 0, n && n.enter() }; if (u) r = function () { s.nextTick(c) }; else if (!o || n.navigator && n.navigator.standalone) if (a && a.resolve) { var f = a.resolve(); r = function () { f.then(c) } } else r = function () { i.call(n, c) }; else { var h = !0, l = document.createTextNode(""); new o(c).observe(l, { characterData: !0 }), r = function () { l.data = h = !h } } return function (n) { var i = { fn: n, next: void 0 }; e && (e.next = i), t || (t = i, r()), e = i } } }, function (t, e, r) { var n, i, o, s = r(21), a = r(138), u = r(94), c = r(98), f = r(3), h = f.process, l = f.setImmediate, p = f.clearImmediate, g = f.MessageChannel, d = f.Dispatch, v = 0, y = {}, 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 && p || (l = function setImmediate(t) { for (var e = [], r = 1; arguments.length > r;)e.push(arguments[r++]); return y[++v] = function () { a("function" == typeof t ? t : Function(t), e) }, n(v), v }, p = function clearImmediate(t) { delete y[t] }, "process" == r(20)(h) ? n = function (t) { h.nextTick(s(m, t, 1)) } : d && d.now ? n = function (t) { d.now(s(m, t, 1)) } : g ? (o = (i = new g).port2, i.port1.onmessage = S, n = s(o.postMessage, o, 1)) : f.addEventListener && "function" == typeof postMessage && !f.importScripts ? (n = function (t) { f.postMessage(t + "", "*") }, f.addEventListener("message", S, !1)) : n = "onreadystatechange" in c("script") ? function (t) { u.appendChild(c("script")).onreadystatechange = function () { u.removeChild(this), m.call(t) } } : function (t) { setTimeout(s(m, t, 1), 0) }), t.exports = { set: l, clear: p } }, function (t, e, r) { "use strict"; var n = r(30), i = r(128), o = r(46), s = r(17); t.exports = r(86)(Array, "Array", function (t, e) { this._t = s(t), this._i = 0, this._k = e }, function () { var t = this._t, e = this._k, r = this._i++; return !t || r >= t.length ? (this._t = void 0, i(1)) : i(0, "keys" == e ? r : "values" == e ? t[r] : [r, t[r]]) }, "values"), o.Arguments = o.Array, n("keys"), n("values"), n("entries") }, function (t, e, r) { "use strict"; var n = r(10), i = r(39), o = r(7); t.exports = function fill(t) { for (var e = n(this), r = o(e.length), s = arguments.length, a = i(s > 1 ? arguments[1] : void 0, r), u = s > 2 ? arguments[2] : void 0, c = void 0 === u ? r : i(u, r); c > a;)e[a++] = t; return e } }, function (t, e, r) { var n = r(281); t.exports = function (t, e) { return new (n(t))(e) } }, function (t, e, r) { var n = r(50), i = r(6)("iterator"), o = r(46); t.exports = r(27).getIteratorMethod = function (t) { if (void 0 != t) return t[i] || t["@@iterator"] || o[n(t)] } }, function (t, e, r) { "use strict"; var n = r(8), i = r(43); t.exports = function (t, e, r) { e in t ? n.f(t, e, i(0, r)) : t[e] = r } }, function (t, e, r) { var n = r(46), i = r(6)("iterator"), o = Array.prototype; t.exports = function (t) { return void 0 !== t && (n.Array === t || o[i] === t) } }, function (t, e, r) { var n = r(6)("match"); t.exports = function (t) { var e = /./; try { "/./"[t](e) } catch (r) { try { return e[n] = !1, !"/./"[t](e) } catch (t) { } } return !0 } }, function (t, e, r) { var n = r(62), i = r(25); t.exports = function (t, e, r) { if (n(e)) throw TypeError("String#" + r + " doesn't accept regex!"); return String(i(t)) } }, function (t, e, r) { "use strict"; var n = r(38), i = r(43), o = r(48), s = {}; r(14)(s, r(6)("iterator"), function () { return this }), t.exports = function (t, e, r) { t.prototype = n(s, { next: i(1, r) }), o(t, e + " Iterator") } }, function (t, e, r) { "use strict"; var n = r(41), i = r(0), o = r(13), s = r(14), a = r(46), u = r(85), c = r(48), f = r(15), h = r(6)("iterator"), l = !([].keys && "next" in [].keys()), p = function () { return this }; t.exports = function (t, e, r, g, d, v, y) { u(r, e, g); var m, S, _, b = function (t) { if (!l && t in x) return x[t]; switch (t) { case "keys": return function keys() { return new r(this, t) }; case "values": return function values() { return new r(this, t) } }return function entries() { return new r(this, t) } }, F = e + " Iterator", w = "values" == d, E = !1, x = t.prototype, A = x[h] || x["@@iterator"] || d && x[d], P = A || b(d), k = d ? w ? b("entries") : P : void 0, I = "Array" == e && x.entries || A; if (I && (_ = f(I.call(new t))) !== Object.prototype && _.next && (c(_, F, !0), n || "function" == typeof _[h] || s(_, h, p)), w && A && "values" !== A.name && (E = !0, P = function values() { return A.call(this) }), n && !y || !l && !E && x[h] || s(x, h, P), a[e] = P, a[F] = p, d) if (m = { values: w ? P : b("values"), keys: v ? P : b("keys"), entries: k }, y) for (S in m) S in x || o(x, S, m[S]); else i(i.P + i.F * (l || E), e, m); return m } }, function (t, e, r) { var n = r(24), i = r(25); t.exports = function (t) { return function (e, r) { var o, s, a = String(i(e)), u = n(r), c = a.length; return u < 0 || u >= c ? t ? "" : void 0 : (o = a.charCodeAt(u)) < 55296 || o > 56319 || u + 1 === c || (s = a.charCodeAt(u + 1)) < 56320 || s > 57343 ? t ? a.charAt(u) : o : t ? a.slice(u, u + 2) : s - 56320 + (o - 55296 << 10) + 65536 } } }, function (t, e) { var r = Math.expm1; t.exports = !r || r(10) > 22025.465794806718 || r(10) < 22025.465794806718 || -2e-17 != r(-2e-17) ? function expm1(t) { return 0 == (t = +t) ? t : t > -1e-6 && t < 1e-6 ? t + t * t / 2 : Math.exp(t) - 1 } : r }, function (t, e) { t.exports = Math.sign || function sign(t) { return 0 == (t = +t) || t != t ? t : t < 0 ? -1 : 1 } }, function (t, e, r) { "use strict"; var n = r(24), i = r(25); t.exports = function repeat(t) { var e = String(i(this)), r = "", o = n(t); if (o < 0 || o == 1 / 0) throw RangeError("Count can't be negative"); for (; o > 0; (o >>>= 1) && (e += e))1 & o && (r += e); return r } }, function (t, e, r) { var n = r(5), i = r(93).set; t.exports = function (t, e, r) { var o, s = e.constructor; return s !== r && "function" == typeof s && (o = s.prototype) !== r.prototype && n(o) && i && i(t, o), t } }, function (t, e) { t.exports = "\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff" }, function (t, e, r) { var n = r(5), i = r(1), o = function (t, e) { if (i(t), !n(e) && null !== e) throw TypeError(e + ": can't set as prototype!") }; t.exports = { set: Object.setPrototypeOf || ("__proto__" in {} ? function (t, e, n) { try { (n = r(21)(Function.call, r(16).f(Object.prototype, "__proto__").set, 2))(t, []), e = !(t instanceof Array) } catch (t) { e = !0 } return function setPrototypeOf(t, r) { return o(t, r), e ? t.__proto__ = r : n(t, r), t } }({}, !1) : void 0), check: o } }, function (t, e, r) { var n = r(3).document; t.exports = n && n.documentElement }, function (t, e) { t.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",") }, function (t, e, r) { var n = r(66)("keys"), i = r(42); t.exports = function (t) { return n[t] || (n[t] = i(t)) } }, function (t, e, r) { var n = r(3), i = r(27), o = r(41), s = r(144), a = r(8).f; t.exports = function (t) { var e = i.Symbol || (i.Symbol = o ? {} : n.Symbol || {}); "_" == t.charAt(0) || t in e || a(e, t, { value: s.f(t) }) } }, function (t, e, r) { var n = r(5), i = r(3).document, o = n(i) && n(i.createElement); t.exports = function (t) { return o ? i.createElement(t) : {} } }, function (t, e) { var r; r = function () { return this }(); try { r = r || Function("return this")() || (0, eval)("this") } catch (t) { "object" == typeof window && (r = window) } t.exports = r }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.CordovaPopupWindow = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2); var o = "location=no,toolbar=no,zoom=no", s = "_blank"; e.CordovaPopupWindow = function () { function CordovaPopupWindow(t) { var e = this; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, CordovaPopupWindow), this._promise = new Promise(function (t, r) { e._resolve = t, e._reject = r }), this.features = t.popupWindowFeatures || o, this.target = t.popupWindowTarget || s, this.redirect_uri = t.startUrl, i.Log.debug("CordovaPopupWindow.ctor: redirect_uri: " + this.redirect_uri) } return CordovaPopupWindow.prototype._isInAppBrowserInstalled = function _isInAppBrowserInstalled(t) { return ["cordova-plugin-inappbrowser", "cordova-plugin-inappbrowser.inappbrowser", "org.apache.cordova.inappbrowser"].some(function (e) { return t.hasOwnProperty(e) }) }, CordovaPopupWindow.prototype.navigate = function navigate(t) { if (t && t.url) { if (!window.cordova) return this._error("cordova is undefined"); var e = window.cordova.require("cordova/plugin_list").metadata; if (!1 === this._isInAppBrowserInstalled(e)) return this._error("InAppBrowser plugin not found"); this._popup = cordova.InAppBrowser.open(t.url, this.target, this.features), this._popup ? (i.Log.debug("CordovaPopupWindow.navigate: popup successfully created"), this._exitCallbackEvent = this._exitCallback.bind(this), this._loadStartCallbackEvent = this._loadStartCallback.bind(this), this._popup.addEventListener("exit", this._exitCallbackEvent, !1), this._popup.addEventListener("loadstart", this._loadStartCallbackEvent, !1)) : this._error("Error opening popup window") } else this._error("No url provided"); return this.promise }, CordovaPopupWindow.prototype._loadStartCallback = function _loadStartCallback(t) { 0 === t.url.indexOf(this.redirect_uri) && this._success({ url: t.url }) }, CordovaPopupWindow.prototype._exitCallback = function _exitCallback(t) { this._error(t) }, CordovaPopupWindow.prototype._success = function _success(t) { this._cleanup(), i.Log.debug("CordovaPopupWindow: Successful response from cordova popup window"), this._resolve(t) }, CordovaPopupWindow.prototype._error = function _error(t) { this._cleanup(), i.Log.error(t), this._reject(new Error(t)) }, CordovaPopupWindow.prototype.close = function close() { this._cleanup() }, CordovaPopupWindow.prototype._cleanup = function _cleanup() { this._popup && (i.Log.debug("CordovaPopupWindow: cleaning up popup"), this._popup.removeEventListener("exit", this._exitCallbackEvent, !1), this._popup.removeEventListener("loadstart", this._loadStartCallbackEvent, !1), this._popup.close()), this._popup = null }, n(CordovaPopupWindow, [{ key: "promise", get: function get() { return this._promise } }]), CordovaPopupWindow }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.TokenRevocationClient = void 0; var n = r(2), i = r(44), o = r(32); e.TokenRevocationClient = function () { function TokenRevocationClient(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o.Global.XMLHttpRequest, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : i.MetadataService; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, TokenRevocationClient), !t) throw n.Log.error("TokenRevocationClient.ctor: No settings provided"), new Error("No settings provided."); this._settings = t, this._XMLHttpRequestCtor = e, this._metadataService = new r(this._settings) } return TokenRevocationClient.prototype.revoke = function revoke(t, e) { var r = this, i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "access_token"; if (!t) throw n.Log.error("TokenRevocationClient.revoke: No token provided"), new Error("No token provided."); if ("access_token" !== i && "refresh_token" != i) throw n.Log.error("TokenRevocationClient.revoke: Invalid token type"), new Error("Invalid token type."); return this._metadataService.getRevocationEndpoint().then(function (o) { if (o) { n.Log.debug("TokenRevocationClient.revoke: Revoking " + i); var s = r._settings.client_id, a = r._settings.client_secret; return r._revoke(o, s, a, t, i) } if (e) throw n.Log.error("TokenRevocationClient.revoke: Revocation not supported"), new Error("Revocation not supported") }) }, TokenRevocationClient.prototype._revoke = function _revoke(t, e, r, i, o) { var s = this; return new Promise(function (a, u) { var c = new s._XMLHttpRequestCtor; c.open("POST", t), c.onload = function () { n.Log.debug("TokenRevocationClient.revoke: HTTP response received, status", c.status), 200 === c.status ? a() : u(Error(c.statusText + " (" + c.status + ")")) }, c.onerror = function () { n.Log.debug("TokenRevocationClient.revoke: Network Error."), u("Network Error") }; var f = "client_id=" + encodeURIComponent(e); r && (f += "&client_secret=" + encodeURIComponent(r)), f += "&token_type_hint=" + encodeURIComponent(o), f += "&token=" + encodeURIComponent(i), c.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), c.send(f) }) }, TokenRevocationClient }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.CheckSessionIFrame = void 0; var n = r(2); var i = 2e3; e.CheckSessionIFrame = function () { function CheckSessionIFrame(t, e, r, n) { var o = !(arguments.length > 4 && void 0 !== arguments[4]) || arguments[4]; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, CheckSessionIFrame), this._callback = t, this._client_id = e, this._url = r, this._interval = n || i, this._stopOnError = o; var s = r.indexOf("/", r.indexOf("//") + 2); this._frame_origin = r.substr(0, s), this._frame = window.document.createElement("iframe"), this._frame.style.visibility = "hidden", this._frame.style.position = "absolute", this._frame.style.display = "none", this._frame.style.width = 0, this._frame.style.height = 0, this._frame.src = r } return CheckSessionIFrame.prototype.load = function load() { var t = this; return new Promise(function (e) { t._frame.onload = function () { e() }, window.document.body.appendChild(t._frame), t._boundMessageEvent = t._message.bind(t), window.addEventListener("message", t._boundMessageEvent, !1) }) }, CheckSessionIFrame.prototype._message = function _message(t) { t.origin === this._frame_origin && t.source === this._frame.contentWindow && ("error" === t.data ? (n.Log.error("CheckSessionIFrame: error message from check session op iframe"), this._stopOnError && this.stop()) : "changed" === t.data ? (n.Log.debug("CheckSessionIFrame: changed message from check session op iframe"), this.stop(), this._callback()) : n.Log.debug("CheckSessionIFrame: " + t.data + " message from check session op iframe")) }, CheckSessionIFrame.prototype.start = function start(t) { var e = this; if (this._session_state !== t) { n.Log.debug("CheckSessionIFrame.start"), this.stop(), this._session_state = t; var r = function send() { e._frame.contentWindow.postMessage(e._client_id + " " + e._session_state, e._frame_origin) }; r(), this._timer = window.setInterval(r, this._interval) } }, CheckSessionIFrame.prototype.stop = function stop() { this._session_state = null, this._timer && (n.Log.debug("CheckSessionIFrame.stop"), window.clearInterval(this._timer), this._timer = null) }, CheckSessionIFrame }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SessionMonitor = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(102); e.SessionMonitor = function () { function SessionMonitor(t) { var e = this, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o.CheckSessionIFrame; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SessionMonitor), !t) throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"), new Error("userManager"); this._userManager = t, this._CheckSessionIFrameCtor = r, this._userManager.events.addUserLoaded(this._start.bind(this)), this._userManager.events.addUserUnloaded(this._stop.bind(this)), this._userManager.getUser().then(function (t) { t && e._start(t) }).catch(function (t) { i.Log.error("SessionMonitor ctor: error from getUser:", t.message) }) } return SessionMonitor.prototype._start = function _start(t) { var e = this, r = t.session_state; r && (this._sub = t.profile.sub, this._sid = t.profile.sid, i.Log.debug("SessionMonitor._start: session_state:", r, ", sub:", this._sub), this._checkSessionIFrame ? this._checkSessionIFrame.start(r) : this._metadataService.getCheckSessionIframe().then(function (t) { if (t) { i.Log.debug("SessionMonitor._start: Initializing check session iframe"); var n = e._client_id, o = e._checkSessionInterval, s = e._stopCheckSessionOnError; e._checkSessionIFrame = new e._CheckSessionIFrameCtor(e._callback.bind(e), n, t, o, s), e._checkSessionIFrame.load().then(function () { e._checkSessionIFrame.start(r) }) } else i.Log.warn("SessionMonitor._start: No check session iframe found in the metadata") }).catch(function (t) { i.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:", t.message) })) }, SessionMonitor.prototype._stop = function _stop() { this._sub = null, this._sid = null, this._checkSessionIFrame && (i.Log.debug("SessionMonitor._stop"), this._checkSessionIFrame.stop()) }, SessionMonitor.prototype._callback = function _callback() { var t = this; this._userManager.querySessionStatus().then(function (e) { var r = !0; e ? e.sub === t._sub ? (r = !1, t._checkSessionIFrame.start(e.session_state), e.sid === t._sid ? i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:", e.session_state) : (i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:", e.session_state), t._userManager.events._raiseUserSessionChanged())) : i.Log.debug("SessionMonitor._callback: Different subject signed into OP:", e.sub) : i.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"), r && (i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"), t._userManager.events._raiseUserSignedOut()) }).catch(function (e) { i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event", e.message), t._userManager.events._raiseUserSignedOut() }) }, n(SessionMonitor, [{ key: "_settings", get: function get() { return this._userManager.settings } }, { key: "_metadataService", get: function get() { return this._userManager.metadataService } }, { key: "_client_id", get: function get() { return this._settings.client_id } }, { key: "_checkSessionInterval", get: function get() { return this._settings.checkSessionInterval } }, { key: "_stopCheckSessionOnError", get: function get() { return this._settings.stopCheckSessionOnError } }]), SessionMonitor }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.Event = void 0; var n = r(2); e.Event = function () { function Event(t) { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, Event), this._name = t, this._callbacks = [] } return Event.prototype.addHandler = function addHandler(t) { this._callbacks.push(t) }, Event.prototype.removeHandler = function removeHandler(t) { var e = this._callbacks.findIndex(function (e) { return e === t }); e >= 0 && this._callbacks.splice(e, 1) }, Event.prototype.raise = function raise() { n.Log.debug("Event: Raising event: " + this._name); for (var t = 0; t < this._callbacks.length; t++) { var e; (e = this._callbacks)[t].apply(e, arguments) } }, Event }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.AccessTokenEvents = void 0; var n = r(2), i = r(150); var o = 60; e.AccessTokenEvents = function () { function AccessTokenEvents() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.accessTokenExpiringNotificationTime, r = void 0 === e ? o : e, n = t.accessTokenExpiringTimer, s = void 0 === n ? new i.Timer("Access token expiring") : n, a = t.accessTokenExpiredTimer, u = void 0 === a ? new i.Timer("Access token expired") : a; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, AccessTokenEvents), this._accessTokenExpiringNotificationTime = r, this._accessTokenExpiring = s, this._accessTokenExpired = u } return AccessTokenEvents.prototype.load = function load(t) { if (t.access_token && void 0 !== t.expires_in) { var e = t.expires_in; if (n.Log.debug("AccessTokenEvents.load: access token present, remaining duration:", e), e > 0) { var r = e - this._accessTokenExpiringNotificationTime; r <= 0 && (r = 1), n.Log.debug("AccessTokenEvents.load: registering expiring timer in:", r), this._accessTokenExpiring.init(r) } else n.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."), this._accessTokenExpiring.cancel(); var i = e + 1; n.Log.debug("AccessTokenEvents.load: registering expired timer in:", i), this._accessTokenExpired.init(i) } else this._accessTokenExpiring.cancel(), this._accessTokenExpired.cancel() }, AccessTokenEvents.prototype.unload = function unload() { n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"), this._accessTokenExpiring.cancel(), this._accessTokenExpired.cancel() }, AccessTokenEvents.prototype.addAccessTokenExpiring = function addAccessTokenExpiring(t) { this._accessTokenExpiring.addHandler(t) }, AccessTokenEvents.prototype.removeAccessTokenExpiring = function removeAccessTokenExpiring(t) { this._accessTokenExpiring.removeHandler(t) }, AccessTokenEvents.prototype.addAccessTokenExpired = function addAccessTokenExpired(t) { this._accessTokenExpired.addHandler(t) }, AccessTokenEvents.prototype.removeAccessTokenExpired = function removeAccessTokenExpired(t) { this._accessTokenExpired.removeHandler(t) }, AccessTokenEvents }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.User = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2); e.User = function () { function User(t) { var e = t.id_token, r = t.session_state, n = t.access_token, i = t.refresh_token, o = t.token_type, s = t.scope, a = t.profile, u = t.expires_at, c = t.state; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, User), this.id_token = e, this.session_state = r, this.access_token = n, this.refresh_token = i, this.token_type = o, this.scope = s, this.profile = a, this.expires_at = u, this.state = c } return User.prototype.toStorageString = function toStorageString() { return i.Log.debug("User.toStorageString"), JSON.stringify({ id_token: this.id_token, session_state: this.session_state, access_token: this.access_token, refresh_token: this.refresh_token, token_type: this.token_type, scope: this.scope, profile: this.profile, expires_at: this.expires_at }) }, User.fromStorageString = function fromStorageString(t) { return i.Log.debug("User.fromStorageString"), new User(JSON.parse(t)) }, n(User, [{ key: "expires_in", get: function get() { if (this.expires_at) { var t = parseInt(Date.now() / 1e3); return this.expires_at - t } }, set: function set(t) { var e = parseInt(t); if ("number" == typeof e && e > 0) { var r = parseInt(Date.now() / 1e3); this.expires_at = r + e } } }, { key: "expired", get: function get() { var t = this.expires_in; if (void 0 !== t) return t <= 0 } }, { key: "scopes", get: function get() { return (this.scope || "").split(" ") } }]), User }() }, function (t, e, r) {
  "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.default =
    // @preserve Copyright (c) Microsoft Open Technologies, Inc.
    function random() { for (var t = "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx", e = "0123456789abcdef", r = 0, n = "", i = 0; i < t.length; i++)"-" !== t[i] && "4" !== t[i] && (r = 16 * Math.random() | 0), "x" === t[i] ? n += e[r] : "y" === t[i] ? (r &= 3, n += e[r |= 8]) : n += t[i]; return n }, t.exports = e.default
}, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SigninState = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(67), s = r(68), a = function _interopRequireDefault(t) { return t && t.__esModule ? t : { default: t } }(r(107)); e.SigninState = function (t) { function SigninState() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.nonce, n = e.authority, i = e.client_id, o = e.redirect_uri, u = e.code_verifier; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SigninState); var c = function _possibleConstructorReturn(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 }(this, t.call(this, arguments[0])); if (!0 === r ? c._nonce = (0, a.default)() : r && (c._nonce = r), !0 === u ? c._code_verifier = (0, a.default)() + (0, a.default)() + (0, a.default)() : u && (c._code_verifier = u), c.code_verifier) { var f = s.JoseUtil.hashString(c.code_verifier, "SHA256"); c._code_challenge = s.JoseUtil.hexToBase64Url(f) } return c._redirect_uri = o, c._authority = n, c._client_id = i, c } return function _inherits(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) }(SigninState, t), SigninState.prototype.toStorageString = function toStorageString() { return i.Log.debug("SigninState.toStorageString"), JSON.stringify({ id: this.id, data: this.data, created: this.created, nonce: this.nonce, code_verifier: this.code_verifier, redirect_uri: this.redirect_uri, authority: this.authority, client_id: this.client_id }) }, SigninState.fromStorageString = function fromStorageString(t) { return i.Log.debug("SigninState.fromStorageString"), new SigninState(JSON.parse(t)) }, n(SigninState, [{ key: "nonce", get: function get() { return this._nonce } }, { key: "authority", get: function get() { return this._authority } }, { key: "client_id", get: function get() { return this._client_id } }, { key: "redirect_uri", get: function get() { return this._redirect_uri } }, { key: "code_verifier", get: function get() { return this._code_verifier } }, { key: "code_challenge", get: function get() { return this._code_challenge } }]), SigninState }(o.State) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.ErrorResponse = void 0; var n = r(2); e.ErrorResponse = function (t) { function ErrorResponse() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.error, i = e.error_description, o = e.error_uri, s = e.state; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, ErrorResponse), !r) throw n.Log.error("No error passed to ErrorResponse"), new Error("error"); var a = function _possibleConstructorReturn(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 }(this, t.call(this, i || r)); return a.name = "ErrorResponse", a.error = r, a.error_description = i, a.error_uri = o, a.state = s, a } return function _inherits(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) }(ErrorResponse, t), ErrorResponse }(Error) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.TokenClient = void 0; var n = r(69), i = r(44), o = r(2); e.TokenClient = function () { function TokenClient(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : n.JsonService, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : i.MetadataService; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, TokenClient), !t) throw o.Log.error("TokenClient.ctor: No settings passed"), new Error("settings"); this._settings = t, this._jsonService = new e, this._metadataService = new r(this._settings) } return TokenClient.prototype.exchangeCode = function exchangeCode() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return e.grant_type = e.grant_type || "authorization_code", e.client_id = e.client_id || this._settings.client_id, e.redirect_uri = e.redirect_uri || this._settings.redirect_uri, e.code ? e.redirect_uri ? e.code_verifier ? e.client_id ? this._metadataService.getTokenEndpoint(!1).then(function (r) { return o.Log.debug("TokenClient.exchangeCode: Received token endpoint"), t._jsonService.postForm(r, e).then(function (t) { return o.Log.debug("TokenClient.exchangeCode: response received"), t }) }) : (o.Log.error("TokenClient.exchangeCode: No client_id passed"), Promise.reject(new Error("A client_id is required"))) : (o.Log.error("TokenClient.exchangeCode: No code_verifier passed"), Promise.reject(new Error("A code_verifier is required"))) : (o.Log.error("TokenClient.exchangeCode: No redirect_uri passed"), Promise.reject(new Error("A redirect_uri is required"))) : (o.Log.error("TokenClient.exchangeCode: No code passed"), Promise.reject(new Error("A code is required"))) }, TokenClient.prototype.exchangeRefreshToken = function exchangeRefreshToken() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return e.grant_type = e.grant_type || "refresh_token", e.client_id = e.client_id || this._settings.client_id, e.refresh_token ? e.client_id ? this._metadataService.getTokenEndpoint(!1).then(function (r) { return o.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"), t._jsonService.postForm(r, e).then(function (t) { return o.Log.debug("TokenClient.exchangeRefreshToken: response received"), t }) }) : (o.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"), Promise.reject(new Error("A client_id is required"))) : (o.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"), Promise.reject(new Error("A refresh_token is required"))) }, TokenClient }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.OidcClient = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(71), s = r(109), a = r(163), u = r(162), c = r(161), f = r(160), h = r(108), l = r(67); e.OidcClient = function () { function OidcClient() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, OidcClient), t instanceof o.OidcClientSettings ? this._settings = t : this._settings = new o.OidcClientSettings(t) } return OidcClient.prototype.createSigninRequest = function createSigninRequest() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.response_type, n = e.scope, o = e.redirect_uri, s = e.data, u = e.state, c = e.prompt, f = e.display, h = e.max_age, l = e.ui_locales, p = e.id_token_hint, g = e.login_hint, d = e.acr_values, v = e.resource, y = e.request, m = e.request_uri, S = e.response_mode, _ = e.extraQueryParams, b = arguments[1]; i.Log.debug("OidcClient.createSigninRequest"); var F = this._settings.client_id; r = r || this._settings.response_type, n = n || this._settings.scope, o = o || this._settings.redirect_uri, c = c || this._settings.prompt, f = f || this._settings.display, h = h || this._settings.max_age, l = l || this._settings.ui_locales, d = d || this._settings.acr_values, v = v || this._settings.resource, S = S || this._settings.response_mode, _ = _ || this._settings.extraQueryParams; var w = this._settings.authority; return a.SigninRequest.isCode(r) && "code" !== r ? Promise.reject(new Error("OpenID Connect hybrid flow is not supported")) : this._metadataService.getAuthorizationEndpoint().then(function (e) { i.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint", e); var E = new a.SigninRequest({ url: e, client_id: F, redirect_uri: o, response_type: r, scope: n, data: s || u, authority: w, prompt: c, display: f, max_age: h, ui_locales: l, id_token_hint: p, login_hint: g, acr_values: d, resource: v, request: y, request_uri: m, extraQueryParams: _, response_mode: S }), x = E.state; return (b = b || t._stateStore).set(x.id, x.toStorageString()).then(function () { return E }) }) }, OidcClient.prototype.processSigninResponse = function processSigninResponse(t, e) { var r = this; i.Log.debug("OidcClient.processSigninResponse"); var n = "query" === this._settings.response_mode || !this._settings.response_mode && a.SigninRequest.isCode(this._settings.response_type) ? "?" : "#", o = new u.SigninResponse(t, n); return o.state ? (e = e || this._stateStore).remove(o.state).then(function (t) { if (!t) throw i.Log.error("OidcClient.processSigninResponse: No matching state found in storage"), new Error("No matching state found in storage"); var e = h.SigninState.fromStorageString(t); return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"), r._validator.validateSigninResponse(e, o) }) : (i.Log.error("OidcClient.processSigninResponse: No state in response"), Promise.reject(new Error("No state in response"))) }, OidcClient.prototype.createSignoutRequest = function createSignoutRequest() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.id_token_hint, n = e.data, o = e.state, s = e.post_logout_redirect_uri, a = arguments[1]; return i.Log.debug("OidcClient.createSignoutRequest"), s = s || this._settings.post_logout_redirect_uri, this._metadataService.getEndSessionEndpoint().then(function (e) { if (!e) throw i.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"), new Error("no end session endpoint"); i.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint", e); var u = new c.SignoutRequest({ url: e, id_token_hint: r, post_logout_redirect_uri: s, data: n || o }), f = u.state; return f && (i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"), (a = a || t._stateStore).set(f.id, f.toStorageString())), u }) }, OidcClient.prototype.processSignoutResponse = function processSignoutResponse(t, e) { var r = this; i.Log.debug("OidcClient.processSignoutResponse"); var n = new f.SignoutResponse(t); if (!n.state) return i.Log.debug("OidcClient.processSignoutResponse: No state in response"), n.error ? (i.Log.warn("OidcClient.processSignoutResponse: Response was error: ", n.error), Promise.reject(new s.ErrorResponse(n))) : Promise.resolve(n); var o = n.state; return (e = e || this._stateStore).remove(o).then(function (t) { if (!t) throw i.Log.error("OidcClient.processSignoutResponse: No matching state found in storage"), new Error("No matching state found in storage"); var e = l.State.fromStorageString(t); return i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"), r._validator.validateSignoutResponse(e, n) }) }, OidcClient.prototype.clearStaleState = function clearStaleState(t) { return i.Log.debug("OidcClient.clearStaleState"), t = t || this._stateStore, l.State.clearStaleState(t, this.settings.staleStateAge) }, n(OidcClient, [{ key: "_stateStore", get: function get() { return this.settings.stateStore } }, { key: "_validator", get: function get() { return this.settings.validator } }, { key: "_metadataService", get: function get() { return this.settings.metadataService } }, { key: "settings", get: function get() { return this._settings } }, { key: "metadataService", get: function get() { return this._metadataService } }]), OidcClient }() }, function (t, e) { t.exports = Math.scale || function scale(t, e, r, n, i) { return 0 === arguments.length || t != t || e != e || r != r || n != n || i != i ? NaN : t === 1 / 0 || t === -1 / 0 ? t : (t - e) * (i - n) / (r - e) + n } }, function (t, e, r) { var n = r(34); t.exports = function (t, e) { var r = []; return n(t, !1, r.push, r, e), r } }, function (t, e, r) { var n = r(50), i = r(113); t.exports = function (t) { return function toJSON() { if (n(this) != t) throw TypeError(t + "#toJSON isn't generic"); return i(this) } } }, function (t, e, r) { var n = r(40), i = r(17), o = r(51).f; t.exports = function (t) { return function (e) { for (var r, s = i(e), a = n(s), u = a.length, c = 0, f = []; u > c;)o.call(s, r = a[c++]) && f.push(t ? [r, s[r]] : s[r]); return f } } }, function (t, e, r) { var n = r(7), i = r(90), o = r(25); t.exports = function (t, e, r, s) { var a = String(o(t)), u = a.length, c = void 0 === r ? " " : String(r), f = n(e); if (f <= u || "" == c) return a; var h = f - u, l = i.call(c, Math.ceil(h / c.length)); return l.length > h && (l = l.slice(0, h)), s ? l + a : a + l } }, function (t, e, r) { "use strict"; var n = r(63), i = r(5), o = r(7), s = r(21), a = r(6)("isConcatSpreadable"); t.exports = function flattenIntoArray(t, e, r, u, c, f, h, l) { for (var p, g, d = c, v = 0, y = !!h && s(h, l, 3); v < u;) { if (v in r) { if (p = y ? y(r[v], v, e) : r[v], g = !1, i(p) && (g = void 0 !== (g = p[a]) ? !!g : n(p)), g && f > 0) d = flattenIntoArray(t, e, p, o(p.length), d, f - 1) - 1; else { if (d >= 9007199254740991) throw TypeError(); t[d] = p } d++ } v++ } return d } }, function (t, e, r) { var n = r(37), i = r(64), o = r(1), s = r(3).Reflect; t.exports = s && s.ownKeys || function ownKeys(t) { var e = n.f(o(t)), r = i.f; return r ? e.concat(r(t)) : e } }, function (t, e, r) { var n = r(24), i = r(7); t.exports = function (t) { if (void 0 === t) return 0; var e = n(t), r = i(e); if (e !== r) throw RangeError("Wrong length!"); return r } }, function (t, e, r) { "use strict"; var n = r(33), i = r(31).getWeak, o = r(1), s = r(5), a = r(35), u = r(34), c = r(22), f = r(18), h = r(45), l = c(5), p = c(6), g = 0, d = function (t) { return t._l || (t._l = new v) }, v = function () { this.a = [] }, y = function (t, e) { return l(t.a, function (t) { return t[0] === e }) }; v.prototype = { get: function (t) { var e = y(this, t); if (e) return e[1] }, has: function (t) { return !!y(this, t) }, set: function (t, e) { var r = y(this, t); r ? r[1] = e : this.a.push([t, e]) }, delete: function (t) { var e = p(this.a, function (e) { return e[0] === t }); return ~e && this.a.splice(e, 1), !!~e } }, t.exports = { getConstructor: function (t, e, r, o) { var c = t(function (t, n) { a(t, c, e, "_i"), t._t = e, t._i = g++ , t._l = void 0, void 0 != n && u(n, r, t[o], t) }); return n(c.prototype, { delete: function (t) { if (!s(t)) return !1; var r = i(t); return !0 === r ? d(h(this, e)).delete(t) : r && f(r, this._i) && delete r[this._i] }, has: function has(t) { if (!s(t)) return !1; var r = i(t); return !0 === r ? d(h(this, e)).has(t) : r && f(r, this._i) } }), c }, def: function (t, e, r) { var n = i(o(e), !0); return !0 === n ? d(t).set(e, r) : n[t._i] = r, t }, ufstore: d } }, function (t, e, r) { "use strict"; var n, i = r(22)(0), o = r(13), s = r(31), a = r(140), u = r(120), c = r(5), f = r(4), h = r(45), l = s.getWeak, p = Object.isExtensible, g = u.ufstore, d = {}, v = function (t) { return function WeakMap() { return t(this, arguments.length > 0 ? arguments[0] : void 0) } }, y = { get: function get(t) { if (c(t)) { var e = l(t); return !0 === e ? g(h(this, "WeakMap")).get(t) : e ? e[this._i] : void 0 } }, set: function set(t, e) { return u.def(h(this, "WeakMap"), t, e) } }, m = t.exports = r(57)("WeakMap", v, y, u, !0, !0); f(function () { return 7 != (new m).set((Object.freeze || Object)(d), 7).get(d) }) && (a((n = u.getConstructor(v, "WeakMap")).prototype, y), s.NEED = !0, i(["delete", "has", "get", "set"], function (t) { var e = m.prototype, r = e[t]; o(e, t, function (e, i) { if (c(e) && !p(e)) { this._f || (this._f = new n); var o = this._f[t](e, i); return "set" == t ? this : o } return r.call(this, e, i) }) })) }, function (t, e, r) { "use strict"; var n = r(123), i = r(45); t.exports = r(57)("Set", function (t) { return function Set() { return t(this, arguments.length > 0 ? arguments[0] : void 0) } }, { add: function add(t) { return n.def(i(this, "Set"), t = 0 === t ? 0 : t, t) } }, n) }, function (t, e, r) { "use strict"; var n = r(8).f, i = r(38), o = r(33), s = r(21), a = r(35), u = r(34), c = r(86), f = r(128), h = r(36), l = r(9), p = r(31).fastKey, g = r(45), d = l ? "_s" : "size", v = function (t, e) { var r, n = p(e); if ("F" !== n) return t._i[n]; for (r = t._f; r; r = r.n)if (r.k == e) return r }; t.exports = { getConstructor: function (t, e, r, c) { var f = t(function (t, n) { a(t, f, e, "_i"), t._t = e, t._i = i(null), t._f = void 0, t._l = void 0, t[d] = 0, void 0 != n && u(n, r, t[c], t) }); return o(f.prototype, { clear: function clear() { for (var t = g(this, e), r = t._i, n = t._f; n; n = n.n)n.r = !0, n.p && (n.p = n.p.n = void 0), delete r[n.i]; t._f = t._l = void 0, t[d] = 0 }, delete: function (t) { var r = g(this, e), n = v(r, t); if (n) { var i = n.n, o = n.p; delete r._i[n.i], n.r = !0, o && (o.n = i), i && (i.p = o), r._f == n && (r._f = i), r._l == n && (r._l = o), r[d]-- } return !!n }, forEach: function forEach(t) { g(this, e); for (var r, n = s(t, arguments.length > 1 ? arguments[1] : void 0, 3); r = r ? r.n : this._f;)for (n(r.v, r.k, this); r && r.r;)r = r.p }, has: function has(t) { return !!v(g(this, e), t) } }), l && n(f.prototype, "size", { get: function () { return g(this, e)[d] } }), f }, def: function (t, e, r) { var n, i, o = v(t, e); return o ? o.v = r : (t._l = o = { i: i = p(e, !0), k: e, v: r, p: n = t._l, n: void 0, r: !1 }, t._f || (t._f = o), n && (n.n = o), t[d]++ , "F" !== i && (t._i[i] = o)), t }, getEntry: v, setStrong: function (t, e, r) { c(t, e, function (t, r) { this._t = g(t, e), this._k = r, this._l = void 0 }, function () { for (var t = this._k, e = this._l; e && e.r;)e = e.p; return this._t && (this._l = e = e ? e.n : this._t._f) ? f(0, "keys" == t ? e.k : "values" == t ? e.v : [e.k, e.v]) : (this._t = void 0, f(1)) }, r ? "entries" : "values", !r, !0), h(e) } } }, function (t, e, r) { "use strict"; var n = r(123), i = r(45); t.exports = r(57)("Map", function (t) { return function Map() { return t(this, arguments.length > 0 ? arguments[0] : void 0) } }, { get: function get(t) { var e = n.getEntry(i(this, "Map"), t); return e && e.v }, set: function set(t, e) { return n.def(i(this, "Map"), 0 === t ? 0 : t, e) } }, n, !0) }, function (t, e, r) { var n = r(1), i = r(5), o = r(74); t.exports = function (t, e) { if (n(t), i(e) && e.constructor === t) return e; var r = o.f(t); return (0, r.resolve)(e), r.promise } }, function (t, e) { t.exports = function (t) { try { return { e: !1, v: t() } } catch (t) { return { e: !0, v: t } } } }, function (t, e, r) { r(9) && "g" != /./g.flags && r(8).f(RegExp.prototype, "flags", { configurable: !0, get: r(60) }) }, function (t, e) { t.exports = function (t, e) { return { value: e, done: !!t } } }, function (t, e, r) { "use strict"; var n = r(10), i = r(39), o = r(7); t.exports = [].copyWithin || function copyWithin(t, e) { var r = n(this), s = o(r.length), a = i(t, s), u = i(e, s), c = arguments.length > 2 ? arguments[2] : void 0, f = Math.min((void 0 === c ? s : i(c, s)) - u, s - a), h = 1; for (u < a && a < u + f && (h = -1, u += f - 1, a += f - 1); f-- > 0;)u in r ? r[a] = r[u] : delete r[a], a += h, u += h; return r } }, function (t, e, r) { var n = r(11), i = r(10), o = r(52), s = r(7); t.exports = function (t, e, r, a, u) { n(e); var c = i(t), f = o(c), h = s(c.length), l = u ? h - 1 : 0, p = u ? -1 : 1; if (r < 2) for (; ;) { if (l in f) { a = f[l], l += p; break } if (l += p, u ? l < 0 : h <= l) throw TypeError("Reduce of empty array with no initial value") } for (; u ? l >= 0 : h > l; l += p)l in f && (a = e(a, f[l], l, c)); return a } }, function (t, e, r) { var n = r(1); t.exports = function (t, e, r, i) { try { return i ? e(n(r)[0], r[1]) : e(r) } catch (e) { var o = t.return; throw void 0 !== o && n(o.call(t)), e } } }, function (t, e, r) { var n = r(89), i = Math.pow, o = i(2, -52), s = i(2, -23), a = i(2, 127) * (2 - s), u = i(2, -126); t.exports = Math.fround || function fround(t) { var e, r, i = Math.abs(t), c = n(t); return i < u ? c * function (t) { return t + 1 / o - 1 / o }(i / u / s) * u * s : (r = (e = (1 + s / o) * i) - (e - i)) > a || r != r ? c * (1 / 0) : c * r } }, function (t, e) { t.exports = Math.log1p || function log1p(t) { return (t = +t) > -1e-8 && t < 1e-8 ? t - t * t / 2 : Math.log(1 + t) } }, function (t, e, r) { var n = r(5), i = Math.floor; t.exports = function isInteger(t) { return !n(t) && isFinite(t) && i(t) === t } }, function (t, e, r) { var n = r(20); t.exports = function (t, e) { if ("number" != typeof t && "Number" != n(t)) throw TypeError(e); return +t } }, function (t, e, r) { var n = r(3).parseFloat, i = r(47).trim; t.exports = 1 / n(r(92) + "-0") != -1 / 0 ? function parseFloat(t) { var e = i(String(t), 3), r = n(e); return 0 === r && "-" == e.charAt(0) ? -0 : r } : n }, function (t, e, r) { var n = r(3).parseInt, i = r(47).trim, o = r(92), s = /^[-+]?0[xX]/; t.exports = 8 !== n(o + "08") || 22 !== n(o + "0x16") ? function parseInt(t, e) { var r = i(String(t), 3); return n(r, e >>> 0 || (s.test(r) ? 16 : 10)) } : n }, function (t, e) { t.exports = function (t, e, r) { var n = void 0 === r; switch (e.length) { case 0: return n ? t() : t.call(r); case 1: return n ? t(e[0]) : t.call(r, e[0]); case 2: return n ? t(e[0], e[1]) : t.call(r, e[0], e[1]); case 3: return n ? t(e[0], e[1], e[2]) : t.call(r, e[0], e[1], e[2]); case 4: return n ? t(e[0], e[1], e[2], e[3]) : t.call(r, e[0], e[1], e[2], e[3]) }return t.apply(r, e) } }, function (t, e, r) { "use strict"; var n = r(11), i = r(5), o = r(138), s = [].slice, a = {}; t.exports = Function.bind || function bind(t) { var e = n(this), r = s.call(arguments, 1), u = function () { var n = r.concat(s.call(arguments)); return this instanceof u ? function (t, e, r) { if (!(e in a)) { for (var n = [], i = 0; i < e; i++)n[i] = "a[" + i + "]"; a[e] = Function("F,a", "return new F(" + n.join(",") + ")") } return a[e](t, r) }(e, n.length, n) : o(e, n, t) }; return i(e.prototype) && (u.prototype = e.prototype), u } }, function (t, e, r) { "use strict"; var n = r(40), i = r(64), o = r(51), s = r(10), a = r(52), u = Object.assign; t.exports = !u || r(4)(function () { var t = {}, e = {}, r = Symbol(), n = "abcdefghijklmnopqrst"; return t[r] = 7, n.split("").forEach(function (t) { e[t] = t }), 7 != u({}, t)[r] || Object.keys(u({}, e)).join("") != n }) ? function assign(t, e) { for (var r = s(t), u = arguments.length, c = 1, f = i.f, h = o.f; u > c;)for (var l, p = a(arguments[c++]), g = f ? n(p).concat(f(p)) : n(p), d = g.length, v = 0; d > v;)h.call(p, l = g[v++]) && (r[l] = p[l]); return r } : u }, function (t, e, r) { var n = r(17), i = r(37).f, o = {}.toString, s = "object" == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; t.exports.f = function getOwnPropertyNames(t) { return s && "[object Window]" == o.call(t) ? function (t) { try { return i(t) } catch (t) { return s.slice() } }(t) : i(n(t)) } }, function (t, e, r) { var n = r(8), i = r(1), o = r(40); t.exports = r(9) ? Object.defineProperties : function defineProperties(t, e) { i(t); for (var r, s = o(e), a = s.length, u = 0; a > u;)n.f(t, r = s[u++], e[r]); return t } }, function (t, e, r) { var n = r(18), i = r(17), o = r(65)(!1), s = r(96)("IE_PROTO"); t.exports = function (t, e) { var r, a = i(t), u = 0, c = []; for (r in a) r != s && n(a, r) && c.push(r); for (; e.length > u;)n(a, r = e[u++]) && (~o(c, r) || c.push(r)); return c } }, function (t, e, r) { e.f = r(6) }, function (t, e, r) { t.exports = !r(9) && !r(4)(function () { return 7 != Object.defineProperty(r(98)("div"), "a", { get: function () { return 7 } }).a }) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.CordovaIFrameNavigator = void 0; var n = r(100); e.CordovaIFrameNavigator = function () { function CordovaIFrameNavigator() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, CordovaIFrameNavigator) } return CordovaIFrameNavigator.prototype.prepare = function prepare(t) { t.popupWindowFeatures = "hidden=yes"; var e = new n.CordovaPopupWindow(t); return Promise.resolve(e) }, CordovaIFrameNavigator }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.CordovaPopupNavigator = void 0; var n = r(100); e.CordovaPopupNavigator = function () { function CordovaPopupNavigator() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, CordovaPopupNavigator) } return CordovaPopupNavigator.prototype.prepare = function prepare(t) { var e = new n.CordovaPopupWindow(t); return Promise.resolve(e) }, CordovaPopupNavigator }() }, function (t, e) { function webpackEmptyContext(t) { var e = new Error("Cannot find module '" + t + "'"); throw e.code = "MODULE_NOT_FOUND", e } webpackEmptyContext.keys = function () { return [] }, webpackEmptyContext.resolve = webpackEmptyContext, t.exports = webpackEmptyContext, webpackEmptyContext.id = 148 }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SilentRenewService = void 0; var n = r(2); e.SilentRenewService = function () { function SilentRenewService(t) { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SilentRenewService), this._userManager = t } return SilentRenewService.prototype.start = function start() { this._callback || (this._callback = this._tokenExpiring.bind(this), this._userManager.events.addAccessTokenExpiring(this._callback), this._userManager.getUser().then(function (t) { }).catch(function (t) { n.Log.error("SilentRenewService.start: Error from getUser:", t.message) })) }, SilentRenewService.prototype.stop = function stop() { this._callback && (this._userManager.events.removeAccessTokenExpiring(this._callback), delete this._callback) }, SilentRenewService.prototype._tokenExpiring = function _tokenExpiring() { var t = this; this._userManager.signinSilent().then(function (t) { n.Log.debug("SilentRenewService._tokenExpiring: Silent token renewal successful") }, function (e) { n.Log.error("SilentRenewService._tokenExpiring: Error from signinSilent:", e.message), t._userManager.events._raiseSilentRenewError(e) }) }, SilentRenewService }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.Timer = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(32), s = r(104); e.Timer = function (t) { function Timer(e) { var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : o.Global.timer, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : void 0; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, Timer); var i = function _possibleConstructorReturn(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 }(this, t.call(this, e)); return i._timer = r, i._nowFunc = n || function () { return Date.now() / 1e3 }, i } return function _inherits(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) }(Timer, t), Timer.prototype.init = function init(t) { t <= 0 && (t = 1), t = parseInt(t); var e = this.now + t; if (this.expiration === e && this._timerHandle) i.Log.debug("Timer.init timer " + this._name + " skipping initialization since already initialized for expiration:", this.expiration); else { this.cancel(), i.Log.debug("Timer.init timer " + this._name + " for duration:", t), this._expiration = e; var r = 5; t < r && (r = t), this._timerHandle = this._timer.setInterval(this._callback.bind(this), 1e3 * r) } }, Timer.prototype.cancel = function cancel() { this._timerHandle && (i.Log.debug("Timer.cancel: ", this._name), this._timer.clearInterval(this._timerHandle), this._timerHandle = null) }, Timer.prototype._callback = function _callback() { var e = this._expiration - this.now; i.Log.debug("Timer.callback; " + this._name + " timer expires in:", e), this._expiration <= this.now && (this.cancel(), t.prototype.raise.call(this)) }, n(Timer, [{ key: "now", get: function get() { return parseInt(this._nowFunc()) } }, { key: "expiration", get: function get() { return this._expiration } }]), Timer }(s.Event) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.UserManagerEvents = void 0; var n = r(2), i = r(105), o = r(104); e.UserManagerEvents = function (t) { function UserManagerEvents(e) { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, UserManagerEvents); var r = function _possibleConstructorReturn(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 }(this, t.call(this, e)); return r._userLoaded = new o.Event("User loaded"), r._userUnloaded = new o.Event("User unloaded"), r._silentRenewError = new o.Event("Silent renew error"), r._userSignedOut = new o.Event("User signed out"), r._userSessionChanged = new o.Event("User session changed"), r } return function _inherits(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) }(UserManagerEvents, t), UserManagerEvents.prototype.load = function load(e) { var r = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1]; n.Log.debug("UserManagerEvents.load"), t.prototype.load.call(this, e), r && this._userLoaded.raise(e) }, UserManagerEvents.prototype.unload = function unload() { n.Log.debug("UserManagerEvents.unload"), t.prototype.unload.call(this), this._userUnloaded.raise() }, UserManagerEvents.prototype.addUserLoaded = function addUserLoaded(t) { this._userLoaded.addHandler(t) }, UserManagerEvents.prototype.removeUserLoaded = function removeUserLoaded(t) { this._userLoaded.removeHandler(t) }, UserManagerEvents.prototype.addUserUnloaded = function addUserUnloaded(t) { this._userUnloaded.addHandler(t) }, UserManagerEvents.prototype.removeUserUnloaded = function removeUserUnloaded(t) { this._userUnloaded.removeHandler(t) }, UserManagerEvents.prototype.addSilentRenewError = function addSilentRenewError(t) { this._silentRenewError.addHandler(t) }, UserManagerEvents.prototype.removeSilentRenewError = function removeSilentRenewError(t) { this._silentRenewError.removeHandler(t) }, UserManagerEvents.prototype._raiseSilentRenewError = function _raiseSilentRenewError(t) { n.Log.debug("UserManagerEvents._raiseSilentRenewError", t.message), this._silentRenewError.raise(t) }, UserManagerEvents.prototype.addUserSignedOut = function addUserSignedOut(t) { this._userSignedOut.addHandler(t) }, UserManagerEvents.prototype.removeUserSignedOut = function removeUserSignedOut(t) { this._userSignedOut.removeHandler(t) }, UserManagerEvents.prototype._raiseUserSignedOut = function _raiseUserSignedOut(t) { n.Log.debug("UserManagerEvents._raiseUserSignedOut"), this._userSignedOut.raise(t) }, UserManagerEvents.prototype.addUserSessionChanged = function addUserSessionChanged(t) { this._userSessionChanged.addHandler(t) }, UserManagerEvents.prototype.removeUserSessionChanged = function removeUserSessionChanged(t) { this._userSessionChanged.removeHandler(t) }, UserManagerEvents.prototype._raiseUserSessionChanged = function _raiseUserSessionChanged(t) { n.Log.debug("UserManagerEvents._raiseUserSessionChanged"), this._userSessionChanged.raise(t) }, UserManagerEvents }(i.AccessTokenEvents) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.IFrameWindow = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2); e.IFrameWindow = function () { function IFrameWindow(t) { var e = this; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, IFrameWindow), this._promise = new Promise(function (t, r) { e._resolve = t, e._reject = r }), this._boundMessageEvent = this._message.bind(this), window.addEventListener("message", this._boundMessageEvent, !1), this._frame = window.document.createElement("iframe"), this._frame.style.visibility = "hidden", this._frame.style.position = "absolute", this._frame.style.display = "none", this._frame.style.width = 0, this._frame.style.height = 0, window.document.body.appendChild(this._frame) } return IFrameWindow.prototype.navigate = function navigate(t) { if (t && t.url) { var e = t.silentRequestTimeout || 1e4; i.Log.debug("IFrameWindow.navigate: Using timeout of:", e), this._timer = window.setTimeout(this._timeout.bind(this), e), this._frame.src = t.url } else this._error("No url provided"); return this.promise }, IFrameWindow.prototype._success = function _success(t) { this._cleanup(), i.Log.debug("IFrameWindow: Successful response from frame window"), this._resolve(t) }, IFrameWindow.prototype._error = function _error(t) { this._cleanup(), i.Log.error(t), this._reject(new Error(t)) }, IFrameWindow.prototype.close = function close() { this._cleanup() }, IFrameWindow.prototype._cleanup = function _cleanup() { this._frame && (i.Log.debug("IFrameWindow: cleanup"), window.removeEventListener("message", this._boundMessageEvent, !1), window.clearTimeout(this._timer), window.document.body.removeChild(this._frame), this._timer = null, this._frame = null, this._boundMessageEvent = null) }, IFrameWindow.prototype._timeout = function _timeout() { i.Log.debug("IFrameWindow.timeout"), this._error("Frame window timed out") }, IFrameWindow.prototype._message = function _message(t) { if (i.Log.debug("IFrameWindow.message"), this._timer && t.origin === this._origin && t.source === this._frame.contentWindow) { var e = t.data; e ? this._success({ url: e }) : this._error("Invalid response from frame") } }, IFrameWindow.notifyParent = function notifyParent(t) { i.Log.debug("IFrameWindow.notifyParent"), window.parent && window !== window.parent && (t = t || window.location.href) && (i.Log.debug("IFrameWindow.notifyParent: posting url message to parent"), window.parent.postMessage(t, location.protocol + "//" + location.host)) }, n(IFrameWindow, [{ key: "promise", get: function get() { return this._promise } }, { key: "_origin", get: function get() { return location.protocol + "//" + location.host } }]), IFrameWindow }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.IFrameNavigator = void 0; var n = r(2), i = r(152); e.IFrameNavigator = function () { function IFrameNavigator() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, IFrameNavigator) } return IFrameNavigator.prototype.prepare = function prepare(t) { var e = new i.IFrameWindow(t); return Promise.resolve(e) }, IFrameNavigator.prototype.callback = function callback(t) { n.Log.debug("IFrameNavigator.callback"); try { return i.IFrameWindow.notifyParent(t), Promise.resolve() } catch (t) { return Promise.reject(t) } }, IFrameNavigator }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.PopupWindow = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(49); var s = 500, a = "location=no,toolbar=no,width=500,height=500,left=100,top=100;", u = "_blank"; e.PopupWindow = function () { function PopupWindow(t) { var e = this; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, PopupWindow), this._promise = new Promise(function (t, r) { e._resolve = t, e._reject = r }); var r = t.popupWindowTarget || u, n = t.popupWindowFeatures || a; this._popup = window.open("", r, n), this._popup && (i.Log.debug("PopupWindow.ctor: popup successfully created"), this._checkForPopupClosedTimer = window.setInterval(this._checkForPopupClosed.bind(this), s)) } return PopupWindow.prototype.navigate = function navigate(t) { return this._popup ? t && t.url ? (i.Log.debug("PopupWindow.navigate: Setting URL in popup"), this._id = t.id, this._id && (window["popupCallback_" + t.id] = this._callback.bind(this)), this._popup.focus(), this._popup.window.location = t.url) : (this._error("PopupWindow.navigate: no url provided"), this._error("No url provided")) : this._error("PopupWindow.navigate: Error opening popup window"), this.promise }, PopupWindow.prototype._success = function _success(t) { i.Log.debug("PopupWindow.callback: Successful response from popup window"), this._cleanup(), this._resolve(t) }, PopupWindow.prototype._error = function _error(t) { i.Log.error("PopupWindow.error: ", t), this._cleanup(), this._reject(new Error(t)) }, PopupWindow.prototype.close = function close() { this._cleanup(!1) }, PopupWindow.prototype._cleanup = function _cleanup(t) { i.Log.debug("PopupWindow.cleanup"), window.clearInterval(this._checkForPopupClosedTimer), this._checkForPopupClosedTimer = null, delete window["popupCallback_" + this._id], this._popup && !t && this._popup.close(), this._popup = null }, PopupWindow.prototype._checkForPopupClosed = function _checkForPopupClosed() { this._popup && !this._popup.closed || this._error("Popup window closed") }, PopupWindow.prototype._callback = function _callback(t, e) { this._cleanup(e), t ? (i.Log.debug("PopupWindow.callback success"), this._success({ url: t })) : (i.Log.debug("PopupWindow.callback: Invalid response from popup"), this._error("Invalid response from popup")) }, PopupWindow.notifyOpener = function notifyOpener(t, e, r) { if (window.opener) { if (t = t || window.location.href) { var n = o.UrlUtility.parseUrlFragment(t, r); if (n.state) { var s = "popupCallback_" + n.state, a = window.opener[s]; a ? (i.Log.debug("PopupWindow.notifyOpener: passing url message to opener"), a(t, e)) : i.Log.warn("PopupWindow.notifyOpener: no matching callback found on opener") } else i.Log.warn("PopupWindow.notifyOpener: no state found in response url") } } else i.Log.warn("PopupWindow.notifyOpener: no window.opener. Can't complete notification.") }, n(PopupWindow, [{ key: "promise", get: function get() { return this._promise } }]), PopupWindow }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.PopupNavigator = void 0; var n = r(2), i = r(154); e.PopupNavigator = function () { function PopupNavigator() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, PopupNavigator) } return PopupNavigator.prototype.prepare = function prepare(t) { var e = new i.PopupWindow(t); return Promise.resolve(e) }, PopupNavigator.prototype.callback = function callback(t, e, r) { n.Log.debug("PopupNavigator.callback"); try { return i.PopupWindow.notifyOpener(t, e, r), Promise.resolve() } catch (t) { return Promise.reject(t) } }, PopupNavigator }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.RedirectNavigator = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2); e.RedirectNavigator = function () { function RedirectNavigator() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, RedirectNavigator) } return RedirectNavigator.prototype.prepare = function prepare() { return Promise.resolve(this) }, RedirectNavigator.prototype.navigate = function navigate(t) { return t && t.url ? (window.location = t.url, Promise.resolve()) : (i.Log.error("RedirectNavigator.navigate: No url provided"), Promise.reject(new Error("No url provided"))) }, n(RedirectNavigator, [{ key: "url", get: function get() { return window.location.href } }]), RedirectNavigator }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.UserManagerSettings = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = (r(2), r(71)), o = r(156), s = r(155), a = r(153), u = r(70), c = r(32); var f = 60, h = 2e3, l = "id_token"; e.UserManagerSettings = function (t) { function UserManagerSettings() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.popup_redirect_uri, n = e.popup_post_logout_redirect_uri, i = e.popupWindowFeatures, p = e.popupWindowTarget, g = e.silent_redirect_uri, d = e.silentRequestTimeout, v = e.automaticSilentRenew, y = void 0 !== v && v, m = e.includeIdTokenInSilentRenew, S = void 0 === m || m, _ = e.monitorSession, b = void 0 === _ || _, F = e.checkSessionInterval, w = void 0 === F ? h : F, E = e.stopCheckSessionOnError, x = void 0 === E || E, A = e.query_status_response_type, P = void 0 === A ? l : A, k = e.revokeAccessTokenOnSignout, I = void 0 !== k && k, C = e.accessTokenExpiringNotificationTime, R = void 0 === C ? f : C, B = e.redirectNavigator, T = void 0 === B ? new o.RedirectNavigator : B, M = e.popupNavigator, O = void 0 === M ? new s.PopupNavigator : M, U = e.iframeNavigator, D = void 0 === U ? new a.IFrameNavigator : U, N = e.userStore, L = void 0 === N ? new u.WebStorageStateStore({ store: c.Global.sessionStorage }) : N; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, UserManagerSettings); var j = function _possibleConstructorReturn(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 }(this, t.call(this, arguments[0])); return j._popup_redirect_uri = r, j._popup_post_logout_redirect_uri = n, j._popupWindowFeatures = i, j._popupWindowTarget = p, j._silent_redirect_uri = g, j._silentRequestTimeout = d, j._automaticSilentRenew = !!y, j._includeIdTokenInSilentRenew = S, j._accessTokenExpiringNotificationTime = R, j._monitorSession = b, j._checkSessionInterval = w, j._stopCheckSessionOnError = x, j._query_status_response_type = P, j._revokeAccessTokenOnSignout = I, j._redirectNavigator = T, j._popupNavigator = O, j._iframeNavigator = D, j._userStore = L, j } return function _inherits(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) }(UserManagerSettings, t), n(UserManagerSettings, [{ key: "popup_redirect_uri", get: function get() { return this._popup_redirect_uri } }, { key: "popup_post_logout_redirect_uri", get: function get() { return this._popup_post_logout_redirect_uri } }, { key: "popupWindowFeatures", get: function get() { return this._popupWindowFeatures } }, { key: "popupWindowTarget", get: function get() { return this._popupWindowTarget } }, { key: "silent_redirect_uri", get: function get() { return this._silent_redirect_uri } }, { key: "silentRequestTimeout", get: function get() { return this._silentRequestTimeout } }, { key: "automaticSilentRenew", get: function get() { return !(!this.silent_redirect_uri || !this._automaticSilentRenew) } }, { key: "includeIdTokenInSilentRenew", get: function get() { return this._includeIdTokenInSilentRenew } }, { key: "accessTokenExpiringNotificationTime", get: function get() { return this._accessTokenExpiringNotificationTime } }, { key: "monitorSession", get: function get() { return this._monitorSession } }, { key: "checkSessionInterval", get: function get() { return this._checkSessionInterval } }, { key: "stopCheckSessionOnError", get: function get() { return this._stopCheckSessionOnError } }, { key: "query_status_response_type", get: function get() { return this._query_status_response_type } }, { key: "revokeAccessTokenOnSignout", get: function get() { return this._revokeAccessTokenOnSignout } }, { key: "redirectNavigator", get: function get() { return this._redirectNavigator } }, { key: "popupNavigator", get: function get() { return this._popupNavigator } }, { key: "iframeNavigator", get: function get() { return this._iframeNavigator } }, { key: "userStore", get: function get() { return this._userStore } }]), UserManagerSettings }(i.OidcClientSettings) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.UserManager = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2), o = r(111), s = r(157), a = r(106), u = r(151), c = r(149), f = r(103), h = r(101), l = r(110), p = r(68); e.UserManager = function (t) { function UserManager() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : c.SilentRenewService, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : f.SessionMonitor, o = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : h.TokenRevocationClient, a = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : l.TokenClient, g = arguments.length > 5 && void 0 !== arguments[5] ? arguments[5] : p.JoseUtil; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, UserManager), e instanceof s.UserManagerSettings || (e = new s.UserManagerSettings(e)); var d = function _possibleConstructorReturn(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 }(this, t.call(this, e)); return d._events = new u.UserManagerEvents(e), d._silentRenewService = new r(d), d.settings.automaticSilentRenew && (i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"), d.startSilentRenew()), d.settings.monitorSession && (i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"), d._sessionMonitor = new n(d)), d._tokenRevocationClient = new o(d._settings), d._tokenClient = new a(d._settings), d._joseUtil = g, d } return function _inherits(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) }(UserManager, t), UserManager.prototype.getUser = function getUser() { var t = this; return this._loadUser().then(function (e) { return e ? (i.Log.info("UserManager.getUser: user loaded"), t._events.load(e, !1), e) : (i.Log.info("UserManager.getUser: user not found in storage"), null) }) }, UserManager.prototype.removeUser = function removeUser() { var t = this; return this.storeUser(null).then(function () { i.Log.info("UserManager.removeUser: user removed from storage"), t._events.unload() }) }, UserManager.prototype.signinRedirect = function signinRedirect(t) { return this._signinStart(t, this._redirectNavigator).then(function () { i.Log.info("UserManager.signinRedirect: successful") }) }, UserManager.prototype.signinRedirectCallback = function signinRedirectCallback(t) { return this._signinEnd(t || this._redirectNavigator.url).then(function (t) { return t && (t.profile && t.profile.sub ? i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ", t.profile.sub) : i.Log.info("UserManager.signinRedirectCallback: no sub")), t }) }, UserManager.prototype.signinPopup = function signinPopup() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.redirect_uri || this.settings.popup_redirect_uri || this.settings.redirect_uri; return e ? (t.redirect_uri = e, t.display = "popup", this._signin(t, this._popupNavigator, { startUrl: e, popupWindowFeatures: t.popupWindowFeatures || this.settings.popupWindowFeatures, popupWindowTarget: t.popupWindowTarget || this.settings.popupWindowTarget }).then(function (t) { return t && (t.profile && t.profile.sub ? i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ", t.profile.sub) : i.Log.info("UserManager.signinPopup: no sub")), t })) : (i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"), Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured"))) }, UserManager.prototype.signinPopupCallback = function signinPopupCallback(t) { return this._signinCallback(t, this._popupNavigator).then(function (t) { return t && (t.profile && t.profile.sub ? i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ", t.profile.sub) : i.Log.info("UserManager.signinPopupCallback: no sub")), t }).catch(function (t) { i.Log.error("UserManager.signinPopupCallback error: " + t && t.message) }) }, UserManager.prototype.signinSilent = function signinSilent() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return this._loadUser().then(function (r) { return r && r.refresh_token ? (e.refresh_token = r.refresh_token, t._useRefreshToken(e)) : (e.id_token_hint = e.id_token_hint || t.settings.includeIdTokenInSilentRenew && r && r.id_token, t._signinSilentIframe(e)) }) }, UserManager.prototype._useRefreshToken = function _useRefreshToken() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return this._tokenClient.exchangeRefreshToken(e).then(function (e) { return e ? e.access_token ? t._loadUser().then(function (r) { if (r) { var n = Promise.resolve(); return e.id_token && (n = t._validateIdTokenFromTokenRefreshToken(r.profile, e.id_token)), n.then(function () { return i.Log.debug("UserManager._useRefreshToken: refresh token response success"), r.access_token = e.access_token, r.refresh_token = e.refresh_token || r.refresh_token, r.expires_in = e.expires_in, t.storeUser(r).then(function () { return t._events.load(r), r }) }) } return null }) : (i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"), Promise.reject("No access token returned from token endpoint")) : (i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"), Promise.reject("No response returned from token endpoint")) }) }, UserManager.prototype._validateIdTokenFromTokenRefreshToken = function _validateIdTokenFromTokenRefreshToken(t, e) { var r = this; return this._metadataService.getIssuer().then(function (n) { return r._joseUtil.validateJwtAttributes(e, n, r._settings.client_id, r._settings.clockSkew).then(function (e) { return e ? e.sub !== t.sub ? (i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"), Promise.reject(new Error("sub in id_token does not match current sub"))) : e.auth_time && e.auth_time !== t.auth_time ? (i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"), Promise.reject(new Error("auth_time in id_token does not match original auth_time"))) : e.azp && e.azp !== t.azp ? (i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"), Promise.reject(new Error("azp in id_token does not match original azp"))) : !e.azp && t.azp ? (i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"), Promise.reject(new Error("azp not in id_token, but present in original id_token"))) : void 0 : (i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"), Promise.reject(new Error("Failed to validate id_token"))) }) }) }, UserManager.prototype._signinSilentIframe = function _signinSilentIframe() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.redirect_uri || this.settings.silent_redirect_uri; return e ? (t.redirect_uri = e, t.prompt = t.prompt || "none", this._signin(t, this._iframeNavigator, { startUrl: e, silentRequestTimeout: t.silentRequestTimeout || this.settings.silentRequestTimeout }).then(function (t) { return t && (t.profile && t.profile.sub ? i.Log.info("UserManager.signinSilent: successful, signed in sub: ", t.profile.sub) : i.Log.info("UserManager.signinSilent: no sub")), t })) : (i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"), Promise.reject(new Error("No silent_redirect_uri configured"))) }, UserManager.prototype.signinSilentCallback = function signinSilentCallback(t) { return this._signinCallback(t, this._iframeNavigator).then(function (t) { return t && (t.profile && t.profile.sub ? i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ", t.profile.sub) : i.Log.info("UserManager.signinSilentCallback: no sub")), t }) }, UserManager.prototype.querySessionStatus = function querySessionStatus() { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, r = e.redirect_uri || this.settings.silent_redirect_uri; return r ? (e.redirect_uri = r, e.prompt = "none", e.response_type = e.response_type || this.settings.query_status_response_type, e.scope = "openid", this._signinStart(e, this._iframeNavigator, { startUrl: r, silentRequestTimeout: e.silentRequestTimeout || this.settings.silentRequestTimeout }).then(function (e) { return t.processSigninResponse(e.url).then(function (t) { if (i.Log.debug("UserManager.querySessionStatus: got signin response"), t.session_state && t.profile.sub) return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ", t.profile.sub), { session_state: t.session_state, sub: t.profile.sub, sid: t.profile.sid }; i.Log.info("querySessionStatus successful, user not authenticated") }) })) : (i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"), Promise.reject(new Error("No silent_redirect_uri configured"))) }, UserManager.prototype._signin = function _signin(t, e) { var r = this, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return this._signinStart(t, e, n).then(function (t) { return r._signinEnd(t.url) }) }, UserManager.prototype._signinStart = function _signinStart(t, e) { var r = this, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return e.prepare(n).then(function (e) { return i.Log.debug("UserManager._signinStart: got navigator window handle"), r.createSigninRequest(t).then(function (t) { return i.Log.debug("UserManager._signinStart: got signin request"), n.url = t.url, n.id = t.state.id, e.navigate(n) }).catch(function (t) { throw e.close && (i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"), e.close()), t }) }) }, UserManager.prototype._signinEnd = function _signinEnd(t) { var e = this; return this.processSigninResponse(t).then(function (t) { i.Log.debug("UserManager._signinEnd: got signin response"); var r = new a.User(t); return e.storeUser(r).then(function () { return i.Log.debug("UserManager._signinEnd: user stored"), e._events.load(r), r }) }) }, UserManager.prototype._signinCallback = function _signinCallback(t, e) { return i.Log.debug("UserManager._signinCallback"), e.callback(t) }, UserManager.prototype.signoutRedirect = function signoutRedirect() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.post_logout_redirect_uri || this.settings.post_logout_redirect_uri; return e && (t.post_logout_redirect_uri = e), this._signoutStart(t, this._redirectNavigator).then(function () { i.Log.info("UserManager.signoutRedirect: successful") }) }, UserManager.prototype.signoutRedirectCallback = function signoutRedirectCallback(t) { return this._signoutEnd(t || this._redirectNavigator.url).then(function (t) { return i.Log.info("UserManager.signoutRedirectCallback: successful"), t }) }, UserManager.prototype.signoutPopup = function signoutPopup() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = t.post_logout_redirect_uri || this.settings.popup_post_logout_redirect_uri || this.settings.post_logout_redirect_uri; return t.post_logout_redirect_uri = e, t.display = "popup", t.post_logout_redirect_uri && (t.state = t.state || {}), this._signout(t, this._popupNavigator, { startUrl: e, popupWindowFeatures: t.popupWindowFeatures || this.settings.popupWindowFeatures, popupWindowTarget: t.popupWindowTarget || this.settings.popupWindowTarget }).then(function () { i.Log.info("UserManager.signoutPopup: successful") }) }, UserManager.prototype.signoutPopupCallback = function signoutPopupCallback(t, e) { void 0 === e && "boolean" == typeof t && (e = t, t = null); return this._popupNavigator.callback(t, e, "?").then(function () { i.Log.info("UserManager.signoutPopupCallback: successful") }) }, UserManager.prototype._signout = function _signout(t, e) { var r = this, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return this._signoutStart(t, e, n).then(function (t) { return r._signoutEnd(t.url) }) }, UserManager.prototype._signoutStart = function _signoutStart() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, e = this, r = arguments[1], n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return r.prepare(n).then(function (r) { return i.Log.debug("UserManager._signoutStart: got navigator window handle"), e._loadUser().then(function (o) { return i.Log.debug("UserManager._signoutStart: loaded current user from storage"), (e._settings.revokeAccessTokenOnSignout ? e._revokeInternal(o) : Promise.resolve()).then(function () { var s = t.id_token_hint || o && o.id_token; return s && (i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"), t.id_token_hint = s), e.removeUser().then(function () { return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"), e.createSignoutRequest(t).then(function (t) { return i.Log.debug("UserManager._signoutStart: got signout request"), n.url = t.url, t.state && (n.id = t.state.id), r.navigate(n) }) }) }) }).catch(function (t) { throw r.close && (i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"), r.close()), t }) }) }, UserManager.prototype._signoutEnd = function _signoutEnd(t) { return this.processSignoutResponse(t).then(function (t) { return i.Log.debug("UserManager._signoutEnd: got signout response"), t }) }, UserManager.prototype.revokeAccessToken = function revokeAccessToken() { var t = this; return this._loadUser().then(function (e) { return t._revokeInternal(e, !0).then(function (r) { if (r) return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"), e.access_token = null, e.refresh_token = null, e.expires_at = null, e.token_type = null, t.storeUser(e).then(function () { i.Log.debug("UserManager.revokeAccessToken: user stored"), t._events.load(e) }) }) }).then(function () { i.Log.info("UserManager.revokeAccessToken: access token revoked successfully") }) }, UserManager.prototype._revokeInternal = function _revokeInternal(t, e) { var n = this; if (t) { var o = t.access_token, s = t.refresh_token; return this._revokeAccessTokenInternal(o, r(148)).then(function (t) { return n._revokeRefreshTokenInternal(s, e).then(function (e) { return t || e || i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"), t || e }) }) } return Promise.resolve(!1) }, UserManager.prototype._revokeAccessTokenInternal = function _revokeAccessTokenInternal(t, e) { return !t || t.indexOf(".") >= 0 ? Promise.resolve(!1) : this._tokenRevocationClient.revoke(t, e).then(function () { return !0 }) }, UserManager.prototype._revokeRefreshTokenInternal = function _revokeRefreshTokenInternal(t, e) { return t ? this._tokenRevocationClient.revoke(t, e, "refresh_token").then(function () { return !0 }) : Promise.resolve(!1) }, UserManager.prototype.startSilentRenew = function startSilentRenew() { this._silentRenewService.start() }, UserManager.prototype.stopSilentRenew = function stopSilentRenew() { this._silentRenewService.stop() }, UserManager.prototype._loadUser = function _loadUser() { return this._userStore.get(this._userStoreKey).then(function (t) { return t ? (i.Log.debug("UserManager._loadUser: user storageString loaded"), a.User.fromStorageString(t)) : (i.Log.debug("UserManager._loadUser: no user storageString"), null) }) }, UserManager.prototype.storeUser = function storeUser(t) { if (t) { i.Log.debug("UserManager.storeUser: storing user"); var e = t.toStorageString(); return this._userStore.set(this._userStoreKey, e) } return i.Log.debug("storeUser.storeUser: removing user"), this._userStore.remove(this._userStoreKey) }, n(UserManager, [{ key: "_redirectNavigator", get: function get() { return this.settings.redirectNavigator } }, { key: "_popupNavigator", get: function get() { return this.settings.popupNavigator } }, { key: "_iframeNavigator", get: function get() { return this.settings.iframeNavigator } }, { key: "_userStore", get: function get() { return this.settings.userStore } }, { key: "events", get: function get() { return this._events } }, { key: "_userStoreKey", get: function get() { return "user:" + this.settings.authority + ":" + this.settings.client_id } }]), UserManager }(o.OidcClient) }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.InMemoryWebStorage = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(2); e.InMemoryWebStorage = function () { function InMemoryWebStorage() { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, InMemoryWebStorage), this._data = {} } return InMemoryWebStorage.prototype.getItem = function getItem(t) { return i.Log.debug("InMemoryWebStorage.getItem", t), this._data[t] }, InMemoryWebStorage.prototype.setItem = function setItem(t, e) { i.Log.debug("InMemoryWebStorage.setItem", t), this._data[t] = e }, InMemoryWebStorage.prototype.removeItem = function removeItem(t) { i.Log.debug("InMemoryWebStorage.removeItem", t), delete this._data[t] }, InMemoryWebStorage.prototype.key = function key(t) { return Object.getOwnPropertyNames(this._data)[t] }, n(InMemoryWebStorage, [{ key: "length", get: function get() { return Object.getOwnPropertyNames(this._data).length } }]), InMemoryWebStorage }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SignoutResponse = void 0; var n = r(49); e.SignoutResponse = function SignoutResponse(t) { !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SignoutResponse); var e = n.UrlUtility.parseUrlFragment(t, "?"); this.error = e.error, this.error_description = e.error_description, this.error_uri = e.error_uri, this.state = e.state } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SignoutRequest = void 0; var n = r(2), i = r(49), o = r(67); e.SignoutRequest = function SignoutRequest(t) { var e = t.url, r = t.id_token_hint, s = t.post_logout_redirect_uri, a = t.data; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SignoutRequest), !e) throw n.Log.error("SignoutRequest.ctor: No url passed"), new Error("url"); r && (e = i.UrlUtility.addQueryParam(e, "id_token_hint", r)), s && (e = i.UrlUtility.addQueryParam(e, "post_logout_redirect_uri", s), a && (this.state = new o.State({ data: a }), e = i.UrlUtility.addQueryParam(e, "state", this.state.id))), this.url = e } }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SigninResponse = void 0; var n = function () { function defineProperties(t, e) { for (var r = 0; r < e.length; r++) { var n = e[r]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, r) { return e && defineProperties(t.prototype, e), r && defineProperties(t, r), t } }(), i = r(49); e.SigninResponse = function () { function SigninResponse(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "#"; !function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SigninResponse); var r = i.UrlUtility.parseUrlFragment(t, e); this.error = r.error, this.error_description = r.error_description, this.error_uri = r.error_uri, this.code = r.code, this.state = r.state, this.id_token = r.id_token, this.session_state = r.session_state, this.access_token = r.access_token, this.token_type = r.token_type, this.scope = r.scope, this.profile = void 0, this.expires_in = r.expires_in } return n(SigninResponse, [{ key: "expires_in", get: function get() { if (this.expires_at) { var t = parseInt(Date.now() / 1e3); return this.expires_at - t } }, set: function set(t) { var e = parseInt(t); if ("number" == typeof e && e > 0) { var r = parseInt(Date.now() / 1e3); this.expires_at = r + e } } }, { key: "expired", get: function get() { var t = this.expires_in; if (void 0 !== t) return t <= 0 } }, { key: "scopes", get: function get() { return (this.scope || "").split(" ") } }, { key: "isOpenIdConnect", get: function get() { return this.scopes.indexOf("openid") >= 0 || !!this.id_token } }]), SigninResponse }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.SigninRequest = void 0; var n = r(2), i = r(49), o = r(108); e.SigninRequest = function () { function SigninRequest(t) { var e = t.url, r = t.client_id, s = t.redirect_uri, a = t.response_type, u = t.scope, c = t.authority, f = t.data, h = t.prompt, l = t.display, p = t.max_age, g = t.ui_locales, d = t.id_token_hint, v = t.login_hint, y = t.acr_values, m = t.resource, S = t.response_mode, _ = t.request, b = t.request_uri, F = t.extraQueryParams; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, SigninRequest), !e) throw n.Log.error("SigninRequest.ctor: No url passed"), new Error("url"); if (!r) throw n.Log.error("SigninRequest.ctor: No client_id passed"), new Error("client_id"); if (!s) throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"), new Error("redirect_uri"); if (!a) throw n.Log.error("SigninRequest.ctor: No response_type passed"), new Error("response_type"); if (!u) throw n.Log.error("SigninRequest.ctor: No scope passed"), new Error("scope"); if (!c) throw n.Log.error("SigninRequest.ctor: No authority passed"), new Error("authority"); var w = SigninRequest.isOidc(a), E = SigninRequest.isCode(a); this.state = new o.SigninState({ nonce: w, data: f, client_id: r, authority: c, redirect_uri: s, code_verifier: E }), e = i.UrlUtility.addQueryParam(e, "client_id", r), e = i.UrlUtility.addQueryParam(e, "redirect_uri", s), e = i.UrlUtility.addQueryParam(e, "response_type", a), e = i.UrlUtility.addQueryParam(e, "scope", u), e = i.UrlUtility.addQueryParam(e, "state", this.state.id), w && (e = i.UrlUtility.addQueryParam(e, "nonce", this.state.nonce)), E && (e = i.UrlUtility.addQueryParam(e, "code_challenge", this.state.code_challenge), e = i.UrlUtility.addQueryParam(e, "code_challenge_method", "S256")); var x = { prompt: h, display: l, max_age: p, ui_locales: g, id_token_hint: d, login_hint: v, acr_values: y, resource: m, request: _, request_uri: b, response_mode: S }; for (var A in x) x[A] && (e = i.UrlUtility.addQueryParam(e, A, x[A])); for (var P in F) e = i.UrlUtility.addQueryParam(e, P, F[P]); this.url = e } return SigninRequest.isOidc = function isOidc(t) { return !!t.split(/\s+/g).filter(function (t) { return "id_token" === t })[0] }, SigninRequest.isOAuth = function isOAuth(t) { return !!t.split(/\s+/g).filter(function (t) { return "token" === t })[0] }, SigninRequest.isCode = function isCode(t) { return !!t.split(/\s+/g).filter(function (t) { return "code" === t })[0] }, SigninRequest }() }, function (t, e) { var r = {}.toString; t.exports = Array.isArray || function (t) { return "[object Array]" == r.call(t) } }, function (t, e) { e.read = function (t, e, r, n, i) { var o, s, a = 8 * i - n - 1, u = (1 << a) - 1, c = u >> 1, f = -7, h = r ? i - 1 : 0, l = r ? -1 : 1, p = t[e + h]; for (h += l, o = p & (1 << -f) - 1, p >>= -f, f += a; f > 0; o = 256 * o + t[e + h], h += l, f -= 8); for (s = o & (1 << -f) - 1, o >>= -f, f += n; f > 0; s = 256 * s + t[e + h], h += l, f -= 8); if (0 === o) o = 1 - c; else { if (o === u) return s ? NaN : 1 / 0 * (p ? -1 : 1); s += Math.pow(2, n), o -= c } return (p ? -1 : 1) * s * Math.pow(2, o - n) }, e.write = function (t, e, r, n, i, o) { var s, a, u, c = 8 * o - i - 1, f = (1 << c) - 1, h = f >> 1, l = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = n ? 0 : o - 1, g = n ? 1 : -1, d = e < 0 || 0 === e && 1 / e < 0 ? 1 : 0; for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (a = isNaN(e) ? 1 : 0, s = f) : (s = Math.floor(Math.log(e) / Math.LN2), e * (u = Math.pow(2, -s)) < 1 && (s-- , u *= 2), (e += s + h >= 1 ? l / u : l * Math.pow(2, 1 - h)) * u >= 2 && (s++ , u /= 2), s + h >= f ? (a = 0, s = f) : s + h >= 1 ? (a = (e * u - 1) * Math.pow(2, i), s += h) : (a = e * Math.pow(2, h - 1) * Math.pow(2, i), s = 0)); i >= 8; t[r + p] = 255 & a, p += g, a /= 256, i -= 8); for (s = s << i | a, c += i; c > 0; t[r + p] = 255 & s, p += g, s /= 256, c -= 8); t[r + p - g] |= 128 * d } }, function (t, e, r) { "use strict"; e.byteLength = function byteLength(t) { var e = getLens(t), r = e[0], n = e[1]; return 3 * (r + n) / 4 - n }, e.toByteArray = function toByteArray(t) { for (var e, r = getLens(t), n = r[0], s = r[1], a = new o(function _byteLength(t, e, r) { return 3 * (e + r) / 4 - r }(0, n, s)), u = 0, c = s > 0 ? n - 4 : n, f = 0; f < c; f += 4)e = i[t.charCodeAt(f)] << 18 | i[t.charCodeAt(f + 1)] << 12 | i[t.charCodeAt(f + 2)] << 6 | i[t.charCodeAt(f + 3)], a[u++] = e >> 16 & 255, a[u++] = e >> 8 & 255, a[u++] = 255 & e; 2 === s && (e = i[t.charCodeAt(f)] << 2 | i[t.charCodeAt(f + 1)] >> 4, a[u++] = 255 & e); 1 === s && (e = i[t.charCodeAt(f)] << 10 | i[t.charCodeAt(f + 1)] << 4 | i[t.charCodeAt(f + 2)] >> 2, a[u++] = e >> 8 & 255, a[u++] = 255 & e); return a }, e.fromByteArray = function fromByteArray(t) { for (var e, r = t.length, i = r % 3, o = [], s = 0, a = r - i; s < a; s += 16383)o.push(encodeChunk(t, s, s + 16383 > a ? a : s + 16383)); 1 === i ? (e = t[r - 1], o.push(n[e >> 2] + n[e << 4 & 63] + "==")) : 2 === i && (e = (t[r - 2] << 8) + t[r - 1], o.push(n[e >> 10] + n[e >> 4 & 63] + n[e << 2 & 63] + "=")); return o.join("") }; for (var n = [], i = [], o = "undefined" != typeof Uint8Array ? Uint8Array : Array, s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, u = s.length; a < u; ++a)n[a] = s[a], i[s.charCodeAt(a)] = a; function getLens(t) { var e = t.length; if (e % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4"); var r = t.indexOf("="); return -1 === r && (r = e), [r, r === e ? 0 : 4 - r % 4] } function tripletToBase64(t) { return n[t >> 18 & 63] + n[t >> 12 & 63] + n[t >> 6 & 63] + n[63 & t] } function encodeChunk(t, e, r) { for (var n, i = [], o = e; o < r; o += 3)n = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (255 & t[o + 2]), i.push(tripletToBase64(n)); return i.join("") } i["-".charCodeAt(0)] = 62, i["_".charCodeAt(0)] = 63 }, function (t, e, r) {
  "use strict"; (function (t) {
    /*!
     * The buffer module from node.js, for the browser.
     *
     * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
     * @license  MIT
     */
    var n = r(166), i = r(165), o = r(164); function kMaxLength() { return Buffer.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 } function createBuffer(t, e) { if (kMaxLength() < e) throw new RangeError("Invalid typed array length"); return Buffer.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e)).__proto__ = Buffer.prototype : (null === t && (t = new Buffer(e)), t.length = e), t } function Buffer(t, e, r) { if (!(Buffer.TYPED_ARRAY_SUPPORT || this instanceof Buffer)) return new Buffer(t, e, r); if ("number" == typeof t) { if ("string" == typeof e) throw new Error("If encoding is specified then the first argument must be a string"); return allocUnsafe(this, t) } return from(this, t, e, r) } function from(t, e, r, n) { if ("number" == typeof e) throw new TypeError('"value" argument must not be a number'); return "undefined" != typeof ArrayBuffer && e instanceof ArrayBuffer ? function fromArrayBuffer(t, e, r, n) { if (e.byteLength, r < 0 || e.byteLength < r) throw new RangeError("'offset' is out of bounds"); if (e.byteLength < r + (n || 0)) throw new RangeError("'length' is out of bounds"); e = void 0 === r && void 0 === n ? new Uint8Array(e) : void 0 === n ? new Uint8Array(e, r) : new Uint8Array(e, r, n); Buffer.TYPED_ARRAY_SUPPORT ? (t = e).__proto__ = Buffer.prototype : t = fromArrayLike(t, e); return t }(t, e, r, n) : "string" == typeof e ? function fromString(t, e, r) { "string" == typeof r && "" !== r || (r = "utf8"); if (!Buffer.isEncoding(r)) throw new TypeError('"encoding" must be a valid string encoding'); var n = 0 | byteLength(e, r), i = (t = createBuffer(t, n)).write(e, r); i !== n && (t = t.slice(0, i)); return t }(t, e, r) : function fromObject(t, e) { if (Buffer.isBuffer(e)) { var r = 0 | checked(e.length); return 0 === (t = createBuffer(t, r)).length ? t : (e.copy(t, 0, 0, r), t) } if (e) { if ("undefined" != typeof ArrayBuffer && e.buffer instanceof ArrayBuffer || "length" in e) return "number" != typeof e.length || function isnan(t) { return t != t }(e.length) ? createBuffer(t, 0) : fromArrayLike(t, e); if ("Buffer" === e.type && o(e.data)) return fromArrayLike(t, e.data) } throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.") }(t, e) } function assertSize(t) { if ("number" != typeof t) throw new TypeError('"size" argument must be a number'); if (t < 0) throw new RangeError('"size" argument must not be negative') } function allocUnsafe(t, e) { if (assertSize(e), t = createBuffer(t, e < 0 ? 0 : 0 | checked(e)), !Buffer.TYPED_ARRAY_SUPPORT) for (var r = 0; r < e; ++r)t[r] = 0; return t } function fromArrayLike(t, e) { var r = e.length < 0 ? 0 : 0 | checked(e.length); t = createBuffer(t, r); for (var n = 0; n < r; n += 1)t[n] = 255 & e[n]; return t } function checked(t) { if (t >= kMaxLength()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + kMaxLength().toString(16) + " bytes"); return 0 | t } function byteLength(t, e) { if (Buffer.isBuffer(t)) return t.length; if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer)) return t.byteLength; "string" != typeof t && (t = "" + t); var r = t.length; if (0 === r) return 0; for (var n = !1; ;)switch (e) { case "ascii": case "latin1": case "binary": return r; case "utf8": case "utf-8": case void 0: return utf8ToBytes(t).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return 2 * r; case "hex": return r >>> 1; case "base64": return base64ToBytes(t).length; default: if (n) return utf8ToBytes(t).length; e = ("" + e).toLowerCase(), n = !0 } } function swap(t, e, r) { var n = t[e]; t[e] = t[r], t[r] = n } function bidirectionalIndexOf(t, e, r, n, i) { if (0 === t.length) return -1; if ("string" == typeof r ? (n = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < -2147483648 && (r = -2147483648), r = +r, isNaN(r) && (r = i ? 0 : t.length - 1), r < 0 && (r = t.length + r), r >= t.length) { if (i) return -1; r = t.length - 1 } else if (r < 0) { if (!i) return -1; r = 0 } if ("string" == typeof e && (e = Buffer.from(e, n)), Buffer.isBuffer(e)) return 0 === e.length ? -1 : arrayIndexOf(t, e, r, n, i); if ("number" == typeof e) return e &= 255, Buffer.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(t, e, r) : Uint8Array.prototype.lastIndexOf.call(t, e, r) : arrayIndexOf(t, [e], r, n, i); throw new TypeError("val must be string, number or Buffer") } function arrayIndexOf(t, e, r, n, i) { var o, s = 1, a = t.length, u = e.length; if (void 0 !== n && ("ucs2" === (n = String(n).toLowerCase()) || "ucs-2" === n || "utf16le" === n || "utf-16le" === n)) { if (t.length < 2 || e.length < 2) return -1; s = 2, a /= 2, u /= 2, r /= 2 } function read(t, e) { return 1 === s ? t[e] : t.readUInt16BE(e * s) } if (i) { var c = -1; for (o = r; o < a; o++)if (read(t, o) === read(e, -1 === c ? 0 : o - c)) { if (-1 === c && (c = o), o - c + 1 === u) return c * s } else -1 !== c && (o -= o - c), c = -1 } else for (r + u > a && (r = a - u), o = r; o >= 0; o--) { for (var f = !0, h = 0; h < u; h++)if (read(t, o + h) !== read(e, h)) { f = !1; break } if (f) return o } return -1 } function hexWrite(t, e, r, n) { r = Number(r) || 0; var i = t.length - r; n ? (n = Number(n)) > i && (n = i) : n = i; var o = e.length; if (o % 2 != 0) throw new TypeError("Invalid hex string"); n > o / 2 && (n = o / 2); for (var s = 0; s < n; ++s) { var a = parseInt(e.substr(2 * s, 2), 16); if (isNaN(a)) return s; t[r + s] = a } return s } function utf8Write(t, e, r, n) { return blitBuffer(utf8ToBytes(e, t.length - r), t, r, n) } function asciiWrite(t, e, r, n) { return blitBuffer(function asciiToBytes(t) { for (var e = [], r = 0; r < t.length; ++r)e.push(255 & t.charCodeAt(r)); return e }(e), t, r, n) } function latin1Write(t, e, r, n) { return asciiWrite(t, e, r, n) } function base64Write(t, e, r, n) { return blitBuffer(base64ToBytes(e), t, r, n) } function ucs2Write(t, e, r, n) { return blitBuffer(function utf16leToBytes(t, e) { for (var r, n, i, o = [], s = 0; s < t.length && !((e -= 2) < 0); ++s)r = t.charCodeAt(s), n = r >> 8, i = r % 256, o.push(i), o.push(n); return o }(e, t.length - r), t, r, n) } function base64Slice(t, e, r) { return 0 === e && r === t.length ? n.fromByteArray(t) : n.fromByteArray(t.slice(e, r)) } function utf8Slice(t, e, r) { r = Math.min(t.length, r); for (var n = [], i = e; i < r;) { var o, a, u, c, f = t[i], h = null, l = f > 239 ? 4 : f > 223 ? 3 : f > 191 ? 2 : 1; if (i + l <= r) switch (l) { case 1: f < 128 && (h = f); break; case 2: 128 == (192 & (o = t[i + 1])) && (c = (31 & f) << 6 | 63 & o) > 127 && (h = c); break; case 3: o = t[i + 1], a = t[i + 2], 128 == (192 & o) && 128 == (192 & a) && (c = (15 & f) << 12 | (63 & o) << 6 | 63 & a) > 2047 && (c < 55296 || c > 57343) && (h = c); break; case 4: o = t[i + 1], a = t[i + 2], u = t[i + 3], 128 == (192 & o) && 128 == (192 & a) && 128 == (192 & u) && (c = (15 & f) << 18 | (63 & o) << 12 | (63 & a) << 6 | 63 & u) > 65535 && c < 1114112 && (h = c) }null === h ? (h = 65533, l = 1) : h > 65535 && (h -= 65536, n.push(h >>> 10 & 1023 | 55296), h = 56320 | 1023 & h), n.push(h), i += l } return function decodeCodePointsArray(t) { var e = t.length; if (e <= s) return String.fromCharCode.apply(String, t); var r = "", n = 0; for (; n < e;)r += String.fromCharCode.apply(String, t.slice(n, n += s)); return r }(n) } e.Buffer = Buffer, e.SlowBuffer = function SlowBuffer(t) { +t != t && (t = 0); return Buffer.alloc(+t) }, e.INSPECT_MAX_BYTES = 50, Buffer.TYPED_ARRAY_SUPPORT = void 0 !== t.TYPED_ARRAY_SUPPORT ? t.TYPED_ARRAY_SUPPORT : function typedArraySupport() { try { var t = new Uint8Array(1); return t.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }, 42 === t.foo() && "function" == typeof t.subarray && 0 === t.subarray(1, 1).byteLength } catch (t) { return !1 } }(), e.kMaxLength = kMaxLength(), Buffer.poolSize = 8192, Buffer._augment = function (t) { return t.__proto__ = Buffer.prototype, t }, Buffer.from = function (t, e, r) { return from(null, t, e, r) }, Buffer.TYPED_ARRAY_SUPPORT && (Buffer.prototype.__proto__ = Uint8Array.prototype, Buffer.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && Buffer[Symbol.species] === Buffer && Object.defineProperty(Buffer, Symbol.species, { value: null, configurable: !0 })), Buffer.alloc = function (t, e, r) { return function alloc(t, e, r, n) { return assertSize(e), e <= 0 ? createBuffer(t, e) : void 0 !== r ? "string" == typeof n ? createBuffer(t, e).fill(r, n) : createBuffer(t, e).fill(r) : createBuffer(t, e) }(null, t, e, r) }, Buffer.allocUnsafe = function (t) { return allocUnsafe(null, t) }, Buffer.allocUnsafeSlow = function (t) { return allocUnsafe(null, t) }, Buffer.isBuffer = function isBuffer(t) { return !(null == t || !t._isBuffer) }, Buffer.compare = function compare(t, e) { if (!Buffer.isBuffer(t) || !Buffer.isBuffer(e)) throw new TypeError("Arguments must be Buffers"); if (t === e) return 0; for (var r = t.length, n = e.length, i = 0, o = Math.min(r, n); i < o; ++i)if (t[i] !== e[i]) { r = t[i], n = e[i]; break } return r < n ? -1 : n < r ? 1 : 0 }, Buffer.isEncoding = function isEncoding(t) { switch (String(t).toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "latin1": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return !0; default: return !1 } }, Buffer.concat = function concat(t, e) { if (!o(t)) throw new TypeError('"list" argument must be an Array of Buffers'); if (0 === t.length) return Buffer.alloc(0); var r; if (void 0 === e) for (e = 0, r = 0; r < t.length; ++r)e += t[r].length; var n = Buffer.allocUnsafe(e), i = 0; for (r = 0; r < t.length; ++r) { var s = t[r]; if (!Buffer.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers'); s.copy(n, i), i += s.length } return n }, Buffer.byteLength = byteLength, Buffer.prototype._isBuffer = !0, Buffer.prototype.swap16 = function swap16() { var t = this.length; if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits"); for (var e = 0; e < t; e += 2)swap(this, e, e + 1); return this }, Buffer.prototype.swap32 = function swap32() { var t = this.length; if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits"); for (var e = 0; e < t; e += 4)swap(this, e, e + 3), swap(this, e + 1, e + 2); return this }, Buffer.prototype.swap64 = function swap64() { var t = this.length; if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits"); for (var e = 0; e < t; e += 8)swap(this, e, e + 7), swap(this, e + 1, e + 6), swap(this, e + 2, e + 5), swap(this, e + 3, e + 4); return this }, Buffer.prototype.toString = function toString() { var t = 0 | this.length; return 0 === t ? "" : 0 === arguments.length ? utf8Slice(this, 0, t) : function slowToString(t, e, r) { var n = !1; if ((void 0 === e || e < 0) && (e = 0), e > this.length) return ""; if ((void 0 === r || r > this.length) && (r = this.length), r <= 0) return ""; if ((r >>>= 0) <= (e >>>= 0)) return ""; for (t || (t = "utf8"); ;)switch (t) { case "hex": return hexSlice(this, e, r); case "utf8": case "utf-8": return utf8Slice(this, e, r); case "ascii": return asciiSlice(this, e, r); case "latin1": case "binary": return latin1Slice(this, e, r); case "base64": return base64Slice(this, e, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return utf16leSlice(this, e, r); default: if (n) throw new TypeError("Unknown encoding: " + t); t = (t + "").toLowerCase(), n = !0 } }.apply(this, arguments) }, Buffer.prototype.equals = function equals(t) { if (!Buffer.isBuffer(t)) throw new TypeError("Argument must be a Buffer"); return this === t || 0 === Buffer.compare(this, t) }, Buffer.prototype.inspect = function inspect() { var t = "", r = e.INSPECT_MAX_BYTES; return this.length > 0 && (t = this.toString("hex", 0, r).match(/.{2}/g).join(" "), this.length > r && (t += " ... ")), "<Buffer " + t + ">" }, Buffer.prototype.compare = function compare(t, e, r, n, i) { if (!Buffer.isBuffer(t)) throw new TypeError("Argument must be a Buffer"); if (void 0 === e && (e = 0), void 0 === r && (r = t ? t.length : 0), void 0 === n && (n = 0), void 0 === i && (i = this.length), e < 0 || r > t.length || n < 0 || i > this.length) throw new RangeError("out of range index"); if (n >= i && e >= r) return 0; if (n >= i) return -1; if (e >= r) return 1; if (e >>>= 0, r >>>= 0, n >>>= 0, i >>>= 0, this === t) return 0; for (var o = i - n, s = r - e, a = Math.min(o, s), u = this.slice(n, i), c = t.slice(e, r), f = 0; f < a; ++f)if (u[f] !== c[f]) { o = u[f], s = c[f]; break } return o < s ? -1 : s < o ? 1 : 0 }, Buffer.prototype.includes = function includes(t, e, r) { return -1 !== this.indexOf(t, e, r) }, Buffer.prototype.indexOf = function indexOf(t, e, r) { return bidirectionalIndexOf(this, t, e, r, !0) }, Buffer.prototype.lastIndexOf = function lastIndexOf(t, e, r) { return bidirectionalIndexOf(this, t, e, r, !1) }, Buffer.prototype.write = function write(t, e, r, n) { if (void 0 === e) n = "utf8", r = this.length, e = 0; else if (void 0 === r && "string" == typeof e) n = e, r = this.length, e = 0; else { if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported"); e |= 0, isFinite(r) ? (r |= 0, void 0 === n && (n = "utf8")) : (n = r, r = void 0) } var i = this.length - e; if ((void 0 === r || r > i) && (r = i), t.length > 0 && (r < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds"); n || (n = "utf8"); for (var o = !1; ;)switch (n) { case "hex": return hexWrite(this, t, e, r); case "utf8": case "utf-8": return utf8Write(this, t, e, r); case "ascii": return asciiWrite(this, t, e, r); case "latin1": case "binary": return latin1Write(this, t, e, r); case "base64": return base64Write(this, t, e, r); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return ucs2Write(this, t, e, r); default: if (o) throw new TypeError("Unknown encoding: " + n); n = ("" + n).toLowerCase(), o = !0 } }, Buffer.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) } }; var s = 4096; function asciiSlice(t, e, r) { var n = ""; r = Math.min(t.length, r); for (var i = e; i < r; ++i)n += String.fromCharCode(127 & t[i]); return n } function latin1Slice(t, e, r) { var n = ""; r = Math.min(t.length, r); for (var i = e; i < r; ++i)n += String.fromCharCode(t[i]); return n } function hexSlice(t, e, r) { var n = t.length; (!e || e < 0) && (e = 0), (!r || r < 0 || r > n) && (r = n); for (var i = "", o = e; o < r; ++o)i += toHex(t[o]); return i } function utf16leSlice(t, e, r) { for (var n = t.slice(e, r), i = "", o = 0; o < n.length; o += 2)i += String.fromCharCode(n[o] + 256 * n[o + 1]); return i } function checkOffset(t, e, r) { if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint"); if (t + e > r) throw new RangeError("Trying to access beyond buffer length") } function checkInt(t, e, r, n, i, o) { if (!Buffer.isBuffer(t)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (e > i || e < o) throw new RangeError('"value" argument is out of bounds'); if (r + n > t.length) throw new RangeError("Index out of range") } function objectWriteUInt16(t, e, r, n) { e < 0 && (e = 65535 + e + 1); for (var i = 0, o = Math.min(t.length - r, 2); i < o; ++i)t[r + i] = (e & 255 << 8 * (n ? i : 1 - i)) >>> 8 * (n ? i : 1 - i) } function objectWriteUInt32(t, e, r, n) { e < 0 && (e = 4294967295 + e + 1); for (var i = 0, o = Math.min(t.length - r, 4); i < o; ++i)t[r + i] = e >>> 8 * (n ? i : 3 - i) & 255 } function checkIEEE754(t, e, r, n, i, o) { if (r + n > t.length) throw new RangeError("Index out of range"); if (r < 0) throw new RangeError("Index out of range") } function writeFloat(t, e, r, n, o) { return o || checkIEEE754(t, 0, r, 4), i.write(t, e, r, n, 23, 4), r + 4 } function writeDouble(t, e, r, n, o) { return o || checkIEEE754(t, 0, r, 8), i.write(t, e, r, n, 52, 8), r + 8 } Buffer.prototype.slice = function slice(t, e) { var r, n = this.length; if (t = ~~t, e = void 0 === e ? n : ~~e, t < 0 ? (t += n) < 0 && (t = 0) : t > n && (t = n), e < 0 ? (e += n) < 0 && (e = 0) : e > n && (e = n), e < t && (e = t), Buffer.TYPED_ARRAY_SUPPORT) (r = this.subarray(t, e)).__proto__ = Buffer.prototype; else { var i = e - t; r = new Buffer(i, void 0); for (var o = 0; o < i; ++o)r[o] = this[o + t] } return r }, Buffer.prototype.readUIntLE = function readUIntLE(t, e, r) { t |= 0, e |= 0, r || checkOffset(t, e, this.length); for (var n = this[t], i = 1, o = 0; ++o < e && (i *= 256);)n += this[t + o] * i; return n }, Buffer.prototype.readUIntBE = function readUIntBE(t, e, r) { t |= 0, e |= 0, r || checkOffset(t, e, this.length); for (var n = this[t + --e], i = 1; e > 0 && (i *= 256);)n += this[t + --e] * i; return n }, Buffer.prototype.readUInt8 = function readUInt8(t, e) { return e || checkOffset(t, 1, this.length), this[t] }, Buffer.prototype.readUInt16LE = function readUInt16LE(t, e) { return e || checkOffset(t, 2, this.length), this[t] | this[t + 1] << 8 }, Buffer.prototype.readUInt16BE = function readUInt16BE(t, e) { return e || checkOffset(t, 2, this.length), this[t] << 8 | this[t + 1] }, Buffer.prototype.readUInt32LE = function readUInt32LE(t, e) { return e || checkOffset(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3] }, Buffer.prototype.readUInt32BE = function readUInt32BE(t, e) { return e || checkOffset(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]) }, Buffer.prototype.readIntLE = function readIntLE(t, e, r) { t |= 0, e |= 0, r || checkOffset(t, e, this.length); for (var n = this[t], i = 1, o = 0; ++o < e && (i *= 256);)n += this[t + o] * i; return n >= (i *= 128) && (n -= Math.pow(2, 8 * e)), n }, Buffer.prototype.readIntBE = function readIntBE(t, e, r) { t |= 0, e |= 0, r || checkOffset(t, e, this.length); for (var n = e, i = 1, o = this[t + --n]; n > 0 && (i *= 256);)o += this[t + --n] * i; return o >= (i *= 128) && (o -= Math.pow(2, 8 * e)), o }, Buffer.prototype.readInt8 = function readInt8(t, e) { return e || checkOffset(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t] }, Buffer.prototype.readInt16LE = function readInt16LE(t, e) { e || checkOffset(t, 2, this.length); var r = this[t] | this[t + 1] << 8; return 32768 & r ? 4294901760 | r : r }, Buffer.prototype.readInt16BE = function readInt16BE(t, e) { e || checkOffset(t, 2, this.length); var r = this[t + 1] | this[t] << 8; return 32768 & r ? 4294901760 | r : r }, Buffer.prototype.readInt32LE = function readInt32LE(t, e) { return e || checkOffset(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24 }, Buffer.prototype.readInt32BE = function readInt32BE(t, e) { return e || checkOffset(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3] }, Buffer.prototype.readFloatLE = function readFloatLE(t, e) { return e || checkOffset(t, 4, this.length), i.read(this, t, !0, 23, 4) }, Buffer.prototype.readFloatBE = function readFloatBE(t, e) { return e || checkOffset(t, 4, this.length), i.read(this, t, !1, 23, 4) }, Buffer.prototype.readDoubleLE = function readDoubleLE(t, e) { return e || checkOffset(t, 8, this.length), i.read(this, t, !0, 52, 8) }, Buffer.prototype.readDoubleBE = function readDoubleBE(t, e) { return e || checkOffset(t, 8, this.length), i.read(this, t, !1, 52, 8) }, Buffer.prototype.writeUIntLE = function writeUIntLE(t, e, r, n) { (t = +t, e |= 0, r |= 0, n) || checkInt(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); var i = 1, o = 0; for (this[e] = 255 & t; ++o < r && (i *= 256);)this[e + o] = t / i & 255; return e + r }, Buffer.prototype.writeUIntBE = function writeUIntBE(t, e, r, n) { (t = +t, e |= 0, r |= 0, n) || checkInt(this, t, e, r, Math.pow(2, 8 * r) - 1, 0); var i = r - 1, o = 1; for (this[e + i] = 255 & t; --i >= 0 && (o *= 256);)this[e + i] = t / o & 255; return e + r }, Buffer.prototype.writeUInt8 = function writeUInt8(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 1, 255, 0), Buffer.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), this[e] = 255 & t, e + 1 }, Buffer.prototype.writeUInt16LE = function writeUInt16LE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 2, 65535, 0), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : objectWriteUInt16(this, t, e, !0), e + 2 }, Buffer.prototype.writeUInt16BE = function writeUInt16BE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 2, 65535, 0), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : objectWriteUInt16(this, t, e, !1), e + 2 }, Buffer.prototype.writeUInt32LE = function writeUInt32LE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 4, 4294967295, 0), Buffer.TYPED_ARRAY_SUPPORT ? (this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t) : objectWriteUInt32(this, t, e, !0), e + 4 }, Buffer.prototype.writeUInt32BE = function writeUInt32BE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 4, 4294967295, 0), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : objectWriteUInt32(this, t, e, !1), e + 4 }, Buffer.prototype.writeIntLE = function writeIntLE(t, e, r, n) { if (t = +t, e |= 0, !n) { var i = Math.pow(2, 8 * r - 1); checkInt(this, t, e, r, i - 1, -i) } var o = 0, s = 1, a = 0; for (this[e] = 255 & t; ++o < r && (s *= 256);)t < 0 && 0 === a && 0 !== this[e + o - 1] && (a = 1), this[e + o] = (t / s >> 0) - a & 255; return e + r }, Buffer.prototype.writeIntBE = function writeIntBE(t, e, r, n) { if (t = +t, e |= 0, !n) { var i = Math.pow(2, 8 * r - 1); checkInt(this, t, e, r, i - 1, -i) } var o = r - 1, s = 1, a = 0; for (this[e + o] = 255 & t; --o >= 0 && (s *= 256);)t < 0 && 0 === a && 0 !== this[e + o + 1] && (a = 1), this[e + o] = (t / s >> 0) - a & 255; return e + r }, Buffer.prototype.writeInt8 = function writeInt8(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 1, 127, -128), Buffer.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1 }, Buffer.prototype.writeInt16LE = function writeInt16LE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 2, 32767, -32768), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : objectWriteUInt16(this, t, e, !0), e + 2 }, Buffer.prototype.writeInt16BE = function writeInt16BE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 2, 32767, -32768), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : objectWriteUInt16(this, t, e, !1), e + 2 }, Buffer.prototype.writeInt32LE = function writeInt32LE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 4, 2147483647, -2147483648), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24) : objectWriteUInt32(this, t, e, !0), e + 4 }, Buffer.prototype.writeInt32BE = function writeInt32BE(t, e, r) { return t = +t, e |= 0, r || checkInt(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), Buffer.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : objectWriteUInt32(this, t, e, !1), e + 4 }, Buffer.prototype.writeFloatLE = function writeFloatLE(t, e, r) { return writeFloat(this, t, e, !0, r) }, Buffer.prototype.writeFloatBE = function writeFloatBE(t, e, r) { return writeFloat(this, t, e, !1, r) }, Buffer.prototype.writeDoubleLE = function writeDoubleLE(t, e, r) { return writeDouble(this, t, e, !0, r) }, Buffer.prototype.writeDoubleBE = function writeDoubleBE(t, e, r) { return writeDouble(this, t, e, !1, r) }, Buffer.prototype.copy = function copy(t, e, r, n) { if (r || (r = 0), n || 0 === n || (n = this.length), e >= t.length && (e = t.length), e || (e = 0), n > 0 && n < r && (n = r), n === r) return 0; if (0 === t.length || 0 === this.length) return 0; if (e < 0) throw new RangeError("targetStart out of bounds"); if (r < 0 || r >= this.length) throw new RangeError("sourceStart out of bounds"); if (n < 0) throw new RangeError("sourceEnd out of bounds"); n > this.length && (n = this.length), t.length - e < n - r && (n = t.length - e + r); var i, o = n - r; if (this === t && r < e && e < n) for (i = o - 1; i >= 0; --i)t[i + e] = this[i + r]; else if (o < 1e3 || !Buffer.TYPED_ARRAY_SUPPORT) for (i = 0; i < o; ++i)t[i + e] = this[i + r]; else Uint8Array.prototype.set.call(t, this.subarray(r, r + o), e); return o }, Buffer.prototype.fill = function fill(t, e, r, n) { if ("string" == typeof t) { if ("string" == typeof e ? (n = e, e = 0, r = this.length) : "string" == typeof r && (n = r, r = this.length), 1 === t.length) { var i = t.charCodeAt(0); i < 256 && (t = i) } if (void 0 !== n && "string" != typeof n) throw new TypeError("encoding must be a string"); if ("string" == typeof n && !Buffer.isEncoding(n)) throw new TypeError("Unknown encoding: " + n) } else "number" == typeof t && (t &= 255); if (e < 0 || this.length < e || this.length < r) throw new RangeError("Out of range index"); if (r <= e) return this; var o; if (e >>>= 0, r = void 0 === r ? this.length : r >>> 0, t || (t = 0), "number" == typeof t) for (o = e; o < r; ++o)this[o] = t; else { var s = Buffer.isBuffer(t) ? t : utf8ToBytes(new Buffer(t, n).toString()), a = s.length; for (o = 0; o < r - e; ++o)this[o + e] = s[o % a] } return this }; var a = /[^+\/0-9A-Za-z-_]/g; function toHex(t) { return t < 16 ? "0" + t.toString(16) : t.toString(16) } function utf8ToBytes(t, e) { var r; e = e || 1 / 0; for (var n = t.length, i = null, o = [], s = 0; s < n; ++s) { if ((r = t.charCodeAt(s)) > 55295 && r < 57344) { if (!i) { if (r > 56319) { (e -= 3) > -1 && o.push(239, 191, 189); continue } if (s + 1 === n) { (e -= 3) > -1 && o.push(239, 191, 189); continue } i = r; continue } if (r < 56320) { (e -= 3) > -1 && o.push(239, 191, 189), i = r; continue } r = 65536 + (i - 55296 << 10 | r - 56320) } else i && (e -= 3) > -1 && o.push(239, 191, 189); if (i = null, r < 128) { if ((e -= 1) < 0) break; o.push(r) } else if (r < 2048) { if ((e -= 2) < 0) break; o.push(r >> 6 | 192, 63 & r | 128) } else if (r < 65536) { if ((e -= 3) < 0) break; o.push(r >> 12 | 224, r >> 6 & 63 | 128, 63 & r | 128) } else { if (!(r < 1114112)) throw new Error("Invalid code point"); if ((e -= 4) < 0) break; o.push(r >> 18 | 240, r >> 12 & 63 | 128, r >> 6 & 63 | 128, 63 & r | 128) } } return o } function base64ToBytes(t) { return n.toByteArray(function base64clean(t) { if ((t = function stringtrim(t) { return t.trim ? t.trim() : t.replace(/^\s+|\s+$/g, "") }(t).replace(a, "")).length < 2) return ""; for (; t.length % 4 != 0;)t += "="; return t }(t)) } function blitBuffer(t, e, r, n) { for (var i = 0; i < n && !(i + r >= e.length || i >= t.length); ++i)e[i + r] = t[i]; return i }
  }).call(this, r(99))
}, function (t, e, r) {
  "use strict"; (function (t) {
    var n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, i = { userAgent: !1 }, u = {};
    /*!
    Copyright (c) 2011, Yahoo! Inc. All rights reserved.
    Code licensed under the BSD License:
    http://developer.yahoo.com/yui/license.html
    version: 2.9.0
    */
    if (void 0 === p) var p = {}; p.lang = { extend: function extend(t, r, n) { if (!r || !t) throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included."); var o = function d() { }; if (o.prototype = r.prototype, t.prototype = new o, t.prototype.constructor = t, t.superclass = r.prototype, r.prototype.constructor == Object.prototype.constructor && (r.prototype.constructor = r), n) { var s; for (s in n) t.prototype[s] = n[s]; var a = function e() { }, u = ["toString", "valueOf"]; try { /MSIE/.test(i.userAgent) && (a = function e(t, r) { for (s = 0; s < u.length; s += 1) { var n = u[s], i = r[n]; "function" == typeof i && i != Object.prototype[n] && (t[n] = i) } }) } catch (t) { } a(t.prototype, n) } } };
    /*! CryptoJS v3.1.2 core-fix.js
     * code.google.com/p/crypto-js
     * (c) 2009-2013 by Jeff Mott. All rights reserved.
     * code.google.com/p/crypto-js/wiki/License
     * THIS IS FIX of 'core.js' to fix Hmac issue.
     * https://code.google.com/p/crypto-js/issues/detail?id=84
     * https://crypto-js.googlecode.com/svn-history/r667/branches/3.x/src/core.js
     */
    var v = v || function (t, e) { var r = {}, n = r.lib = {}, i = n.Base = function () { function n() { } return { extend: function extend(t) { n.prototype = this; var e = new n; return t && e.mixIn(t), e.hasOwnProperty("init") || (e.init = function () { e.$super.init.apply(this, arguments) }), e.init.prototype = e, e.$super = this, e }, create: function create() { var t = this.extend(); return t.init.apply(t, arguments), t }, init: function init() { }, mixIn: function mixIn(t) { for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); t.hasOwnProperty("toString") && (this.toString = t.toString) }, clone: function clone() { return this.init.prototype.extend(this) } } }(), o = n.WordArray = i.extend({ init: function init(t, e) { t = this.words = t || [], this.sigBytes = void 0 != e ? e : 4 * t.length }, toString: function toString(t) { return (t || a).stringify(this) }, concat: function concat(t) { var e = this.words, r = t.words, n = this.sigBytes, i = t.sigBytes; if (this.clamp(), n % 4) for (var o = 0; o < i; o++) { var s = r[o >>> 2] >>> 24 - o % 4 * 8 & 255; e[n + o >>> 2] |= s << 24 - (n + o) % 4 * 8 } else for (o = 0; o < i; o += 4)e[n + o >>> 2] = r[o >>> 2]; return this.sigBytes += i, this }, clamp: function clamp() { var e = this.words, r = this.sigBytes; e[r >>> 2] &= 4294967295 << 32 - r % 4 * 8, e.length = t.ceil(r / 4) }, clone: function clone() { var t = i.clone.call(this); return t.words = this.words.slice(0), t }, random: function random(e) { for (var r = [], n = 0; n < e; n += 4)r.push(4294967296 * t.random() | 0); return new o.init(r, e) } }), s = r.enc = {}, a = s.Hex = { stringify: function stringify(t) { for (var e = t.words, r = t.sigBytes, n = [], i = 0; i < r; i++) { var o = e[i >>> 2] >>> 24 - i % 4 * 8 & 255; n.push((o >>> 4).toString(16)), n.push((15 & o).toString(16)) } return n.join("") }, parse: function parse(t) { for (var e = t.length, r = [], n = 0; n < e; n += 2)r[n >>> 3] |= parseInt(t.substr(n, 2), 16) << 24 - n % 8 * 4; return new o.init(r, e / 2) } }, u = s.Latin1 = { stringify: function stringify(t) { for (var e = t.words, r = t.sigBytes, n = [], i = 0; i < r; i++) { var o = e[i >>> 2] >>> 24 - i % 4 * 8 & 255; n.push(String.fromCharCode(o)) } return n.join("") }, parse: function parse(t) { for (var e = t.length, r = [], n = 0; n < e; n++)r[n >>> 2] |= (255 & t.charCodeAt(n)) << 24 - n % 4 * 8; return new o.init(r, e) } }, c = s.Utf8 = { stringify: function stringify(t) { try { return decodeURIComponent(escape(u.stringify(t))) } catch (t) { throw new Error("Malformed UTF-8 data") } }, parse: function parse(t) { return u.parse(unescape(encodeURIComponent(t))) } }, f = n.BufferedBlockAlgorithm = i.extend({ reset: function reset() { this._data = new o.init, this._nDataBytes = 0 }, _append: function _append(t) { "string" == typeof t && (t = c.parse(t)), this._data.concat(t), this._nDataBytes += t.sigBytes }, _process: function _process(e) { var r = this._data, n = r.words, i = r.sigBytes, s = this.blockSize, a = i / (4 * s), u = (a = e ? t.ceil(a) : t.max((0 | a) - this._minBufferSize, 0)) * s, c = t.min(4 * u, i); if (u) { for (var f = 0; f < u; f += s)this._doProcessBlock(n, f); var h = n.splice(0, u); r.sigBytes -= c } return new o.init(h, c) }, clone: function clone() { var t = i.clone.call(this); return t._data = this._data.clone(), t }, _minBufferSize: 0 }), h = (n.Hasher = f.extend({ cfg: i.extend(), init: function init(t) { this.cfg = this.cfg.extend(t), this.reset() }, reset: function reset() { f.reset.call(this), this._doReset() }, update: function update(t) { return this._append(t), this._process(), this }, finalize: function finalize(t) { return t && this._append(t), this._doFinalize() }, blockSize: 16, _createHelper: function _createHelper(t) { return function (e, r) { return new t.init(r).finalize(e) } }, _createHmacHelper: function _createHmacHelper(t) { return function (e, r) { return new h.HMAC.init(t, r).finalize(e) } } }), r.algo = {}); return r }(Math); !function (t) { var e, r = (e = v).lib, n = r.Base, i = r.WordArray; (e = e.x64 = {}).Word = n.extend({ init: function init(t, e) { this.high = t, this.low = e } }), e.WordArray = n.extend({ init: function init(t, e) { t = this.words = t || [], this.sigBytes = void 0 != e ? e : 8 * t.length }, toX32: function toX32() { for (var t = this.words, e = t.length, r = [], n = 0; n < e; n++) { var o = t[n]; r.push(o.high), r.push(o.low) } return i.create(r, this.sigBytes) }, clone: function clone() { for (var t = n.clone.call(this), e = t.words = this.words.slice(0), r = e.length, i = 0; i < r; i++)e[i] = e[i].clone(); return t } }) }(), function () { var t = v, e = t.lib.WordArray; t.enc.Base64 = { stringify: function stringify(t) { var e = t.words, r = t.sigBytes, n = this._map; t.clamp(), t = []; for (var i = 0; i < r; i += 3)for (var o = (e[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (e[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | e[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, s = 0; 4 > s && i + .75 * s < r; s++)t.push(n.charAt(o >>> 6 * (3 - s) & 63)); if (e = n.charAt(64)) for (; t.length % 4;)t.push(e); return t.join("") }, parse: function parse(t) { var r = t.length, n = this._map; (i = n.charAt(64)) && (-1 != (i = t.indexOf(i)) && (r = i)); for (var i = [], o = 0, s = 0; s < r; s++)if (s % 4) { var a = n.indexOf(t.charAt(s - 1)) << s % 4 * 2, u = n.indexOf(t.charAt(s)) >>> 6 - s % 4 * 2; i[o >>> 2] |= (a | u) << 24 - o % 4 * 8, o++ } return e.create(i, o) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" } }(), function (t) { for (var e = v, r = (i = e.lib).WordArray, n = i.Hasher, i = e.algo, o = [], s = [], a = function u(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; l <= h; l++)if (!(f % l)) { f = !1; break t } f = !0 } f && (8 > c && (o[c] = a(t.pow(u, .5))), s[c] = a(t.pow(u, 1 / 3)), c++), u++ } var p = []; i = i.SHA256 = n.extend({ _doReset: function _doReset() { this._hash = new r.init(o.slice(0)) }, _doProcessBlock: function _doProcessBlock(t, e) { for (var r = this._hash.words, n = r[0], i = r[1], o = r[2], a = r[3], u = r[4], c = r[5], f = r[6], h = r[7], l = 0; 64 > l; l++) { if (16 > l) p[l] = 0 | t[e + l]; else { var g = p[l - 15], d = p[l - 2]; p[l] = ((g << 25 | g >>> 7) ^ (g << 14 | g >>> 18) ^ g >>> 3) + p[l - 7] + ((d << 15 | d >>> 17) ^ (d << 13 | d >>> 19) ^ d >>> 10) + p[l - 16] } g = h + ((u << 26 | u >>> 6) ^ (u << 21 | u >>> 11) ^ (u << 7 | u >>> 25)) + (u & c ^ ~u & f) + s[l] + p[l], d = ((n << 30 | n >>> 2) ^ (n << 19 | n >>> 13) ^ (n << 10 | n >>> 22)) + (n & i ^ n & o ^ i & o), h = f, f = c, c = u, u = a + g | 0, a = o, o = i, i = n, n = g + d | 0 } r[0] = r[0] + n | 0, r[1] = r[1] + i | 0, r[2] = r[2] + o | 0, r[3] = r[3] + a | 0, r[4] = r[4] + u | 0, r[5] = r[5] + c | 0, r[6] = r[6] + f | 0, r[7] = r[7] + h | 0 }, _doFinalize: function _doFinalize() { var e = this._data, r = e.words, n = 8 * this._nDataBytes, i = 8 * e.sigBytes; return r[i >>> 5] |= 128 << 24 - i % 32, r[14 + (i + 64 >>> 9 << 4)] = t.floor(n / 4294967296), r[15 + (i + 64 >>> 9 << 4)] = n, e.sigBytes = 4 * r.length, this._process(), this._hash }, clone: function clone() { var t = n.clone.call(this); return t._hash = this._hash.clone(), t } }); e.SHA256 = n._createHelper(i), e.HmacSHA256 = n._createHmacHelper(i) }(Math), function () { function a() { return r.create.apply(r, arguments) } for (var t = v, e = t.lib.Hasher, r = (i = t.x64).Word, n = i.WordArray, i = t.algo, o = [a(1116352408, 3609767458), a(1899447441, 602891725), a(3049323471, 3964484399), a(3921009573, 2173295548), a(961987163, 4081628472), a(1508970993, 3053834265), a(2453635748, 2937671579), a(2870763221, 3664609560), a(3624381080, 2734883394), a(310598401, 1164996542), a(607225278, 1323610764), a(1426881987, 3590304994), a(1925078388, 4068182383), a(2162078206, 991336113), a(2614888103, 633803317), a(3248222580, 3479774868), a(3835390401, 2666613458), a(4022224774, 944711139), a(264347078, 2341262773), a(604807628, 2007800933), a(770255983, 1495990901), a(1249150122, 1856431235), a(1555081692, 3175218132), a(1996064986, 2198950837), a(2554220882, 3999719339), a(2821834349, 766784016), a(2952996808, 2566594879), a(3210313671, 3203337956), a(3336571891, 1034457026), a(3584528711, 2466948901), a(113926993, 3758326383), a(338241895, 168717936), a(666307205, 1188179964), a(773529912, 1546045734), a(1294757372, 1522805485), a(1396182291, 2643833823), a(1695183700, 2343527390), a(1986661051, 1014477480), a(2177026350, 1206759142), a(2456956037, 344077627), a(2730485921, 1290863460), a(2820302411, 3158454273), a(3259730800, 3505952657), a(3345764771, 106217008), a(3516065817, 3606008344), a(3600352804, 1432725776), a(4094571909, 1467031594), a(275423344, 851169720), a(430227734, 3100823752), a(506948616, 1363258195), a(659060556, 3750685593), a(883997877, 3785050280), a(958139571, 3318307427), a(1322822218, 3812723403), a(1537002063, 2003034995), a(1747873779, 3602036899), a(1955562222, 1575990012), a(2024104815, 1125592928), a(2227730452, 2716904306), a(2361852424, 442776044), a(2428436474, 593698344), a(2756734187, 3733110249), a(3204031479, 2999351573), a(3329325298, 3815920427), a(3391569614, 3928383900), a(3515267271, 566280711), a(3940187606, 3454069534), a(4118630271, 4000239992), a(116418474, 1914138554), a(174292421, 2731055270), a(289380356, 3203993006), a(460393269, 320620315), a(685471733, 587496836), a(852142971, 1086792851), a(1017036298, 365543100), a(1126000580, 2618297676), a(1288033470, 3409855158), a(1501505948, 4234509866), a(1607167915, 987167468), a(1816402316, 1246189591)], s = [], u = 0; 80 > u; u++)s[u] = a(); i = i.SHA512 = e.extend({ _doReset: function _doReset() { this._hash = new n.init([new r.init(1779033703, 4089235720), new r.init(3144134277, 2227873595), new r.init(1013904242, 4271175723), new r.init(2773480762, 1595750129), new r.init(1359893119, 2917565137), new r.init(2600822924, 725511199), new r.init(528734635, 4215389547), new r.init(1541459225, 327033209)]) }, _doProcessBlock: function _doProcessBlock(t, e) { for (var r = (h = this._hash.words)[0], n = h[1], i = h[2], a = h[3], u = h[4], c = h[5], f = h[6], h = h[7], l = r.high, p = r.low, g = n.high, d = n.low, v = i.high, y = i.low, m = a.high, S = a.low, _ = u.high, b = u.low, F = c.high, w = c.low, E = f.high, x = f.low, A = h.high, P = h.low, k = l, I = p, C = g, R = d, B = v, T = y, M = m, O = S, U = _, D = b, N = F, L = w, j = E, H = x, K = A, V = P, W = 0; 80 > W; W++) { var q = s[W]; if (16 > W) var J = q.high = 0 | t[e + 2 * W], z = q.low = 0 | t[e + 2 * W + 1]; else { J = ((z = (J = s[W - 15]).high) >>> 1 | (G = J.low) << 31) ^ (z >>> 8 | G << 24) ^ z >>> 7; var G = (G >>> 1 | z << 31) ^ (G >>> 8 | z << 24) ^ (G >>> 7 | z << 25), Y = ((z = (Y = s[W - 2]).high) >>> 19 | (X = Y.low) << 13) ^ (z << 3 | X >>> 29) ^ z >>> 6, X = (X >>> 19 | z << 13) ^ (X << 3 | z >>> 29) ^ (X >>> 6 | z << 26), $ = (z = s[W - 7]).high, Q = (Z = s[W - 16]).high, Z = Z.low; J = (J = (J = J + $ + ((z = G + z.low) >>> 0 < G >>> 0 ? 1 : 0)) + Y + ((z = z + X) >>> 0 < X >>> 0 ? 1 : 0)) + Q + ((z = z + Z) >>> 0 < Z >>> 0 ? 1 : 0); q.high = J, q.low = z } $ = U & N ^ ~U & j, Z = D & L ^ ~D & H, q = k & C ^ k & B ^ C & B; var tt = I & R ^ I & T ^ R & T, et = (G = (k >>> 28 | I << 4) ^ (k << 30 | I >>> 2) ^ (k << 25 | I >>> 7), Y = (I >>> 28 | k << 4) ^ (I << 30 | k >>> 2) ^ (I << 25 | k >>> 7), (X = o[W]).high), rt = X.low; Q = (Q = (Q = (Q = K + ((U >>> 14 | D << 18) ^ (U >>> 18 | D << 14) ^ (U << 23 | D >>> 9)) + ((X = V + ((D >>> 14 | U << 18) ^ (D >>> 18 | U << 14) ^ (D << 23 | U >>> 9))) >>> 0 < V >>> 0 ? 1 : 0)) + $ + ((X = X + Z) >>> 0 < Z >>> 0 ? 1 : 0)) + et + ((X = X + rt) >>> 0 < rt >>> 0 ? 1 : 0)) + J + ((X = X + z) >>> 0 < z >>> 0 ? 1 : 0), q = G + q + ((z = Y + tt) >>> 0 < Y >>> 0 ? 1 : 0), K = j, V = H, j = N, H = L, N = U, L = D, U = M + Q + ((D = O + X | 0) >>> 0 < O >>> 0 ? 1 : 0) | 0, M = B, O = T, B = C, T = R, C = k, R = I, k = Q + q + ((I = X + z | 0) >>> 0 < X >>> 0 ? 1 : 0) | 0 } p = r.low = p + I, r.high = l + k + (p >>> 0 < I >>> 0 ? 1 : 0), d = n.low = d + R, n.high = g + C + (d >>> 0 < R >>> 0 ? 1 : 0), y = i.low = y + T, i.high = v + B + (y >>> 0 < T >>> 0 ? 1 : 0), S = a.low = S + O, a.high = m + M + (S >>> 0 < O >>> 0 ? 1 : 0), b = u.low = b + D, u.high = _ + U + (b >>> 0 < D >>> 0 ? 1 : 0), w = c.low = w + L, c.high = F + N + (w >>> 0 < L >>> 0 ? 1 : 0), x = f.low = x + H, f.high = E + j + (x >>> 0 < H >>> 0 ? 1 : 0), P = h.low = P + V, h.high = A + K + (P >>> 0 < V >>> 0 ? 1 : 0) }, _doFinalize: function _doFinalize() { var t = this._data, e = t.words, r = 8 * this._nDataBytes, n = 8 * t.sigBytes; return e[n >>> 5] |= 128 << 24 - n % 32, e[30 + (n + 128 >>> 10 << 5)] = Math.floor(r / 4294967296), e[31 + (n + 128 >>> 10 << 5)] = r, t.sigBytes = 4 * e.length, this._process(), this._hash.toX32() }, clone: function clone() { var t = e.clone.call(this); return t._hash = this._hash.clone(), t }, blockSize: 32 }), t.SHA512 = e._createHelper(i), t.HmacSHA512 = e._createHmacHelper(i) }(), function () { var t = v, e = (i = t.x64).Word, r = i.WordArray, n = (i = t.algo).SHA512, i = i.SHA384 = n.extend({ _doReset: function _doReset() { this._hash = new r.init([new e.init(3418070365, 3238371032), new e.init(1654270250, 914150663), new e.init(2438529370, 812702999), new e.init(355462360, 4144912697), new e.init(1731405415, 4290775857), new e.init(2394180231, 1750603025), new e.init(3675008525, 1694076839), new e.init(1203062813, 3204075428)]) }, _doFinalize: function _doFinalize() { var t = n._doFinalize.call(this); return t.sigBytes -= 16, t } }); t.SHA384 = n._createHelper(i), t.HmacSHA384 = n._createHmacHelper(i) }();
    /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
     */
    var y, S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", _ = "="; function hex2b64(t) { var e, r, n = ""; for (e = 0; e + 3 <= t.length; e += 3)r = parseInt(t.substring(e, e + 3), 16), n += S.charAt(r >> 6) + S.charAt(63 & r); if (e + 1 == t.length ? (r = parseInt(t.substring(e, e + 1), 16), n += S.charAt(r << 2)) : e + 2 == t.length && (r = parseInt(t.substring(e, e + 2), 16), n += S.charAt(r >> 2) + S.charAt((3 & r) << 4)), _) for (; (3 & n.length) > 0;)n += _; return n } function b64tohex(t) { var e, r, n, i = "", o = 0; for (e = 0; e < t.length && t.charAt(e) != _; ++e)(n = S.indexOf(t.charAt(e))) < 0 || (0 == o ? (i += int2char(n >> 2), r = 3 & n, o = 1) : 1 == o ? (i += int2char(r << 2 | n >> 4), r = 15 & n, o = 2) : 2 == o ? (i += int2char(r), i += int2char(n >> 2), r = 3 & n, o = 3) : (i += int2char(r << 2 | n >> 4), i += int2char(15 & n), o = 0)); return 1 == o && (i += int2char(r << 2)), i } function b64toBA(t) { var e, r = b64tohex(t), n = new Array; for (e = 0; 2 * e < r.length; ++e)n[e] = parseInt(r.substring(2 * e, 2 * e + 2), 16); return n } function BigInteger(t, e, r) { null != t && ("number" == typeof t ? this.fromNumber(t, e, r) : null == e && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, e)) } function nbi() { return new BigInteger(null) } "Microsoft Internet Explorer" == i.appName ? (BigInteger.prototype.am = function am2(t, e, r, n, i, o) { for (var s = 32767 & e, a = e >> 15; --o >= 0;) { var u = 32767 & this[t], c = this[t++] >> 15, f = a * u + c * s; i = ((u = s * u + ((32767 & f) << 15) + r[n] + (1073741823 & i)) >>> 30) + (f >>> 15) + a * c + (i >>> 30), r[n++] = 1073741823 & u } return i }, y = 30) : "Netscape" != i.appName ? (BigInteger.prototype.am = function am1(t, e, r, n, i, o) { for (; --o >= 0;) { var s = e * this[t++] + r[n] + i; i = Math.floor(s / 67108864), r[n++] = 67108863 & s } return i }, y = 26) : (BigInteger.prototype.am = function am3(t, e, r, n, i, o) { for (var s = 16383 & e, a = e >> 14; --o >= 0;) { var u = 16383 & this[t], c = this[t++] >> 14, f = a * u + c * s; i = ((u = s * u + ((16383 & f) << 14) + r[n] + i) >> 28) + (f >> 14) + a * c, r[n++] = 268435455 & u } return i }, y = 28), BigInteger.prototype.DB = y, BigInteger.prototype.DM = (1 << y) - 1, BigInteger.prototype.DV = 1 << y; BigInteger.prototype.FV = Math.pow(2, 52), BigInteger.prototype.F1 = 52 - y, BigInteger.prototype.F2 = 2 * y - 52; var F, w, E = "0123456789abcdefghijklmnopqrstuvwxyz", P = new Array; for (F = "0".charCodeAt(0), w = 0; w <= 9; ++w)P[F++] = w; for (F = "a".charCodeAt(0), w = 10; w < 36; ++w)P[F++] = w; for (F = "A".charCodeAt(0), w = 10; w < 36; ++w)P[F++] = w; function int2char(t) { return E.charAt(t) } function intAt(t, e) { var r = P[t.charCodeAt(e)]; return null == r ? -1 : r } function nbv(t) { var e = nbi(); return e.fromInt(t), e } function nbits(t) { var e, r = 1; return 0 != (e = t >>> 16) && (t = e, r += 16), 0 != (e = t >> 8) && (t = e, r += 8), 0 != (e = t >> 4) && (t = e, r += 4), 0 != (e = t >> 2) && (t = e, r += 2), 0 != (e = t >> 1) && (t = e, r += 1), r } function Classic(t) { this.m = t } function Montgomery(t) { this.m = t, this.mp = t.invDigit(), this.mpl = 32767 & this.mp, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t } function op_and(t, e) { return t & e } function op_or(t, e) { return t | e } function op_xor(t, e) { return t ^ e } function op_andnot(t, e) { return t & ~e } function lbit(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 cbit(t) { for (var e = 0; 0 != t;)t &= t - 1, ++e; return e } function NullExp() { } function nNop(t) { return t } function Barrett(t) { this.r2 = nbi(), this.q3 = nbi(), BigInteger.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t), this.m = t } Classic.prototype.convert = function cConvert(t) { return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t }, Classic.prototype.revert = function cRevert(t) { return t }, Classic.prototype.reduce = function cReduce(t) { t.divRemTo(this.m, null, t) }, Classic.prototype.mulTo = function cMulTo(t, e, r) { t.multiplyTo(e, r), this.reduce(r) }, Classic.prototype.sqrTo = function cSqrTo(t, e) { t.squareTo(e), this.reduce(e) }, Montgomery.prototype.convert = function montConvert(t) { var e = nbi(); return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(BigInteger.ZERO) > 0 && this.m.subTo(e, e), e }, Montgomery.prototype.revert = function montRevert(t) { var e = nbi(); return t.copyTo(e), this.reduce(e), e }, Montgomery.prototype.reduce = function montReduce(t) { for (; t.t <= this.mt2;)t[t.t++] = 0; for (var e = 0; e < this.m.t; ++e) { var r = 32767 & t[e], n = r * this.mpl + ((r * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM; for (t[r = e + this.m.t] += this.m.am(0, n, t, e, 0, this.m.t); t[r] >= t.DV;)t[r] -= t.DV, t[++r]++ } t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t) }, Montgomery.prototype.mulTo = function montMulTo(t, e, r) { t.multiplyTo(e, r), this.reduce(r) }, Montgomery.prototype.sqrTo = function montSqrTo(t, e) { t.squareTo(e), this.reduce(e) }, BigInteger.prototype.copyTo = function bnpCopyTo(t) { for (var e = this.t - 1; e >= 0; --e)t[e] = this[e]; t.t = this.t, t.s = this.s }, BigInteger.prototype.fromInt = function bnpFromInt(t) { this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0 }, BigInteger.prototype.fromString = function bnpFromString(t, e) { var r; if (16 == e) r = 4; else if (8 == e) r = 3; else if (256 == e) r = 8; else if (2 == e) r = 1; else if (32 == e) r = 5; else { if (4 != e) return void this.fromRadix(t, e); r = 2 } this.t = 0, this.s = 0; for (var n = t.length, i = !1, o = 0; --n >= 0;) { var s = 8 == r ? 255 & t[n] : intAt(t, n); s < 0 ? "-" == t.charAt(n) && (i = !0) : (i = !1, 0 == o ? this[this.t++] = s : o + r > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - o) - 1) << o, this[this.t++] = s >> this.DB - o) : this[this.t - 1] |= s << o, (o += r) >= this.DB && (o -= this.DB)) } 8 == r && 0 != (128 & t[0]) && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), i && BigInteger.ZERO.subTo(this, this) }, BigInteger.prototype.clamp = function bnpClamp() { for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;)--this.t }, BigInteger.prototype.dlShiftTo = function bnpDLShiftTo(t, e) { var r; for (r = this.t - 1; r >= 0; --r)e[r + t] = this[r]; for (r = t - 1; r >= 0; --r)e[r] = 0; e.t = this.t + t, e.s = this.s }, BigInteger.prototype.drShiftTo = function bnpDRShiftTo(t, e) { for (var r = t; r < this.t; ++r)e[r - t] = this[r]; e.t = Math.max(this.t - t, 0), e.s = this.s }, BigInteger.prototype.lShiftTo = function bnpLShiftTo(t, e) { var r, n = t % this.DB, i = this.DB - n, o = (1 << i) - 1, s = Math.floor(t / this.DB), a = this.s << n & this.DM; for (r = this.t - 1; r >= 0; --r)e[r + s + 1] = this[r] >> i | a, a = (this[r] & o) << n; for (r = s - 1; r >= 0; --r)e[r] = 0; e[s] = a, e.t = this.t + s + 1, e.s = this.s, e.clamp() }, BigInteger.prototype.rShiftTo = function bnpRShiftTo(t, e) { e.s = this.s; var r = Math.floor(t / this.DB); if (r >= this.t) e.t = 0; else { var n = t % this.DB, i = this.DB - n, o = (1 << n) - 1; e[0] = this[r] >> n; for (var s = r + 1; s < this.t; ++s)e[s - r - 1] |= (this[s] & o) << i, e[s - r] = this[s] >> n; n > 0 && (e[this.t - r - 1] |= (this.s & o) << i), e.t = this.t - r, e.clamp() } }, BigInteger.prototype.subTo = function bnpSubTo(t, e) { for (var r = 0, n = 0, i = Math.min(t.t, this.t); r < i;)n += this[r] - t[r], e[r++] = n & this.DM, n >>= this.DB; if (t.t < this.t) { for (n -= t.s; r < this.t;)n += this[r], e[r++] = n & this.DM, n >>= this.DB; n += this.s } else { for (n += this.s; r < t.t;)n -= t[r], e[r++] = n & this.DM, n >>= this.DB; n -= t.s } e.s = n < 0 ? -1 : 0, n < -1 ? e[r++] = this.DV + n : n > 0 && (e[r++] = n), e.t = r, e.clamp() }, BigInteger.prototype.multiplyTo = function bnpMultiplyTo(t, e) { var r = this.abs(), n = t.abs(), i = r.t; for (e.t = i + n.t; --i >= 0;)e[i] = 0; for (i = 0; i < n.t; ++i)e[i + r.t] = r.am(0, n[i], e, i, 0, r.t); e.s = 0, e.clamp(), this.s != t.s && BigInteger.ZERO.subTo(e, e) }, BigInteger.prototype.squareTo = function bnpSquareTo(t) { for (var e = this.abs(), r = t.t = 2 * e.t; --r >= 0;)t[r] = 0; for (r = 0; r < e.t - 1; ++r) { var n = e.am(r, e[r], t, 2 * r, 0, 1); (t[r + e.t] += e.am(r + 1, 2 * e[r], t, 2 * r + 1, n, e.t - r - 1)) >= e.DV && (t[r + e.t] -= e.DV, t[r + e.t + 1] = 1) } t.t > 0 && (t[t.t - 1] += e.am(r, e[r], t, 2 * r, 0, 1)), t.s = 0, t.clamp() }, BigInteger.prototype.divRemTo = function bnpDivRemTo(t, e, r) { var n = t.abs(); if (!(n.t <= 0)) { var i = this.abs(); if (i.t < n.t) return null != e && e.fromInt(0), void (null != r && this.copyTo(r)); null == r && (r = nbi()); var o = nbi(), s = this.s, a = t.s, u = this.DB - nbits(n[n.t - 1]); u > 0 ? (n.lShiftTo(u, o), i.lShiftTo(u, r)) : (n.copyTo(o), i.copyTo(r)); var c = o.t, f = o[c - 1]; if (0 != f) { var h = f * (1 << this.F1) + (c > 1 ? o[c - 2] >> this.F2 : 0), l = this.FV / h, p = (1 << this.F1) / h, g = 1 << this.F2, d = r.t, v = d - c, y = null == e ? nbi() : e; for (o.dlShiftTo(v, y), r.compareTo(y) >= 0 && (r[r.t++] = 1, r.subTo(y, r)), BigInteger.ONE.dlShiftTo(c, y), y.subTo(o, o); o.t < c;)o[o.t++] = 0; for (; --v >= 0;) { var m = r[--d] == f ? this.DM : Math.floor(r[d] * l + (r[d - 1] + g) * p); if ((r[d] += o.am(0, m, r, v, 0, c)) < m) for (o.dlShiftTo(v, y), r.subTo(y, r); r[d] < --m;)r.subTo(y, r) } null != e && (r.drShiftTo(c, e), s != a && BigInteger.ZERO.subTo(e, e)), r.t = c, r.clamp(), u > 0 && r.rShiftTo(u, r), s < 0 && BigInteger.ZERO.subTo(r, r) } } }, BigInteger.prototype.invDigit = function bnpInvDigit() { if (this.t < 1) return 0; var t = this[0]; if (0 == (1 & t)) return 0; var e = 3 & t; return (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) > 0 ? this.DV - e : -e }, BigInteger.prototype.isEven = function bnpIsEven() { return 0 == (this.t > 0 ? 1 & this[0] : this.s) }, BigInteger.prototype.exp = function bnpExp(t, e) { if (t > 4294967295 || t < 1) return BigInteger.ONE; var r = nbi(), n = nbi(), i = e.convert(this), o = nbits(t) - 1; for (i.copyTo(r); --o >= 0;)if (e.sqrTo(r, n), (t & 1 << o) > 0) e.mulTo(n, i, r); else { var s = r; r = n, n = s } return e.revert(r) }, BigInteger.prototype.toString = function bnToString(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 r, n = (1 << e) - 1, i = !1, o = "", s = this.t, a = this.DB - s * this.DB % e; if (s-- > 0) for (a < this.DB && (r = this[s] >> a) > 0 && (i = !0, o = int2char(r)); s >= 0;)a < e ? (r = (this[s] & (1 << a) - 1) << e - a, r |= this[--s] >> (a += this.DB - e)) : (r = this[s] >> (a -= e) & n, a <= 0 && (a += this.DB, --s)), r > 0 && (i = !0), i && (o += int2char(r)); return i ? o : "0" }, BigInteger.prototype.negate = function bnNegate() { var t = nbi(); return BigInteger.ZERO.subTo(this, t), t }, BigInteger.prototype.abs = function bnAbs() { return this.s < 0 ? this.negate() : this }, BigInteger.prototype.compareTo = function bnCompareTo(t) { var e = this.s - t.s; if (0 != e) return e; var r = this.t; if (0 != (e = r - t.t)) return this.s < 0 ? -e : e; for (; --r >= 0;)if (0 != (e = this[r] - t[r])) return e; return 0 }, BigInteger.prototype.bitLength = function bnBitLength() { return this.t <= 0 ? 0 : this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM) }, BigInteger.prototype.mod = function bnMod(t) { var e = nbi(); return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(BigInteger.ZERO) > 0 && t.subTo(e, e), e }, BigInteger.prototype.modPowInt = function bnModPowInt(t, e) { var r; return r = t < 256 || e.isEven() ? new Classic(e) : new Montgomery(e), this.exp(t, r) }, BigInteger.ZERO = nbv(0), BigInteger.ONE = nbv(1), NullExp.prototype.convert = nNop, NullExp.prototype.revert = nNop, NullExp.prototype.mulTo = function nMulTo(t, e, r) { t.multiplyTo(e, r) }, NullExp.prototype.sqrTo = function nSqrTo(t, e) { t.squareTo(e) }, Barrett.prototype.convert = function barrettConvert(t) { if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m); if (t.compareTo(this.m) < 0) return t; var e = nbi(); return t.copyTo(e), this.reduce(e), e }, Barrett.prototype.revert = function barrettRevert(t) { return t }, Barrett.prototype.reduce = function barrettReduce(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) }, Barrett.prototype.mulTo = function barrettMulTo(t, e, r) { t.multiplyTo(e, r), this.reduce(r) }, Barrett.prototype.sqrTo = function barrettSqrTo(t, e) { t.squareTo(e), this.reduce(e) }; var I = [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], C = (1 << 26) / I[I.length - 1];
    /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
     */
    function Arcfour() { this.i = 0, this.j = 0, this.S = new Array } BigInteger.prototype.chunkSize = function bnpChunkSize(t) { return Math.floor(Math.LN2 * this.DB / Math.log(t)) }, BigInteger.prototype.toRadix = function bnpToRadix(t) { if (null == t && (t = 10), 0 == this.signum() || t < 2 || t > 36) return "0"; var e = this.chunkSize(t), r = Math.pow(t, e), n = nbv(r), i = nbi(), o = nbi(), s = ""; for (this.divRemTo(n, i, o); i.signum() > 0;)s = (r + o.intValue()).toString(t).substr(1) + s, i.divRemTo(n, i, o); return o.intValue().toString(t) + s }, BigInteger.prototype.fromRadix = function bnpFromRadix(t, e) { this.fromInt(0), null == e && (e = 10); for (var r = this.chunkSize(e), n = Math.pow(e, r), i = !1, o = 0, s = 0, a = 0; a < t.length; ++a) { var u = intAt(t, a); u < 0 ? "-" == t.charAt(a) && 0 == this.signum() && (i = !0) : (s = e * s + u, ++o >= r && (this.dMultiply(n), this.dAddOffset(s, 0), o = 0, s = 0)) } o > 0 && (this.dMultiply(Math.pow(e, o)), this.dAddOffset(s, 0)), i && BigInteger.ZERO.subTo(this, this) }, BigInteger.prototype.fromNumber = function bnpFromNumber(t, e, r) { if ("number" == typeof e) if (t < 2) this.fromInt(1); else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(BigInteger.ONE.shiftLeft(t - 1), op_or, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e);)this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(BigInteger.ONE.shiftLeft(t - 1), this); else { var n = new Array, i = 7 & t; n.length = 1 + (t >> 3), e.nextBytes(n), i > 0 ? n[0] &= (1 << i) - 1 : n[0] = 0, this.fromString(n, 256) } }, BigInteger.prototype.bitwiseTo = function bnpBitwiseTo(t, e, r) { var n, i, o = Math.min(t.t, this.t); for (n = 0; n < o; ++n)r[n] = e(this[n], t[n]); if (t.t < this.t) { for (i = t.s & this.DM, n = o; n < this.t; ++n)r[n] = e(this[n], i); r.t = this.t } else { for (i = this.s & this.DM, n = o; n < t.t; ++n)r[n] = e(i, t[n]); r.t = t.t } r.s = e(this.s, t.s), r.clamp() }, BigInteger.prototype.changeBit = function bnpChangeBit(t, e) { var r = BigInteger.ONE.shiftLeft(t); return this.bitwiseTo(r, e, r), r }, BigInteger.prototype.addTo = function bnpAddTo(t, e) { for (var r = 0, n = 0, i = Math.min(t.t, this.t); r < i;)n += this[r] + t[r], e[r++] = n & this.DM, n >>= this.DB; if (t.t < this.t) { for (n += t.s; r < this.t;)n += this[r], e[r++] = n & this.DM, n >>= this.DB; n += this.s } else { for (n += this.s; r < t.t;)n += t[r], e[r++] = n & this.DM, n >>= this.DB; n += t.s } e.s = n < 0 ? -1 : 0, n > 0 ? e[r++] = n : n < -1 && (e[r++] = this.DV + n), e.t = r, e.clamp() }, BigInteger.prototype.dMultiply = function bnpDMultiply(t) { this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp() }, BigInteger.prototype.dAddOffset = function bnpDAddOffset(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] } }, BigInteger.prototype.multiplyLowerTo = function bnpMultiplyLowerTo(t, e, r) { var n, i = Math.min(this.t + t.t, e); for (r.s = 0, r.t = i; i > 0;)r[--i] = 0; for (n = r.t - this.t; i < n; ++i)r[i + this.t] = this.am(0, t[i], r, i, 0, this.t); for (n = Math.min(t.t, e); i < n; ++i)this.am(0, t[i], r, i, 0, e - i); r.clamp() }, BigInteger.prototype.multiplyUpperTo = function bnpMultiplyUpperTo(t, e, r) { --e; var n = r.t = this.t + t.t - e; for (r.s = 0; --n >= 0;)r[n] = 0; for (n = Math.max(e - this.t, 0); n < t.t; ++n)r[this.t + n - e] = this.am(e - n, t[n], r, 0, 0, this.t + n - e); r.clamp(), r.drShiftTo(1, r) }, BigInteger.prototype.modInt = function bnpModInt(t) { if (t <= 0) return 0; var e = this.DV % t, r = this.s < 0 ? t - 1 : 0; if (this.t > 0) if (0 == e) r = this[0] % t; else for (var n = this.t - 1; n >= 0; --n)r = (e * r + this[n]) % t; return r }, BigInteger.prototype.millerRabin = function bnpMillerRabin(t) { var e = this.subtract(BigInteger.ONE), r = e.getLowestSetBit(); if (r <= 0) return !1; var n = e.shiftRight(r); (t = t + 1 >> 1) > I.length && (t = I.length); for (var i = nbi(), o = 0; o < t; ++o) { i.fromInt(I[Math.floor(Math.random() * I.length)]); var s = i.modPow(n, this); if (0 != s.compareTo(BigInteger.ONE) && 0 != s.compareTo(e)) { for (var a = 1; a++ < r && 0 != s.compareTo(e);)if (0 == (s = s.modPowInt(2, this)).compareTo(BigInteger.ONE)) return !1; if (0 != s.compareTo(e)) return !1 } } return !0 }, BigInteger.prototype.clone =
      /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
       */
      function bnClone() { var t = nbi(); return this.copyTo(t), t }, BigInteger.prototype.intValue = function bnIntValue() { 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) << this.DB | this[0] }, BigInteger.prototype.byteValue = function bnByteValue() { return 0 == this.t ? this.s : this[0] << 24 >> 24 }, BigInteger.prototype.shortValue = function bnShortValue() { return 0 == this.t ? this.s : this[0] << 16 >> 16 }, BigInteger.prototype.signum = function bnSigNum() { return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1 }, BigInteger.prototype.toByteArray = function bnToByteArray() { var t = this.t, e = new Array; e[0] = this.s; var r, n = this.DB - t * this.DB % 8, i = 0; if (t-- > 0) for (n < this.DB && (r = this[t] >> n) != (this.s & this.DM) >> n && (e[i++] = r | this.s << this.DB - n); t >= 0;)n < 8 ? (r = (this[t] & (1 << n) - 1) << 8 - n, r |= this[--t] >> (n += this.DB - 8)) : (r = this[t] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --t)), 0 != (128 & r) && (r |= -256), 0 == i && (128 & this.s) != (128 & r) && ++i, (i > 0 || r != this.s) && (e[i++] = r); return e }, BigInteger.prototype.equals = function bnEquals(t) { return 0 == this.compareTo(t) }, BigInteger.prototype.min = function bnMin(t) { return this.compareTo(t) < 0 ? this : t }, BigInteger.prototype.max = function bnMax(t) { return this.compareTo(t) > 0 ? this : t }, BigInteger.prototype.and = function bnAnd(t) { var e = nbi(); return this.bitwiseTo(t, op_and, e), e }, BigInteger.prototype.or = function bnOr(t) { var e = nbi(); return this.bitwiseTo(t, op_or, e), e }, BigInteger.prototype.xor = function bnXor(t) { var e = nbi(); return this.bitwiseTo(t, op_xor, e), e }, BigInteger.prototype.andNot = function bnAndNot(t) { var e = nbi(); return this.bitwiseTo(t, op_andnot, e), e }, BigInteger.prototype.not = function bnNot() { for (var t = nbi(), e = 0; e < this.t; ++e)t[e] = this.DM & ~this[e]; return t.t = this.t, t.s = ~this.s, t }, BigInteger.prototype.shiftLeft = function bnShiftLeft(t) { var e = nbi(); return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e }, BigInteger.prototype.shiftRight = function bnShiftRight(t) { var e = nbi(); return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e }, BigInteger.prototype.getLowestSetBit = function bnGetLowestSetBit() { for (var t = 0; t < this.t; ++t)if (0 != this[t]) return t * this.DB + lbit(this[t]); return this.s < 0 ? this.t * this.DB : -1 }, BigInteger.prototype.bitCount = function bnBitCount() { for (var t = 0, e = this.s & this.DM, r = 0; r < this.t; ++r)t += cbit(this[r] ^ e); return t }, BigInteger.prototype.testBit = function bnTestBit(t) { var e = Math.floor(t / this.DB); return e >= this.t ? 0 != this.s : 0 != (this[e] & 1 << t % this.DB) }, BigInteger.prototype.setBit = function bnSetBit(t) { return this.changeBit(t, op_or) }, BigInteger.prototype.clearBit = function bnClearBit(t) { return this.changeBit(t, op_andnot) }, BigInteger.prototype.flipBit = function bnFlipBit(t) { return this.changeBit(t, op_xor) }, BigInteger.prototype.add = function bnAdd(t) { var e = nbi(); return this.addTo(t, e), e }, BigInteger.prototype.subtract = function bnSubtract(t) { var e = nbi(); return this.subTo(t, e), e }, BigInteger.prototype.multiply = function bnMultiply(t) { var e = nbi(); return this.multiplyTo(t, e), e }, BigInteger.prototype.divide = function bnDivide(t) { var e = nbi(); return this.divRemTo(t, e, null), e }, BigInteger.prototype.remainder = function bnRemainder(t) { var e = nbi(); return this.divRemTo(t, null, e), e }, BigInteger.prototype.divideAndRemainder = function bnDivideAndRemainder(t) { var e = nbi(), r = nbi(); return this.divRemTo(t, e, r), new Array(e, r) }, BigInteger.prototype.modPow = function bnModPow(t, e) { var r, n, i = t.bitLength(), o = nbv(1); if (i <= 0) return o; r = i < 18 ? 1 : i < 48 ? 3 : i < 144 ? 4 : i < 768 ? 5 : 6, n = i < 8 ? new Classic(e) : e.isEven() ? new Barrett(e) : new Montgomery(e); var s = new Array, a = 3, u = r - 1, c = (1 << r) - 1; if (s[1] = n.convert(this), r > 1) { var f = nbi(); for (n.sqrTo(s[1], f); a <= c;)s[a] = nbi(), n.mulTo(f, s[a - 2], s[a]), a += 2 } var h, l, p = t.t - 1, g = !0, d = nbi(); for (i = nbits(t[p]) - 1; p >= 0;) { for (i >= u ? h = t[p] >> i - u & c : (h = (t[p] & (1 << i + 1) - 1) << u - i, p > 0 && (h |= t[p - 1] >> this.DB + i - u)), a = r; 0 == (1 & h);)h >>= 1, --a; if ((i -= a) < 0 && (i += this.DB, --p), g) s[h].copyTo(o), g = !1; else { for (; a > 1;)n.sqrTo(o, d), n.sqrTo(d, o), a -= 2; a > 0 ? n.sqrTo(o, d) : (l = o, o = d, d = l), n.mulTo(d, s[h], o) } for (; p >= 0 && 0 == (t[p] & 1 << i);)n.sqrTo(o, d), l = o, o = d, d = l, --i < 0 && (i = this.DB - 1, --p) } return n.revert(o) }, BigInteger.prototype.modInverse = function bnModInverse(t) { var e = t.isEven(); if (this.isEven() && e || 0 == t.signum()) return BigInteger.ZERO; for (var r = t.clone(), n = this.clone(), i = nbv(1), o = nbv(0), s = nbv(0), a = nbv(1); 0 != r.signum();) { for (; r.isEven();)r.rShiftTo(1, r), e ? (i.isEven() && o.isEven() || (i.addTo(this, i), o.subTo(t, o)), i.rShiftTo(1, i)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o); for (; n.isEven();)n.rShiftTo(1, n), e ? (s.isEven() && a.isEven() || (s.addTo(this, s), a.subTo(t, a)), s.rShiftTo(1, s)) : a.isEven() || a.subTo(t, a), a.rShiftTo(1, a); r.compareTo(n) >= 0 ? (r.subTo(n, r), e && i.subTo(s, i), o.subTo(a, o)) : (n.subTo(r, n), e && s.subTo(i, s), a.subTo(o, a)) } return 0 != n.compareTo(BigInteger.ONE) ? BigInteger.ZERO : a.compareTo(t) >= 0 ? a.subtract(t) : a.signum() < 0 ? (a.addTo(t, a), a.signum() < 0 ? a.add(t) : a) : a }, BigInteger.prototype.pow = function bnPow(t) { return this.exp(t, new NullExp) }, BigInteger.prototype.gcd = function bnGCD(t) { var e = this.s < 0 ? this.negate() : this.clone(), r = t.s < 0 ? t.negate() : t.clone(); if (e.compareTo(r) < 0) { var n = e; e = r, r = n } var i = e.getLowestSetBit(), o = r.getLowestSetBit(); if (o < 0) return e; for (i < o && (o = i), o > 0 && (e.rShiftTo(o, e), r.rShiftTo(o, r)); e.signum() > 0;)(i = e.getLowestSetBit()) > 0 && e.rShiftTo(i, e), (i = r.getLowestSetBit()) > 0 && r.rShiftTo(i, r), e.compareTo(r) >= 0 ? (e.subTo(r, e), e.rShiftTo(1, e)) : (r.subTo(e, r), r.rShiftTo(1, r)); return o > 0 && r.lShiftTo(o, r), r }, BigInteger.prototype.isProbablePrime = function bnIsProbablePrime(t) { var e, r = this.abs(); if (1 == r.t && r[0] <= I[I.length - 1]) { for (e = 0; e < I.length; ++e)if (r[0] == I[e]) return !0; return !1 } if (r.isEven()) return !1; for (e = 1; e < I.length;) { for (var n = I[e], i = e + 1; i < I.length && n < C;)n *= I[i++]; for (n = r.modInt(n); e < i;)if (n % I[e++] == 0) return !1 } return r.millerRabin(t) }, BigInteger.prototype.square = function bnSquare() { var t = nbi(); return this.squareTo(t), t }, Arcfour.prototype.init = function ARC4init(t) { var e, r, n; for (e = 0; e < 256; ++e)this.S[e] = e; for (r = 0, e = 0; e < 256; ++e)r = r + this.S[e] + t[e % t.length] & 255, n = this.S[e], this.S[e] = this.S[r], this.S[r] = n; this.i = 0, this.j = 0 }, Arcfour.prototype.next = function ARC4next() { 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] }; var R, T, M, O = 256;
/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
 */function rng_seed_time() { !function rng_seed_int(t) { T[M++] ^= 255 & t, T[M++] ^= t >> 8 & 255, T[M++] ^= t >> 16 & 255, T[M++] ^= t >> 24 & 255, M >= O && (M -= O) }((new Date).getTime()) } if (null == T) { var U; if (T = new Array, M = 0, void 0 !== u && (void 0 !== u.crypto || void 0 !== u.msCrypto)) { var D = u.crypto || u.msCrypto; if (D.getRandomValues) { var N = new Uint8Array(32); for (D.getRandomValues(N), U = 0; U < 32; ++U)T[M++] = N[U] } else if ("Netscape" == i.appName && i.appVersion < "5") { var L = u.crypto.random(32); for (U = 0; U < L.length; ++U)T[M++] = 255 & L.charCodeAt(U) } } for (; M < O;)U = Math.floor(65536 * Math.random()), T[M++] = U >>> 8, T[M++] = 255 & U; M = 0, rng_seed_time() } function rng_get_byte() { if (null == R) { for (rng_seed_time(), (R = function prng_newstate() { return new Arcfour }()).init(T), M = 0; M < T.length; ++M)T[M] = 0; M = 0 } return R.next() } function SecureRandom() { }
    /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
     */
    function parseBigInt(t, e) { return new BigInteger(t, e) } function oaep_mgf1_arr(t, e, r) { for (var n = "", i = 0; n.length < e;)n += r(String.fromCharCode.apply(String, t.concat([(4278190080 & i) >> 24, (16711680 & i) >> 16, (65280 & i) >> 8, 255 & i]))), i += 1; return n } function RSAKey() { this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null }
    /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/
     */
    function ECFieldElementFp(t, e) { this.x = e, this.q = t } function ECPointFp(t, e, r, n) { this.curve = t, this.x = e, this.y = r, this.z = null == n ? BigInteger.ONE : n, this.zinv = null } function ECCurveFp(t, e, r) { this.q = t, this.a = this.fromBigInteger(e), this.b = this.fromBigInteger(r), this.infinity = new ECPointFp(this, null, null) } SecureRandom.prototype.nextBytes = function rng_get_bytes(t) { var e; for (e = 0; e < t.length; ++e)t[e] = rng_get_byte() }, RSAKey.prototype.doPublic = function RSADoPublic(t) { return t.modPowInt(this.e, this.n) }, RSAKey.prototype.setPublic = function RSASetPublic(t, e) { if (this.isPublic = !0, this.isPrivate = !1, "string" != typeof t) this.n = t, this.e = e; else { if (!(null != t && null != e && t.length > 0 && e.length > 0)) throw "Invalid RSA public key"; this.n = parseBigInt(t, 16), this.e = parseInt(e, 16) } }, RSAKey.prototype.encrypt = function RSAEncrypt(t) { var e = function pkcs1pad2(t, e) { if (e < t.length + 11) throw "Message too long for RSA"; for (var r = new Array, n = t.length - 1; n >= 0 && e > 0;) { var i = t.charCodeAt(n--); i < 128 ? r[--e] = i : i > 127 && i < 2048 ? (r[--e] = 63 & i | 128, r[--e] = i >> 6 | 192) : (r[--e] = 63 & i | 128, r[--e] = i >> 6 & 63 | 128, r[--e] = i >> 12 | 224) } r[--e] = 0; for (var o = new SecureRandom, s = new Array; e > 2;) { for (s[0] = 0; 0 == s[0];)o.nextBytes(s); r[--e] = s[0] } return r[--e] = 2, r[--e] = 0, new BigInteger(r) }(t, this.n.bitLength() + 7 >> 3); if (null == e) return null; var r = this.doPublic(e); if (null == r) return null; var n = r.toString(16); return 0 == (1 & n.length) ? n : "0" + n }, RSAKey.prototype.encryptOAEP = function RSAEncryptOAEP(t, e, r) { var n = function oaep_pad(t, e, r, n) { var i = K.crypto.MessageDigest, o = K.crypto.Util, s = null; if (r || (r = "sha1"), "string" == typeof r && (s = i.getCanonicalAlgName(r), n = i.getHashLength(s), r = function f(t) { return hextorstr(o.hashHex(rstrtohex(t), s)) }), t.length + 2 * n + 2 > e) throw "Message too long for RSA"; var a, u = ""; for (a = 0; a < e - t.length - 2 * n - 2; a += 1)u += "\0"; var c = r("") + u + "" + t, h = new Array(n); (new SecureRandom).nextBytes(h); var l = oaep_mgf1_arr(h, c.length, r), p = []; for (a = 0; a < c.length; a += 1)p[a] = c.charCodeAt(a) ^ l.charCodeAt(a); var g = oaep_mgf1_arr(p, h.length, r), d = [0]; for (a = 0; a < h.length; a += 1)d[a + 1] = h[a] ^ g.charCodeAt(a); return new BigInteger(d.concat(p)) }(t, this.n.bitLength() + 7 >> 3, e, r); if (null == n) return null; var i = this.doPublic(n); if (null == i) return null; var o = i.toString(16); return 0 == (1 & o.length) ? o : "0" + o }, RSAKey.prototype.type = "RSA", ECFieldElementFp.prototype.equals = function feFpEquals(t) { return t == this || this.q.equals(t.q) && this.x.equals(t.x) }, ECFieldElementFp.prototype.toBigInteger = function feFpToBigInteger() { return this.x }, ECFieldElementFp.prototype.negate = function feFpNegate() { return new ECFieldElementFp(this.q, this.x.negate().mod(this.q)) }, ECFieldElementFp.prototype.add = function feFpAdd(t) { return new ECFieldElementFp(this.q, this.x.add(t.toBigInteger()).mod(this.q)) }, ECFieldElementFp.prototype.subtract = function feFpSubtract(t) { return new ECFieldElementFp(this.q, this.x.subtract(t.toBigInteger()).mod(this.q)) }, ECFieldElementFp.prototype.multiply = function feFpMultiply(t) { return new ECFieldElementFp(this.q, this.x.multiply(t.toBigInteger()).mod(this.q)) }, ECFieldElementFp.prototype.square = function feFpSquare() { return new ECFieldElementFp(this.q, this.x.square().mod(this.q)) }, ECFieldElementFp.prototype.divide = function feFpDivide(t) { return new ECFieldElementFp(this.q, this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q)) }, ECPointFp.prototype.getX = function pointFpGetX() { 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)) }, ECPointFp.prototype.getY = function pointFpGetY() { 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)) }, ECPointFp.prototype.equals = function pointFpEquals(t) { return t == this || (this.isInfinity() ? t.isInfinity() : t.isInfinity() ? this.isInfinity() : !!t.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(BigInteger.ZERO) && t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(BigInteger.ZERO)) }, ECPointFp.prototype.isInfinity = function pointFpIsInfinity() { return null == this.x && null == this.y || this.z.equals(BigInteger.ZERO) && !this.y.toBigInteger().equals(BigInteger.ZERO) }, ECPointFp.prototype.negate = function pointFpNegate() { return new ECPointFp(this.curve, this.x, this.y.negate(), this.z) }, ECPointFp.prototype.add = function pointFpAdd(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), r = t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q); if (BigInteger.ZERO.equals(r)) return BigInteger.ZERO.equals(e) ? this.twice() : this.curve.getInfinity(); var n = new BigInteger("3"), i = this.x.toBigInteger(), o = this.y.toBigInteger(), s = (t.x.toBigInteger(), t.y.toBigInteger(), r.square()), a = s.multiply(r), u = i.multiply(s), c = e.square().multiply(this.z), f = c.subtract(u.shiftLeft(1)).multiply(t.z).subtract(a).multiply(r).mod(this.curve.q), h = u.multiply(n).multiply(e).subtract(o.multiply(a)).subtract(c.multiply(e)).multiply(t.z).add(e.multiply(a)).mod(this.curve.q), l = a.multiply(this.z).multiply(t.z).mod(this.curve.q); return new ECPointFp(this.curve, this.curve.fromBigInteger(f), this.curve.fromBigInteger(h), l) }, ECPointFp.prototype.twice = function pointFpTwice() { if (this.isInfinity()) return this; if (0 == this.y.toBigInteger().signum()) return this.curve.getInfinity(); var t = new BigInteger("3"), e = this.x.toBigInteger(), r = this.y.toBigInteger(), n = r.multiply(this.z), i = n.multiply(r).mod(this.curve.q), o = this.curve.a.toBigInteger(), s = e.square().multiply(t); BigInteger.ZERO.equals(o) || (s = s.add(this.z.square().multiply(o))); var a = (s = s.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q), u = s.multiply(t).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q), c = n.square().multiply(n).shiftLeft(3).mod(this.curve.q); return new ECPointFp(this.curve, this.curve.fromBigInteger(a), this.curve.fromBigInteger(u), c) }, ECPointFp.prototype.multiply = function pointFpMultiply(t) { if (this.isInfinity()) return this; if (0 == t.signum()) return this.curve.getInfinity(); var e, r = t, n = r.multiply(new BigInteger("3")), i = this.negate(), o = this; for (e = n.bitLength() - 2; e > 0; --e) { o = o.twice(); var s = n.testBit(e); s != r.testBit(e) && (o = o.add(s ? this : i)) } return o }, ECPointFp.prototype.multiplyTwo = function pointFpMultiplyTwo(t, e, r) { var n; n = t.bitLength() > r.bitLength() ? t.bitLength() - 1 : r.bitLength() - 1; for (var i = this.curve.getInfinity(), o = this.add(e); n >= 0;)i = i.twice(), t.testBit(n) ? i = r.testBit(n) ? i.add(o) : i.add(this) : r.testBit(n) && (i = i.add(e)), --n; return i }, ECCurveFp.prototype.getQ = function curveFpGetQ() { return this.q }, ECCurveFp.prototype.getA = function curveFpGetA() { return this.a }, ECCurveFp.prototype.getB = function curveFpGetB() { return this.b }, ECCurveFp.prototype.equals = function curveFpEquals(t) { return t == this || this.q.equals(t.q) && this.a.equals(t.a) && this.b.equals(t.b) }, ECCurveFp.prototype.getInfinity = function curveFpGetInfinity() { return this.infinity }, ECCurveFp.prototype.fromBigInteger = function curveFpFromBigInteger(t) { return new ECFieldElementFp(this.q, t) }, ECCurveFp.prototype.decodePointHex = function curveFpDecodePointHex(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, r = t.substr(2, e), n = t.substr(e + 2, e); return new ECPointFp(this, this.fromBigInteger(new BigInteger(r, 16)), this.fromBigInteger(new BigInteger(n, 16))); default: return null } },
      /*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib
       */
      ECFieldElementFp.prototype.getByteLength = function () { return Math.floor((this.toBigInteger().bitLength() + 7) / 8) }, ECPointFp.prototype.getEncoded = function (t) { var e = function d(t, e) { var r = t.toByteArrayUnsigned(); if (e < r.length) r = r.slice(r.length - e); else for (; e > r.length;)r.unshift(0); return r }, r = this.getX().toBigInteger(), n = this.getY().toBigInteger(), i = e(r, 32); return t ? n.isEven() ? i.unshift(2) : i.unshift(3) : (i.unshift(4), i = i.concat(e(n, 32))), i }, ECPointFp.decodeFrom = function (t, e) { e[0]; var r = e.length - 1, n = e.slice(1, 1 + r / 2), i = e.slice(1 + r / 2, 1 + r); n.unshift(0), i.unshift(0); var o = new BigInteger(n), s = new BigInteger(i); return new ECPointFp(t, t.fromBigInteger(o), t.fromBigInteger(s)) }, ECPointFp.decodeFromHex = function (t, e) { e.substr(0, 2); var r = e.length - 2, n = e.substr(2, r / 2), i = e.substr(2 + r / 2, r / 2), o = new BigInteger(n, 16), s = new BigInteger(i, 16); return new ECPointFp(t, t.fromBigInteger(o), t.fromBigInteger(s)) }, ECPointFp.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), r = t.y.subtract(this.y).divide(e), n = r.square().subtract(this.x).subtract(t.x), i = r.multiply(this.x.subtract(n)).subtract(this.y); return new ECPointFp(this.curve, n, i) }, ECPointFp.prototype.twice2D = function () { if (this.isInfinity()) return this; if (0 == this.y.toBigInteger().signum()) return this.curve.getInfinity(); var t = this.curve.fromBigInteger(BigInteger.valueOf(2)), e = this.curve.fromBigInteger(BigInteger.valueOf(3)), r = this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)), n = r.square().subtract(this.x.multiply(t)), i = r.multiply(this.x.subtract(n)).subtract(this.y); return new ECPointFp(this.curve, n, i) }, ECPointFp.prototype.multiply2D = function (t) { if (this.isInfinity()) return this; if (0 == t.signum()) return this.curve.getInfinity(); var e, r = t, n = r.multiply(new BigInteger("3")), i = this.negate(), o = this; for (e = n.bitLength() - 2; e > 0; --e) { o = o.twice(); var s = n.testBit(e); s != r.testBit(e) && (o = o.add2D(s ? this : i)) } return o }, ECPointFp.prototype.isOnCurve = function () { var t = this.getX().toBigInteger(), e = this.getY().toBigInteger(), r = this.curve.getA().toBigInteger(), n = this.curve.getB().toBigInteger(), i = this.curve.getQ(), o = e.multiply(e).mod(i), s = t.multiply(t).multiply(t).add(r.multiply(t)).add(n).mod(i); return o.equals(s) }, ECPointFp.prototype.toString = function () { return "(" + this.getX().toBigInteger().toString() + "," + this.getY().toBigInteger().toString() + ")" }, ECPointFp.prototype.validate = function () { var t = this.curve.getQ(); if (this.isInfinity()) throw new Error("Point is at infinity."); var e = this.getX().toBigInteger(), r = this.getY().toBigInteger(); if (e.compareTo(BigInteger.ONE) < 0 || e.compareTo(t.subtract(BigInteger.ONE)) > 0) throw new Error("x coordinate out of bounds"); if (r.compareTo(BigInteger.ONE) < 0 || r.compareTo(t.subtract(BigInteger.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 };
    /*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval
     */
    var H = function () { var t = new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))', "g"), e = new RegExp("\\\\(?:([^u])|u(.{4}))", "g"), r = { '"': '"', "/": "/", "\\": "\\", b: "\b", f: "\f", n: "\n", r: "\r", t: "\t" }; function h(t, e, n) { return e ? r[e] : String.fromCharCode(parseInt(n, 16)) } var i = new String(""), o = (Object, Array, Object.hasOwnProperty); return function (r, a) { var u, c, f = r.match(t), l = f[0], p = !1; "{" === l ? u = {} : "[" === l ? u = [] : (u = [], p = !0); for (var g = [u], d = 1 - p, v = f.length; d < v; ++d) { var y; switch ((l = f[d]).charCodeAt(0)) { default: (y = g[0])[c || y.length] = +l, c = void 0; break; case 34: if (-1 !== (l = l.substring(1, l.length - 1)).indexOf("\\") && (l = l.replace(e, h)), y = g[0], !c) { if (!(y instanceof Array)) { c = l || i; break } c = y.length } y[c] = l, c = void 0; break; case 91: y = g[0], g.unshift(y[c || y.length] = []), c = void 0; break; case 93: g.shift(); break; case 102: (y = g[0])[c || y.length] = !1, c = void 0; break; case 110: (y = g[0])[c || y.length] = null, c = void 0; break; case 116: (y = g[0])[c || y.length] = !0, c = void 0; break; case 123: y = g[0], g.unshift(y[c || y.length] = {}), c = void 0; break; case 125: g.shift() } } if (p) { if (1 !== g.length) throw new Error; u = u[0] } else if (g.length) throw new Error; if (a) { u = function s(t, e) { var r = t[e]; if (r && "object" === (void 0 === r ? "undefined" : n(r))) { var i = null; for (var u in r) if (o.call(r, u) && r !== t) { var c = s(r, u); void 0 !== c ? r[u] = c : (i || (i = []), i.push(u)) } if (i) for (var f = i.length; --f >= 0;)delete r[i[f]] } return a.call(t, e, r) }({ "": u }, "") } return u } }(); void 0 !== K && K || (K = {}), void 0 !== K.asn1 && K.asn1 || (K.asn1 = {}), K.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 r = e.substr(1).length; r % 2 == 1 ? r += 1 : e.match(/^[0-7]/) || (r += 2); for (var n = "", i = 0; i < r; i++)n += "f"; e = new BigInteger(n, 16).xor(t).add(BigInteger.ONE).toString(16).replace(/^-/, "") } return e }, this.getPEMStringFromHex = function (t, e) { return hextopem(t, e) }, this.newObject = function (t) { var e = K.asn1, r = e.DERBoolean, n = e.DERInteger, i = e.DERBitString, o = e.DEROctetString, s = e.DERNull, a = e.DERObjectIdentifier, u = e.DEREnumerated, c = e.DERUTF8String, f = e.DERNumericString, h = e.DERPrintableString, l = e.DERTeletexString, p = e.DERIA5String, g = e.DERUTCTime, d = e.DERGeneralizedTime, v = e.DERSequence, y = e.DERSet, m = e.DERTaggedObject, S = e.ASN1Util.newObject, _ = Object.keys(t); if (1 != _.length) throw "key of param shall be only one."; var b = _[0]; if (-1 == ":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + b + ":")) throw "undefined key: " + b; if ("bool" == b) return new r(t[b]); if ("int" == b) return new n(t[b]); if ("bitstr" == b) return new i(t[b]); if ("octstr" == b) return new o(t[b]); if ("null" == b) return new s(t[b]); if ("oid" == b) return new a(t[b]); if ("enum" == b) return new u(t[b]); if ("utf8str" == b) return new c(t[b]); if ("numstr" == b) return new f(t[b]); if ("prnstr" == b) return new h(t[b]); if ("telstr" == b) return new l(t[b]); if ("ia5str" == b) return new p(t[b]); if ("utctime" == b) return new g(t[b]); if ("gentime" == b) return new d(t[b]); if ("seq" == b) { for (var F = t[b], w = [], E = 0; E < F.length; E++) { var x = S(F[E]); w.push(x) } return new v({ array: w }) } if ("set" == b) { for (F = t[b], w = [], E = 0; E < F.length; E++) { x = S(F[E]); w.push(x) } return new y({ array: w }) } if ("tag" == b) { var A = t[b]; if ("[object Array]" === Object.prototype.toString.call(A) && 3 == A.length) { var P = S(A[2]); return new m({ tag: A[0], explicit: A[1], obj: P }) } var k = {}; if (void 0 !== A.explicit && (k.explicit = A.explicit), void 0 !== A.tag && (k.tag = A.tag), void 0 === A.obj) throw "obj shall be specified for 'tag'."; return k.obj = S(A.obj), new m(k) } }, this.jsonToASN1HEX = function (t) { return this.newObject(t).getEncodedHex() } }, K.asn1.ASN1Util.oidHexToInt = function (t) { for (var e = "", r = parseInt(t.substr(0, 2), 16), n = (e = Math.floor(r / 40) + "." + r % 40, ""), i = 2; i < t.length; i += 2) { var o = ("00000000" + parseInt(t.substr(i, 2), 16).toString(2)).slice(-8); if (n += o.substr(1, 7), "0" == o.substr(0, 1)) e = e + "." + new BigInteger(n, 2).toString(10), n = "" } return e }, K.asn1.ASN1Util.oidIntToHex = function (t) { var e = function e(t) { var r = t.toString(16); return 1 == r.length && (r = "0" + r), r }, r = function d(t) { var r = "", n = new BigInteger(t, 10).toString(2), i = 7 - n.length % 7; 7 == i && (i = 0); for (var o = "", s = 0; s < i; s++)o += "0"; n = o + n; for (s = 0; s < n.length - 1; s += 7) { var a = n.substr(s, 7); s != n.length - 7 && (a = "1" + a), r += e(parseInt(a, 2)) } return r }; if (!t.match(/^[0-9.]+$/)) throw "malformed oid string: " + t; var n = "", i = t.split("."), o = 40 * parseInt(i[0]) + parseInt(i[1]); n += e(o), i.splice(0, 2); for (var s = 0; s < i.length; s++)n += r(i[s]); return n }, K.asn1.ASN1Object = function () { this.getLengthHexFromValue = function () { if (void 0 === this.hV || null == this.hV) throw "this.hV is null or undefined."; if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + "".length + ",v=" + this.hV; var t = this.hV.length / 2, e = t.toString(16); if (e.length % 2 == 1 && (e = "0" + e), t < 128) return e; var r = e.length / 2; if (r > 15) throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16); return (128 + r).toString(16) + e }, 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 "" } }, K.asn1.DERAbstractString = function (t) { K.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 = utf8tohex(this.s).toLowerCase() }, this.setStringHex = function (t) { this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && ("string" == typeof t ? this.setString(t) : void 0 !== t.str ? this.setString(t.str) : void 0 !== t.hex && this.setStringHex(t.hex)) }, p.lang.extend(K.asn1.DERAbstractString, K.asn1.ASN1Object), K.asn1.DERAbstractTime = function (t) { K.asn1.DERAbstractTime.superclass.constructor.call(this); this.localDateToUTC = function (t) { return utc = t.getTime() + 6e4 * t.getTimezoneOffset(), new Date(utc) }, this.formatDate = function (t, e, r) { var n = this.zeroPadding, i = this.localDateToUTC(t), o = String(i.getFullYear()); "utc" == e && (o = o.substr(2, 2)); var s = o + n(String(i.getMonth() + 1), 2) + n(String(i.getDate()), 2) + n(String(i.getHours()), 2) + n(String(i.getMinutes()), 2) + n(String(i.getSeconds()), 2); if (!0 === r) { var a = i.getMilliseconds(); if (0 != a) { var u = n(String(a), 3); s = s + "." + (u = u.replace(/[0]+$/, "")) } } return s + "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 = stohex(t) }, this.setByDateValue = function (t, e, r, n, i, o) { var s = new Date(Date.UTC(t, e - 1, r, n, i, o, 0)); this.setByDate(s) }, this.getFreshValueHex = function () { return this.hV } }, p.lang.extend(K.asn1.DERAbstractTime, K.asn1.ASN1Object), K.asn1.DERAbstractStructured = function (t) { K.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, void 0 !== t && void 0 !== t.array && (this.asn1Array = t.array) }, p.lang.extend(K.asn1.DERAbstractStructured, K.asn1.ASN1Object), K.asn1.DERBoolean = function () { K.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff" }, p.lang.extend(K.asn1.DERBoolean, K.asn1.ASN1Object), K.asn1.DERInteger = function (t) { K.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function (t) { this.hTLV = null, this.isModified = !0, this.hV = K.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t) }, this.setByInteger = function (t) { var e = new BigInteger(String(t), 10); this.setByBigInteger(e) }, this.setValueHex = function (t) { this.hV = t }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && (void 0 !== t.bigint ? this.setByBigInteger(t.bigint) : void 0 !== t.int ? this.setByInteger(t.int) : "number" == typeof t ? this.setByInteger(t) : void 0 !== t.hex && this.setValueHex(t.hex)) }, p.lang.extend(K.asn1.DERInteger, K.asn1.ASN1Object), K.asn1.DERBitString = function (t) { if (void 0 !== t && void 0 !== t.obj) { var e = K.asn1.ASN1Util.newObject(t.obj); t.hex = "00" + e.getEncodedHex() } K.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 (t < 0 || 7 < t) throw "unused bits shall be from 0 to 7: u = " + t; var r = "0" + t; this.hTLV = null, this.isModified = !0, this.hV = r + e }, this.setByBinaryString = function (t) { var e = 8 - (t = t.replace(/0+$/, "")).length % 8; 8 == e && (e = 0); for (var r = 0; r <= e; r++)t += "0"; var n = ""; for (r = 0; r < t.length - 1; r += 8) { var i = t.substr(r, 8), o = parseInt(i, 2).toString(16); 1 == o.length && (o = "0" + o), n += o } this.hTLV = null, this.isModified = !0, this.hV = "0" + e + n }, this.setByBooleanArray = function (t) { for (var e = "", r = 0; r < t.length; r++)1 == t[r] ? e += "1" : e += "0"; this.setByBinaryString(e) }, this.newFalseArray = function (t) { for (var e = new Array(t), r = 0; r < t; r++)e[r] = !1; return e }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && ("string" == typeof t && t.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(t) : void 0 !== t.hex ? this.setHexValueIncludingUnusedBits(t.hex) : void 0 !== t.bin ? this.setByBinaryString(t.bin) : void 0 !== t.array && this.setByBooleanArray(t.array)) }, p.lang.extend(K.asn1.DERBitString, K.asn1.ASN1Object), K.asn1.DEROctetString = function (t) { if (void 0 !== t && void 0 !== t.obj) { var e = K.asn1.ASN1Util.newObject(t.obj); t.hex = e.getEncodedHex() } K.asn1.DEROctetString.superclass.constructor.call(this, t), this.hT = "04" }, p.lang.extend(K.asn1.DEROctetString, K.asn1.DERAbstractString), K.asn1.DERNull = function () { K.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500" }, p.lang.extend(K.asn1.DERNull, K.asn1.ASN1Object), K.asn1.DERObjectIdentifier = function (t) { var e = function b(t) { var e = t.toString(16); return 1 == e.length && (e = "0" + e), e }, r = function a(t) { var r = "", n = new BigInteger(t, 10).toString(2), i = 7 - n.length % 7; 7 == i && (i = 0); for (var o = "", s = 0; s < i; s++)o += "0"; n = o + n; for (s = 0; s < n.length - 1; s += 7) { var u = n.substr(s, 7); s != n.length - 7 && (u = "1" + u), r += e(parseInt(u, 2)) } return r }; K.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function (t) { this.hTLV = null, this.isModified = !0, this.s = null, this.hV = t }, this.setValueOidString = function (t) { if (!t.match(/^[0-9.]+$/)) throw "malformed oid string: " + t; var n = "", i = t.split("."), o = 40 * parseInt(i[0]) + parseInt(i[1]); n += e(o), i.splice(0, 2); for (var s = 0; s < i.length; s++)n += r(i[s]); this.hTLV = null, this.isModified = !0, this.s = null, this.hV = n }, this.setValueName = function (t) { var e = K.asn1.x509.OID.name2oid(t); if ("" === e) throw "DERObjectIdentifier oidName undefined: " + t; this.setValueOidString(e) }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && ("string" == typeof t ? t.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(t) : this.setValueName(t) : void 0 !== t.oid ? this.setValueOidString(t.oid) : void 0 !== t.hex ? this.setValueHex(t.hex) : void 0 !== t.name && this.setValueName(t.name)) }, p.lang.extend(K.asn1.DERObjectIdentifier, K.asn1.ASN1Object), K.asn1.DEREnumerated = function (t) { K.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function (t) { this.hTLV = null, this.isModified = !0, this.hV = K.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t) }, this.setByInteger = function (t) { var e = new BigInteger(String(t), 10); this.setByBigInteger(e) }, this.setValueHex = function (t) { this.hV = t }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && (void 0 !== t.int ? this.setByInteger(t.int) : "number" == typeof t ? this.setByInteger(t) : void 0 !== t.hex && this.setValueHex(t.hex)) }, p.lang.extend(K.asn1.DEREnumerated, K.asn1.ASN1Object), K.asn1.DERUTF8String = function (t) { K.asn1.DERUTF8String.superclass.constructor.call(this, t), this.hT = "0c" }, p.lang.extend(K.asn1.DERUTF8String, K.asn1.DERAbstractString), K.asn1.DERNumericString = function (t) { K.asn1.DERNumericString.superclass.constructor.call(this, t), this.hT = "12" }, p.lang.extend(K.asn1.DERNumericString, K.asn1.DERAbstractString), K.asn1.DERPrintableString = function (t) { K.asn1.DERPrintableString.superclass.constructor.call(this, t), this.hT = "13" }, p.lang.extend(K.asn1.DERPrintableString, K.asn1.DERAbstractString), K.asn1.DERTeletexString = function (t) { K.asn1.DERTeletexString.superclass.constructor.call(this, t), this.hT = "14" }, p.lang.extend(K.asn1.DERTeletexString, K.asn1.DERAbstractString), K.asn1.DERIA5String = function (t) { K.asn1.DERIA5String.superclass.constructor.call(this, t), this.hT = "16" }, p.lang.extend(K.asn1.DERIA5String, K.asn1.DERAbstractString), K.asn1.DERUTCTime = function (t) { K.asn1.DERUTCTime.superclass.constructor.call(this, t), this.hT = "17", this.setByDate = function (t) { this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s) }, this.getFreshValueHex = function () { return void 0 === this.date && void 0 === this.s && (this.date = new Date, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV }, void 0 !== t && (void 0 !== t.str ? this.setString(t.str) : "string" == typeof t && t.match(/^[0-9]{12}Z$/) ? this.setString(t) : void 0 !== t.hex ? this.setStringHex(t.hex) : void 0 !== t.date && this.setByDate(t.date)) }, p.lang.extend(K.asn1.DERUTCTime, K.asn1.DERAbstractTime), K.asn1.DERGeneralizedTime = function (t) { K.asn1.DERGeneralizedTime.superclass.constructor.call(this, t), this.hT = "18", this.withMillis = !1, this.setByDate = function (t) { this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s) }, this.getFreshValueHex = function () { return void 0 === this.date && void 0 === this.s && (this.date = new Date, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV }, void 0 !== t && (void 0 !== t.str ? this.setString(t.str) : "string" == typeof t && t.match(/^[0-9]{14}Z$/) ? this.setString(t) : void 0 !== t.hex ? this.setStringHex(t.hex) : void 0 !== t.date && this.setByDate(t.date), !0 === t.millis && (this.withMillis = !0)) }, p.lang.extend(K.asn1.DERGeneralizedTime, K.asn1.DERAbstractTime), K.asn1.DERSequence = function (t) { K.asn1.DERSequence.superclass.constructor.call(this, t), this.hT = "30", this.getFreshValueHex = function () { for (var t = "", e = 0; e < this.asn1Array.length; e++) { t += this.asn1Array[e].getEncodedHex() } return this.hV = t, this.hV } }, p.lang.extend(K.asn1.DERSequence, K.asn1.DERAbstractStructured), K.asn1.DERSet = function (t) { K.asn1.DERSet.superclass.constructor.call(this, t), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function () { for (var t = new Array, e = 0; e < this.asn1Array.length; e++) { var r = this.asn1Array[e]; t.push(r.getEncodedHex()) } return 1 == this.sortFlag && t.sort(), this.hV = t.join(""), this.hV }, void 0 !== t && void 0 !== t.sortflag && 0 == t.sortflag && (this.sortFlag = !1) }, p.lang.extend(K.asn1.DERSet, K.asn1.DERAbstractStructured), K.asn1.DERTaggedObject = function (t) { K.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function (t, e, r) { this.hT = e, this.isExplicit = t, this.asn1Object = r, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = r.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1) }, this.getFreshValueHex = function () { return this.hV }, void 0 !== t && (void 0 !== t.tag && (this.hT = t.tag), void 0 !== t.explicit && (this.isExplicit = t.explicit), void 0 !== t.obj && (this.asn1Object = t.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object))) }, p.lang.extend(K.asn1.DERTaggedObject, K.asn1.ASN1Object); var K, V, W, q = new function () { }; function stoBA(t) { for (var e = new Array, r = 0; r < t.length; r++)e[r] = t.charCodeAt(r); return e } function BAtos(t) { for (var e = "", r = 0; r < t.length; r++)e += String.fromCharCode(t[r]); return e } function BAtohex(t) { for (var e = "", r = 0; r < t.length; r++) { var n = t[r].toString(16); 1 == n.length && (n = "0" + n), e += n } return e } function stohex(t) { return BAtohex(stoBA(t)) } function b64tob64u(t) { return t = (t = (t = t.replace(/\=/g, "")).replace(/\+/g, "-")).replace(/\//g, "_") } function b64utob64(t) { return t.length % 4 == 2 ? t += "==" : t.length % 4 == 3 && (t += "="), t = (t = t.replace(/-/g, "+")).replace(/_/g, "/") } function hextob64u(t) { return t.length % 2 == 1 && (t = "0" + t), b64tob64u(hex2b64(t)) } function b64utohex(t) { return b64tohex(b64utob64(t)) } function utf8tohex(t) { return uricmptohex(encodeURIComponentAll(t)) } function hextoutf8(t) { return decodeURIComponent(hextouricmp(t)) } function hextorstr(t) { for (var e = "", r = 0; r < t.length - 1; r += 2)e += String.fromCharCode(parseInt(t.substr(r, 2), 16)); return e } function rstrtohex(t) { for (var e = "", r = 0; r < t.length; r++)e += ("0" + t.charCodeAt(r).toString(16)).slice(-2); return e } function hextob64(t) { return hex2b64(t) } function hextob64nl(t) { var e = hextob64(t).replace(/(.{64})/g, "$1\r\n"); return e = e.replace(/\r\n$/, "") } function b64nltohex(t) { return b64tohex(t.replace(/[^0-9A-Za-z\/+=]*/g, "")) } function hextopem(t, e) { return "-----BEGIN " + e + "-----\r\n" + hextob64nl(t) + "\r\n-----END " + e + "-----\r\n" } function pemtohex(t, e) { if (-1 == t.indexOf("-----BEGIN ")) throw "can't find PEM header: " + e; return b64nltohex(t = void 0 !== e ? (t = t.replace("-----BEGIN " + e + "-----", "")).replace("-----END " + e + "-----", "") : (t = t.replace(/-----BEGIN [^-]+-----/, "")).replace(/-----END [^-]+-----/, "")) } function zulutomsec(t) { var e, r, n, i, o, s, a, u, c, f, h; if (h = t.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/)) return u = h[1], e = parseInt(u), 2 === u.length && (50 <= e && e < 100 ? e = 1900 + e : 0 <= e && e < 50 && (e = 2e3 + e)), r = parseInt(h[2]) - 1, n = parseInt(h[3]), i = parseInt(h[4]), o = parseInt(h[5]), s = parseInt(h[6]), a = 0, "" !== (c = h[7]) && (f = (c.substr(1) + "00").substr(0, 3), a = parseInt(f)), Date.UTC(e, r, n, i, o, s, a); throw "unsupported zulu format: " + t } function zulutosec(t) { return ~~(zulutomsec(t) / 1e3) } function uricmptohex(t) { return t.replace(/%/g, "") } function hextouricmp(t) { return t.replace(/(..)/g, "%$1") } function ipv6tohex(t) { var e = "malformed IPv6 address"; if (!t.match(/^[0-9A-Fa-f:]+$/)) throw e; var r = (t = t.toLowerCase()).split(":").length - 1; if (r < 2) throw e; var n = ":".repeat(7 - r + 2), i = (t = t.replace("::", n)).split(":"); if (8 != i.length) throw e; for (var o = 0; o < 8; o++)i[o] = ("0000" + i[o]).slice(-4); return i.join("") } function hextoipv6(t) { if (!t.match(/^[0-9A-Fa-f]{32}$/)) throw "malformed IPv6 address octet"; for (var e = (t = t.toLowerCase()).match(/.{1,4}/g), r = 0; r < 8; r++)e[r] = e[r].replace(/^0+/, ""), "" == e[r] && (e[r] = "0"); var n = (t = ":" + e.join(":") + ":").match(/:(0:){2,}/g); if (null === n) return t.slice(1, -1); var i = ""; for (r = 0; r < n.length; r++)n[r].length > i.length && (i = n[r]); return (t = t.replace(i, "::")).slice(1, -1) } function hextoip(t) { var e = "malformed hex value"; if (!t.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/)) throw e; if (8 != t.length) return 32 == t.length ? hextoipv6(t) : t; try { return parseInt(t.substr(0, 2), 16) + "." + parseInt(t.substr(2, 2), 16) + "." + parseInt(t.substr(4, 2), 16) + "." + parseInt(t.substr(6, 2), 16) } catch (t) { throw e } } function encodeURIComponentAll(t) { for (var e = encodeURIComponent(t), r = "", n = 0; n < e.length; n++)"%" == e[n] ? (r += e.substr(n, 3), n += 2) : r = r + "%" + stohex(e[n]); return r } function hextoposhex(t) { return t.length % 2 == 1 ? "0" + t : t.substr(0, 1) > "7" ? "00" + t : t } q.getLblen = function (t, e) { if ("8" != t.substr(e + 2, 1)) return 1; var r = parseInt(t.substr(e + 3, 1)); return 0 == r ? -1 : 0 < r && r < 10 ? r + 1 : -2 }, q.getL = function (t, e) { var r = q.getLblen(t, e); return r < 1 ? "" : t.substr(e + 2, 2 * r) }, q.getVblen = function (t, e) { var r; return "" == (r = q.getL(t, e)) ? -1 : ("8" === r.substr(0, 1) ? new BigInteger(r.substr(2), 16) : new BigInteger(r, 16)).intValue() }, q.getVidx = function (t, e) { var r = q.getLblen(t, e); return r < 0 ? r : e + 2 * (r + 1) }, q.getV = function (t, e) { var r = q.getVidx(t, e), n = q.getVblen(t, e); return t.substr(r, 2 * n) }, q.getTLV = function (t, e) { return t.substr(e, 2) + q.getL(t, e) + q.getV(t, e) }, q.getNextSiblingIdx = function (t, e) { return q.getVidx(t, e) + 2 * q.getVblen(t, e) }, q.getChildIdx = function (t, e) { var r = q, n = new Array, i = r.getVidx(t, e); "03" == t.substr(e, 2) ? n.push(i + 2) : n.push(i); for (var o = r.getVblen(t, e), s = i, a = 0; ;) { var u = r.getNextSiblingIdx(t, s); if (null == u || u - i >= 2 * o) break; if (a >= 200) break; n.push(u), s = u, a++ } return n }, q.getNthChildIdx = function (t, e, r) { return q.getChildIdx(t, e)[r] }, q.getIdxbyList = function (t, e, r, n) { var i, o, s = q; if (0 == r.length) { if (void 0 !== n && t.substr(e, 2) !== n) throw "checking tag doesn't match: " + t.substr(e, 2) + "!=" + n; return e } return i = r.shift(), o = s.getChildIdx(t, e), s.getIdxbyList(t, o[i], r, n) }, q.getTLVbyList = function (t, e, r, n) { var i = q, o = i.getIdxbyList(t, e, r); if (void 0 === o) throw "can't find nthList object"; if (void 0 !== n && t.substr(o, 2) != n) throw "checking tag doesn't match: " + t.substr(o, 2) + "!=" + n; return i.getTLV(t, o) }, q.getVbyList = function (t, e, r, n, i) { var o, s, a = q; if (void 0 === (o = a.getIdxbyList(t, e, r, n))) throw "can't find nthList object"; return s = a.getV(t, o), !0 === i && (s = s.substr(2)), s }, q.hextooidstr = function (t) { var e = function h(t, e) { return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t }, r = [], n = t.substr(0, 2), i = parseInt(n, 16); r[0] = new String(Math.floor(i / 40)), r[1] = new String(i % 40); for (var o = t.substr(2), s = [], a = 0; a < o.length / 2; a++)s.push(parseInt(o.substr(2 * a, 2), 16)); var u = [], c = ""; for (a = 0; a < s.length; a++)128 & s[a] ? c += e((127 & s[a]).toString(2), 7) : (c += e((127 & s[a]).toString(2), 7), u.push(new String(parseInt(c, 2))), c = ""); var f = r.join("."); return u.length > 0 && (f = f + "." + u.join(".")), f }, q.dump = function (t, e, r, n) { var i = q, o = i.getV, s = i.dump, a = i.getChildIdx, u = t; t instanceof K.asn1.ASN1Object && (u = t.getEncodedHex()); var c = function q(t, e) { return t.length <= 2 * e ? t : t.substr(0, e) + "..(total " + t.length / 2 + "bytes).." + t.substr(t.length - e, e) }; void 0 === e && (e = { ommit_long_octet: 32 }), void 0 === r && (r = 0), void 0 === n && (n = ""); var f = e.ommit_long_octet; if ("01" == u.substr(r, 2)) return "00" == (h = o(u, r)) ? n + "BOOLEAN FALSE\n" : n + "BOOLEAN TRUE\n"; if ("02" == u.substr(r, 2)) return n + "INTEGER " + c(h = o(u, r), f) + "\n"; if ("03" == u.substr(r, 2)) return n + "BITSTRING " + c(h = o(u, r), f) + "\n"; if ("04" == u.substr(r, 2)) { var h = o(u, r); if (i.isASN1HEX(h)) { var l = n + "OCTETSTRING, encapsulates\n"; return l += s(h, e, 0, n + "  ") } return n + "OCTETSTRING " + c(h, f) + "\n" } if ("05" == u.substr(r, 2)) return n + "NULL\n"; if ("06" == u.substr(r, 2)) { var p = o(u, r), g = K.asn1.ASN1Util.oidHexToInt(p), d = K.asn1.x509.OID.oid2name(g), v = g.replace(/\./g, " "); return "" != d ? n + "ObjectIdentifier " + d + " (" + v + ")\n" : n + "ObjectIdentifier (" + v + ")\n" } if ("0c" == u.substr(r, 2)) return n + "UTF8String '" + hextoutf8(o(u, r)) + "'\n"; if ("13" == u.substr(r, 2)) return n + "PrintableString '" + hextoutf8(o(u, r)) + "'\n"; if ("14" == u.substr(r, 2)) return n + "TeletexString '" + hextoutf8(o(u, r)) + "'\n"; if ("16" == u.substr(r, 2)) return n + "IA5String '" + hextoutf8(o(u, r)) + "'\n"; if ("17" == u.substr(r, 2)) return n + "UTCTime " + hextoutf8(o(u, r)) + "\n"; if ("18" == u.substr(r, 2)) return n + "GeneralizedTime " + hextoutf8(o(u, r)) + "\n"; if ("30" == u.substr(r, 2)) { if ("3000" == u.substr(r, 4)) return n + "SEQUENCE {}\n"; l = n + "SEQUENCE\n"; var y = e; if ((2 == (_ = a(u, r)).length || 3 == _.length) && "06" == u.substr(_[0], 2) && "04" == u.substr(_[_.length - 1], 2)) { d = i.oidname(o(u, _[0])); var m = JSON.parse(JSON.stringify(e)); m.x509ExtName = d, y = m } for (var S = 0; S < _.length; S++)l += s(u, y, _[S], n + "  "); return l } if ("31" == u.substr(r, 2)) { l = n + "SET\n"; var _ = a(u, r); for (S = 0; S < _.length; S++)l += s(u, e, _[S], n + "  "); return l } var b = parseInt(u.substr(r, 2), 16); if (0 != (128 & b)) { var F = 31 & b; if (0 != (32 & b)) { var l = n + "[" + F + "]\n"; for (_ = a(u, r), S = 0; S < _.length; S++)l += s(u, e, _[S], n + "  "); return l } return "68747470" == (h = o(u, r)).substr(0, 8) && (h = hextoutf8(h)), "subjectAltName" === e.x509ExtName && 2 == F && (h = hextoutf8(h)), l = n + "[" + F + "] " + h + "\n" } return n + "UNKNOWN(" + u.substr(r, 2) + ") " + o(u, r) + "\n" }, q.isASN1HEX = function (t) { var e = q; if (t.length % 2 == 1) return !1; var r = e.getVblen(t, 0), n = t.substr(0, 2), i = e.getL(t, 0); return t.length - n.length - i.length == 2 * r }, q.oidname = function (t) { var e = K.asn1; K.lang.String.isHex(t) && (t = e.ASN1Util.oidHexToInt(t)); var r = e.x509.OID.oid2name(t); return "" === r && (r = t), r }, void 0 !== K && K || (K = {}), void 0 !== K.lang && K.lang || (K.lang = {}), K.lang.String = function () { }, "function" == typeof t ? (V = function utf8tob64u(e) { return b64tob64u(new t(e, "utf8").toString("base64")) }, W = function b64utoutf8(e) { return new t(b64utob64(e), "base64").toString("utf8") }) : (V = function utf8tob64u(t) { return hextob64u(uricmptohex(encodeURIComponentAll(t))) }, W = function b64utoutf8(t) { return decodeURIComponent(hextouricmp(b64utohex(t))) }), K.lang.String.isInteger = function (t) { return !!t.match(/^[0-9]+$/) || !!t.match(/^-[0-9]+$/) }, K.lang.String.isHex = function (t) { return !(t.length % 2 != 0 || !t.match(/^[0-9a-f]+$/) && !t.match(/^[0-9A-F]+$/)) }, K.lang.String.isBase64 = function (t) { return !(!(t = t.replace(/\s+/g, "")).match(/^[0-9A-Za-z+\/]+={0,3}$/) || t.length % 4 != 0) }, K.lang.String.isBase64URL = function (t) { return !t.match(/[+/=]/) && (t = b64utob64(t), K.lang.String.isBase64(t)) }, K.lang.String.isIntegerArray = function (t) { return !!(t = t.replace(/\s+/g, "")).match(/^\[[0-9,]+\]$/) }; void 0 !== K && K || (K = {}), void 0 !== K.crypto && K.crypto || (K.crypto = {}), K.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: v.algo.MD5, sha1: v.algo.SHA1, sha224: v.algo.SHA224, sha256: v.algo.SHA256, sha384: v.algo.SHA384, sha512: v.algo.SHA512, ripemd160: v.algo.RIPEMD160 }, this.getDigestInfoHex = function (t, e) { if (void 0 === this.DIGESTINFOHEAD[e]) throw "alg not supported in Util.DIGESTINFOHEAD: " + e; return this.DIGESTINFOHEAD[e] + t }, this.getPaddedDigestInfoHex = function (t, e, r) { var n = this.getDigestInfoHex(t, e), i = r / 4; if (n.length + 22 > i) throw "key is too short for SigAlg: keylen=" + r + "," + e; for (var o = "0001", s = "00" + n, a = "", u = i - o.length - s.length, c = 0; c < u; c += 2)a += "ff"; return o + a + s }, this.hashString = function (t, e) { return new K.crypto.MessageDigest({ alg: e }).digestString(t) }, this.hashHex = function (t, e) { return new K.crypto.MessageDigest({ alg: e }).digestHex(t) }, this.sha1 = function (t) { return new K.crypto.MessageDigest({ alg: "sha1", prov: "cryptojs" }).digestString(t) }, this.sha256 = function (t) { return new K.crypto.MessageDigest({ alg: "sha256", prov: "cryptojs" }).digestString(t) }, this.sha256Hex = function (t) { return new K.crypto.MessageDigest({ alg: "sha256", prov: "cryptojs" }).digestHex(t) }, this.sha512 = function (t) { return new K.crypto.MessageDigest({ alg: "sha512", prov: "cryptojs" }).digestString(t) }, this.sha512Hex = function (t) { return new K.crypto.MessageDigest({ alg: "sha512", prov: "cryptojs" }).digestHex(t) } }, K.crypto.Util.md5 = function (t) { return new K.crypto.MessageDigest({ alg: "md5", prov: "cryptojs" }).digestString(t) }, K.crypto.Util.ripemd160 = function (t) { return new K.crypto.MessageDigest({ alg: "ripemd160", prov: "cryptojs" }).digestString(t) }, K.crypto.Util.SECURERANDOMGEN = new SecureRandom, K.crypto.Util.getRandomHexOfNbytes = function (t) { var e = new Array(t); return K.crypto.Util.SECURERANDOMGEN.nextBytes(e), BAtohex(e) }, K.crypto.Util.getRandomBigIntegerOfNbytes = function (t) { return new BigInteger(K.crypto.Util.getRandomHexOfNbytes(t), 16) }, K.crypto.Util.getRandomHexOfNbits = function (t) { var e = t % 8, r = new Array((t - e) / 8 + 1); return K.crypto.Util.SECURERANDOMGEN.nextBytes(r), r[0] = (255 << e & 255 ^ 255) & r[0], BAtohex(r) }, K.crypto.Util.getRandomBigIntegerOfNbits = function (t) { return new BigInteger(K.crypto.Util.getRandomHexOfNbits(t), 16) }, K.crypto.Util.getRandomBigIntegerZeroToMax = function (t) { for (var e = t.bitLength(); ;) { var r = K.crypto.Util.getRandomBigIntegerOfNbits(e); if (-1 != t.compareTo(r)) return r } }, K.crypto.Util.getRandomBigIntegerMinToMax = function (t, e) { var r = t.compareTo(e); if (1 == r) throw "biMin is greater than biMax"; if (0 == r) return t; var n = e.subtract(t); return K.crypto.Util.getRandomBigIntegerZeroToMax(n).add(t) }, K.crypto.MessageDigest = function (t) { this.setAlgAndProvider = function (t, e) { if (null !== (t = K.crypto.MessageDigest.getCanonicalAlgName(t)) && void 0 === e && (e = K.crypto.Util.DEFAULTPROVIDER[t]), -1 != ":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t) && "cryptojs" == e) { try { this.md = K.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create() } catch (e) { throw "setAlgAndProvider hash alg set fail alg=" + t + "/" + e } this.updateString = function (t) { this.md.update(t) }, this.updateHex = function (t) { var e = v.enc.Hex.parse(t); this.md.update(e) }, this.digest = function () { return this.md.finalize().toString(v.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 (e) { throw "setAlgAndProvider hash alg set fail alg=" + t + "/" + e } 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 = K.crypto.Util.DEFAULTPROVIDER[this.algName]), this.setAlgAndProvider(this.algName, this.provName)) }, K.crypto.MessageDigest.getCanonicalAlgName = function (t) { return "string" == typeof t && (t = (t = t.toLowerCase()).replace(/-/, "")), t }, K.crypto.MessageDigest.getHashLength = function (t) { var e = K.crypto.MessageDigest, r = e.getCanonicalAlgName(t); if (void 0 === e.HASHLENGTH[r]) throw "not supported algorithm: " + t; return e.HASHLENGTH[r] }, K.crypto.MessageDigest.HASHLENGTH = { md5: 16, sha1: 20, sha224: 28, sha256: 32, sha384: 48, sha512: 64, ripemd160: 20 }, K.crypto.Mac = function (t) { this.setAlgAndProvider = function (t, e) { if (null == (t = t.toLowerCase()) && (t = "hmacsha1"), "hmac" != (t = t.toLowerCase()).substr(0, 4)) throw "setAlgAndProvider unsupported HMAC alg: " + t; void 0 === e && (e = K.crypto.Util.DEFAULTPROVIDER[t]), this.algProv = t + "/" + e; var r = t.substr(4); if (-1 != ":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(r) && "cryptojs" == e) { try { var n = K.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[r]; this.mac = v.algo.HMAC.create(n, this.pass) } catch (t) { throw "setAlgAndProvider hash alg set fail hashAlg=" + r + "/" + t } this.updateString = function (t) { this.mac.update(t) }, this.updateHex = function (t) { var e = v.enc.Hex.parse(t); this.mac.update(e) }, this.doFinal = function () { return this.mac.finalize().toString(v.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 = rstrtohex(t)), void (this.pass = v.enc.Hex.parse(e)) } if ("object" != (void 0 === t ? "undefined" : n(t))) throw "KJUR.crypto.Mac unsupported password type: " + t; 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 = utf8tohex(t.utf8)), void 0 !== t.rstr && (e = rstrtohex(t.rstr)), void 0 !== t.b64 && (e = b64tohex(t.b64)), void 0 !== t.b64u && (e = b64utohex(t.b64u)), null == e) throw "KJUR.crypto.Mac unsupported password type: " + t; this.pass = v.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 = K.crypto.Util.DEFAULTPROVIDER[this.algName]), this.setAlgAndProvider(this.algName, this.provName))) }, K.crypto.Signature = function (t) { var e = null; if (this._setAlgNames = function () { var t = this.algName.match(/^(.+)with(.+)$/); t && (this.mdAlgName = t[1].toLowerCase(), this.pubkeyAlgName = t[2].toLowerCase()) }, this._zeroPaddingOfSignature = function (t, e) { for (var r = "", n = e / 4 - t.length, i = 0; i < n; i++)r += "0"; return r + 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 K.crypto.MessageDigest({ alg: this.mdAlgName }) } catch (t) { throw "setAlgAndProvider hash alg set fail alg=" + this.mdAlgName + "/" + t } this.init = function (t, e) { var r = null; try { r = void 0 === e ? J.getKey(t) : J.getKey(t, e) } catch (t) { throw "init failed:" + t } if (!0 === r.isPrivate) this.prvKey = r, this.state = "SIGN"; else { if (!0 !== r.isPublic) throw "init failed.:" + r; this.pubKey = r, 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(), void 0 !== this.ecprvhex && void 0 !== this.eccurvename) { var t = new K.crypto.ECDSA({ curve: this.eccurvename }); this.hSign = t.signHex(this.sHashHex, this.ecprvhex) } else if (this.prvKey instanceof RSAKey && "rsaandmgf1" === this.pubkeyAlgName) this.hSign = this.prvKey.signWithMessageHashPSS(this.sHashHex, this.mdAlgName, this.pssSaltLen); else if (this.prvKey instanceof RSAKey && "rsa" === this.pubkeyAlgName) this.hSign = this.prvKey.signWithMessageHash(this.sHashHex, this.mdAlgName); else if (this.prvKey instanceof K.crypto.ECDSA) this.hSign = this.prvKey.signWithMessageHash(this.sHashHex); else { if (!(this.prvKey instanceof K.crypto.DSA)) throw "Signature: unsupported private 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(), void 0 !== this.ecpubhex && void 0 !== this.eccurvename) return new K.crypto.ECDSA({ curve: this.eccurvename }).verifyHex(this.sHashHex, t, this.ecpubhex); if (this.pubKey instanceof RSAKey && "rsaandmgf1" === this.pubkeyAlgName) return this.pubKey.verifyWithMessageHashPSS(this.sHashHex, t, this.mdAlgName, this.pssSaltLen); if (this.pubKey instanceof RSAKey && "rsa" === this.pubkeyAlgName) return this.pubKey.verifyWithMessageHash(this.sHashHex, t); if (void 0 !== K.crypto.ECDSA && this.pubKey instanceof K.crypto.ECDSA) return this.pubKey.verifyWithMessageHash(this.sHashHex, t); if (void 0 !== K.crypto.DSA && this.pubKey instanceof K.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.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 = K.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 { e = J.getKey(t.prvkeypem); this.init(e) } catch (t) { throw "fatal error to load pem private key: " + t } } }, K.crypto.Cipher = function (t) { }, K.crypto.Cipher.encrypt = function (t, e, r) { if (e instanceof RSAKey && e.isPublic) { var n = K.crypto.Cipher.getAlgByKeyAndName(e, r); if ("RSA" === n) return e.encrypt(t); if ("RSAOAEP" === n) return e.encryptOAEP(t, "sha1"); var i = n.match(/^RSAOAEP(\d+)$/); if (null !== i) return e.encryptOAEP(t, "sha" + i[1]); throw "Cipher.encrypt: unsupported algorithm for RSAKey: " + r } throw "Cipher.encrypt: unsupported key or algorithm" }, K.crypto.Cipher.decrypt = function (t, e, r) { if (e instanceof RSAKey && e.isPrivate) { var n = K.crypto.Cipher.getAlgByKeyAndName(e, r); if ("RSA" === n) return e.decrypt(t); if ("RSAOAEP" === n) return e.decryptOAEP(t, "sha1"); var i = n.match(/^RSAOAEP(\d+)$/); if (null !== i) return e.decryptOAEP(t, "sha" + i[1]); throw "Cipher.decrypt: unsupported algorithm for RSAKey: " + r } throw "Cipher.decrypt: unsupported key or algorithm" }, K.crypto.Cipher.getAlgByKeyAndName = function (t, e) { if (t instanceof RSAKey) { if (-1 != ":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(e)) return e; if (null === e || void 0 === e) return "RSA"; throw "getAlgByKeyAndName: not supported algorithm name for RSAKey: " + e } throw "getAlgByKeyAndName: not supported algorithm name: " + e }, K.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" } }, void 0 !== K && K || (K = {}), void 0 !== K.crypto && K.crypto || (K.crypto = {}), K.crypto.ECDSA = function (t) { var e = new SecureRandom; this.type = "EC", this.isPrivate = !1, this.isPublic = !1, this.getBigRandom = function (t) { return new BigInteger(t.bitLength(), e).mod(t.subtract(BigInteger.ONE)).add(BigInteger.ONE) }, this.setNamedCurve = function (t) { this.ecparams = K.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.getPublicKeyXYHex = function () { var t = this.pubKeyHex; if ("04" !== t.substr(0, 2)) throw "this method supports uncompressed format(04) only"; var e = this.ecparams.keylen / 4; if (t.length !== 2 + 2 * e) throw "malformed public key hex length"; var r = {}; return r.x = t.substr(2, e), r.y = t.substr(2 + e), r }, this.getShortNISTPCurveName = function () { var t = this.curveName; return "secp256r1" === t || "NIST P-256" === t || "P-256" === t || "prime256v1" === t ? "P-256" : "secp384r1" === t || "NIST P-384" === t || "P-384" === t ? "P-384" : null }, this.generateKeyPairHex = function () { var t = this.ecparams.n, e = this.getBigRandom(t), r = this.ecparams.G.multiply(e), n = r.getX().toBigInteger(), i = r.getY().toBigInteger(), o = this.ecparams.keylen / 4, s = ("0000000000" + e.toString(16)).slice(-o), a = "04" + ("0000000000" + n.toString(16)).slice(-o) + ("0000000000" + i.toString(16)).slice(-o); return this.setPrivateKeyHex(s), this.setPublicKeyHex(a), { ecprvhex: s, ecpubhex: a } }, this.signWithMessageHash = function (t) { return this.signHex(t, this.prvKeyHex) }, this.signHex = function (t, e) { var r = new BigInteger(e, 16), n = this.ecparams.n, i = new BigInteger(t, 16); do { var o = this.getBigRandom(n), s = this.ecparams.G.multiply(o).getX().toBigInteger().mod(n) } while (s.compareTo(BigInteger.ZERO) <= 0); var a = o.modInverse(n).multiply(i.add(r.multiply(s))).mod(n); return K.crypto.ECDSA.biRSSigToASN1Sig(s, a) }, this.sign = function (t, e) { var r = e, n = this.ecparams.n, i = BigInteger.fromByteArrayUnsigned(t); do { var o = this.getBigRandom(n), s = this.ecparams.G.multiply(o).getX().toBigInteger().mod(n) } while (s.compareTo(BigInteger.ZERO) <= 0); var a = o.modInverse(n).multiply(i.add(r.multiply(s))).mod(n); return this.serializeSig(s, a) }, this.verifyWithMessageHash = function (t, e) { return this.verifyHex(t, e, this.pubKeyHex) }, this.verifyHex = function (t, e, r) { var n, i, o, s = K.crypto.ECDSA.parseSigHex(e); n = s.r, i = s.s, o = ECPointFp.decodeFromHex(this.ecparams.curve, r); var a = new BigInteger(t, 16); return this.verifyRaw(a, n, i, o) }, this.verify = function (t, e, r) { var i, o, s; if (Bitcoin.Util.isArray(e)) { var a = this.parseSig(e); i = a.r, o = a.s } else { if ("object" !== (void 0 === e ? "undefined" : n(e)) || !e.r || !e.s) throw "Invalid value for signature"; i = e.r, o = e.s } if (r instanceof ECPointFp) s = r; else { if (!Bitcoin.Util.isArray(r)) throw "Invalid format for pubkey value, must be byte array or ECPointFp"; s = ECPointFp.decodeFrom(this.ecparams.curve, r) } var u = BigInteger.fromByteArrayUnsigned(t); return this.verifyRaw(u, i, o, s) }, this.verifyRaw = function (t, e, r, n) { var i = this.ecparams.n, o = this.ecparams.G; if (e.compareTo(BigInteger.ONE) < 0 || e.compareTo(i) >= 0) return !1; if (r.compareTo(BigInteger.ONE) < 0 || r.compareTo(i) >= 0) return !1; var s = r.modInverse(i), a = t.multiply(s).mod(i), u = e.multiply(s).mod(i); return o.multiply(a).add(n.multiply(u)).getX().toBigInteger().mod(i).equals(e) }, this.serializeSig = function (t, e) { var r = t.toByteArraySigned(), n = e.toByteArraySigned(), i = []; return i.push(2), i.push(r.length), (i = i.concat(r)).push(2), i.push(n.length), (i = i.concat(n)).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 (2 != t[e = 2]) throw new Error("First element in signature must be a DERInteger"); var r = t.slice(e + 2, e + 2 + t[e + 1]); if (2 != t[e += 2 + t[e + 1]]) throw new Error("Second element in signature must be a DERInteger"); var n = t.slice(e + 2, e + 2 + t[e + 1]); return e += 2 + t[e + 1], { r: BigInteger.fromByteArrayUnsigned(r), s: BigInteger.fromByteArrayUnsigned(n) } }, this.parseSigCompact = function (t) { if (65 !== t.length) throw "Signature has the wrong length"; var e = t[0] - 27; if (e < 0 || e > 7) throw "Invalid signature type"; var r = this.ecparams.n; return { r: BigInteger.fromByteArrayUnsigned(t.slice(1, 33)).mod(r), s: BigInteger.fromByteArrayUnsigned(t.slice(33, 65)).mod(r), i: e } }, this.readPKCS5PrvKeyHex = function (t) { var e, r, n, i = q, o = K.crypto.ECDSA.getName, s = i.getVbyList; if (!1 === i.isASN1HEX(t)) throw "not ASN.1 hex string"; try { e = s(t, 0, [2, 0], "06"), r = s(t, 0, [1], "04"); try { n = s(t, 0, [3, 0], "03").substr(2) } catch (t) { } } catch (t) { throw "malformed PKCS#1/5 plain ECC private key" } if (this.curveName = o(e), void 0 === this.curveName) throw "unsupported curve name"; this.setNamedCurve(this.curveName), this.setPublicKeyHex(n), this.setPrivateKeyHex(r), this.isPublic = !1 }, this.readPKCS8PrvKeyHex = function (t) { var e, r, n, i = q, o = K.crypto.ECDSA.getName, s = i.getVbyList; if (!1 === i.isASN1HEX(t)) throw "not ASN.1 hex string"; try { s(t, 0, [1, 0], "06"), e = s(t, 0, [1, 1], "06"), r = s(t, 0, [2, 0, 1], "04"); try { n = s(t, 0, [2, 0, 2, 0], "03").substr(2) } catch (t) { } } catch (t) { throw "malformed PKCS#8 plain ECC private key" } if (this.curveName = o(e), void 0 === this.curveName) throw "unsupported curve name"; this.setNamedCurve(this.curveName), this.setPublicKeyHex(n), this.setPrivateKeyHex(r), this.isPublic = !1 }, this.readPKCS8PubKeyHex = function (t) { var e, r, n = q, i = K.crypto.ECDSA.getName, o = n.getVbyList; if (!1 === n.isASN1HEX(t)) throw "not ASN.1 hex string"; try { o(t, 0, [0, 0], "06"), e = o(t, 0, [0, 1], "06"), r = o(t, 0, [1], "03").substr(2) } catch (t) { throw "malformed PKCS#8 ECC public key" } if (this.curveName = i(e), null === this.curveName) throw "unsupported curve name"; this.setNamedCurve(this.curveName), this.setPublicKeyHex(r) }, this.readCertPubKeyHex = function (t, e) { 5 !== e && (e = 6); var r, n, i = q, o = K.crypto.ECDSA.getName, s = i.getVbyList; if (!1 === i.isASN1HEX(t)) throw "not ASN.1 hex string"; try { r = s(t, 0, [0, e, 0, 1], "06"), n = s(t, 0, [0, e, 1], "03").substr(2) } catch (t) { throw "malformed X.509 certificate ECC public key" } if (this.curveName = o(r), null === this.curveName) throw "unsupported curve name"; this.setNamedCurve(this.curveName), this.setPublicKeyHex(n) }, void 0 !== t && void 0 !== t.curve && (this.curveName = t.curve), void 0 === this.curveName && (this.curveName = "secp256r1"), this.setNamedCurve(this.curveName), void 0 !== t && (void 0 !== t.prv && this.setPrivateKeyHex(t.prv), void 0 !== t.pub && this.setPublicKeyHex(t.pub)) }, K.crypto.ECDSA.parseSigHex = function (t) { var e = K.crypto.ECDSA.parseSigHexInHexRS(t); return { r: new BigInteger(e.r, 16), s: new BigInteger(e.s, 16) } }, K.crypto.ECDSA.parseSigHexInHexRS = function (t) { var e = q, r = e.getChildIdx, n = e.getV; if ("30" != t.substr(0, 2)) throw "signature is not a ASN.1 sequence"; var i = r(t, 0); if (2 != i.length) throw "number of signature ASN.1 sequence elements seem wrong"; var o = i[0], s = i[1]; if ("02" != t.substr(o, 2)) throw "1st item of sequene of signature is not ASN.1 integer"; if ("02" != t.substr(s, 2)) throw "2nd item of sequene of signature is not ASN.1 integer"; return { r: n(t, o), s: n(t, s) } }, K.crypto.ECDSA.asn1SigToConcatSig = function (t) { var e = K.crypto.ECDSA.parseSigHexInHexRS(t), r = e.r, n = e.s; if ("00" == r.substr(0, 2) && r.length % 32 == 2 && (r = r.substr(2)), "00" == n.substr(0, 2) && n.length % 32 == 2 && (n = n.substr(2)), r.length % 32 == 30 && (r = "00" + r), n.length % 32 == 30 && (n = "00" + n), r.length % 32 != 0) throw "unknown ECDSA sig r length error"; if (n.length % 32 != 0) throw "unknown ECDSA sig s length error"; return r + n }, K.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), r = t.substr(t.length / 2); return K.crypto.ECDSA.hexRSSigToASN1Sig(e, r) }, K.crypto.ECDSA.hexRSSigToASN1Sig = function (t, e) { var r = new BigInteger(t, 16), n = new BigInteger(e, 16); return K.crypto.ECDSA.biRSSigToASN1Sig(r, n) }, K.crypto.ECDSA.biRSSigToASN1Sig = function (t, e) { var r = K.asn1, n = new r.DERInteger({ bigint: t }), i = new r.DERInteger({ bigint: e }); return new r.DERSequence({ array: [n, i] }).getEncodedHex() }, K.crypto.ECDSA.getName = function (t) { return "2a8648ce3d030107" === t ? "secp256r1" : "2b8104000a" === t ? "secp256k1" : "2b81040022" === t ? "secp384r1" : -1 !== "|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t) ? "secp256r1" : -1 !== "|secp256k1|".indexOf(t) ? "secp256k1" : -1 !== "|secp384r1|NIST P-384|P-384|".indexOf(t) ? "secp384r1" : null }, void 0 !== K && K || (K = {}), void 0 !== K.crypto && K.crypto || (K.crypto = {}), K.crypto.ECParameterDB = new function () { var t = {}, e = {}; function a(t) { return new BigInteger(t, 16) } this.getByName = function (r) { var n = r; if (void 0 !== e[n] && (n = e[r]), void 0 !== t[n]) return t[n]; throw "unregistered EC curve name: " + n }, this.regist = function (r, n, i, o, s, u, c, f, h, l, p, g) { t[r] = {}; var d = a(i), v = a(o), y = a(s), m = a(u), S = a(c), _ = new ECCurveFp(d, v, y), b = _.decodePointHex("04" + f + h); t[r].name = r, t[r].keylen = n, t[r].curve = _, t[r].G = b, t[r].n = m, t[r].h = S, t[r].oid = p, t[r].info = g; for (var F = 0; F < l.length; F++)e[l[F]] = r } }, K.crypto.ECParameterDB.regist("secp128r1", 128, "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC", "E87579C11079F43DD824993C2CEE5ED3", "FFFFFFFE0000000075A30D1B9038A115", "1", "161FF7528B899B2D0C28607CA52C5B86", "CF5AC8395BAFEB13C02DA292DDED7A83", [], "", "secp128r1 : SECG curve over a 128 bit prime field"), K.crypto.ECParameterDB.regist("secp160k1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", "0", "7", "0100000000000000000001B8FA16DFAB9ACA16B6B3", "1", "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", "938CF935318FDCED6BC28286531733C3F03C4FEE", [], "", "secp160k1 : SECG curve over a 160 bit prime field"), K.crypto.ECParameterDB.regist("secp160r1", 160, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC", "1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45", "0100000000000000000001F4C8F927AED3CA752257", "1", "4A96B5688EF573284664698968C38BB913CBFC82", "23A628553168947D59DCC912042351377AC5FB32", [], "", "secp160r1 : SECG curve over a 160 bit prime field"), K.crypto.ECParameterDB.regist("secp192k1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", "0", "3", "FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", "1", "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", []), K.crypto.ECParameterDB.regist("secp192r1", 192, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC", "64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1", "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831", "1", "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811", []), K.crypto.ECParameterDB.regist("secp224r1", 224, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE", "B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4", "FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D", "1", "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21", "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34", []), K.crypto.ECParameterDB.regist("secp256k1", 256, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", "0", "7", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", "1", "79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", "483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", []), K.crypto.ECParameterDB.regist("secp256r1", 256, "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF", "FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC", "5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B", "FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551", "1", "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296", "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5", ["NIST P-256", "P-256", "prime256v1"]), K.crypto.ECParameterDB.regist("secp384r1", 384, "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC", "B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF", "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973", "1", "AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7", "3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", ["NIST P-384", "P-384"]), K.crypto.ECParameterDB.regist("secp521r1", 521, "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC", "051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00", "1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409", "1", "C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66", "011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", ["NIST P-521", "P-521"]); var J = function () { var t = function d(t, e, n) { return r(v.AES, t, e, n) }, r = function k(t, e, r, n) { var i = v.enc.Hex.parse(e), o = v.enc.Hex.parse(r), s = v.enc.Hex.parse(n), a = {}; a.key = o, a.iv = s, a.ciphertext = i; var u = t.decrypt(a, o, { iv: s }); return v.enc.Hex.stringify(u) }, n = function l(t, e, r) { return i(v.AES, t, e, r) }, i = function g(t, e, r, n) { var i = v.enc.Hex.parse(e), o = v.enc.Hex.parse(r), s = v.enc.Hex.parse(n), a = t.encrypt(i, o, { iv: s }), u = v.enc.Hex.parse(a.toString()); return v.enc.Base64.stringify(u) }, s = { "AES-256-CBC": { proc: t, eproc: n, keylen: 32, ivlen: 16 }, "AES-192-CBC": { proc: t, eproc: n, keylen: 24, ivlen: 16 }, "AES-128-CBC": { proc: t, eproc: n, keylen: 16, ivlen: 16 }, "DES-EDE3-CBC": { proc: function e(t, n, i) { return r(v.TripleDES, t, n, i) }, eproc: function o(t, e, r) { return i(v.TripleDES, t, e, r) }, keylen: 24, ivlen: 8 }, "DES-CBC": { proc: function a(t, e, n) { return r(v.DES, t, e, n) }, eproc: function f(t, e, r) { return i(v.DES, t, e, r) }, keylen: 8, ivlen: 8 } }, u = function n(t) { var e = {}, r = t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)", "m")); r && (e.cipher = r[1], e.ivsalt = r[2]); var i = t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----")); i && (e.type = i[1]); var o = -1, s = 0; -1 != t.indexOf("\r\n\r\n") && (o = t.indexOf("\r\n\r\n"), s = 2), -1 != t.indexOf("\n\n") && (o = t.indexOf("\n\n"), s = 1); var a = t.indexOf("-----END"); if (-1 != o && -1 != a) { var u = t.substring(o + 2 * s, a - s); u = u.replace(/\s+/g, ""), e.data = u } return e }, c = function j(t, e, r) { for (var n = r.substring(0, 16), i = v.enc.Hex.parse(n), o = v.enc.Utf8.parse(e), a = s[t].keylen + s[t].ivlen, u = "", c = null; ;) { var f = v.algo.MD5.create(); if (null != c && f.update(c), f.update(o), f.update(i), c = f.finalize(), (u += v.enc.Hex.stringify(c)).length >= 2 * a) break } var h = {}; return h.keyhex = u.substr(0, 2 * s[t].keylen), h.ivhex = u.substr(2 * s[t].keylen, 2 * s[t].ivlen), h }, p = function b(t, e, r, n) { var i = v.enc.Base64.parse(t), o = v.enc.Hex.stringify(i); return (0, s[e].proc)(o, r, n) }; return { version: "1.0.0", parsePKCS5PEM: function parsePKCS5PEM(t) { return u(t) }, getKeyAndUnusedIvByPasscodeAndIvsalt: function getKeyAndUnusedIvByPasscodeAndIvsalt(t, e, r) { return c(t, e, r) }, decryptKeyB64: function decryptKeyB64(t, e, r, n) { return p(t, e, r, n) }, getDecryptedKeyHex: function getDecryptedKeyHex(t, e) { var r = u(t), n = (r.type, r.cipher), i = r.ivsalt, o = r.data, s = c(n, e, i).keyhex; return p(o, n, s, i) }, getEncryptedPKCS5PEMFromPrvKeyHex: function getEncryptedPKCS5PEMFromPrvKeyHex(t, e, r, n, i) { var o = ""; if (void 0 !== n && null != n || (n = "AES-256-CBC"), void 0 === s[n]) throw "KEYUTIL unsupported algorithm: " + n; void 0 !== i && null != i || (i = function m(t) { var e = v.lib.WordArray.random(t); return v.enc.Hex.stringify(e) }(s[n].ivlen).toUpperCase()); var a = function h(t, e, r, n) { return (0, s[e].eproc)(t, r, n) }(e, n, c(n, r, i).keyhex, i); o = "-----BEGIN " + t + " PRIVATE KEY-----\r\n"; return o += "Proc-Type: 4,ENCRYPTED\r\n", o += "DEK-Info: " + n + "," + i + "\r\n", o += "\r\n", o += a.replace(/(.{64})/g, "$1\r\n"), o += "\r\n-----END " + t + " PRIVATE KEY-----\r\n" }, parseHexOfEncryptedPKCS8: function parseHexOfEncryptedPKCS8(t) { var e = q, r = e.getChildIdx, n = e.getV, i = {}, o = r(t, 0); if (2 != o.length) throw "malformed format: SEQUENCE(0).items != 2: " + o.length; i.ciphertext = n(t, o[1]); var s = r(t, o[0]); if (2 != s.length) throw "malformed format: SEQUENCE(0.0).items != 2: " + s.length; if ("2a864886f70d01050d" != n(t, s[0])) throw "this only supports pkcs5PBES2"; var a = r(t, s[1]); if (2 != s.length) throw "malformed format: SEQUENCE(0.0.1).items != 2: " + a.length; var u = r(t, a[1]); if (2 != u.length) throw "malformed format: SEQUENCE(0.0.1.1).items != 2: " + u.length; if ("2a864886f70d0307" != n(t, u[0])) throw "this only supports TripleDES"; i.encryptionSchemeAlg = "TripleDES", i.encryptionSchemeIV = n(t, u[1]); var c = r(t, a[0]); if (2 != c.length) throw "malformed format: SEQUENCE(0.0.1.0).items != 2: " + c.length; if ("2a864886f70d01050c" != n(t, c[0])) throw "this only supports pkcs5PBKDF2"; var f = r(t, c[1]); if (f.length < 2) throw "malformed format: SEQUENCE(0.0.1.0.1).items < 2: " + f.length; i.pbkdf2Salt = n(t, f[0]); var h = n(t, f[1]); try { i.pbkdf2Iter = parseInt(h, 16) } catch (t) { throw "malformed format pbkdf2Iter: " + h } return i }, getPBKDF2KeyHexFromParam: function getPBKDF2KeyHexFromParam(t, e) { var r = v.enc.Hex.parse(t.pbkdf2Salt), n = t.pbkdf2Iter, i = v.PBKDF2(e, r, { keySize: 6, iterations: n }); return v.enc.Hex.stringify(i) }, _getPlainPKCS8HexFromEncryptedPKCS8PEM: function _getPlainPKCS8HexFromEncryptedPKCS8PEM(t, e) { var r = pemtohex(t, "ENCRYPTED PRIVATE KEY"), n = this.parseHexOfEncryptedPKCS8(r), i = J.getPBKDF2KeyHexFromParam(n, e), o = {}; o.ciphertext = v.enc.Hex.parse(n.ciphertext); var s = v.enc.Hex.parse(i), a = v.enc.Hex.parse(n.encryptionSchemeIV), u = v.TripleDES.decrypt(o, s, { iv: a }); return v.enc.Hex.stringify(u) }, getKeyFromEncryptedPKCS8PEM: function getKeyFromEncryptedPKCS8PEM(t, e) { var r = this._getPlainPKCS8HexFromEncryptedPKCS8PEM(t, e); return this.getKeyFromPlainPrivatePKCS8Hex(r) }, parsePlainPrivatePKCS8Hex: function parsePlainPrivatePKCS8Hex(t) { var e = q, r = e.getChildIdx, n = e.getV, i = { algparam: null }; if ("30" != t.substr(0, 2)) throw "malformed plain PKCS8 private key(code:001)"; var o = r(t, 0); if (3 != o.length) throw "malformed plain PKCS8 private key(code:002)"; if ("30" != t.substr(o[1], 2)) throw "malformed PKCS8 private key(code:003)"; var s = r(t, o[1]); if (2 != s.length) throw "malformed PKCS8 private key(code:004)"; if ("06" != t.substr(s[0], 2)) throw "malformed PKCS8 private key(code:005)"; if (i.algoid = n(t, s[0]), "06" == t.substr(s[1], 2) && (i.algparam = n(t, s[1])), "04" != t.substr(o[2], 2)) throw "malformed PKCS8 private key(code:006)"; return i.keyidx = e.getVidx(t, o[2]), i }, getKeyFromPlainPrivatePKCS8PEM: function getKeyFromPlainPrivatePKCS8PEM(t) { var e = pemtohex(t, "PRIVATE KEY"); return this.getKeyFromPlainPrivatePKCS8Hex(e) }, getKeyFromPlainPrivatePKCS8Hex: function getKeyFromPlainPrivatePKCS8Hex(t) { var e, r = this.parsePlainPrivatePKCS8Hex(t); if ("2a864886f70d010101" == r.algoid) e = new RSAKey; else if ("2a8648ce380401" == r.algoid) e = new K.crypto.DSA; else { if ("2a8648ce3d0201" != r.algoid) throw "unsupported private key algorithm"; e = new K.crypto.ECDSA } return e.readPKCS8PrvKeyHex(t), e }, _getKeyFromPublicPKCS8Hex: function _getKeyFromPublicPKCS8Hex(t) { var e, r = q.getVbyList(t, 0, [0, 0], "06"); if ("2a864886f70d010101" === r) e = new RSAKey; else if ("2a8648ce380401" === r) e = new K.crypto.DSA; else { if ("2a8648ce3d0201" !== r) throw "unsupported PKCS#8 public key hex"; e = new K.crypto.ECDSA } return e.readPKCS8PubKeyHex(t), e }, parsePublicRawRSAKeyHex: function parsePublicRawRSAKeyHex(t) { var e = q, r = e.getChildIdx, n = e.getV, i = {}; if ("30" != t.substr(0, 2)) throw "malformed RSA key(code:001)"; var o = r(t, 0); if (2 != o.length) throw "malformed RSA key(code:002)"; if ("02" != t.substr(o[0], 2)) throw "malformed RSA key(code:003)"; if (i.n = n(t, o[0]), "02" != t.substr(o[1], 2)) throw "malformed RSA key(code:004)"; return i.e = n(t, o[1]), i }, parsePublicPKCS8Hex: function parsePublicPKCS8Hex(t) { var e = q, r = e.getChildIdx, n = e.getV, i = { algparam: null }, o = r(t, 0); if (2 != o.length) throw "outer DERSequence shall have 2 elements: " + o.length; var s = o[0]; if ("30" != t.substr(s, 2)) throw "malformed PKCS8 public key(code:001)"; var a = r(t, s); if (2 != a.length) throw "malformed PKCS8 public key(code:002)"; if ("06" != t.substr(a[0], 2)) throw "malformed PKCS8 public key(code:003)"; if (i.algoid = n(t, a[0]), "06" == t.substr(a[1], 2) ? i.algparam = n(t, a[1]) : "30" == t.substr(a[1], 2) && (i.algparam = {}, i.algparam.p = e.getVbyList(t, a[1], [0], "02"), i.algparam.q = e.getVbyList(t, a[1], [1], "02"), i.algparam.g = e.getVbyList(t, a[1], [2], "02")), "03" != t.substr(o[1], 2)) throw "malformed PKCS8 public key(code:004)"; return i.key = n(t, o[1]).substr(2), i } } }(); J.getKey = function (t, e, r) { var n = (v = q).getChildIdx, i = (v.getV, v.getVbyList), o = K.crypto, s = o.ECDSA, a = o.DSA, u = RSAKey, c = pemtohex, f = J; if (void 0 !== u && t instanceof u) return t; if (void 0 !== s && t instanceof s) return t; if (void 0 !== a && t instanceof a) return t; if (void 0 !== t.curve && void 0 !== t.xy && void 0 === t.d) return new s({ pub: t.xy, curve: t.curve }); if (void 0 !== t.curve && void 0 !== t.d) return new s({ prv: t.d, curve: t.curve }); if (void 0 === t.kty && void 0 !== t.n && void 0 !== t.e && void 0 === t.d) return (P = new u).setPublic(t.n, t.e), P; 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) return (P = new u).setPrivateEx(t.n, t.e, t.d, t.p, t.q, t.dp, t.dq, t.co), P; if (void 0 === t.kty && void 0 !== t.n && void 0 !== t.e && void 0 !== t.d && void 0 === t.p) return (P = new u).setPrivate(t.n, t.e, t.d), P; if (void 0 !== t.p && void 0 !== t.q && void 0 !== t.g && void 0 !== t.y && void 0 === t.x) return (P = new a).setPublic(t.p, t.q, t.g, t.y), P; if (void 0 !== t.p && void 0 !== t.q && void 0 !== t.g && void 0 !== t.y && void 0 !== t.x) return (P = new a).setPrivate(t.p, t.q, t.g, t.y, t.x), P; if ("RSA" === t.kty && void 0 !== t.n && void 0 !== t.e && void 0 === t.d) return (P = new u).setPublic(b64utohex(t.n), b64utohex(t.e)), P; 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) return (P = new u).setPrivateEx(b64utohex(t.n), b64utohex(t.e), b64utohex(t.d), b64utohex(t.p), b64utohex(t.q), b64utohex(t.dp), b64utohex(t.dq), b64utohex(t.qi)), P; if ("RSA" === t.kty && void 0 !== t.n && void 0 !== t.e && void 0 !== t.d) return (P = new u).setPrivate(b64utohex(t.n), b64utohex(t.e), b64utohex(t.d)), P; if ("EC" === t.kty && void 0 !== t.crv && void 0 !== t.x && void 0 !== t.y && void 0 === t.d) { var h = (A = new s({ curve: t.crv })).ecparams.keylen / 4, l = "04" + ("0000000000" + b64utohex(t.x)).slice(-h) + ("0000000000" + b64utohex(t.y)).slice(-h); return A.setPublicKeyHex(l), A } if ("EC" === t.kty && void 0 !== t.crv && void 0 !== t.x && void 0 !== t.y && void 0 !== t.d) { h = (A = new s({ curve: t.crv })).ecparams.keylen / 4, l = "04" + ("0000000000" + b64utohex(t.x)).slice(-h) + ("0000000000" + b64utohex(t.y)).slice(-h); var p = ("0000000000" + b64utohex(t.d)).slice(-h); return A.setPublicKeyHex(l), A.setPrivateKeyHex(p), A } if ("pkcs5prv" === r) { var g, d = t, v = q; if (9 === (g = n(d, 0)).length) (P = new u).readPKCS5PrvKeyHex(d); else if (6 === g.length) (P = new a).readPKCS5PrvKeyHex(d); else { if (!(g.length > 2 && "04" === d.substr(g[1], 2))) throw "unsupported PKCS#1/5 hexadecimal key"; (P = new s).readPKCS5PrvKeyHex(d) } return P } if ("pkcs8prv" === r) return P = f.getKeyFromPlainPrivatePKCS8Hex(t); if ("pkcs8pub" === r) return f._getKeyFromPublicPKCS8Hex(t); if ("x509pub" === r) return X509.getPublicKeyFromCertHex(t); if (-1 != t.indexOf("-END CERTIFICATE-", 0) || -1 != t.indexOf("-END X509 CERTIFICATE-", 0) || -1 != t.indexOf("-END TRUSTED CERTIFICATE-", 0)) return X509.getPublicKeyFromCertPEM(t); if (-1 != t.indexOf("-END PUBLIC KEY-")) { var y = pemtohex(t, "PUBLIC KEY"); return f._getKeyFromPublicPKCS8Hex(y) } if (-1 != t.indexOf("-END RSA PRIVATE KEY-") && -1 == t.indexOf("4,ENCRYPTED")) { var m = c(t, "RSA PRIVATE KEY"); return f.getKey(m, null, "pkcs5prv") } if (-1 != t.indexOf("-END DSA PRIVATE KEY-") && -1 == t.indexOf("4,ENCRYPTED")) { var S = i(C = c(t, "DSA PRIVATE KEY"), 0, [1], "02"), _ = i(C, 0, [2], "02"), b = i(C, 0, [3], "02"), F = i(C, 0, [4], "02"), w = i(C, 0, [5], "02"); return (P = new a).setPrivate(new BigInteger(S, 16), new BigInteger(_, 16), new BigInteger(b, 16), new BigInteger(F, 16), new BigInteger(w, 16)), P } if (-1 != t.indexOf("-END PRIVATE KEY-")) return f.getKeyFromPlainPrivatePKCS8PEM(t); if (-1 != t.indexOf("-END RSA PRIVATE KEY-") && -1 != t.indexOf("4,ENCRYPTED")) { var E = f.getDecryptedKeyHex(t, e), x = new RSAKey; return x.readPKCS5PrvKeyHex(E), x } if (-1 != t.indexOf("-END EC PRIVATE KEY-") && -1 != t.indexOf("4,ENCRYPTED")) { var A, P = i(C = f.getDecryptedKeyHex(t, e), 0, [1], "04"), k = i(C, 0, [2, 0], "06"), I = i(C, 0, [3, 0], "03").substr(2); if (void 0 === K.crypto.OID.oidhex2name[k]) throw "undefined OID(hex) in KJUR.crypto.OID: " + k; return (A = new s({ curve: K.crypto.OID.oidhex2name[k] })).setPublicKeyHex(I), A.setPrivateKeyHex(P), A.isPublic = !1, A } if (-1 != t.indexOf("-END DSA PRIVATE KEY-") && -1 != t.indexOf("4,ENCRYPTED")) { var C; S = i(C = f.getDecryptedKeyHex(t, e), 0, [1], "02"), _ = i(C, 0, [2], "02"), b = i(C, 0, [3], "02"), F = i(C, 0, [4], "02"), w = i(C, 0, [5], "02"); return (P = new a).setPrivate(new BigInteger(S, 16), new BigInteger(_, 16), new BigInteger(b, 16), new BigInteger(F, 16), new BigInteger(w, 16)), P } if (-1 != t.indexOf("-END ENCRYPTED PRIVATE KEY-")) return f.getKeyFromEncryptedPKCS8PEM(t, e); throw "not supported argument" }, J.generateKeypair = function (t, e) { if ("RSA" == t) { var r = e; (s = new RSAKey).generate(r, "10001"), s.isPrivate = !0, s.isPublic = !0; var n = new RSAKey, i = s.n.toString(16), o = s.e.toString(16); return n.setPublic(i, o), n.isPrivate = !1, n.isPublic = !0, (a = {}).prvKeyObj = s, a.pubKeyObj = n, a } if ("EC" == t) { var s, a, u = e, c = new K.crypto.ECDSA({ curve: u }).generateKeyPairHex(); return (s = new K.crypto.ECDSA({ curve: u })).setPublicKeyHex(c.ecpubhex), s.setPrivateKeyHex(c.ecprvhex), s.isPrivate = !0, s.isPublic = !1, (n = new K.crypto.ECDSA({ curve: u })).setPublicKeyHex(c.ecpubhex), n.isPrivate = !1, n.isPublic = !0, (a = {}).prvKeyObj = s, a.pubKeyObj = n, a } throw "unknown algorithm: " + t }, J.getPEM = function (t, e, r, n, i, s) { var a = K, u = a.asn1, c = u.DERObjectIdentifier, f = u.DERInteger, h = u.ASN1Util.newObject, l = u.x509.SubjectPublicKeyInfo, p = a.crypto, g = p.DSA, d = p.ECDSA, y = RSAKey; function A(t) { return h({ 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 } }] }) } function B(t) { return h({ seq: [{ int: 1 }, { octstr: { hex: t.prvKeyHex } }, { tag: ["a0", !0, { oid: { name: t.curveName } }] }, { tag: ["a1", !0, { bitstr: { hex: "00" + t.pubKeyHex } }] }] }) } function x(t) { return h({ seq: [{ int: 0 }, { int: { bigint: t.p } }, { int: { bigint: t.q } }, { int: { bigint: t.g } }, { int: { bigint: t.y } }, { int: { bigint: t.x } }] }) } if ((void 0 !== y && t instanceof y || void 0 !== g && t instanceof g || void 0 !== d && t instanceof d) && 1 == t.isPublic && (void 0 === e || "PKCS8PUB" == e)) return hextopem(b = new l(t).getEncodedHex(), "PUBLIC KEY"); if ("PKCS1PRV" == e && void 0 !== y && t instanceof y && (void 0 === r || null == r) && 1 == t.isPrivate) return hextopem(b = A(t).getEncodedHex(), "RSA PRIVATE KEY"); if ("PKCS1PRV" == e && void 0 !== d && t instanceof d && (void 0 === r || null == r) && 1 == t.isPrivate) { var m = new c({ name: t.curveName }).getEncodedHex(), S = B(t).getEncodedHex(), _ = ""; return _ += hextopem(m, "EC PARAMETERS"), _ += hextopem(S, "EC PRIVATE KEY") } if ("PKCS1PRV" == e && void 0 !== g && t instanceof g && (void 0 === r || null == r) && 1 == t.isPrivate) return hextopem(b = x(t).getEncodedHex(), "DSA PRIVATE KEY"); if ("PKCS5PRV" == e && void 0 !== y && t instanceof y && void 0 !== r && null != r && 1 == t.isPrivate) { var b = A(t).getEncodedHex(); return void 0 === n && (n = "DES-EDE3-CBC"), this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA", b, r, n, s) } if ("PKCS5PRV" == e && void 0 !== d && t instanceof d && void 0 !== r && null != r && 1 == t.isPrivate) { b = B(t).getEncodedHex(); return void 0 === n && (n = "DES-EDE3-CBC"), this.getEncryptedPKCS5PEMFromPrvKeyHex("EC", b, r, n, s) } if ("PKCS5PRV" == e && void 0 !== g && t instanceof g && void 0 !== r && null != r && 1 == t.isPrivate) { b = x(t).getEncodedHex(); return void 0 === n && (n = "DES-EDE3-CBC"), this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA", b, r, n, s) } var F = function o(t, e) { var r = w(t, e); return new h({ seq: [{ seq: [{ oid: { name: "pkcs5PBES2" } }, { seq: [{ seq: [{ oid: { name: "pkcs5PBKDF2" } }, { seq: [{ octstr: { hex: r.pbkdf2Salt } }, { int: r.pbkdf2Iter }] }] }, { seq: [{ oid: { name: "des-EDE3-CBC" } }, { octstr: { hex: r.encryptionSchemeIV } }] }] }] }, { octstr: { hex: r.ciphertext } }] }).getEncodedHex() }, w = function c(t, e) { var r = v.lib.WordArray.random(8), n = v.lib.WordArray.random(8), i = v.PBKDF2(e, r, { keySize: 6, iterations: 100 }), o = v.enc.Hex.parse(t), s = v.TripleDES.encrypt(o, i, { iv: n }) + "", a = {}; return a.ciphertext = s, a.pbkdf2Salt = v.enc.Hex.stringify(r), a.pbkdf2Iter = 100, a.encryptionSchemeAlg = "DES-EDE3-CBC", a.encryptionSchemeIV = v.enc.Hex.stringify(n), a }; if ("PKCS8PRV" == e && void 0 != y && t instanceof y && 1 == t.isPrivate) { var E = A(t).getEncodedHex(); b = h({ seq: [{ int: 0 }, { seq: [{ oid: { name: "rsaEncryption" } }, { null: !0 }] }, { octstr: { hex: E } }] }).getEncodedHex(); return void 0 === r || null == r ? hextopem(b, "PRIVATE KEY") : hextopem(S = F(b, r), "ENCRYPTED PRIVATE KEY") } if ("PKCS8PRV" == e && void 0 !== d && t instanceof d && 1 == t.isPrivate) { E = new h({ seq: [{ int: 1 }, { octstr: { hex: t.prvKeyHex } }, { tag: ["a1", !0, { bitstr: { hex: "00" + t.pubKeyHex } }] }] }).getEncodedHex(), b = h({ seq: [{ int: 0 }, { seq: [{ oid: { name: "ecPublicKey" } }, { oid: { name: t.curveName } }] }, { octstr: { hex: E } }] }).getEncodedHex(); return void 0 === r || null == r ? hextopem(b, "PRIVATE KEY") : hextopem(S = F(b, r), "ENCRYPTED PRIVATE KEY") } if ("PKCS8PRV" == e && void 0 !== g && t instanceof g && 1 == t.isPrivate) { E = new f({ bigint: t.x }).getEncodedHex(), b = h({ seq: [{ int: 0 }, { seq: [{ oid: { name: "dsa" } }, { seq: [{ int: { bigint: t.p } }, { int: { bigint: t.q } }, { int: { bigint: t.g } }] }] }, { octstr: { hex: E } }] }).getEncodedHex(); return void 0 === r || null == r ? hextopem(b, "PRIVATE KEY") : hextopem(S = F(b, r), "ENCRYPTED PRIVATE KEY") } throw "unsupported object nor format" }, J.getKeyFromCSRPEM = function (t) { var e = pemtohex(t, "CERTIFICATE REQUEST"); return J.getKeyFromCSRHex(e) }, J.getKeyFromCSRHex = function (t) { var e = J.parseCSRHex(t); return J.getKey(e.p8pubkeyhex, null, "pkcs8pub") }, J.parseCSRHex = function (t) { var e = q, r = e.getChildIdx, n = e.getTLV, i = {}, o = t; if ("30" != o.substr(0, 2)) throw "malformed CSR(code:001)"; var s = r(o, 0); if (s.length < 1) throw "malformed CSR(code:002)"; if ("30" != o.substr(s[0], 2)) throw "malformed CSR(code:003)"; var a = r(o, s[0]); if (a.length < 3) throw "malformed CSR(code:004)"; return i.p8pubkeyhex = n(o, a[2]), i }, J.getJWKFromKey = function (t) { var e = {}; if (t instanceof RSAKey && t.isPrivate) return e.kty = "RSA", e.n = hextob64u(t.n.toString(16)), e.e = hextob64u(t.e.toString(16)), e.d = hextob64u(t.d.toString(16)), e.p = hextob64u(t.p.toString(16)), e.q = hextob64u(t.q.toString(16)), e.dp = hextob64u(t.dmp1.toString(16)), e.dq = hextob64u(t.dmq1.toString(16)), e.qi = hextob64u(t.coeff.toString(16)), e; if (t instanceof RSAKey && t.isPublic) return e.kty = "RSA", e.n = hextob64u(t.n.toString(16)), e.e = hextob64u(t.e.toString(16)), e; if (t instanceof K.crypto.ECDSA && t.isPrivate) { if ("P-256" !== (n = t.getShortNISTPCurveName()) && "P-384" !== n) throw "unsupported curve name for JWT: " + n; var r = t.getPublicKeyXYHex(); return e.kty = "EC", e.crv = n, e.x = hextob64u(r.x), e.y = hextob64u(r.y), e.d = hextob64u(t.prvKeyHex), e } if (t instanceof K.crypto.ECDSA && t.isPublic) { var n; if ("P-256" !== (n = t.getShortNISTPCurveName()) && "P-384" !== n) throw "unsupported curve name for JWT: " + n; r = t.getPublicKeyXYHex(); return e.kty = "EC", e.crv = n, e.x = hextob64u(r.x), e.y = hextob64u(r.y), e } throw "not supported key object" }, RSAKey.getPosArrayOfChildrenFromHex = function (t) { return q.getChildIdx(t, 0) }, RSAKey.getHexValueArrayOfChildrenFromHex = function (t) { var e, r = q.getV, n = r(t, (e = RSAKey.getPosArrayOfChildrenFromHex(t))[0]), i = r(t, e[1]), o = r(t, e[2]), s = r(t, e[3]), a = r(t, e[4]), u = r(t, e[5]), c = r(t, e[6]), f = r(t, e[7]), h = r(t, e[8]); return (e = new Array).push(n, i, o, s, a, u, c, f, h), e }, RSAKey.prototype.readPrivateKeyFromPEMString = function (t) { var e = pemtohex(t), r = RSAKey.getHexValueArrayOfChildrenFromHex(e); this.setPrivateEx(r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8]) }, RSAKey.prototype.readPKCS5PrvKeyHex = function (t) { var e = RSAKey.getHexValueArrayOfChildrenFromHex(t); this.setPrivateEx(e[1], e[2], e[3], e[4], e[5], e[6], e[7], e[8]) }, RSAKey.prototype.readPKCS8PrvKeyHex = function (t) { var e, r, n, i, o, s, a, u, c = q, f = c.getVbyList; if (!1 === c.isASN1HEX(t)) throw "not ASN.1 hex string"; try { e = f(t, 0, [2, 0, 1], "02"), r = f(t, 0, [2, 0, 2], "02"), n = f(t, 0, [2, 0, 3], "02"), i = f(t, 0, [2, 0, 4], "02"), o = f(t, 0, [2, 0, 5], "02"), s = f(t, 0, [2, 0, 6], "02"), a = f(t, 0, [2, 0, 7], "02"), u = f(t, 0, [2, 0, 8], "02") } catch (t) { throw "malformed PKCS#8 plain RSA private key" } this.setPrivateEx(e, r, n, i, o, s, a, u) }, RSAKey.prototype.readPKCS5PubKeyHex = function (t) { var e = q, r = e.getV; if (!1 === e.isASN1HEX(t)) throw "keyHex is not ASN.1 hex string"; var n = e.getChildIdx(t, 0); if (2 !== n.length || "02" !== t.substr(n[0], 2) || "02" !== t.substr(n[1], 2)) throw "wrong hex for PKCS#5 public key"; var i = r(t, n[0]), o = r(t, n[1]); this.setPublic(i, o) }, RSAKey.prototype.readPKCS8PubKeyHex = function (t) { var e = q; if (!1 === e.isASN1HEX(t)) throw "not ASN.1 hex string"; if ("06092a864886f70d010101" !== e.getTLVbyList(t, 0, [0, 0])) throw "not PKCS8 RSA public key"; var r = e.getTLVbyList(t, 0, [1, 0]); this.readPKCS5PubKeyHex(r) }, RSAKey.prototype.readCertPubKeyHex = function (t, e) { var r, n; (r = new X509).readCertHex(t), n = r.getPublicKeyHex(), this.readPKCS8PubKeyHex(n) }; var z = new RegExp(""); function _zeroPaddingOfSignature(t, e) { for (var r = "", n = e / 4 - t.length, i = 0; i < n; i++)r += "0"; return r + t } function pss_mgf1_str(t, e, r) { for (var n = "", i = 0; n.length < e;)n += hextorstr(r(rstrtohex(t + String.fromCharCode.apply(String, [(4278190080 & i) >> 24, (16711680 & i) >> 16, (65280 & i) >> 8, 255 & i])))), i += 1; return n } function _rsasign_getAlgNameAndHashFromHexDisgestInfo(t) { for (var e in K.crypto.Util.DIGESTINFOHEAD) { var r = K.crypto.Util.DIGESTINFOHEAD[e], n = r.length; if (t.substring(0, n) == r) return [e, t.substring(n)] } return [] } function X509() { var t = q, e = t.getChildIdx, r = t.getV, n = t.getTLV, i = t.getVbyList, o = t.getTLVbyList, s = t.getIdxbyList, a = t.getVidx, u = t.oidname, c = X509, f = pemtohex; this.hex = null, this.version = 0, this.foffset = 0, this.aExtInfo = null, this.getVersion = function () { return null === this.hex || 0 !== this.version ? this.version : "a003020102" !== o(this.hex, 0, [0, 0]) ? (this.version = 1, this.foffset = -1, 1) : (this.version = 3, 3) }, this.getSerialNumberHex = function () { return i(this.hex, 0, [0, 1 + this.foffset], "02") }, this.getSignatureAlgorithmField = function () { return u(i(this.hex, 0, [0, 2 + this.foffset, 0], "06")) }, this.getIssuerHex = function () { return o(this.hex, 0, [0, 3 + this.foffset], "30") }, this.getIssuerString = function () { return c.hex2dn(this.getIssuerHex()) }, this.getSubjectHex = function () { return o(this.hex, 0, [0, 5 + this.foffset], "30") }, this.getSubjectString = function () { return c.hex2dn(this.getSubjectHex()) }, this.getNotBefore = function () { var t = i(this.hex, 0, [0, 4 + this.foffset, 0]); return t = t.replace(/(..)/g, "%$1"), t = decodeURIComponent(t) }, this.getNotAfter = function () { var t = i(this.hex, 0, [0, 4 + this.foffset, 1]); return t = t.replace(/(..)/g, "%$1"), t = decodeURIComponent(t) }, this.getPublicKeyHex = function () { return t.getTLVbyList(this.hex, 0, [0, 6 + this.foffset], "30") }, this.getPublicKeyIdx = function () { return s(this.hex, 0, [0, 6 + this.foffset], "30") }, this.getPublicKeyContentIdx = function () { var t = this.getPublicKeyIdx(); return s(this.hex, t, [1, 0], "30") }, this.getPublicKey = function () { return J.getKey(this.getPublicKeyHex(), null, "pkcs8pub") }, this.getSignatureAlgorithmName = function () { return u(i(this.hex, 0, [1, 0], "06")) }, this.getSignatureValueHex = function () { return i(this.hex, 0, [2], "03", !0) }, this.verifySignature = function (t) { var e = this.getSignatureAlgorithmName(), r = this.getSignatureValueHex(), n = o(this.hex, 0, [0], "30"), i = new K.crypto.Signature({ alg: e }); return i.init(t), i.updateHex(n), i.verify(r) }, this.parseExt = function () { if (3 !== this.version) return -1; var r = s(this.hex, 0, [0, 7, 0], "30"), n = e(this.hex, r); this.aExtInfo = new Array; for (var o = 0; o < n.length; o++) { var u = { critical: !1 }, c = 0; 3 === e(this.hex, n[o]).length && (u.critical = !0, c = 1), u.oid = t.hextooidstr(i(this.hex, n[o], [0], "06")); var f = s(this.hex, n[o], [1 + c]); u.vidx = a(this.hex, f), this.aExtInfo.push(u) } }, this.getExtInfo = function (t) { var e = this.aExtInfo, r = t; if (t.match(/^[0-9.]+$/) || (r = K.asn1.x509.OID.name2oid(t)), "" !== r) for (var n = 0; n < e.length; n++)if (e[n].oid === r) return e[n] }, this.getExtBasicConstraints = function () { var t = this.getExtInfo("basicConstraints"); if (void 0 === t) return t; var e = r(this.hex, t.vidx); if ("" === e) return {}; if ("0101ff" === e) return { cA: !0 }; if ("0101ff02" === e.substr(0, 8)) { var n = r(e, 6); return { cA: !0, pathLen: parseInt(n, 16) } } throw "basicConstraints parse error" }, this.getExtKeyUsageBin = function () { var t = this.getExtInfo("keyUsage"); if (void 0 === t) return ""; var e = r(this.hex, t.vidx); if (e.length % 2 != 0 || e.length <= 2) throw "malformed key usage value"; var n = parseInt(e.substr(0, 2)), i = parseInt(e.substr(2), 16).toString(2); return i.substr(0, i.length - n) }, this.getExtKeyUsageString = function () { for (var t = this.getExtKeyUsageBin(), e = new Array, r = 0; r < t.length; r++)"1" == t.substr(r, 1) && e.push(X509.KEYUSAGE_NAME[r]); return e.join(",") }, this.getExtSubjectKeyIdentifier = function () { var t = this.getExtInfo("subjectKeyIdentifier"); return void 0 === t ? t : r(this.hex, t.vidx) }, this.getExtAuthorityKeyIdentifier = function () { var t = this.getExtInfo("authorityKeyIdentifier"); if (void 0 === t) return t; for (var i = {}, o = n(this.hex, t.vidx), s = e(o, 0), a = 0; a < s.length; a++)"80" === o.substr(s[a], 2) && (i.kid = r(o, s[a])); return i }, this.getExtExtKeyUsageName = function () { var t = this.getExtInfo("extKeyUsage"); if (void 0 === t) return t; var i = new Array, o = n(this.hex, t.vidx); if ("" === o) return i; for (var s = e(o, 0), a = 0; a < s.length; a++)i.push(u(r(o, s[a]))); return i }, this.getExtSubjectAltName = function () { for (var t = this.getExtSubjectAltName2(), e = new Array, r = 0; r < t.length; r++)"DNS" === t[r][0] && e.push(t[r][1]); return e }, this.getExtSubjectAltName2 = function () { var t, i, o, s = this.getExtInfo("subjectAltName"); if (void 0 === s) return s; for (var a = new Array, u = n(this.hex, s.vidx), c = e(u, 0), f = 0; f < c.length; f++)o = u.substr(c[f], 2), t = r(u, c[f]), "81" === o && (i = hextoutf8(t), a.push(["MAIL", i])), "82" === o && (i = hextoutf8(t), a.push(["DNS", i])), "84" === o && (i = X509.hex2dn(t, 0), a.push(["DN", i])), "86" === o && (i = hextoutf8(t), a.push(["URI", i])), "87" === o && (i = hextoip(t), a.push(["IP", i])); return a }, this.getExtCRLDistributionPointsURI = function () { var t = this.getExtInfo("cRLDistributionPoints"); if (void 0 === t) return t; for (var r = new Array, n = e(this.hex, t.vidx), o = 0; o < n.length; o++)try { var s = hextoutf8(i(this.hex, n[o], [0, 0, 0], "86")); r.push(s) } catch (t) { } return r }, this.getExtAIAInfo = function () { var t = this.getExtInfo("authorityInfoAccess"); if (void 0 === t) return t; for (var r = { ocsp: [], caissuer: [] }, n = e(this.hex, t.vidx), o = 0; o < n.length; o++) { var s = i(this.hex, n[o], [0], "06"), a = i(this.hex, n[o], [1], "86"); "2b06010505073001" === s && r.ocsp.push(hextoutf8(a)), "2b06010505073002" === s && r.caissuer.push(hextoutf8(a)) } return r }, this.getExtCertificatePolicies = function () { var t = this.getExtInfo("certificatePolicies"); if (void 0 === t) return t; for (var o = n(this.hex, t.vidx), s = [], a = e(o, 0), c = 0; c < a.length; c++) { var f = {}, h = e(o, a[c]); if (f.id = u(r(o, h[0])), 2 === h.length) for (var l = e(o, h[1]), p = 0; p < l.length; p++) { var g = i(o, l[p], [0], "06"); "2b06010505070201" === g ? f.cps = hextoutf8(i(o, l[p], [1])) : "2b06010505070202" === g && (f.unotice = hextoutf8(i(o, l[p], [1, 0]))) } s.push(f) } return s }, this.readCertPEM = function (t) { this.readCertHex(f(t)) }, this.readCertHex = function (t) { this.hex = t, this.getVersion(); try { s(this.hex, 0, [0, 7], "a3"), this.parseExt() } catch (t) { } }, this.getInfo = function () { var t, e, r; if (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", t += "    key algorithm: " + (e = this.getPublicKey()).type + "\n", "RSA" === e.type && (t += "    n=" + hextoposhex(e.n.toString(16)).substr(0, 16) + "...\n", t += "    e=" + hextoposhex(e.e.toString(16)) + "\n"), void 0 !== (r = this.aExtInfo) && null !== r) { t += "X509v3 Extensions:\n"; for (var n = 0; n < r.length; n++) { var i = r[n], o = K.asn1.x509.OID.oid2name(i.oid); "" === o && (o = i.oid); var s = ""; if (!0 === i.critical && (s = "CRITICAL"), t += "  " + o + " " + s + ":\n", "basicConstraints" === o) { var a = this.getExtBasicConstraints(); void 0 === a.cA ? t += "    {}\n" : (t += "    cA=true", void 0 !== a.pathLen && (t += ", pathLen=" + a.pathLen), t += "\n") } else if ("keyUsage" === o) t += "    " + this.getExtKeyUsageString() + "\n"; else if ("subjectKeyIdentifier" === o) t += "    " + this.getExtSubjectKeyIdentifier() + "\n"; else if ("authorityKeyIdentifier" === o) { var u = this.getExtAuthorityKeyIdentifier(); void 0 !== u.kid && (t += "    kid=" + u.kid + "\n") } else { if ("extKeyUsage" === o) t += "    " + this.getExtExtKeyUsageName().join(", ") + "\n"; else if ("subjectAltName" === o) t += "    " + this.getExtSubjectAltName2() + "\n"; else if ("cRLDistributionPoints" === o) t += "    " + this.getExtCRLDistributionPointsURI() + "\n"; else if ("authorityInfoAccess" === o) { var c = this.getExtAIAInfo(); void 0 !== c.ocsp && (t += "    ocsp: " + c.ocsp.join(",") + "\n"), void 0 !== c.caissuer && (t += "    caissuer: " + c.caissuer.join(",") + "\n") } else if ("certificatePolicies" === o) for (var f = this.getExtCertificatePolicies(), h = 0; h < f.length; h++)void 0 !== f[h].id && (t += "    policy oid: " + f[h].id + "\n"), void 0 !== f[h].cps && (t += "    cps: " + f[h].cps + "\n") } } } return t += "signature algorithm: " + this.getSignatureAlgorithmName() + "\n", t += "signature: " + this.getSignatureValueHex().substr(0, 16) + "...\n" } } z.compile("[^0-9a-f]", "gi"), RSAKey.prototype.sign = function (t, e) { var r = function b(t) { return K.crypto.Util.hashString(t, e) }(t); return this.signWithMessageHash(r, e) }, RSAKey.prototype.signWithMessageHash = function (t, e) { var r = parseBigInt(K.crypto.Util.getPaddedDigestInfoHex(t, e, this.n.bitLength()), 16); return _zeroPaddingOfSignature(this.doPrivate(r).toString(16), this.n.bitLength()) }, RSAKey.prototype.signPSS = function (t, e, r) { var n = function c(t) { return K.crypto.Util.hashHex(t, e) }(rstrtohex(t)); return void 0 === r && (r = -1), this.signWithMessageHashPSS(n, e, r) }, RSAKey.prototype.signWithMessageHashPSS = function (t, e, r) { var n, i = hextorstr(t), s = i.length, a = this.n.bitLength() - 1, u = Math.ceil(a / 8), c = function o(t) { return K.crypto.Util.hashHex(t, e) }; if (-1 === r || void 0 === r) r = s; else if (-2 === r) r = u - s - 2; else if (r < -2) throw "invalid salt length"; if (u < s + r + 2) throw "data too long"; var f = ""; r > 0 && (f = new Array(r), (new SecureRandom).nextBytes(f), f = String.fromCharCode.apply(String, f)); var h = hextorstr(c(rstrtohex("\0\0\0\0\0\0\0\0" + i + f))), l = []; for (n = 0; n < u - r - s - 2; n += 1)l[n] = 0; var p = String.fromCharCode.apply(String, l) + "" + f, g = pss_mgf1_str(h, p.length, c), d = []; for (n = 0; n < p.length; n += 1)d[n] = p.charCodeAt(n) ^ g.charCodeAt(n); var v = 65280 >> 8 * u - a & 255; for (d[0] &= ~v, n = 0; n < s; n++)d.push(h.charCodeAt(n)); return d.push(188), _zeroPaddingOfSignature(this.doPrivate(new BigInteger(d)).toString(16), this.n.bitLength()) }, RSAKey.prototype.verify = function (t, e) { var r = parseBigInt(e = (e = e.replace(z, "")).replace(/[ \n]+/g, ""), 16); if (r.bitLength() > this.n.bitLength()) return 0; var n = _rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(r).toString(16).replace(/^1f+00/, "")); if (0 == n.length) return !1; var i = n[0]; return n[1] == function a(t) { return K.crypto.Util.hashString(t, i) }(t) }, RSAKey.prototype.verifyWithMessageHash = function (t, e) { var r = parseBigInt(e = (e = e.replace(z, "")).replace(/[ \n]+/g, ""), 16); if (r.bitLength() > this.n.bitLength()) return 0; var n = _rsasign_getAlgNameAndHashFromHexDisgestInfo(this.doPublic(r).toString(16).replace(/^1f+00/, "")); if (0 == n.length) return !1; n[0]; return n[1] == t }, RSAKey.prototype.verifyPSS = function (t, r, n, i) { var o = function e(t) { return K.crypto.Util.hashHex(t, n) }(rstrtohex(t)); return void 0 === i && (i = -1), this.verifyWithMessageHashPSS(o, r, n, i) }, RSAKey.prototype.verifyWithMessageHashPSS = function (t, e, n, i) { var o = new BigInteger(e, 16); if (o.bitLength() > this.n.bitLength()) return !1; var s, a = function r(t) { return K.crypto.Util.hashHex(t, n) }, u = hextorstr(t), c = u.length, f = this.n.bitLength() - 1, h = Math.ceil(f / 8); if (-1 === i || void 0 === i) i = c; else if (-2 === i) i = h - c - 2; else if (i < -2) throw "invalid salt length"; if (h < c + i + 2) throw "data too long"; var l = this.doPublic(o).toByteArray(); for (s = 0; s < l.length; s += 1)l[s] &= 255; for (; l.length < h;)l.unshift(0); if (188 !== l[h - 1]) throw "encoded message does not end in 0xbc"; var p = (l = String.fromCharCode.apply(String, l)).substr(0, h - c - 1), g = l.substr(p.length, c), d = 65280 >> 8 * h - f & 255; if (0 != (p.charCodeAt(0) & d)) throw "bits beyond keysize not zero"; var v = pss_mgf1_str(g, p.length, a), y = []; for (s = 0; s < p.length; s += 1)y[s] = p.charCodeAt(s) ^ v.charCodeAt(s); y[0] &= ~d; var m = h - c - i - 2; for (s = 0; s < m; s += 1)if (0 !== y[s]) throw "leftmost octets not zero"; if (1 !== y[m]) throw "0x01 marker not found"; return g === hextorstr(a(rstrtohex("\0\0\0\0\0\0\0\0" + u + String.fromCharCode.apply(String, y.slice(-i))))) }, RSAKey.SALT_LEN_HLEN = -1, RSAKey.SALT_LEN_MAX = -2, RSAKey.SALT_LEN_RECOVER = -2, X509.hex2dn = function (t, e) { if (void 0 === e && (e = 0), "30" !== t.substr(e, 2)) throw "malformed DN"; for (var r = new Array, n = q.getChildIdx(t, e), i = 0; i < n.length; i++)r.push(X509.hex2rdn(t, n[i])); return "/" + (r = r.map(function (t) { return t.replace("/", "\\/") })).join("/") }, X509.hex2rdn = function (t, e) { if (void 0 === e && (e = 0), "31" !== t.substr(e, 2)) throw "malformed RDN"; for (var r = new Array, n = q.getChildIdx(t, e), i = 0; i < n.length; i++)r.push(X509.hex2attrTypeValue(t, n[i])); return (r = r.map(function (t) { return t.replace("+", "\\+") })).join("+") }, X509.hex2attrTypeValue = function (t, e) { var r = q, n = r.getV; if (void 0 === e && (e = 0), "30" !== t.substr(e, 2)) throw "malformed attribute type and value"; var i = r.getChildIdx(t, e); 2 !== i.length || t.substr(i[0], 2); var o = n(t, i[0]), s = K.asn1.ASN1Util.oidHexToInt(o); return K.asn1.x509.OID.oid2atype(s) + "=" + hextorstr(n(t, i[1])) }, X509.getPublicKeyFromCertHex = function (t) { var e = new X509; return e.readCertHex(t), e.getPublicKey() }, X509.getPublicKeyFromCertPEM = function (t) { var e = new X509; return e.readCertPEM(t), e.getPublicKey() }, X509.getPublicKeyInfoPropOfCertPEM = function (t) { var e, r, n = q.getVbyList, i = {}; return i.algparam = null, (e = new X509).readCertPEM(t), r = e.getPublicKeyHex(), i.keyhex = n(r, 0, [1], "03").substr(2), i.algoid = n(r, 0, [0, 0], "06"), "2a8648ce3d0201" === i.algoid && (i.algparam = n(r, 0, [0, 1], "06")), i }, X509.KEYUSAGE_NAME = ["digitalSignature", "nonRepudiation", "keyEncipherment", "dataEncipherment", "keyAgreement", "keyCertSign", "cRLSign", "encipherOnly", "decipherOnly"], void 0 !== K && K || (K = {}), void 0 !== K.jws && K.jws || (K.jws = {}), K.jws.JWS = function () { var t = K.jws.JWS.isSafeJSONString; this.parseJWS = function (e, r) { if (void 0 === this.parsedJWS || !r && void 0 === this.parsedJWS.sigvalH) { var n = e.match(/^([^.]+)\.([^.]+)\.([^.]+)$/); if (null == n) throw "JWS signature is not a form of 'Head.Payload.SigValue'."; var i = n[1], o = n[2], s = n[3], a = i + "." + o; if (this.parsedJWS = {}, this.parsedJWS.headB64U = i, this.parsedJWS.payloadB64U = o, this.parsedJWS.sigvalB64U = s, this.parsedJWS.si = a, !r) { var u = b64utohex(s), c = parseBigInt(u, 16); this.parsedJWS.sigvalH = u, this.parsedJWS.sigvalBI = c } var f = W(i), h = W(o); if (this.parsedJWS.headS = f, this.parsedJWS.payloadS = h, !t(f, this.parsedJWS, "headP")) throw "malformed JSON string for JWS Head: " + f } } }, K.jws.JWS.sign = function (t, e, r, i, o) { var s, a, u, c = K, f = c.jws.JWS, h = f.readSafeJSONString, l = f.isSafeJSONString, p = c.crypto, g = (p.ECDSA, p.Mac), d = p.Signature, v = JSON; if ("string" != typeof e && "object" != (void 0 === e ? "undefined" : n(e))) throw "spHeader must be JSON string or object: " + e; if ("object" == (void 0 === e ? "undefined" : n(e)) && (a = e, s = v.stringify(a)), "string" == typeof e) { if (!l(s = e)) throw "JWS Head is not safe JSON string: " + s; a = h(s) } if (u = r, "object" == (void 0 === r ? "undefined" : n(r)) && (u = v.stringify(r)), "" != t && null != t || void 0 === a.alg || (t = a.alg), "" != t && null != t && void 0 === a.alg && (a.alg = t, s = v.stringify(a)), t !== a.alg) throw "alg and sHeader.alg doesn't match: " + t + "!=" + a.alg; var y = null; if (void 0 === f.jwsalg2sigalg[t]) throw "unsupported alg name: " + t; y = f.jwsalg2sigalg[t]; var m = V(s) + "." + V(u), S = ""; if ("Hmac" == y.substr(0, 4)) { if (void 0 === i) throw "mac key shall be specified for HS* alg"; var _ = new g({ alg: y, prov: "cryptojs", pass: i }); _.updateString(m), S = _.doFinal() } else { var b; if (-1 != y.indexOf("withECDSA")) (b = new d({ alg: y })).init(i, o), b.updateString(m), hASN1Sig = b.sign(), S = K.crypto.ECDSA.asn1SigToConcatSig(hASN1Sig); else if ("none" != y) (b = new d({ alg: y })).init(i, o), b.updateString(m), S = b.sign() } return m + "." + hextob64u(S) }, K.jws.JWS.verify = function (t, e, r) { var i, o = K, s = o.jws.JWS, a = s.readSafeJSONString, u = o.crypto, c = u.ECDSA, f = u.Mac, h = u.Signature; void 0 !== n(RSAKey) && (i = RSAKey); var l = t.split("."); if (3 !== l.length) return !1; var p = l[0] + "." + l[1], g = b64utohex(l[2]), d = a(W(l[0])), v = null, y = null; if (void 0 === d.alg) throw "algorithm not specified in header"; if ((y = (v = d.alg).substr(0, 2), null != r && "[object Array]" === Object.prototype.toString.call(r) && r.length > 0) && -1 == (":" + r.join(":") + ":").indexOf(":" + v + ":")) throw "algorithm '" + v + "' not accepted in the list"; if ("none" != v && null === e) throw "key shall be specified to verify."; if ("string" == typeof e && -1 != e.indexOf("-----BEGIN ") && (e = J.getKey(e)), !("RS" != y && "PS" != y || e instanceof i)) throw "key shall be a RSAKey obj for RS* and PS* algs"; if ("ES" == y && !(e instanceof c)) throw "key shall be a ECDSA obj for ES* algs"; var m = null; if (void 0 === s.jwsalg2sigalg[d.alg]) throw "unsupported alg name: " + v; if ("none" == (m = s.jwsalg2sigalg[v])) throw "not supported"; if ("Hmac" == m.substr(0, 4)) { if (void 0 === e) throw "hexadecimal key shall be specified for HMAC"; var S = new f({ alg: m, pass: e }); return S.updateString(p), g == S.doFinal() } if (-1 != m.indexOf("withECDSA")) { var _, b = null; try { b = c.concatSigToASN1Sig(g) } catch (t) { return !1 } return (_ = new h({ alg: m })).init(e), _.updateString(p), _.verify(b) } return (_ = new h({ alg: m })).init(e), _.updateString(p), _.verify(g) }, K.jws.JWS.parse = function (t) { var e, r, n, i = t.split("."), o = {}; if (2 != i.length && 3 != i.length) throw "malformed sJWS: wrong number of '.' splitted elements"; return e = i[0], r = i[1], 3 == i.length && (n = i[2]), o.headerObj = K.jws.JWS.readSafeJSONString(W(e)), o.payloadObj = K.jws.JWS.readSafeJSONString(W(r)), o.headerPP = JSON.stringify(o.headerObj, null, "  "), null == o.payloadObj ? o.payloadPP = W(r) : o.payloadPP = JSON.stringify(o.payloadObj, null, "  "), void 0 !== n && (o.sigHex = b64utohex(n)), o }, K.jws.JWS.verifyJWT = function (t, e, r) { var i = K.jws, o = i.JWS, s = o.readSafeJSONString, a = o.inArray, u = o.includedArray, c = t.split("."), f = c[0], h = c[1], l = (b64utohex(c[2]), s(W(f))), p = s(W(h)); if (void 0 === l.alg) return !1; if (void 0 === r.alg) throw "acceptField.alg shall be specified"; if (!a(l.alg, r.alg)) return !1; if (void 0 !== p.iss && "object" === n(r.iss) && !a(p.iss, r.iss)) return !1; if (void 0 !== p.sub && "object" === n(r.sub) && !a(p.sub, r.sub)) return !1; if (void 0 !== p.aud && "object" === n(r.aud)) if ("string" == typeof p.aud) { if (!a(p.aud, r.aud)) return !1 } else if ("object" == n(p.aud) && !u(p.aud, r.aud)) return !1; var g = i.IntDate.getNow(); return void 0 !== r.verifyAt && "number" == typeof r.verifyAt && (g = r.verifyAt), void 0 !== r.gracePeriod && "number" == typeof r.gracePeriod || (r.gracePeriod = 0), !(void 0 !== p.exp && "number" == typeof p.exp && p.exp + r.gracePeriod < g) && (!(void 0 !== p.nbf && "number" == typeof p.nbf && g < p.nbf - r.gracePeriod) && (!(void 0 !== p.iat && "number" == typeof p.iat && g < p.iat - r.gracePeriod) && ((void 0 === p.jti || void 0 === r.jti || p.jti === r.jti) && !!o.verify(t, e, r.alg)))) }, K.jws.JWS.includedArray = function (t, e) { var r = K.jws.JWS.inArray; if (null === t) return !1; if ("object" !== (void 0 === t ? "undefined" : n(t))) return !1; if ("number" != typeof t.length) return !1; for (var i = 0; i < t.length; i++)if (!r(t[i], e)) return !1; return !0 }, K.jws.JWS.inArray = function (t, e) { if (null === e) return !1; if ("object" !== (void 0 === e ? "undefined" : n(e))) return !1; if ("number" != typeof e.length) return !1; for (var r = 0; r < e.length; r++)if (e[r] == t) return !0; return !1 }, K.jws.JWS.jwsalg2sigalg = { HS256: "HmacSHA256", HS384: "HmacSHA384", HS512: "HmacSHA512", RS256: "SHA256withRSA", RS384: "SHA384withRSA", RS512: "SHA512withRSA", ES256: "SHA256withECDSA", ES384: "SHA384withECDSA", PS256: "SHA256withRSAandMGF1", PS384: "SHA384withRSAandMGF1", PS512: "SHA512withRSAandMGF1", none: "none" }, K.jws.JWS.isSafeJSONString = function (t, e, r) { var i = null; try { return "object" != (void 0 === (i = H(t)) ? "undefined" : n(i)) ? 0 : i.constructor === Array ? 0 : (e && (e[r] = i), 1) } catch (t) { return 0 } }, K.jws.JWS.readSafeJSONString = function (t) { var e = null; try { return "object" != (void 0 === (e = H(t)) ? "undefined" : n(e)) ? null : e.constructor === Array ? null : e } catch (t) { return null } }, K.jws.JWS.getEncodedSignatureValueFromJWS = function (t) { var e = t.match(/^[^.]+\.[^.]+\.([^.]+)$/); if (null == e) throw "JWS signature is not a form of 'Head.Payload.SigValue'."; return e[1] }, K.jws.JWS.getJWKthumbprint = function (t) { if ("RSA" !== t.kty && "EC" !== t.kty && "oct" !== t.kty) throw "unsupported algorithm for JWK Thumprint"; var e = "{"; if ("RSA" === t.kty) { if ("string" != typeof t.n || "string" != typeof t.e) throw "wrong n and e value for RSA key"; e += '"e":"' + t.e + '",', e += '"kty":"' + t.kty + '",', e += '"n":"' + t.n + '"}' } else if ("EC" === t.kty) { if ("string" != typeof t.crv || "string" != typeof t.x || "string" != typeof t.y) throw "wrong crv, x and y value for EC key"; e += '"crv":"' + t.crv + '",', e += '"kty":"' + t.kty + '",', e += '"x":"' + t.x + '",', e += '"y":"' + t.y + '"}' } else if ("oct" === t.kty) { if ("string" != typeof t.k) throw "wrong k value for oct(symmetric) key"; e += '"kty":"' + t.kty + '",', e += '"k":"' + t.k + '"}' } var r = rstrtohex(e); return hextob64u(K.crypto.Util.hashHex(r, "sha256")) }, K.jws.IntDate = {}, K.jws.IntDate.get = function (t) { var e = K.jws.IntDate, r = e.getNow, n = e.getZulu; if ("now" == t) return r(); if ("now + 1hour" == t) return r() + 3600; if ("now + 1day" == t) return r() + 86400; if ("now + 1month" == t) return r() + 2592e3; if ("now + 1year" == t) return r() + 31536e3; if (t.match(/Z$/)) return n(t); if (t.match(/^[0-9]+$/)) return parseInt(t); throw "unsupported format: " + t }, K.jws.IntDate.getZulu = function (t) { return zulutosec(t) }, K.jws.IntDate.getNow = function () { return ~~(new Date / 1e3) }, K.jws.IntDate.intDate2UTCString = function (t) { return new Date(1e3 * t).toUTCString() }, K.jws.IntDate.intDate2Zulu = function (t) { var e = new Date(1e3 * t); return ("0000" + e.getUTCFullYear()).slice(-4) + ("00" + (e.getUTCMonth() + 1)).slice(-2) + ("00" + e.getUTCDate()).slice(-2) + ("00" + e.getUTCHours()).slice(-2) + ("00" + e.getUTCMinutes()).slice(-2) + ("00" + e.getUTCSeconds()).slice(-2) + "Z" }, e.SecureRandom = SecureRandom, e.rng_seed_time = rng_seed_time, e.BigInteger = BigInteger, e.RSAKey = RSAKey, e.ECDSA = K.crypto.ECDSA, e.DSA = K.crypto.DSA, e.Signature = K.crypto.Signature, e.MessageDigest = K.crypto.MessageDigest, e.Mac = K.crypto.Mac, e.Cipher = K.crypto.Cipher, e.KEYUTIL = J, e.ASN1HEX = q, e.X509 = X509, e.CryptoJS = v, e.b64tohex = b64tohex, e.b64toBA = b64toBA, e.stoBA = stoBA, e.BAtos = BAtos, e.BAtohex = BAtohex, e.stohex = stohex, e.stob64 = function stob64(t) { return hex2b64(stohex(t)) }, e.stob64u = function stob64u(t) { return b64tob64u(hex2b64(stohex(t))) }, e.b64utos = function b64utos(t) { return BAtos(b64toBA(b64utob64(t))) }, e.b64tob64u = b64tob64u, e.b64utob64 = b64utob64, e.hex2b64 = hex2b64, e.hextob64u = hextob64u, e.b64utohex = b64utohex, e.utf8tob64u = V, e.b64utoutf8 = W, e.utf8tob64 = function utf8tob64(t) { return hex2b64(uricmptohex(encodeURIComponentAll(t))) }, e.b64toutf8 = function b64toutf8(t) { return decodeURIComponent(hextouricmp(b64tohex(t))) }, e.utf8tohex = utf8tohex, e.hextoutf8 = hextoutf8, e.hextorstr = hextorstr, e.rstrtohex = rstrtohex, e.hextob64 = hextob64, e.hextob64nl = hextob64nl, e.b64nltohex = b64nltohex, e.hextopem = hextopem, e.pemtohex = pemtohex, e.hextoArrayBuffer = function hextoArrayBuffer(t) { if (t.length % 2 != 0) throw "input is not even length"; if (null == t.match(/^[0-9A-Fa-f]+$/)) throw "input is not hexadecimal"; for (var e = new ArrayBuffer(t.length / 2), r = new DataView(e), n = 0; n < t.length / 2; n++)r.setUint8(n, parseInt(t.substr(2 * n, 2), 16)); return e }, e.ArrayBuffertohex = function ArrayBuffertohex(t) { for (var e = "", r = new DataView(t), n = 0; n < t.byteLength; n++)e += ("00" + r.getUint8(n).toString(16)).slice(-2); return e }, e.zulutomsec = zulutomsec, e.zulutosec = zulutosec, e.zulutodate = function zulutodate(t) { return new Date(zulutomsec(t)) }, e.datetozulu = function datetozulu(t, e, r) { var n, i = t.getUTCFullYear(); if (e) { if (i < 1950 || 2049 < i) throw "not proper year for UTCTime: " + i; n = ("" + i).slice(-2) } else n = ("000" + i).slice(-4); if (n += ("0" + (t.getUTCMonth() + 1)).slice(-2), n += ("0" + t.getUTCDate()).slice(-2), n += ("0" + t.getUTCHours()).slice(-2), n += ("0" + t.getUTCMinutes()).slice(-2), n += ("0" + t.getUTCSeconds()).slice(-2), r) { var o = t.getUTCMilliseconds(); 0 !== o && (n += "." + (o = (o = ("00" + o).slice(-3)).replace(/0+$/g, ""))) } return n += "Z" }, e.uricmptohex = uricmptohex, e.hextouricmp = hextouricmp, e.ipv6tohex = ipv6tohex, e.hextoipv6 = hextoipv6, e.hextoip = hextoip, e.iptohex = function iptohex(t) { var e = "malformed IP address"; if (!(t = t.toLowerCase(t)).match(/^[0-9.]+$/)) { if (t.match(/^[0-9a-f:]+$/) && -1 !== t.indexOf(":")) return ipv6tohex(t); throw e } var r = t.split("."); if (4 !== r.length) throw e; var n = ""; try { for (var i = 0; i < 4; i++)n += ("0" + parseInt(r[i]).toString(16)).slice(-2); return n } catch (t) { throw e } }, e.encodeURIComponentAll = encodeURIComponentAll, e.newline_toUnix = function newline_toUnix(t) { return t = t.replace(/\r\n/gm, "\n") }, e.newline_toDos = function newline_toDos(t) { return t = (t = t.replace(/\r\n/gm, "\n")).replace(/\n/gm, "\r\n") }, e.hextoposhex = hextoposhex, e.intarystrtohex = function intarystrtohex(t) { t = (t = (t = t.replace(/^\s*\[\s*/, "")).replace(/\s*\]\s*$/, "")).replace(/\s*/g, ""); try { return t.split(/,/).map(function (t, e, r) { var n = parseInt(t); if (n < 0 || 255 < n) throw "integer not in range 0-255"; return ("00" + n.toString(16)).slice(-2) }).join("") } catch (t) { throw "malformed integer array string: " + t } }, e.strdiffidx = function strdiffidx(t, e) { var r = t.length; t.length > e.length && (r = e.length); for (var n = 0; n < r; n++)if (t.charCodeAt(n) != e.charCodeAt(n)) return n; return t.length != e.length ? r : -1 }, e.KJUR = K, e.crypto = K.crypto, e.asn1 = K.asn1, e.jws = K.jws, e.lang = K.lang
  }).call(this, r(167).Buffer)
}, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.UserInfoService = void 0; var n = r(69), i = r(44), o = r(2); e.UserInfoService = function () { function UserInfoService(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : n.JsonService, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : i.MetadataService; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, UserInfoService), !t) throw o.Log.error("UserInfoService.ctor: No settings passed"), new Error("settings"); this._settings = t, this._jsonService = new e, this._metadataService = new r(this._settings) } return UserInfoService.prototype.getClaims = function getClaims(t) { var e = this; return t ? this._metadataService.getUserInfoEndpoint().then(function (r) { return o.Log.debug("UserInfoService.getClaims: received userinfo url", r), e._jsonService.getJson(r, t).then(function (t) { return o.Log.debug("UserInfoService.getClaims: claims received", t), t }) }) : (o.Log.error("UserInfoService.getClaims: No token passed"), Promise.reject(new Error("A token is required"))) }, UserInfoService }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }), e.ResponseValidator = void 0; var n = r(2), i = r(44), o = r(169), s = r(110), a = r(109), u = r(68); var c = ["nonce", "at_hash", "iat", "nbf", "exp", "aud", "iss", "c_hash"]; e.ResponseValidator = function () { function ResponseValidator(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : i.MetadataService, r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : o.UserInfoService, a = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : u.JoseUtil, c = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : s.TokenClient; if (function _classCallCheck(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, ResponseValidator), !t) throw n.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"), new Error("settings"); this._settings = t, this._metadataService = new e(this._settings), this._userInfoService = new r(this._settings), this._joseUtil = a, this._tokenClient = new c(this._settings) } return ResponseValidator.prototype.validateSigninResponse = function validateSigninResponse(t, e) { var r = this; return n.Log.debug("ResponseValidator.validateSigninResponse"), this._processSigninParams(t, e).then(function (e) { return n.Log.debug("ResponseValidator.validateSigninResponse: state processed"), r._validateTokens(t, e).then(function (t) { return n.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"), r._processClaims(t).then(function (t) { return n.Log.debug("ResponseValidator.validateSigninResponse: claims processed"), t }) }) }) }, ResponseValidator.prototype.validateSignoutResponse = function validateSignoutResponse(t, e) { return t.id !== e.state ? (n.Log.error("ResponseValidator.validateSignoutResponse: State does not match"), Promise.reject(new Error("State does not match"))) : (n.Log.debug("ResponseValidator.validateSignoutResponse: state validated"), e.state = t.data, e.error ? (n.Log.warn("ResponseValidator.validateSignoutResponse: Response was error", e.error), Promise.reject(new a.ErrorResponse(e))) : Promise.resolve(e)) }, ResponseValidator.prototype._processSigninParams = function _processSigninParams(t, e) { if (t.id !== e.state) return n.Log.error("ResponseValidator._processSigninParams: State does not match"), Promise.reject(new Error("State does not match")); if (!t.client_id) return n.Log.error("ResponseValidator._processSigninParams: No client_id on state"), Promise.reject(new Error("No client_id on state")); if (!t.authority) return n.Log.error("ResponseValidator._processSigninParams: No authority on state"), Promise.reject(new Error("No authority on state")); if (this._settings.authority) { if (this._settings.authority && this._settings.authority !== t.authority) return n.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"), Promise.reject(new Error("authority mismatch on settings vs. signin state")) } else this._settings.authority = t.authority; if (this._settings.client_id) { if (this._settings.client_id && this._settings.client_id !== t.client_id) return n.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"), Promise.reject(new Error("client_id mismatch on settings vs. signin state")) } else this._settings.client_id = t.client_id; return n.Log.debug("ResponseValidator._processSigninParams: state validated"), e.state = t.data, e.error ? (n.Log.warn("ResponseValidator._processSigninParams: Response was error", e.error), Promise.reject(new a.ErrorResponse(e))) : t.nonce && !e.id_token ? (n.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"), Promise.reject(new Error("No id_token in response"))) : !t.nonce && e.id_token ? (n.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"), Promise.reject(new Error("Unexpected id_token in response"))) : t.code_verifier && !e.code ? (n.Log.error("ResponseValidator._processSigninParams: Expecting code in response"), Promise.reject(new Error("No code in response"))) : !t.code_verifier && e.code ? (n.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"), Promise.reject(new Error("Unexpected code in response"))) : Promise.resolve(e) }, ResponseValidator.prototype._processClaims = function _processClaims(t) { var e = this; if (t.isOpenIdConnect) { if (n.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"), t.profile = this._filterProtocolClaims(t.profile), this._settings.loadUserInfo && t.access_token) return n.Log.debug("ResponseValidator._processClaims: loading user info"), this._userInfoService.getClaims(t.access_token).then(function (r) { return n.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"), r.sub !== t.profile.sub ? (n.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in access_token"), Promise.reject(new Error("sub from user info endpoint does not match sub in access_token"))) : (t.profile = e._mergeClaims(t.profile, r), n.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:", t.profile), t) }); n.Log.debug("ResponseValidator._processClaims: not loading user info") } else n.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims"); return Promise.resolve(t) }, ResponseValidator.prototype._mergeClaims = function _mergeClaims(t, e) { var r = Object.assign({}, t); for (var n in e) { var i = e[n]; Array.isArray(i) || (i = [i]); for (var o = 0; o < i.length; o++) { var s = i[o]; r[n] ? Array.isArray(r[n]) ? r[n].indexOf(s) < 0 && r[n].push(s) : r[n] !== s && (r[n] = [r[n], s]) : r[n] = s } } return r }, ResponseValidator.prototype._filterProtocolClaims = function _filterProtocolClaims(t) { n.Log.debug("ResponseValidator._filterProtocolClaims, incoming claims:", t); var e = Object.assign({}, t); return this._settings._filterProtocolClaims ? (c.forEach(function (t) { delete e[t] }), n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered", e)) : n.Log.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"), e }, ResponseValidator.prototype._validateTokens = function _validateTokens(t, e) { return e.code ? (n.Log.debug("ResponseValidator._validateTokens: Validating code"), this._processCode(t, e)) : e.id_token ? e.access_token ? (n.Log.debug("ResponseValidator._validateTokens: Validating id_token and access_token"), this._validateIdTokenAndAccessToken(t, e)) : (n.Log.debug("ResponseValidator._validateTokens: Validating id_token"), this._validateIdToken(t, e)) : (n.Log.debug("ResponseValidator._validateTokens: No code to process or id_token to validate"), Promise.resolve(e)) }, ResponseValidator.prototype._processCode = function _processCode(t, e) { var r = this, i = { client_id: t.client_id, client_secret: this._settings.client_secret, code: e.code, redirect_uri: t.redirect_uri, code_verifier: t.code_verifier }; return this._tokenClient.exchangeCode(i).then(function (i) { for (var o in i) e[o] = i[o]; return e.id_token ? (n.Log.debug("ResponseValidator._processCode: token response successful, processing id_token"), r._validateIdTokenAttributes(t, e)) : (n.Log.debug("ResponseValidator._processCode: token response successful, returning response"), e) }) }, ResponseValidator.prototype._validateIdTokenAttributes = function _validateIdTokenAttributes(t, e) { var r = this; return this._metadataService.getIssuer().then(function (i) { var o = t.client_id, s = r._settings.clockSkew; return n.Log.debug("ResponseValidator._validateIdTokenAttributes: Validaing JWT attributes; using clock skew (in seconds) of: ", s), r._joseUtil.validateJwtAttributes(e.id_token, i, o, s).then(function (r) { return t.nonce && t.nonce !== r.nonce ? (n.Log.error("ResponseValidator._validateIdTokenAttributes: Invalid nonce in id_token"), Promise.reject(new Error("Invalid nonce in id_token"))) : r.sub ? (e.profile = r, e) : (n.Log.error("ResponseValidator._validateIdTokenAttributes: No sub present in id_token"), Promise.reject(new Error("No sub present in id_token"))) }) }) }, ResponseValidator.prototype._validateIdTokenAndAccessToken = function _validateIdTokenAndAccessToken(t, e) { var r = this; return this._validateIdToken(t, e).then(function (t) { return r._validateAccessToken(t) }) }, ResponseValidator.prototype._validateIdToken = function _validateIdToken(t, e) { var r = this; if (!t.nonce) return n.Log.error("ResponseValidator._validateIdToken: No nonce on state"), Promise.reject(new Error("No nonce on state")); var i = this._joseUtil.parseJwt(e.id_token); if (!i || !i.header || !i.payload) return n.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token", i), Promise.reject(new Error("Failed to parse id_token")); if (t.nonce !== i.payload.nonce) return n.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"), Promise.reject(new Error("Invalid nonce in id_token")); var o = i.header.kid; return this._metadataService.getIssuer().then(function (s) { return n.Log.debug("ResponseValidator._validateIdToken: Received issuer"), r._metadataService.getSigningKeys().then(function (a) { if (!a) return n.Log.error("ResponseValidator._validateIdToken: No signing keys from metadata"), Promise.reject(new Error("No signing keys from metadata")); n.Log.debug("ResponseValidator._validateIdToken: Received signing keys"); var u = void 0; if (o) u = a.filter(function (t) { return t.kid === o })[0]; else { if ((a = r._filterByAlg(a, i.header.alg)).length > 1) return n.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"), Promise.reject(new Error("No kid found in id_token and more than one key found in metadata")); u = a[0] } if (!u) return n.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"), Promise.reject(new Error("No key matching kid or alg found in signing keys")); var c = t.client_id, f = r._settings.clockSkew; return n.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ", f), r._joseUtil.validateJwt(e.id_token, u, s, c, f).then(function () { return n.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"), i.payload.sub ? (e.profile = i.payload, e) : (n.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"), Promise.reject(new Error("No sub present in id_token"))) }) }) }) }, ResponseValidator.prototype._filterByAlg = function _filterByAlg(t, e) { var r = null; if (e.startsWith("RS")) r = "RSA"; else if (e.startsWith("PS")) r = "PS"; else { if (!e.startsWith("ES")) return n.Log.debug("ResponseValidator._filterByAlg: alg not supported: ", e), []; r = "EC" } return n.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ", r), t = t.filter(function (t) { return t.kty === r }), n.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ", r, t.length), t }, ResponseValidator.prototype._validateAccessToken = function _validateAccessToken(t) { if (!t.profile) return n.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"), Promise.reject(new Error("No profile loaded from id_token")); if (!t.profile.at_hash) return n.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"), Promise.reject(new Error("No at_hash in id_token")); if (!t.id_token) return n.Log.error("ResponseValidator._validateAccessToken: No id_token"), Promise.reject(new Error("No id_token")); var e = this._joseUtil.parseJwt(t.id_token); if (!e || !e.header) return n.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token", e), Promise.reject(new Error("Failed to parse id_token")); var r = e.header.alg; if (!r || 5 !== r.length) return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:", r), Promise.reject(new Error("Unsupported alg: " + r)); var i = r.substr(2, 3); if (!i) return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:", r, i), Promise.reject(new Error("Unsupported alg: " + r)); if (256 !== (i = parseInt(i)) && 384 !== i && 512 !== i) return n.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:", r, i), Promise.reject(new Error("Unsupported alg: " + r)); var o = "sha" + i, s = this._joseUtil.hashString(t.access_token, o); if (!s) return n.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:", o), Promise.reject(new Error("Failed to validate at_hash")); var a = s.substr(0, s.length / 2), u = this._joseUtil.hexToBase64Url(a); return u !== t.profile.at_hash ? (n.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash", u, t.profile.at_hash), Promise.reject(new Error("Failed to validate at_hash"))) : (n.Log.debug("ResponseValidator._validateAccessToken: success"), Promise.resolve(t)) }, ResponseValidator }() }, function (t, e, r) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(2), i = r(111), o = r(71), s = r(70), a = r(159), u = r(158), c = r(105), f = r(44), h = r(147), l = r(146), p = r(102), g = r(101), d = r(103), v = r(32), y = r(106); e.default = { Log: n.Log, OidcClient: i.OidcClient, OidcClientSettings: o.OidcClientSettings, WebStorageStateStore: s.WebStorageStateStore, InMemoryWebStorage: a.InMemoryWebStorage, UserManager: u.UserManager, AccessTokenEvents: c.AccessTokenEvents, MetadataService: f.MetadataService, CordovaPopupNavigator: h.CordovaPopupNavigator, CordovaIFrameNavigator: l.CordovaIFrameNavigator, CheckSessionIFrame: p.CheckSessionIFrame, TokenRevocationClient: g.TokenRevocationClient, SessionMonitor: d.SessionMonitor, Global: v.Global, User: y.User }, t.exports = e.default }, function (t, e) { t.exports = function (t, e) { var r = e === Object(e) ? function (t) { return e[t] } : e; return function (e) { return String(e).replace(t, r) } } }, function (t, e, r) { var n = r(0), i = r(172)(/[\\^$*+?.()|[\]{}]/g, "\\$&"); n(n.S, "RegExp", { escape: function escape(t) { return i(t) } }) }, function (t, e, r) { r(173), t.exports = r(27).RegExp.escape }, function (t, e, r) { (function (e) { !function (e) { "use strict"; var r, n = Object.prototype, i = n.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, s = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag", c = "object" == typeof t, f = e.regeneratorRuntime; if (f) c && (t.exports = f); else { (f = e.regeneratorRuntime = c ? t.exports : {}).wrap = wrap; var h = "suspendedStart", l = "suspendedYield", p = "executing", g = "completed", d = {}, v = {}; v[s] = function () { return this }; var y = Object.getPrototypeOf, m = y && y(y(values([]))); m && m !== n && i.call(m, s) && (v = m); var S = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(v); GeneratorFunction.prototype = S.constructor = GeneratorFunctionPrototype, GeneratorFunctionPrototype.constructor = GeneratorFunction, GeneratorFunctionPrototype[u] = GeneratorFunction.displayName = "GeneratorFunction", f.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)) }, f.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, u in t || (t[u] = "GeneratorFunction")), t.prototype = Object.create(S), t }, f.awrap = function (t) { return { __await: t } }, defineIteratorMethods(AsyncIterator.prototype), AsyncIterator.prototype[a] = function () { return this }, f.AsyncIterator = AsyncIterator, f.async = function (t, e, r, n) { var i = new AsyncIterator(wrap(t, e, r, n)); return f.isGeneratorFunction(e) ? i : i.next().then(function (t) { return t.done ? t.value : i.next() }) }, defineIteratorMethods(S), S[u] = "Generator", S[s] = function () { return this }, S.toString = function () { return "[object Generator]" }, f.keys = function (t) { var e = []; for (var r in t) e.push(r); return e.reverse(), function next() { for (; e.length;) { var r = e.pop(); if (r in t) return next.value = r, next.done = !1, next } return next.done = !0, next } }, f.values = values, Context.prototype = { constructor: Context, reset: function (t) { if (this.prev = 0, this.next = 0, this.sent = this._sent = r, this.done = !1, this.delegate = null, this.method = "next", this.arg = r, this.tryEntries.forEach(resetTryEntry), !t) for (var e in this) "t" === e.charAt(0) && i.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = r) }, stop: function () { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval }, dispatchException: function (t) { if (this.done) throw t; var e = this; function handle(n, i) { return s.type = "throw", s.arg = t, e.next = n, i && (e.method = "next", e.arg = r), !!i } for (var n = this.tryEntries.length - 1; n >= 0; --n) { var o = this.tryEntries[n], s = o.completion; if ("root" === o.tryLoc) return handle("end"); if (o.tryLoc <= this.prev) { var a = i.call(o, "catchLoc"), u = i.call(o, "finallyLoc"); if (a && u) { if (this.prev < o.catchLoc) return handle(o.catchLoc, !0); if (this.prev < o.finallyLoc) return handle(o.finallyLoc) } else if (a) { if (this.prev < o.catchLoc) return handle(o.catchLoc, !0) } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < o.finallyLoc) return handle(o.finallyLoc) } } } }, abrupt: function (t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var n = this.tryEntries[r]; if (n.tryLoc <= this.prev && i.call(n, "finallyLoc") && this.prev < n.finallyLoc) { var o = n; break } } o && ("break" === t || "continue" === t) && o.tryLoc <= e && e <= o.finallyLoc && (o = null); var s = o ? o.completion : {}; return s.type = t, s.arg = e, o ? (this.method = "next", this.next = o.finallyLoc, d) : this.complete(s) }, complete: function (t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), d }, finish: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), d } }, catch: function (t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var i = n.arg; resetTryEntry(r) } return i } } throw new Error("illegal catch attempt") }, delegateYield: function (t, e, n) { return this.delegate = { iterator: values(t), resultName: e, nextLoc: n }, "next" === this.method && (this.arg = r), d } } } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, o = Object.create(i.prototype), s = new Context(n || []); return o._invoke = function makeInvokeMethod(t, e, r) { var n = h; return function invoke(i, o) { if (n === p) throw new Error("Generator is already running"); if (n === g) { if ("throw" === i) throw o; return doneResult() } for (r.method = i, r.arg = o; ;) { var s = r.delegate; if (s) { var a = maybeInvokeDelegate(s, r); if (a) { if (a === d) continue; return a } } if ("next" === r.method) r.sent = r._sent = r.arg; else if ("throw" === r.method) { if (n === h) throw n = g, r.arg; r.dispatchException(r.arg) } else "return" === r.method && r.abrupt("return", r.arg); n = p; var u = tryCatch(t, e, r); if ("normal" === u.type) { if (n = r.done ? g : l, u.arg === d) continue; return { value: u.arg, done: r.done } } "throw" === u.type && (n = g, r.method = "throw", r.arg = u.arg) } } }(t, r, s), o } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) } } catch (t) { return { type: "throw", arg: t } } } function Generator() { } function GeneratorFunction() { } function GeneratorFunctionPrototype() { } function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { t[e] = function (t) { return this._invoke(e, t) } }) } function AsyncIterator(t) { function invoke(e, r, n, o) { var s = tryCatch(t[e], t, r); if ("throw" !== s.type) { var a = s.arg, u = a.value; return u && "object" == typeof u && i.call(u, "__await") ? Promise.resolve(u.__await).then(function (t) { invoke("next", t, n, o) }, function (t) { invoke("throw", t, n, o) }) : Promise.resolve(u).then(function (t) { a.value = t, n(a) }, o) } o(s.arg) } var r; "object" == typeof e.process && e.process.domain && (invoke = e.process.domain.bind(invoke)), this._invoke = function enqueue(t, e) { function callInvokeWithMethodAndArg() { return new Promise(function (r, n) { invoke(t, e, r, n) }) } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg() } } function maybeInvokeDelegate(t, e) { var n = t.iterator[e.method]; if (n === r) { if (e.delegate = null, "throw" === e.method) { if (t.iterator.return && (e.method = "return", e.arg = r, maybeInvokeDelegate(t, e), "throw" === e.method)) return d; e.method = "throw", e.arg = new TypeError("The iterator does not provide a 'throw' method") } return d } var i = tryCatch(n, t.iterator, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, d; var o = i.arg; return o ? o.done ? (e[t.resultName] = o.value, e.next = t.nextLoc, "return" !== e.method && (e.method = "next", e.arg = r), e.delegate = null, d) : o : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, d) } function pushTryEntry(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 resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0) } function values(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, o = function next() { for (; ++n < t.length;)if (i.call(t, n)) return next.value = t[n], next.done = !1, next; return next.value = r, next.done = !0, next }; return o.next = o } } return { next: doneResult } } function doneResult() { return { value: r, done: !0 } } }("object" == typeof e ? e : "object" == typeof window ? window : "object" == typeof self ? self : this) }).call(this, r(99)) }, function (t, e, r) { for (var n = r(77), i = r(40), o = r(13), s = r(3), a = r(14), u = r(46), c = r(6), f = c("iterator"), h = c("toStringTag"), l = u.Array, p = { CSSRuleList: !0, CSSStyleDeclaration: !1, CSSValueList: !1, ClientRectList: !1, DOMRectList: !1, DOMStringList: !1, DOMTokenList: !0, DataTransferItemList: !1, FileList: !1, HTMLAllCollection: !1, HTMLCollection: !1, HTMLFormElement: !1, HTMLSelectElement: !1, MediaList: !0, MimeTypeArray: !1, NamedNodeMap: !1, NodeList: !0, PaintRequestList: !1, Plugin: !1, PluginArray: !1, SVGLengthList: !1, SVGNumberList: !1, SVGPathSegList: !1, SVGPointList: !1, SVGStringList: !1, SVGTransformList: !1, SourceBufferList: !1, StyleSheetList: !0, TextTrackCueList: !1, TextTrackList: !1, TouchList: !1 }, g = i(p), d = 0; d < g.length; d++) { var v, y = g[d], m = p[y], S = s[y], _ = S && S.prototype; if (_ && (_[f] || a(_, f, l), _[h] || a(_, h, y), u[y] = l, m)) for (v in n) _[v] || o(_, v, n[v], !0) } }, function (t, e, r) { var n = r(0), i = r(76); n(n.G + n.B, { setImmediate: i.set, clearImmediate: i.clear }) }, function (t, e, r) { var n = r(3), i = r(0), o = r(72), s = [].slice, a = /MSIE .\./.test(o), u = function (t) { return function (e, r) { var n = arguments.length > 2, i = !!n && s.call(arguments, 2); return t(n ? function () { ("function" == typeof e ? e : Function(e)).apply(this, i) } : e, r) } }; i(i.G + i.B + i.F * a, { setTimeout: u(n.setTimeout), setInterval: u(n.setInterval) }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(3), o = r(27), s = r(75)(), a = r(6)("observable"), u = r(11), c = r(1), f = r(35), h = r(33), l = r(14), p = r(34), g = p.RETURN, d = function (t) { return null == t ? void 0 : u(t) }, v = function (t) { var e = t._c; e && (t._c = void 0, e()) }, y = function (t) { return void 0 === t._o }, m = function (t) { y(t) || (t._o = void 0, v(t)) }, S = function (t, e) { c(t), this._c = void 0, this._o = t, t = new _(this); try { var r = e(t), n = r; null != r && ("function" == typeof r.unsubscribe ? r = function () { n.unsubscribe() } : u(r), this._c = r) } catch (e) { return void t.error(e) } y(this) && v(this) }; S.prototype = h({}, { unsubscribe: function unsubscribe() { m(this) } }); var _ = function (t) { this._s = t }; _.prototype = h({}, { next: function next(t) { var e = this._s; if (!y(e)) { var r = e._o; try { var n = d(r.next); if (n) return n.call(r, t) } catch (t) { try { m(e) } finally { throw t } } } }, error: function error(t) { var e = this._s; if (y(e)) throw t; var r = e._o; e._o = void 0; try { var n = d(r.error); if (!n) throw t; t = n.call(r, t) } catch (t) { try { v(e) } finally { throw t } } return v(e), t }, complete: function complete(t) { var e = this._s; if (!y(e)) { var r = e._o; e._o = void 0; try { var n = d(r.complete); t = n ? n.call(r, t) : void 0 } catch (t) { try { v(e) } finally { throw t } } return v(e), t } } }); var b = function Observable(t) { f(this, b, "Observable", "_f")._f = u(t) }; h(b.prototype, { subscribe: function subscribe(t) { return new S(t, this._f) }, forEach: function forEach(t) { var e = this; return new (o.Promise || i.Promise)(function (r, n) { u(t); var i = e.subscribe({ next: function (e) { try { return t(e) } catch (t) { n(t), i.unsubscribe() } }, error: n, complete: r }) }) } }), h(b, { from: function from(t) { var e = "function" == typeof this ? this : b, r = d(c(t)[a]); if (r) { var n = c(r.call(t)); return n.constructor === e ? n : new e(function (t) { return n.subscribe(t) }) } return new e(function (e) { var r = !1; return s(function () { if (!r) { try { if (p(t, !1, function (t) { if (e.next(t), r) return g }) === g) return } catch (t) { if (r) throw t; return void e.error(t) } e.complete() } }), function () { r = !0 } }) }, of: function of() { for (var t = 0, e = arguments.length, r = new Array(e); t < e;)r[t] = arguments[t++]; return new ("function" == typeof this ? this : b)(function (t) { var e = !1; return s(function () { if (!e) { for (var n = 0; n < r.length; ++n)if (t.next(r[n]), e) return; t.complete() } }), function () { e = !0 } }) } }), l(b.prototype, a, function () { return this }), n(n.G, { Observable: b }), r(36)("Observable") }, function (t, e, r) { var n = r(0), i = r(75)(), o = r(3).process, s = "process" == r(20)(o); n(n.G, { asap: function asap(t) { var e = s && o.domain; i(e ? e.bind(t) : t) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = r(11), s = n.key, a = n.set; n.exp({ metadata: function metadata(t, e) { return function decorator(r, n) { a(t, e, (void 0 !== n ? i : o)(r), s(n)) } } }) }, function (t, e, r) { var n = r(28), i = r(1), o = n.has, s = n.key; n.exp({ hasOwnMetadata: function hasOwnMetadata(t, e) { return o(t, i(e), arguments.length < 3 ? void 0 : s(arguments[2])) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = r(15), s = n.has, a = n.key, u = function (t, e, r) { if (s(t, e, r)) return !0; var n = o(e); return null !== n && u(t, n, r) }; n.exp({ hasMetadata: function hasMetadata(t, e) { return u(t, i(e), arguments.length < 3 ? void 0 : a(arguments[2])) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = n.keys, s = n.key; n.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(t) { return o(i(t), arguments.length < 2 ? void 0 : s(arguments[1])) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = n.get, s = n.key; n.exp({ getOwnMetadata: function getOwnMetadata(t, e) { return o(t, i(e), arguments.length < 3 ? void 0 : s(arguments[2])) } }) }, function (t, e, r) { var n = r(122), i = r(113), o = r(28), s = r(1), a = r(15), u = o.keys, c = o.key, f = function (t, e) { var r = u(t, e), o = a(t); if (null === o) return r; var s = f(o, e); return s.length ? r.length ? i(new n(r.concat(s))) : s : r }; o.exp({ getMetadataKeys: function getMetadataKeys(t) { return f(s(t), arguments.length < 2 ? void 0 : c(arguments[1])) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = r(15), s = n.has, a = n.get, u = n.key, c = function (t, e, r) { if (s(t, e, r)) return a(t, e, r); var n = o(e); return null !== n ? c(t, n, r) : void 0 }; n.exp({ getMetadata: function getMetadata(t, e) { return c(t, i(e), arguments.length < 3 ? void 0 : u(arguments[2])) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = n.key, s = n.map, a = n.store; n.exp({ deleteMetadata: function deleteMetadata(t, e) { var r = arguments.length < 3 ? void 0 : o(arguments[2]), n = s(i(e), r, !1); if (void 0 === n || !n.delete(t)) return !1; if (n.size) return !0; var u = a.get(e); return u.delete(r), !!u.size || a.delete(e) } }) }, function (t, e, r) { var n = r(28), i = r(1), o = n.key, s = n.set; n.exp({ defineMetadata: function defineMetadata(t, e, r, n) { s(t, e, i(r), o(n)) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(74), o = r(126); n(n.S, "Promise", { try: function (t) { var e = i.f(this), r = o(t); return (r.e ? e.reject : e.resolve)(r.v), e.promise } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(27), o = r(3), s = r(58), a = r(125); n(n.P + n.R, "Promise", { finally: function (t) { var e = s(this, i.Promise || o.Promise), r = "function" == typeof t; return this.then(r ? function (r) { return a(e, t()).then(function () { return r }) } : t, r ? function (r) { return a(e, t()).then(function () { throw r }) } : t) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { signbit: function signbit(t) { return (t = +t) != t ? t : 0 == t ? 1 / t == 1 / 0 : t > 0 } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { umulh: function umulh(t, e) { var r = +t, n = +e, i = 65535 & r, o = 65535 & n, s = r >>> 16, a = n >>> 16, u = (s * o >>> 0) + (i * o >>> 16); return s * a + (u >>> 16) + ((i * a >>> 0) + (65535 & u) >>> 16) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { scale: r(112) }) }, function (t, e, r) { var n = r(0), i = Math.PI / 180; n(n.S, "Math", { radians: function radians(t) { return t * i } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { RAD_PER_DEG: 180 / Math.PI }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { imulh: function imulh(t, e) { var r = +t, n = +e, i = 65535 & r, o = 65535 & n, s = r >> 16, a = n >> 16, u = (s * o >>> 0) + (i * o >>> 16); return s * a + (u >> 16) + ((i * a >>> 0) + (65535 & u) >> 16) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { isubh: function isubh(t, e, r, n) { var i = t >>> 0, o = r >>> 0; return (e >>> 0) - (n >>> 0) - ((~i & o | ~(i ^ o) & i - o >>> 0) >>> 31) | 0 } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { iaddh: function iaddh(t, e, r, n) { var i = t >>> 0, o = r >>> 0; return (e >>> 0) + (n >>> 0) + ((i & o | (i | o) & ~(i + o >>> 0)) >>> 31) | 0 } }) }, function (t, e, r) { var n = r(0), i = r(112), o = r(132); n(n.S, "Math", { fscale: function fscale(t, e, r, n, s) { return o(i(t, e, r, n, s)) } }) }, function (t, e, r) { var n = r(0), i = 180 / Math.PI; n(n.S, "Math", { degrees: function degrees(t) { return t * i } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { DEG_PER_RAD: Math.PI / 180 }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { clamp: function clamp(t, e, r) { return Math.min(r, Math.max(e, t)) } }) }, function (t, e, r) { var n = r(0), i = r(20); n(n.S, "Error", { isError: function isError(t) { return "Error" === i(t) } }) }, function (t, e, r) { var n = r(0); n(n.S, "System", { global: r(3) }) }, function (t, e, r) { var n = r(0); n(n.G, { global: r(3) }) }, function (t, e, r) { r(53)("WeakSet") }, function (t, e, r) { r(53)("WeakMap") }, function (t, e, r) { r(53)("Set") }, function (t, e, r) { r(53)("Map") }, function (t, e, r) { r(54)("WeakSet") }, function (t, e, r) { r(54)("WeakMap") }, function (t, e, r) { r(54)("Set") }, function (t, e, r) { r(54)("Map") }, function (t, e, r) { var n = r(0); n(n.P + n.R, "Set", { toJSON: r(114)("Set") }) }, function (t, e, r) { var n = r(0); n(n.P + n.R, "Map", { toJSON: r(114)("Map") }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(10), o = r(26), s = r(15), a = r(16).f; r(9) && n(n.P + r(55), "Object", { __lookupSetter__: function __lookupSetter__(t) { var e, r = i(this), n = o(t, !0); do { if (e = a(r, n)) return e.set } while (r = s(r)) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(10), o = r(26), s = r(15), a = r(16).f; r(9) && n(n.P + r(55), "Object", { __lookupGetter__: function __lookupGetter__(t) { var e, r = i(this), n = o(t, !0); do { if (e = a(r, n)) return e.get } while (r = s(r)) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(10), o = r(11), s = r(8); r(9) && n(n.P + r(55), "Object", { __defineSetter__: function __defineSetter__(t, e) { s.f(i(this), t, { set: o(e), enumerable: !0, configurable: !0 }) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(10), o = r(11), s = r(8); r(9) && n(n.P + r(55), "Object", { __defineGetter__: function __defineGetter__(t, e) { s.f(i(this), t, { get: o(e), enumerable: !0, configurable: !0 }) } }) }, function (t, e, r) { var n = r(0), i = r(115)(!0); n(n.S, "Object", { entries: function entries(t) { return i(t) } }) }, function (t, e, r) { var n = r(0), i = r(115)(!1); n(n.S, "Object", { values: function values(t) { return i(t) } }) }, function (t, e, r) { var n = r(0), i = r(118), o = r(17), s = r(16), a = r(81); n(n.S, "Object", { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(t) { for (var e, r, n = o(t), u = s.f, c = i(n), f = {}, h = 0; c.length > h;)void 0 !== (r = u(n, e = c[h++])) && a(f, e, r); return f } }) }, function (t, e, r) { r(97)("observable") }, function (t, e, r) { r(97)("asyncIterator") }, function (t, e, r) { "use strict"; var n = r(0), i = r(25), o = r(7), s = r(62), a = r(60), u = RegExp.prototype, c = function (t, e) { this._r = t, this._s = e }; r(85)(c, "RegExp String", function next() { var t = this._r.exec(this._s); return { value: t, done: null === t } }), n(n.P, "String", { matchAll: function matchAll(t) { if (i(this), !s(t)) throw TypeError(t + " is not a regexp!"); var e = String(this), r = "flags" in u ? String(t.flags) : a.call(t), n = new RegExp(t.source, ~r.indexOf("g") ? r : "g" + r); return n.lastIndex = o(t.lastIndex), new c(n, e) } }) }, function (t, e, r) { "use strict"; r(47)("trimRight", function (t) { return function trimRight() { return t(this, 2) } }, "trimEnd") }, function (t, e, r) { "use strict"; r(47)("trimLeft", function (t) { return function trimLeft() { return t(this, 1) } }, "trimStart") }, function (t, e, r) { "use strict"; var n = r(0), i = r(116), o = r(72); n(n.P + n.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(o), "String", { padEnd: function padEnd(t) { return i(this, t, arguments.length > 1 ? arguments[1] : void 0, !1) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(116), o = r(72); n(n.P + n.F * /Version\/10\.\d+(\.\d+)? Safari\//.test(o), "String", { padStart: function padStart(t) { return i(this, t, arguments.length > 1 ? arguments[1] : void 0, !0) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(87)(!0); n(n.P, "String", { at: function at(t) { return i(this, t) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(117), o = r(10), s = r(7), a = r(24), u = r(79); n(n.P, "Array", { flatten: function flatten() { var t = arguments[0], e = o(this), r = s(e.length), n = u(e, 0); return i(n, e, e, r, 0, void 0 === t ? 1 : a(t)), n } }), r(30)("flatten") }, function (t, e, r) { "use strict"; var n = r(0), i = r(117), o = r(10), s = r(7), a = r(11), u = r(79); n(n.P, "Array", { flatMap: function flatMap(t) { var e, r, n = o(this); return a(t), e = s(n.length), r = u(n, 0), i(r, n, n, e, 0, 1, t, arguments[1]), r } }), r(30)("flatMap") }, function (t, e, r) { "use strict"; var n = r(0), i = r(65)(!0); n(n.P, "Array", { includes: function includes(t) { return i(this, t, arguments.length > 1 ? arguments[1] : void 0) } }), r(30)("includes") }, function (t, e, r) { var n = r(0), i = r(93); i && n(n.S, "Reflect", { setPrototypeOf: function setPrototypeOf(t, e) { i.check(t, e); try { return i.set(t, e), !0 } catch (t) { return !1 } } }) }, function (t, e, r) { var n = r(8), i = r(16), o = r(15), s = r(18), a = r(0), u = r(43), c = r(1), f = r(5); a(a.S, "Reflect", { set: function set(t, e, r) { var a, h, l = arguments.length < 4 ? t : arguments[3], p = i.f(c(t), e); if (!p) { if (f(h = o(t))) return set(h, e, r, l); p = u(0) } if (s(p, "value")) { if (!1 === p.writable || !f(l)) return !1; if (a = i.f(l, e)) { if (a.get || a.set || !1 === a.writable) return !1; a.value = r, n.f(l, e, a) } else n.f(l, e, u(0, r)); return !0 } return void 0 !== p.set && (p.set.call(l, r), !0) } }) }, function (t, e, r) { var n = r(0), i = r(1), o = Object.preventExtensions; n(n.S, "Reflect", { preventExtensions: function preventExtensions(t) { i(t); try { return o && o(t), !0 } catch (t) { return !1 } } }) }, function (t, e, r) { var n = r(0); n(n.S, "Reflect", { ownKeys: r(118) }) }, function (t, e, r) { var n = r(0), i = r(1), o = Object.isExtensible; n(n.S, "Reflect", { isExtensible: function isExtensible(t) { return i(t), !o || o(t) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Reflect", { has: function has(t, e) { return e in t } }) }, function (t, e, r) { var n = r(0), i = r(15), o = r(1); n(n.S, "Reflect", { getPrototypeOf: function getPrototypeOf(t) { return i(o(t)) } }) }, function (t, e, r) { var n = r(16), i = r(0), o = r(1); i(i.S, "Reflect", { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(t, e) { return n.f(o(t), e) } }) }, function (t, e, r) { var n = r(16), i = r(15), o = r(18), s = r(0), a = r(5), u = r(1); s(s.S, "Reflect", { get: function get(t, e) { var r, s, c = arguments.length < 3 ? t : arguments[2]; return u(t) === c ? t[e] : (r = n.f(t, e)) ? o(r, "value") ? r.value : void 0 !== r.get ? r.get.call(c) : void 0 : a(s = i(t)) ? get(s, e, c) : void 0 } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(1), o = function (t) { this._t = i(t), this._i = 0; var e, r = this._k = []; for (e in t) r.push(e) }; r(85)(o, "Object", function () { var t, e = this._k; do { if (this._i >= e.length) return { value: void 0, done: !0 } } while (!((t = e[this._i++]) in this._t)); return { value: t, done: !1 } }), n(n.S, "Reflect", { enumerate: function enumerate(t) { return new o(t) } }) }, function (t, e, r) { var n = r(0), i = r(16).f, o = r(1); n(n.S, "Reflect", { deleteProperty: function deleteProperty(t, e) { var r = i(o(t), e); return !(r && !r.configurable) && delete t[e] } }) }, function (t, e, r) { var n = r(8), i = r(0), o = r(1), s = r(26); i(i.S + i.F * r(4)(function () { Reflect.defineProperty(n.f({}, 1, { value: 1 }), 1, { value: 2 }) }), "Reflect", { defineProperty: function defineProperty(t, e, r) { o(t), e = s(e, !0), o(r); try { return n.f(t, e, r), !0 } catch (t) { return !1 } } }) }, function (t, e, r) { var n = r(0), i = r(38), o = r(11), s = r(1), a = r(5), u = r(4), c = r(139), f = (r(3).Reflect || {}).construct, h = u(function () { function F() { } return !(f(function () { }, [], F) instanceof F) }), l = !u(function () { f(function () { }) }); n(n.S + n.F * (h || l), "Reflect", { construct: function construct(t, e) { o(t), s(e); var r = arguments.length < 3 ? t : o(arguments[2]); if (l && !h) return f(t, e, r); if (t == r) { switch (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 n = [null]; return n.push.apply(n, e), new (c.apply(t, n)) } var u = r.prototype, p = i(a(u) ? u : Object.prototype), g = Function.apply.call(t, p, e); return a(g) ? g : p } }) }, function (t, e, r) { var n = r(0), i = r(11), o = r(1), s = (r(3).Reflect || {}).apply, a = Function.apply; n(n.S + n.F * !r(4)(function () { s(function () { }) }), "Reflect", { apply: function apply(t, e, r) { var n = i(t), u = o(r); return s ? s(n, e, u) : a.call(n, e, u) } }) }, function (t, e, r) { r(29)("Float64", 8, function (t) { return function Float64Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Float32", 4, function (t) { return function Float32Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Uint32", 4, function (t) { return function Uint32Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Int32", 4, function (t) { return function Int32Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Uint16", 2, function (t) { return function Uint16Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Int16", 2, function (t) { return function Int16Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Uint8", 1, function (t) { return function Uint8ClampedArray(e, r, n) { return t(this, e, r, n) } }, !0) }, function (t, e, r) { r(29)("Uint8", 1, function (t) { return function Uint8Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { r(29)("Int8", 1, function (t) { return function Int8Array(e, r, n) { return t(this, e, r, n) } }) }, function (t, e, r) { var n = r(0); n(n.G + n.W + n.F * !r(56).ABV, { DataView: r(73).DataView }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(56), o = r(73), s = r(1), a = r(39), u = r(7), c = r(5), f = r(3).ArrayBuffer, h = r(58), l = o.ArrayBuffer, p = o.DataView, g = i.ABV && f.isView, d = l.prototype.slice, v = i.VIEW; n(n.G + n.W + n.F * (f !== l), { ArrayBuffer: l }), n(n.S + n.F * !i.CONSTR, "ArrayBuffer", { isView: function isView(t) { return g && g(t) || c(t) && v in t } }), n(n.P + n.U + n.F * r(4)(function () { return !new l(2).slice(1, void 0).byteLength }), "ArrayBuffer", { slice: function slice(t, e) { if (void 0 !== d && void 0 === e) return d.call(s(this), t); for (var r = s(this).byteLength, n = a(t, r), i = a(void 0 === e ? r : e, r), o = new (h(this, l))(u(i - n)), c = new p(this), f = new p(o), g = 0; n < i;)f.setUint8(g++, c.getUint8(n++)); return o } }), r(36)("ArrayBuffer") }, function (t, e, r) { "use strict"; var n = r(120), i = r(45); r(57)("WeakSet", function (t) { return function WeakSet() { return t(this, arguments.length > 0 ? arguments[0] : void 0) } }, { add: function add(t) { return n.def(i(this, "WeakSet"), t, !0) } }, n, !1, !0) }, function (t, e, r) { "use strict"; var n, i, o, s, a = r(41), u = r(3), c = r(21), f = r(50), h = r(0), l = r(5), p = r(11), g = r(35), d = r(34), v = r(58), y = r(76).set, m = r(75)(), S = r(74), _ = r(126), b = r(125), F = u.TypeError, w = u.process, E = u.Promise, x = "process" == f(w), A = function () { }, P = i = S.f, k = !!function () { try { var t = E.resolve(1), e = (t.constructor = {})[r(6)("species")] = function (t) { t(A, A) }; return (x || "function" == typeof PromiseRejectionEvent) && t.then(A) instanceof e } catch (t) { } }(), I = function (t) { var e; return !(!l(t) || "function" != typeof (e = t.then)) && e }, C = function (t, e) { if (!t._n) { t._n = !0; var r = t._c; m(function () { for (var n = t._v, i = 1 == t._s, o = 0, s = function (e) { var r, o, s, a = i ? e.ok : e.fail, u = e.resolve, c = e.reject, f = e.domain; try { a ? (i || (2 == t._h && T(t), t._h = 1), !0 === a ? r = n : (f && f.enter(), r = a(n), f && (f.exit(), s = !0)), r === e.promise ? c(F("Promise-chain cycle")) : (o = I(r)) ? o.call(r, u, c) : u(r)) : c(n) } catch (t) { f && !s && f.exit(), c(t) } }; r.length > o;)s(r[o++]); t._c = [], t._n = !1, e && !t._h && R(t) }) } }, R = function (t) { y.call(u, function () { var e, r, n, i = t._v, o = B(t); if (o && (e = _(function () { x ? w.emit("unhandledRejection", i, t) : (r = u.onunhandledrejection) ? r({ promise: t, reason: i }) : (n = u.console) && n.error && n.error("Unhandled promise rejection", i) }), t._h = x || B(t) ? 2 : 1), t._a = void 0, o && e.e) throw e.v }) }, B = function (t) { return 1 !== t._h && 0 === (t._a || t._c).length }, T = function (t) { y.call(u, function () { var e; x ? w.emit("rejectionHandled", t) : (e = u.onrejectionhandled) && e({ promise: t, reason: t._v }) }) }, M = function (t) { var e = this; e._d || (e._d = !0, (e = e._w || e)._v = t, e._s = 2, e._a || (e._a = e._c.slice()), C(e, !0)) }, O = function (t) { var e, r = this; if (!r._d) { r._d = !0, r = r._w || r; try { if (r === t) throw F("Promise can't be resolved itself"); (e = I(t)) ? m(function () { var n = { _w: r, _d: !1 }; try { e.call(t, c(O, n, 1), c(M, n, 1)) } catch (t) { M.call(n, t) } }) : (r._v = t, r._s = 1, C(r, !1)) } catch (t) { M.call({ _w: r, _d: !1 }, t) } } }; k || (E = function Promise(t) { g(this, E, "Promise", "_h"), p(t), n.call(this); try { t(c(O, this, 1), c(M, this, 1)) } catch (t) { M.call(this, t) } }, (n = function Promise(t) { this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1 }).prototype = r(33)(E.prototype, { then: function then(t, e) { var r = P(v(this, E)); return r.ok = "function" != typeof t || t, r.fail = "function" == typeof e && e, r.domain = x ? w.domain : void 0, this._c.push(r), this._a && this._a.push(r), this._s && C(this, !1), r.promise }, catch: function (t) { return this.then(void 0, t) } }), o = function () { var t = new n; this.promise = t, this.resolve = c(O, t, 1), this.reject = c(M, t, 1) }, S.f = P = function (t) { return t === E || t === s ? new o(t) : i(t) }), h(h.G + h.W + h.F * !k, { Promise: E }), r(48)(E, "Promise"), r(36)("Promise"), s = r(27).Promise, h(h.S + h.F * !k, "Promise", { reject: function reject(t) { var e = P(this); return (0, e.reject)(t), e.promise } }), h(h.S + h.F * (a || !k), "Promise", { resolve: function resolve(t) { return b(a && this === s ? E : this, t) } }), h(h.S + h.F * !(k && r(61)(function (t) { E.all(t).catch(A) })), "Promise", { all: function all(t) { var e = this, r = P(e), n = r.resolve, i = r.reject, o = _(function () { var r = [], o = 0, s = 1; d(t, !1, function (t) { var a = o++, u = !1; r.push(void 0), s++ , e.resolve(t).then(function (t) { u || (u = !0, r[a] = t, --s || n(r)) }, i) }), --s || n(r) }); return o.e && i(o.v), r.promise }, race: function race(t) { var e = this, r = P(e), n = r.reject, i = _(function () { d(t, !1, function (t) { e.resolve(t).then(r.resolve, n) }) }); return i.e && n(i.v), r.promise } }) }, function (t, e, r) { r(59)("split", 2, function (t, e, n) { "use strict"; var i = r(62), o = n, s = [].push; if ("c" == "abbc".split(/(b)*/)[1] || 4 != "test".split(/(?:)/, -1).length || 2 != "ab".split(/(?:ab)*/).length || 4 != ".".split(/(.?)(.?)/).length || ".".split(/()()/).length > 1 || "".split(/.?/).length) { var a = void 0 === /()??/.exec("")[1]; n = function (t, e) { var r = String(this); if (void 0 === t && 0 === e) return []; if (!i(t)) return o.call(r, t, e); var n, u, c, f, h, l = [], p = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.unicode ? "u" : "") + (t.sticky ? "y" : ""), g = 0, d = void 0 === e ? 4294967295 : e >>> 0, v = new RegExp(t.source, p + "g"); for (a || (n = new RegExp("^" + v.source + "$(?!\\s)", p)); (u = v.exec(r)) && !((c = u.index + u[0].length) > g && (l.push(r.slice(g, u.index)), !a && u.length > 1 && u[0].replace(n, function () { for (h = 1; h < arguments.length - 2; h++)void 0 === arguments[h] && (u[h] = void 0) }), u.length > 1 && u.index < r.length && s.apply(l, u.slice(1)), f = u[0].length, g = c, l.length >= d));)v.lastIndex === u.index && v.lastIndex++; return g === r.length ? !f && v.test("") || l.push("") : l.push(r.slice(g)), l.length > d ? l.slice(0, d) : l } } else "0".split(void 0, 0).length && (n = function (t, e) { return void 0 === t && 0 === e ? [] : o.call(this, t, e) }); return [function split(r, i) { var o = t(this), s = void 0 == r ? void 0 : r[e]; return void 0 !== s ? s.call(r, o, i) : n.call(String(o), r, i) }, n] }) }, function (t, e, r) { r(59)("search", 1, function (t, e, r) { return [function search(r) { "use strict"; var n = t(this), i = void 0 == r ? void 0 : r[e]; return void 0 !== i ? i.call(r, n) : new RegExp(r)[e](String(n)) }, r] }) }, function (t, e, r) { r(59)("replace", 2, function (t, e, r) { return [function replace(n, i) { "use strict"; var o = t(this), s = void 0 == n ? void 0 : n[e]; return void 0 !== s ? s.call(n, o, i) : r.call(String(o), n, i) }, r] }) }, function (t, e, r) { r(59)("match", 1, function (t, e, r) { return [function match(r) { "use strict"; var n = t(this), i = void 0 == r ? void 0 : r[e]; return void 0 !== i ? i.call(r, n) : new RegExp(r)[e](String(n)) }, r] }) }, function (t, e, r) { "use strict"; r(127); var n = r(1), i = r(60), o = r(9), s = /./.toString, a = function (t) { r(13)(RegExp.prototype, "toString", t, !0) }; r(4)(function () { return "/a/b" != s.call({ source: "a", flags: "b" }) }) ? a(function toString() { var t = n(this); return "/".concat(t.source, "/", "flags" in t ? t.flags : !o && t instanceof RegExp ? i.call(t) : void 0) }) : "toString" != s.name && a(function toString() { return s.call(this) }) }, function (t, e, r) { var n = r(3), i = r(91), o = r(8).f, s = r(37).f, a = r(62), u = r(60), c = n.RegExp, f = c, h = c.prototype, l = /a/g, p = /a/g, g = new c(l) !== l; if (r(9) && (!g || r(4)(function () { return p[r(6)("match")] = !1, c(l) != l || c(p) == p || "/a/i" != c(l, "i") }))) { c = function RegExp(t, e) { var r = this instanceof c, n = a(t), o = void 0 === e; return !r && n && t.constructor === c && o ? t : i(g ? new f(n && !o ? t.source : t, e) : f((n = t instanceof c) ? t.source : t, n && o ? u.call(t) : e), r ? this : h, c) }; for (var d = function (t) { t in c || o(c, t, { configurable: !0, get: function () { return f[t] }, set: function (e) { f[t] = e } }) }, v = s(f), y = 0; v.length > y;)d(v[y++]); h.constructor = c, c.prototype = h, r(13)(n, "RegExp", c) } r(36)("RegExp") }, function (t, e, r) { r(36)("Array") }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(6), o = "findIndex", s = !0; o in [] && Array(1)[o](function () { s = !1 }), n(n.P + n.F * s, "Array", { findIndex: function findIndex(t) { return i(this, t, arguments.length > 1 ? arguments[1] : void 0) } }), r(30)(o) }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(5), o = !0; "find" in [] && Array(1).find(function () { o = !1 }), n(n.P + n.F * o, "Array", { find: function find(t) { return i(this, t, arguments.length > 1 ? arguments[1] : void 0) } }), r(30)("find") }, function (t, e, r) { var n = r(0); n(n.P, "Array", { fill: r(78) }), r(30)("fill") }, function (t, e, r) { var n = r(0); n(n.P, "Array", { copyWithin: r(129) }), r(30)("copyWithin") }, function (t, e, r) { "use strict"; var n = r(0), i = r(17), o = r(24), s = r(7), a = [].lastIndexOf, u = !!a && 1 / [1].lastIndexOf(1, -0) < 0; n(n.P + n.F * (u || !r(19)(a)), "Array", { lastIndexOf: function lastIndexOf(t) { if (u) return a.apply(this, arguments) || 0; var e = i(this), r = s(e.length), n = r - 1; for (arguments.length > 1 && (n = Math.min(n, o(arguments[1]))), n < 0 && (n = r + n); n >= 0; n--)if (n in e && e[n] === t) return n || 0; return -1 } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(65)(!1), o = [].indexOf, s = !!o && 1 / [1].indexOf(1, -0) < 0; n(n.P + n.F * (s || !r(19)(o)), "Array", { indexOf: function indexOf(t) { return s ? o.apply(this, arguments) || 0 : i(this, t, arguments[1]) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(130); n(n.P + n.F * !r(19)([].reduceRight, !0), "Array", { reduceRight: function reduceRight(t) { return i(this, t, arguments.length, arguments[1], !0) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(130); n(n.P + n.F * !r(19)([].reduce, !0), "Array", { reduce: function reduce(t) { return i(this, t, arguments.length, arguments[1], !1) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(4); n(n.P + n.F * !r(19)([].every, !0), "Array", { every: function every(t) { return i(this, t, arguments[1]) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(3); n(n.P + n.F * !r(19)([].some, !0), "Array", { some: function some(t) { return i(this, t, arguments[1]) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(2); n(n.P + n.F * !r(19)([].filter, !0), "Array", { filter: function filter(t) { return i(this, t, arguments[1]) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(1); n(n.P + n.F * !r(19)([].map, !0), "Array", { map: function map(t) { return i(this, t, arguments[1]) } }) }, function (t, e, r) { var n = r(5), i = r(63), o = r(6)("species"); t.exports = function (t) { var e; return i(t) && ("function" != typeof (e = t.constructor) || e !== Array && !i(e.prototype) || (e = void 0), n(e) && null === (e = e[o]) && (e = void 0)), void 0 === e ? Array : e } }, function (t, e, r) { "use strict"; var n = r(0), i = r(22)(0), o = r(19)([].forEach, !0); n(n.P + n.F * !o, "Array", { forEach: function forEach(t) { return i(this, t, arguments[1]) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(11), o = r(10), s = r(4), a = [].sort, u = [1, 2, 3]; n(n.P + n.F * (s(function () { u.sort(void 0) }) || !s(function () { u.sort(null) }) || !r(19)(a)), "Array", { sort: function sort(t) { return void 0 === t ? a.call(o(this)) : a.call(o(this), i(t)) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(94), o = r(20), s = r(39), a = r(7), u = [].slice; n(n.P + n.F * r(4)(function () { i && u.call(i) }), "Array", { slice: function slice(t, e) { var r = a(this.length), n = o(this); if (e = void 0 === e ? r : e, "Array" == n) return u.call(this, t, e); for (var i = s(t, r), c = s(e, r), f = a(c - i), h = new Array(f), l = 0; l < f; l++)h[l] = "String" == n ? this.charAt(i + l) : this[i + l]; return h } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(17), o = [].join; n(n.P + n.F * (r(52) != Object || !r(19)(o)), "Array", { join: function join(t) { return o.call(i(this), void 0 === t ? "," : t) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(81); n(n.S + n.F * r(4)(function () { function F() { } return !(Array.of.call(F) instanceof F) }), "Array", { of: function of() { for (var t = 0, e = arguments.length, r = new ("function" == typeof this ? this : Array)(e); e > t;)i(r, t, arguments[t++]); return r.length = e, r } }) }, function (t, e, r) { "use strict"; var n = r(21), i = r(0), o = r(10), s = r(131), a = r(82), u = r(7), c = r(81), f = r(80); i(i.S + i.F * !r(61)(function (t) { Array.from(t) }), "Array", { from: function from(t) { var e, r, i, h, l = o(t), p = "function" == typeof this ? this : Array, g = arguments.length, d = g > 1 ? arguments[1] : void 0, v = void 0 !== d, y = 0, m = f(l); if (v && (d = n(d, g > 2 ? arguments[2] : void 0, 2)), void 0 == m || p == Array && a(m)) for (r = new p(e = u(l.length)); e > y; y++)c(r, y, v ? d(l[y], y) : l[y]); else for (h = m.call(l), r = new p; !(i = h.next()).done; y++)c(r, y, v ? s(h, d, [i.value, y], !0) : i.value); return r.length = y, r } }) }, function (t, e, r) { var n = r(0); n(n.S, "Array", { isArray: r(63) }) }, function (t, e, r) { "use strict"; var n = r(1), i = r(26); t.exports = function (t) { if ("string" !== t && "number" !== t && "default" !== t) throw TypeError("Incorrect hint"); return i(n(this), "number" != t) } }, function (t, e, r) { var n = r(6)("toPrimitive"), i = Date.prototype; n in i || r(14)(i, n, r(289)) }, function (t, e, r) { var n = Date.prototype, i = n.toString, o = n.getTime; new Date(NaN) + "" != "Invalid Date" && r(13)(n, "toString", function toString() { var t = o.call(this); return t == t ? i.call(this) : "Invalid Date" }) }, function (t, e, r) { "use strict"; var n = r(4), i = Date.prototype.getTime, o = Date.prototype.toISOString, s = function (t) { return t > 9 ? t : "0" + t }; t.exports = n(function () { return "0385-07-25T07:06:39.999Z" != o.call(new Date(-5e13 - 1)) }) || !n(function () { o.call(new Date(NaN)) }) ? function toISOString() { if (!isFinite(i.call(this))) throw RangeError("Invalid time value"); var t = this, e = t.getUTCFullYear(), r = t.getUTCMilliseconds(), n = e < 0 ? "-" : e > 9999 ? "+" : ""; return n + ("00000" + Math.abs(e)).slice(n ? -6 : -4) + "-" + s(t.getUTCMonth() + 1) + "-" + s(t.getUTCDate()) + "T" + s(t.getUTCHours()) + ":" + s(t.getUTCMinutes()) + ":" + s(t.getUTCSeconds()) + "." + (r > 99 ? r : "0" + s(r)) + "Z" } : o }, function (t, e, r) { var n = r(0), i = r(292); n(n.P + n.F * (Date.prototype.toISOString !== i), "Date", { toISOString: i }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(10), o = r(26); n(n.P + n.F * r(4)(function () { return null !== new Date(NaN).toJSON() || 1 !== Date.prototype.toJSON.call({ toISOString: function () { return 1 } }) }), "Date", { toJSON: function toJSON(t) { var e = i(this), r = o(e); return "number" != typeof r || isFinite(r) ? e.toISOString() : null } }) }, function (t, e, r) { var n = r(0); n(n.S, "Date", { now: function () { return (new Date).getTime() } }) }, function (t, e, r) { "use strict"; r(12)("sup", function (t) { return function sup() { return t(this, "sup", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("sub", function (t) { return function sub() { return t(this, "sub", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("strike", function (t) { return function strike() { return t(this, "strike", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("small", function (t) { return function small() { return t(this, "small", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("link", function (t) { return function link(e) { return t(this, "a", "href", e) } }) }, function (t, e, r) { "use strict"; r(12)("italics", function (t) { return function italics() { return t(this, "i", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("fontsize", function (t) { return function fontsize(e) { return t(this, "font", "size", e) } }) }, function (t, e, r) { "use strict"; r(12)("fontcolor", function (t) { return function fontcolor(e) { return t(this, "font", "color", e) } }) }, function (t, e, r) { "use strict"; r(12)("fixed", function (t) { return function fixed() { return t(this, "tt", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("bold", function (t) { return function bold() { return t(this, "b", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("blink", function (t) { return function blink() { return t(this, "blink", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("big", function (t) { return function big() { return t(this, "big", "", "") } }) }, function (t, e, r) { "use strict"; r(12)("anchor", function (t) { return function anchor(e) { return t(this, "a", "name", e) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(7), o = r(84), s = "".startsWith; n(n.P + n.F * r(83)("startsWith"), "String", { startsWith: function startsWith(t) { var e = o(this, t, "startsWith"), r = i(Math.min(arguments.length > 1 ? arguments[1] : void 0, e.length)), n = String(t); return s ? s.call(e, n, r) : e.slice(r, r + n.length) === n } }) }, function (t, e, r) { var n = r(0); n(n.P, "String", { repeat: r(90) }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(84); n(n.P + n.F * r(83)("includes"), "String", { includes: function includes(t) { return !!~i(this, t, "includes").indexOf(t, arguments.length > 1 ? arguments[1] : void 0) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(7), o = r(84), s = "".endsWith; n(n.P + n.F * r(83)("endsWith"), "String", { endsWith: function endsWith(t) { var e = o(this, t, "endsWith"), r = arguments.length > 1 ? arguments[1] : void 0, n = i(e.length), a = void 0 === r ? n : Math.min(i(r), n), u = String(t); return s ? s.call(e, u, a) : e.slice(a - u.length, a) === u } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(87)(!1); n(n.P, "String", { codePointAt: function codePointAt(t) { return i(this, t) } }) }, function (t, e, r) { "use strict"; var n = r(87)(!0); r(86)(String, "String", function (t) { this._t = String(t), this._i = 0 }, function () { var t, e = this._t, r = this._i; return r >= e.length ? { value: void 0, done: !0 } : (t = n(e, r), this._i += t.length, { value: t, done: !1 }) }) }, function (t, e, r) { "use strict"; r(47)("trim", function (t) { return function trim() { return t(this, 3) } }) }, function (t, e, r) { var n = r(0), i = r(17), o = r(7); n(n.S, "String", { raw: function raw(t) { for (var e = i(t.raw), r = o(e.length), n = arguments.length, s = [], a = 0; r > a;)s.push(String(e[a++])), a < n && s.push(String(arguments[a])); return s.join("") } }) }, function (t, e, r) { var n = r(0), i = r(39), o = String.fromCharCode, s = String.fromCodePoint; n(n.S + n.F * (!!s && 1 != s.length), "String", { fromCodePoint: function fromCodePoint(t) { for (var e, r = [], n = arguments.length, s = 0; n > s;) { if (e = +arguments[s++], i(e, 1114111) !== e) throw RangeError(e + " is not a valid code point"); r.push(e < 65536 ? o(e) : o(55296 + ((e -= 65536) >> 10), e % 1024 + 56320)) } return r.join("") } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { trunc: function trunc(t) { return (t > 0 ? Math.floor : Math.ceil)(t) } }) }, function (t, e, r) { var n = r(0), i = r(88), o = Math.exp; n(n.S, "Math", { tanh: function tanh(t) { var e = i(t = +t), r = i(-t); return e == 1 / 0 ? 1 : r == 1 / 0 ? -1 : (e - r) / (o(t) + o(-t)) } }) }, function (t, e, r) { var n = r(0), i = r(88), o = Math.exp; n(n.S + n.F * r(4)(function () { return -2e-17 != !Math.sinh(-2e-17) }), "Math", { sinh: function sinh(t) { return Math.abs(t = +t) < 1 ? (i(t) - i(-t)) / 2 : (o(t - 1) - o(-t - 1)) * (Math.E / 2) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { sign: r(89) }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { log2: function log2(t) { return Math.log(t) / Math.LN2 } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { log1p: r(133) }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { log10: function log10(t) { return Math.log(t) * Math.LOG10E } }) }, function (t, e, r) { var n = r(0), i = Math.imul; n(n.S + n.F * r(4)(function () { return -5 != i(4294967295, 5) || 2 != i.length }), "Math", { imul: function imul(t, e) { var r = +t, n = +e, i = 65535 & r, o = 65535 & n; return 0 | i * o + ((65535 & r >>> 16) * o + i * (65535 & n >>> 16) << 16 >>> 0) } }) }, function (t, e, r) { var n = r(0), i = Math.abs; n(n.S, "Math", { hypot: function hypot(t, e) { for (var r, n, o = 0, s = 0, a = arguments.length, u = 0; s < a;)u < (r = i(arguments[s++])) ? (o = o * (n = u / r) * n + 1, u = r) : o += r > 0 ? (n = r / u) * n : r; return u === 1 / 0 ? 1 / 0 : u * Math.sqrt(o) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { fround: r(132) }) }, function (t, e, r) { var n = r(0), i = r(88); n(n.S + n.F * (i != Math.expm1), "Math", { expm1: i }) }, function (t, e, r) { var n = r(0), i = Math.exp; n(n.S, "Math", { cosh: function cosh(t) { return (i(t = +t) + i(-t)) / 2 } }) }, function (t, e, r) { var n = r(0); n(n.S, "Math", { clz32: function clz32(t) { return (t >>>= 0) ? 31 - Math.floor(Math.log(t + .5) * Math.LOG2E) : 32 } }) }, function (t, e, r) { var n = r(0), i = r(89); n(n.S, "Math", { cbrt: function cbrt(t) { return i(t = +t) * Math.pow(Math.abs(t), 1 / 3) } }) }, function (t, e, r) { var n = r(0), i = Math.atanh; n(n.S + n.F * !(i && 1 / i(-0) < 0), "Math", { atanh: function atanh(t) { return 0 == (t = +t) ? t : Math.log((1 + t) / (1 - t)) / 2 } }) }, function (t, e, r) { var n = r(0), i = Math.asinh; n(n.S + n.F * !(i && 1 / i(0) > 0), "Math", { asinh: function asinh(t) { return isFinite(t = +t) && 0 != t ? t < 0 ? -asinh(-t) : Math.log(t + Math.sqrt(t * t + 1)) : t } }) }, function (t, e, r) { var n = r(0), i = r(133), o = Math.sqrt, s = Math.acosh; n(n.S + n.F * !(s && 710 == Math.floor(s(Number.MAX_VALUE)) && s(1 / 0) == 1 / 0), "Math", { acosh: function acosh(t) { return (t = +t) < 1 ? NaN : t > 94906265.62425156 ? Math.log(t) + Math.LN2 : i(t - 1 + o(t - 1) * o(t + 1)) } }) }, function (t, e, r) { var n = r(0), i = r(137); n(n.S + n.F * (Number.parseInt != i), "Number", { parseInt: i }) }, function (t, e, r) { var n = r(0), i = r(136); n(n.S + n.F * (Number.parseFloat != i), "Number", { parseFloat: i }) }, function (t, e, r) { var n = r(0); n(n.S, "Number", { MIN_SAFE_INTEGER: -9007199254740991 }) }, function (t, e, r) { var n = r(0); n(n.S, "Number", { MAX_SAFE_INTEGER: 9007199254740991 }) }, function (t, e, r) { var n = r(0), i = r(134), o = Math.abs; n(n.S, "Number", { isSafeInteger: function isSafeInteger(t) { return i(t) && o(t) <= 9007199254740991 } }) }, function (t, e, r) { var n = r(0); n(n.S, "Number", { isNaN: function isNaN(t) { return t != t } }) }, function (t, e, r) { var n = r(0); n(n.S, "Number", { isInteger: r(134) }) }, function (t, e, r) { var n = r(0), i = r(3).isFinite; n(n.S, "Number", { isFinite: function isFinite(t) { return "number" == typeof t && i(t) } }) }, function (t, e, r) { var n = r(0); n(n.S, "Number", { EPSILON: Math.pow(2, -52) }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(4), o = r(135), s = 1..toPrecision; n(n.P + n.F * (i(function () { return "1" !== s.call(1, void 0) }) || !i(function () { s.call({}) })), "Number", { toPrecision: function toPrecision(t) { var e = o(this, "Number#toPrecision: incorrect invocation!"); return void 0 === t ? s.call(e) : s.call(e, t) } }) }, function (t, e, r) { "use strict"; var n = r(0), i = r(24), o = r(135), s = r(90), a = 1..toFixed, u = Math.floor, c = [0, 0, 0, 0, 0, 0], f = "Number.toFixed: incorrect invocation!", h = function (t, e) { for (var r = -1, n = e; ++r < 6;)n += t * c[r], c[r] = n % 1e7, n = u(n / 1e7) }, l = function (t) { for (var e = 6, r = 0; --e >= 0;)r += c[e], c[e] = u(r / t), r = r % t * 1e7 }, p = function () { for (var t = 6, e = ""; --t >= 0;)if ("" !== e || 0 === t || 0 !== c[t]) { var r = String(c[t]); e = "" === e ? r : e + s.call("0", 7 - r.length) + r } return e }, g = function (t, e, r) { return 0 === e ? r : e % 2 == 1 ? g(t, e - 1, r * t) : g(t * t, e / 2, r) }; n(n.P + n.F * (!!a && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== (0xde0b6b3a7640080).toFixed(0)) || !r(4)(function () { a.call({}) })), "Number", { toFixed: function toFixed(t) { var e, r, n, a, u = o(this, f), c = i(t), d = "", v = "0"; if (c < 0 || c > 20) throw RangeError(f); if (u != u) return "NaN"; if (u <= -1e21 || u >= 1e21) return String(u); if (u < 0 && (d = "-", u = -u), u > 1e-21) if (r = (e = function (t) { for (var e = 0, r = t; r >= 4096;)e += 12, r /= 4096; for (; r >= 2;)e += 1, r /= 2; return e }(u * g(2, 69, 1)) - 69) < 0 ? u * g(2, -e, 1) : u / g(2, e, 1), r *= 4503599627370496, (e = 52 - e) > 0) { for (h(0, r), n = c; n >= 7;)h(1e7, 0), n -= 7; for (h(g(10, n, 1), 0), n = e - 1; n >= 23;)l(1 << 23), n -= 23; l(1 << n), h(1, 1), l(2), v = p() } else h(0, r), h(1 << -e, 0), v = p() + s.call("0", c); return v = c > 0 ? d + ((a = v.length) <= c ? "0." + s.call("0", c - a) + v : v.slice(0, a - c) + "." + v.slice(a - c)) : d + v } }) }, function (t, e, r) { "use strict"; var n = r(3), i = r(18), o = r(20), s = r(91), a = r(26), u = r(4), c = r(37).f, f = r(16).f, h = r(8).f, l = r(47).trim, p = n.Number, g = p, d = p.prototype, v = "Number" == o(r(38)(d)), y = "trim" in String.prototype, m = function (t) { var e = a(t, !1); if ("string" == typeof e && e.length > 2) { var r, n, i, o = (e = y ? e.trim() : l(e, 3)).charCodeAt(0); if (43 === o || 45 === o) { if (88 === (r = e.charCodeAt(2)) || 120 === r) return NaN } else if (48 === o) { switch (e.charCodeAt(1)) { case 66: case 98: n = 2, i = 49; break; case 79: case 111: n = 8, i = 55; break; default: return +e }for (var s, u = e.slice(2), c = 0, f = u.length; c < f; c++)if ((s = u.charCodeAt(c)) < 48 || s > i) return NaN; return parseInt(u, n) } } return +e }; if (!p(" 0o1") || !p("0b1") || p("+0x1")) { p = function Number(t) { var e = arguments.length < 1 ? 0 : t, r = this; return r instanceof p && (v ? u(function () { d.valueOf.call(r) }) : "Number" != o(r)) ? s(new g(m(e)), r, p) : m(e) }; for (var S, _ = r(9) ? 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(","), b = 0; _.length > b; b++)i(g, S = _[b]) && !i(p, S) && h(p, S, f(g, S)); p.prototype = d, d.constructor = p, r(13)(n, "Number", p) } }, function (t, e, r) { var n = r(0), i = r(136); n(n.G + n.F * (parseFloat != i), { parseFloat: i }) }, function (t, e, r) { var n = r(0), i = r(137); n(n.G + n.F * (parseInt != i), { parseInt: i }) }, function (t, e, r) { "use strict"; var n = r(5), i = r(15), o = r(6)("hasInstance"), s = Function.prototype; o in s || r(8).f(s, o, { value: function (t) { if ("function" != typeof this || !n(t)) return !1; if (!n(this.prototype)) return t instanceof this; for (; t = i(t);)if (this.prototype === t) return !0; return !1 } }) }, function (t, e, r) { var n = r(8).f, i = Function.prototype, o = /^\s*function ([^ (]*)/; "name" in i || r(9) && n(i, "name", { configurable: !0, get: function () { try { return ("" + this).match(o)[1] } catch (t) { return "" } } }) }, function (t, e, r) { var n = r(0); n(n.P, "Function", { bind: r(139) }) }, function (t, e, r) { "use strict"; var n = r(50), i = {}; i[r(6)("toStringTag")] = "z", i + "" != "[object z]" && r(13)(Object.prototype, "toString", function toString() { return "[object " + n(this) + "]" }, !0) }, function (t, e, r) { var n = r(0); n(n.S, "Object", { setPrototypeOf: r(93).set }) }, function (t, e) { t.exports = Object.is || function is(t, e) { return t === e ? 0 !== t || 1 / t == 1 / e : t != t && e != e } }, function (t, e, r) { var n = r(0); n(n.S, "Object", { is: r(354) }) }, function (t, e, r) { var n = r(0); n(n.S + n.F, "Object", { assign: r(140) }) }, function (t, e, r) { var n = r(5); r(23)("isExtensible", function (t) { return function isExtensible(e) { return !!n(e) && (!t || t(e)) } }) }, function (t, e, r) { var n = r(5); r(23)("isSealed", function (t) { return function isSealed(e) { return !n(e) || !!t && t(e) } }) }, function (t, e, r) { var n = r(5); r(23)("isFrozen", function (t) { return function isFrozen(e) { return !n(e) || !!t && t(e) } }) }, function (t, e, r) { var n = r(5), i = r(31).onFreeze; r(23)("preventExtensions", function (t) { return function preventExtensions(e) { return t && n(e) ? t(i(e)) : e } }) }, function (t, e, r) { var n = r(5), i = r(31).onFreeze; r(23)("seal", function (t) { return function seal(e) { return t && n(e) ? t(i(e)) : e } }) }, function (t, e, r) { var n = r(5), i = r(31).onFreeze; r(23)("freeze", function (t) { return function freeze(e) { return t && n(e) ? t(i(e)) : e } }) }, function (t, e, r) { r(23)("getOwnPropertyNames", function () { return r(141).f }) }, function (t, e, r) { var n = r(10), i = r(40); r(23)("keys", function () { return function keys(t) { return i(n(t)) } }) }, function (t, e, r) { var n = r(10), i = r(15); r(23)("getPrototypeOf", function () { return function getPrototypeOf(t) { return i(n(t)) } }) }, function (t, e, r) { var n = r(17), i = r(16).f; r(23)("getOwnPropertyDescriptor", function () { return function getOwnPropertyDescriptor(t, e) { return i(n(t), e) } }) }, function (t, e, r) { var n = r(0); n(n.S + n.F * !r(9), "Object", { defineProperties: r(142) }) }, function (t, e, r) { var n = r(0); n(n.S + n.F * !r(9), "Object", { defineProperty: r(8).f }) }, function (t, e, r) { var n = r(0); n(n.S, "Object", { create: r(38) }) }, function (t, e, r) { var n = r(40), i = r(64), o = r(51); t.exports = function (t) { var e = n(t), r = i.f; if (r) for (var s, a = r(t), u = o.f, c = 0; a.length > c;)u.call(t, s = a[c++]) && e.push(s); return e } }, function (t, e, r) { "use strict"; var n = r(3), i = r(18), o = r(9), s = r(0), a = r(13), u = r(31).KEY, c = r(4), f = r(66), h = r(48), l = r(42), p = r(6), g = r(144), d = r(97), v = r(370), y = r(63), m = r(1), S = r(5), _ = r(17), b = r(26), F = r(43), w = r(38), E = r(141), x = r(16), A = r(8), P = r(40), k = x.f, I = A.f, C = E.f, R = n.Symbol, B = n.JSON, T = B && B.stringify, M = p("_hidden"), O = p("toPrimitive"), U = {}.propertyIsEnumerable, D = f("symbol-registry"), N = f("symbols"), L = f("op-symbols"), j = Object.prototype, H = "function" == typeof R, K = n.QObject, V = !K || !K.prototype || !K.prototype.findChild, W = o && c(function () { return 7 != w(I({}, "a", { get: function () { return I(this, "a", { value: 7 }).a } })).a }) ? function (t, e, r) { var n = k(j, e); n && delete j[e], I(t, e, r), n && t !== j && I(j, e, n) } : I, q = function (t) { var e = N[t] = w(R.prototype); return e._k = t, e }, J = H && "symbol" == typeof R.iterator ? function (t) { return "symbol" == typeof t } : function (t) { return t instanceof R }, z = function defineProperty(t, e, r) { return t === j && z(L, e, r), m(t), e = b(e, !0), m(r), i(N, e) ? (r.enumerable ? (i(t, M) && t[M][e] && (t[M][e] = !1), r = w(r, { enumerable: F(0, !1) })) : (i(t, M) || I(t, M, F(1, {})), t[M][e] = !0), W(t, e, r)) : I(t, e, r) }, G = function defineProperties(t, e) { m(t); for (var r, n = v(e = _(e)), i = 0, o = n.length; o > i;)z(t, r = n[i++], e[r]); return t }, Y = function propertyIsEnumerable(t) { var e = U.call(this, t = b(t, !0)); return !(this === j && i(N, t) && !i(L, t)) && (!(e || !i(this, t) || !i(N, t) || i(this, M) && this[M][t]) || e) }, X = function getOwnPropertyDescriptor(t, e) { if (t = _(t), e = b(e, !0), t !== j || !i(N, e) || i(L, e)) { var r = k(t, e); return !r || !i(N, e) || i(t, M) && t[M][e] || (r.enumerable = !0), r } }, $ = function getOwnPropertyNames(t) { for (var e, r = C(_(t)), n = [], o = 0; r.length > o;)i(N, e = r[o++]) || e == M || e == u || n.push(e); return n }, Q = function getOwnPropertySymbols(t) { for (var e, r = t === j, n = C(r ? L : _(t)), o = [], s = 0; n.length > s;)!i(N, e = n[s++]) || r && !i(j, e) || o.push(N[e]); return o }; H || (a((R = function Symbol() { if (this instanceof R) throw TypeError("Symbol is not a constructor!"); var t = l(arguments.length > 0 ? arguments[0] : void 0), e = function (r) { this === j && e.call(L, r), i(this, M) && i(this[M], t) && (this[M][t] = !1), W(this, t, F(1, r)) }; return o && V && W(j, t, { configurable: !0, set: e }), q(t) }).prototype, "toString", function toString() { return this._k }), x.f = X, A.f = z, r(37).f = E.f = $, r(51).f = Y, r(64).f = Q, o && !r(41) && a(j, "propertyIsEnumerable", Y, !0), g.f = function (t) { return q(p(t)) }), s(s.G + s.W + s.F * !H, { Symbol: R }); for (var Z = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), tt = 0; Z.length > tt;)p(Z[tt++]); for (var et = P(p.store), rt = 0; et.length > rt;)d(et[rt++]); s(s.S + s.F * !H, "Symbol", { for: function (t) { return i(D, t += "") ? D[t] : D[t] = R(t) }, keyFor: function keyFor(t) { if (!J(t)) throw TypeError(t + " is not a symbol!"); for (var e in D) if (D[e] === t) return e }, useSetter: function () { V = !0 }, useSimple: function () { V = !1 } }), s(s.S + s.F * !H, "Object", { create: function create(t, e) { return void 0 === e ? w(t) : G(w(t), e) }, defineProperty: z, defineProperties: G, getOwnPropertyDescriptor: X, getOwnPropertyNames: $, getOwnPropertySymbols: Q }), B && s(s.S + s.F * (!H || c(function () { var t = R(); return "[null]" != T([t]) || "{}" != T({ a: t }) || "{}" != T(Object(t)) })), "JSON", { stringify: function stringify(t) { for (var e, r, n = [t], i = 1; arguments.length > i;)n.push(arguments[i++]); if (r = e = n[1], (S(e) || void 0 !== t) && !J(t)) return y(e) || (e = function (t, e) { if ("function" == typeof r && (e = r.call(this, t, e)), !J(e)) return e }), n[1] = e, T.apply(B, n) } }), R.prototype[O] || r(14)(R.prototype, O, R.prototype.valueOf), h(R, "Symbol"), h(Math, "Math", !0), h(n.JSON, "JSON", !0) }, function (t, e, r) { r(371), r(369), r(368), r(367), r(366), r(365), r(364), r(363), r(362), r(361), r(360), r(359), r(358), r(357), r(356), r(355), r(353), r(352), r(351), r(350), r(349), r(348), r(347), r(346), r(345), r(344), r(343), r(342), r(341), r(340), r(339), r(338), r(337), r(336), r(335), r(334), r(333), r(332), r(331), r(330), r(329), r(328), r(327), r(326), r(325), r(324), r(323), r(322), r(321), r(320), r(319), r(318), r(317), r(316), r(315), r(314), r(313), r(312), r(311), r(310), r(309), r(308), r(307), r(306), r(305), r(304), r(303), r(302), r(301), r(300), r(299), r(298), r(297), r(296), r(295), r(294), r(293), r(291), r(290), r(288), r(287), r(286), r(285), r(284), r(283), r(282), r(280), r(279), r(278), r(277), r(276), r(275), r(274), r(273), r(272), r(271), r(270), r(269), r(268), r(77), r(267), r(266), r(127), r(265), r(264), r(263), r(262), r(261), r(124), r(122), r(121), r(260), r(259), r(258), r(257), r(256), r(255), r(254), r(253), r(252), r(251), r(250), r(249), r(248), r(247), r(246), r(245), r(244), r(243), r(242), r(241), r(240), r(239), r(238), r(237), r(236), r(235), r(234), r(233), r(232), r(231), r(230), r(229), r(228), r(227), r(226), r(225), r(224), r(223), r(222), r(221), r(220), r(219), r(218), r(217), r(216), r(215), r(214), r(213), r(212), r(211), r(210), r(209), r(208), r(207), r(206), r(205), r(204), r(203), r(202), r(201), r(200), r(199), r(198), r(197), r(196), r(195), r(194), r(193), r(192), r(191), r(190), r(189), r(188), r(187), r(186), r(185), r(184), r(183), r(182), r(181), r(180), r(179), r(178), r(177), r(176), t.exports = r(27) }, function (t, e, r) { "use strict"; (function (t) { if (r(372), r(175), r(174), t._babelPolyfill) throw new Error("only one instance of babel-polyfill is allowed"); t._babelPolyfill = !0; var e = "defineProperty"; function define(t, r, n) { t[r] || Object[e](t, r, { writable: !0, configurable: !0, value: n }) } define(String.prototype, "padLeft", "".padStart), define(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] && define(Array, t, Function.call.bind([][t])) }) }).call(this, r(99)) }, function (t, e, r) { r(373), t.exports = r(171) }]);;
/*
 * fitty v2.2.6 - Snugly resizes text to fit its parent container
 * Copyright (c) 2018 Rik Schennink <hello@rikschennink.nl> (http://rikschennink.nl/)
 */
!function(e,t){if("function"==typeof define&&define.amd)define(["module","exports"],t);else if("undefined"!=typeof exports)t(module,exports);else{var n={exports:{}};t(n,n.exports),e.fitty=n.exports}}(this,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};t.default=function(n){if(n){var i=function(e){return[].slice.call(e)},r={IDLE:0,DIRTY_CONTENT:1,DIRTY_LAYOUT:2,DIRTY:3},o=[],e=null,u="requestAnimationFrame"in n?function(){n.cancelAnimationFrame(e),e=n.requestAnimationFrame(function(){a(o.filter(function(e){return e.dirty}))})}:function(){},t=function(t){return function(){o.forEach(function(e){e.dirty=t}),u()}},a=function(e){e.filter(function(e){return!e.styleComputed}).forEach(function(e){e.styleComputed=f(e)}),e.filter(d).forEach(p);var t=e.filter(s);t.forEach(c),t.forEach(function(e){p(e),l(e)}),t.forEach(m)},l=function(e){return e.dirty=r.IDLE},c=function(e){e.availableWidth=e.element.parentNode.clientWidth,e.currentWidth=e.element.scrollWidth,e.previousFontSize=e.currentFontSize,e.currentFontSize=Math.min(Math.max(e.minSize,e.availableWidth/e.currentWidth*e.previousFontSize),e.maxSize),e.whiteSpace=e.multiLine&&e.currentFontSize===e.minSize?"normal":"nowrap"},s=function(e){return e.dirty!==r.DIRTY_LAYOUT||e.dirty===r.DIRTY_LAYOUT&&e.element.parentNode.clientWidth!==e.availableWidth},f=function(e){var t=n.getComputedStyle(e.element,null);e.currentFontSize=parseInt(t.getPropertyValue("font-size"),10),e.display=t.getPropertyValue("display"),e.whiteSpace=t.getPropertyValue("white-space")},d=function(e){var t=!1;return!e.preStyleTestCompleted&&(/inline-/.test(e.display)||(t=!0,e.display="inline-block"),"nowrap"!==e.whiteSpace&&(t=!0,e.whiteSpace="nowrap"),e.preStyleTestCompleted=!0,t)},p=function(e){e.originalStyle||(e.originalStyle=e.element.getAttribute("style")||""),e.element.style.cssText=e.originalStyle+";white-space:"+e.whiteSpace+";display:"+e.display+";font-size:"+e.currentFontSize+"px"},m=function(e){e.element.dispatchEvent(new CustomEvent("fit",{detail:{oldValue:e.previousFontSize,newValue:e.currentFontSize,scaleFactor:e.currentFontSize/e.previousFontSize}}))},v=function(e,t){return function(){e.dirty=t,u()}},y=function(e){e.newbie=!0,e.dirty=!0,o.push(e)},h=function(t){return function(){o=o.filter(function(e){return e.element!==t.element}),t.observeMutations&&t.observer.disconnect(),t.element.style.cssText=t.originalStyle}},S=function(e){e.observeMutations&&(e.observer=new MutationObserver(v(e,r.DIRTY_CONTENT)),e.observer.observe(e.element,e.observeMutations))},b={minSize:16,maxSize:512,multiLine:!0,observeMutations:"MutationObserver"in n&&{subtree:!0,childList:!0,characterData:!0}},w=null,T=function(){n.clearTimeout(w),w=n.setTimeout(t(r.DIRTY_LAYOUT),g.observeWindowDelay)},z=["resize","orientationchange"];return Object.defineProperty(g,"observeWindow",{set:function(e){var t=(e?"add":"remove")+"EventListener";z.forEach(function(e){n[t](e,T)})}}),g.observeWindow=!0,g.observeWindowDelay=100,g.fitAll=t(r.DIRTY),g}function F(e,t){var n=D({},b,t),i=e.map(function(e){var t=D({},n,{element:e});return y(t),S(t),{element:e,fit:v(t,r.DIRTY),unsubscribe:h(t)}});return u(),i}function g(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e?F(i(document.querySelectorAll(e)),t):F([e],t)[0]}}("undefined"==typeof window?null:window),e.exports=t.default});;
(function($) {
  $.fn.normalizeHeight = function () {
    var $this = $(this);
    $this.height('auto');

    var maxHeight = Math.max.apply(null, $.map($this, function (el) {
      return $(el).height();
    }));
    $this.height(maxHeight);
  };

  var slice = [].slice;

  $.whenAll = function (array) {
    var
      resolveValues = arguments.length == 1 && $.isArray(array)
        ? array
        : slice.call(arguments); // eslint-disable-line prefer-rest-params
    var length = resolveValues.length;
    var remaining = length;
    var deferred = $.Deferred(); // eslint-disable-line new-cap
    var i = 0;
    var failed = 0;
    var rejectContexts = Array(length);
    var rejectValues = Array(length);
    var resolveContexts = Array(length);
    var value
      ;

    function updateFunc(index, contexts, values) {
      return function () {
        !(values === resolveValues) && failed++;
        deferred.notifyWith(
          contexts[index] = this // eslint-disable-line no-invalid-this
          , values[index] = slice.call(arguments) // eslint-disable-line prefer-rest-params
        );
        if (!(--remaining)) {
          deferred[(!failed ? 'resolve' : 'reject') + 'With'](contexts, values);
        }
      };
    }

    for (; i < length; i++) {
      if ((value = resolveValues[i]) && $.isFunction(value.promise)) {
        value.promise()
          .done(updateFunc(i, resolveContexts, resolveValues))
          .fail(updateFunc(i, rejectContexts, rejectValues))
          ;
      } else {
        deferred.notifyWith(this, value);
        --remaining;
      }
    }

    if (!remaining) {
      deferred.resolveWith(resolveContexts, resolveValues);
    }

    return deferred.promise();
  };
}) (jQuery);
;
"use strict";

var VanillaCalendar = function () {
  return function (t) {
    function e(t, e, a) {
      t && (t.attachEvent ? t.attachEvent("on" + e, a) : t.addEventListener(e, a));
    }

    function a(t, e, a) {
      t && (t.detachEvent ? t.detachEvent("on" + e, a) : t.removeEventListener(e, a));
    }

    var n = {
      selector: null,
      datesFilter: !1,
      pastDates: !0,
      availableWeekDays: [],
      availableDates: [],
      date: new Date(),
      todaysDate: new Date(),
      button_prev: null,
      button_next: null,
      month: null,
      month_label: null,
      onSelect: function onSelect(t, e) { },
      months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
      shortWeekday: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
    };

    for (var _e in t) {
      n.hasOwnProperty(_e) && (n[_e] = t[_e]);
    }

    var l = document.querySelector(n.selector);
    if (!l) return;

    var d = function d(t) {
      var e = document.createElement("div"),
        a = document.createElement("span");
      a.innerHTML = t.getDate(), e.className = "vanilla-calendar-date", e.setAttribute("data-calendar-date", t);
      var l = n.availableWeekDays.filter(function (e) {
        return e.day === t.getDay() || e.day === function (t) {
          return ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"][t];
        }(t.getDay());
      }),
        d = n.availableDates.filter(function (e) {
          return e.date === t.getFullYear() + "-" + String(t.getMonth() + 1).padStart("2", 0) + "-" + String(t.getDate()).padStart("2", 0);
        });
      1 === t.getDate() && (e.style.marginLeft = 14.28 * t.getDay() + "%"), n.date.getTime() <= n.todaysDate.getTime() - 1 && !n.pastDates ? e.classList.add("vanilla-calendar-date--disabled") : n.datesFilter ? l.length ? (e.classList.add("vanilla-calendar-date--active"), e.setAttribute("data-calendar-data", JSON.stringify(l[0])), e.setAttribute("data-calendar-status", "active")) : d.length ? (e.classList.add("vanilla-calendar-date--active"), e.setAttribute("data-calendar-data", JSON.stringify(d[0])), e.setAttribute("data-calendar-status", "active")) : e.classList.add("vanilla-calendar-date--disabled") : (e.classList.add("vanilla-calendar-date--active"), e.setAttribute("data-calendar-status", "active")), t.toString() === n.todaysDate.toString() && e.classList.add("vanilla-calendar-date--today"), e.appendChild(a), n.month.appendChild(e);
    },
      r = function r() {
        l.querySelectorAll("[data-calendar-status=active]").forEach(function (t) {
          t.addEventListener("click", function () {
            document.querySelectorAll(".vanilla-calendar-date--selected").forEach(function (t) {
              t.classList.remove("vanilla-calendar-date--selected");
            });
            var t = this.dataset,
              e = {};
            t.calendarDate && (e.date = t.calendarDate), t.calendarData && (e.data = JSON.parse(t.calendarData)), n.onSelect(e, this), this.classList.add("vanilla-calendar-date--selected");
          });
        });
      },
      s = function s() {
        o();
        var t = n.date.getMonth();

        for (; n.date.getMonth() === t;) {
          d(n.date), n.date.setDate(n.date.getDate() + 1);
        }

        n.date.setDate(1), n.date.setMonth(n.date.getMonth() - 1), n.month_label.innerHTML = n.months[n.date.getMonth()] + " " + n.date.getFullYear(), r();
      },
      i = function i() {
        n.date.setMonth(n.date.getMonth() - 1), s();
      },
      c = function c() {
        n.date.setMonth(n.date.getMonth() + 1), s();
      },
      o = function o() {
        n.month.innerHTML = "";
      };

    this.init = function () {
      document.querySelector(n.selector).innerHTML = '\n            <div class="vanilla-calendar-header">\n                <button type="button" class="vanilla-calendar-btn" data-calendar-toggle="previous"><svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"></path></svg></button>\n                <div class="vanilla-calendar-header__label" data-calendar-label="month"></div>\n                <button type="button" class="vanilla-calendar-btn" data-calendar-toggle="next"><svg height="24" version="1.1" viewbox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"></path></svg></button>\n            </div>\n            <div class="vanilla-calendar-week"></div>\n            <div class="vanilla-calendar-body" data-calendar-area="month"></div>\n            ', n.button_prev = document.querySelector(n.selector + " [data-calendar-toggle=previous]"), n.button_next = document.querySelector(n.selector + " [data-calendar-toggle=next]"), n.month = document.querySelector(n.selector + " [data-calendar-area=month]"), n.month_label = document.querySelector(n.selector + " [data-calendar-label=month]"), n.date.setDate(1), s(), document.querySelector("".concat(n.selector, " .vanilla-calendar-week")).innerHTML = "\n                <span>".concat(n.shortWeekday[0], "</span>\n                <span>").concat(n.shortWeekday[1], "</span>\n                <span>").concat(n.shortWeekday[2], "</span>\n                <span>").concat(n.shortWeekday[3], "</span>\n                <span>").concat(n.shortWeekday[4], "</span>\n                <span>").concat(n.shortWeekday[5], "</span>\n                <span>").concat(n.shortWeekday[6], "</span>\n            "), e(n.button_prev, "click", i), e(n.button_next, "click", c);
    }, this.destroy = function () {
      a(n.button_prev, "click", i), a(n.button_next, "click", c), o(), document.querySelector(n.selector).innerHTML = "";
    }, this.reset = function () {
      this.destroy(), this.init();
    }, this.set = function (t) {
      for (var _e2 in t) {
        n.hasOwnProperty(_e2) && (n[_e2] = t[_e2]);
      }

      s();
    }, this.init();
  };
}();

window.VanillaCalendar = VanillaCalendar;;
