"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4621],{24621:function(t,e,a){a.d(e,{SY:function(){return te},ON:function(){return U},GN:function(){return M},ZI:function(){return H},$v:function(){return J},ax:function(){return $},JR:function(){return G},Xl:function(){return D},sw:function(){return X},wG:function(){return tn},Zb:function(){return ta},gQ:function(){return tr},sf:function(){return Y},pn:function(){return ts},DO:function(){return tt},Fc:function(){return V},EK:function(){return tc},W4:function(){return L}});var n=a(83464),s=a(64131),c=a(88810);let r="https://auth.primuslearning.io/",i={headers:{"Content-Type":"multipart/form-data"}},o=n.Z.create({baseURL:r,headers:{Accept:"application/json"}});class u{updateCancelToken(){this.source=this.CancelToken.source()}constructor(t=!0){this.get=(t,e,a)=>{let n={params:e,cancelToken:this.source.token};return void 0===a&&(a=this.useAccessToken),a&&(n.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),o.get("".concat(r).concat(t),n)},this.post=(t,e,a,n)=>{let i={...a,cancelToken:this.source.token};return n?i.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}:n=this.useAccessToken,o.post("".concat(r).concat(t),e,i)},this.patch=(t,e,a,n)=>{let i={...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(i.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),o.patch("".concat(r).concat(t),e,{...i})},this.put=(t,e,a,n)=>{let i={headers:{},...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(i.headers.Authorization="Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))),o.put("".concat(r).concat(t),e,i)},this.delete=(t,e,a,n)=>{let i={...e,data:a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(i.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),o.delete("".concat(r).concat(t),i)},this.cancel=()=>{this.source.cancel("Explicitly cancelled HTTP request"),this.updateCancelToken()},this.createQueryStrings=t=>{if(null!==t){let e=Object.fromEntries(Object.entries(t).filter(t=>{let[e,a]=t;return""!==a&&"none"!==a||null!==a||void 0!==a}));return Object.keys(e).map(t=>"".concat(t,"=").concat(encodeURIComponent(e[t]))).join("&")}return""},this.CancelToken=n.Z.CancelToken,this.source=this.CancelToken.source(),this.useAccessToken=t,o.interceptors.request.use(t=>{if(this.useAccessToken){let e=s.Z.get(c.FW.ACCESS_TOKEN);e&&(t.headers.Authorization="Bearer ".concat(e))}return t},t=>Promise.reject(t)),o.interceptors.response.use(t=>{if(t){var e;let a=null===(e=t.data.data)||void 0===e?void 0:e.access_token;a&&(document.cookie="".concat(c.FW.ACCESS_TOKEN,"=").concat(a,"; path=/; max-age=").concat(259200))}return t},async t=>{var e;return null===(e=t.response)||void 0===e||e.status,Promise.reject(t)})}}var h=u;class p extends h{async loginFn(t){return(await this.post("".concat(this.prefix,"/login"),t)).data}async loginWithGoogleFn(t){return(await this.post("".concat(this.prefix,"/google"),t)).data}async registerLecturerFn(t){return(await this.post("".concat(this.prefix,"/register/lecturer"),t)).data}async registerStudentFn(t){return(await this.post("".concat(this.prefix,"/register/student"),t)).data}async myUserProfileFn(){return(await this.get("".concat(this.prefix,"/me"))).data}async updateProfileFn(t){return(await this.patch("".concat(this.prefix,"/update"),t)).data}async logoutFn(){return(await this.post("".concat(this.prefix,"/logout"),{})).data}async forgotPasswordFn(t){return(await this.post("".concat(this.prefix,"/forgot-password"),t)).data}async resetPasswordFn(t){return(await this.post("".concat(this.prefix,"/reset-password"),t)).data}async verifyEmailFn(t){return(await this.post("".concat(this.prefix,"/verify-email"),t)).data}constructor(){super(),this.prefix="v2/auth"}}class d extends h{async getUsersFn(){return(await this.get("".concat(this.prefix))).data}async getUserByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createUserFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateCurrentUserFn(t){return(await this.patch("".concat(this.prefix,"/update"),t)).data}async updateProfilePhotoFn(t){return(await this.post("".concat(this.prefix,"/upload_photo"),t,i)).data}async deleteProfilePhotoFn(){return(await this.delete("".concat(this.prefix,"/delete_photo"))).data}constructor(){super(),this.prefix="v2/users"}}let l="https://api.primuslearning.io/",y={headers:{"Content-Type":"multipart/form-data"}},f=n.Z.create({baseURL:l,headers:{Accept:"*/*"}});class g{updateCancelToken(){this.source=this.CancelToken.source()}constructor(t=!0){this.get=(t,e,a)=>{let n={params:e,cancelToken:this.source.token};return void 0===a&&(a=this.useAccessToken),a&&(n.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),f.get("".concat(l).concat(t),n)},this.post=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return n?r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}:n=this.useAccessToken,f.post("".concat(l).concat(t),e,r)},this.patch=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),f.patch("".concat(l).concat(t),e,{...r})},this.put=(t,e,a,n)=>{let r={headers:{},...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers.Authorization="Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))),f.put("".concat(l).concat(t),e,r)},this.delete=(t,e,a,n)=>{let r={...e,data:a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),f.delete("".concat(l).concat(t),r)},this.cancel=()=>{this.source.cancel("Explicitly cancelled HTTP request"),this.updateCancelToken()},this.createQueryStrings=t=>{if(null!==t){let e=Object.fromEntries(Object.entries(t).filter(t=>{let[e,a]=t;return""!==a&&"none"!==a||null!==a||void 0!==a}));return Object.keys(e).map(t=>"".concat(t,"=").concat(encodeURIComponent(e[t]))).join("&")}return""},this.CancelToken=n.Z.CancelToken,this.source=this.CancelToken.source(),this.useAccessToken=t,f.interceptors.request.use(t=>{if(this.useAccessToken){let e=s.Z.get(c.FW.ACCESS_TOKEN);e&&(t.headers.Authorization="Bearer ".concat(e))}return t},t=>Promise.reject(t)),f.interceptors.response.use(t=>{if(t){var e;let a=null===(e=t.data.data)||void 0===e?void 0:e.access_token;a&&(document.cookie="".concat(c.FW.ACCESS_TOKEN,"=").concat(a,"; path=/; max-age=").concat(259200))}return t},async t=>{var e;return null===(e=t.response)||void 0===e||e.status,Promise.reject(t)})}}var x=g;class w extends x{async getAnnouncementsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getAnnouncementByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createAnnouncementFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateAnnouncementFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t.announcementId),t.payload)).data}async deleteAnnouncementFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}constructor(){super(),this.prefix="v1/announcements"}}class F extends x{async getCalendarsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getCalendarByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createCalendarFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateCalendarFn(t){let{calendarId:e,payload:a}=t;return(await this.patch("".concat(this.prefix,"/").concat(e),a)).data}async deleteCalendarFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}constructor(){super(),this.prefix="v1/calendars"}}class m extends x{async sendMessageFn(t){return(await this.post("".concat(this.prefix),t)).data}constructor(){super(),this.prefix="v1/contact-us"}}class C extends x{async getCategoriesFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getCategoryByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createCategoryFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateCategoryFn(t){let{categoryId:e,payload:a}=t;return(await this.patch("".concat(this.prefix,"/").concat(e),a)).data}async deleteCategoryFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}constructor(){super(),this.prefix="v1/categories"}}class k extends x{async getCoursesFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getCourseByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createCourseFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateCourseFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t.courseId),t.payload)).data}async deleteCourseFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}async getCourseSectionsFn(t){return(await this.get("".concat(this.prefix,"/").concat(t,"/sections"))).data}async createCourseSectionFn(t){return(await this.post("".concat(this.prefix,"/").concat(t.courseId,"/sections"),t.payload)).data}async publishCourseFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/publish"),e)).data}async getCourseEnrolmentsFn(t){return(await this.get("".concat(this.prefix,"/").concat(t,"/enrollments/courseEnrollments"))).data}async createCourseEnrollmentFn(t){return(await this.post("".concat(this.prefix,"/").concat(t,"/enrollments"),{})).data}async getCourseIntractorsOptionsFn(){return(await this.get("lecturers/options")).data}async addCourseIntructorsFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/instructors"),{instructors:e})).data}constructor(){super(),this.prefix="v1/courses"}}class S extends x{async getCourseCategoriesFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getCourseCategoryByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createCourseCategoryFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateCourseCategoryFn(t){let{categoryId:e,payload:a}=t;return(await this.patch("".concat(this.prefix,"/").concat(e),a)).data}async deleteCourseCategoryFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}constructor(){super(),this.prefix="v1/courseCategories"}}class T extends x{async getCourseEnrollmentsFn(t){let e=this.createQueryStrings({...t,tab:t.tab||"enrolled"});return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getCourseEnrollmentByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async approveCourseEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/approve"),{})).data}async rejectCourseEnrollmentFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/reject"),e)).data}async suspendCourseEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/suspend"),{})).data}async unsuspendCourseEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/unsuspend"),{})).data}async getCourseProgressByIdFn(t){return(await this.get("".concat(this.progressPrefix,"/").concat(t))).data}async createCourseEnrollmentProgressFn(t,e){return(await this.post("".concat(this.progressPrefix,"/").concat(t),{})).data}async updateCourseProgressFn(t,e){return(await this.patch("".concat(this.progressPrefix,"/").concat(t),e)).data}async deleteCourseProgressFn(t){return(await this.delete("".concat(this.progressPrefix,"/").concat(t))).data}async addLectureToCourseProgressFn(t,e){return(await this.patch("".concat(this.progressPrefix,"/").concat(t,"/add-lecture/").concat(e),{})).data}async removeLectureFromCourseProgressFn(t,e){return(await this.delete("".concat(this.progressPrefix,"/").concat(t,"/remove-lecture/").concat(e),{})).data}async addSectionToCourseProgressFn(t,e){return(await this.patch("".concat(this.progressPrefix,"/").concat(t,"/add-section/").concat(e),{})).data}async removeSectionFromCourseProgressFn(t,e){return(await this.delete("".concat(this.progressPrefix,"/").concat(t,"/remove-section/").concat(e),{})).data}constructor(){super(),this.prefix="v1/courseEnrollments",this.progressPrefix="v1/courseProgresses"}}class v extends x{async getEnrollmentsFn(t){let e=this.createQueryStrings({...t,tab:t.tab||"enrolled"});return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getEnrollmentByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async getEnrollmentPaymentsFn(t,e){let a=this.createQueryStrings(e);return(await this.get("".concat(this.subPrefix,"/").concat(t,"/payments?").concat(a))).data}async createEnrollmentPaymentFn(t,e){return(await this.post("".concat(this.subPrefix,"/").concat(t,"/payments"),e,y)).data}async approveEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/approve"),{})).data}async rejectEnrollmentFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/reject"),e)).data}async suspendEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/suspend"),{})).data}async unsuspendEnrollmentFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/unsuspend"),{})).data}async updateEnrollmentFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t),e)).data}constructor(){super(),this.prefix="v1/enrollments",this.subPrefix="v1/enrollment"}}class E extends x{async updateLectureFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t),e)).data}async deleteLectureFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}async getLectureByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}constructor(){super(),this.prefix="v1/lectures"}}class P extends x{async getProgressesFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getProgressesByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createProgressOfEnrollmentFn(t,e){return(await this.post("".concat(this.prefix,"/").concat(t),{})).data}async updateProgressOfEnrollmentFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t),e)).data}async addLectureToProgressFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/add-lecture/").concat(e),{})).data}async removeLectureFromProgressFn(t,e){return(await this.delete("".concat(this.prefix,"/").concat(t,"/remove-lecture/").concat(e),{})).data}async addSectionToProgressFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/add-section/").concat(e),{})).data}async removeSectionFromProgressFn(t,e){return(await this.delete("".concat(this.prefix,"/").concat(t,"/remove-section/").concat(e),{})).data}constructor(){super(),this.prefix="v1/progresses"}}class A extends x{async getSessionsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getSessionByIdFn(t,e){let a=this.createQueryStrings(e);return(await this.get("".concat(this.prefix,"/").concat(t,"?").concat(a))).data}async getSessionSectionsFn(t){return(await this.get("".concat(this.prefix,"/").concat(t,"/sections"))).data}async getSessionEnrollmentsFn(t,e){let a=this.createQueryStrings(e);return(await this.get("".concat(this.prefix,"/").concat(t,"/enrollments/sessionEnrollments?").concat(a))).data}async createSessionEnrollmentsFn(t){return(await this.post("".concat(this.prefix,"/").concat(t,"/enrollments"),{})).data}async approveSessionFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/approve"),{})).data}async rejectSessionFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/reject"),{})).data}async publishSessionFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/publish"),e)).data}async createSessionFn(t){return(await this.post("".concat(this.prefix),t)).data}async createSessionSectionsFn(t){return(await this.post("".concat(this.prefix,"/").concat(t.sessionId,"/sections"),t.payload)).data}async updateSessionFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t.sessionId),t.payload)).data}async deleteSessionFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}async refreshSessionFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/refresh"),{})).data}async getIntractorsOptionsFn(){return(await this.get("lecturers/options")).data}async addIntructorsFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t,"/instructors"),{instructors:e})).data}async getUserByIdFn(t){return(await this.get("users/".concat(t))).data}async updateUserByIdFn(t){return(await this.patch("users/".concat(t.userId),t.payload)).data}constructor(){super(),this.prefix="v1/sessions"}}class _ extends x{async getSectionsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getSectionByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createSectionFn(t,e){return(await this.post("".concat(this.sessionPrefix,"/").concat(t,"/sections"),e)).data}async createSectionLecturesFn(t,e){return(await this.post("".concat(this.prefix,"/").concat(t,"/lectures"),e)).data}async updateSectionFn(t,e){return(await this.patch("".concat(this.prefix,"/").concat(t),e)).data}async deleteSectionFn(t,e){return(void 0!==e?await this.delete("".concat(this.prefix,"/").concat(t,"?acknowledge=").concat(e)):await this.delete("".concat(this.prefix,"/").concat(t))).data}async updateSectionLectureFn(t,e,a){return(await this.post("v1/lectures/".concat(t,"/upload"),e,a)).data}constructor(){super(),this.prefix="v1/sections",this.sessionPrefix="v1/session"}}class I extends x{async getPaymentsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getPaymentByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createPaymentFn(t){return(await this.post("".concat(this.prefix),t)).data}async getPaymentByEnrollmentIdFn(t){return(await this.get("".concat(this.prefix,"/enrollment/").concat(t))).data}async updatePaymentFn(t){let{paymentId:e,payload:a}=t;return(await this.patch("".concat(this.prefix,"/").concat(e),a)).data}async getAdminPaymentsFn(){return(await this.get("".concat(this.adminPrefix))).data}async approvePaymentFn(t){return(await this.patch("".concat(this.adminPrefix,"/").concat(t,"/approve"),{})).data}async rejectPaymentFn(t){return(await this.patch("".concat(this.adminPrefix,"/").concat(t.paymentId,"/reject"),t.payload)).data}constructor(){super(),this.prefix="v1/payments",this.adminPrefix="v1/admin/payments"}}let O="https://payment.primuslearning.io/",B=n.Z.create({baseURL:O,headers:{Accept:"*/*"}});class b{updateCancelToken(){this.source=this.CancelToken.source()}constructor(t=!0){this.get=(t,e,a)=>{let n={params:e,cancelToken:this.source.token};return void 0===a&&(a=this.useAccessToken),a&&(n.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),B.get("".concat(O).concat(t),n)},this.post=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return n?r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}:n=this.useAccessToken,B.post("".concat(O).concat(t),e,r)},this.patch=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),B.patch("".concat(O).concat(t),e,{...r})},this.put=(t,e,a,n)=>{let r={headers:{},...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers.Authorization="Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))),B.put("".concat(O).concat(t),e,r)},this.delete=(t,e,a,n)=>{let r={...e,data:a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),B.delete("".concat(O).concat(t),r)},this.cancel=()=>{this.source.cancel("Explicitly cancelled HTTP request"),this.updateCancelToken()},this.createQueryStrings=t=>{if(null!==t){let e=Object.fromEntries(Object.entries(t).filter(t=>{let[e,a]=t;return""!==a&&"none"!==a||null!==a||void 0!==a}));return Object.keys(e).map(t=>"".concat(t,"=").concat(encodeURIComponent(e[t]))).join("&")}return""},this.CancelToken=n.Z.CancelToken,this.source=this.CancelToken.source(),this.useAccessToken=t,B.interceptors.request.use(t=>{if(this.useAccessToken){let e=s.Z.get(c.FW.ACCESS_TOKEN);e&&(t.headers.Authorization="Bearer ".concat(e))}return t},t=>Promise.reject(t)),B.interceptors.response.use(t=>{if(t){var e;let a=null===(e=t.data.data)||void 0===e?void 0:e.access_token;a&&(document.cookie="".concat(c.FW.ACCESS_TOKEN,"=").concat(a,"; path=/; max-age=").concat(259200))}return t},async t=>{var e;if((null===(e=t.response)||void 0===e?void 0:e.status)!==403)return Promise.reject(t)})}}var N=b;class Z extends N{async requestCampaySessionPaymentInInstallments(t){return(await this.post("".concat(this.campayPrefix,"/request_session_payment_in_installments"),t)).data}async requestCampaySessionPaymentInFull(t){return(await this.post("".concat(this.campayPrefix,"/request_session_payment_in_full"),t)).data}async requestCampayCoursePayment(t){return(await this.post("".concat(this.campayPrefix,"/request_course_payment"),t)).data}async requestStripeSessionPaymentInInstallments(t){return(await this.post("".concat(this.stripePrefix,"/request_session_payment_in_installments"),t)).data}async requestStripeSessionPaymentInFull(t){return(await this.post("".concat(this.stripePrefix,"/request_session_payment_in_full"),t)).data}async requestStripeCoursePayment(t){return(await this.post("".concat(this.stripePrefix,"/request_course_payment"),t)).data}async requestPaystackSessionPaymentInInstallments(t){return(await this.post("".concat(this.paystackPrefix,"/request_session_payment_in_installments"),t)).data}async requestPaystackSessionPaymentInFull(t){return(await this.post("".concat(this.paystackPrefix,"/request_session_payment_in_full"),t)).data}async requestPaystackCoursePayment(t){return(await this.post("".concat(this.paystackPrefix,"/request_course_payment"),t)).data}async getTransactions(t){let{page:e,perPage:a}=t,n=this.createQueryStrings({page:e,perPage:a});return(await this.get("transactions?".concat(n))).data}async getSessionTransactionByPaymentId(t){return(await this.get("session_transactions/".concat(t))).data}async getCourseTransactionByPaymentId(t){return(await this.get("course_transactions/:payment_id?payment_id".concat(t))).data}constructor(){super(),this.campayPrefix="campay",this.stripePrefix="stripe",this.paystackPrefix="paystack"}}let j="https://meet.primuslearning.io/",K=n.Z.create({baseURL:j,headers:{Accept:"*/*"}});class W{updateCancelToken(){this.source=this.CancelToken.source()}constructor(t=!0){this.get=(t,e,a)=>{let n={params:e,cancelToken:this.source.token};return void 0===a&&(a=this.useAccessToken),a&&(n.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),K.get("".concat(j).concat(t),n)},this.post=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return n?r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}:n=this.useAccessToken,K.post("".concat(j).concat(t),e,r)},this.patch=(t,e,a,n)=>{let r={...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),K.patch("".concat(j).concat(t),e,{...r})},this.put=(t,e,a,n)=>{let r={headers:{},...a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers.Authorization="Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))),K.put("".concat(j).concat(t),e,r)},this.delete=(t,e,a,n)=>{let r={...e,data:a,cancelToken:this.source.token};return void 0===n&&(n=this.useAccessToken),n&&(r.headers={Authorization:"Bearer ".concat(s.Z.get(c.FW.ACCESS_TOKEN))}),K.delete("".concat(j).concat(t),r)},this.cancel=()=>{this.source.cancel("Explicitly cancelled HTTP request"),this.updateCancelToken()},this.createQueryStrings=t=>{if(null!==t){let e=Object.fromEntries(Object.entries(t).filter(t=>{let[e,a]=t;return""!==a&&"none"!==a||null!==a||void 0!==a}));return Object.keys(e).map(t=>"".concat(t,"=").concat(encodeURIComponent(e[t]))).join("&")}return""},this.CancelToken=n.Z.CancelToken,this.source=this.CancelToken.source(),this.useAccessToken=t,K.interceptors.request.use(t=>{if(this.useAccessToken){let e=s.Z.get(c.FW.ACCESS_TOKEN);e&&(t.headers.Authorization="Bearer ".concat(e))}return t},t=>Promise.reject(t)),K.interceptors.response.use(t=>{if(t){var e;let a=null===(e=t.data.data)||void 0===e?void 0:e.access_token;a&&(document.cookie="".concat(c.FW.ACCESS_TOKEN,"=").concat(a,"; path=/; max-age=").concat(259200))}return t},async t=>{var e;if((null===(e=t.response)||void 0===e?void 0:e.status)!==403)return Promise.reject(t)})}}var q=W;class z extends q{async createMeeting(t){return(await this.post("".concat(this.prefix),t)).data}async getMeetingByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async getAllMeetingsFn(){return(await this.get("".concat(this.prefix))).data}async reProcessLastMeeting(t){return(await this.patch("".concat(this.prefix,"/webhook/reprocess"),{fileName:t})).data}async cleanServer(){return(await this.delete("".concat(this.prefix,"/clean/whereby-server"))).data}constructor(){super(),this.prefix="api/v1/meetings"}}class Q extends x{async getReviewsFn(t){let e=this.createQueryStrings(t);return(await this.get("".concat(this.prefix,"?").concat(e))).data}async getReviewByIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t))).data}async createReviewFn(t){return(await this.post("".concat(this.prefix),t)).data}async updateReviewFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t.reviewId),t.payload)).data}async deleteReviewFn(t){return(await this.delete("".concat(this.prefix,"/").concat(t))).data}async publishReviewFn(t){return(await this.patch("".concat(this.prefix,"/").concat(t,"/publish"),{})).data}async unpublishReviewFn(t){return await this.patch("".concat(this.prefix,"/").concat(t,"/unpublish"),{})}async getReviewsByReviewedItemIdFn(t){return(await this.get("".concat(this.prefix,"/").concat(t,"/reviewedItem"))).data}constructor(){super(),this.prefix="v1/reviews"}}class R extends x{async getAdminStatisticksFn(){return(await this.get("".concat(this.adminPrefix,"/statisticks"))).data}async getStudentStatisticksFn(){return(await this.get("".concat(this.studentPrefix,"/statisticks"))).data}constructor(){super(),this.adminPrefix="admin",this.studentPrefix="student"}}let U=new p,L=new d;new F;let H=new m,M=new C,G=new k,J=new S,$=new T,D=new v,X=new E,Y=new P,V=new A,tt=new _,te=new w,ta=new I,tn=new z,ts=new Q,tc=new R,tr=new Z},88810:function(t,e,a){a.d(e,{$S:function(){return r},FW:function(){return s}});var n,s,c=a(11614);(n=s||(s={})).ACCESS_TOKEN="myToken",n.REFRESH_TOKEN="refreshToken",n.USER_INFO="userInfo";let r=t=>{(0,c.setCookie)("myToken",t.access_token),(0,c.setCookie)("refreshToken",t.refresh_token),sessionStorage.setItem("userInfo",JSON.stringify(t.user))}}}]);