/*! For license information please see 811.8f231000.chunk.js.LICENSE.txt */ "use strict";(self.webpackChunkmaingate_console=self.webpackChunkmaingate_console||[]).push([[811],{32811:function(t,e,r){r.r(e),r.d(e,{default:function(){return v}});var n=r(1413),o=r(74165),i=r(15861),a=r(47313),c=r(58467),u=r(85554),s=r(86480),l=r(27998),h=r(30657),f=r(62721),p=r(34491),d=(r(88282),r(46417));function v(){var t=(0,h.Fp)(),e=t.instance,r=t.accounts,v=(0,h.kq)(),y=(0,c.s0)(),g=(0,u.I0)();function m(){return(m=(0,i.Z)((0,o.Z)().mark((function t(){return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.loginRedirect(f.Q).catch((function(t){p.Am.error("\ub85c\uadf8\uc778\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(t))}));case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=(0,i.Z)((0,o.Z)().mark((function t(){return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.acquireTokenSilent((0,n.Z)((0,n.Z)({},f.Q),{},{account:r[0]})).then((function(t){g({type:"set",accessToken:t.accessToken}),x(t.accessToken)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return A.apply(this,arguments)}function A(){return(A=(0,i.Z)((0,o.Z)().mark((function t(e){var r;return(0,o.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s.ZP.get("https://graph.microsoft.com/v1.0/me/photo/$value",{headers:{Authorization:"Bearer ".concat(e)},responseType:"blob"});case 3:200===(r=t.sent).status?(g({type:"set",picture:URL.createObjectURL(r.data)}),y("/services")):p.Am.error("\ud504\ub85c\ud544 \uc774\ubbf8\uc9c0 \uc870\ud68c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(r.statusText)),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),p.Am.error("\ud504\ub85c\ud544 \uc774\ubbf8\uc9c0 \uc870\ud68c\ub97c \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4: ".concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})))).apply(this,arguments)}return(0,a.useEffect)((function(){v&&function(){w.apply(this,arguments)}()}),[v]),(0,d.jsx)("div",{className:"bg-light min-vh-100 d-flex flex-row align-items-center",children:(0,d.jsxs)(l.KB,{children:[(0,d.jsx)(l.rb,{className:"justify-content-center",children:(0,d.jsx)(l.b7,{md:8,children:(0,d.jsx)(l.xH,{className:"p-4",children:(0,d.jsx)(l.sl,{children:(0,d.jsx)(l.rb,{className:"justify-content-center",children:(0,d.jsx)(l.b7,{md:6,children:(0,d.jsx)("div",{className:"d-grid gap-2",children:(0,d.jsxs)(l.u5,{color:"secondary",size:"lg",variant:"outline",shape:"rounded-0",onClick:function(){return m.apply(this,arguments)},disabled:v,children:[v&&(0,d.jsx)(l.LQ,{component:"span",size:"sm","aria-hidden":"true",className:"me-2"}),!v&&(0,d.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsSAAALEgHS3X78AAAAVElEQVQ4jWP8//8/A7UBC8i8z4HKBE3mXX+XsWE3I0F1Da7/GZmo7kwGBoZRQ0cNpTKgXY5iXPqBoMn/owUYGXYRzlEMbqM5atTQoWEo9XMUAwMDAGSOGCOVddy/AAAAAElFTkSuQmCC",alt:"Microsoft Logo",className:"me-2"}),"\ub85c\uadf8\uc778\ud558\uae30"]})})})})})})})}),(0,d.jsx)(p.Ix,{position:"top-right",autoClose:5e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!1,draggable:!0,pauseOnHover:!0})]})})}},15861:function(t,e,r){function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(s){return void r(s)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}r.d(e,{Z:function(){return o}})},74165:function(t,e,r){r.d(e,{Z:function(){return o}});var n=r(71002);function o(){o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(_){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),c=new O(n||[]);return i(a,"_invoke",{value:L(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(_){return{type:"throw",arg:_}}}t.wrap=h;var p={};function d(){}function v(){}function y(){}var g={};l(g,c,(function(){return this}));var m=Object.getPrototypeOf,w=m&&m(m(N([])));w&&w!==e&&r.call(w,c)&&(g=w);var x=y.prototype=d.prototype=Object.create(g);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function o(i,a,c,u){var s=f(t[i],t,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==(0,n.Z)(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return o("throw",t,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return Z()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=E(a,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=f(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=f(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),k(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;k(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:N(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}}}]);