1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1339],{62536:function(e,t,o){var r,s;o.d(t,{W:function(){return roleNameByUserRole},v:function(){return r}}),(s=r||(r={})).CUSTOMER="CUSTOMER",s.ROLE_USER="ROLE_USER",s.ROLE_SELLER="ROLE_SELLER",s.ROLE_ADMIN="ROLE_ADMIN",s.ROLE_SUPERADMIN="ROLE_SUPERADMIN",s.ROLE_CUSTOMER="ROLE_CUSTOMER",s.ROLE_PROMOTER="ROLE_PROMOTER";let roleNameByUserRole=e=>{switch(e){case"ROLE_SELLER":return"seller";case"ROLE_ADMIN":case"ROLE_PROMOTER":return"promoter";case"ROLE_SUPERADMIN":return"crm";default:return"customer"}}},28001:function(e,t,o){o.d(t,{F:function(){return u},d:function(){return s}});var r,s,n=o(62536),i=o(32816),a=o(16547),c=o(94660);(r=s||(s={})).TOKEN="t",r.TOKEN_EXPIRATION="t_expiration",r.USER_DATA="r",r.MENU_ACTION="selectedMenuAction",r.LOGIN_AGAIN="login_again",r.ON_LOGIN_REDIRECTION="onLoginRedirection",r.EXTERNAL_ID="e",r.PURCHASE="purchase",r.PURCHASE_STATE="purchase-state",r.LANGUAGE="language",r.INSTALLMENT_CHECKOUT_STATE="installment-state",r.SEATS_IO_HOLD_TOKEN="seats-io-hold-token";let getLocalStorage=e=>a.Z.getItem(e),setLocalStorage=(e,t)=>
1a.Z.setItem(e,t),removeFromLocalStorage=e=>a.Z.removeItem(e),getToken=()=>{let e=getLocalStorage("t"),t=getLocalStorage("t_expiration");if(e&&t)return i.Z.saveToken(e,new Date(t||"")),e;i.Z.removeToken(),removeFromLocalStorage("t"),removeFromLocalStorage("t_expiration")},getDefaultMenuAction=e=>{let t=null==e?void 0:e.firstName,o=null==e?void 0:e.lastName,r=t?"".concat(t).concat(o?" "+o:""):"Customer Dashboard";return{label:r,role:n.v.CUSTOMER}},getMenuAction=()=>{let e=getLocalStorage("selectedMenuAction")||"",t=JSON.parse(e&&"undefined"!==e?e:"{}");return(null==t?void 0:t.label)?t:getDefaultMenuAction()},u=(0,c.Ue)()(e=>({token:getToken(),setToken:t=>{t?setLocalStorage("t",t):removeFromLocalStorage("t"),e({token:t})},setTokenExpiration:e=>{setLocalStorage("t_expiration",e)},menuAction:getMenuAction(),setMenuAction:t=>e(()=>(setLocalStorage("selectedMenuAction",JSON.stringify(t)),{menuAction:t})),resetData:()=>{removeFromLocalStorage("t"),removeFromLocalStorage("t_expiration"),removeFromLocalStorage("r"),removeFromLocalStorage("selectedMenuAction"),e({token:void 0,menuAction:void 0})}}))},32816:function(e,t,o){o.d(t,{Z:function(){return CookiesUtils}});var r=o(31531),s=o(47713);let safeGetCookie=e=>{try{return(0,s.getCookie)(e)}catch(e){return}},safeSetCookie=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];try{return(0,s.setCookie)(...t)}catch(e){}},safeDeleteCookie=function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];try{return(0,s.deleteCookie)(...t)}catch(e){}};let CookiesUtils=class CookiesUtils{};CookiesUtils.getPurchase=()=>{let e=safeGetCookie(r.L.PURCHASE)||"{}";try{return JSON.parse(e)}catch(e){return{}}},CookiesUtils.savePurchase=e=>{var t,o,s;let n={externalId:e.externalId,eventName:(null===(t=e.event)||void 0===t?void 0:t.name)||"",eventPath:(null===(s=e.event)||void 0===s?void 0:null===(o=s.url)||void 0===o?void 0:o.longUrl)||"",expirationTime:new Date(e.expirationTime||new Date),microformToken:""};safeSetCookie(r.L.PURCHASE,JSON.stringify(n),{expires:n.expirationTime})},CookiesUtils.removePurchase=()=>{safeDeleteCookie(r.L.PURCHASE)},CookiesUtils.getMicroformToken=()=>{let e=CookiesUtils.getPurchase();return(null==e?void 0:e.microformToken)||""},CookiesUtils.saveMicroformToken=e=>{let t=CookiesUtils.getPurchase();t.microformToken=e,safeSetCookie(r.L.PURCHASE,JSON.stringify(t),{expires:new Date(t.expirationTime)})},CookiesUtils.getToken=()=>safeGetCookie(r.L.TOKEN)||"",CookiesUtils.saveToken=(e,t)=>{safeSetCookie(r.L.TOKEN,e,{expires:t})},CookiesUtils.removeToken=()=>{safeDeleteCookie(r.L.TOKEN)}},16547:function(e,t){t.Z={getItem(e){try{return window.localStorage.getItem(e)}catch(e){return null}},setItem(e,t){try{window.localStorage.setItem(e,t)}catch(e){}},removeItem(e){try{window.localStorage.removeItem(e)}catch(e){}}}},81466:function(e,t,o){o.d(t,{e:function(){return HttpClient},Z:function(){return a}});var r=o(28001),s=o(75810),n=o(16547);let ApiError=class ApiError extends Error{constructor(e,t,o){super(t),this.errorCode=e,this.apiResponse=o,Object.setPrototypeOf(this,new.target.prototype),this.name=ApiError.name}};let ApiResponse=class ApiResponse{static fromAxiosResponse(e){return new ApiResponse(e.status,e.data.success,e.data.content,e.data.errorCode||"",e.data.message)}static ok(e){return new ApiResponse(200,!0,e,"","OK")}static noResponseError(){return new ApiResponse(500,!1,null,"NO_RESPONSE_RECEIVED","An internal error occurred, please try again later")}static requestError(){return new ApiResponse(null,!1,null,"REQUEST_ERROR","An internal error occurred, please try again later")}onSuccess(e){return this.success&&e(this.content,this),this}onError(e){return this.success||e(this.message,this),this}getContentOrThrowError(){if(this.success)return this.content;throw new ApiError(this.errorCode,this.message,this)}getContentOrElse(e){return this.success?this.content:e()}getHttpStatusCode(){return this.httpStatusCode}isSuccess(){return this.success}getErrorCode(){return this.errorCode}getMessage(){return this.message}constructor(e,t,o,r,s){this.httpStatusCode=e,this.success=t,this.content=o,this.errorCode=r,this.message=s}};var i=o(54829);let HttpClient=class HttpClient{addBaseConfig(e,t){t&&(e.headers||(e.headers={}),e.headers.Authorization="Bearer ".concat(t))}async generateConfig(e){let t=e||{},o=n.Z.getItem(r.d.TOKEN);return o&&this.addBaseConfig(t,o),t}getBaseUrl(){return this.client.defaults.baseURL}
1handleAxiosRequestError(e){return e.response?ApiResponse.fromAxiosResponse(e.response):e.request?ApiResponse.noResponseError():ApiResponse.requestError()}async get(e,t){return this.client.get(e,await this.generateConfig(null==t?void 0:t.axiosConfig)).then(e=>ApiResponse.fromAxiosResponse(e)).catch(e=>this.handleAxiosRequestError(e))}async post(e,t,o){return this.client.post(e,t,await this.generateConfig(null==o?void 0:o.axiosConfig)).then(e=>ApiResponse.fromAxiosResponse(e)).catch(e=>this.handleAxiosRequestError(e))}async put(e,t,o){return this.client.put(e,t,await this.generateConfig(null==o?void 0:o.axiosConfig)).then(e=>ApiResponse.fromAxiosResponse(e)).catch(e=>this.handleAxiosRequestError(e))}async delete(e,t){return this.client.delete(e,await this.generateConfig(null==t?void 0:t.axiosConfig)).then(e=>ApiResponse.fromAxiosResponse(e)).catch(e=>this.handleAxiosRequestError(e))}constructor(e,t){this.client=i.Z.create({baseURL:e,timeout:t||5e3,headers:{"Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"}}),this.generateConfig().then(e=>{var t;i.Z.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),(null===(t=e.headers)||void 0===t?void 0:t.Authorization)&&(i.Z.defaults.headers.common.Authorization=e.headers.Authorization)}),this.client.interceptors.response.use(e=>e,e=>{if(e.response&&401===e.response.status){let e=window.location.pathname+window.location.search;e&&"/"!==e&&"/login"!==e&&n.Z.setItem(r.d.ON_LOGIN_REDIRECTION,e),r.F.getState().setToken(void 0)}return Promise.reject(e)})}};var a=new HttpClient(s.ZP.baseURL,s.ZP.requestTimeout)},51339:function(e,t,o){var r=o(75810),s=o(81466);let HttpClientIntegrations=class HttpClientIntegrations extends s.e{constructor(e,t){super(e,t)}};t.Z=new HttpClientIntegrations(r.ZP.integrationsBaseURL,r.ZP.requestTimeout)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.