(self["webpackChunkit_orgchart"]=self["webpackChunkit_orgchart"]||[]).push([[998],{9662:function(t,e,r){var n=r(7854),i=r(614),o=r(6330),s=n.TypeError;t.exports=function(t){if(i(t))return t;throw s(o(t)+" is not a function")}},6077:function(t,e,r){var n=r(7854),i=r(614),o=n.String,s=n.TypeError;t.exports=function(t){if("object"==typeof t||i(t))return t;throw s("Can't set "+o(t)+" as a prototype")}},5787:function(t,e,r){var n=r(7854),i=r(7976),o=n.TypeError;t.exports=function(t,e){if(i(e,t))return t;throw o("Incorrect invocation")}},9670:function(t,e,r){var n=r(7854),i=r(111),o=n.String,s=n.TypeError;t.exports=function(t){if(i(t))return t;throw s(o(t)+" is not an object")}},4019:function(t){t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},260:function(t,e,r){"use strict";var n,i,o,s=r(4019),a=r(9781),u=r(7854),c=r(614),l=r(111),h=r(2597),f=r(648),d=r(6330),p=r(8880),g=r(1320),m=r(3070).f,v=r(7976),y=r(9518),_=r(7674),b=r(5112),w=r(9711),S=u.Int8Array,F=S&&S.prototype,E=u.Uint8ClampedArray,x=E&&E.prototype,k=S&&y(S),A=F&&y(F),T=Object.prototype,C=u.TypeError,P=b("toStringTag"),R=w("TYPED_ARRAY_TAG"),I=w("TYPED_ARRAY_CONSTRUCTOR"),O=s&&!!_&&"Opera"!==f(u.opera),N=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},M={BigInt64Array:8,BigUint64Array:8},L=function(t){if(!l(t))return!1;var e=f(t);return"DataView"===e||h(D,e)||h(M,e)},U=function(t){if(!l(t))return!1;var e=f(t);return h(D,e)||h(M,e)},j=function(t){if(U(t))return t;throw C("Target is not a typed array")},B=function(t){if(c(t)&&(!_||v(k,t)))return t;throw C(d(t)+" is not a typed array constructor")},H=function(t,e,r,n){if(a){if(r)for(var i in D){var o=u[i];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(c){}}}A[t]&&!r||g(A,t,r?e:O&&F[t]||e,n)}},V=function(t,e,r){var n,i;if(a){if(_){if(r)for(n in D)if(i=u[n],i&&h(i,t))try{delete i[t]}catch(o){}if(k[t]&&!r)return;try{return g(k,t,r?e:O&&k[t]||e)}catch(o){}}for(n in D)i=u[n],!i||i[t]&&!r||g(i,t,e)}};for(n in D)i=u[n],o=i&&i.prototype,o?p(o,I,i):O=!1;for(n in M)i=u[n],o=i&&i.prototype,o&&p(o,I,i);if((!O||!c(k)||k===Function.prototype)&&(k=function(){throw C("Incorrect invocation")},O))for(n in D)u[n]&&_(u[n],k);if((!O||!A||A===T)&&(A=k.prototype,O))for(n in D)u[n]&&_(u[n].prototype,A);if(O&&y(x)!==A&&_(x,A),a&&!h(A,P))for(n in N=!0,m(A,P,{get:function(){return l(this)?this[R]:void 0}}),D)u[n]&&p(u[n],R,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:O,TYPED_ARRAY_CONSTRUCTOR:I,TYPED_ARRAY_TAG:N&&R,aTypedArray:j,aTypedArrayConstructor:B,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:V,isView:L,isTypedArray:U,TypedArray:k,TypedArrayPrototype:A}},1318:function(t,e,r){var n=r(5656),i=r(1400),o=r(6244),s=function(t){return function(e,r,s){var a,u=n(e),c=o(u),l=i(s,c);if(t&&r!=r){while(c>l)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},4326:function(t,e,r){var n=r(1702),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:function(t,e,r){var n=r(7854),i=r(1694),o=r(614),s=r(4326),a=r(5112),u=a("toStringTag"),c=n.Object,l="Arguments"==s(function(){return arguments}()),h=function(t,e){try{return t[e]}catch(r){}};t.exports=i?s:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=h(e=c(t),u))?r:l?s(e):"Object"==(n=s(e))&&o(e.callee)?"Arguments":n}},7741:function(t,e,r){var n=r(1702),i=n("".replace),o=function(t){return String(Error(t).stack)}("zxcasd"),s=/\n\s*at [^:]*:[^\n]*/,a=s.test(o);t.exports=function(t,e){if(a&&"string"==typeof t)while(e--)t=i(t,s,"");return t}},9920:function(t,e,r){var n=r(2597),i=r(3887),o=r(1236),s=r(3070);t.exports=function(t,e,r){for(var a=i(e),u=s.f,c=o.f,l=0;l0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(t,e,r){var n=r(7293),i=r(9114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},2109:function(t,e,r){var n=r(7854),i=r(1236).f,o=r(8880),s=r(1320),a=r(3505),u=r(9920),c=r(4705);t.exports=function(t,e){var r,l,h,f,d,p,g=t.target,m=t.global,v=t.stat;if(l=m?n:v?n[g]||a(g,{}):(n[g]||{}).prototype,l)for(h in e){if(d=e[h],t.noTargetGet?(p=i(l,h),f=p&&p.value):f=l[h],r=c(m?h:g+(v?".":"#")+h,t.forced),!r&&void 0!==f){if(typeof d==typeof f)continue;u(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(l,h,d,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(e){return!0}}},2104:function(t){var e=Function.prototype,r=e.apply,n=e.bind,i=e.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(r):function(){return i.apply(r,arguments)})},6916:function(t){var e=Function.prototype.call;t.exports=e.bind?e.bind(e):function(){return e.apply(e,arguments)}},6530:function(t,e,r){var n=r(9781),i=r(2597),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},1702:function(t){var e=Function.prototype,r=e.bind,n=e.call,i=r&&r.bind(n,n);t.exports=r?function(t){return t&&i(t)}:function(t){return t&&function(){return n.apply(t,arguments)}}},5005:function(t,e,r){var n=r(7854),i=r(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},8173:function(t,e,r){var n=r(9662);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},7854:function(t,e,r){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:function(t,e,r){var n=r(1702),i=r(7908),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:function(t){t.exports={}},4664:function(t,e,r){var n=r(9781),i=r(7293),o=r(317);t.exports=!n&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,r){var n=r(7854),i=r(1702),o=r(7293),s=r(4326),a=n.Object,u=i("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?u(t,""):a(t)}:a},9587:function(t,e,r){var n=r(614),i=r(111),o=r(7674);t.exports=function(t,e,r){var s,a;return o&&n(s=e.constructor)&&s!==r&&i(a=s.prototype)&&a!==r.prototype&&o(t,a),t}},2788:function(t,e,r){var n=r(1702),i=r(614),o=r(5465),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},8340:function(t,e,r){var n=r(111),i=r(8880);t.exports=function(t,e){n(e)&&"cause"in e&&i(t,"cause",e.cause)}},9909:function(t,e,r){var n,i,o,s=r(8536),a=r(7854),u=r(1702),c=r(111),l=r(8880),h=r(2597),f=r(5465),d=r(6200),p=r(3501),g="Object already initialized",m=a.TypeError,v=a.WeakMap,y=function(t){return o(t)?i(t):n(t,{})},_=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return r}};if(s||f.state){var b=f.state||(f.state=new v),w=u(b.get),S=u(b.has),F=u(b.set);n=function(t,e){if(S(b,t))throw new m(g);return e.facade=t,F(b,t,e),e},i=function(t){return w(b,t)||{}},o=function(t){return S(b,t)}}else{var E=d("state");p[E]=!0,n=function(t,e){if(h(t,E))throw new m(g);return e.facade=t,l(t,E,e),e},i=function(t){return h(t,E)?t[E]:{}},o=function(t){return h(t,E)}}t.exports={set:n,get:i,has:o,enforce:y,getterFor:_}},614:function(t){t.exports=function(t){return"function"==typeof t}},4705:function(t,e,r){var n=r(7293),i=r(614),o=/#|\.prototype\./,s=function(t,e){var r=u[a(t)];return r==l||r!=c&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},111:function(t,e,r){var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:function(t){t.exports=!1},2190:function(t,e,r){var n=r(7854),i=r(5005),o=r(614),s=r(7976),a=r(3307),u=n.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&s(e.prototype,u(t))}},6244:function(t,e,r){var n=r(7466);t.exports=function(t){return n(t.length)}},133:function(t,e,r){var n=r(7392),i=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},8536:function(t,e,r){var n=r(7854),i=r(614),o=r(2788),s=n.WeakMap;t.exports=i(s)&&/native code/.test(o(s))},6277:function(t,e,r){var n=r(1340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},3070:function(t,e,r){var n=r(7854),i=r(9781),o=r(4664),s=r(3353),a=r(9670),u=r(4948),c=n.TypeError,l=Object.defineProperty,h=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",p="writable";e.f=i?s?function(t,e,r){if(a(t),e=u(e),a(r),"function"===typeof t&&"prototype"===e&&"value"in r&&p in r&&!r[p]){var n=h(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:f in r?r[f]:n[f],writable:!1})}return l(t,e,r)}:l:function(t,e,r){if(a(t),e=u(e),a(r),o)try{return l(t,e,r)}catch(n){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:function(t,e,r){var n=r(9781),i=r(6916),o=r(5296),s=r(9114),a=r(5656),u=r(4948),c=r(2597),l=r(4664),h=Object.getOwnPropertyDescriptor;e.f=n?h:function(t,e){if(t=a(t),e=u(e),l)try{return h(t,e)}catch(r){}if(c(t,e))return s(!i(o.f,t,e),t[e])}},8006:function(t,e,r){var n=r(6324),i=r(748),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},9518:function(t,e,r){var n=r(7854),i=r(2597),o=r(614),s=r(7908),a=r(6200),u=r(8544),c=a("IE_PROTO"),l=n.Object,h=l.prototype;t.exports=u?l.getPrototypeOf:function(t){var e=s(t);if(i(e,c))return e[c];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof l?h:null}},7976:function(t,e,r){var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:function(t,e,r){var n=r(1702),i=r(2597),o=r(5656),s=r(1318).indexOf,a=r(3501),u=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&u(l,r);while(e.length>c)i(n,r=e[c++])&&(~s(l,r)||u(l,r));return l}},5296:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:function(t,e,r){var n=r(1702),i=r(9670),o=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(r,[]),e=r instanceof Array}catch(s){}return function(r,n){return i(r),o(n),e?t(r,n):r.__proto__=n,r}}():void 0)},2140:function(t,e,r){var n=r(7854),i=r(6916),o=r(614),s=r(111),a=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&o(r=t.toString)&&!s(n=i(r,t)))return n;if(o(r=t.valueOf)&&!s(n=i(r,t)))return n;if("string"!==e&&o(r=t.toString)&&!s(n=i(r,t)))return n;throw a("Can't convert object to primitive value")}},3887:function(t,e,r){var n=r(5005),i=r(1702),o=r(8006),s=r(5181),a=r(9670),u=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=s.f;return r?u(e,r(t)):e}},1320:function(t,e,r){var n=r(7854),i=r(614),o=r(2597),s=r(8880),a=r(3505),u=r(2788),c=r(9909),l=r(6530).CONFIGURABLE,h=c.get,f=c.enforce,d=String(String).split("String");(t.exports=function(t,e,r,u){var c,h=!!u&&!!u.unsafe,p=!!u&&!!u.enumerable,g=!!u&&!!u.noTargetGet,m=u&&void 0!==u.name?u.name:e;i(r)&&("Symbol("===String(m).slice(0,7)&&(m="["+String(m).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(r,"name")||l&&r.name!==m)&&s(r,"name",m),c=f(r),c.source||(c.source=d.join("string"==typeof m?m:""))),t!==n?(h?!g&&t[e]&&(p=!0):delete t[e],p?t[e]=r:s(t,e,r)):p?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return i(this)&&h(this).source||u(this)}))},4488:function(t,e,r){var n=r(7854),i=n.TypeError;t.exports=function(t){if(void 0==t)throw i("Can't call method on "+t);return t}},3505:function(t,e,r){var n=r(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},6200:function(t,e,r){var n=r(2309),i=r(9711),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:function(t,e,r){var n=r(7854),i=r(3505),o="__core-js_shared__",s=n[o]||i(o,{});t.exports=s},2309:function(t,e,r){var n=r(1913),i=r(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.20.2",mode:n?"pure":"global",copyright:"© 2022 Denis Pushkarev (zloirock.ru)"})},1400:function(t,e,r){var n=r(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5656:function(t,e,r){var n=r(8361),i=r(4488);t.exports=function(t){return n(i(t))}},9303:function(t){var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!==n||0===n?0:(n>0?r:e)(n)}},7466:function(t,e,r){var n=r(9303),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},7908:function(t,e,r){var n=r(7854),i=r(4488),o=n.Object;t.exports=function(t){return o(i(t))}},4590:function(t,e,r){var n=r(7854),i=r(3002),o=n.RangeError;t.exports=function(t,e){var r=i(t);if(r%e)throw o("Wrong offset");return r}},3002:function(t,e,r){var n=r(7854),i=r(9303),o=n.RangeError;t.exports=function(t){var e=i(t);if(e<0)throw o("The argument can't be less than 0");return e}},7593:function(t,e,r){var n=r(7854),i=r(6916),o=r(111),s=r(2190),a=r(8173),u=r(2140),c=r(5112),l=n.TypeError,h=c("toPrimitive");t.exports=function(t,e){if(!o(t)||s(t))return t;var r,n=a(t,h);if(n){if(void 0===e&&(e="default"),r=i(n,t,e),!o(r)||s(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),u(t,e)}},4948:function(t,e,r){var n=r(7593),i=r(2190);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},1694:function(t,e,r){var n=r(5112),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},1340:function(t,e,r){var n=r(7854),i=r(648),o=n.String;t.exports=function(t){if("Symbol"===i(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},6330:function(t,e,r){var n=r(7854),i=n.String;t.exports=function(t){try{return i(t)}catch(e){return"Object"}}},9711:function(t,e,r){var n=r(1702),i=0,o=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3307:function(t,e,r){var n=r(133);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,r){var n=r(9781),i=r(7293);t.exports=n&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},5112:function(t,e,r){var n=r(7854),i=r(2309),o=r(2597),s=r(9711),a=r(133),u=r(3307),c=i("wks"),l=n.Symbol,h=l&&l["for"],f=u?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&o(l,t)?c[t]=l[t]:c[t]=u&&h?h(e):f(e)}return c[t]}},9191:function(t,e,r){"use strict";var n=r(5005),i=r(2597),o=r(8880),s=r(7976),a=r(7674),u=r(9920),c=r(9587),l=r(6277),h=r(8340),f=r(7741),d=r(2914),p=r(1913);t.exports=function(t,e,r,g){var m=g?2:1,v=t.split("."),y=v[v.length-1],_=n.apply(null,v);if(_){var b=_.prototype;if(!p&&i(b,"cause")&&delete b.cause,!r)return _;var w=n("Error"),S=e((function(t,e){var r=l(g?e:t,void 0),n=g?new _(t):new _;return void 0!==r&&o(n,"message",r),d&&o(n,"stack",f(n.stack,2)),this&&s(b,this)&&c(n,this,S),arguments.length>m&&h(n,arguments[m]),n}));if(S.prototype=b,"Error"!==y&&(a?a(S,w):u(S,w,{name:!0})),u(S,_),!p)try{b.name!==y&&o(b,"name",y),b.constructor=S}catch(F){}return S}}},1703:function(t,e,r){var n=r(2109),i=r(7854),o=r(2104),s=r(9191),a="WebAssembly",u=i[a],c=7!==Error("e",{cause:7}).cause,l=function(t,e){var r={};r[t]=s(t,e,c),n({global:!0,forced:c},r)},h=function(t,e){if(u&&u[t]){var r={};r[t]=s(a+"."+t,e,c),n({target:a,stat:!0,forced:c},r)}};l("Error",(function(t){return function(e){return o(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),l("URIError",(function(t){return function(e){return o(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},8675:function(t,e,r){"use strict";var n=r(260),i=r(6244),o=r(9303),s=n.aTypedArray,a=n.exportTypedArrayMethod;a("at",(function(t){var e=s(this),r=i(e),n=o(t),a=n>=0?n:r+n;return a<0||a>=r?void 0:e[a]}))},3462:function(t,e,r){"use strict";var n=r(7854),i=r(6916),o=r(260),s=r(6244),a=r(4590),u=r(7908),c=r(7293),l=n.RangeError,h=n.Int8Array,f=h&&h.prototype,d=f&&f.set,p=o.aTypedArray,g=o.exportTypedArrayMethod,m=!c((function(){var t=new Uint8ClampedArray(2);return i(d,t,{length:1,0:3},1),3!==t[1]})),v=m&&o.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var t=new h(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));g("set",(function(t){p(this);var e=a(arguments.length>1?arguments[1]:void 0,1),r=u(t);if(m)return i(d,this,r,e);var n=this.length,o=s(r),c=0;if(o+e>n)throw l("Wrong length");while(ct.stop())),this.cleanups.forEach((t=>t())),this.scopes&&this.scopes.forEach((t=>t.stop(!0))),this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.active=!1}}}function a(t,e){e=e||i,e&&e.active&&e.effects.push(t)}const u=t=>{const e=new Set(t);return e.w=0,e.n=0,e},c=t=>(t.w&g)>0,l=t=>(t.n&g)>0,h=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n0?v[t-1]:void 0}}stop(){this.active&&(S(this),this.onStop&&this.onStop(),this.active=!1)}}function S(t){const{deps:e}=t;if(e.length){for(let r=0;r{("length"===e||e>=i)&&c.push(t)}));else switch(void 0!==r&&c.push(a.get(r)),e){case"add":(0,n.kJ)(t)?(0,n.S0)(r)&&c.push(a.get("length")):(c.push(a.get(_)),(0,n._N)(t)&&c.push(a.get(b)));break;case"delete":(0,n.kJ)(t)||(c.push(a.get(_)),(0,n._N)(t)&&c.push(a.get(b)));break;case"set":(0,n._N)(t)&&c.push(a.get(_));break}if(1===c.length)c[0]&&I(c[0]);else{const t=[];for(const e of c)e&&t.push(...e);I(u(t))}}function I(t,e){for(const r of(0,n.kJ)(t)?t:[...t])(r!==y||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const O=(0,n.fY)("__proto__,__v_isRef,__isVue"),N=new Set(Object.getOwnPropertyNames(Symbol).map((t=>Symbol[t])).filter(n.yk)),D=B(),M=B(!1,!0),L=B(!0),U=j();function j(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const r=Pt(this);for(let e=0,i=this.length;e{t[e]=function(...t){x();const r=Pt(this)[e].apply(this,t);return A(),r}})),t}function B(t=!1,e=!1){return function(r,i,o){if("__v_isReactive"===i)return!t;if("__v_isReadonly"===i)return t;if("__v_raw"===i&&o===(t?e?bt:_t:e?yt:vt).get(r))return r;const s=(0,n.kJ)(r);if(!t&&s&&(0,n.RI)(U,i))return Reflect.get(U,i,o);const a=Reflect.get(r,i,o);if((0,n.yk)(i)?N.has(i):O(i))return a;if(t||T(r,"get",i),e)return a;if(Mt(a)){const t=!s||!(0,n.S0)(i);return t?a.value:a}return(0,n.Kn)(a)?t?xt(a):Ft(a):a}}const H=q(),V=q(!0);function q(t=!1){return function(e,r,i,o){let s=e[r];if(!t&&!Tt(i)&&(i=Pt(i),s=Pt(s),!(0,n.kJ)(e)&&Mt(s)&&!Mt(i)))return s.value=i,!0;const a=(0,n.kJ)(e)&&(0,n.S0)(r)?Number(r)t,G=t=>Reflect.getPrototypeOf(t);function X(t,e,r=!1,n=!1){t=t["__v_raw"];const i=Pt(t),o=Pt(e);e!==o&&!r&&T(i,"get",e),!r&&T(i,"get",o);const{has:s}=G(i),a=n?Z:r?Ot:It;return s.call(i,e)?a(t.get(e)):s.call(i,o)?a(t.get(o)):void(t!==i&&t.get(e))}function Q(t,e=!1){const r=this["__v_raw"],n=Pt(r),i=Pt(t);return t!==i&&!e&&T(n,"has",t),!e&&T(n,"has",i),t===i?r.has(t):r.has(t)||r.has(i)}function tt(t,e=!1){return t=t["__v_raw"],!e&&T(Pt(t),"iterate",_),Reflect.get(t,"size",t)}function et(t){t=Pt(t);const e=Pt(this),r=G(e),n=r.has.call(e,t);return n||(e.add(t),R(e,"add",t,t)),this}function rt(t,e){e=Pt(e);const r=Pt(this),{has:i,get:o}=G(r);let s=i.call(r,t);s||(t=Pt(t),s=i.call(r,t));const a=o.call(r,t);return r.set(t,e),s?(0,n.aU)(e,a)&&R(r,"set",t,e,a):R(r,"add",t,e),this}function nt(t){const e=Pt(this),{has:r,get:n}=G(e);let i=r.call(e,t);i||(t=Pt(t),i=r.call(e,t));const o=n?n.call(e,t):void 0,s=e.delete(t);return i&&R(e,"delete",t,void 0,o),s}function it(){const t=Pt(this),e=0!==t.size,r=void 0,n=t.clear();return e&&R(t,"clear",void 0,void 0,r),n}function ot(t,e){return function(r,n){const i=this,o=i["__v_raw"],s=Pt(o),a=e?Z:t?Ot:It;return!t&&T(s,"iterate",_),o.forEach(((t,e)=>r.call(n,a(t),a(e),i)))}}function st(t,e,r){return function(...i){const o=this["__v_raw"],s=Pt(o),a=(0,n._N)(s),u="entries"===t||t===Symbol.iterator&&a,c="keys"===t&&a,l=o[t](...i),h=r?Z:e?Ot:It;return!e&&T(s,"iterate",c?b:_),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function at(t){return function(...e){return"delete"!==t&&this}}function ut(){const t={get(t){return X(this,t)},get size(){return tt(this)},has:Q,add:et,set:rt,delete:nt,clear:it,forEach:ot(!1,!1)},e={get(t){return X(this,t,!1,!0)},get size(){return tt(this)},has:Q,add:et,set:rt,delete:nt,clear:it,forEach:ot(!1,!0)},r={get(t){return X(this,t,!0)},get size(){return tt(this,!0)},has(t){return Q.call(this,t,!0)},add:at("add"),set:at("set"),delete:at("delete"),clear:at("clear"),forEach:ot(!0,!1)},n={get(t){return X(this,t,!0,!0)},get size(){return tt(this,!0)},has(t){return Q.call(this,t,!0)},add:at("add"),set:at("set"),delete:at("delete"),clear:at("clear"),forEach:ot(!0,!0)},i=["keys","values","entries",Symbol.iterator];return i.forEach((i=>{t[i]=st(i,!1,!1),r[i]=st(i,!0,!1),e[i]=st(i,!1,!0),n[i]=st(i,!0,!0)})),[t,r,e,n]}const[ct,lt,ht,ft]=ut();function dt(t,e){const r=e?t?ft:ht:t?lt:ct;return(e,i,o)=>"__v_isReactive"===i?!t:"__v_isReadonly"===i?t:"__v_raw"===i?e:Reflect.get((0,n.RI)(r,i)&&i in e?r:e,i,o)}const pt={get:dt(!1,!1)},gt={get:dt(!1,!0)},mt={get:dt(!0,!1)};const vt=new WeakMap,yt=new WeakMap,_t=new WeakMap,bt=new WeakMap;function wt(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function St(t){return t["__v_skip"]||!Object.isExtensible(t)?0:wt((0,n.W7)(t))}function Ft(t){return t&&t["__v_isReadonly"]?t:kt(t,!1,z,pt,vt)}function Et(t){return kt(t,!1,Y,gt,yt)}function xt(t){return kt(t,!0,$,mt,_t)}function kt(t,e,r,i,o){if(!(0,n.Kn)(t))return t;if(t["__v_raw"]&&(!e||!t["__v_isReactive"]))return t;const s=o.get(t);if(s)return s;const a=St(t);if(0===a)return t;const u=new Proxy(t,2===a?i:r);return o.set(t,u),u}function At(t){return Tt(t)?At(t["__v_raw"]):!(!t||!t["__v_isReactive"])}function Tt(t){return!(!t||!t["__v_isReadonly"])}function Ct(t){return At(t)||Tt(t)}function Pt(t){const e=t&&t["__v_raw"];return e?Pt(e):t}function Rt(t){return(0,n.Nj)(t,"__v_skip",!0),t}const It=t=>(0,n.Kn)(t)?Ft(t):t,Ot=t=>(0,n.Kn)(t)?xt(t):t;function Nt(t){C()&&(t=Pt(t),t.dep||(t.dep=u()),P(t.dep))}function Dt(t,e){t=Pt(t),t.dep&&I(t.dep)}function Mt(t){return Boolean(t&&!0===t.__v_isRef)}function Lt(t){return jt(t,!1)}function Ut(t){return jt(t,!0)}function jt(t,e){return Mt(t)?t:new Bt(t,e)}class Bt{constructor(t,e){this._shallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Pt(t),this._value=e?t:It(t)}get value(){return Nt(this),this._value}set value(t){t=this._shallow?t:Pt(t),(0,n.aU)(t,this._rawValue)&&(this._rawValue=t,this._value=this._shallow?t:It(t),Dt(this,t))}}function Ht(t){return Mt(t)?t.value:t}const Vt={get:(t,e,r)=>Ht(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const i=t[e];return Mt(i)&&!Mt(r)?(i.value=r,!0):Reflect.set(t,e,r,n)}};function qt(t){return At(t)?t:new Proxy(t,Vt)}class Kt{constructor(t,e,r){this._setter=e,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new w(t,(()=>{this._dirty||(this._dirty=!0,Dt(this))})),this["__v_isReadonly"]=r}get value(){const t=Pt(this);return Nt(t),t._dirty&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Jt(t,e){let r,i;const o=(0,n.mf)(t);o?(r=t,i=n.dG):(r=t.get,i=t.set);const s=new Kt(r,i,o||!i);return s}Promise.resolve()},3396:function(t,e,r){"use strict";r.d(e,{$d:function(){return Xe},Cn:function(){return f},FN:function(){return De},HY:function(){return Gt},JJ:function(){return S},Ko:function(){return Ae},P$:function(){return A},Q6:function(){return O},U2:function(){return C},Uk:function(){return be},Us:function(){return Bt},Wm:function(){return me},Y3:function(){return pr},Y8:function(){return E},YP:function(){return Ar},_:function(){return ge},aZ:function(){return N},dD:function(){return h},f3:function(){return F},h:function(){return Ir},iD:function(){return ue},ic:function(){return Y},j4:function(){return ce},kq:function(){return we},nK:function(){return I},up:function(){return zt},wg:function(){return ne},wy:function(){return It}});r(1703);var n=r(4870),i=r(7139);new Set;new Map;function o(t,e,...r){const n=t.vnode.props||i.kT;let o=r;const s=e.startsWith("update:"),a=s&&e.slice(7);if(a&&a in n){const t=`${"modelValue"===a?"model":a}Modifiers`,{number:e,trim:s}=n[t]||i.kT;s?o=r.map((t=>t.trim())):e&&(o=r.map(i.He))}let u;let c=n[u=(0,i.hR)(e)]||n[u=(0,i.hR)((0,i._A)(e))];!c&&s&&(c=n[u=(0,i.hR)((0,i.rs)(e))]),c&&Xe(c,t,6,o);const l=n[u+"Once"];if(l){if(t.emitted){if(t.emitted[u])return}else t.emitted={};t.emitted[u]=!0,Xe(l,t,6,o)}}function s(t,e,r=!1){const n=e.emitsCache,o=n.get(t);if(void 0!==o)return o;const a=t.emits;let u={},c=!1;if(!(0,i.mf)(t)){const n=t=>{const r=s(t,e,!0);r&&(c=!0,(0,i.l7)(u,r))};!r&&e.mixins.length&&e.mixins.forEach(n),t.extends&&n(t.extends),t.mixins&&t.mixins.forEach(n)}return a||c?((0,i.kJ)(a)?a.forEach((t=>u[t]=null)):(0,i.l7)(u,a),n.set(t,u),u):(n.set(t,null),null)}function a(t,e){return!(!t||!(0,i.F7)(e))&&(e=e.slice(2).replace(/Once$/,""),(0,i.RI)(t,e[0].toLowerCase()+e.slice(1))||(0,i.RI)(t,(0,i.rs)(e))||(0,i.RI)(t,e))}let u=null,c=null;function l(t){const e=u;return u=t,c=t&&t.type.__scopeId||null,e}function h(t){c=t}function f(){c=null}function d(t,e=u,r){if(!e)return t;if(t._n)return t;const n=(...r)=>{n._d&&se(-1);const i=l(e),o=t(...r);return l(i),n._d&&se(1),o};return n._n=!0,n._c=!0,n._d=!0,n}function p(t){const{type:e,vnode:r,proxy:n,withProxy:o,props:s,propsOptions:[a],slots:u,attrs:c,emit:h,render:f,renderCache:d,data:p,setupState:v,ctx:y,inheritAttrs:_}=t;let b,w;const S=l(t);try{if(4&r.shapeFlag){const t=o||n;b=Se(f.call(t,t,d,s,v,p,y)),w=c}else{const t=e;0,b=Se(t.length>1?t(s,{attrs:c,slots:u,emit:h}):t(s,null)),w=e.props?c:g(c)}}catch(E){ee.length=0,Qe(E,t,1),b=me(Qt)}let F=b;if(w&&!1!==_){const t=Object.keys(w),{shapeFlag:e}=F;t.length&&7&e&&(a&&t.some(i.tR)&&(w=m(w,a)),F=_e(F,w))}return r.dirs&&(F.dirs=F.dirs?F.dirs.concat(r.dirs):r.dirs),r.transition&&(F.transition=r.transition),b=F,l(S),b}const g=t=>{let e;for(const r in t)("class"===r||"style"===r||(0,i.F7)(r))&&((e||(e={}))[r]=t[r]);return e},m=(t,e)=>{const r={};for(const n in t)(0,i.tR)(n)&&n.slice(9)in e||(r[n]=t[n]);return r};function v(t,e,r){const{props:n,children:i,component:o}=t,{props:s,children:u,patchFlag:c}=e,l=o.emitsOptions;if(e.dirs||e.transition)return!0;if(!(r&&c>=0))return!(!i&&!u||u&&u.$stable)||n!==s&&(n?!s||y(n,s,l):!!s);if(1024&c)return!0;if(16&c)return n?y(n,s,l):!!s;if(8&c){const t=e.dynamicProps;for(let e=0;et.__isSuspense;function w(t,e){e&&e.pendingBranch?(0,i.kJ)(t)?e.effects.push(...t):e.effects.push(t):wr(t)}function S(t,e){if(Ne){let r=Ne.provides;const n=Ne.parent&&Ne.parent.provides;n===r&&(r=Ne.provides=Object.create(n)),r[t]=e}else 0}function F(t,e,r=!1){const n=Ne||u;if(n){const o=null==n.parent?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(o&&t in o)return o[t];if(arguments.length>1)return r&&(0,i.mf)(e)?e.call(n.proxy):e}else 0}function E(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return z((()=>{t.isMounted=!0})),Z((()=>{t.isUnmounting=!0})),t}const x=[Function,Array],k={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:x,onEnter:x,onAfterEnter:x,onEnterCancelled:x,onBeforeLeave:x,onLeave:x,onAfterLeave:x,onLeaveCancelled:x,onBeforeAppear:x,onAppear:x,onAfterAppear:x,onAppearCancelled:x},setup(t,{slots:e}){const r=De(),i=E();let o;return()=>{const s=e.default&&O(e.default(),!0);if(!s||!s.length)return;const a=(0,n.IU)(t),{mode:u}=a;const c=s[0];if(i.isLeaving)return P(c);const l=R(c);if(!l)return P(c);const h=C(l,a,i,r);I(l,h);const f=r.subTree,d=f&&R(f);let p=!1;const{getTransitionKey:g}=l.type;if(g){const t=g();void 0===o?o=t:t!==o&&(o=t,p=!0)}if(d&&d.type!==Qt&&(!he(l,d)||p)){const t=C(d,a,i,r);if(I(d,t),"out-in"===u)return i.isLeaving=!0,t.afterLeave=()=>{i.isLeaving=!1,r.update()},P(c);"in-out"===u&&l.type!==Qt&&(t.delayLeave=(t,e,r)=>{const n=T(i,d);n[String(d.key)]=d,t._leaveCb=()=>{e(),t._leaveCb=void 0,delete h.delayedLeave},h.delayedLeave=r})}return c}}},A=k;function T(t,e){const{leavingVNodes:r}=t;let n=r.get(e.type);return n||(n=Object.create(null),r.set(e.type,n)),n}function C(t,e,r,n){const{appear:i,mode:o,persisted:s=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:l,onBeforeLeave:h,onLeave:f,onAfterLeave:d,onLeaveCancelled:p,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=e,_=String(t.key),b=T(r,t),w=(t,e)=>{t&&Xe(t,n,9,e)},S={mode:o,persisted:s,beforeEnter(e){let n=a;if(!r.isMounted){if(!i)return;n=g||a}e._leaveCb&&e._leaveCb(!0);const o=b[_];o&&he(t,o)&&o.el._leaveCb&&o.el._leaveCb(),w(n,[e])},enter(t){let e=u,n=c,o=l;if(!r.isMounted){if(!i)return;e=m||u,n=v||c,o=y||l}let s=!1;const a=t._enterCb=e=>{s||(s=!0,w(e?o:n,[t]),S.delayedLeave&&S.delayedLeave(),t._enterCb=void 0)};e?(e(t,a),e.length<=1&&a()):a()},leave(e,n){const i=String(t.key);if(e._enterCb&&e._enterCb(!0),r.isUnmounting)return n();w(h,[e]);let o=!1;const s=e._leaveCb=r=>{o||(o=!0,n(),w(r?p:d,[e]),e._leaveCb=void 0,b[i]===t&&delete b[i])};b[i]=t,f?(f(e,s),f.length<=1&&s()):s()},clone(t){return C(t,e,r,n)}};return S}function P(t){if(M(t))return t=_e(t),t.children=null,t}function R(t){return M(t)?t.children?t.children[0]:void 0:t}function I(t,e){6&t.shapeFlag&&t.component?I(t.component.subTree,e):128&t.shapeFlag?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function O(t,e=!1){let r=[],n=0;for(let i=0;i1)for(let i=0;i!!t.type.__asyncLoader;const M=t=>t.type.__isKeepAlive;RegExp,RegExp;function L(t,e){return(0,i.kJ)(t)?t.some((t=>L(t,e))):(0,i.HD)(t)?t.split(",").indexOf(e)>-1:!!t.test&&t.test(e)}function U(t,e){B(t,"a",e)}function j(t,e){B(t,"da",e)}function B(t,e,r=Ne){const n=t.__wdc||(t.__wdc=()=>{let e=r;while(e){if(e.isDeactivated)return;e=e.parent}return t()});if(K(e,n,r),r){let t=r.parent;while(t&&t.parent)M(t.parent.vnode)&&H(n,e,r,t),t=t.parent}}function H(t,e,r,n){const o=K(e,t,n,!0);G((()=>{(0,i.Od)(n[e],o)}),r)}function V(t){let e=t.shapeFlag;256&e&&(e-=256),512&e&&(e-=512),t.shapeFlag=e}function q(t){return 128&t.shapeFlag?t.ssContent:t}function K(t,e,r=Ne,i=!1){if(r){const o=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...i)=>{if(r.isUnmounted)return;(0,n.Jd)(),Me(r);const o=Xe(e,r,t,i);return Le(),(0,n.lk)(),o});return i?o.unshift(s):o.push(s),s}}const J=t=>(e,r=Ne)=>(!He||"sp"===t)&&K(t,e,r),W=J("bm"),z=J("m"),$=J("bu"),Y=J("u"),Z=J("bum"),G=J("um"),X=J("sp"),Q=J("rtg"),tt=J("rtc");function et(t,e=Ne){K("ec",t,e)}let rt=!0;function nt(t){const e=at(t),r=t.proxy,o=t.ctx;rt=!1,e.beforeCreate&&ot(e.beforeCreate,t,"bc");const{data:s,computed:a,methods:u,watch:c,provide:l,inject:h,created:f,beforeMount:d,mounted:p,beforeUpdate:g,updated:m,activated:v,deactivated:y,beforeDestroy:_,beforeUnmount:b,destroyed:w,unmounted:F,render:E,renderTracked:x,renderTriggered:k,errorCaptured:A,serverPrefetch:T,expose:C,inheritAttrs:P,components:R,directives:I,filters:O}=e,N=null;if(h&&it(h,o,N,t.appContext.config.unwrapInjectedRef),u)for(const n in u){const t=u[n];(0,i.mf)(t)&&(o[n]=t.bind(r))}if(s){0;const e=s.call(r,r);0,(0,i.Kn)(e)&&(t.data=(0,n.qj)(e))}if(rt=!0,a)for(const S in a){const t=a[S],e=(0,i.mf)(t)?t.bind(r,r):(0,i.mf)(t.get)?t.get.bind(r,r):i.dG;0;const s=!(0,i.mf)(t)&&(0,i.mf)(t.set)?t.set.bind(r):i.dG,u=(0,n.Fl)({get:e,set:s});Object.defineProperty(o,S,{enumerable:!0,configurable:!0,get:()=>u.value,set:t=>u.value=t})}if(c)for(const n in c)st(c[n],o,r,n);if(l){const t=(0,i.mf)(l)?l.call(r):l;Reflect.ownKeys(t).forEach((e=>{S(e,t[e])}))}function D(t,e){(0,i.kJ)(e)?e.forEach((e=>t(e.bind(r)))):e&&t(e.bind(r))}if(f&&ot(f,t,"c"),D(W,d),D(z,p),D($,g),D(Y,m),D(U,v),D(j,y),D(et,A),D(tt,x),D(Q,k),D(Z,b),D(G,F),D(X,T),(0,i.kJ)(C))if(C.length){const e=t.exposed||(t.exposed={});C.forEach((t=>{Object.defineProperty(e,t,{get:()=>r[t],set:e=>r[t]=e})}))}else t.exposed||(t.exposed={});E&&t.render===i.dG&&(t.render=E),null!=P&&(t.inheritAttrs=P),R&&(t.components=R),I&&(t.directives=I)}function it(t,e,r=i.dG,o=!1){(0,i.kJ)(t)&&(t=ft(t));for(const s in t){const r=t[s];let a;a=(0,i.Kn)(r)?"default"in r?F(r.from||s,r.default,!0):F(r.from||s):F(r),(0,n.dq)(a)&&o?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:t=>a.value=t}):e[s]=a}}function ot(t,e,r){Xe((0,i.kJ)(t)?t.map((t=>t.bind(e.proxy))):t.bind(e.proxy),e,r)}function st(t,e,r,n){const o=n.includes(".")?Pr(r,n):()=>r[n];if((0,i.HD)(t)){const r=e[t];(0,i.mf)(r)&&Ar(o,r)}else if((0,i.mf)(t))Ar(o,t.bind(r));else if((0,i.Kn)(t))if((0,i.kJ)(t))t.forEach((t=>st(t,e,r,n)));else{const n=(0,i.mf)(t.handler)?t.handler.bind(r):e[t.handler];(0,i.mf)(n)&&Ar(o,n,t)}else 0}function at(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=t.appContext,a=o.get(e);let u;return a?u=a:i.length||r||n?(u={},i.length&&i.forEach((t=>ut(u,t,s,!0))),ut(u,e,s)):u=e,o.set(e,u),u}function ut(t,e,r,n=!1){const{mixins:i,extends:o}=e;o&&ut(t,o,r,!0),i&&i.forEach((e=>ut(t,e,r,!0)));for(const s in e)if(n&&"expose"===s);else{const n=ct[s]||r&&r[s];t[s]=n?n(t[s],e[s]):e[s]}return t}const ct={data:lt,props:pt,emits:pt,methods:pt,computed:pt,beforeCreate:dt,created:dt,beforeMount:dt,mounted:dt,beforeUpdate:dt,updated:dt,beforeDestroy:dt,beforeUnmount:dt,destroyed:dt,unmounted:dt,activated:dt,deactivated:dt,errorCaptured:dt,serverPrefetch:dt,components:pt,directives:pt,watch:gt,provide:lt,inject:ht};function lt(t,e){return e?t?function(){return(0,i.l7)((0,i.mf)(t)?t.call(this,this):t,(0,i.mf)(e)?e.call(this,this):e)}:e:t}function ht(t,e){return pt(ft(t),ft(e))}function ft(t){if((0,i.kJ)(t)){const e={};for(let r=0;r0)||16&u){let n;yt(t,e,s,a)&&(h=!0);for(const o in c)e&&((0,i.RI)(e,o)||(n=(0,i.rs)(o))!==o&&(0,i.RI)(e,n))||(l?!r||void 0===r[o]&&void 0===r[n]||(s[o]=_t(l,c,o,void 0,t,!0)):delete s[o]);if(a!==c)for(const t in a)e&&(0,i.RI)(e,t)||(delete a[t],h=!0)}else if(8&u){const r=t.vnode.dynamicProps;for(let n=0;n{c=!0;const[r,n]=bt(t,e,!0);(0,i.l7)(a,r),n&&u.push(...n)};!r&&e.mixins.length&&e.mixins.forEach(n),t.extends&&n(t.extends),t.mixins&&t.mixins.forEach(n)}if(!s&&!c)return n.set(t,i.Z6),i.Z6;if((0,i.kJ)(s))for(let h=0;h-1,n[1]=r<0||t-1||(0,i.RI)(n,"default"))&&u.push(e)}}}}const l=[a,u];return n.set(t,l),l}function wt(t){return"$"!==t[0]}function St(t){const e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:null===t?"null":""}function Ft(t,e){return St(t)===St(e)}function Et(t,e){return(0,i.kJ)(e)?e.findIndex((e=>Ft(e,t))):(0,i.mf)(e)&&Ft(e,t)?0:-1}const xt=t=>"_"===t[0]||"$stable"===t,kt=t=>(0,i.kJ)(t)?t.map(Se):[Se(t)],At=(t,e,r)=>{const n=d(((...t)=>kt(e(...t))),r);return n._c=!1,n},Tt=(t,e,r)=>{const n=t._ctx;for(const o in t){if(xt(o))continue;const r=t[o];if((0,i.mf)(r))e[o]=At(o,r,n);else if(null!=r){0;const t=kt(r);e[o]=()=>t}}},Ct=(t,e)=>{const r=kt(e);t.slots.default=()=>r},Pt=(t,e)=>{if(32&t.vnode.shapeFlag){const r=e._;r?(t.slots=(0,n.IU)(e),(0,i.Nj)(e,"_",r)):Tt(e,t.slots={})}else t.slots={},e&&Ct(t,e);(0,i.Nj)(t.slots,fe,1)},Rt=(t,e,r)=>{const{vnode:n,slots:o}=t;let s=!0,a=i.kT;if(32&n.shapeFlag){const t=e._;t?r&&1===t?s=!1:((0,i.l7)(o,e),r||1!==t||delete o._):(s=!e.$stable,Tt(e,o)),a=e}else e&&(Ct(t,e),a={default:1});if(s)for(const i in o)xt(i)||i in a||delete o[i]};function It(t,e){const r=u;if(null===r)return t;const n=r.proxy,o=t.dirs||(t.dirs=[]);for(let s=0;sLt(t,e&&((0,i.kJ)(e)?e[n]:e),r,o,s)));if(D(o)&&!s)return;const a=4&o.shapeFlag?$e(o.component)||o.component.proxy:o.el,u=s?null:a,{i:c,r:l}=t;const h=e&&e.r,f=c.refs===i.kT?c.refs={}:c.refs,d=c.setupState;if(null!=h&&h!==l&&((0,i.HD)(h)?(f[h]=null,(0,i.RI)(d,h)&&(d[h]=null)):(0,n.dq)(h)&&(h.value=null)),(0,i.mf)(l))Ge(l,c,12,[u,f]);else{const e=(0,i.HD)(l),o=(0,n.dq)(l);if(e||o){const o=()=>{if(t.f){const r=e?f[l]:l.value;s?(0,i.kJ)(r)&&(0,i.Od)(r,a):(0,i.kJ)(r)?r.includes(a)||r.push(a):e?f[l]=[a]:(l.value=[a],t.k&&(f[t.k]=l.value))}else e?(f[l]=u,(0,i.RI)(d,l)&&(d[l]=u)):(0,n.dq)(l)&&(l.value=u,t.k&&(f[t.k]=u))};u?(o.id=-1,jt(o,r)):o()}else 0}}function Ut(){}const jt=w;function Bt(t){return Ht(t)}function Ht(t,e){Ut();const r=(0,i.E9)();r.__VUE__=!0;const{insert:o,remove:s,patchProp:a,createElement:u,createText:c,createComment:l,setText:h,setElementText:f,parentNode:d,nextSibling:g,setScopeId:m=i.dG,cloneNode:y,insertStaticContent:b}=t,w=(t,e,r,n=null,i=null,o=null,s=!1,a=null,u=!!e.dynamicChildren)=>{if(t===e)return;t&&!he(t,e)&&(n=G(t),W(t,i,o,!0),t=null),-2===e.patchFlag&&(u=!1,e.dynamicChildren=null);const{type:c,ref:l,shapeFlag:h}=e;switch(c){case Xt:S(t,e,r,n);break;case Qt:F(t,e,r,n);break;case te:null==t&&E(e,r,n,s);break;case Gt:N(t,e,r,n,i,o,s,a,u);break;default:1&h?A(t,e,r,n,i,o,s,a,u):6&h?L(t,e,r,n,i,o,s,a,u):(64&h||128&h)&&c.process(t,e,r,n,i,o,s,a,u,Q)}null!=l&&i&&Lt(l,t&&t.ref,o,e||t,!e)},S=(t,e,r,n)=>{if(null==t)o(e.el=c(e.children),r,n);else{const r=e.el=t.el;e.children!==t.children&&h(r,e.children)}},F=(t,e,r,n)=>{null==t?o(e.el=l(e.children||""),r,n):e.el=t.el},E=(t,e,r,n)=>{[t.el,t.anchor]=b(t.children,e,r,n)},x=({el:t,anchor:e},r,n)=>{let i;while(t&&t!==e)i=g(t),o(t,r,n),t=i;o(e,r,n)},k=({el:t,anchor:e})=>{let r;while(t&&t!==e)r=g(t),s(t),t=r;s(e)},A=(t,e,r,n,i,o,s,a,u)=>{s=s||"svg"===e.type,null==t?T(e,r,n,i,o,s,a,u):R(t,e,i,o,s,a,u)},T=(t,e,r,n,s,c,l,h)=>{let d,p;const{type:g,props:m,shapeFlag:v,transition:_,patchFlag:b,dirs:w}=t;if(t.el&&void 0!==y&&-1===b)d=t.el=y(t.el);else{if(d=t.el=u(t.type,c,m&&m.is,m),8&v?f(d,t.children):16&v&&P(t.children,d,null,n,s,c&&"foreignObject"!==g,l,h),w&&Ot(t,null,n,"created"),m){for(const e in m)"value"===e||(0,i.Gg)(e)||a(d,e,null,m[e],c,t.children,n,s,Z);"value"in m&&a(d,"value",null,m.value),(p=m.onVnodeBeforeMount)&&ke(p,n,t)}C(d,t,t.scopeId,l,n)}w&&Ot(t,null,n,"beforeMount");const S=(!s||s&&!s.pendingBranch)&&_&&!_.persisted;S&&_.beforeEnter(d),o(d,e,r),((p=m&&m.onVnodeMounted)||S||w)&&jt((()=>{p&&ke(p,n,t),S&&_.enter(d),w&&Ot(t,null,n,"mounted")}),s)},C=(t,e,r,n,i)=>{if(r&&m(t,r),n)for(let o=0;o{for(let c=u;c{const c=e.el=t.el;let{patchFlag:l,dynamicChildren:h,dirs:d}=e;l|=16&t.patchFlag;const p=t.props||i.kT,g=e.props||i.kT;let m;r&&Vt(r,!1),(m=g.onVnodeBeforeUpdate)&&ke(m,r,e,t),d&&Ot(e,t,r,"beforeUpdate"),r&&Vt(r,!0);const v=o&&"foreignObject"!==e.type;if(h?I(t.dynamicChildren,h,c,r,n,v,s):u||V(t,e,c,null,r,n,v,s,!1),l>0){if(16&l)O(c,e,p,g,r,n,o);else if(2&l&&p.class!==g.class&&a(c,"class",null,g.class,o),4&l&&a(c,"style",p.style,g.style,o),8&l){const i=e.dynamicProps;for(let e=0;e{m&&ke(m,r,e,t),d&&Ot(e,t,r,"updated")}),n)},I=(t,e,r,n,i,o,s)=>{for(let a=0;a{if(r!==n){for(const c in n){if((0,i.Gg)(c))continue;const l=n[c],h=r[c];l!==h&&"value"!==c&&a(t,c,h,l,u,e.children,o,s,Z)}if(r!==i.kT)for(const c in r)(0,i.Gg)(c)||c in n||a(t,c,r[c],null,u,e.children,o,s,Z);"value"in n&&a(t,"value",r.value,n.value)}},N=(t,e,r,n,i,s,a,u,l)=>{const h=e.el=t?t.el:c(""),f=e.anchor=t?t.anchor:c("");let{patchFlag:d,dynamicChildren:p,slotScopeIds:g}=e;g&&(u=u?u.concat(g):g),null==t?(o(h,r,n),o(f,r,n),P(e.children,r,f,i,s,a,u,l)):d>0&&64&d&&p&&t.dynamicChildren?(I(t.dynamicChildren,p,r,i,s,a,u),(null!=e.key||i&&e===i.subTree)&&qt(t,e,!0)):V(t,e,r,f,i,s,a,u,l)},L=(t,e,r,n,i,o,s,a,u)=>{e.slotScopeIds=a,null==t?512&e.shapeFlag?i.ctx.activate(e,r,n,s,u):U(e,r,n,i,o,s,u):j(t,e,u)},U=(t,e,r,n,i,o,s)=>{const a=t.component=Oe(t,n,i);if(M(t)&&(a.ctx.renderer=Q),Ve(a),a.asyncDep){if(i&&i.registerDep(a,B),!t.el){const t=a.subTree=me(Qt);F(null,t,e,r)}}else B(a,t,e,r,i,o,s)},j=(t,e,r)=>{const n=e.component=t.component;if(v(t,e,r)){if(n.asyncDep&&!n.asyncResolved)return void H(n,e,r);n.next=e,yr(n.update),n.update()}else e.component=t.component,e.el=t.el,n.vnode=e},B=(t,e,r,o,s,a,u)=>{const c=()=>{if(t.isMounted){let e,{next:r,bu:n,u:o,parent:c,vnode:l}=t,h=r;0,Vt(t,!1),r?(r.el=l.el,H(t,r,u)):r=l,n&&(0,i.ir)(n),(e=r.props&&r.props.onVnodeBeforeUpdate)&&ke(e,c,r,l),Vt(t,!0);const f=p(t);0;const g=t.subTree;t.subTree=f,w(g,f,d(g.el),G(g),t,s,a),r.el=f.el,null===h&&_(t,f.el),o&&jt(o,s),(e=r.props&&r.props.onVnodeUpdated)&&jt((()=>ke(e,c,r,l)),s)}else{let n;const{el:u,props:c}=e,{bm:l,m:h,parent:f}=t,d=D(e);if(Vt(t,!1),l&&(0,i.ir)(l),!d&&(n=c&&c.onVnodeBeforeMount)&&ke(n,f,e),Vt(t,!0),u&&et){const r=()=>{t.subTree=p(t),et(u,t.subTree,t,s,null)};d?e.type.__asyncLoader().then((()=>!t.isUnmounted&&r())):r()}else{0;const n=t.subTree=p(t);0,w(null,n,r,o,t,s,a),e.el=n.el}if(h&&jt(h,s),!d&&(n=c&&c.onVnodeMounted)){const t=e;jt((()=>ke(n,f,t)),s)}256&e.shapeFlag&&t.a&&jt(t.a,s),t.isMounted=!0,e=r=o=null}},l=t.effect=new n.qq(c,(()=>mr(t.update)),t.scope),h=t.update=l.run.bind(l);h.id=t.uid,Vt(t,!0),h()},H=(t,e,r)=>{e.component=t;const i=t.vnode.props;t.vnode=e,t.next=null,vt(t,e.props,i,r),Rt(t,e.children,r),(0,n.Jd)(),Sr(void 0,t.update),(0,n.lk)()},V=(t,e,r,n,i,o,s,a,u=!1)=>{const c=t&&t.children,l=t?t.shapeFlag:0,h=e.children,{patchFlag:d,shapeFlag:p}=e;if(d>0){if(128&d)return void K(c,h,r,n,i,o,s,a,u);if(256&d)return void q(c,h,r,n,i,o,s,a,u)}8&p?(16&l&&Z(c,i,o),h!==c&&f(r,h)):16&l?16&p?K(c,h,r,n,i,o,s,a,u):Z(c,i,o,!0):(8&l&&f(r,""),16&p&&P(h,r,n,i,o,s,a,u))},q=(t,e,r,n,o,s,a,u,c)=>{t=t||i.Z6,e=e||i.Z6;const l=t.length,h=e.length,f=Math.min(l,h);let d;for(d=0;dh?Z(t,o,s,!0,!1,f):P(e,r,n,o,s,a,u,c,f)},K=(t,e,r,n,o,s,a,u,c)=>{let l=0;const h=e.length;let f=t.length-1,d=h-1;while(l<=f&&l<=d){const n=t[l],i=e[l]=c?Fe(e[l]):Se(e[l]);if(!he(n,i))break;w(n,i,r,null,o,s,a,u,c),l++}while(l<=f&&l<=d){const n=t[f],i=e[d]=c?Fe(e[d]):Se(e[d]);if(!he(n,i))break;w(n,i,r,null,o,s,a,u,c),f--,d--}if(l>f){if(l<=d){const t=d+1,i=td)while(l<=f)W(t[l],o,s,!0),l++;else{const p=l,g=l,m=new Map;for(l=g;l<=d;l++){const t=e[l]=c?Fe(e[l]):Se(e[l]);null!=t.key&&m.set(t.key,l)}let v,y=0;const _=d-g+1;let b=!1,S=0;const F=new Array(_);for(l=0;l<_;l++)F[l]=0;for(l=p;l<=f;l++){const n=t[l];if(y>=_){W(n,o,s,!0);continue}let i;if(null!=n.key)i=m.get(n.key);else for(v=g;v<=d;v++)if(0===F[v-g]&&he(n,e[v])){i=v;break}void 0===i?W(n,o,s,!0):(F[i-g]=l+1,i>=S?S=i:b=!0,w(n,e[i],r,null,o,s,a,u,c),y++)}const E=b?Kt(F):i.Z6;for(v=E.length-1,l=_-1;l>=0;l--){const t=g+l,i=e[t],f=t+1{const{el:s,type:a,transition:u,children:c,shapeFlag:l}=t;if(6&l)return void J(t.component.subTree,e,r,n);if(128&l)return void t.suspense.move(e,r,n);if(64&l)return void a.move(t,e,r,Q);if(a===Gt){o(s,e,r);for(let t=0;tu.enter(s)),i);else{const{leave:t,delayLeave:n,afterLeave:i}=u,a=()=>o(s,e,r),c=()=>{t(s,(()=>{a(),i&&i()}))};n?n(s,a,c):c()}else o(s,e,r)},W=(t,e,r,n=!1,i=!1)=>{const{type:o,props:s,ref:a,children:u,dynamicChildren:c,shapeFlag:l,patchFlag:h,dirs:f}=t;if(null!=a&&Lt(a,null,r,t,!0),256&l)return void e.ctx.deactivate(t);const d=1&l&&f,p=!D(t);let g;if(p&&(g=s&&s.onVnodeBeforeUnmount)&&ke(g,e,t),6&l)Y(t.component,r,n);else{if(128&l)return void t.suspense.unmount(r,n);d&&Ot(t,null,e,"beforeUnmount"),64&l?t.type.remove(t,e,r,i,Q,n):c&&(o!==Gt||h>0&&64&h)?Z(c,e,r,!1,!0):(o===Gt&&384&h||!i&&16&l)&&Z(u,e,r),n&&z(t)}(p&&(g=s&&s.onVnodeUnmounted)||d)&&jt((()=>{g&&ke(g,e,t),d&&Ot(t,null,e,"unmounted")}),r)},z=t=>{const{type:e,el:r,anchor:n,transition:i}=t;if(e===Gt)return void $(r,n);if(e===te)return void k(t);const o=()=>{s(r),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&t.shapeFlag&&i&&!i.persisted){const{leave:e,delayLeave:n}=i,s=()=>e(r,o);n?n(t.el,o,s):s()}else o()},$=(t,e)=>{let r;while(t!==e)r=g(t),s(t),t=r;s(e)},Y=(t,e,r)=>{const{bum:n,scope:o,update:s,subTree:a,um:u}=t;n&&(0,i.ir)(n),o.stop(),s&&(s.active=!1,W(a,t,e,r)),u&&jt(u,e),jt((()=>{t.isUnmounted=!0}),e),e&&e.pendingBranch&&!e.isUnmounted&&t.asyncDep&&!t.asyncResolved&&t.suspenseId===e.pendingId&&(e.deps--,0===e.deps&&e.resolve())},Z=(t,e,r,n=!1,i=!1,o=0)=>{for(let s=o;s6&t.shapeFlag?G(t.component.subTree):128&t.shapeFlag?t.suspense.next():g(t.anchor||t.el),X=(t,e,r)=>{null==t?e._vnode&&W(e._vnode,null,null,!0):w(e._vnode||null,t,e,null,null,null,r),Fr(),e._vnode=t},Q={p:w,um:W,m:J,r:z,mt:U,mc:P,pc:V,pbc:I,n:G,o:t};let tt,et;return e&&([tt,et]=e(Q)),{render:X,hydrate:tt,createApp:Mt(X,tt)}}function Vt({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function qt(t,e,r=!1){const n=t.children,o=e.children;if((0,i.kJ)(n)&&(0,i.kJ)(o))for(let i=0;i>1,t[r[a]]0&&(e[n]=r[o-1]),r[o]=n)}}o=r.length,s=r[o-1];while(o-- >0)r[o]=s,s=e[s];return r}const Jt=t=>t.__isTeleport;const Wt="components";function zt(t,e){return Yt(Wt,t,!0,e)||t}const $t=Symbol();function Yt(t,e,r=!0,n=!1){const o=u||Ne;if(o){const r=o.type;if(t===Wt){const t=Ye(r);if(t&&(t===e||t===(0,i._A)(e)||t===(0,i.kC)((0,i._A)(e))))return r}const s=Zt(o[t]||r[t],e)||Zt(o.appContext[t],e);return!s&&n?r:s}}function Zt(t,e){return t&&(t[e]||t[(0,i._A)(e)]||t[(0,i.kC)((0,i._A)(e))])}const Gt=Symbol(void 0),Xt=Symbol(void 0),Qt=Symbol(void 0),te=Symbol(void 0),ee=[];let re=null;function ne(t=!1){ee.push(re=t?null:[])}function ie(){ee.pop(),re=ee[ee.length-1]||null}let oe=1;function se(t){oe+=t}function ae(t){return t.dynamicChildren=oe>0?re||i.Z6:null,ie(),oe>0&&re&&re.push(t),t}function ue(t,e,r,n,i,o){return ae(ge(t,e,r,n,i,o,!0))}function ce(t,e,r,n,i){return ae(me(t,e,r,n,i,!0))}function le(t){return!!t&&!0===t.__v_isVNode}function he(t,e){return t.type===e.type&&t.key===e.key}const fe="__vInternal",de=({key:t})=>null!=t?t:null,pe=({ref:t,ref_key:e,ref_for:r})=>null!=t?(0,i.HD)(t)||(0,n.dq)(t)||(0,i.mf)(t)?{i:u,r:t,k:e,f:!!r}:t:null;function ge(t,e=null,r=null,n=0,o=null,s=(t===Gt?0:1),a=!1,u=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&de(e),ref:e&&pe(e),scopeId:c,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null};return u?(Ee(l,r),128&s&&t.normalize(l)):r&&(l.shapeFlag|=(0,i.HD)(r)?8:16),oe>0&&!a&&re&&(l.patchFlag>0||6&s)&&32!==l.patchFlag&&re.push(l),l}const me=ve;function ve(t,e=null,r=null,o=0,s=null,a=!1){if(t&&t!==$t||(t=Qt),le(t)){const n=_e(t,e,!0);return r&&Ee(n,r),n}if(Ze(t)&&(t=t.__vccOpts),e){e=ye(e);let{class:t,style:r}=e;t&&!(0,i.HD)(t)&&(e.class=(0,i.C_)(t)),(0,i.Kn)(r)&&((0,n.X3)(r)&&!(0,i.kJ)(r)&&(r=(0,i.l7)({},r)),e.style=(0,i.j5)(r))}const u=(0,i.HD)(t)?1:b(t)?128:Jt(t)?64:(0,i.Kn)(t)?4:(0,i.mf)(t)?2:0;return ge(t,e,r,o,s,u,a,!0)}function ye(t){return t?(0,n.X3)(t)||fe in t?(0,i.l7)({},t):t:null}function _e(t,e,r=!1){const{props:n,ref:o,patchFlag:s,children:a}=t,u=e?xe(n||{},e):n,c={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&de(u),ref:e&&e.ref?r&&o?(0,i.kJ)(o)?o.concat(pe(e)):[o,pe(e)]:pe(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Gt?-1===s?16:16|s:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&_e(t.ssContent),ssFallback:t.ssFallback&&_e(t.ssFallback),el:t.el,anchor:t.anchor};return c}function be(t=" ",e=0){return me(Xt,null,t,e)}function we(t="",e=!1){return e?(ne(),ce(Qt,null,t)):me(Qt,null,t)}function Se(t){return null==t||"boolean"===typeof t?me(Qt):(0,i.kJ)(t)?me(Gt,null,t.slice()):"object"===typeof t?Fe(t):me(Xt,null,String(t))}function Fe(t){return null===t.el||t.memo?t:_e(t)}function Ee(t,e){let r=0;const{shapeFlag:n}=t;if(null==e)e=null;else if((0,i.kJ)(e))r=16;else if("object"===typeof e){if(65&n){const r=e.default;return void(r&&(r._c&&(r._d=!1),Ee(t,r()),r._c&&(r._d=!0)))}{r=32;const n=e._;n||fe in e?3===n&&u&&(1===u.slots._?e._=1:(e._=2,t.patchFlag|=1024)):e._ctx=u}}else(0,i.mf)(e)?(e={default:e,_ctx:u},r=32):(e=String(e),64&n?(r=16,e=[be(e)]):r=8);t.children=e,t.shapeFlag|=r}function xe(...t){const e={};for(let r=0;re(t,r,void 0,s&&s[r])));else{const r=Object.keys(t);o=new Array(r.length);for(let n=0,i=r.length;nt?Ue(t)?$e(t)||t.proxy:Te(t.parent):null,Ce=(0,i.l7)(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Te(t.parent),$root:t=>Te(t.root),$emit:t=>t.emit,$options:t=>at(t),$forceUpdate:t=>()=>mr(t.update),$nextTick:t=>pr.bind(t.proxy),$watch:t=>Cr.bind(t)}),Pe={get({_:t},e){const{ctx:r,setupState:o,data:s,props:a,accessCache:u,type:c,appContext:l}=t;let h;if("$"!==e[0]){const n=u[e];if(void 0!==n)switch(n){case 1:return o[e];case 2:return s[e];case 4:return r[e];case 3:return a[e]}else{if(o!==i.kT&&(0,i.RI)(o,e))return u[e]=1,o[e];if(s!==i.kT&&(0,i.RI)(s,e))return u[e]=2,s[e];if((h=t.propsOptions[0])&&(0,i.RI)(h,e))return u[e]=3,a[e];if(r!==i.kT&&(0,i.RI)(r,e))return u[e]=4,r[e];rt&&(u[e]=0)}}const f=Ce[e];let d,p;return f?("$attrs"===e&&(0,n.j)(t,"get",e),f(t)):(d=c.__cssModules)&&(d=d[e])?d:r!==i.kT&&(0,i.RI)(r,e)?(u[e]=4,r[e]):(p=l.config.globalProperties,(0,i.RI)(p,e)?p[e]:void 0)},set({_:t},e,r){const{data:n,setupState:o,ctx:s}=t;if(o!==i.kT&&(0,i.RI)(o,e))o[e]=r;else if(n!==i.kT&&(0,i.RI)(n,e))n[e]=r;else if((0,i.RI)(t.props,e))return!1;return("$"!==e[0]||!(e.slice(1)in t))&&(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:o,propsOptions:s}},a){let u;return!!r[a]||t!==i.kT&&(0,i.RI)(t,a)||e!==i.kT&&(0,i.RI)(e,a)||(u=s[0])&&(0,i.RI)(u,a)||(0,i.RI)(n,a)||(0,i.RI)(Ce,a)||(0,i.RI)(o.config.globalProperties,a)}};const Re=Nt();let Ie=0;function Oe(t,e,r){const a=t.type,u=(e?e.appContext:t.appContext)||Re,c={uid:Ie++,vnode:t,type:a,parent:e,appContext:u,root:null,next:null,subTree:null,effect:null,update:null,scope:new n.Bj(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(u.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bt(a,u),emitsOptions:s(a,u),emit:null,emitted:null,propsDefaults:i.kT,inheritAttrs:a.inheritAttrs,ctx:i.kT,data:i.kT,props:i.kT,attrs:i.kT,slots:i.kT,refs:i.kT,setupState:i.kT,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return c.ctx={_:c},c.root=e?e.root:c,c.emit=o.bind(null,c),t.ce&&t.ce(c),c}let Ne=null;const De=()=>Ne||u,Me=t=>{Ne=t,t.scope.on()},Le=()=>{Ne&&Ne.scope.off(),Ne=null};function Ue(t){return 4&t.vnode.shapeFlag}let je,Be,He=!1;function Ve(t,e=!1){He=e;const{props:r,children:n}=t.vnode,i=Ue(t);mt(t,r,i,e),Pt(t,n);const o=i?qe(t,e):void 0;return He=!1,o}function qe(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=(0,n.Xl)(new Proxy(t.ctx,Pe));const{setup:o}=r;if(o){const r=t.setupContext=o.length>1?ze(t):null;Me(t),(0,n.Jd)();const s=Ge(o,t,0,[t.props,r]);if((0,n.lk)(),Le(),(0,i.tI)(s)){if(s.then(Le,Le),e)return s.then((r=>{Ke(t,r,e)})).catch((e=>{Qe(e,t,0)}));t.asyncDep=s}else Ke(t,s,e)}else Je(t,e)}function Ke(t,e,r){(0,i.mf)(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:(0,i.Kn)(e)&&(t.setupState=(0,n.WL)(e)),Je(t,r)}function Je(t,e,r){const o=t.type;if(!t.render){if(!e&&je&&!o.render){const e=o.template;if(e){0;const{isCustomElement:r,compilerOptions:n}=t.appContext.config,{delimiters:s,compilerOptions:a}=o,u=(0,i.l7)((0,i.l7)({isCustomElement:r,delimiters:s},n),a);o.render=je(e,u)}}t.render=o.render||i.dG,Be&&Be(t)}Me(t),(0,n.Jd)(),nt(t),(0,n.lk)(),Le()}function We(t){return new Proxy(t.attrs,{get(e,r){return(0,n.j)(t,"get","$attrs"),e[r]}})}function ze(t){const e=e=>{t.exposed=e||{}};let r;return{get attrs(){return r||(r=We(t))},slots:t.slots,emit:t.emit,expose:e}}function $e(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy((0,n.WL)((0,n.Xl)(t.exposed)),{get(e,r){return r in e?e[r]:r in Ce?Ce[r](t):void 0}}))}function Ye(t){return(0,i.mf)(t)&&t.displayName||t.name}function Ze(t){return(0,i.mf)(t)&&"__vccOpts"in t}function Ge(t,e,r,n){let i;try{i=n?t(...n):t()}catch(o){Qe(o,e,r)}return i}function Xe(t,e,r,n){if((0,i.mf)(t)){const o=Ge(t,e,r,n);return o&&(0,i.tI)(o)&&o.catch((t=>{Qe(t,e,r)})),o}const o=[];for(let i=0;i>>1,i=Er(nr[n]);iir&&nr.splice(e,1)}function _r(t,e,r,n){(0,i.kJ)(t)?r.push(...t):e&&e.includes(t,t.allowRecurse?n+1:n)||r.push(t),vr()}function br(t){_r(t,sr,or,ar)}function wr(t){_r(t,cr,ur,lr)}function Sr(t,e=null){if(or.length){for(dr=e,sr=[...new Set(or)],or.length=0,ar=0;arEr(t)-Er(e))),lr=0;lrnull==t.id?1/0:t.id;function xr(t){rr=!1,er=!0,Sr(t),nr.sort(((t,e)=>Er(t)-Er(e)));i.dG;try{for(ir=0;irt.value,f=!!t._shallow):(0,n.PG)(t)?(l=()=>t,o=!0):(0,i.kJ)(t)?(d=!0,f=t.some(n.PG),l=()=>t.map((t=>(0,n.dq)(t)?t.value:(0,n.PG)(t)?Rr(t):(0,i.mf)(t)?Ge(t,c,2):void 0))):l=(0,i.mf)(t)?e?()=>Ge(t,c,2):()=>{if(!c||!c.isUnmounted)return h&&h(),Xe(t,c,3,[p])}:i.dG,e&&o){const t=l;l=()=>Rr(t())}let p=t=>{h=y.onStop=()=>{Ge(t,c,4)}};if(He)return p=i.dG,e?r&&Xe(e,c,3,[l(),d?[]:void 0,p]):l(),i.dG;let g=d?[]:kr;const m=()=>{if(y.active)if(e){const t=y.run();(o||f||(d?t.some(((t,e)=>(0,i.aU)(t,g[e]))):(0,i.aU)(t,g)))&&(h&&h(),Xe(e,c,3,[t,g===kr?void 0:g,p]),g=t)}else y.run()};let v;m.allowRecurse=!!e,v="sync"===s?m:"post"===s?()=>jt(m,c&&c.suspense):()=>{!c||c.isMounted?br(m):m()};const y=new n.qq(l,v);return e?r?m():g=y.run():"post"===s?jt(y.run.bind(y),c&&c.suspense):y.run(),()=>{y.stop(),c&&c.scope&&(0,i.Od)(c.scope.effects,y)}}function Cr(t,e,r){const n=this.proxy,o=(0,i.HD)(t)?t.includes(".")?Pr(n,t):()=>n[t]:t.bind(n,n);let s;(0,i.mf)(e)?s=e:(s=e.handler,r=e);const a=Ne;Me(this);const u=Tr(o,s.bind(n),r);return a?Me(a):Le(),u}function Pr(t,e){const r=e.split(".");return()=>{let e=t;for(let t=0;t{Rr(t,e)}));else if((0,i.PO)(t))for(const r in t)Rr(t[r],e);return t}function Ir(t,e,r){const n=arguments.length;return 2===n?(0,i.Kn)(e)&&!(0,i.kJ)(e)?le(e)?me(t,null,[e]):me(t,e):me(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):3===n&&le(r)&&(r=[r]),me(t,e,r))}Symbol("");const Or="3.2.26"},9242:function(t,e,r){"use strict";r.d(e,{iM:function(){return st},nr:function(){return nt},ri:function(){return lt}});var n=r(7139),i=r(3396);r(4870);const o="http://www.w3.org/2000/svg",s="undefined"!==typeof document?document:null,a=new Map,u={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const i=e?s.createElementNS(o,t):s.createElement(t,r?{is:r}:void 0);return"select"===t&&n&&null!=n.multiple&&i.setAttribute("multiple",n.multiple),i},createText:t=>s.createTextNode(t),createComment:t=>s.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>s.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},cloneNode(t){const e=t.cloneNode(!0);return"_value"in t&&(e._value=t._value),e},insertStaticContent(t,e,r,n){const i=r?r.previousSibling:e.lastChild;let o=a.get(t);if(!o){const e=s.createElement("template");if(e.innerHTML=n?`${t}`:t,o=e.content,n){const t=o.firstChild;while(t.firstChild)o.appendChild(t.firstChild);o.removeChild(t)}a.set(t,o)}return e.insertBefore(o.cloneNode(!0),r),[i?i.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function c(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),null==e?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function l(t,e,r){const i=t.style,o=(0,n.HD)(r);if(r&&!o){for(const t in r)f(i,t,r[t]);if(e&&!(0,n.HD)(e))for(const t in e)null==r[t]&&f(i,t,"")}else{const n=i.display;o?e!==r&&(i.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(i.display=n)}}const h=/\s*!important$/;function f(t,e,r){if((0,n.kJ)(r))r.forEach((r=>f(t,e,r)));else if(e.startsWith("--"))t.setProperty(e,r);else{const i=g(t,e);h.test(r)?t.setProperty((0,n.rs)(i),r.replace(h,""),"important"):t[i]=r}}const d=["Webkit","Moz","ms"],p={};function g(t,e){const r=p[e];if(r)return r;let i=(0,n._A)(e);if("filter"!==i&&i in t)return p[e]=i;i=(0,n.kC)(i);for(let n=0;ndocument.createEvent("Event").timeStamp&&(_=()=>performance.now());const t=navigator.userAgent.match(/firefox\/(\d+)/i);b=!!(t&&Number(t[1])<=53)}let w=0;const S=Promise.resolve(),F=()=>{w=0},E=()=>w||(S.then(F),w=_());function x(t,e,r,n){t.addEventListener(e,r,n)}function k(t,e,r,n){t.removeEventListener(e,r,n)}function A(t,e,r,n,i=null){const o=t._vei||(t._vei={}),s=o[e];if(n&&s)s.value=n;else{const[r,a]=C(e);if(n){const s=o[e]=P(n,i);x(t,r,s,a)}else s&&(k(t,r,s,a),o[e]=void 0)}}const T=/(?:Once|Passive|Capture)$/;function C(t){let e;if(T.test(t)){let r;e={};while(r=t.match(T))t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[(0,n.rs)(t.slice(2)),e]}function P(t,e){const r=t=>{const n=t.timeStamp||_();(b||n>=r.attached-1)&&(0,i.$d)(R(t,r.value),e,5,[t])};return r.value=t,r.attached=E(),r}function R(t,e){if((0,n.kJ)(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map((t=>e=>!e._stopped&&t(e)))}return e}const I=/^on[a-z]/,O=(t,e,r,i,o=!1,s,a,u,h)=>{"class"===e?c(t,i,o):"style"===e?l(t,r,i):(0,n.F7)(e)?(0,n.tR)(e)||A(t,e,r,i,a):("."===e[0]?(e=e.slice(1),1):"^"===e[0]?(e=e.slice(1),0):N(t,e,i,o))?y(t,e,i,s,a,u,h):("true-value"===e?t._trueValue=i:"false-value"===e&&(t._falseValue=i),v(t,e,i,o))};function N(t,e,r,i){return i?"innerHTML"===e||"textContent"===e||!!(e in t&&I.test(e)&&(0,n.mf)(r)):"spellcheck"!==e&&"draggable"!==e&&("form"!==e&&(("list"!==e||"INPUT"!==t.tagName)&&(("type"!==e||"TEXTAREA"!==t.tagName)&&((!I.test(e)||!(0,n.HD)(r))&&e in t))))}"undefined"!==typeof HTMLElement&&HTMLElement;const D="transition",M="animation",L=(t,{slots:e})=>(0,i.h)(i.P$,H(t),e);L.displayName="Transition";const U={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},j=(L.props=(0,n.l7)({},i.P$.props,U),(t,e=[])=>{(0,n.kJ)(t)?t.forEach((t=>t(...e))):t&&t(...e)}),B=t=>!!t&&((0,n.kJ)(t)?t.some((t=>t.length>1)):t.length>1);function H(t){const e={};for(const n in t)n in U||(e[n]=t[n]);if(!1===t.css)return e;const{name:r="v",type:i,duration:o,enterFromClass:s=`${r}-enter-from`,enterActiveClass:a=`${r}-enter-active`,enterToClass:u=`${r}-enter-to`,appearFromClass:c=s,appearActiveClass:l=a,appearToClass:h=u,leaveFromClass:f=`${r}-leave-from`,leaveActiveClass:d=`${r}-leave-active`,leaveToClass:p=`${r}-leave-to`}=t,g=V(o),m=g&&g[0],v=g&&g[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:b,onLeave:w,onLeaveCancelled:S,onBeforeAppear:F=y,onAppear:E=_,onAppearCancelled:x=b}=e,k=(t,e,r)=>{J(t,e?h:u),J(t,e?l:a),r&&r()},A=(t,e)=>{J(t,p),J(t,d),e&&e()},T=t=>(e,r)=>{const n=t?E:_,o=()=>k(e,t,r);j(n,[e,o]),W((()=>{J(e,t?c:s),K(e,t?h:u),B(n)||$(e,i,m,o)}))};return(0,n.l7)(e,{onBeforeEnter(t){j(y,[t]),K(t,s),K(t,a)},onBeforeAppear(t){j(F,[t]),K(t,c),K(t,l)},onEnter:T(!1),onAppear:T(!0),onLeave(t,e){const r=()=>A(t,e);K(t,f),X(),K(t,d),W((()=>{J(t,f),K(t,p),B(w)||$(t,i,v,r)})),j(w,[t,r])},onEnterCancelled(t){k(t,!1),j(b,[t])},onAppearCancelled(t){k(t,!0),j(x,[t])},onLeaveCancelled(t){A(t),j(S,[t])}})}function V(t){if(null==t)return null;if((0,n.Kn)(t))return[q(t.enter),q(t.leave)];{const e=q(t);return[e,e]}}function q(t){const e=(0,n.He)(t);return e}function K(t,e){e.split(/\s+/).forEach((e=>e&&t.classList.add(e))),(t._vtc||(t._vtc=new Set)).add(e)}function J(t,e){e.split(/\s+/).forEach((e=>e&&t.classList.remove(e)));const{_vtc:r}=t;r&&(r.delete(e),r.size||(t._vtc=void 0))}function W(t){requestAnimationFrame((()=>{requestAnimationFrame(t)}))}let z=0;function $(t,e,r,n){const i=t._endId=++z,o=()=>{i===t._endId&&n()};if(r)return setTimeout(o,r);const{type:s,timeout:a,propCount:u}=Y(t,e);if(!s)return n();const c=s+"end";let l=0;const h=()=>{t.removeEventListener(c,f),o()},f=e=>{e.target===t&&++l>=u&&h()};setTimeout((()=>{l(r[t]||"").split(", "),i=n(D+"Delay"),o=n(D+"Duration"),s=Z(i,o),a=n(M+"Delay"),u=n(M+"Duration"),c=Z(a,u);let l=null,h=0,f=0;e===D?s>0&&(l=D,h=s,f=o.length):e===M?c>0&&(l=M,h=c,f=u.length):(h=Math.max(s,c),l=h>0?s>c?D:M:null,f=l?l===D?o.length:u.length:0);const d=l===D&&/\b(transform|all)(,|$)/.test(r[D+"Property"]);return{type:l,timeout:h,propCount:f,hasTransform:d}}function Z(t,e){while(t.lengthG(e)+G(t[r]))))}function G(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function X(){return document.body.offsetHeight}new WeakMap,new WeakMap;const Q=t=>{const e=t.props["onUpdate:modelValue"];return(0,n.kJ)(e)?t=>(0,n.ir)(e,t):e};function tt(t){t.target.composing=!0}function et(t){const e=t.target;e.composing&&(e.composing=!1,rt(e,"input"))}function rt(t,e){const r=document.createEvent("HTMLEvents");r.initEvent(e,!0,!0),t.dispatchEvent(r)}const nt={created(t,{modifiers:{lazy:e,trim:r,number:i}},o){t._assign=Q(o);const s=i||o.props&&"number"===o.props.type;x(t,e?"change":"input",(e=>{if(e.target.composing)return;let i=t.value;r?i=i.trim():s&&(i=(0,n.He)(i)),t._assign(i)})),r&&x(t,"change",(()=>{t.value=t.value.trim()})),e||(x(t,"compositionstart",tt),x(t,"compositionend",et),x(t,"change",et))},mounted(t,{value:e}){t.value=null==e?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:r,trim:i,number:o}},s){if(t._assign=Q(s),t.composing)return;if(document.activeElement===t){if(r)return;if(i&&t.value.trim()===e)return;if((o||"number"===t.type)&&(0,n.He)(t.value)===e)return}const a=null==e?"":e;t.value!==a&&(t.value=a)}};const it=["ctrl","shift","alt","meta"],ot={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&0!==t.button,middle:t=>"button"in t&&1!==t.button,right:t=>"button"in t&&2!==t.button,exact:(t,e)=>it.some((r=>t[`${r}Key`]&&!e.includes(r)))},st=(t,e)=>(r,...n)=>{for(let t=0;t{const e=ct().createApp(...t);const{mount:r}=e;return e.mount=t=>{const i=ht(t);if(!i)return;const o=e._component;(0,n.mf)(o)||o.render||o.template||(o.template=i.innerHTML),i.innerHTML="";const s=r(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},e};function ht(t){if((0,n.HD)(t)){const e=document.querySelector(t);return e}return t}},7139:function(t,e,r){"use strict";function n(t,e){const r=Object.create(null),n=t.split(",");for(let i=0;i!!r[t.toLowerCase()]:t=>!!r[t]}r.d(e,{C_:function(){return d},DM:function(){return I},E9:function(){return nt},F7:function(){return E},Gg:function(){return K},HD:function(){return D},He:function(){return et},Kn:function(){return L},NO:function(){return S},Nj:function(){return tt},Od:function(){return A},PO:function(){return V},Pq:function(){return a},RI:function(){return C},S0:function(){return q},W7:function(){return H},WV:function(){return g},Z6:function(){return b},_A:function(){return z},_N:function(){return R},aU:function(){return X},dG:function(){return w},e1:function(){return o},fY:function(){return n},hR:function(){return G},hq:function(){return m},ir:function(){return Q},j5:function(){return c},kC:function(){return Z},kJ:function(){return P},kT:function(){return _},l7:function(){return k},mf:function(){return N},rs:function(){return Y},tI:function(){return U},tR:function(){return x},yA:function(){return u},yk:function(){return M},zw:function(){return v}});const i="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",o=n(i);const s="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",a=n(s);function u(t){return!!t||""===t}function c(t){if(P(t)){const e={};for(let r=0;r{if(t){const r=t.split(h);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}function d(t){let e="";if(D(t))e=t;else if(P(t))for(let r=0;rg(t,e)))}const v=t=>null==t?"":P(t)||L(t)&&(t.toString===j||!N(t.toString))?JSON.stringify(t,y,2):String(t),y=(t,e)=>e&&e.__v_isRef?y(t,e.value):R(e)?{[`Map(${e.size})`]:[...e.entries()].reduce(((t,[e,r])=>(t[`${e} =>`]=r,t)),{})}:I(e)?{[`Set(${e.size})`]:[...e.values()]}:!L(e)||P(e)||V(e)?e:String(e),_={},b=[],w=()=>{},S=()=>!1,F=/^on[^a-z]/,E=t=>F.test(t),x=t=>t.startsWith("onUpdate:"),k=Object.assign,A=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},T=Object.prototype.hasOwnProperty,C=(t,e)=>T.call(t,e),P=Array.isArray,R=t=>"[object Map]"===B(t),I=t=>"[object Set]"===B(t),O=t=>t instanceof Date,N=t=>"function"===typeof t,D=t=>"string"===typeof t,M=t=>"symbol"===typeof t,L=t=>null!==t&&"object"===typeof t,U=t=>L(t)&&N(t.then)&&N(t.catch),j=Object.prototype.toString,B=t=>j.call(t),H=t=>B(t).slice(8,-1),V=t=>"[object Object]"===B(t),q=t=>D(t)&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,K=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),J=t=>{const e=Object.create(null);return r=>{const n=e[r];return n||(e[r]=t(r))}},W=/-(\w)/g,z=J((t=>t.replace(W,((t,e)=>e?e.toUpperCase():"")))),$=/\B([A-Z])/g,Y=J((t=>t.replace($,"-$1").toLowerCase())),Z=J((t=>t.charAt(0).toUpperCase()+t.slice(1))),G=J((t=>t?`on${Z(t)}`:"")),X=(t,e)=>!Object.is(t,e),Q=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},et=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let rt;const nt=()=>rt||(rt="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:{})},8574:function(t,e,r){r(1703),r(2801),r(8675),r(3462),function(e,r){t.exports=r()}(0,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=22)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r=4){for(var t=arguments.length,e=Array(t),r=0;r=3){for(var t=arguments.length,e=Array(t),r=0;r=2){for(var t=arguments.length,e=Array(t),r=0;r=1){for(var t=arguments.length,e=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(s(this,t),!e)throw i.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=e,this._jsonService=new r(["application/jwk-set+json"])}return t.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},t.prototype.getMetadata=function(){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){i.Log.debug("MetadataService.getMetadata: json received");var r=t._settings.metadataSeed||{};return t._settings.metadata=Object.assign({},r,e),t._settings.metadata}))):(i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},t.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},t.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},t.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},t.prototype.getTokenEndpoint=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",t)},t.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},t.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},t.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},t.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},t.prototype._getMetadataProperty=function(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]}))},t.prototype.getSigningKeys=function(){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(t,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(a)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=a))),this._metadataUrl}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlUtility=void 0;var n=r(0),i=r(1);e.UrlUtility=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.addQueryParam=function(t,e,r){return t.indexOf("?")<0&&(t+="?"),"?"!==t[t.length-1]&&(t+="&"),t+=encodeURIComponent(e),t+="=",t+encodeURIComponent(r)},t.parseUrlFragment=function(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].replace(/\+/g," ")),c++>50)return n.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",t),{error:"Response exceeded expected number of parameters"};for(var l in a)return a;return{}},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JoseUtil=void 0;var n=r(26),i=function(t){return t&&t.__esModule?t:{default:t}}(r(33));e.JoseUtil=(0,i.default)({jws:n.jws,KeyUtil:n.KeyUtil,X509:n.X509,crypto:n.crypto,hextob64u:n.hextob64u,b64tohex:n.b64tohex,AllowedSigningAlgs:n.AllowedSigningAlgs})},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 t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=e.authority,i=e.metadataUrl,o=e.metadata,h=e.signingKeys,g=e.metadataSeed,m=e.client_id,v=e.client_secret,y=e.response_type,_=void 0===y?f:y,b=e.scope,w=void 0===b?d:b,S=e.redirect_uri,F=e.post_logout_redirect_uri,E=e.client_authentication,x=void 0===E?p:E,k=e.prompt,A=e.display,T=e.max_age,C=e.ui_locales,P=e.acr_values,R=e.resource,I=e.response_mode,O=e.filterProtocolClaims,N=void 0===O||O,D=e.loadUserInfo,M=void 0===D||D,L=e.staleStateAge,U=void 0===L?900:L,j=e.clockSkew,B=void 0===j?300:j,H=e.clockService,V=void 0===H?new s.ClockService:H,q=e.userInfoJwtIssuer,K=void 0===q?"OP":q,J=e.mergeClaims,W=void 0!==J&&J,z=e.stateStore,$=void 0===z?new a.WebStorageStateStore:z,Y=e.ResponseValidatorCtor,Z=void 0===Y?u.ResponseValidator:Y,G=e.MetadataServiceCtor,X=void 0===G?c.MetadataService:G,Q=e.extraQueryParams,tt=void 0===Q?{}:Q,et=e.extraTokenParams,rt=void 0===et?{}:et;l(this,t),this._authority=r,this._metadataUrl=i,this._metadata=o,this._metadataSeed=g,this._signingKeys=h,this._client_id=m,this._client_secret=v,this._response_type=_,this._scope=w,this._redirect_uri=S,this._post_logout_redirect_uri=F,this._client_authentication=x,this._prompt=k,this._display=A,this._max_age=T,this._ui_locales=C,this._acr_values=P,this._resource=R,this._response_mode=I,this._filterProtocolClaims=!!N,this._loadUserInfo=!!M,this._staleStateAge=U,this._clockSkew=B,this._clockService=V,this._userInfoJwtIssuer=K,this._mergeClaims=!!W,this._stateStore=$,this._validator=new Z(this),this._metadataService=new X(this),this._extraQueryParams="object"===(void 0===tt?"undefined":n(tt))?tt:{},this._extraTokenParams="object"===(void 0===rt?"undefined":n(rt))?rt:{}}return t.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},i(t,[{key:"client_id",get:function(){return this._client_id},set:function(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(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(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(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(h)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=h)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(t){this._metadata=t}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(t){this._metadataSeed=t}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(t){this._signingKeys=t}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(t){"object"===(void 0===t?"undefined":n(t))?this._extraQueryParams=t:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(t){"object"===(void 0===t?"undefined":n(t))?this._extraTokenParams=t:this._extraTokenParams={}}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebStorageStateStore=void 0;var n=r(0),i=r(1);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.WebStorageStateStore=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.prefix,n=void 0===r?"oidc.":r,s=e.store,a=void 0===s?i.Global.localStorage:s;o(this,t),this._store=a,this._prefix=n}return t.prototype.set=function(t,e){return n.Log.debug("WebStorageStateStore.set",t),t=this._prefix+t,this._store.setItem(t,e),Promise.resolve()},t.prototype.get=function(t){n.Log.debug("WebStorageStateStore.get",t),t=this._prefix+t;var e=this._store.getItem(t);return Promise.resolve(e)},t.prototype.remove=function(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)},t.prototype.getAllKeys=function(){n.Log.debug("WebStorageStateStore.getAllKeys");for(var t=[],e=0;e0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.XMLHttpRequest,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;o(this,t),e&&Array.isArray(e)?this._contentTypes=e.slice():this._contentTypes=[],this._contentTypes.push("application/json"),n&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=r,this._jwtHandler=n}return t.prototype.getJson=function(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,u=r._jwtHandler;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){var r=a.find((function(t){if(e.startsWith(t))return!0}));if("application/jwt"==r)return void u(s).then(i,o);if(r)try{return void i(JSON.parse(s.responseText))}catch(i){return n.Log.error("JsonService.getJson: Error parsing JSON response",i.message),void o(i)}}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()}))},t.prototype.postForm=function(t,e,r){var i=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(o,s){var a=new i._XMLHttpRequest;a.open("POST",t);var u=i._contentTypes;a.onload=function(){if(n.Log.debug("JsonService.postForm: HTTP response received, status",a.status),200!==a.status){if(400===a.status&&(r=a.getResponseHeader("Content-Type"))&&u.find((function(t){if(r.startsWith(t))return!0})))try{var e=JSON.parse(a.responseText);if(e&&e.error)return n.Log.error("JsonService.postForm: Error from server: ",e.error),void s(new Error(e.error))}catch(o){return n.Log.error("JsonService.postForm: Error parsing JSON response",o.message),void s(o)}s(Error(a.statusText+" ("+a.status+")"))}else{var r;if((r=a.getResponseHeader("Content-Type"))&&u.find((function(t){if(r.startsWith(t))return!0})))try{return void o(JSON.parse(a.responseText))}catch(o){return n.Log.error("JsonService.postForm: Error parsing JSON response",o.message),void s(o)}s(Error("Invalid response Content-Type: "+r+", from URL: "+t))}},a.onerror=function(){n.Log.error("JsonService.postForm: network error"),s(Error("Network Error"))};var c="";for(var l in e){var h=e[l];h&&(c.length>0&&(c+="&"),c+=encodeURIComponent(l),c+="=",c+=encodeURIComponent(h))}a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),void 0!==r&&a.setRequestHeader("Authorization","Basic "+btoa(r)),a.send(c)}))},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninRequest=void 0;var n=r(0),i=r(3),o=r(13);e.SigninRequest=function(){function t(e){var r=e.url,s=e.client_id,a=e.redirect_uri,u=e.response_type,c=e.scope,l=e.authority,h=e.data,f=e.prompt,d=e.display,p=e.max_age,g=e.ui_locales,m=e.id_token_hint,v=e.login_hint,y=e.acr_values,_=e.resource,b=e.response_mode,w=e.request,S=e.request_uri,F=e.extraQueryParams,E=e.request_type,x=e.client_secret,k=e.extraTokenParams,A=e.skipUserInfo;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!r)throw n.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!s)throw n.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!a)throw n.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!u)throw n.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!c)throw n.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!l)throw n.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var T=t.isOidc(u),C=t.isCode(u);b||(b=t.isCode(u)?"query":null),this.state=new o.SigninState({nonce:T,data:h,client_id:s,authority:l,redirect_uri:a,code_verifier:C,request_type:E,response_mode:b,client_secret:x,scope:c,extraTokenParams:k,skipUserInfo:A}),r=i.UrlUtility.addQueryParam(r,"client_id",s),r=i.UrlUtility.addQueryParam(r,"redirect_uri",a),r=i.UrlUtility.addQueryParam(r,"response_type",u),r=i.UrlUtility.addQueryParam(r,"scope",c),r=i.UrlUtility.addQueryParam(r,"state",this.state.id),T&&(r=i.UrlUtility.addQueryParam(r,"nonce",this.state.nonce)),C&&(r=i.UrlUtility.addQueryParam(r,"code_challenge",this.state.code_challenge),r=i.UrlUtility.addQueryParam(r,"code_challenge_method","S256"));var P={prompt:f,display:d,max_age:p,ui_locales:g,id_token_hint:m,login_hint:v,acr_values:y,resource:_,request:w,request_uri:S,response_mode:b};for(var R in P)P[R]&&(r=i.UrlUtility.addQueryParam(r,R,P[R]));for(var I in F)r=i.UrlUtility.addQueryParam(r,I,F[I]);this.url=r}return t.isOidc=function(t){return!!t.split(/\s+/g).filter((function(t){return"id_token"===t}))[0]},t.isOAuth=function(t){return!!t.split(/\s+/g).filter((function(t){return"token"===t}))[0]},t.isCode=function(t){return!!t.split(/\s+/g).filter((function(t){return"code"===t}))[0]},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.State=void 0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=e.id,n=e.data,i=e.created,a=e.request_type;s(this,t),this._id=r||(0,o.default)(),this._data=n,this._created="number"==typeof i&&i>0?i:parseInt(Date.now()/1e3),this._request_type=a}return t.prototype.toStorageString=function(){return i.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},t.fromStorageString=function(e){return i.Log.debug("State.fromStorageString"),new t(JSON.parse(e))},t.clearStaleState=function(e,r){var n=Date.now()/1e3-r;return e.getAllKeys().then((function(r){i.Log.debug("State.clearStaleState: got keys",r);for(var o=[],s=function(s){var a=r[s];u=e.get(a).then((function(r){var o=!1;if(r)try{var s=t.fromStorageString(r);i.Log.debug("State.clearStaleState: got item from key: ",a,s.created),s.created<=n&&(o=!0)}catch(t){i.Log.error("State.clearStaleState: Error parsing state for key",a,t.message),o=!0}else i.Log.debug("State.clearStaleState: no item in storage for key: ",a),o=!0;if(o)return i.Log.debug("State.clearStaleState: removed item for key: ",a),e.remove(a)})),o.push(u)},a=0;a0&&void 0!==arguments[0]?arguments[0]:{};d(this,t),e instanceof o.OidcClientSettings?this._settings=e:this._settings=new o.OidcClientSettings(e)}return t.prototype.createSigninRequest=function(){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,l=e.display,h=e.max_age,f=e.ui_locales,d=e.id_token_hint,p=e.login_hint,g=e.acr_values,m=e.resource,v=e.request,y=e.request_uri,_=e.response_mode,b=e.extraQueryParams,w=e.extraTokenParams,S=e.request_type,F=e.skipUserInfo,E=arguments[1];i.Log.debug("OidcClient.createSigninRequest");var x=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,l=l||this._settings.display,h=h||this._settings.max_age,f=f||this._settings.ui_locales,g=g||this._settings.acr_values,m=m||this._settings.resource,_=_||this._settings.response_mode,b=b||this._settings.extraQueryParams,w=w||this._settings.extraTokenParams;var k=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 A=new a.SigninRequest({url:e,client_id:x,redirect_uri:o,response_type:r,scope:n,data:s||u,authority:k,prompt:c,display:l,max_age:h,ui_locales:f,id_token_hint:d,login_hint:p,acr_values:g,resource:m,request:v,request_uri:y,extraQueryParams:b,extraTokenParams:w,request_type:S,response_mode:_,client_secret:t._settings.client_secret,skipUserInfo:F}),T=A.state;return(E=E||t._stateStore).set(T.id,T.toStorageString()).then((function(){return A}))}))},t.prototype.readSigninResponseState=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSigninResponseState");var n="query"===this._settings.response_mode||!this._settings.response_mode&&a.SigninRequest.isCode(this._settings.response_type),o=n?"?":"#",s=new u.SigninResponse(t,o);if(!s.state)return i.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response"));e=e||this._stateStore;var c=r?e.remove.bind(e):e.get.bind(e);return c(s.state).then((function(t){if(!t)throw i.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:h.SigninState.fromStorageString(t),response:s}}))},t.prototype.processSigninResponse=function(t,e){var r=this;return i.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(t,e,!0).then((function(t){var e=t.state,n=t.response;return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),r._validator.validateSigninResponse(e,n)}))},t.prototype.createSignoutRequest=function(){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=e.extraQueryParams,u=e.request_type,l=arguments[1];return i.Log.debug("OidcClient.createSignoutRequest"),s=s||this._settings.post_logout_redirect_uri,a=a||this._settings.extraQueryParams,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 h=new c.SignoutRequest({url:e,id_token_hint:r,post_logout_redirect_uri:s,data:n||o,extraQueryParams:a,request_type:u}),f=h.state;return f&&(i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(l=l||t._stateStore).set(f.id,f.toStorageString())),h}))},t.prototype.readSignoutResponseState=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSignoutResponseState");var n=new l.SignoutResponse(t);if(!n.state)return i.Log.debug("OidcClient.readSignoutResponseState: No state in response"),n.error?(i.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",n.error),Promise.reject(new s.ErrorResponse(n))):Promise.resolve({state:void 0,response:n});var o=n.state;e=e||this._stateStore;var a=r?e.remove.bind(e):e.get.bind(e);return a(o).then((function(t){if(!t)throw i.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:f.State.fromStorageString(t),response:n}}))},t.prototype.processSignoutResponse=function(t,e){var r=this;return i.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(t,e,!0).then((function(t){var e=t.state,n=t.response;return e?(i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),r._validator.validateSignoutResponse(e,n)):(i.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),n)}))},t.prototype.clearStaleState=function(t){return i.Log.debug("OidcClient.clearStaleState"),t=t||this._stateStore,f.State.clearStaleState(t,this.settings.staleStateAge)},n(t,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenClient=void 0;var n=r(7),i=r(2),o=r(0);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.TokenClient=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(s(this,t),!e)throw o.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=e,this._jsonService=new r,this._metadataService=new a(this._settings)}return t.prototype.exchangeCode=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).grant_type=e.grant_type||"authorization_code",e.client_id=e.client_id||this._settings.client_id,e.client_secret=e.client_secret||this._settings.client_secret,e.redirect_uri=e.redirect_uri||this._settings.redirect_uri;var r=void 0,n=e._client_authentication||this._settings._client_authentication;return delete e._client_authentication,e.code?e.redirect_uri?e.code_verifier?e.client_id?e.client_secret||"client_secret_basic"!=n?("client_secret_basic"==n&&(r=e.client_id+":"+e.client_secret,delete e.client_id,delete e.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(n){return o.Log.debug("TokenClient.exchangeCode: Received token endpoint"),t._jsonService.postForm(n,e,r).then((function(t){return o.Log.debug("TokenClient.exchangeCode: response received"),t}))}))):(o.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(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")))},t.prototype.exchangeRefreshToken=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).grant_type=e.grant_type||"refresh_token",e.client_id=e.client_id||this._settings.client_id,e.client_secret=e.client_secret||this._settings.client_secret;var r=void 0,n=e._client_authentication||this._settings._client_authentication;return delete e._client_authentication,e.refresh_token?e.client_id?("client_secret_basic"==n&&(r=e.client_id+":"+e.client_secret,delete e.client_id,delete e.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(n){return o.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),t._jsonService.postForm(n,e,r).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")))},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorResponse=void 0;var n=r(0);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(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}e.ErrorResponse=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=r.error,a=r.error_description,u=r.error_uri,c=r.state,l=r.session_state;if(i(this,e),!s)throw n.Log.error("No error passed to ErrorResponse"),new Error("error");var h=o(this,t.call(this,a||s));return h.name="ErrorResponse",h.error=s,h.error_description=a,h.error_uri=u,h.state=c,h.session_state=l,h}return function(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)}(e,t),e}(Error)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SigninState=void 0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=r.nonce,i=r.authority,o=r.client_id,l=r.redirect_uri,h=r.code_verifier,f=r.response_mode,d=r.client_secret,p=r.scope,g=r.extraTokenParams,m=r.skipUserInfo;u(this,e);var v=c(this,t.call(this,arguments[0]));if(!0===n?v._nonce=(0,a.default)():n&&(v._nonce=n),!0===h?v._code_verifier=(0,a.default)()+(0,a.default)()+(0,a.default)():h&&(v._code_verifier=h),v.code_verifier){var y=s.JoseUtil.hashString(v.code_verifier,"SHA256");v._code_challenge=s.JoseUtil.hexToBase64Url(y)}return v._redirect_uri=l,v._authority=i,v._client_id=o,v._response_mode=f,v._client_secret=d,v._scope=p,v._extraTokenParams=g,v._skipUserInfo=m,v}return function(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)}(e,t),e.prototype.toStorageString=function(){return i.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},e.fromStorageString=function(t){return i.Log.debug("SigninState.fromStorageString"),new e(JSON.parse(t))},n(e,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),e}(o.State)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){return("undefined"!=n&&null!==n&&void 0!==n.getRandomValues?i:o)().replace(/-/g,"")};var n="undefined"!=typeof window?window.crypto||window.msCrypto:null;function i(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^n.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}function o(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^16*Math.random()>>t/4).toString(16)}))}t.exports=e.default},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.User=void 0;var n=function(){function t(t,e){for(var r=0;r0){var r=parseInt(Date.now()/1e3);this.expires_at=r+e}}},{key:"expired",get:function(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessTokenEvents=void 0;var n=r(0),i=r(46);function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.AccessTokenEvents=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.accessTokenExpiringNotificationTime,n=void 0===r?60:r,s=e.accessTokenExpiringTimer,a=void 0===s?new i.Timer("Access token expiring"):s,u=e.accessTokenExpiredTimer,c=void 0===u?new i.Timer("Access token expired"):u;o(this,t),this._accessTokenExpiringNotificationTime=n,this._accessTokenExpiring=a,this._accessTokenExpired=c}return t.prototype.load=function(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()},t.prototype.unload=function(){n.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},t.prototype.addAccessTokenExpiring=function(t){this._accessTokenExpiring.addHandler(t)},t.prototype.removeAccessTokenExpiring=function(t){this._accessTokenExpiring.removeHandler(t)},t.prototype.addAccessTokenExpired=function(t){this._accessTokenExpired.addHandler(t)},t.prototype.removeAccessTokenExpired=function(t){this._accessTokenExpired.removeHandler(t)},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Event=void 0;var n=r(0);e.Event=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._name=e,this._callbacks=[]}return t.prototype.addHandler=function(t){this._callbacks.push(t)},t.prototype.removeHandler=function(t){var e=this._callbacks.findIndex((function(e){return e===t}));e>=0&&this._callbacks.splice(e,1)},t.prototype.raise=function(){n.Log.debug("Event: Raising event: "+this._name);for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:o.CheckSessionIFrame,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Global.timer;if(a(this,t),!e)throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=e,this._CheckSessionIFrameCtor=n,this._timer=u,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then((function(t){t?r._start(t):r._settings.monitorAnonymousSession&&r._userManager.querySessionStatus().then((function(t){var e={session_state:t.session_state};t.sub&&t.sid&&(e.profile={sub:t.sub,sid:t.sid}),r._start(e)})).catch((function(t){i.Log.error("SessionMonitor ctor: error from querySessionStatus:",t.message)}))})).catch((function(t){i.Log.error("SessionMonitor ctor: error from getUser:",t.message)})))}return t.prototype._start=function(t){var e=this,r=t.session_state;r&&(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,i.Log.debug("SessionMonitor._start: session_state:",r,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,i.Log.debug("SessionMonitor._start: session_state:",r,", anonymous user")),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)})))},t.prototype._stop=function(){var t=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(i.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var e=this._timer.setInterval((function(){t._timer.clearInterval(e),t._userManager.querySessionStatus().then((function(e){var r={session_state:e.session_state};e.sub&&e.sid&&(r.profile={sub:e.sub,sid:e.sid}),t._start(r)})).catch((function(t){i.Log.error("SessionMonitor: error from querySessionStatus:",t.message)}))}),1e3)},t.prototype._callback=function(){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&&(t._sub?(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),t._userManager.events._raiseUserSignedOut()):(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),t._userManager.events._raiseUserSignedIn()))})).catch((function(e){t._sub&&(i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",e.message),t._userManager.events._raiseUserSignedOut())}))},n(t,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckSessionIFrame=void 0;var n=r(0);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.CheckSessionIFrame=function(){function t(e,r,n,o){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];i(this,t),this._callback=e,this._client_id=r,this._url=n,this._interval=o||2e3,this._stopOnError=s;var a=n.indexOf("/",n.indexOf("//")+2);this._frame_origin=n.substr(0,a),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=n}return t.prototype.load=function(){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)}))},t.prototype._message=function(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"))},t.prototype.start=function(t){var e=this;if(this._session_state!==t){n.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=t;var r=function(){e._frame.contentWindow.postMessage(e._client_id+" "+e._session_state,e._frame_origin)};r(),this._timer=window.setInterval(r,this._interval)}},t.prototype.stop=function(){this._session_state=null,this._timer&&(n.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenRevocationClient=void 0;var n=r(0),i=r(2),o=r(1);function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var a="access_token",u="refresh_token";e.TokenRevocationClient=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.XMLHttpRequest,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(s(this,t),!e)throw n.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=e,this._XMLHttpRequestCtor=r,this._metadataService=new a(this._settings)}return t.prototype.revoke=function(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(i!==a&&i!=u)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")}))},t.prototype._revoke=function(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 l="client_id="+encodeURIComponent(e);r&&(l+="&client_secret="+encodeURIComponent(r)),l+="&token_type_hint="+encodeURIComponent(o),l+="&token="+encodeURIComponent(i),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),c.send(l)}))},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CordovaPopupWindow=void 0;var n=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.MetadataService,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.UserInfoService,u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.JoseUtil,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.TokenClient;if(l(this,t),!e)throw i.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=e,this._metadataService=new r(this._settings),this._userInfoService=new n(this._settings),this._joseUtil=u,this._tokenClient=new h(this._settings)}return t.prototype.validateSigninResponse=function(t,e){var r=this;return i.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(t,e).then((function(e){return i.Log.debug("ResponseValidator.validateSigninResponse: state processed"),r._validateTokens(t,e).then((function(e){return i.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),r._processClaims(t,e).then((function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),t}))}))}))},t.prototype.validateSignoutResponse=function(t,e){return t.id!==e.state?(i.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(i.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),e.state=t.data,e.error?(i.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",e.error),Promise.reject(new u.ErrorResponse(e))):Promise.resolve(e))},t.prototype._processSigninParams=function(t,e){if(t.id!==e.state)return i.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!t.client_id)return i.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!t.authority)return i.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 i.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 i.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 i.Log.debug("ResponseValidator._processSigninParams: state validated"),e.state=t.data,e.error?(i.Log.warn("ResponseValidator._processSigninParams: Response was error",e.error),Promise.reject(new u.ErrorResponse(e))):t.nonce&&!e.id_token?(i.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!t.nonce&&e.id_token?(i.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):t.code_verifier&&!e.code?(i.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!t.code_verifier&&e.code?(i.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(e.scope||(e.scope=t.scope),Promise.resolve(e))},t.prototype._processClaims=function(t,e){var r=this;if(e.isOpenIdConnect){if(i.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),e.profile=this._filterProtocolClaims(e.profile),!0!==t.skipUserInfo&&this._settings.loadUserInfo&&e.access_token)return i.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(e.access_token).then((function(t){return i.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),t.sub!==e.profile.sub?(i.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(e.profile=r._mergeClaims(e.profile,t),i.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",e.profile),e)}));i.Log.debug("ResponseValidator._processClaims: not loading user info")}else i.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(e)},t.prototype._mergeClaims=function(t,e){var r=Object.assign({},t);for(var i in e){var o=e[i];Array.isArray(o)||(o=[o]);for(var s=0;s1)return i.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"));o=r[0]}return Promise.resolve(o)}))},t.prototype._getSigningKeyForJwtWithSingleRetry=function(t){var e=this;return this._getSigningKeyForJwt(t).then((function(r){return r?Promise.resolve(r):(e._metadataService.resetSigningKeys(),e._getSigningKeyForJwt(t))}))},t.prototype._validateIdToken=function(t,e){var r=this;if(!t.nonce)return i.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var n=this._joseUtil.parseJwt(e.id_token);return n&&n.header&&n.payload?t.nonce!==n.payload.nonce?(i.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then((function(o){return i.Log.debug("ResponseValidator._validateIdToken: Received issuer"),r._getSigningKeyForJwtWithSingleRetry(n).then((function(s){if(!s)return i.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 a=t.client_id,u=r._settings.clockSkew;return i.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",u),r._joseUtil.validateJwt(e.id_token,s,o,a,u).then((function(){return i.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),n.payload.sub?(e.profile=n.payload,e):(i.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))})):(i.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",n),Promise.reject(new Error("Failed to parse id_token")))},t.prototype._filterByAlg=function(t,e){var r=null;if(e.startsWith("RS"))r="RSA";else if(e.startsWith("PS"))r="PS";else{if(!e.startsWith("ES"))return i.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",e),[];r="EC"}return i.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",r),t=t.filter((function(t){return t.kty===r})),i.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",r,t.length),t},t.prototype._validateAccessToken=function(t){if(!t.profile)return i.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 i.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 i.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 i.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 i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r),Promise.reject(new Error("Unsupported alg: "+r));var n=r.substr(2,3);if(!n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));if(256!==(n=parseInt(n))&&384!==n&&512!==n)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",r,n),Promise.reject(new Error("Unsupported alg: "+r));var o="sha"+n,s=this._joseUtil.hashString(t.access_token,o);if(!s)return i.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?(i.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",u,t.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(i.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(t))},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserInfoService=void 0;var n=r(7),i=r(2),o=r(0),s=r(4);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.UserInfoService=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.JsonService,u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.JoseUtil;if(a(this,t),!e)throw o.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=e,this._jsonService=new r(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new u(this._settings),this._joseUtil=c}return t.prototype.getClaims=function(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")))},t.prototype._getClaimsFromJwt=function t(e){var r=this;try{var n=this._joseUtil.parseJwt(e.responseText);if(!n||!n.header||!n.payload)return o.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",n),Promise.reject(new Error("Failed to parse id_token"));var i=n.header.kid,s=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":s=this._metadataService.getIssuer();break;case"ANY":s=Promise.resolve(n.payload.iss);break;default:s=Promise.resolve(this._settings.userInfoJwtIssuer)}return s.then((function(t){return o.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+t),r._metadataService.getSigningKeys().then((function(s){if(!s)return o.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));o.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var a=void 0;if(i)a=s.filter((function(t){return t.kid===i}))[0];else{if((s=r._filterByAlg(s,n.header.alg)).length>1)return o.Log.error("UserInfoService._getClaimsFromJwt: 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"));a=s[0]}if(!a)return o.Log.error("UserInfoService._getClaimsFromJwt: 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 u=r._settings.client_id,c=r._settings.clockSkew;return o.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",c),r._joseUtil.validateJwt(e.responseText,a,t,u,c,void 0,!0).then((function(){return o.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),n.payload}))}))}))}catch(t){return o.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",t.message),void reject(t)}},t.prototype._filterByAlg=function(t,e){var r=null;if(e.startsWith("RS"))r="RSA";else if(e.startsWith("PS"))r="PS";else{if(!e.startsWith("ES"))return o.Log.debug("UserInfoService._filterByAlg: alg not supported: ",e),[];r="EC"}return o.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",r),t=t.filter((function(t){return t.kty===r})),o.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",r,t.length),t},t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllowedSigningAlgs=e.b64tohex=e.hextob64u=e.crypto=e.X509=e.KeyUtil=e.jws=void 0;var n=r(27);e.jws=n.jws,e.KeyUtil=n.KEYUTIL,e.X509=n.X509,e.crypto=n.crypto,e.hextob64u=n.hextob64u,e.b64tohex=n.b64tohex,e.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});var r="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},n={userAgent:!1},i={}; /*! 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===o)var o={};o.lang={extend:function(e,r,i){if(!r||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var o=function(){};if(o.prototype=r.prototype,e.prototype=new o,e.prototype.constructor=e,e.superclass=r.prototype,r.prototype.constructor==Object.prototype.constructor&&(r.prototype.constructor=r),i){var s;for(s in i)e.prototype[s]=i[s];var a=function(){},u=["toString","valueOf"];try{/MSIE/.test(n.userAgent)&&(a=function(t,e){for(s=0;s>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=s.ceil(e/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new l.init(r,e/2)}},d=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new l.init(r,e)}},p=h.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},g=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,r=e.words,n=e.sigBytes,i=this.blockSize,o=n/(4*i),a=(o=t?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*i,u=s.min(4*a,n);if(a){for(var c=0;c>>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>>6*(3-s)&63));if(e=n.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(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>>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(t){return 4294967296*(t-(0|t))|0},u=2,c=0;64>c;){var l;t:{l=u;for(var h=t.sqrt(l),f=2;f<=h;f++)if(!(l%f)){l=!1;break t}l=!0}l&&(8>c&&(o[c]=a(t.pow(u,.5))),s[c]=a(t.pow(u,1/3)),c++),u++}var d=[];i=i.SHA256=n.extend({_doReset:function(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function(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],l=r[6],h=r[7],f=0;64>f;f++){if(16>f)d[f]=0|t[e+f];else{var p=d[f-15],g=d[f-2];d[f]=((p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3)+d[f-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+d[f-16]}p=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+s[f]+d[f],g=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&o^i&o),h=l,l=c,c=u,u=a+p|0,a=o,o=i,i=n,n=p+g|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]+l|0,r[7]=r[7]+h|0},_doFinalize:function(){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(){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 t(){return n.create.apply(n,arguments)}for(var e=v,r=e.lib.Hasher,n=(o=e.x64).Word,i=o.WordArray,o=e.algo,s=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=t();o=o.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=(h=this._hash.words)[0],n=h[1],i=h[2],o=h[3],u=h[4],c=h[5],l=h[6],h=h[7],f=r.high,d=r.low,p=n.high,g=n.low,m=i.high,v=i.low,y=o.high,_=o.low,b=u.high,w=u.low,S=c.high,F=c.low,E=l.high,x=l.low,k=h.high,A=h.low,T=f,C=d,P=p,R=g,I=m,O=v,N=y,D=_,M=b,L=w,U=S,j=F,B=E,H=x,V=k,q=A,K=0;80>K;K++){var J=a[K];if(16>K)var W=J.high=0|t[e+2*K],z=J.low=0|t[e+2*K+1];else{W=((z=(W=a[K-15]).high)>>>1|($=W.low)<<31)^(z>>>8|$<<24)^z>>>7;var $=($>>>1|z<<31)^($>>>8|z<<24)^($>>>7|z<<25),Y=((z=(Y=a[K-2]).high)>>>19|(Z=Y.low)<<13)^(z<<3|Z>>>29)^z>>>6,Z=(Z>>>19|z<<13)^(Z<<3|z>>>29)^(Z>>>6|z<<26),G=(z=a[K-7]).high,X=(Q=a[K-16]).high,Q=Q.low;W=(W=(W=W+G+((z=$+z.low)>>>0<$>>>0?1:0))+Y+((z+=Z)>>>0>>0?1:0))+X+((z+=Q)>>>0>>0?1:0),J.high=W,J.low=z}G=M&U^~M&B,Q=L&j^~L&H,J=T&P^T&I^P&I;var tt=C&R^C&O^R&O,et=($=(T>>>28|C<<4)^(T<<30|C>>>2)^(T<<25|C>>>7),Y=(C>>>28|T<<4)^(C<<30|T>>>2)^(C<<25|T>>>7),(Z=s[K]).high),rt=Z.low;X=V+((M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9))+((Z=q+((L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9)))>>>0>>0?1:0),V=B,q=H,B=U,H=j,U=M,j=L,M=N+(X=(X=(X=X+G+((Z+=Q)>>>0>>0?1:0))+et+((Z+=rt)>>>0>>0?1:0))+W+((Z+=z)>>>0>>0?1:0))+((L=D+Z|0)>>>0>>0?1:0)|0,N=I,D=O,I=P,O=R,P=T,R=C,T=X+(J=$+J+((z=Y+tt)>>>0>>0?1:0))+((C=Z+z|0)>>>0>>0?1:0)|0}d=r.low=d+C,r.high=f+T+(d>>>0>>0?1:0),g=n.low=g+R,n.high=p+P+(g>>>0>>0?1:0),v=i.low=v+O,i.high=m+I+(v>>>0>>0?1:0),_=o.low=_+D,o.high=y+N+(_>>>0>>0?1:0),w=u.low=w+L,u.high=b+M+(w>>>0>>0?1:0),F=c.low=F+j,c.high=S+U+(F>>>0>>0?1:0),x=l.low=x+H,l.high=E+B+(x>>>0>>0?1:0),A=h.low=A+q,h.high=k+V+(A>>>0>>0?1:0)},_doFinalize:function(){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(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=r._createHelper(o),e.HmacSHA512=r._createHmacHelper(o)}(),function(){var t=v,e=(i=t.x64).Word,r=i.WordArray,n=(i=t.algo).SHA512,i=i.SHA384=n.extend({_doReset:function(){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(){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,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function b(t){var e,r,n="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),n+=_.charAt(r>>6)+_.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=_.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=_.charAt(r>>2)+_.charAt((3&r)<<4)),"=";(3&n.length)>0;)n+="=";return n}function w(t){var e,r,n,i="",o=0;for(e=0;e>2),r=3&n,o=1):1==o?(i+=T(r<<2|n>>4),r=15&n,o=2):2==o?(i+=T(r),i+=T(n>>2),r=3&n,o=3):(i+=T(r<<2|n>>4),i+=T(15&n),o=0));return 1==o&&(i+=T(r<<2)),i}function S(t){var e,r=w(t),n=new Array;for(e=0;2*e>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+r[n]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),r[n++]=1073741823&u}return i},y=30):"Netscape"!=n.appName?(F.prototype.am=function(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):(F.prototype.am=function(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,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+r[n]+i)>>28)+(l>>14)+a*c,r[n++]=268435455&u}return i},y=28),F.prototype.DB=y,F.prototype.DM=(1<>>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 I(t){this.m=t}function O(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=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 j(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function B(){}function H(t){return t}function V(t){this.r2=E(),this.q3=E(),F.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}I.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},I.prototype.revert=function(t){return t},I.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},I.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},I.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},O.prototype.convert=function(t){var e=E();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(F.ZERO)>0&&this.m.subTo(e,e),e},O.prototype.revert=function(t){var e=E();return t.copyTo(e),this.reduce(e),e},O.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;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)},O.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},O.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},F.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},F.prototype.fromInt=function(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},F.prototype.fromString=function(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]:C(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):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},F.prototype.dlShiftTo=function(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},F.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},F.prototype.rShiftTo=function(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;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},F.prototype.multiplyTo=function(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=0;)t[r]=0;for(r=0;r=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()},F.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var c=o.t,l=o[c-1];if(0!=l){var h=l*(1<1?o[c-2]>>this.F2:0),f=this.FV/h,d=(1<=0&&(r[r.t++]=1,r.subTo(v,r)),F.ONE.dlShiftTo(c,v),v.subTo(o,o);o.t=0;){var y=r[--g]==l?this.DM:Math.floor(r[g]*f+(r[g-1]+p)*d);if((r[g]+=o.am(0,y,r,m,0,c))0&&r.rShiftTo(u,r),s<0&&F.ZERO.subTo(r,r)}}},F.prototype.invDigit=function(){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},F.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},F.prototype.exp=function(t,e){if(t>4294967295||t<1)return F.ONE;var r=E(),n=E(),i=e.convert(this),o=R(t)-1;for(i.copyTo(r);--o>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var s=r;r=n,n=s}return e.revert(r)},F.prototype.toString=function(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<0)for(a>a)>0&&(i=!0,o=T(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=T(r));return i?o:"0"},F.prototype.negate=function(){var t=E();return F.ZERO.subTo(this,t),t},F.prototype.abs=function(){return this.s<0?this.negate():this},F.prototype.compareTo=function(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},F.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+R(this[this.t-1]^this.s&this.DM)},F.prototype.mod=function(t){var e=E();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(F.ZERO)>0&&t.subTo(e,e),e},F.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new I(e):new O(e),this.exp(t,r)},F.ZERO=P(0),F.ONE=P(1),B.prototype.convert=H,B.prototype.revert=H,B.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},B.prototype.sqrTo=function(t,e){t.squareTo(e)},V.prototype.convert=function(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=E();return t.copyTo(e),this.reduce(e),e},V.prototype.revert=function(t){return t},V.prototype.reduce=function(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)},V.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},V.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var q,K,J,W=[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],z=(1<<26)/W[W.length-1]; /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */function $(){this.i=0,this.j=0,this.S=new Array} /*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ */ function Y(){!function(t){K[J++]^=255&t,K[J++]^=t>>8&255,K[J++]^=t>>16&255,K[J++]^=t>>24&255,J>=256&&(J-=256)}((new Date).getTime())}if(F.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},F.prototype.toRadix=function(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=P(r),i=E(),o=E(),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},F.prototype.fromRadix=function(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=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&&F.ZERO.subTo(this,this)},F.prototype.fromNumber=function(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(F.ONE.shiftLeft(t-1),D,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(F.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<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=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()},F.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},F.prototype.dAddOffset=function(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]}},F.prototype.multiplyLowerTo=function(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=0;)r[n]=0;for(n=Math.max(e-this.t,0);n0)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},F.prototype.millerRabin=function(t){var e=this.subtract(F.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var n=e.shiftRight(r);(t=t+1>>1)>W.length&&(t=W.length);for(var i=E(),o=0;o>24},F.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},F.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},F.prototype.toByteArray=function(){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>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(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},F.prototype.equals=function(t){return 0==this.compareTo(t)},F.prototype.min=function(t){return this.compareTo(t)<0?this:t},F.prototype.max=function(t){return this.compareTo(t)>0?this:t},F.prototype.and=function(t){var e=E();return this.bitwiseTo(t,N,e),e},F.prototype.or=function(t){var e=E();return this.bitwiseTo(t,D,e),e},F.prototype.xor=function(t){var e=E();return this.bitwiseTo(t,M,e),e},F.prototype.andNot=function(t){var e=E();return this.bitwiseTo(t,L,e),e},F.prototype.not=function(){for(var t=E(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var l=E();for(n.sqrTo(s[1],l);a<=c;)s[a]=E(),n.mulTo(l,s[a-2],s[a]),a+=2}var h,f,d=t.t-1,p=!0,g=E();for(i=R(t[d])-1;d>=0;){for(i>=u?h=t[d]>>i-u&c:(h=(t[d]&(1<0&&(h|=t[d-1]>>this.DB+i-u)),a=r;0==(1&h);)h>>=1,--a;if((i-=a)<0&&(i+=this.DB,--d),p)s[h].copyTo(o),p=!1;else{for(;a>1;)n.sqrTo(o,g),n.sqrTo(g,o),a-=2;a>0?n.sqrTo(o,g):(f=o,o=g,g=f),n.mulTo(g,s[h],o)}for(;d>=0&&0==(t[d]&1<=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(F.ONE)?F.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},F.prototype.pow=function(t){return this.exp(t,new B)},F.prototype.gcd=function(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(i0&&(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},F.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=W[W.length-1]){for(e=0;e>>8,K[J++]=255&Z;J=0,Y()}function tt(){if(null==q){for(Y(),(q=function(){return new $}()).init(K),J=0;J>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return n}function it(){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 ot(t,e){this.x=e,this.q=t}function st(t,e,r,n){this.curve=t,this.x=e,this.y=r,this.z=null==n?F.ONE:n,this.zinv=null}function at(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new st(this,null,null)}et.prototype.nextBytes=function(t){var e;for(e=0;e0&&e.length>0))throw"Invalid RSA public key";this.n=rt(t,16),this.e=parseInt(e,16)}},it.prototype.encrypt=function(t){var e=function(t,e){if(e=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 et,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 F(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},it.prototype.encryptOAEP=function(t,e,r){var n=function(t,e,r,n){var i=ct.crypto.MessageDigest,o=ct.crypto.Util,s=null;if(r||(r="sha1"),"string"==typeof r&&(s=i.getCanonicalAlgName(r),n=i.getHashLength(s),r=function(t){return Ft(o.hashHex(Et(t),s))}),t.length+2*n+2>e)throw"Message too long for RSA";var a,u="";for(a=0;a>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},it.prototype.type="RSA",ot.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.x.equals(t.x)},ot.prototype.toBigInteger=function(){return this.x},ot.prototype.negate=function(){return new ot(this.q,this.x.negate().mod(this.q))},ot.prototype.add=function(t){return new ot(this.q,this.x.add(t.toBigInteger()).mod(this.q))},ot.prototype.subtract=function(t){return new ot(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))},ot.prototype.multiply=function(t){return new ot(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))},ot.prototype.square=function(){return new ot(this.q,this.x.square().mod(this.q))},ot.prototype.divide=function(t){return new ot(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))},st.prototype.getX=function(){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))},st.prototype.getY=function(){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))},st.prototype.equals=function(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(F.ZERO)&&t.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(t.z)).mod(this.curve.q).equals(F.ZERO))},st.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(F.ZERO)&&!this.y.toBigInteger().equals(F.ZERO)},st.prototype.negate=function(){return new st(this.curve,this.x,this.y.negate(),this.z)},st.prototype.add=function(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(F.ZERO.equals(r))return F.ZERO.equals(e)?this.twice():this.curve.getInfinity();var n=new F("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),l=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),f=a.multiply(this.z).multiply(t.z).mod(this.curve.q);return new st(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(h),f)},st.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=new F("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);F.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 st(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(u),c)},st.prototype.multiply=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,r=t,n=r.multiply(new F("3")),i=this.negate(),o=this,s=this.curve.q.subtract(t),a=s.multiply(new F("3")),u=new st(this.curve,this.x,this.y),c=u.negate();for(e=n.bitLength()-2;e>0;--e){o=o.twice();var l=n.testBit(e);l!=r.testBit(e)&&(o=o.add(l?this:i))}for(e=a.bitLength()-2;e>0;--e){u=u.twice();var h=a.testBit(e);h!=s.testBit(e)&&(u=u.add(h?u:c))}return o},st.prototype.multiplyTwo=function(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},at.prototype.getQ=function(){return this.q},at.prototype.getA=function(){return this.a},at.prototype.getB=function(){return this.b},at.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},at.prototype.getInfinity=function(){return this.infinity},at.prototype.fromBigInteger=function(t){return new ot(this.q,t)},at.prototype.decodePointHex=function(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 st(this,this.fromBigInteger(new F(r,16)),this.fromBigInteger(new F(n,16)));default:return null}}, /*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib */ ot.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},st.prototype.getEncoded=function(t){var e=function(t,e){var r=t.toByteArrayUnsigned();if(er.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},st.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 F(n),s=new F(i);return new st(t,t.fromBigInteger(o),t.fromBigInteger(s))},st.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 F(n,16),s=new F(i,16);return new st(t,t.fromBigInteger(o),t.fromBigInteger(s))},st.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 st(this.curve,n,i)},st.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(F.valueOf(2)),e=this.curve.fromBigInteger(F.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 st(this.curve,n,i)},st.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 F("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},st.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)},st.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},st.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(F.ONE)<0||e.compareTo(t.subtract(F.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(F.ONE)<0||r.compareTo(t.subtract(F.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 ut=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"),n={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function i(t,e,r){return e?n[e]:String.fromCharCode(parseInt(r,16))}var o=new String(""),s=Object.hasOwnProperty;return function(n,a){var u,c,l=n.match(t),h=l[0],f=!1;"{"===h?u={}:"["===h?u=[]:(u=[],f=!0);for(var d=[u],p=1-f,g=l.length;p=0;)delete i[o[l]]}return a.call(e,n,i)}({"":u},"")),u}}();void 0!==ct&&ct||(e.KJUR=ct={}),void 0!==ct.asn1&&ct.asn1||(ct.asn1={}),ct.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;i15)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""},this.setByParam=function(t){this.params=t},null!=t&&null!=t.tlv&&(this.hTLV=t.tlv,this.isModified=!1)},ct.asn1.DERAbstractString=function(t){ct.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=wt(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))},o.lang.extend(ct.asn1.DERAbstractString,ct.asn1.ASN1Object),ct.asn1.DERAbstractTime=function(t){ct.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){var e=t.getTime()+6e4*t.getTimezoneOffset();return new Date(e)},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=mt(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}},o.lang.extend(ct.asn1.DERAbstractTime,ct.asn1.ASN1Object),ct.asn1.DERAbstractStructured=function(t){ct.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)},o.lang.extend(ct.asn1.DERAbstractStructured,ct.asn1.ASN1Object),ct.asn1.DERBoolean=function(t){ct.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},o.lang.extend(ct.asn1.DERBoolean,ct.asn1.ASN1Object),ct.asn1.DERInteger=function(t){ct.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=ct.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new F(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))},o.lang.extend(ct.asn1.DERInteger,ct.asn1.ASN1Object),ct.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ct.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}ct.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||7i.length&&(i=n[r]);return(t=t.replace(i,"::")).slice(1,-1)}function Mt(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?Dt(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 Lt(t){for(var e=encodeURIComponent(t),r="",n=0;n"7"?"00"+t:t}ft.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=n)break}return s},ft.getNthChildIdx=function(t,e,r){return ft.getChildIdx(t,e)[r]},ft.getIdxbyList=function(t,e,r,n){var i,o,s=ft;return 0==r.length?void 0!==n&&t.substr(e,2)!==n?-1:e:(i=r.shift())>=(o=s.getChildIdx(t,e)).length?-1:s.getIdxbyList(t,o[i],r,n)},ft.getIdxbyListEx=function(t,e,r,n){var i,o,s=ft;if(0==r.length)return void 0!==n&&t.substr(e,2)!==n?-1:e;i=r.shift(),o=s.getChildIdx(t,e);for(var a=0,u=0;u=t.length?null:i.getTLV(t,o)},ft.getTLVbyListEx=function(t,e,r,n){var i=ft,o=i.getIdxbyListEx(t,e,r,n);return-1==o?null:i.getTLV(t,o)},ft.getVbyList=function(t,e,r,n,i){var o,s,a=ft;return-1==(o=a.getIdxbyList(t,e,r,n))||o>=t.length?null:(s=a.getV(t,o),!0===i&&(s=s.substr(2)),s)},ft.getVbyListEx=function(t,e,r,n,i){var o,s,a=ft;return-1==(o=a.getIdxbyListEx(t,e,r,n))?null:(s=a.getV(t,o),"03"==t.substr(o,2)&&!1!==i&&(s=s.substr(2)),s)},ft.getInt=function(t,e,r){null==r&&(r=-1);try{var n=t.substr(e,2);if("02"!=n&&"03"!=n)return r;var i=ft.getV(t,e);return"02"==n?parseInt(i,16):function(t){try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var r=parseInt(e,16),n=t.substr(2),i=parseInt(n,16).toString(2);return"0"==i&&(i="00000000"),i=i.slice(0,0-r),parseInt(i,2)}catch(t){return-1}}(i)}catch(t){return r}},ft.getOID=function(t,e,r){null==r&&(r=null);try{return"06"!=t.substr(e,2)?r:function(t){if(!Ut(t))return null;try{var e=[],r=t.substr(0,2),n=parseInt(r,16);e[0]=new String(Math.floor(n/40)),e[1]=new String(n%40);for(var i=t.substr(2),o=[],s=0;s0&&(c=c+"."+a.join(".")),c}catch(t){return null}}(ft.getV(t,e))}catch(t){return r}},ft.getOIDName=function(t,e,r){null==r&&(r=null);try{var n=ft.getOID(t,e,r);if(n==r)return r;var i=ct.asn1.x509.OID.oid2name(n);return""==i?n:i}catch(t){return r}},ft.getString=function(t,e,r){null==r&&(r=null);try{return Ft(ft.getV(t,e))}catch(t){return r}},ft.hextooidstr=function(t){var e=function(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;a0&&(l=l+"."+u.join(".")),l},ft.dump=function(t,e,r,n){var i=ft,o=i.getV,s=i.dump,a=i.getChildIdx,u=t;t instanceof ct.asn1.ASN1Object&&(u=t.getEncodedHex());var c=function(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 l,h=e.ommit_long_octet;if("01"==(l=u.substr(r,2)))return"00"==(f=o(u,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==l)return n+"INTEGER "+c(f=o(u,r),h)+"\n";if("03"==l){var f=o(u,r);if(i.isASN1HEX(f.substr(2))){var d=n+"BITSTRING, encapsulates\n";return d+s(f.substr(2),e,0,n+" ")}return n+"BITSTRING "+c(f,h)+"\n"}if("04"==l)return f=o(u,r),i.isASN1HEX(f)?(d=n+"OCTETSTRING, encapsulates\n",d+s(f,e,0,n+" ")):n+"OCTETSTRING "+c(f,h)+"\n";if("05"==l)return n+"NULL\n";if("06"==l){var p=o(u,r),g=ct.asn1.ASN1Util.oidHexToInt(p),m=ct.asn1.x509.OID.oid2name(g),v=g.replace(/\./g," ");return""!=m?n+"ObjectIdentifier "+m+" ("+v+")\n":n+"ObjectIdentifier ("+v+")\n"}if("0a"==l)return n+"ENUMERATED "+parseInt(o(u,r))+"\n";if("0c"==l)return n+"UTF8String '"+St(o(u,r))+"'\n";if("13"==l)return n+"PrintableString '"+St(o(u,r))+"'\n";if("14"==l)return n+"TeletexString '"+St(o(u,r))+"'\n";if("16"==l)return n+"IA5String '"+St(o(u,r))+"'\n";if("17"==l)return n+"UTCTime "+St(o(u,r))+"\n";if("18"==l)return n+"GeneralizedTime "+St(o(u,r))+"\n";if("1a"==l)return n+"VisualString '"+St(o(u,r))+"'\n";if("1e"==l)return n+"BMPString '"+St(o(u,r))+"'\n";if("30"==l){if("3000"==u.substr(r,4))return n+"SEQUENCE {}\n";d=n+"SEQUENCE\n";var y=e;if((2==(w=a(u,r)).length||3==w.length)&&"06"==u.substr(w[0],2)&&"04"==u.substr(w[w.length-1],2)){m=i.oidname(o(u,w[0]));var _=JSON.parse(JSON.stringify(e));_.x509ExtName=m,y=_}for(var b=0;b31)&&128==(192&r)&&(31&r)==n}catch(t){return!1}},ft.isASN1HEX=function(t){var e=ft;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},ft.checkStrictDER=function(t,e,r,n,i){var o=ft;if(void 0===r){if("string"!=typeof t)throw new Error("not hex string");if(t=t.toLowerCase(),!ct.lang.String.isHex(t))throw new Error("not hex string");r=t.length,i=(n=t.length/2)<128?1:Math.ceil(n.toString(16))+1}if(o.getL(t,e).length>2*i)throw new Error("L of TLV too long: idx="+e);var s=o.getVblen(t,e);if(s>n)throw new Error("value of L too long than hex: idx="+e);var a=o.getTLV(t,e),u=a.length-2-o.getL(t,e).length;if(u!==2*s)throw new Error("V string length and L's value not the same:"+u+"/"+2*s);if(0===e&&t.length!=a.length)throw new Error("total length and TLV length unmatch:"+t.length+"!="+a.length);var c=t.substr(e,2);if("02"===c){var l=o.getVidx(t,e);if("00"==t.substr(l,2)&&t.charCodeAt(l+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(c,16)){for(var h=o.getVblen(t,e),f=0,d=o.getChildIdx(t,e),p=0;p=e?t:new Array(e-t.length+1).join(r)+t};void 0!==ct&&ct||(e.KJUR=ct={}),void 0!==ct.crypto&&ct.crypto||(ct.crypto={}),ct.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",SHAwithRSAandMGF1:"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=0)return!1;if(r.compareTo(n.ONE)<0||r.compareTo(o)>=0)return!1;var a=r.modInverse(o),u=t.multiply(a).mod(o),c=e.multiply(a).mod(o);return s.multiply(u).add(i.multiply(c)).getX().toBigInteger().mod(o).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 i=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:n.fromByteArrayUnsigned(r),s:n.fromByteArrayUnsigned(i)}},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:n.fromByteArrayUnsigned(t.slice(1,33)).mod(r),s:n.fromByteArrayUnsigned(t.slice(33,65)).mod(r),i:e}},this.readPKCS5PrvKeyHex=function(t){if(!1===l(t))throw new Error("not ASN.1 hex string");var e,r,n;try{e=c(t,0,["[0]",0],"06"),r=c(t,0,[1],"04");try{n=c(t,0,["[1]",0],"03")}catch(t){}}catch(t){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=a(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){if(!1===l(t))throw new e("not ASN.1 hex string");var r,n,i;try{c(t,0,[1,0],"06"),r=c(t,0,[1,1],"06"),n=c(t,0,[2,0,1],"04");try{i=c(t,0,[2,0,"[1]",0],"03")}catch(t){}}catch(t){throw new e("malformed PKCS#8 plain ECC private key")}if(this.curveName=a(r),void 0===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){if(!1===l(t))throw new e("not ASN.1 hex string");var r,n;try{c(t,0,[0,0],"06"),r=c(t,0,[0,1],"06"),n=c(t,0,[1],"03")}catch(t){throw new e("malformed PKCS#8 ECC public key")}if(this.curveName=a(r),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(t,r){if(!1===l(t))throw new e("not ASN.1 hex string");var n,i;try{n=c(t,0,[0,5,0,1],"06"),i=c(t,0,[0,5,1],"03")}catch(t){throw new e("malformed X.509 certificate ECC public key")}if(this.curveName=a(n),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i)},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))},ct.crypto.ECDSA.parseSigHex=function(t){var e=ct.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new F(e.r,16),s:new F(e.s,16)}},ct.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=ft,r=e.getChildIdx,n=e.getV;if(e.checkStrictDER(t,0),"30"!=t.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var i=r(t,0);if(2!=i.length)throw new Error("signature shall have two elements");var o=i[0],s=i[1];if("02"!=t.substr(o,2))throw new Error("1st item not ASN.1 integer");if("02"!=t.substr(s,2))throw new Error("2nd item not ASN.1 integer");return{r:n(t,o),s:n(t,s)}},ct.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=ct.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},ct.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 ct.crypto.ECDSA.hexRSSigToASN1Sig(e,r)},ct.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var r=new F(t,16),n=new F(e,16);return ct.crypto.ECDSA.biRSSigToASN1Sig(r,n)},ct.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var r=ct.asn1,n=new r.DERInteger({bigint:t}),i=new r.DERInteger({bigint:e});return new r.DERSequence({array:[n,i]}).getEncodedHex()},ct.crypto.ECDSA.getName=function(t){return"2b8104001f"===t?"secp192k1":"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040021"===t?"secp224r1":"2b81040022"===t?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(t)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":null},void 0!==ct&&ct||(e.KJUR=ct={}),void 0!==ct.crypto&&ct.crypto||(ct.crypto={}),ct.crypto.ECParameterDB=new function(){var t={},e={};function r(t){return new F(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(n,i,o,s,a,u,c,l,h,f,d,p){t[n]={};var g=r(o),m=r(s),v=r(a),y=r(u),_=r(c),b=new at(g,m,v),w=b.decodePointHex("04"+l+h);t[n].name=n,t[n].keylen=i,t[n].curve=b,t[n].G=w,t[n].n=y,t[n].h=_,t[n].oid=d,t[n].info=p;for(var S=0;S=2*a)break}var h={};return h.keyhex=u.substr(0,2*i[t].keylen),h.ivhex=u.substr(2*i[t].keylen,2*i[t].ivlen),h},a=function(t,e,r,n){var o=v.enc.Base64.parse(t),s=v.enc.Hex.stringify(o);return(0,i[e].proc)(s,r,n)};return{version:"1.0.0",parsePKCS5PEM:function(t){return o(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,r){return s(t,e,r)},decryptKeyB64:function(t,e,r,n){return a(t,e,r,n)},getDecryptedKeyHex:function(t,e){var r=o(t),n=(r.type,r.cipher),i=r.ivsalt,u=r.data,c=s(n,e,i).keyhex;return a(u,n,c,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,r,n,o){var a="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===i[n])throw"KEYUTIL unsupported algorithm: "+n;void 0!==o&&null!=o||(o=function(t){var e=v.lib.WordArray.random(t);return v.enc.Hex.stringify(e)}(i[n].ivlen).toUpperCase());var u=function(t,e,r,n){return(0,i[e].eproc)(t,r,n)}(e,n,s(n,r,o).keyhex,o);return a="-----BEGIN "+t+" PRIVATE KEY-----\r\n",a+="Proc-Type: 4,ENCRYPTED\r\n",a+="DEK-Info: "+n+","+o+"\r\n",a+="\r\n",a+=u.replace(/(.{64})/g,"$1\r\n"),a+"\r\n-----END "+t+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var r=ft,n=r.getChildIdx,i=r.getV,o={},s=n(e,0);if(2!=s.length)throw"malformed format: SEQUENCE(0).items != 2: "+s.length;o.ciphertext=i(e,s[1]);var a=n(e,s[0]);if(2!=a.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+a.length;if("2a864886f70d01050d"!=i(e,a[0]))throw"this only supports pkcs5PBES2";var u=n(e,a[1]);if(2!=a.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+u.length;var c=n(e,u[1]);if(2!=c.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+c.length;if("2a864886f70d0307"!=i(e,c[0]))throw"this only supports TripleDES";o.encryptionSchemeAlg="TripleDES",o.encryptionSchemeIV=i(e,c[1]);var l=n(e,u[0]);if(2!=l.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+l.length;if("2a864886f70d01050c"!=i(e,l[0]))throw"this only supports pkcs5PBKDF2";var h=n(e,l[1]);if(h.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+h.length;o.pbkdf2Salt=i(e,h[0]);var f=i(e,h[1]);try{o.pbkdf2Iter=parseInt(f,16)}catch(t){throw"malformed format pbkdf2Iter: "+f}return o},getPBKDF2KeyHexFromParam:function(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(t,e){var r=Ct(t,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=Ht.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(t,e){var r=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(t){var e=ft,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(t){var e=Ct(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function(t){var e,r=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==r.algoid)e=new it;else if("2a8648ce380401"==r.algoid)e=new ct.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw"unsupported private key algorithm";e=new ct.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function(t){var e,r=ft.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===r)e=new it;else if("2a8648ce380401"===r)e=new ct.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw"unsupported PKCS#8 public key hex";e=new ct.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function(t){var e=ft,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(t){var e=ft,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}}}();Ht.getKey=function(t,e,r){var n,i=(v=ft).getChildIdx,o=(v.getV,v.getVbyList),s=ct.crypto,a=s.ECDSA,u=s.DSA,c=it,l=Ct,h=Ht;if(void 0!==c&&t instanceof c)return t;if(void 0!==a&&t instanceof a)return t;if(void 0!==u&&t instanceof u)return t;if(void 0!==t.curve&&void 0!==t.xy&&void 0===t.d)return new a({pub:t.xy,curve:t.curve});if(void 0!==t.curve&&void 0!==t.d)return new a({prv:t.d,curve:t.curve});if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(C=new c).setPublic(t.n,t.e),C;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(C=new c).setPrivateEx(t.n,t.e,t.d,t.p,t.q,t.dp,t.dq,t.co),C;if(void 0===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d&&void 0===t.p)return(C=new c).setPrivate(t.n,t.e,t.d),C;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0===t.x)return(C=new u).setPublic(t.p,t.q,t.g,t.y),C;if(void 0!==t.p&&void 0!==t.q&&void 0!==t.g&&void 0!==t.y&&void 0!==t.x)return(C=new u).setPrivate(t.p,t.q,t.g,t.y,t.x),C;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0===t.d)return(C=new c).setPublic(bt(t.n),bt(t.e)),C;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(C=new c).setPrivateEx(bt(t.n),bt(t.e),bt(t.d),bt(t.p),bt(t.q),bt(t.dp),bt(t.dq),bt(t.qi)),C;if("RSA"===t.kty&&void 0!==t.n&&void 0!==t.e&&void 0!==t.d)return(C=new c).setPrivate(bt(t.n),bt(t.e),bt(t.d)),C;if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0===t.d){var f=(T=new a({curve:t.crv})).ecparams.keylen/4,d="04"+("0000000000"+bt(t.x)).slice(-f)+("0000000000"+bt(t.y)).slice(-f);return T.setPublicKeyHex(d),T}if("EC"===t.kty&&void 0!==t.crv&&void 0!==t.x&&void 0!==t.y&&void 0!==t.d){f=(T=new a({curve:t.crv})).ecparams.keylen/4,d="04"+("0000000000"+bt(t.x)).slice(-f)+("0000000000"+bt(t.y)).slice(-f);var p=("0000000000"+bt(t.d)).slice(-f);return T.setPublicKeyHex(d),T.setPrivateKeyHex(p),T}if("pkcs5prv"===r){var g,m=t,v=ft;if(9===(g=i(m,0)).length)(C=new c).readPKCS5PrvKeyHex(m);else if(6===g.length)(C=new u).readPKCS5PrvKeyHex(m);else{if(!(g.length>2&&"04"===m.substr(g[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(C=new a).readPKCS5PrvKeyHex(m)}return C}if("pkcs8prv"===r)return h.getKeyFromPlainPrivatePKCS8Hex(t);if("pkcs8pub"===r)return h._getKeyFromPublicPKCS8Hex(t);if("x509pub"===r)return Wt.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Wt.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var y=Ct(t,"PUBLIC KEY");return h._getKeyFromPublicPKCS8Hex(y)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var _=l(t,"RSA PRIVATE KEY");return h.getKey(_,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var b=o(n=l(t,"DSA PRIVATE KEY"),0,[1],"02"),w=o(n,0,[2],"02"),S=o(n,0,[3],"02"),E=o(n,0,[4],"02"),x=o(n,0,[5],"02");return(C=new u).setPrivate(new F(b,16),new F(w,16),new F(S,16),new F(E,16),new F(x,16)),C}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED"))return _=l(t,"EC PRIVATE KEY"),h.getKey(_,null,"pkcs5prv");if(-1!=t.indexOf("-END PRIVATE KEY-"))return h.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var k=h.getDecryptedKeyHex(t,e),A=new it;return A.readPKCS5PrvKeyHex(k),A}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var T,C=o(n=h.getDecryptedKeyHex(t,e),0,[1],"04"),P=o(n,0,[2,0],"06"),R=o(n,0,[3,0],"03").substr(2);if(void 0===ct.crypto.OID.oidhex2name[P])throw"undefined OID(hex) in KJUR.crypto.OID: "+P;return(T=new a({curve:ct.crypto.OID.oidhex2name[P]})).setPublicKeyHex(R),T.setPrivateKeyHex(C),T.isPublic=!1,T}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return b=o(n=h.getDecryptedKeyHex(t,e),0,[1],"02"),w=o(n,0,[2],"02"),S=o(n,0,[3],"02"),E=o(n,0,[4],"02"),x=o(n,0,[5],"02"),(C=new u).setPrivate(new F(b,16),new F(w,16),new F(S,16),new F(E,16),new F(x,16)),C;if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return h.getKeyFromEncryptedPKCS8PEM(t,e);throw new Error("not supported argument")},Ht.generateKeypair=function(t,e){if("RSA"==t){var r=e;(s=new it).generate(r,"10001"),s.isPrivate=!0,s.isPublic=!0;var n=new it,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 ct.crypto.ECDSA({curve:u}).generateKeyPairHex();return(s=new ct.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),s.setPrivateKeyHex(c.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(n=new ct.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=n,a}throw"unknown algorithm: "+t},Ht.getPEM=function(t,e,r,n,i,o){var s=ct,a=s.asn1,u=a.DERObjectIdentifier,c=a.DERInteger,l=a.ASN1Util.newObject,h=a.x509.SubjectPublicKeyInfo,f=s.crypto,d=f.DSA,p=f.ECDSA,g=it;function m(t){return l({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 y(t){return l({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function _(t){return l({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!==g&&t instanceof g||void 0!==d&&t instanceof d||void 0!==p&&t instanceof p)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e))return Tt(F=new h(t).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==e&&void 0!==g&&t instanceof g&&(void 0===r||null==r)&&1==t.isPrivate)return Tt(F=m(t).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==e&&void 0!==p&&t instanceof p&&(void 0===r||null==r)&&1==t.isPrivate){var b=new u({name:t.curveName}).getEncodedHex(),w=y(t).getEncodedHex(),S="";return S+=Tt(b,"EC PARAMETERS"),S+Tt(w,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==d&&t instanceof d&&(void 0===r||null==r)&&1==t.isPrivate)return Tt(F=_(t).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==e&&void 0!==g&&t instanceof g&&void 0!==r&&null!=r&&1==t.isPrivate){var F=m(t).getEncodedHex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",F,r,n,o)}if("PKCS5PRV"==e&&void 0!==p&&t instanceof p&&void 0!==r&&null!=r&&1==t.isPrivate)return F=y(t).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",F,r,n,o);if("PKCS5PRV"==e&&void 0!==d&&t instanceof d&&void 0!==r&&null!=r&&1==t.isPrivate)return F=_(t).getEncodedHex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",F,r,n,o);var E=function(t,e){var r=x(t,e);return new l({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()},x=function(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&&null!=g&&t instanceof g&&1==t.isPrivate){var k=m(t).getEncodedHex();return F=l({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Tt(F,"PRIVATE KEY"):Tt(w=E(F,r),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==e&&void 0!==p&&t instanceof p&&1==t.isPrivate)return k=new l({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]}).getEncodedHex(),F=l({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Tt(F,"PRIVATE KEY"):Tt(w=E(F,r),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==e&&void 0!==d&&t instanceof d&&1==t.isPrivate)return k=new c({bigint:t.x}).getEncodedHex(),F=l({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:k}}]}).getEncodedHex(),void 0===r||null==r?Tt(F,"PRIVATE KEY"):Tt(w=E(F,r),"ENCRYPTED PRIVATE KEY");throw new Error("unsupported object nor format")},Ht.getKeyFromCSRPEM=function(t){var e=Ct(t,"CERTIFICATE REQUEST");return Ht.getKeyFromCSRHex(e)},Ht.getKeyFromCSRHex=function(t){var e=Ht.parseCSRHex(t);return Ht.getKey(e.p8pubkeyhex,null,"pkcs8pub")},Ht.parseCSRHex=function(t){var e=ft,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},Ht.getKeyID=function(t){var e=Ht,r=ft;"string"==typeof t&&-1!=t.indexOf("BEGIN ")&&(t=e.getKey(t));var n=Ct(e.getPEM(t)),i=r.getIdxbyList(n,0,[1]),o=r.getV(n,i).substring(2);return ct.crypto.Util.hashHex(o,"sha1")},Ht.getJWKFromKey=function(t){var e={};if(t instanceof it&&t.isPrivate)return e.kty="RSA",e.n=_t(t.n.toString(16)),e.e=_t(t.e.toString(16)),e.d=_t(t.d.toString(16)),e.p=_t(t.p.toString(16)),e.q=_t(t.q.toString(16)),e.dp=_t(t.dmp1.toString(16)),e.dq=_t(t.dmq1.toString(16)),e.qi=_t(t.coeff.toString(16)),e;if(t instanceof it&&t.isPublic)return e.kty="RSA",e.n=_t(t.n.toString(16)),e.e=_t(t.e.toString(16)),e;if(t instanceof ct.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=_t(r.x),e.y=_t(r.y),e.d=_t(t.prvKeyHex),e}if(t instanceof ct.crypto.ECDSA&&t.isPublic){var n;if("P-256"!==(n=t.getShortNISTPCurveName())&&"P-384"!==n)throw"unsupported curve name for JWT: "+n;return r=t.getPublicKeyXYHex(),e.kty="EC",e.crv=n,e.x=_t(r.x),e.y=_t(r.y),e}throw"not supported key object"},it.getPosArrayOfChildrenFromHex=function(t){return ft.getChildIdx(t,0)},it.getHexValueArrayOfChildrenFromHex=function(t){var e,r=ft.getV,n=r(t,(e=it.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]),l=r(t,e[7]),h=r(t,e[8]);return(e=new Array).push(n,i,o,s,a,u,c,l,h),e},it.prototype.readPrivateKeyFromPEMString=function(t){var e=Ct(t),r=it.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},it.prototype.readPKCS5PrvKeyHex=function(t){var e=it.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},it.prototype.readPKCS8PrvKeyHex=function(t){var e,r,n,i,o,s,a,u,c=ft,l=c.getVbyListEx;if(!1===c.isASN1HEX(t))throw new Error("not ASN.1 hex string");try{e=l(t,0,[2,0,1],"02"),r=l(t,0,[2,0,2],"02"),n=l(t,0,[2,0,3],"02"),i=l(t,0,[2,0,4],"02"),o=l(t,0,[2,0,5],"02"),s=l(t,0,[2,0,6],"02"),a=l(t,0,[2,0,7],"02"),u=l(t,0,[2,0,8],"02")}catch(t){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(e,r,n,i,o,s,a,u)},it.prototype.readPKCS5PubKeyHex=function(t){var e=ft,r=e.getV;if(!1===e.isASN1HEX(t))throw new Error("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 new Error("wrong hex for PKCS#5 public key");var i=r(t,n[0]),o=r(t,n[1]);this.setPublic(i,o)},it.prototype.readPKCS8PubKeyHex=function(t){var e=ft;if(!1===e.isASN1HEX(t))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==e.getTLVbyListEx(t,0,[0,0]))throw new Error("not PKCS8 RSA public key");var r=e.getTLVbyListEx(t,0,[1,0]);this.readPKCS5PubKeyHex(r)},it.prototype.readCertPubKeyHex=function(t,e){var r,n;(r=new Wt).readCertHex(t),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)};var Vt=new RegExp("[^0-9a-f]","gi");function qt(t,e){for(var r="",n=e/4-t.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function Jt(t){for(var e in ct.crypto.Util.DIGESTINFOHEAD){var r=ct.crypto.Util.DIGESTINFOHEAD[e],n=r.length;if(t.substring(0,n)==r)return[e,t.substring(n)]}return[]}function Wt(t){var e,r=ft,n=r.getChildIdx,i=r.getV,o=r.getTLV,s=r.getVbyList,a=r.getVbyListEx,u=r.getTLVbyList,c=r.getTLVbyListEx,l=r.getIdxbyList,h=r.getIdxbyListEx,f=r.getVidx,d=r.oidname,p=r.hextooidstr,g=Wt,m=Ct;try{e=ct.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(t){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},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"!==u(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return a(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var t=c(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(t)},this.getAlgorithmIdentifierName=function(t){for(var r in e)if(t===e[r])return r;return d(a(t,0,[0],"06"))},this.getIssuer=function(){return this.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return u(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return g.hex2dn(this.getIssuerHex())},this.getSubject=function(){return this.getX500Name(this.getSubjectHex())},this.getSubjectHex=function(){return u(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return g.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var t=s(this.hex,0,[0,4+this.foffset,0]);return t=t.replace(/(..)/g,"%$1"),decodeURIComponent(t)},this.getNotAfter=function(){var t=s(this.hex,0,[0,4+this.foffset,1]);return t=t.replace(/(..)/g,"%$1"),decodeURIComponent(t)},this.getPublicKeyHex=function(){return r.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return l(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var t=this.getPublicKeyIdx();return l(this.hex,t,[1,0],"30")},this.getPublicKey=function(){return Ht.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var t=u(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(t)},this.getSignatureValueHex=function(){return s(this.hex,0,[2],"03",!0)},this.verifySignature=function(t){var e=this.getSignatureAlgorithmField(),r=this.getSignatureValueHex(),n=u(this.hex,0,[0],"30"),i=new ct.crypto.Signature({alg:e});return i.init(t),i.updateHex(n),i.verify(r)},this.parseExt=function(t){var e,o,a;if(void 0===t){if(a=this.hex,3!==this.version)return-1;e=l(a,0,[0,7,0],"30"),o=n(a,e)}else{a=Ct(t);var u=l(a,0,[0,3,0,0],"06");if("2a864886f70d01090e"!=i(a,u))return void(this.aExtInfo=new Array);e=l(a,0,[0,3,0,1,0],"30"),o=n(a,e),this.hex=a}this.aExtInfo=new Array;for(var c=0;c1){var a=o(t,s[1]),u=this.getGeneralName(a);null!=u.uri&&(i.uri=u.uri)}if(s.length>2){var c=o(t,s[2]);"0101ff"==c&&(i.reqauth=!0),"010100"==c&&(i.reqauth=!1)}return i},this.getX500NameRule=function(t){for(var e=null,r=[],n=0;n0&&(t.ext=this.getExtParamArray()),t.sighex=this.getSignatureValueHex(),t},this.getExtParamArray=function(t){null==t&&-1!=h(this.hex,0,[0,"[3]"])&&(t=c(this.hex,0,[0,"[3]",0],"30"));for(var e=[],r=n(t,0),i=0;i0&&(c=new Array(r),(new et).nextBytes(c),c=String.fromCharCode.apply(String,c));var l=Ft(u(Et("\0\0\0\0\0\0\0\0"+i+c))),h=[];for(n=0;n>8*a-s&255;for(p[0]&=~g,n=0;nthis.n.bitLength())return 0;var n=Jt(this.doPublic(r).toString(16).replace(/^1f+00/,""));if(0==n.length)return!1;var i=n[0];return n[1]==function(t){return ct.crypto.Util.hashString(t,i)}(t)},it.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=rt(e,16);if(r.bitLength()>this.n.bitLength())return 0;var n=Jt(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==t)},it.prototype.verifyPSS=function(t,e,r,n){var i=function(t){return ct.crypto.Util.hashHex(t,r)}(Et(t));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(i,e,r,n)},it.prototype.verifyWithMessageHashPSS=function(t,e,r,n){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,o=new F(e,16),s=function(t){return ct.crypto.Util.hashHex(t,r)},a=Ft(t),u=a.length,c=this.n.bitLength()-1,l=Math.ceil(c/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=l-u-2;else if(n<-2)throw new Error("invalid salt length");if(l>8*l-c&255;if(0!=(f.charCodeAt(0)&p))throw new Error("bits beyond keysize not zero");var g=Kt(d,f.length,s),m=[];for(i=0;i0&&-1==(":"+n.join(":")+":").indexOf(":"+m+":"))throw"algorithm '"+m+"' not accepted in the list";if("none"!=m&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Ht.getKey(e)),!("RS"!=v&&"PS"!=v||e instanceof i))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==v&&!(e instanceof c))throw"key shall be a ECDSA obj for ES* algs";var y=null;if(void 0===s.jwsalg2sigalg[g.alg])throw"unsupported alg name: "+m;if("none"==(y=s.jwsalg2sigalg[m]))throw"not supported";if("Hmac"==y.substr(0,4)){if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var _=new l({alg:y,pass:e});return _.updateString(d),p==_.doFinal()}if(-1!=y.indexOf("withECDSA")){var b,w=null;try{w=c.concatSigToASN1Sig(p)}catch(t){return!1}return(b=new h({alg:y})).init(e),b.updateString(d),b.verify(w)}return(b=new h({alg:y})).init(e),b.updateString(d),b.verify(p)},ct.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=ct.jws.JWS.readSafeJSONString(ht(e)),o.payloadObj=ct.jws.JWS.readSafeJSONString(ht(r)),o.headerPP=JSON.stringify(o.headerObj,null," "),null==o.payloadObj?o.payloadPP=ht(r):o.payloadPP=JSON.stringify(o.payloadObj,null," "),void 0!==n&&(o.sigHex=bt(n)),o},ct.jws.JWS.verifyJWT=function(t,e,n){var i=ct.jws,o=i.JWS,s=o.readSafeJSONString,a=o.inArray,u=o.includedArray,c=t.split("."),l=c[0],h=c[1],f=(bt(c[2]),s(ht(l))),d=s(ht(h));if(void 0===f.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!a(f.alg,n.alg))return!1;if(void 0!==d.iss&&"object"===r(n.iss)&&!a(d.iss,n.iss))return!1;if(void 0!==d.sub&&"object"===r(n.sub)&&!a(d.sub,n.sub))return!1;if(void 0!==d.aud&&"object"===r(n.aud))if("string"==typeof d.aud){if(!a(d.aud,n.aud))return!1}else if("object"==r(d.aud)&&!u(d.aud,n.aud))return!1;var p=i.IntDate.getNow();return void 0!==n.verifyAt&&"number"==typeof n.verifyAt&&(p=n.verifyAt),void 0!==n.gracePeriod&&"number"==typeof n.gracePeriod||(n.gracePeriod=0),!(void 0!==d.exp&&"number"==typeof d.exp&&d.exp+n.gracePeriode.length&&(r=e.length);for(var n=0;n * @license MIT */ var n=r(30),i=r(31),o=r(32);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function g(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 P(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(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=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(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 c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;oa&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;fi&&(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>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);for(var r="",n=0;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.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(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;hi)&&(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 _(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return F(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function D(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function M(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 L(t,e,r,n,o){return o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(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},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||O(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):D(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);O(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},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):D(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):D(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.copy=function(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=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=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&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 V(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(29))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,h=a>0?s-4:s;for(r=0;r>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e),1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,u=r-i;au?u:a+s));return 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]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a0)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 l(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<>1,l=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-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,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=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=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):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+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*g}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.jws,r=t.KeyUtil,i=t.X509,o=t.crypto,s=t.hextob64u,a=t.b64tohex,u=t.AllowedSigningAlgs;return function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return t.parseJwt=function t(r){n.Log.debug("JoseUtil.parseJwt");try{var i=e.JWS.parse(r);return{header:i.headerObj,payload:i.payloadObj}}catch(t){n.Log.error(t)}},t.validateJwt=function(e,o,s,u,c,l,h){n.Log.debug("JoseUtil.validateJwt");try{if("RSA"===o.kty)if(o.e&&o.n)o=r.getKey(o);else{if(!o.x5c||!o.x5c.length)return n.Log.error("JoseUtil.validateJwt: RSA key missing key material",o),Promise.reject(new Error("RSA key missing key material"));var f=a(o.x5c[0]);o=i.getPublicKeyFromCertHex(f)}else{if("EC"!==o.kty)return n.Log.error("JoseUtil.validateJwt: Unsupported key type",o&&o.kty),Promise.reject(new Error(o.kty));if(!(o.crv&&o.x&&o.y))return n.Log.error("JoseUtil.validateJwt: EC key missing key material",o),Promise.reject(new Error("EC key missing key material"));o=r.getKey(o)}return t._validateJwt(e,o,s,u,c,l,h)}catch(t){return n.Log.error(t&&t.message||t),Promise.reject("JWT validation failed")}},t.validateJwtAttributes=function(e,r,i,o,s,a){o||(o=0),s||(s=parseInt(Date.now()/1e3));var u=t.parseJwt(e).payload;if(!u.iss)return n.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(u.iss!==r)return n.Log.error("JoseUtil._validateJwt: Invalid issuer in token",u.iss),Promise.reject(new Error("Invalid issuer in token: "+u.iss));if(!u.aud)return n.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(u.aud===i||Array.isArray(u.aud)&&u.aud.indexOf(i)>=0))return n.Log.error("JoseUtil._validateJwt: Invalid audience in token",u.aud),Promise.reject(new Error("Invalid audience in token: "+u.aud));if(u.azp&&u.azp!==i)return n.Log.error("JoseUtil._validateJwt: Invalid azp in token",u.azp),Promise.reject(new Error("Invalid azp in token: "+u.azp));if(!a){var c=s+o,l=s-o;if(!u.iat)return n.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(c1&&void 0!==arguments[1]?arguments[1]:"#";o(this,t);var n=i.UrlUtility.parseUrlFragment(e,r);this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.code=n.code,this.state=n.state,this.id_token=n.id_token,this.session_state=n.session_state,this.access_token=n.access_token,this.token_type=n.token_type,this.scope=n.scope,this.profile=void 0,this.expires_in=n.expires_in}return n(t,[{key:"expires_in",get:function(){if(this.expires_at){var t=parseInt(Date.now()/1e3);return this.expires_at-t}},set:function(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(){var t=this.expires_in;if(void 0!==t)return t<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),t}()},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutRequest=void 0;var n=r(0),i=r(3),o=r(9);e.SignoutRequest=function t(e){var r=e.url,s=e.id_token_hint,a=e.post_logout_redirect_uri,u=e.data,c=e.extraQueryParams,l=e.request_type;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!r)throw n.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var h in s&&(r=i.UrlUtility.addQueryParam(r,"id_token_hint",s)),a&&(r=i.UrlUtility.addQueryParam(r,"post_logout_redirect_uri",a),u&&(this.state=new o.State({data:u,request_type:l}),r=i.UrlUtility.addQueryParam(r,"state",this.state.id))),c)r=i.UrlUtility.addQueryParam(r,h,c[h]);this.url=r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignoutResponse=void 0;var n=r(3);e.SignoutResponse=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var r=n.UrlUtility.parseUrlFragment(e,"?");this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.state=r.state}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryWebStorage=void 0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.SilentRenewService,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.SessionMonitor,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:f.TokenRevocationClient,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:d.TokenClient,v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:p.JoseUtil;g(this,e),r instanceof s.UserManagerSettings||(r=new s.UserManagerSettings(r));var y=m(this,t.call(this,r));return y._events=new u.UserManagerEvents(r),y._silentRenewService=new n(y),y.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),y.startSilentRenew()),y.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),y._sessionMonitor=new o(y)),y._tokenRevocationClient=new a(y._settings),y._tokenClient=new h(y._settings),y._joseUtil=v,y}return function(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)}(e,t),e.prototype.getUser=function(){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)}))},e.prototype.removeUser=function(){var t=this;return this.storeUser(null).then((function(){i.Log.info("UserManager.removeUser: user removed from storage"),t._events.unload()}))},e.prototype.signinRedirect=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:r";var e={useReplaceToNavigate:t.useReplaceToNavigate};return this._signinStart(t,this._redirectNavigator,e).then((function(){i.Log.info("UserManager.signinRedirect: successful")}))},e.prototype.signinRedirectCallback=function(t){return this._signinEnd(t||this._redirectNavigator.url).then((function(t){return 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}))},e.prototype.signinPopup=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:p";var 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")))},e.prototype.signinPopupCallback=function(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(t.message)}))},e.prototype.signinSilent=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=Object.assign({},e),this._loadUser().then((function(r){return r&&r.refresh_token?(e.refresh_token=r.refresh_token,t._useRefreshToken(e)):(e.request_type="si:s",e.id_token_hint=e.id_token_hint||t.settings.includeIdTokenInSilentRenew&&r&&r.id_token,r&&t._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",r.profile.sub),e.current_sub=r.profile.sub),t._signinSilentIframe(e))}))},e.prototype._useRefreshToken=function(){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.id_token=e.id_token||r.id_token,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"))}))},e.prototype._validateIdTokenFromTokenRefreshToken=function(t,e){var r=this;return this._metadataService.getIssuer().then((function(n){return r.settings.getEpochTime().then((function(o){return r._joseUtil.validateJwtAttributes(e,n,r._settings.client_id,r._settings.clockSkew,o).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")))}))}))}))},e.prototype._signinSilentIframe=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.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")))},e.prototype.signinSilentCallback=function(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}))},e.prototype.signinCallback=function(t){var e=this;return this.readSigninResponseState(t).then((function(r){var n=r.state;return r.response,"si:r"===n.request_type?e.signinRedirectCallback(t):"si:p"===n.request_type?e.signinPopupCallback(t):"si:s"===n.request_type?e.signinSilentCallback(t):Promise.reject(new Error("invalid response_type in state"))}))},e.prototype.signoutCallback=function(t,e){var r=this;return this.readSignoutResponseState(t).then((function(n){var i=n.state,o=n.response;return i?"so:r"===i.request_type?r.signoutRedirectCallback(t):"so:p"===i.request_type?r.signoutPopupCallback(t,e):Promise.reject(new Error("invalid response_type in state")):o}))},e.prototype.querySessionStatus=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:s";var r=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.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=e.scope||"openid",e.skipUserInfo=!0,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")})).catch((function(e){if(e.session_state&&t.settings.monitorAnonymousSession&&("login_required"==e.message||"consent_required"==e.message||"interaction_required"==e.message||"account_selection_required"==e.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:e.session_state};throw e}))}))):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},e.prototype._signin=function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(t,e,n).then((function(e){return r._signinEnd(e.url,t)}))},e.prototype._signinStart=function(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}))}))},e.prototype._signinEnd=function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(t).then((function(t){i.Log.debug("UserManager._signinEnd: got signin response");var n=new a.User(t);if(r.current_sub){if(r.current_sub!==n.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",n.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return e.storeUser(n).then((function(){return i.Log.debug("UserManager._signinEnd: user stored"),e._events.load(n),n}))}))},e.prototype._signinCallback=function(t,e){i.Log.debug("UserManager._signinCallback");var r="query"===this._settings.response_mode||!this._settings.response_mode&&h.SigninRequest.isCode(this._settings.response_type)?"?":"#";return e.callback(t,void 0,r)},e.prototype.signoutRedirect=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:r";var e=t.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;e&&(t.post_logout_redirect_uri=e);var r={useReplaceToNavigate:t.useReplaceToNavigate};return this._signoutStart(t,this._redirectNavigator,r).then((function(){i.Log.info("UserManager.signoutRedirect: successful")}))},e.prototype.signoutRedirectCallback=function(t){return this._signoutEnd(t||this._redirectNavigator.url).then((function(t){return i.Log.info("UserManager.signoutRedirectCallback: successful"),t}))},e.prototype.signoutPopup=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="so:p";var 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")}))},e.prototype.signoutPopupCallback=function(t,e){return void 0===e&&"boolean"==typeof t&&(e=t,t=null),this._popupNavigator.callback(t,e,"?").then((function(){i.Log.info("UserManager.signoutPopupCallback: successful")}))},e.prototype._signout=function(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)}))},e.prototype._signoutStart=function(){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}))}))},e.prototype._signoutEnd=function(t){return this.processSignoutResponse(t).then((function(t){return i.Log.debug("UserManager._signoutEnd: got signout response"),t}))},e.prototype.revokeAccessToken=function(){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")}))},e.prototype._revokeInternal=function(t,e){var r=this;if(t){var n=t.access_token,o=t.refresh_token;return this._revokeAccessTokenInternal(n,e).then((function(t){return r._revokeRefreshTokenInternal(o,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)},e.prototype._revokeAccessTokenInternal=function(t,e){return!t||t.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(t,e).then((function(){return!0}))},e.prototype._revokeRefreshTokenInternal=function(t,e){return t?this._tokenRevocationClient.revoke(t,e,"refresh_token").then((function(){return!0})):Promise.resolve(!1)},e.prototype.startSilentRenew=function(){this._silentRenewService.start()},e.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},e.prototype._loadUser=function(){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)}))},e.prototype.storeUser=function(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(e,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),e}(o.OidcClient)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserManagerSettings=void 0;var n=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=r.popup_redirect_uri,i=r.popup_post_logout_redirect_uri,d=r.popupWindowFeatures,p=r.popupWindowTarget,g=r.silent_redirect_uri,m=r.silentRequestTimeout,v=r.automaticSilentRenew,y=void 0!==v&&v,_=r.validateSubOnSilentRenew,b=void 0!==_&&_,w=r.includeIdTokenInSilentRenew,S=void 0===w||w,F=r.monitorSession,E=void 0===F||F,x=r.monitorAnonymousSession,k=void 0!==x&&x,A=r.checkSessionInterval,T=void 0===A?2e3:A,C=r.stopCheckSessionOnError,P=void 0===C||C,R=r.query_status_response_type,I=r.revokeAccessTokenOnSignout,O=void 0!==I&&I,N=r.accessTokenExpiringNotificationTime,D=void 0===N?60:N,M=r.redirectNavigator,L=void 0===M?new o.RedirectNavigator:M,U=r.popupNavigator,j=void 0===U?new s.PopupNavigator:U,B=r.iframeNavigator,H=void 0===B?new a.IFrameNavigator:B,V=r.userStore,q=void 0===V?new u.WebStorageStateStore({store:c.Global.sessionStorage}):V;h(this,e);var K=f(this,t.call(this,arguments[0]));return K._popup_redirect_uri=n,K._popup_post_logout_redirect_uri=i,K._popupWindowFeatures=d,K._popupWindowTarget=p,K._silent_redirect_uri=g,K._silentRequestTimeout=m,K._automaticSilentRenew=y,K._validateSubOnSilentRenew=b,K._includeIdTokenInSilentRenew=S,K._accessTokenExpiringNotificationTime=D,K._monitorSession=E,K._monitorAnonymousSession=k,K._checkSessionInterval=T,K._stopCheckSessionOnError=P,R?K._query_status_response_type=R:arguments[0]&&arguments[0].response_type?K._query_status_response_type=l.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":K._query_status_response_type="id_token",K._revokeAccessTokenOnSignout=O,K._redirectNavigator=L,K._popupNavigator=j,K._iframeNavigator=H,K._userStore=q,K}return function(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)}(e,t),n(e,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),e}(i.OidcClientSettings)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RedirectNavigator=void 0;var n=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1];n.Log.debug("UserManagerEvents.load"),t.prototype.load.call(this,e),r&&this._userLoaded.raise(e)},e.prototype.unload=function(){n.Log.debug("UserManagerEvents.unload"),t.prototype.unload.call(this),this._userUnloaded.raise()},e.prototype.addUserLoaded=function(t){this._userLoaded.addHandler(t)},e.prototype.removeUserLoaded=function(t){this._userLoaded.removeHandler(t)},e.prototype.addUserUnloaded=function(t){this._userUnloaded.addHandler(t)},e.prototype.removeUserUnloaded=function(t){this._userUnloaded.removeHandler(t)},e.prototype.addSilentRenewError=function(t){this._silentRenewError.addHandler(t)},e.prototype.removeSilentRenewError=function(t){this._silentRenewError.removeHandler(t)},e.prototype._raiseSilentRenewError=function(t){n.Log.debug("UserManagerEvents._raiseSilentRenewError",t.message),this._silentRenewError.raise(t)},e.prototype.addUserSignedIn=function(t){this._userSignedIn.addHandler(t)},e.prototype.removeUserSignedIn=function(t){this._userSignedIn.removeHandler(t)},e.prototype._raiseUserSignedIn=function(){n.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},e.prototype.addUserSignedOut=function(t){this._userSignedOut.addHandler(t)},e.prototype.removeUserSignedOut=function(t){this._userSignedOut.removeHandler(t)},e.prototype._raiseUserSignedOut=function(){n.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},e.prototype.addUserSessionChanged=function(t){this._userSessionChanged.addHandler(t)},e.prototype.removeUserSessionChanged=function(t){this._userSessionChanged.removeHandler(t)},e.prototype._raiseUserSessionChanged=function(){n.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},e}(i.AccessTokenEvents)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timer=void 0;var n=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:o.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;a(this,e);var s=u(this,t.call(this,r));return s._timer=n,s._nowFunc=i||function(){return Date.now()/1e3},s}return function(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)}(e,t),e.prototype.init=function(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{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r}},678:function(t,e,r){"use strict";r.d(e,{PO:function(){return J},p7:function(){return ee}});r(1703);var n=r(3396),i=r(4870); /*! * vue-router v4.0.14 * (c) 2022 Eduardo San Martin Morote * @license MIT */ const o="function"===typeof Symbol&&"symbol"===typeof Symbol.toStringTag,s=t=>o?Symbol(t):"_vr_"+t,a=s("rvlm"),u=s("rvd"),c=s("r"),l=s("rl"),h=s("rvl"),f="undefined"!==typeof window;function d(t){return t.__esModule||o&&"Module"===t[Symbol.toStringTag]}const p=Object.assign;function g(t,e){const r={};for(const n in e){const i=e[n];r[n]=Array.isArray(i)?i.map(t):t(i)}return r}const m=()=>{};const v=/\/$/,y=t=>t.replace(v,"");function _(t,e,r="/"){let n,i={},o="",s="";const a=e.indexOf("?"),u=e.indexOf("#",a>-1?a:0);return a>-1&&(n=e.slice(0,a),o=e.slice(a+1,u>-1?u:e.length),i=t(o)),u>-1&&(n=n||e.slice(0,u),s=e.slice(u,e.length)),n=A(null!=n?n:e,r),{fullPath:n+(o&&"?")+o+s,path:n,query:i,hash:s}}function b(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function w(t,e){return e&&t.toLowerCase().startsWith(e.toLowerCase())?t.slice(e.length)||"/":t}function S(t,e,r){const n=e.matched.length-1,i=r.matched.length-1;return n>-1&&n===i&&F(e.matched[n],r.matched[i])&&E(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function F(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function E(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!x(t[r],e[r]))return!1;return!0}function x(t,e){return Array.isArray(t)?k(t,e):Array.isArray(e)?k(e,t):t===e}function k(t,e){return Array.isArray(e)?t.length===e.length&&t.every(((t,r)=>t===e[r])):1===t.length&&t[0]===e}function A(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/");let i,o,s=r.length-1;for(i=0;i({left:window.pageXOffset,top:window.pageYOffset});function D(t){let e;if("el"in t){const r=t.el,n="string"===typeof r&&r.startsWith("#");0;const i="string"===typeof r?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!i)return;e=O(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(null!=e.left?e.left:window.pageXOffset,null!=e.top?e.top:window.pageYOffset)}function M(t,e){const r=history.state?history.state.position-e:-1;return r+t}const L=new Map;function U(t,e){L.set(t,e)}function j(t){const e=L.get(t);return L.delete(t),e}let B=()=>location.protocol+"//"+location.host;function H(t,e){const{pathname:r,search:n,hash:i}=e,o=t.indexOf("#");if(o>-1){let e=i.includes(t.slice(o))?t.slice(o).length:1,r=i.slice(e);return"/"!==r[0]&&(r="/"+r),w(r,"")}const s=w(r,t);return s+n+i}function V(t,e,r,n){let i=[],o=[],s=null;const a=({state:o})=>{const a=H(t,location),u=r.value,c=e.value;let l=0;if(o){if(r.value=a,e.value=o,s&&s===u)return void(s=null);l=c?o.position-c.position:0}else n(a);i.forEach((t=>{t(r.value,u,{delta:l,type:T.pop,direction:l?l>0?C.forward:C.back:C.unknown})}))};function u(){s=r.value}function c(t){i.push(t);const e=()=>{const e=i.indexOf(t);e>-1&&i.splice(e,1)};return o.push(e),e}function l(){const{history:t}=window;t.state&&t.replaceState(p({},t.state,{scroll:N()}),"")}function h(){for(const t of o)t();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",l)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",l),{pauseListeners:u,listen:c,destroy:h}}function q(t,e,r,n=!1,i=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:i?N():null}}function K(t){const{history:e,location:r}=window,n={value:H(t,r)},i={value:e.state};function o(n,o,s){const a=t.indexOf("#"),u=a>-1?(r.host&&document.querySelector("base")?t:t.slice(a))+n:B()+t+n;try{e[s?"replaceState":"pushState"](o,"",u),i.value=o}catch(c){console.error(c),r[s?"replace":"assign"](u)}}function s(t,r){const s=p({},e.state,q(i.value.back,t,i.value.forward,!0),r,{position:i.value.position});o(t,s,!0),n.value=t}function a(t,r){const s=p({},i.value,e.state,{forward:t,scroll:N()});o(s.current,s,!0);const a=p({},q(n.value,t,null),{position:s.position+1},r);o(t,a,!1),n.value=t}return i.value||o(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0),{location:n,state:i,push:a,replace:s}}function J(t){t=P(t);const e=K(t),r=V(t,e.state,e.location,e.replace);function n(t,e=!0){e||r.pauseListeners(),history.go(t)}const i=p({location:"",base:t,go:n,createHref:I.bind(null,t)},e,r);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function W(t){return"string"===typeof t||t&&"object"===typeof t}function z(t){return"string"===typeof t||"symbol"===typeof t}const $={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Y=s("nf");var Z;(function(t){t[t["aborted"]=4]="aborted",t[t["cancelled"]=8]="cancelled",t[t["duplicated"]=16]="duplicated"})(Z||(Z={}));function G(t,e){return p(new Error,{type:t,[Y]:!0},e)}function X(t,e){return t instanceof Error&&Y in t&&(null==e||!!(t.type&e))}const Q="[^/]+?",tt={sensitive:!1,strict:!1,start:!0,end:!0},et=/[.+*?^${}()[\]/\\]/g;function rt(t,e){const r=p({},tt,e),n=[];let i=r.start?"^":"";const o=[];for(const l of t){const t=l.length?[]:[90];r.strict&&!l.length&&(i+="/");for(let e=0;ee.length?1===e.length&&80===e[0]?1:-1:0}function it(t,e){let r=0;const n=t.score,i=e.score;while(r1&&("*"===a||"+"===a)&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:l,repeatable:"*"===a||"+"===a,optional:"*"===a||"?"===a})):e("Invalid state to consume buffer"),c="")}function f(){c+=a}while(u{s(f)}:m}function s(t){if(z(t)){const e=n.get(t);e&&(n.delete(t),r.splice(r.indexOf(e),1),e.children.forEach(s),e.alias.forEach(s))}else{const e=r.indexOf(t);e>-1&&(r.splice(e,1),t.record.name&&n.delete(t.record.name),t.children.forEach(s),t.alias.forEach(s))}}function a(){return r}function u(t){let e=0;while(e=0&&(t.record.path!==r[e].record.path||!mt(t,r[e])))e++;r.splice(e,0,t),t.record.name&&!dt(t)&&n.set(t.record.name,t)}function c(t,e){let i,o,s,a={};if("name"in t&&t.name){if(i=n.get(t.name),!i)throw G(1,{location:t});s=i.record.name,a=p(lt(e.params,i.keys.filter((t=>!t.optional)).map((t=>t.name))),t.params),o=i.stringify(a)}else if("path"in t)o=t.path,i=r.find((t=>t.re.test(o))),i&&(a=i.parse(o),s=i.record.name);else{if(i=e.name?n.get(e.name):r.find((t=>t.re.test(e.path))),!i)throw G(1,{location:t,currentLocation:e});s=i.record.name,a=p({},e.params,t.params),o=i.stringify(a)}const u=[];let c=i;while(c)u.unshift(c.record),c=c.parent;return{name:s,path:o,params:a,matched:u,meta:pt(u)}}return e=gt({strict:!1,end:!0,sensitive:!1},e),t.forEach((t=>o(t))),{addRoute:o,resolve:c,removeRoute:s,getRoutes:a,getRecordMatcher:i}}function lt(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function ht(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:ft(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||{}:{default:t.component}}}function ft(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]="boolean"===typeof r?r:r[n];return e}function dt(t){while(t){if(t.record.aliasOf)return!0;t=t.parent}return!1}function pt(t){return t.reduce(((t,e)=>p(t,e.meta)),{})}function gt(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function mt(t,e){return e.children.some((e=>e===t||mt(t,e)))}const vt=/#/g,yt=/&/g,_t=/\//g,bt=/=/g,wt=/\?/g,St=/\+/g,Ft=/%5B/g,Et=/%5D/g,xt=/%5E/g,kt=/%60/g,At=/%7B/g,Tt=/%7C/g,Ct=/%7D/g,Pt=/%20/g;function Rt(t){return encodeURI(""+t).replace(Tt,"|").replace(Ft,"[").replace(Et,"]")}function It(t){return Rt(t).replace(At,"{").replace(Ct,"}").replace(xt,"^")}function Ot(t){return Rt(t).replace(St,"%2B").replace(Pt,"+").replace(vt,"%23").replace(yt,"%26").replace(kt,"`").replace(At,"{").replace(Ct,"}").replace(xt,"^")}function Nt(t){return Ot(t).replace(bt,"%3D")}function Dt(t){return Rt(t).replace(vt,"%23").replace(wt,"%3F")}function Mt(t){return null==t?"":Dt(t).replace(_t,"%2F")}function Lt(t){try{return decodeURIComponent(""+t)}catch(e){}return""+t}function Ut(t){const e={};if(""===t||"?"===t)return e;const r="?"===t[0],n=(r?t.slice(1):t).split("&");for(let i=0;it&&Ot(t))):[n&&Ot(n)];i.forEach((t=>{void 0!==t&&(e+=(e.length?"&":"")+r,null!=t&&(e+="="+t))}))}return e}function Bt(t){const e={};for(const r in t){const n=t[r];void 0!==n&&(e[r]=Array.isArray(n)?n.map((t=>null==t?null:""+t)):null==n?n:""+n)}return e}function Ht(){let t=[];function e(e){return t.push(e),()=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)}}function r(){t=[]}return{add:e,list:()=>t,reset:r}}function Vt(t,e,r,n,i){const o=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise(((s,a)=>{const u=t=>{!1===t?a(G(4,{from:r,to:e})):t instanceof Error?a(t):W(t)?a(G(2,{from:e,to:t})):(o&&n.enterCallbacks[i]===o&&"function"===typeof t&&o.push(t),s())},c=t.call(n&&n.instances[i],e,r,u);let l=Promise.resolve(c);t.length<3&&(l=l.then(u)),l.catch((t=>a(t)))}))}function qt(t,e,r,n){const i=[];for(const o of t)for(const t in o.components){let s=o.components[t];if("beforeRouteEnter"===e||o.instances[t])if(Kt(s)){const a=s.__vccOpts||s,u=a[e];u&&i.push(Vt(u,r,n,o,t))}else{let a=s();0,i.push((()=>a.then((i=>{if(!i)return Promise.reject(new Error(`Couldn't resolve component "${t}" at "${o.path}"`));const s=d(i)?i.default:i;o.components[t]=s;const a=s.__vccOpts||s,u=a[e];return u&&Vt(u,r,n,o,t)()}))))}}return i}function Kt(t){return"object"===typeof t||"displayName"in t||"props"in t||"__vccOpts"in t}function Jt(t){const e=(0,n.f3)(c),r=(0,n.f3)(l),o=(0,i.Fl)((()=>e.resolve((0,i.SU)(t.to)))),s=(0,i.Fl)((()=>{const{matched:t}=o.value,{length:e}=t,n=t[e-1],i=r.matched;if(!n||!i.length)return-1;const s=i.findIndex(F.bind(null,n));if(s>-1)return s;const a=Zt(t[e-2]);return e>1&&Zt(n)===a&&i[i.length-1].path!==a?i.findIndex(F.bind(null,t[e-2])):s})),a=(0,i.Fl)((()=>s.value>-1&&Yt(r.params,o.value.params))),u=(0,i.Fl)((()=>s.value>-1&&s.value===r.matched.length-1&&E(r.params,o.value.params)));function h(r={}){return $t(r)?e[(0,i.SU)(t.replace)?"replace":"push"]((0,i.SU)(t.to)).catch(m):Promise.resolve()}return{route:o,href:(0,i.Fl)((()=>o.value.href)),isActive:a,isExactActive:u,navigate:h}}const Wt=(0,n.aZ)({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Jt,setup(t,{slots:e}){const r=(0,i.qj)(Jt(t)),{options:o}=(0,n.f3)(c),s=(0,i.Fl)((()=>({[Gt(t.activeClass,o.linkActiveClass,"router-link-active")]:r.isActive,[Gt(t.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive})));return()=>{const i=e.default&&e.default(r);return t.custom?i:(0,n.h)("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:s.value},i)}}}),zt=Wt;function $t(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(void 0===t.button||0===t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Yt(t,e){for(const r in e){const n=e[r],i=t[r];if("string"===typeof n){if(n!==i)return!1}else if(!Array.isArray(i)||i.length!==n.length||n.some(((t,e)=>t!==i[e])))return!1}return!0}function Zt(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const Gt=(t,e,r)=>null!=t?t:null!=e?e:r,Xt=(0,n.aZ)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(t,{attrs:e,slots:r}){const o=(0,n.f3)(h),s=(0,i.Fl)((()=>t.route||o.value)),c=(0,n.f3)(u,0),l=(0,i.Fl)((()=>s.value.matched[c]));(0,n.JJ)(u,c+1),(0,n.JJ)(a,l),(0,n.JJ)(h,s);const f=(0,i.iH)();return(0,n.YP)((()=>[f.value,l.value,t.name]),(([t,e,r],[n,i,o])=>{e&&(e.instances[r]=t,i&&i!==e&&t&&t===n&&(e.leaveGuards.size||(e.leaveGuards=i.leaveGuards),e.updateGuards.size||(e.updateGuards=i.updateGuards))),!t||!e||i&&F(e,i)&&n||(e.enterCallbacks[r]||[]).forEach((e=>e(t)))}),{flush:"post"}),()=>{const i=s.value,o=l.value,a=o&&o.components[t.name],u=t.name;if(!a)return Qt(r.default,{Component:a,route:i});const c=o.props[t.name],h=c?!0===c?i.params:"function"===typeof c?c(i):c:null,d=t=>{t.component.isUnmounted&&(o.instances[u]=null)},g=(0,n.h)(a,p({},h,e,{onVnodeUnmounted:d,ref:f}));return Qt(r.default,{Component:g,route:i})||g}}});function Qt(t,e){if(!t)return null;const r=t(e);return 1===r.length?r[0]:r}const te=Xt;function ee(t){const e=ct(t.routes,t),r=t.parseQuery||Ut,o=t.stringifyQuery||jt,s=t.history;const a=Ht(),u=Ht(),d=Ht(),v=(0,i.XI)($);let y=$;f&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const w=g.bind(null,(t=>""+t)),F=g.bind(null,Mt),E=g.bind(null,Lt);function x(t,r){let n,i;return z(t)?(n=e.getRecordMatcher(t),i=r):i=t,e.addRoute(i,n)}function k(t){const r=e.getRecordMatcher(t);r&&e.removeRoute(r)}function A(){return e.getRoutes().map((t=>t.record))}function C(t){return!!e.getRecordMatcher(t)}function P(t,n){if(n=p({},n||v.value),"string"===typeof t){const i=_(r,t,n.path),o=e.resolve({path:i.path},n),a=s.createHref(i.fullPath);return p(i,o,{params:E(o.params),hash:Lt(i.hash),redirectedFrom:void 0,href:a})}let i;if("path"in t)i=p({},t,{path:_(r,t.path,n.path).path});else{const e=p({},t.params);for(const t in e)null==e[t]&&delete e[t];i=p({},t,{params:F(t.params)}),n.params=F(n.params)}const a=e.resolve(i,n),u=t.hash||"";a.params=w(E(a.params));const c=b(o,p({},t,{hash:It(u),path:a.path})),l=s.createHref(c);return p({fullPath:c,hash:u,query:o===jt?Bt(t.query):t.query||{}},a,{redirectedFrom:void 0,href:l})}function R(t){return"string"===typeof t?_(r,t,v.value.path):p({},t)}function I(t,e){if(y!==t)return G(8,{from:e,to:t})}function O(t){return H(t)}function L(t){return O(p(R(t),{replace:!0}))}function B(t){const e=t.matched[t.matched.length-1];if(e&&e.redirect){const{redirect:r}=e;let n="function"===typeof r?r(t):r;return"string"===typeof n&&(n=n.includes("?")||n.includes("#")?n=R(n):{path:n},n.params={}),p({query:t.query,hash:t.hash,params:t.params},n)}}function H(t,e){const r=y=P(t),n=v.value,i=t.state,s=t.force,a=!0===t.replace,u=B(r);if(u)return H(p(R(u),{state:i,force:s,replace:a}),e||r);const c=r;let l;return c.redirectedFrom=e,!s&&S(o,n,r)&&(l=G(16,{to:c,from:n}),it(n,n,!0,!1)),(l?Promise.resolve(l):q(c,n)).catch((t=>X(t)?X(t,2)?t:nt(t):et(t,c,n))).then((t=>{if(t){if(X(t,2))return H(p(R(t.to),{state:i,force:s,replace:a}),e||c)}else t=J(c,n,!0,a,i);return K(c,n,t),t}))}function V(t,e){const r=I(t,e);return r?Promise.reject(r):Promise.resolve()}function q(t,e){let r;const[n,i,o]=ne(t,e);r=qt(n.reverse(),"beforeRouteLeave",t,e);for(const a of n)a.leaveGuards.forEach((n=>{r.push(Vt(n,t,e))}));const s=V.bind(null,t,e);return r.push(s),re(r).then((()=>{r=[];for(const n of a.list())r.push(Vt(n,t,e));return r.push(s),re(r)})).then((()=>{r=qt(i,"beforeRouteUpdate",t,e);for(const n of i)n.updateGuards.forEach((n=>{r.push(Vt(n,t,e))}));return r.push(s),re(r)})).then((()=>{r=[];for(const n of t.matched)if(n.beforeEnter&&!e.matched.includes(n))if(Array.isArray(n.beforeEnter))for(const i of n.beforeEnter)r.push(Vt(i,t,e));else r.push(Vt(n.beforeEnter,t,e));return r.push(s),re(r)})).then((()=>(t.matched.forEach((t=>t.enterCallbacks={})),r=qt(o,"beforeRouteEnter",t,e),r.push(s),re(r)))).then((()=>{r=[];for(const n of u.list())r.push(Vt(n,t,e));return r.push(s),re(r)})).catch((t=>X(t,8)?t:Promise.reject(t)))}function K(t,e,r){for(const n of d.list())n(t,e,r)}function J(t,e,r,n,i){const o=I(t,e);if(o)return o;const a=e===$,u=f?history.state:{};r&&(n||a?s.replace(t.fullPath,p({scroll:a&&u&&u.scroll},i)):s.push(t.fullPath,i)),v.value=t,it(t,e,r,a),nt()}let W;function Y(){W=s.listen(((t,e,r)=>{const n=P(t),i=B(n);if(i)return void H(p(i,{replace:!0}),n).catch(m);y=n;const o=v.value;f&&U(M(o.fullPath,r.delta),N()),q(n,o).catch((t=>X(t,12)?t:X(t,2)?(H(t.to,n).then((t=>{X(t,20)&&!r.delta&&r.type===T.pop&&s.go(-1,!1)})).catch(m),Promise.reject()):(r.delta&&s.go(-r.delta,!1),et(t,n,o)))).then((t=>{t=t||J(n,o,!1),t&&(r.delta?s.go(-r.delta,!1):r.type===T.pop&&X(t,20)&&s.go(-1,!1)),K(n,o,t)})).catch(m)}))}let Z,Q=Ht(),tt=Ht();function et(t,e,r){nt(t);const n=tt.list();return n.length?n.forEach((n=>n(t,e,r))):console.error(t),Promise.reject(t)}function rt(){return Z&&v.value!==$?Promise.resolve():new Promise(((t,e)=>{Q.add([t,e])}))}function nt(t){return Z||(Z=!t,Y(),Q.list().forEach((([e,r])=>t?r(t):e())),Q.reset()),t}function it(e,r,i,o){const{scrollBehavior:s}=t;if(!f||!s)return Promise.resolve();const a=!i&&j(M(e.fullPath,0))||(o||!i)&&history.state&&history.state.scroll||null;return(0,n.Y3)().then((()=>s(e,r,a))).then((t=>t&&D(t))).catch((t=>et(t,e,r)))}const ot=t=>s.go(t);let st;const at=new Set,ut={currentRoute:v,addRoute:x,removeRoute:k,hasRoute:C,getRoutes:A,resolve:P,options:t,push:O,replace:L,go:ot,back:()=>ot(-1),forward:()=>ot(1),beforeEach:a.add,beforeResolve:u.add,afterEach:d.add,onError:tt.add,isReady:rt,install(t){const e=this;t.component("RouterLink",zt),t.component("RouterView",te),t.config.globalProperties.$router=e,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,i.SU)(v)}),f&&!st&&v.value===$&&(st=!0,O(s.location).catch((t=>{0})));const r={};for(const o in $)r[o]=(0,i.Fl)((()=>v.value[o]));t.provide(c,e),t.provide(l,(0,i.qj)(r)),t.provide(h,v);const n=t.unmount;at.add(t),t.unmount=function(){at.delete(t),at.size<1&&(y=$,W&&W(),v.value=$,st=!1,Z=!1),n()}}};return ut}function re(t){return t.reduce(((t,e)=>t.then((()=>e()))),Promise.resolve())}function ne(t,e){const r=[],n=[],i=[],o=Math.max(e.matched.length,t.matched.length);for(let s=0;sF(t,o)))?n.push(o):r.push(o));const a=t.matched[s];a&&(e.matched.find((t=>F(t,a)))||i.push(a))}return[r,n,i]}},8335:function(t,e,r){"use strict";r.d(e,{ou:function(){return ei}});r(1703);class n extends Error{}class i extends n{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class o extends n{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class s extends n{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class a extends n{}class u extends n{constructor(t){super(`Invalid unit ${t}`)}}class c extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const h="numeric",f="short",d="long",p={year:h,month:h,day:h},g={year:h,month:f,day:h},m={year:h,month:f,day:h,weekday:f},v={year:h,month:d,day:h},y={year:h,month:d,day:h,weekday:d},_={hour:h,minute:h},b={hour:h,minute:h,second:h},w={hour:h,minute:h,second:h,timeZoneName:f},S={hour:h,minute:h,second:h,timeZoneName:d},F={hour:h,minute:h,hourCycle:"h23"},E={hour:h,minute:h,second:h,hourCycle:"h23"},x={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:f},k={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},A={year:h,month:h,day:h,hour:h,minute:h},T={year:h,month:h,day:h,hour:h,minute:h,second:h},C={year:h,month:f,day:h,hour:h,minute:h},P={year:h,month:f,day:h,hour:h,minute:h,second:h},R={year:h,month:f,day:h,weekday:f,hour:h,minute:h},I={year:h,month:d,day:h,hour:h,minute:h,timeZoneName:f},O={year:h,month:d,day:h,hour:h,minute:h,second:h,timeZoneName:f},N={year:h,month:d,day:h,weekday:d,hour:h,minute:h,timeZoneName:d},D={year:h,month:d,day:h,weekday:d,hour:h,minute:h,second:h,timeZoneName:d};class M{get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(t,e){throw new l}formatOffset(t,e){throw new l}offset(t){throw new l}equals(t){throw new l}get isValid(){throw new l}}let L=null;class U extends M{static get instance(){return null===L&&(L=new U),L}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:e,locale:r}){return zt(t,e,r)}formatOffset(t,e){return Gt(this.offset(t),e)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return"system"===t.type}get isValid(){return!0}}let j={};function B(t){return j[t]||(j[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),j[t]}const H={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function V(t,e){const r=t.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,i,o,s,a,u,c,l]=n;return[s,i,o,a,u,c,l]}function q(t,e){const r=t.formatToParts(e),n=[];for(let i=0;i=0?d:1e3+d,(h-f)/6e4}equals(t){return"iana"===t.type&&t.name===this.name}get isValid(){return this.valid}}let W={};function z(t,e={}){const r=JSON.stringify([t,e]);let n=W[r];return n||(n=new Intl.ListFormat(t,e),W[r]=n),n}let $={};function Y(t,e={}){const r=JSON.stringify([t,e]);let n=$[r];return n||(n=new Intl.DateTimeFormat(t,e),$[r]=n),n}let Z={};function G(t,e={}){const r=JSON.stringify([t,e]);let n=Z[r];return n||(n=new Intl.NumberFormat(t,e),Z[r]=n),n}let X={};function Q(t,e={}){const{base:r,...n}=e,i=JSON.stringify([t,n]);let o=X[i];return o||(o=new Intl.RelativeTimeFormat(t,e),X[i]=o),o}let tt=null;function et(){return tt||(tt=(new Intl.DateTimeFormat).resolvedOptions().locale,tt)}function rt(t){const e=t.indexOf("-x-");-1!==e&&(t=t.substring(0,e));const r=t.indexOf("-u-");if(-1===r)return[t];{let e,i;try{e=Y(t).resolvedOptions(),i=t}catch(n){const o=t.substring(0,r);e=Y(o).resolvedOptions(),i=o}const{numberingSystem:o,calendar:s}=e;return[i,o,s]}}function nt(t,e,r){return r||e?(t.includes("-u-")||(t+="-u"),r&&(t+=`-ca-${r}`),e&&(t+=`-nu-${e}`),t):t}function it(t){const e=[];for(let r=1;r<=12;r++){const n=ei.utc(2016,r,1);e.push(t(n))}return e}function ot(t){const e=[];for(let r=1;r<=7;r++){const n=ei.utc(2016,11,13+r);e.push(t(n))}return e}function st(t,e,r,n,i){const o=t.listingMode(r);return"error"===o?null:"en"===o?n(e):i(e)}function at(t){return(!t.numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)}class ut{constructor(t,e,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:n,floor:i,...o}=r;if(!e||Object.keys(o).length>0){const e={useGrouping:!1,...r};r.padTo>0&&(e.minimumIntegerDigits=r.padTo),this.inf=G(t,e)}}format(t){if(this.inf){const e=this.floor?Math.floor(t):t;return this.inf.format(e)}{const e=this.floor?Math.floor(t):Bt(t,3);return Mt(e,this.padTo)}}}class ct{constructor(t,e,r){let n;if(this.opts=r,t.zone.isUniversal){const e=t.offset/60*-1,i=e>=0?`Etc/GMT+${e}`:`Etc/GMT${e}`;0!==t.offset&&J.create(i).valid?(n=i,this.dt=t):(n="UTC",r.timeZoneName?this.dt=t:this.dt=0===t.offset?t:ei.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,n=t.zone.name);const i={...this.opts};i.timeZone=i.timeZone||n,this.dtf=Y(e,i)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class lt{constructor(t,e,r){this.opts={style:"long",...r},!e&&Ct()&&(this.rtf=Q(t,r))}format(t,e){return this.rtf?this.rtf.format(t,e):me(e,t,this.opts.numeric,"long"!==this.opts.style)}formatToParts(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]}}class ht{static fromOpts(t){return ht.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,e,r,n=!1){const i=t||Ft.defaultLocale,o=i||(n?"en-US":et()),s=e||Ft.defaultNumberingSystem,a=r||Ft.defaultOutputCalendar;return new ht(o,s,a,i)}static resetCache(){tt=null,$={},Z={},X={}}static fromObject({locale:t,numberingSystem:e,outputCalendar:r}={}){return ht.create(t,e,r)}constructor(t,e,r,n){const[i,o,s]=rt(t);this.locale=i,this.numberingSystem=e||o||null,this.outputCalendar=r||s||null,this.intl=nt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){return null==this.fastNumbersCached&&(this.fastNumbersCached=at(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),e=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return t&&e?"en":"intl"}clone(t){return t&&0!==Object.getOwnPropertyNames(t).length?ht.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1):this}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,e=!1,r=!0){return st(this,t,r,re,(()=>{const r=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=it((t=>this.extract(t,r,"month")))),this.monthsCache[n][t]}))}weekdays(t,e=!1,r=!0){return st(this,t,r,se,(()=>{const r=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=ot((t=>this.extract(t,r,"weekday")))),this.weekdaysCache[n][t]}))}meridiems(t=!0){return st(this,void 0,t,(()=>ae),(()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ei.utc(2016,11,13,9),ei.utc(2016,11,13,19)].map((e=>this.extract(e,t,"dayperiod")))}return this.meridiemCache}))}eras(t,e=!0){return st(this,t,e,he,(()=>{const e={era:t};return this.eraCache[t]||(this.eraCache[t]=[ei.utc(-40,1,1),ei.utc(2017,1,1)].map((t=>this.extract(t,e,"era")))),this.eraCache[t]}))}extract(t,e,r){const n=this.dtFormatter(t,e),i=n.formatToParts(),o=i.find((t=>t.type.toLowerCase()===r));return o?o.value:null}numberFormatter(t={}){return new ut(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,e={}){return new ct(t,this.intl,e)}relFormatter(t={}){return new lt(this.intl,this.isEnglish(),t)}listFormatter(t={}){return z(this.intl,t)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let ft=null;class dt extends M{static get utcInstance(){return null===ft&&(ft=new dt(0)),ft}static instance(t){return 0===t?dt.utcInstance:new dt(t)}static parseSpecifier(t){if(t){const e=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(e)return new dt($t(e[1],e[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${Gt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${Gt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,e){return Gt(this.fixed,e)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return"fixed"===t.type&&t.fixed===this.fixed}get isValid(){return!0}}class pt extends M{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function gt(t,e){if(Et(t)||null===t)return e;if(t instanceof M)return t;if(At(t)){const r=t.toLowerCase();return"default"===r?e:"local"===r||"system"===r?U.instance:"utc"===r||"gmt"===r?dt.utcInstance:dt.parseSpecifier(r)||J.create(t)}return xt(t)?dt.instance(t):"object"===typeof t&&t.offset&&"number"===typeof t.offset?t:new pt(t)}let mt,vt=()=>Date.now(),yt="system",_t=null,bt=null,wt=null,St=60;class Ft{static get now(){return vt}static set now(t){vt=t}static set defaultZone(t){yt=t}static get defaultZone(){return gt(yt,U.instance)}static get defaultLocale(){return _t}static set defaultLocale(t){_t=t}static get defaultNumberingSystem(){return bt}static set defaultNumberingSystem(t){bt=t}static get defaultOutputCalendar(){return wt}static set defaultOutputCalendar(t){wt=t}static get twoDigitCutoffYear(){return St}static set twoDigitCutoffYear(t){St=t%100}static get throwOnInvalid(){return mt}static set throwOnInvalid(t){mt=t}static resetCaches(){ht.resetCache(),J.resetCache()}}function Et(t){return"undefined"===typeof t}function xt(t){return"number"===typeof t}function kt(t){return"number"===typeof t&&t%1===0}function At(t){return"string"===typeof t}function Tt(t){return"[object Date]"===Object.prototype.toString.call(t)}function Ct(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Pt(t){return Array.isArray(t)?t:[t]}function Rt(t,e,r){if(0!==t.length)return t.reduce(((t,n)=>{const i=[e(n),n];return t&&r(t[0],i[0])===t[0]?t:i}),null)[1]}function It(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function Ot(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Nt(t,e,r){return kt(t)&&t>=e&&t<=r}function Dt(t,e){return t-e*Math.floor(t/e)}function Mt(t,e=2){const r=t<0;let n;return n=r?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0"),n}function Lt(t){return Et(t)||null===t||""===t?void 0:parseInt(t,10)}function Ut(t){return Et(t)||null===t||""===t?void 0:parseFloat(t)}function jt(t){if(!Et(t)&&null!==t&&""!==t){const e=1e3*parseFloat("0."+t);return Math.floor(e)}}function Bt(t,e,r=!1){const n=10**e,i=r?Math.trunc:Math.round;return i(t*n)/n}function Ht(t){return t%4===0&&(t%100!==0||t%400===0)}function Vt(t){return Ht(t)?366:365}function qt(t,e){const r=Dt(e-1,12)+1,n=t+(e-r)/12;return 2===r?Ht(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function Kt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Jt(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,r=t-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===e||3===n?53:52}function Wt(t){return t>99?t:t>Ft.twoDigitCutoffYear?1900+t:2e3+t}function zt(t,e,r,n=null){const i=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);const s={timeZoneName:e,...o},a=new Intl.DateTimeFormat(r,s).formatToParts(i).find((t=>"timezonename"===t.type.toLowerCase()));return a?a.value:null}function $t(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);const n=parseInt(e,10)||0,i=r<0||Object.is(r,-0)?-n:n;return 60*r+i}function Yt(t){const e=Number(t);if("boolean"===typeof t||""===t||Number.isNaN(e))throw new c(`Invalid unit value ${t}`);return e}function Zt(t,e){const r={};for(const n in t)if(Ot(t,n)){const i=t[n];if(void 0===i||null===i)continue;r[e(n)]=Yt(i)}return r}function Gt(t,e){const r=Math.trunc(Math.abs(t/60)),n=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Mt(r,2)}:${Mt(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${Mt(r,2)}${Mt(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Xt(t){return It(t,["hour","minute","second","millisecond"])}const Qt=["January","February","March","April","May","June","July","August","September","October","November","December"],te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ee=["J","F","M","A","M","J","J","A","S","O","N","D"];function re(t){switch(t){case"narrow":return[...ee];case"short":return[...te];case"long":return[...Qt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ne=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ie=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],oe=["M","T","W","T","F","S","S"];function se(t){switch(t){case"narrow":return[...oe];case"short":return[...ie];case"long":return[...ne];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ae=["AM","PM"],ue=["Before Christ","Anno Domini"],ce=["BC","AD"],le=["B","A"];function he(t){switch(t){case"narrow":return[...le];case"short":return[...ce];case"long":return[...ue];default:return null}}function fe(t){return ae[t.hour<12?0:1]}function de(t,e){return se(e)[t.weekday-1]}function pe(t,e){return re(e)[t.month-1]}function ge(t,e){return he(e)[t.year<0?0:1]}function me(t,e,r="always",n=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===r&&o){const r="days"===t;switch(e){case 1:return r?"tomorrow":`next ${i[t][0]}`;case-1:return r?"yesterday":`last ${i[t][0]}`;case 0:return r?"today":`this ${i[t][0]}`;default:}}const s=Object.is(e,-0)||e<0,a=Math.abs(e),u=1===a,c=i[t],l=n?u?c[1]:c[2]||c[1]:u?i[t][0]:t;return s?`${a} ${l} ago`:`in ${a} ${l}`}function ve(t,e){let r="";for(const n of t)n.literal?r+=n.val:r+=e(n.val);return r}const ye={D:p,DD:g,DDD:v,DDDD:y,t:_,tt:b,ttt:w,tttt:S,T:F,TT:E,TTT:x,TTTT:k,f:A,ff:C,fff:I,ffff:N,F:T,FF:P,FFF:O,FFFF:D};class _e{static create(t,e={}){return new _e(t,e)}static parseFormat(t){let e=null,r="",n=!1;const i=[];for(let o=0;o0&&i.push({literal:n,val:r}),e=null,r="",n=!n):n||s===e?r+=s:(r.length>0&&i.push({literal:!1,val:r}),r=s,e=s)}return r.length>0&&i.push({literal:n,val:r}),i}static macroTokenToFormatOpts(t){return ye[t]}constructor(t,e){this.opts=e,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,e){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());const r=this.systemLoc.dtFormatter(t,{...this.opts,...e});return r.format()}formatDateTime(t,e={}){const r=this.loc.dtFormatter(t,{...this.opts,...e});return r.format()}formatDateTimeParts(t,e={}){const r=this.loc.dtFormatter(t,{...this.opts,...e});return r.formatToParts()}formatInterval(t,e={}){const r=this.loc.dtFormatter(t.start,{...this.opts,...e});return r.dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,e={}){const r=this.loc.dtFormatter(t,{...this.opts,...e});return r.resolvedOptions()}num(t,e=0){if(this.opts.forceSimple)return Mt(t,e);const r={...this.opts};return e>0&&(r.padTo=e),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,e){const r="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(e,r)=>this.loc.extract(t,e,r),o=e=>t.isOffsetFixed&&0===t.offset&&e.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,e.format):"",s=()=>r?fe(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(e,n)=>r?pe(t,e):i(n?{month:e}:{month:e,day:"numeric"},"month"),u=(e,n)=>r?de(t,e):i(n?{weekday:e}:{weekday:e,month:"long",day:"numeric"},"weekday"),c=e=>{const r=_e.macroTokenToFormatOpts(e);return r?this.formatWithSystemDefault(t,r):e},l=e=>r?ge(t,e):i({era:e},"era"),h=e=>{switch(e){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return n?i({day:"numeric"},"day"):this.num(t.day);case"dd":return n?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return n?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?i({month:"numeric"},"month"):this.num(t.month);case"MM":return n?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?i({year:"numeric"},"year"):this.num(t.year);case"yy":return n?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return l("short");case"GG":return l("long");case"GGGGG":return l("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return c(e)}};return ve(_e.parseFormat(e),h)}formatDurationFromString(t,e){const r=t=>{switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=t=>e=>{const n=r(e);return n?this.num(t.get(n),e.length):e},i=_e.parseFormat(e),o=i.reduce(((t,{literal:e,val:r})=>e?t:t.concat(r)),[]),s=t.shiftTo(...o.map(r).filter((t=>t)));return ve(i,n(s))}}class be{constructor(t,e){this.reason=t,this.explanation=e}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const we=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Se(...t){const e=t.reduce(((t,e)=>t+e.source),"");return RegExp(`^${e}$`)}function Fe(...t){return e=>t.reduce((([t,r,n],i)=>{const[o,s,a]=i(e,n);return[{...t,...o},s||r,a]}),[{},null,1]).slice(0,2)}function Ee(t,...e){if(null==t)return[null,null];for(const[r,n]of e){const e=r.exec(t);if(e)return n(e)}return[null,null]}function xe(...t){return(e,r)=>{const n={};let i;for(i=0;ivoid 0!==t&&(e||t&&l)?-t:t;return[{years:f(Ut(r)),months:f(Ut(n)),weeks:f(Ut(i)),days:f(Ut(o)),hours:f(Ut(s)),minutes:f(Ut(a)),seconds:f(Ut(u),"-0"===u),milliseconds:f(jt(c),h)}]}const ze={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function $e(t,e,r,n,i,o,s){const a={year:2===e.length?Wt(Lt(e)):Lt(e),month:te.indexOf(r)+1,day:Lt(n),hour:Lt(i),minute:Lt(o)};return s&&(a.second=Lt(s)),t&&(a.weekday=t.length>3?ne.indexOf(t)+1:ie.indexOf(t)+1),a}const Ye=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ze(t){const[,e,r,n,i,o,s,a,u,c,l,h]=t,f=$e(e,i,n,r,o,s,a);let d;return d=u?ze[u]:c?0:$t(l,h),[f,new dt(d)]}function Ge(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Xe=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Qe=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,tr=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function er(t){const[,e,r,n,i,o,s,a]=t,u=$e(e,i,n,r,o,s,a);return[u,dt.utcInstance]}function rr(t){const[,e,r,n,i,o,s,a]=t,u=$e(e,a,r,n,i,o,s);return[u,dt.utcInstance]}const nr=Se(Re,Pe),ir=Se(Ie,Pe),or=Se(Oe,Pe),sr=Se(Ce),ar=Fe(Be,He,Ve,qe),ur=Fe(Ne,He,Ve,qe),cr=Fe(De,He,Ve,qe),lr=Fe(He,Ve,qe);function hr(t){return Ee(t,[nr,ar],[ir,ur],[or,cr],[sr,lr])}function fr(t){return Ee(Ge(t),[Ye,Ze])}function dr(t){return Ee(t,[Xe,er],[Qe,er],[tr,rr])}function pr(t){return Ee(t,[Je,We])}const gr=Fe(He);function mr(t){return Ee(t,[Ke,gr])}const vr=Se(Me,Ue),yr=Se(Le),_r=Fe(He,Ve,qe);function br(t){return Ee(t,[vr,ar],[yr,_r])}const wr="Invalid Duration",Sr={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Fr={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Sr},Er=365.2425,xr=30.436875,kr={years:{quarters:4,months:12,weeks:Er/7,days:Er,hours:24*Er,minutes:24*Er*60,seconds:24*Er*60*60,milliseconds:24*Er*60*60*1e3},quarters:{months:3,weeks:Er/28,days:Er/4,hours:24*Er/4,minutes:24*Er*60/4,seconds:24*Er*60*60/4,milliseconds:24*Er*60*60*1e3/4},months:{weeks:xr/7,days:xr,hours:24*xr,minutes:24*xr*60,seconds:24*xr*60*60,milliseconds:24*xr*60*60*1e3},...Sr},Ar=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Tr=Ar.slice(0).reverse();function Cr(t,e,r=!1){const n={values:r?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Nr(n)}function Pr(t){return t<0?Math.floor(t):Math.ceil(t)}function Rr(t,e,r,n,i){const o=t[i][r],s=e[r]/o,a=Math.sign(s)===Math.sign(n[i]),u=!a&&0!==n[i]&&Math.abs(s)<=1?Pr(s):Math.trunc(s);n[i]+=u,e[r]-=u*o}function Ir(t,e){Tr.reduce(((r,n)=>Et(e[n])?r:(r&&Rr(t,e,r,e,n),n)),null)}function Or(t){const e={};for(const[r,n]of Object.entries(t))0!==n&&(e[r]=n);return e}class Nr{constructor(t){const e="longterm"===t.conversionAccuracy||!1;let r=e?kr:Fr;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ht.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,e){return Nr.fromObject({milliseconds:t},e)}static fromObject(t,e={}){if(null==t||"object"!==typeof t)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===t?"null":typeof t));return new Nr({values:Zt(t,Nr.normalizeUnit),loc:ht.fromObject(e),conversionAccuracy:e.conversionAccuracy,matrix:e.matrix})}static fromDurationLike(t){if(xt(t))return Nr.fromMillis(t);if(Nr.isDuration(t))return t;if("object"===typeof t)return Nr.fromObject(t);throw new c(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,e){const[r]=pr(t);return r?Nr.fromObject(r,e):Nr.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,e){const[r]=mr(t);return r?Nr.fromObject(r,e):Nr.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the Duration is invalid");const r=t instanceof be?t:new be(t,e);if(Ft.throwOnInvalid)throw new s(r);return new Nr({invalid:r})}static normalizeUnit(t){const e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new u(t);return e}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,e={}){const r={...e,floor:!1!==e.round&&!1!==e.floor};return this.isValid?_e.create(this.loc,r).formatDurationFromString(this,t):wr}toHuman(t={}){const e=Ar.map((e=>{const r=this.values[e];return Et(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:e.slice(0,-1)}).format(r)})).filter((t=>t));return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(e)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=Bt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const e=this.toMillis();if(e<0||e>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let n="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(n+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===r.milliseconds||(n+=".SSS"));let i=r.toFormat(n);return t.includePrefix&&(i="T"+i),i}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const e=Nr.fromDurationLike(t),r={};for(const n of Ar)(Ot(e.values,n)||Ot(this.values,n))&&(r[n]=e.get(n)+this.get(n));return Cr(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const e=Nr.fromDurationLike(t);return this.plus(e.negate())}mapUnits(t){if(!this.isValid)return this;const e={};for(const r of Object.keys(this.values))e[r]=Yt(t(this.values[r],r));return Cr(this,{values:e},!0)}get(t){return this[Nr.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const e={...this.values,...Zt(t,Nr.normalizeUnit)};return Cr(this,{values:e})}reconfigure({locale:t,numberingSystem:e,conversionAccuracy:r,matrix:n}={}){const i=this.loc.clone({locale:t,numberingSystem:e}),o={loc:i,matrix:n,conversionAccuracy:r};return Cr(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Ir(this.matrix,t),Cr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Or(this.normalize().shiftToAll().toObject());return Cr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(0===t.length)return this;t=t.map((t=>Nr.normalizeUnit(t)));const e={},r={},n=this.toObject();let i;for(const o of Ar)if(t.indexOf(o)>=0){i=o;let t=0;for(const e in r)t+=this.matrix[e][o]*r[e],r[e]=0;xt(n[o])&&(t+=n[o]);const s=Math.trunc(t);e[o]=s,r[o]=(1e3*t-1e3*s)/1e3;for(const r in n)Ar.indexOf(r)>Ar.indexOf(o)&&Rr(this.matrix,n,r,e,o)}else xt(n[o])&&(r[o]=n[o]);for(const o in r)0!==r[o]&&(e[i]+=o===i?r[o]:r[o]/this.matrix[i][o]);return Cr(this,{values:e},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const e of Object.keys(this.values))t[e]=0===this.values[e]?0:-this.values[e];return Cr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;function e(t,e){return void 0===t||0===t?void 0===e||0===e:t===e}for(const r of Ar)if(!e(this.values[r],t.values[r]))return!1;return!0}}const Dr="Invalid Interval";function Mr(t,e){return t&&t.isValid?e&&e.isValid?et}isBefore(t){return!!this.isValid&&this.e<=t}contains(t){return!!this.isValid&&(this.s<=t&&this.e>t)}set({start:t,end:e}={}){return this.isValid?Lr.fromDateTimes(t||this.s,e||this.e):this}splitAt(...t){if(!this.isValid)return[];const e=t.map(ri).filter((t=>this.contains(t))).sort(),r=[];let{s:n}=this,i=0;while(n+this.e?this.e:t;r.push(Lr.fromDateTimes(n,o)),n=o,i+=1}return r}splitBy(t){const e=Nr.fromDurationLike(t);if(!this.isValid||!e.isValid||0===e.as("milliseconds"))return[];let r,{s:n}=this,i=1;const o=[];while(nt*i)));r=+t>+this.e?this.e:t,o.push(Lr.fromDateTimes(n,r)),n=r,i+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e)}equals(t){return!(!this.isValid||!t.isValid)&&(this.s.equals(t.s)&&this.e.equals(t.e))}intersection(t){if(!this.isValid)return this;const e=this.s>t.s?this.s:t.s,r=this.e=r?null:Lr.fromDateTimes(e,r)}union(t){if(!this.isValid)return this;const e=this.st.e?this.e:t.e;return Lr.fromDateTimes(e,r)}static merge(t){const[e,r]=t.sort(((t,e)=>t.s-e.s)).reduce((([t,e],r)=>e?e.overlaps(r)||e.abutsStart(r)?[t,e.union(r)]:[t.concat([e]),r]:[t,r]),[[],null]);return r&&e.push(r),e}static xor(t){let e=null,r=0;const n=[],i=t.map((t=>[{time:t.s,type:"s"},{time:t.e,type:"e"}])),o=Array.prototype.concat(...i),s=o.sort(((t,e)=>t.time-e.time));for(const a of s)r+="s"===a.type?1:-1,1===r?e=a.time:(e&&+e!==+a.time&&n.push(Lr.fromDateTimes(e,a.time)),e=null);return Lr.merge(n)}difference(...t){return Lr.xor([this].concat(t)).map((t=>this.intersection(t))).filter((t=>t&&!t.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Dr}toLocaleString(t=p,e={}){return this.isValid?_e.create(this.s.loc.clone(e),t).formatInterval(this):Dr}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Dr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Dr}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Dr}toFormat(t,{separator:e=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${e}${this.e.toFormat(t)}`:Dr}toDuration(t,e){return this.isValid?this.e.diff(this.s,t,e):Nr.invalid(this.invalidReason)}mapEndpoints(t){return Lr.fromDateTimes(t(this.s),t(this.e))}}class Ur{static hasDST(t=Ft.defaultZone){const e=ei.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset}static isValidIANAZone(t){return J.isValidZone(t)}static normalizeZone(t){return gt(t,Ft.defaultZone)}static months(t="long",{locale:e=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||ht.create(e,r,i)).months(t)}static monthsFormat(t="long",{locale:e=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||ht.create(e,r,i)).months(t,!0)}static weekdays(t="long",{locale:e=null,numberingSystem:r=null,locObj:n=null}={}){return(n||ht.create(e,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:e=null,numberingSystem:r=null,locObj:n=null}={}){return(n||ht.create(e,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ht.create(t).meridiems()}static eras(t="short",{locale:e=null}={}){return ht.create(e,null,"gregory").eras(t)}static features(){return{relative:Ct()}}}function jr(t,e){const r=t=>t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(e)-r(t);return Math.floor(Nr.fromMillis(n).as("days"))}function Br(t,e,r){const n=[["years",(t,e)=>e.year-t.year],["quarters",(t,e)=>e.quarter-t.quarter+4*(e.year-t.year)],["months",(t,e)=>e.month-t.month+12*(e.year-t.year)],["weeks",(t,e)=>{const r=jr(t,e);return(r-r%7)/7}],["days",jr]],i={},o=t;let s,a;for(const[u,c]of n)r.indexOf(u)>=0&&(s=u,i[u]=c(t,e),a=o.plus(i),a>e?(i[u]--,t=o.plus(i)):t=a);return[t,i,a,s]}function Hr(t,e,r,n){let[i,o,s,a]=Br(t,e,r);const u=e-i,c=r.filter((t=>["hours","minutes","seconds","milliseconds"].indexOf(t)>=0));0===c.length&&(s0?Nr.fromMillis(u,n).shiftTo(...c).plus(l):l}const Vr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},qr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Kr=Vr.hanidec.replace(/[\[|\]]/g,"").split("");function Jr(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let r=0;r=r&&n<=i&&(e+=n-r)}}return parseInt(e,10)}return e}function Wr({numberingSystem:t},e=""){return new RegExp(`${Vr[t||"latn"]}${e}`)}const zr="missing Intl.DateTimeFormat.formatToParts support";function $r(t,e=(t=>t)){return{regex:t,deser:([t])=>e(Jr(t))}}const Yr=String.fromCharCode(160),Zr=`[ ${Yr}]`,Gr=new RegExp(Zr,"g");function Xr(t){return t.replace(/\./g,"\\.?").replace(Gr,Zr)}function Qr(t){return t.replace(/\./g,"").replace(Gr," ").toLowerCase()}function tn(t,e){return null===t?null:{regex:RegExp(t.map(Xr).join("|")),deser:([r])=>t.findIndex((t=>Qr(r)===Qr(t)))+e}}function en(t,e){return{regex:t,deser:([,t,e])=>$t(t,e),groups:e}}function rn(t){return{regex:t,deser:([t])=>t}}function nn(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function on(t,e){const r=Wr(e),n=Wr(e,"{2}"),i=Wr(e,"{3}"),o=Wr(e,"{4}"),s=Wr(e,"{6}"),a=Wr(e,"{1,2}"),u=Wr(e,"{1,3}"),c=Wr(e,"{1,6}"),l=Wr(e,"{1,9}"),h=Wr(e,"{2,4}"),f=Wr(e,"{4,6}"),d=t=>({regex:RegExp(nn(t.val)),deser:([t])=>t,literal:!0}),p=p=>{if(t.literal)return d(p);switch(p.val){case"G":return tn(e.eras("short",!1),0);case"GG":return tn(e.eras("long",!1),0);case"y":return $r(c);case"yy":return $r(h,Wt);case"yyyy":return $r(o);case"yyyyy":return $r(f);case"yyyyyy":return $r(s);case"M":return $r(a);case"MM":return $r(n);case"MMM":return tn(e.months("short",!0,!1),1);case"MMMM":return tn(e.months("long",!0,!1),1);case"L":return $r(a);case"LL":return $r(n);case"LLL":return tn(e.months("short",!1,!1),1);case"LLLL":return tn(e.months("long",!1,!1),1);case"d":return $r(a);case"dd":return $r(n);case"o":return $r(u);case"ooo":return $r(i);case"HH":return $r(n);case"H":return $r(a);case"hh":return $r(n);case"h":return $r(a);case"mm":return $r(n);case"m":return $r(a);case"q":return $r(a);case"qq":return $r(n);case"s":return $r(a);case"ss":return $r(n);case"S":return $r(u);case"SSS":return $r(i);case"u":return rn(l);case"uu":return rn(a);case"uuu":return $r(r);case"a":return tn(e.meridiems(),0);case"kkkk":return $r(o);case"kk":return $r(h,Wt);case"W":return $r(a);case"WW":return $r(n);case"E":case"c":return $r(r);case"EEE":return tn(e.weekdays("short",!1,!1),1);case"EEEE":return tn(e.weekdays("long",!1,!1),1);case"ccc":return tn(e.weekdays("short",!0,!1),1);case"cccc":return tn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return en(new RegExp(`([+-]${a.source})(?::(${n.source}))?`),2);case"ZZZ":return en(new RegExp(`([+-]${a.source})(${n.source})?`),2);case"z":return rn(/[a-z_+-/]{1,256}?/i);default:return d(p)}},g=p(t)||{invalidReason:zr};return g.token=t,g}const sn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function an(t,e){const{type:r,value:n}=t;if("literal"===r)return{literal:!0,val:n};const i=e[r];let o=sn[r];return"object"===typeof o&&(o=o[i]),o?{literal:!1,val:o}:void 0}function un(t){const e=t.map((t=>t.regex)).reduce(((t,e)=>`${t}(${e.source})`),"");return[`^${e}$`,t]}function cn(t,e,r){const n=t.match(e);if(n){const t={};let e=1;for(const i in r)if(Ot(r,i)){const o=r[i],s=o.groups?o.groups+1:1;!o.literal&&o.token&&(t[o.token.val[0]]=o.deser(n.slice(e,e+s))),e+=s}return[n,t]}return[n,{}]}function ln(t){const e=t=>{switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r,n=null;Et(t.z)||(n=J.create(t.z)),Et(t.Z)||(n||(n=new dt(t.Z)),r=t.Z),Et(t.q)||(t.M=3*(t.q-1)+1),Et(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Et(t.u)||(t.S=jt(t.u));const i=Object.keys(t).reduce(((r,n)=>{const i=e(n);return i&&(r[i]=t[n]),r}),{});return[i,n,r]}let hn=null;function fn(){return hn||(hn=ei.fromMillis(1555555555555)),hn}function dn(t,e){if(t.literal)return t;const r=_e.macroTokenToFormatOpts(t.val),n=vn(r,e);return null==n||n.includes(void 0)?t:n}function pn(t,e){return Array.prototype.concat(...t.map((t=>dn(t,e))))}function gn(t,e,r){const n=pn(_e.parseFormat(r),t),i=n.map((e=>on(e,t))),o=i.find((t=>t.invalidReason));if(o)return{input:e,tokens:n,invalidReason:o.invalidReason};{const[t,r]=un(i),o=RegExp(t,"i"),[s,u]=cn(e,o,r),[c,l,h]=u?ln(u):[null,null,void 0];if(Ot(u,"a")&&Ot(u,"H"))throw new a("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:n,regex:o,rawMatches:s,matches:u,result:c,zone:l,specificOffset:h}}}function mn(t,e,r){const{result:n,zone:i,specificOffset:o,invalidReason:s}=gn(t,e,r);return[n,i,o,s]}function vn(t,e){if(!t)return null;const r=_e.create(e,t),n=r.formatDateTimeParts(fn());return n.map((e=>an(e,t)))}const yn=[0,31,59,90,120,151,181,212,243,273,304,334],_n=[0,31,60,91,121,152,182,213,244,274,305,335];function bn(t,e){return new be("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function wn(t,e,r){const n=new Date(Date.UTC(t,e-1,r));t<100&&t>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return 0===i?7:i}function Sn(t,e,r){return r+(Ht(t)?_n:yn)[e-1]}function Fn(t,e){const r=Ht(t)?_n:yn,n=r.findIndex((t=>tJt(e)?(s=e+1,a=1):s=e,{weekYear:s,weekNumber:a,weekday:o,...Xt(t)}}function xn(t){const{weekYear:e,weekNumber:r,weekday:n}=t,i=wn(e,1,4),o=Vt(e);let s,a=7*r+n-i-3;a<1?(s=e-1,a+=Vt(s)):a>o?(s=e+1,a-=Vt(e)):s=e;const{month:u,day:c}=Fn(s,a);return{year:s,month:u,day:c,...Xt(t)}}function kn(t){const{year:e,month:r,day:n}=t,i=Sn(e,r,n);return{year:e,ordinal:i,...Xt(t)}}function An(t){const{year:e,ordinal:r}=t,{month:n,day:i}=Fn(e,r);return{year:e,month:n,day:i,...Xt(t)}}function Tn(t){const e=kt(t.weekYear),r=Nt(t.weekNumber,1,Jt(t.weekYear)),n=Nt(t.weekday,1,7);return e?r?!n&&bn("weekday",t.weekday):bn("week",t.week):bn("weekYear",t.weekYear)}function Cn(t){const e=kt(t.year),r=Nt(t.ordinal,1,Vt(t.year));return e?!r&&bn("ordinal",t.ordinal):bn("year",t.year)}function Pn(t){const e=kt(t.year),r=Nt(t.month,1,12),n=Nt(t.day,1,qt(t.year,t.month));return e?r?!n&&bn("day",t.day):bn("month",t.month):bn("year",t.year)}function Rn(t){const{hour:e,minute:r,second:n,millisecond:i}=t,o=Nt(e,0,23)||24===e&&0===r&&0===n&&0===i,s=Nt(r,0,59),a=Nt(n,0,59),u=Nt(i,0,999);return o?s?a?!u&&bn("millisecond",i):bn("second",n):bn("minute",r):bn("hour",e)}const In="Invalid DateTime",On=864e13;function Nn(t){return new be("unsupported zone",`the zone "${t.name}" is not supported`)}function Dn(t){return null===t.weekData&&(t.weekData=En(t.c)),t.weekData}function Mn(t,e){const r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new ei({...r,...e,old:r})}function Ln(t,e,r){let n=t-60*e*1e3;const i=r.offset(n);if(e===i)return[n,e];n-=60*(i-e)*1e3;const o=r.offset(n);return i===o?[n,i]:[t-60*Math.min(i,o)*1e3,Math.max(i,o)]}function Un(t,e){t+=60*e*1e3;const r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function jn(t,e,r){return Ln(Kt(t),e,r)}function Bn(t,e){const r=t.o,n=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),o={...t.c,year:n,month:i,day:Math.min(t.c.day,qt(n,i))+Math.trunc(e.days)+7*Math.trunc(e.weeks)},s=Nr.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Kt(o);let[u,c]=Ln(a,r,t.zone);return 0!==s&&(u+=s,c=t.zone.offset(u)),{ts:u,o:c}}function Hn(t,e,r,n,i,o){const{setZone:s,zone:a}=r;if(t&&0!==Object.keys(t).length){const n=e||a,i=ei.fromObject(t,{...r,zone:n,specificOffset:o});return s?i:i.setZone(a)}return ei.invalid(new be("unparsable",`the input "${i}" can't be parsed as ${n}`))}function Vn(t,e,r=!0){return t.isValid?_e.create(ht.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function qn(t,e){const r=t.c.year>9999||t.c.year<0;let n="";return r&&t.c.year>=0&&(n+="+"),n+=Mt(t.c.year,r?6:4),e?(n+="-",n+=Mt(t.c.month),n+="-",n+=Mt(t.c.day)):(n+=Mt(t.c.month),n+=Mt(t.c.day)),n}function Kn(t,e,r,n,i,o){let s=Mt(t.c.hour);return e?(s+=":",s+=Mt(t.c.minute),0===t.c.second&&r||(s+=":")):s+=Mt(t.c.minute),0===t.c.second&&r||(s+=Mt(t.c.second),0===t.c.millisecond&&n||(s+=".",s+=Mt(t.c.millisecond,3))),i&&(t.isOffsetFixed&&0===t.offset&&!o?s+="Z":t.o<0?(s+="-",s+=Mt(Math.trunc(-t.o/60)),s+=":",s+=Mt(Math.trunc(-t.o%60))):(s+="+",s+=Mt(Math.trunc(t.o/60)),s+=":",s+=Mt(Math.trunc(t.o%60)))),o&&(s+="["+t.zone.ianaName+"]"),s}const Jn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wn={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},zn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},$n=["year","month","day","hour","minute","second","millisecond"],Yn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Zn=["year","ordinal","hour","minute","second","millisecond"];function Gn(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new u(t);return e}function Xn(t,e){const r=gt(e.zone,Ft.defaultZone),n=ht.fromObject(e),i=Ft.now();let o,s;if(Et(t.year))o=i;else{for(const r of $n)Et(t[r])&&(t[r]=Jn[r]);const e=Pn(t)||Rn(t);if(e)return ei.invalid(e);const n=r.offset(i);[o,s]=jn(t,n,r)}return new ei({ts:o,zone:r,loc:n,o:s})}function Qn(t,e,r){const n=!!Et(r.round)||r.round,i=(t,i)=>{t=Bt(t,n||r.calendary?0:2,!0);const o=e.loc.clone(r).relFormatter(r);return o.format(t,i)},o=n=>r.calendary?e.hasSame(t,n)?0:e.startOf(n).diff(t.startOf(n),n).get(n):e.diff(t,n).get(n);if(r.unit)return i(o(r.unit),r.unit);for(const s of r.units){const t=o(s);if(Math.abs(t)>=1)return i(t,s)}return i(t>e?-0:0,r.units[r.units.length-1])}function ti(t){let e,r={};return t.length>0&&"object"===typeof t[t.length-1]?(r=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[r,e]}class ei{constructor(t){const e=t.zone||Ft.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new be("invalid input"):null)||(e.isValid?null:Nn(e));this.ts=Et(t.ts)?Ft.now():t.ts;let n=null,i=null;if(!r){const o=t.old&&t.old.ts===this.ts&&t.old.zone.equals(e);if(o)[n,i]=[t.old.c,t.old.o];else{const t=e.offset(this.ts);n=Un(this.ts,t),r=Number.isNaN(n.year)?new be("invalid input"):null,n=r?null:n,i=r?null:t}}this._zone=e,this.loc=t.loc||ht.create(),this.invalid=r,this.weekData=null,this.c=n,this.o=i,this.isLuxonDateTime=!0}static now(){return new ei({})}static local(){const[t,e]=ti(arguments),[r,n,i,o,s,a,u]=e;return Xn({year:r,month:n,day:i,hour:o,minute:s,second:a,millisecond:u},t)}static utc(){const[t,e]=ti(arguments),[r,n,i,o,s,a,u]=e;return t.zone=dt.utcInstance,Xn({year:r,month:n,day:i,hour:o,minute:s,second:a,millisecond:u},t)}static fromJSDate(t,e={}){const r=Tt(t)?t.valueOf():NaN;if(Number.isNaN(r))return ei.invalid("invalid input");const n=gt(e.zone,Ft.defaultZone);return n.isValid?new ei({ts:r,zone:n,loc:ht.fromObject(e)}):ei.invalid(Nn(n))}static fromMillis(t,e={}){if(xt(t))return t<-On||t>On?ei.invalid("Timestamp out of range"):new ei({ts:t,zone:gt(e.zone,Ft.defaultZone),loc:ht.fromObject(e)});throw new c(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,e={}){if(xt(t))return new ei({ts:1e3*t,zone:gt(e.zone,Ft.defaultZone),loc:ht.fromObject(e)});throw new c("fromSeconds requires a numerical input")}static fromObject(t,e={}){t=t||{};const r=gt(e.zone,Ft.defaultZone);if(!r.isValid)return ei.invalid(Nn(r));const n=Ft.now(),i=Et(e.specificOffset)?r.offset(n):e.specificOffset,o=Zt(t,Gn),s=!Et(o.ordinal),u=!Et(o.year),c=!Et(o.month)||!Et(o.day),l=u||c,h=o.weekYear||o.weekNumber,f=ht.fromObject(e);if((l||s)&&h)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&s)throw new a("Can't mix ordinal dates with month/day");const d=h||o.weekday&&!l;let p,g,m=Un(n,i);d?(p=Yn,g=Wn,m=En(m)):s?(p=Zn,g=zn,m=kn(m)):(p=$n,g=Jn);let v=!1;for(const a of p){const t=o[a];Et(t)?o[a]=v?g[a]:m[a]:v=!0}const y=d?Tn(o):s?Cn(o):Pn(o),_=y||Rn(o);if(_)return ei.invalid(_);const b=d?xn(o):s?An(o):o,[w,S]=jn(b,i,r),F=new ei({ts:w,zone:r,o:S,loc:f});return o.weekday&&l&&t.weekday!==F.weekday?ei.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${F.toISO()}`):F}static fromISO(t,e={}){const[r,n]=hr(t);return Hn(r,n,e,"ISO 8601",t)}static fromRFC2822(t,e={}){const[r,n]=fr(t);return Hn(r,n,e,"RFC 2822",t)}static fromHTTP(t,e={}){const[r,n]=dr(t);return Hn(r,n,e,"HTTP",e)}static fromFormat(t,e,r={}){if(Et(t)||Et(e))throw new c("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:i=null}=r,o=ht.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0}),[s,a,u,l]=mn(o,t,e);return l?ei.invalid(l):Hn(s,a,r,`format ${e}`,t,u)}static fromString(t,e,r={}){return ei.fromFormat(t,e,r)}static fromSQL(t,e={}){const[r,n]=br(t);return Hn(r,n,e,"SQL",t)}static invalid(t,e=null){if(!t)throw new c("need to specify a reason the DateTime is invalid");const r=t instanceof be?t:new be(t,e);if(Ft.throwOnInvalid)throw new i(r);return new ei({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,e={}){const r=vn(t,ht.fromObject(e));return r?r.map((t=>t?t.val:null)).join(""):null}static expandFormat(t,e={}){const r=pn(_e.parseFormat(t),ht.fromObject(e));return r.map((t=>t.val)).join("")}get(t){return this[t]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Dn(this).weekYear:NaN}get weekNumber(){return this.isValid?Dn(this).weekNumber:NaN}get weekday(){return this.isValid?Dn(this).weekday:NaN}get ordinal(){return this.isValid?kn(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ur.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ur.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ur.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ur.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return Ht(this.year)}get daysInMonth(){return qt(this.year,this.month)}get daysInYear(){return this.isValid?Vt(this.year):NaN}get weeksInWeekYear(){return this.isValid?Jt(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:e,numberingSystem:r,calendar:n}=_e.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e,numberingSystem:r,outputCalendar:n}}toUTC(t=0,e={}){return this.setZone(dt.instance(t),e)}toLocal(){return this.setZone(Ft.defaultZone)}setZone(t,{keepLocalTime:e=!1,keepCalendarTime:r=!1}={}){if(t=gt(t,Ft.defaultZone),t.equals(this.zone))return this;if(t.isValid){let n=this.ts;if(e||r){const e=t.offset(this.ts),r=this.toObject();[n]=jn(r,e,t)}return Mn(this,{ts:n,zone:t})}return ei.invalid(Nn(t))}reconfigure({locale:t,numberingSystem:e,outputCalendar:r}={}){const n=this.loc.clone({locale:t,numberingSystem:e,outputCalendar:r});return Mn(this,{loc:n})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const e=Zt(t,Gn),r=!Et(e.weekYear)||!Et(e.weekNumber)||!Et(e.weekday),n=!Et(e.ordinal),i=!Et(e.year),o=!Et(e.month)||!Et(e.day),s=i||o,u=e.weekYear||e.weekNumber;if((s||n)&&u)throw new a("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&n)throw new a("Can't mix ordinal dates with month/day");let c;r?c=xn({...En(this.c),...e}):Et(e.ordinal)?(c={...this.toObject(),...e},Et(e.day)&&(c.day=Math.min(qt(c.year,c.month),c.day))):c=An({...kn(this.c),...e});const[l,h]=jn(c,this.o,this.zone);return Mn(this,{ts:l,o:h})}plus(t){if(!this.isValid)return this;const e=Nr.fromDurationLike(t);return Mn(this,Bn(this,e))}minus(t){if(!this.isValid)return this;const e=Nr.fromDurationLike(t).negate();return Mn(this,Bn(this,e))}startOf(t){if(!this.isValid)return this;const e={},r=Nr.normalizeUnit(t);switch(r){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0;break;case"milliseconds":break}if("weeks"===r&&(e.weekday=1),"quarters"===r){const t=Math.ceil(this.month/3);e.month=3*(t-1)+1}return this.set(e)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,e={}){return this.isValid?_e.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):In}toLocaleString(t=p,e={}){return this.isValid?_e.create(this.loc.clone(e),t).formatDateTime(this):In}toLocaleParts(t={}){return this.isValid?_e.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:e=!1,suppressMilliseconds:r=!1,includeOffset:n=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o="extended"===t;let s=qn(this,o);return s+="T",s+=Kn(this,o,e,r,n,i),s}toISODate({format:t="extended"}={}){return this.isValid?qn(this,"extended"===t):null}toISOWeekDate(){return Vn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:e=!1,includeOffset:r=!0,includePrefix:n=!1,extendedZone:i=!1,format:o="extended"}={}){if(!this.isValid)return null;let s=n?"T":"";return s+Kn(this,"extended"===o,e,t,r,i)}toRFC2822(){return Vn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Vn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?qn(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:e=!1,includeOffsetSpace:r=!0}={}){let n="HH:mm:ss.SSS";return(e||t)&&(r&&(n+=" "),e?n+="z":t&&(n+="ZZ")),Vn(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():In}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const e={...this.c};return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,e="milliseconds",r={}){if(!this.isValid||!t.isValid)return Nr.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=Pt(e).map(Nr.normalizeUnit),o=t.valueOf()>this.valueOf(),s=o?this:t,a=o?t:this,u=Hr(s,a,i,n);return o?u.negate():u}diffNow(t="milliseconds",e={}){return this.diff(ei.now(),t,e)}until(t){return this.isValid?Lr.fromDateTimes(this,t):this}hasSame(t,e){if(!this.isValid)return!1;const r=t.valueOf(),n=this.setZone(t.zone,{keepLocalTime:!0});return n.startOf(e)<=r&&r<=n.endOf(e)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const e=t.base||ei.fromObject({},{zone:this.zone}),r=t.padding?thist.valueOf()),Math.min)}static max(...t){if(!t.every(ei.isDateTime))throw new c("max requires all arguments be DateTimes");return Rt(t,(t=>t.valueOf()),Math.max)}static fromFormatExplain(t,e,r={}){const{locale:n=null,numberingSystem:i=null}=r,o=ht.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return gn(o,t,e)}static fromStringExplain(t,e,r={}){return ei.fromFormatExplain(t,e,r)}static get DATE_SHORT(){return p}static get DATE_MED(){return g}static get DATE_MED_WITH_WEEKDAY(){return m}static get DATE_FULL(){return v}static get DATE_HUGE(){return y}static get TIME_SIMPLE(){return _}static get TIME_WITH_SECONDS(){return b}static get TIME_WITH_SHORT_OFFSET(){return w}static get TIME_WITH_LONG_OFFSET(){return S}static get TIME_24_SIMPLE(){return F}static get TIME_24_WITH_SECONDS(){return E}static get TIME_24_WITH_SHORT_OFFSET(){return x}static get TIME_24_WITH_LONG_OFFSET(){return k}static get DATETIME_SHORT(){return A}static get DATETIME_SHORT_WITH_SECONDS(){return T}static get DATETIME_MED(){return C}static get DATETIME_MED_WITH_SECONDS(){return P}static get DATETIME_MED_WITH_WEEKDAY(){return R}static get DATETIME_FULL(){return I}static get DATETIME_FULL_WITH_SECONDS(){return O}static get DATETIME_HUGE(){return N}static get DATETIME_HUGE_WITH_SECONDS(){return D}}function ri(t){if(ei.isDateTime(t))return t;if(t&&t.valueOf&&xt(t.valueOf()))return ei.fromJSDate(t);if(t&&"object"===typeof t)return ei.fromObject(t);throw new c(`Unknown datetime argument: ${t}, of type ${typeof t}`)}}}]); //# sourceMappingURL=chunk-vendors.1b24a700.js.map