/*! For license information please see user.7abdbbd33a5819846cc8.chunk.js.LICENSE.txt */
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[96806],{94053:function(t,e,r){r.r(e),r.d(e,{default:function(){return h}}),r(29305),r(32733),r(84701),r(2623),r(44962),r(10849),r(70389),r(36947),r(26437),r(52697),r(78557),r(90076),r(83994),r(46968),r(82367);var n=r(8566),o=r(71866),a=r(5898),i=r(67430),u=r(89100);function c(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(r,n,o,a){var c=n&&n.prototype instanceof u?n:u,l=Object.create(c.prototype);return s(l,"_invoke",function(r,n,o){var a,u,c,s=0,l=o||[],f=!1,d={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return a=e,u=0,c=t,d.n=r,i}};function v(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,a=l[e],v=d.p,p=a[2];r>3?(o=p===n)&&(c=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=v&&((o=r<2&&v<a[1])?(u=0,d.v=n,d.n=a[1]):v<p&&(o=r<3||a[0]>n||n>p)&&(a[4]=r,a[5]=n,d.n=p,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,l,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&v(l,p),u=l,c=p;(e=u<2?t:c)||!f;){a||(u?u<3?(u>1&&(d.n=-1),v(u,c)):d.n=c:d.v=c);try{if(s=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(f=d.n<0)?c:r.call(n,d))!==i)break}catch(e){a=t,u=1,c=e}finally{s=1}}return{value:e,done:f}}}(r,o,a),!0),l}var i={};function u(){}function l(){}function f(){}e=Object.getPrototypeOf;var d=[][n]?e(e([][n]())):(s(e={},n,(function(){return this})),e),v=f.prototype=u.prototype=Object.create(d);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,o,"GeneratorFunction")),t.prototype=Object.create(v),t}return l.prototype=f,s(v,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,o,"GeneratorFunction"),s(v),s(v,o,"Generator"),s(v,n,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:a,m:p}})()}function s(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,r,n){if(e)o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var a=function(e,r){s(t,e,(function(t){return this._invoke(e,r,t)}))};a("next",0),a("throw",1),a("return",2)}},s(t,e,r,n)}function l(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function f(t){console.debug("[Wizard > User] user update complete:",t),n.Ay.hide(),u.default.navigate("wizard/library").catch((function(t){console.error("[Wizard > User] error navigating to library setup",t)}))}function d(t){return v.apply(this,arguments)}function v(){var t;return t=c().m((function t(e){var r;return c().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,e.text();case 1:r=t.v,console.warn("[Wizard > User] user update failed:",r),(0,o.A)(a.Ay.translate("ErrorDefault")),n.Ay.hide();case 2:return t.a(2)}}),t)})),v=function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){l(a,n,o,i,u,"next",t)}function u(t){l(a,n,o,i,u,"throw",t)}i(void 0)}))},v.apply(this,arguments)}function p(t){var e=this;return e.querySelector("#txtManualPassword").value!=e.querySelector("#txtPasswordConfirm").value?(0,o.A)(a.Ay.translate("PasswordMatchError")):function(t){n.Ay.show();var e=i.tF.currentApiClient();e.ajax({type:"POST",data:JSON.stringify({Name:t.querySelector("#txtUsername").value.trim(),Password:t.querySelector("#txtManualPassword").value}),url:e.getUrl("Startup/User"),contentType:"application/json"}).then(f).catch(d)}(e),t.preventDefault(),!1}function y(){n.Ay.show();var t=this,e=i.tF.currentApiClient();e.getJSON(e.getUrl("Startup/User")).then((function(e){t.querySelector("#txtUsername").value=e.Name||"",t.querySelector("#txtManualPassword").value=e.Password||"",n.Ay.hide()}))}function h(t){t.querySelector(".wizardUserForm").addEventListener("submit",p),t.addEventListener("viewshow",(function(){document.querySelector(".skinHeader").classList.add("noHomeButtonHeader")})),t.addEventListener("viewhide",(function(){document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader")})),t.addEventListener("viewshow",y)}r(98959),r(10353)}}]);