/*! For license information please see user.046372cb7c5635184e63.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(36947),r(26437),r(52697),r(78557),r(90076),r(46968);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:p,f:p.bind(t,4),d:function(e,r){return a=e,u=0,c=t,d.n=r,i}};function p(r,n){for(u=r,c=n,e=0;!f&&s&&!o&&e<l.length;e++){var o,a=l[e],p=d.p,v=a[2];r>3?(o=v===n)&&(c=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=p&&((o=r<2&&p<a[1])?(u=0,d.v=n,d.n=a[1]):p<v&&(o=r<3||a[0]>n||n>v)&&(a[4]=r,a[5]=n,d.n=v,u=0))}if(o||r>1)return i;throw f=!0,n}return function(o,l,v){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,v),u=l,c=v;(e=u<2?t:c)||!f;){a||(u?u<3?(u>1&&(d.n=-1),p(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),p=f.prototype=u.prototype=Object.create(d);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=f,s(p,"constructor",f),s(f,"constructor",l),l.displayName="GeneratorFunction",s(f,o,"GeneratorFunction"),s(p),s(p,o,"Generator"),s(p,n,(function(){return this})),s(p,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:a,m:v}})()}function s(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}s=function(t,e,r,n){function a(e,r){s(t,e,(function(t){return this._invoke(e,r,t)}))}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(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 p.apply(this,arguments)}function p(){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)})),p=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)}))},p.apply(this,arguments)}function v(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",v),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)}}]);