(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67479],{47196:function(e,t,r){"use strict";r.d(t,{d:function(){return f}});var n,o=r(51438),a=r(52951),s=r(9669),u=r.n(s),i=r(72958);!function(e){e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.TooManyRequests=429]="TooManyRequests",e[e.InternalServerError=500]="InternalServerError",e[e.Conflict=409]="Conflict"}(n||(n={}));var c={Accept:"application/json","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"},l=function(e){try{var t=null,r=null,n=null;if(t=(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("authToken"))||"",r=(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("refreshToken"))||"",((null===e||void 0===e?void 0:e.url.includes("/auth/verify-otp"))||(null===e||void 0===e?void 0:e.url.includes("/auth/social-login"))||(null===e||void 0===e?void 0:e.url.includes("/auth/login"))||(null===e||void 0===e?void 0:e.url.includes("/auth/firebase-token")))&&(n={Referal_url:document.referrer,Current_url:window.location.href,BrowserCodeName:navigator.appCodeName,BrowserName:navigator.appName,BrowserVersion:navigator.appVersion,CookiesEnabled:navigator.cookieEnabled,Platform:navigator.platform,userAgent:navigator.userAgent},e.headers["User-Logs"]=JSON.stringify(n)),null!=r&&"/user/logout"===(null===e||void 0===e?void 0:e.url)){var o={};if(null!==localStorage.getItem("persist:bs")){var a=JSON.parse(localStorage.getItem("persist:bs")),s=JSON.parse(a.auth);o=null===s||void 0===s?void 0:s.userData}n={user_id:null===o||void 0===o?void 0:o.user_id,Referal_url:document.referrer,Current_url:window.location.href,BrowserCodeName:navigator.appCodeName,BrowserName:navigator.appName,BrowserVersion:navigator.appVersion,CookiesEnabled:navigator.cookieEnabled,Platform:navigator.platform,userAgent:navigator.userAgent},e.headers["X-REFRESH-Token"]="".concat(r),e.headers["User-Logs"]=JSON.stringify(n)}return null!=t&&(e.headers["X-ACCESS-Token"]="".concat(t)),e}catch(u){throw new Error(u)}},h=function(){function e(){(0,o.Z)(this,e),this.instance=null,this.serialize=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")}}var t=e.prototype;return t.initHttp=function(){var e=this,t=u().create({baseURL:"".concat("https://apibs.business-standard.com"),headers:c,withCredentials:!1});return t.interceptors.request.use(l,(function(e){return Promise.reject(e)})),t.interceptors.response.use((function(e){return e}),(function(t){if(u().isAxiosError(t)){var r=t;r&&r.response,0;var n=t.response;return e.handleError(n)}})),this.instance=t,t},t.request=function(e){return this.http.request(e)},t.get=function(e,t,r){var n=this.serialize(t);return""==n?this.http.get(e,r):this.http.get(e+"?"+n,r)},t.post=function(e,t,r){return this.http.post(e,t,r)},t.put=function(e,t,r){return this.http.put(e,t,r)},t.delete=function(e,t){return this.http.delete(e,t)},t.handleError=function(e){var t=e.status,r=e.data,o=e.config;switch(t){case n.InternalServerError:case n.Forbidden:break;case n.Unauthorized:var a,s;if("/user/follow?"===(null===o||void 0===o?void 0:o.url)&&(null===r||void 0===r||null===(a=r.data)||void 0===a?void 0:a.jwtExpired));else if(null===r||void 0===r||null===(s=r.data)||void 0===s?void 0:s.jwtExpired)return(0,i.reTryWithRefreshToken)(o);case n.TooManyRequests:case n.Conflict:}return Promise.reject(e)},(0,a.Z)(e,[{key:"http",get:function(){return null!=this.instance?this.instance:this.initHttp()}}]),e}(),f=new h},44905:function(e,t){"use strict";t.Z=function(){var e=function(e){return"".concat(null!==e&&void 0!==e?e:"local","Storage")};return{getItem:function(t,r){return window[e(r)][t]},setItem:function(t,r,n){return window[e(n)].setItem(t,r),!0},removeItem:function(t,r){window[e(r)].removeItem(t)},removeAll:function(t){window[e(t)].clear()}}}},72958:function(e,t,r){"use strict";r.r(t),r.d(t,{CheckLinkedMobileFn:function(){return S},LoginSignUp:function(){return f},LoginWithFirebase:function(){return b},ResendOtp:function(){return g},SocialLogin:function(){return d},UpdateEmailMobile:function(){return v},VerifyOtp:function(){return p},activeUserSession:function(){return A},checkEmailWithPassword:function(){return L},confirmMultipleEmail:function(){return U},getAuthEmailOtp:function(){return T},getDialingCodes:function(){return m},getEmailTagWithMobile:function(){return C},getUserLastLoginTrack:function(){return M},loginStorage:function(){return k},loginWithPassword:function(){return N},reTryWithRefreshToken:function(){return y},saveUserLastLoginTrack:function(){return R},untagMobileNumber:function(){return I},updateUserSession:function(){return D},verifyAuthEmailOtp:function(){return E}});var n=r(47568),o=r(97582),a=r(47196),s=r(64763),u=r(44905),i=r(1809),c=r(96245),l=r(19748),h={success:!1,statusCode:101,data:{},message:""},f=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.LoginSignUp.url,t)];case 2:return[2,n.sent()];case 3:if(r=n.sent(),(0,l.Z)(r),h.message=r.toString(),400==r.status)throw r;return[2,h];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),d=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.SocialLogin.url,t)];case 2:return[2,n.sent()];case 3:return r=n.sent(),(0,l.Z)(r),h.message=r.toString(),[2,h];case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),p=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.VerifyOtp.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.data,r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),g=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.ResendOtp.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),v=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.put(s.Z.UpdateEmailMobile.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=(0,n.Z)((function(){var e;return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,a.d.get(s.Z.getDialingCodesApi.url,{})];case 1:return[2,t.sent()];case 2:return e=t.sent(),(0,l.Z)(e),h.message=e.toString(),[2,h];case 3:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),y=function(){var e=(0,n.Z)((function(e){var t,r,n,u,i,c,l;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:if(t=null,null==(t=(null===localStorage||void 0===localStorage?void 0:localStorage.getItem("refreshToken"))||null))return[3,6];o.label=1;case 1:return o.trys.push([1,5,,6]),[4,a.d.post(s.Z.RefreshToken.url,{refreshToken:t})];case 2:return(r=o.sent())&&r.data&&r.data.success&&r.data.data.authToken?(k().setDataToken(null===r||void 0===r||null===(n=r.data)||void 0===n||null===(u=n.data)||void 0===u?void 0:u.authToken,null===r||void 0===r||null===(i=r.data)||void 0===i||null===(c=i.data)||void 0===c?void 0:c.refreshToken),[4,a.d.request(e)]):[3,4];case 3:return[2,o.sent()];case 4:return[3,6];case 5:return o.sent(),k().logout(),l=window.location.pathname,window.location.href=void 0!==l&&"undefined"!==l&&null!==l&&""!==l?"/login?redirect_uri=".concat(l):"/login",[3,6];case 6:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),b=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.LoginWithFirebase.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.data,r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=(0,n.Z)((function(e,t){var r,n,u;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:r={success:!1,data:null,message:""},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,a.d.post(s.Z.CheckLinkedMobile.url,{mobileNo:e,countryId:t})];case 2:return n=o.sent(),r=n.data,[3,4];case 3:return u=o.sent(),console.log(u),u.data&&(r=u.data),[3,4];case 4:return[2,r]}}))}));return function(t,r){return e.apply(this,arguments)}}(),w=(0,u.Z)(),Z=w.getItem,_=w.setItem,k=(w.removeItem,w.removeAll,function(){var e=function(){var e=(0,n.Z)((function(){return(0,o.__generator)(this,(function(e){return localStorage.removeItem("log_in_source"),localStorage.removeItem("lastLoginCheck"),localStorage.removeItem("Subscriptionnow"),localStorage.removeItem("subscription_source"),localStorage.removeItem("article_data_store"),localStorage.removeItem("Subscription_successfully"),localStorage.removeItem("Planselect"),localStorage.removeItem("paid_article_url"),localStorage.removeItem("isCricketCube"),localStorage.removeItem("Gtmid"),localStorage.removeItem("firstUser"),localStorage.removeItem("invite-friend"),localStorage.removeItem("articleAuthore"),localStorage.removeItem("storyId"),localStorage.removeItem("login_method"),localStorage.removeItem("login_process"),localStorage.removeItem("payment_referrer"),localStorage.removeItem("persist:bs"),localStorage.removeItem("refreshToken"),localStorage.removeItem("followData"),localStorage.removeItem("firebase:host:business-standard-a4c35.firebaseio.com"),localStorage.removeItem("bookMark"),localStorage.removeItem("authToken"),localStorage.removeItem("SubExpiryTime"),[2]}))}));return function(){return e.apply(this,arguments)}}();return{setDataToken:function(e,t){_("authToken",e),t&&_("refreshToken",t)},isLoggedin:function(){return"undefined"!==typeof Z("authToken")&&null!==Z("authToken")&&""!=Z("authToken")},getToken:function(){return Z("authToken")?Z("authToken"):null},getUserData:function(){return Z("authToken")?(0,c.Z)(i.Z.clientDecrypt(Z("authToken"))):null},logout:e}}),I=function(){var e=(0,n.Z)((function(){var e;return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,a.d.put(s.Z.untagMobileNumber.url)];case 1:return[2,t.sent()];case 2:throw e=t.sent(),(0,l.Z)(e),h.message=e.toString(),e;case 3:return[2]}}))}));return function(){return e.apply(this,arguments)}}(),C=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.getEmailTagWithMobile.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),T=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.getAuthEmailOtp.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),E=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.verifyAuthEmailOtp.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.put(s.Z.confirmMultipleEmail.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a.d.post(s.Z.updateUserSession.url,e)];case 1:return[2,r.sent()];case 2:throw t=r.sent(),(0,l.Z)(t),h.message=t.toString(),t;case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),A=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a.d.get(s.Z.activeUserSession.url+"/"+e,{})];case 1:return[2,r.sent()];case 2:throw t=r.sent(),(0,l.Z)(t),h.message=t.toString(),t;case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),L=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.checkEmailWithPassword.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),N=function(){var e=(0,n.Z)((function(e){var t,r;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:t=e.bodyData,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,a.d.post(s.Z.loginWithPassword.url,t)];case 2:return[2,n.sent()];case 3:throw r=n.sent(),(0,l.Z)(r),h.message=r.toString(),r;case 4:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a.d.post("/user/user-last-login-track",e)];case 1:return[2,r.sent()];case 2:throw t=r.sent(),(0,l.Z)(t),h.message=t.toString(),t;case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,n.Z)((function(e){var t;return(0,o.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,a.d.get("/user/user-last-login-track",e)];case 1:return[2,r.sent()];case 2:throw t=r.sent(),(0,l.Z)(t),h.message=t.toString(),t;case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()},1809:function(e,t,r){"use strict";var n=r(51438),o=r(81354),a=r.n(o),s="c3a3aff9aaed423d8ad8115835a25339",u="d4760ccddd7b42738d5598f0023718a9",i=function(){function e(){(0,n.Z)(this,e),this.algorithm="aes-128-ctr",this.Cryptokey=a().enc.Utf8.parse(s),this.Cryptoiv=a().enc.Utf8.parse(u)}var t=e.prototype;return t.clientDecrypt=function(e){return e=e.replace(/,,/g,"/").replace(/~/g,"+"),a().AES.decrypt(e,this.Cryptokey,{iv:this.Cryptoiv,mode:a().mode.CBC,padding:a().pad.Pkcs7}).toString(a().enc.Utf8)},t.clientEncrypt=function(e){return a().AES.encrypt(e,this.Cryptokey,{iv:this.Cryptoiv,mode:a().mode.CBC,padding:a().pad.Pkcs7}).toString()},e}();t.Z=new i},42480:function(){}}]);