1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[80528],{66424:(t,e,n)=>{n.d(e,{$H:()=>F,Ax:()=>k,CH:()=>O,D2:()=>V,EW:()=>H,GZ:()=>z,Hb:()=>E,Hu:()=>h,K_:()=>P,Ot:()=>j,PI:()=>p,QV:()=>G,RG:()=>g,RU:()=>C,Tr:()=>b,Vm:()=>N,Wr:()=>w,Xo:()=>Y,Z0:()=>U,ZH:()=>l,_i:()=>$,ds:()=>m,fE:()=>_,fS:()=>S,fZ:()=>X,ff:()=>q,gV:()=>L,iH:()=>T,kE:()=>A,mU:()=>R,pz:()=>y,uk:()=>D,w:()=>Z,x1:()=>v,x2:()=>I,zX:()=>x});var r=n(90225),o=n(64714),u=n(86791),i=n.n(u),a=n(20708),c=n(63600),s=n(78674),d=n(50663),f=n(11501);function l(t){return{type:s.HfX,description:t}}function p(t){return{type:s.umL,description:t}}function y(t){return{type:s.Pxb,bookId:t}}function h(t){return{type:s.JM$,bookId:t}}function m(t,e,n){const r=n?{Authorization:`Token ${n}`}:{};return n=>(n(function(t){return{type:s.lRt,bookId:t}}(e)),a.Ay.delete(c._pf(t,e),{headers:r}).then((()=>n(function(t){return{type:s.hSS,bookId:t}}(e)))).catch((t=>{n(function(t,e){return{type:s.G4W,bookId:t,messageError:e}}(e,(0,o.vG)(t,f.F$q)))})))}function v(t,e,n,r,o,u){const f=r?{Authorization:`Token ${r}`}:{};return r=>{var l;e===d.wm.ALREADY_READ&&r(function(t){return{type:s.AiT,userId:t}}(t)),e===d.wm.FAVORITE&&r(function(t){return{type:s.L_X,userId:t}}(t)),e===d.wm.WANT_TO_READ&&r(function(t){return{type:s.cDJ,userId:t}}(t)),e===d.wm.CURRENTLY_READING&&r(function(t){return{type:s.O3P,userId:t}}(t)),e===d.wm.DNF&&r(function(t){return{type:s.LMz,userId:t}}(t));const p={limit:null!==o&&void 0!==o&&o.limit||!i()(o)?d.gL:void 0,offset:null===o||void 0===o||null===(l=o.offset)||void 0===l?void 0:l.toString(),search:u||void 0,ordering:n||void 0},y=n=>{e===d.wm.ALREADY_READ&&r(function(t,e,n){return{type:s.axR,userId:t,count:e.data.count,books:e.data.results,offset:n||0,next:e.data.next,previous:e.data.previous}}(t,n,null===o||void 0===o?void 0:o.offset)),e===d.wm.FAVORITE&&r(function(t,e,n){return{type:s.Ds,userId:t,count:e.data.count,books:e.data.results,offset:n||0}}(t,n,null===o||void 0===o?void 0:o.offset)),e===d.wm.WANT_TO_READ&&r(function(t,e,n){return{type:s.w3s,userId:t,count:e.data.count,books:e.data.results,offset:n||0}}(t,n,null===o||void 0===o?void 0:o.offset)),e===d.wm.CURRENTLY_READING&&r(function(t,e){return{type:s.alh,userId:t,count:e.data.count,books:e.data.results}}(t,n)),e===d.wm.DNF&&r(function(t,e,n){return{type:s.ZPh,userId:t,count:e.data.count,results:e.data.results,offset:n||0,next:e.data.next,previous:e.data.previous}}(t,n,null===o||void 0===o?void 0:o.offset))};return(0,a.Ay)(c.DI1(t,e),{headers:f,params:p}).then(y).catch((()=>{y({data:{count:0,results:[],next:"",previous:""}})}))}}function A(t){return{type:s.ZiO,bookId:t}}function _({userId:t,bookId:e,params:n,shelfType:r=d.wm.DNF}){return async u=>{try{u(function(t,e){return{type:s.MdT,userId:t,bookId:e}}(t,e)),await a.Ay.delete(c.ebh(t,e)),n?(u(A(null)),u(v(t,r,"","",n.pagination,n.keyword))):u(function(t,e){return{type:s.cwl,userId:t,bookId:e}}(t,e))}catch(i){u(function(t,e,n){return{type:s.VHg,userId:t,bookId:e,messageError:n}}(t,e,(0,o.vG)(i,f.F$q)))}}}function b(t,e,n,r){const u=r?{Authorization:`Token ${r}`}:{};return r=>(r(function(t){return{type:s.sk_,bookId:t}}(e)),a.Ay.delete(c.rEj(t,e),{headers:u}).then((()=>{const{orderType:e,pagination:o,keyword:u}=n;r(v(t,d.wm.WANT_TO_READ,e,"",o,u))})).catch((t=>{r(function(t,e){return{type:s.rbC,bookId:t,messageError:e}}(e,(0,o.vG)(t,f.F$q)))})))}function I(t,e,n,r,o,u){return i=>i(v(t,e,n,r,o,u))}function T(){return{type:s.cwE}}function E(){return{type:s.dGD}}function k(){return{type:s.Qjn}}function g(t,e,n,u,i,s,p){return y=>{y(T());const{videoFile:h,existingVideoUrl:m,is_public:A,is_contains_spoilers:_,...b}=e;return(0,a.Ay)({url:c.Vnh(t),method:"POST",data:b}).then((async e=>{const o=n||d.md.ORDER_BY_DATE_READ;if(e.data){const n={body:u,is_public:A,is_contains_spoilers:_,videoFile:h||void 0,existingVideoUrl:m||""};i?await y(r.Gm(t,e.data.id,i,n,!0,o,"",p)):u||h||m?await y(r.kD(t,e.data.id,n,!0,o,"",p)):(y(k()),await y(v(t,d.wm.ALREADY_READ,o,"",null===p||void 0===p?void 0:p.pagination,null===p||void 0===p?void 0:p.search)))}else y(k()),y(v(t,d.wm.ALREADY_READ,o,"",null===p||void 0===p?void 0:p.pagination,null===p||void 0===p?void 0:p.search));null===s||void 0===s||s(e.data.id,e.data)})).catch((t=>{y(E()),y(l((0,o.vG)(t,f.oXF)))}))}}function R(t,e){return{type:s.yut,bookId:t,reviewId:e}}function w(t,e){return n=>(n(function(t,e){return{type:s.fRm,bookId:t,reviewId:e}}(t,e)),(0,a.Ay)({url:c.RBn(t,e),method:"DELETE"}).then((()=>{n(function(t,e){return{type:s.vs$,bookId:t,reviewId:e}}(t,e))})).catch((r=>{n(function(t,e,n){return{type:s.Aw5,bookId:t,reviewId:e,messageError:n}}(t,e,(0,o.vG)(r,f.LyL)))})))}function D(){return{type:s.UJY}}function G(t,e){return{type:s.k$5,bookId:t,reviewId:e}}function O(t){return{type:s.PJu,bookId:t}}function H(){return{type:s.BYE}}function L(t,e,n,r,u){const i=r?{Authorization:`Token ${r}`}:{};return r=>(r(function(t){return{type:s.Ulp,bookId:t}}(e)),a.Ay.delete(c.EMr(t,e),{headers:i}).then((()=>
1{if(n){const{orderType:e,pagination:o,keyword:u}=n;r(H()),r(v(t,d.wm.ALREADY_READ,e,"",o,u))}else r(function(t){return{type:s.Gjf,bookId:t}}(e));null===u||void 0===u||u()})).catch((t=>{r(function(t,e){return{type:s.JJm,bookId:t,messageError:e}}(e,(0,o.vG)(t,f.F$q)))})))}function $(){return{type:s.Bk_}}function F(){return{type:s.qjs}}function P(){return{type:s.buR}}function N(t,e,n,u,s){return y=>{y($());const{videoFile:h,existingVideoUrl:m,...A}=e;return(0,a.Ay)({url:c.p6Y(t),method:"POST",data:A}).then((async e=>{var o,a;null===s||void 0===s||s();const c={offset:0,limit:d._G};if(e.data){const o={body:n,is_public:A.is_public,is_contains_spoilers:A.is_contains_spoilers,videoFile:h||void 0,existingVideoUrl:m||""};u?await y(r.Gm(t,e.data.id,u,o,!0,"",null,{pagination:c,search:""})):!i()(n)||h||m?await y(r.kD(t,e.data.id,o,!0,"",null,{pagination:c,search:""})):(y(P()),y(v(t,d.wm.FAVORITE,"","",c)))}else y(P()),y(v(t,d.wm.FAVORITE,"","",c));null!==(o=e.data)&&void 0!==o&&null!==(a=o.shelf_transition_info)&&void 0!==a&&a.message&&y(p(e.data.shelf_transition_info.message))})).catch((t=>{y(F()),y(l((0,o.vG)(t,f.oXF)))}))}}function x(t){return{type:s.qWT,bookId:t}}function U(t){return{type:s.qcy,bookId:t}}function V(t,e,n,r){const u=r?{Authorization:`Token ${r}`}:{};return r=>(r(function(t){return{type:s.FnF,bookId:t}}(e)),a.Ay.delete(c.Out(t,e),{headers:u}).then((()=>{r(v(t,d.wm.FAVORITE,"","",n))})).catch((t=>r(function(t,e){return{type:s.iMY,bookId:t,messageError:e}}(e,(0,o.vG)(t,f.F$q))))))}function C(t,e,n,r){const u=r?{Authorization:`Token ${r}`}:{};return r=>(r({type:s.V_3}),(0,a.Ay)({url:c.j$T(t),headers:u,params:n||{limit:5}}).then((t=>{r({type:s.jpu,data:t.data.results}),null===e||void 0===e||e()})).catch((t=>{r({type:s.HfX,description:(0,o.vG)(t,"Could not fetch your recommendations")}),r({type:s.w1k})})))}function S(t,e,n){const r=n?{Authorization:`Token ${n}`}:{};return n=>(n({type:s.pRq}),(0,a.Ay)({method:"POST",url:c.q0L(),headers:r,data:{book_pk:t}}).then((()=>{e&&n(C(e)),n({type:s.ZyR,bookId:t})})).catch((t=>{n({type:s.HfX,description:(0,o.vG)(t,"Could not dislike this recommendation")}),n({type:s.YT_})})))}function Z(t,e,n,r){return u=>(0,a.Ay)({url:c.DI1(t,e),method:"POST",data:n}).then((()=>{u(p(f.tby)),null===r||void 0===r||r(!1)})).catch((t=>{u(l((0,o.vG)(t,f.KP7))),null===r||void 0===r||r(!0)}))}function X(t,e,n){return r=>(0,a.Ay)({url:c.rEj(t,e),method:"PUT",data:n}).then((()=>{r(p(f.uTh)),r(function(t,e){return{type:s.lJt,bookId:t,privateNote:e}}(e,n.note))})).catch((t=>{r(l((0,o.vG)(t,f.ZlN)))}))}function q(t){return{type:s.FwM,book:t}}function z(){return{type:s.id9}}function Y(t){return{type:s.cNm,book:t}}function j(){return{type:s.TUu}}},70810:(t,e,n)=>{n.d(e,{Ex:()=>b,RX:()=>v,Tu:()=>T,_V:()=>w,_p:()=>D,aT:()=>I,bM:()=>G,i4:()=>H,mp:()=>E,ms:()=>h,nv:()=>m,r0:()=>A,vq:()=>O,xh:()=>g,zT:()=>k});var r=n(26658),o=n(80150),u=n(18971),i=n(64714),a=n(31916),c=n(87946),s=n.n(c),d=n(20708),f=n(63600),l=n(78674),p=n(50663);function y(t,e){return{type:l.Cgn,membershipId:t,membership:e.data}}function h(t,e){return(n,r)=>{const o=r().memberships||{},u=o.offset||0,i=o.limit||p.of,a=o.searchTerm||void 0,c=o.orderBy||void 0;return n({type:l.eCj,clubId:t}),(0,d.Ay)({url:f.WP1(t),params:{offset:u,limit:i,search:a,on_page:"memberships",ordering:c,...(null===e||void 0===e?void 0:e.is_admin)&&{is_admin:!0}}}).then((t=>{n({type:l.spF,count:s()(t,"data.count"),results:s()(t,"data.results"),offset:u,limit:i})}))}}function m(t,e){return n=>{n({type:l.Afy,orderBy:t}),n(h(e))}}function v(t,e,n){return r=>{r({type:l.KGH,searchTerm:t}),r(h(e,n))}}function A(t,e){return n=>{n({type:l.SsL,params:{offset:e||0}}),n(h(t))}}function _(t,e){return n=>(0,d.Ay)({url:f.oxV(t),params:e}).then((t=>{n({type:l.tFf,count:s()(t,"data.count"),results:s()(t,"data.results"),pageNumber:e.offset/p.of})}))}function b(t,e){return n=>(n({type:l.Z3K,pageNumber:e.offset/p.of}),n(_(t,e)))}function I(t,e,n){return(r,u)=>(0,d.Ay)({url:f.oxV(t),method:"DELETE",data:e}).then((()=>{const o=s()(u(),"invitation.results"),i=s()(u(),"invitation.pageNumber"),a=s()(u(),"invitation.count");if(!(Math.ceil(a/p.of)===i+1)||1===o.length&&i>0){const e=1===o.length&&i>0?i-1:i;r(_(t,{limit:p.of,offset:e*p.of}))}r({type:l.ZlD,id:e.id}),null===n||void 0===n||n()})).catch((t=>{null===n||void 0===n||n(),r((0,o.ZH)((0,i.vG)(t,"")))}))}function T(t,e,n,r,c){return(y,h)=>(0,d.Ay)({method:"DELETE",url:f.t$8(t.id,e)}).then((()=>{var e;const o=s()(h(),"memberships.results",[]),i=s()(h(),"memberships.offset"),d={...r,get_member_club_ids:s()(r,"get_member_club_ids",[]).filter((e=>e!==t.id))};if(y((0,u.r7)(d)),!n)return c();let f;(null===(e=t.club_premium_subscriptions)||void 0===e?void 0:e.registered_member_pk)===r.id&&(f={...t.club_premium_subscriptions,club_premium_tier:t.club_premium_tier,is_popup_after_delete_club:!1}),1===o.length&&i>
10&&(y(A(t.id,i-p.of)),c()),n.id===r.id&&a.s.setItem("clubIdMarkedForRemoval",String(t.id)),y(function(t,e,n){return{type:l.uxf,user:t,currentUserId:e,subscriptionInformation:n}}(n,r.id,f))})).catch((t=>{y((0,o.ZH)((0,i.vG)(t,"")))}))}function E(t,e,n,r){return(a,c)=>(0,d.Ay)({method:n,url:f.Q0E(t,e),data:r}).then((r=>{var o;if(null===(o=r.data)||void 0===o||!o.id)return a((0,u.me)()),a(v("",t));const i=s()(c(),"auth.userInfo");if(i&&s()(r,"data.member")===i.id){if("DELETE"===n)return a((0,u.me)()),a(v("",t));i.get_member_club_admin_ids.push(t),a({type:l.i8o,userInfo:i})}a(y(e,r))})).catch((t=>a((0,o.ZH)((0,i.vG)(t,"")))))}function k(t,e,n){return r=>(0,d.Ay)({method:n,url:f.Tne(t,e)}).then((t=>{r(y(e,t))})).catch((t=>r((0,o.ZH)((0,i.vG)(t,"")))))}function g(t,e,n,u){return a=>(0,d.Ay)({method:n,url:f.R3x(t,e),data:u}).then((n=>{a((0,r.Nf)(t)),a(y(e,n))})).catch((t=>a((0,o.ZH)((0,i.vG)(t,"")))))}function R(t){return(e,n)=>{const r=n().membersRequestToJoin||{},o=r.offset||0,u=r.limit||p.of,i=r.searchTerm||void 0;return e({type:l.nli,clubId:t}),(0,d.Ay)({url:f.OXH(t),params:{offset:o,limit:u,search:i}}).then((t=>{e({type:l.Jc$,count:s()(t,"count",0),results:s()(t,"data",[]),offset:o,limit:u})}))}}function w(t){return e=>{e({type:l.XtR,params:{offset:0}}),e(R(t))}}function D(t,e){return n=>{n({type:l.weg,searchTerm:t}),n(R(e))}}function G(t){return(e,n)=>{const r=n().membersRequestToJoin.offset+p.of;e({type:l.XtR,params:{offset:r}}),e(R(t))}}function O(t,e,n){return async r=>{await(0,d.Ay)({url:f.OXH(t),method:"PUT",data:e}).then((()=>{r(R(t)),r(h(t)),null===n||void 0===n||n()})).catch((t=>{r((0,o.ZH)((0,i.vG)(t,"")))}))}}function H({clubId:t,search:e,response:n}){return()=>(0,d.Ay)({url:f.WP1(t),params:{offset:0,limit:50,on_page:"messages",search:e}}).then((t=>{null===n||void 0===n||n(t.data.results)}))}},20114:(t,e,n)=>{n.d(e,{Al:()=>N,BF:()=>g,Dj:()=>P,KV:()=>w,Vd:()=>G,Xx:()=>b,Zj:()=>U,bp:()=>I,eJ:()=>x,fv:()=>V,hT:()=>F,hv:()=>T,qk:()=>k,rx:()=>R,st:()=>O,zd:()=>H,zj:()=>L});var r=n(26658),o=n(64714),u=n(87946),i=n.n(u),a=n(20708),c=n(63600),s=n(78674),d=n(11501);function f(){return{type:s.qR3}}function l(){return{type:s.lzQ}}function p(t){return{type:s.Ik_,emailAndNotificationSettings:t}}function y(){return{type:s.skJ}}function h(t){return{type:s.HfX,description:t}}function m(t){return{type:s.umL,description:t}}function v(){return{type:s.cQD}}function A(t){return{type:s.wJ1,data:t}}function _(){return{type:s.XNK}}function b(t){return async e=>{e(f());try{e(function(t){return{type:s.pPs,userInfo:t}}((await(0,a.Ay)({url:c.HS(),method:"PATCH",data:t})).data)),e(l()),e(m("Update successful"))}catch(n){e(y()),e(h((0,o.vG)(n,d.cHi)))}}}function I(t){return async e=>{try{e(p((await(0,a.Ay)({url:c.y$N(t),method:"GET"})).data))}catch{}}}function T(t,e){return async n=>{n(f());try{(await(0,a.Ay)({url:c.y$N(t),method:"PUT",data:e})).data&&(n(p(e)),n(l()),n(m(d._zF)))}catch(r){n(y()),n(h((0,o.vG)(r,d.cHi)))}}}function E(t){return{type:s.Ptf,settingsControls:t.data}}function k(t){return e=>a.Ay.get(c.Ke8(t)).then((t=>{e(E(t))})).catch((t=>{e(h((0,o.vG)(t,"")))}))}function g(t,e,n){return u=>(0,a.Ay)({url:`${c.Ke8(t)}`,method:"PUT",data:e}).then((e=>{u(E(e)),function(t,e,n){e((0,r.Nf)(t)).then((()=>null===n||void 0===n?void 0:n()))}(t,u,n)})).catch((t=>{null===n||void 0===n||n(t.response),u(h((0,o.vG)(t,"")))}))}function R(t,e){return()=>a.Ay.get(c._zo(t)).then((t=>{const n=i()(t,"data",[]).length;e(n)})).catch((()=>{e(0)}))}function w(t){return e=>a.Ay.get(c.mBr(t)).then((t=>{e(function(t){return{type:s.UZ9,categoriesOfClub:t.data.results}}(t))})).catch((()=>{e(h(d.gA$))}))}function D(t){return{type:s.UZ9,categoriesOfClub:t}}function G(t,e,n,r){return(o,u)=>(0,a.Ay)({method:"POST",url:c.mBr(t),data:e}).then((t=>{const e=t.data;let r=[...u().settings.categoriesOfClub];r=[...r,e],o(D(r)),n(t)})).catch((t=>{null===r||void 0===r||r(t)}))}function O(t,e,n,r,o){return(u,s)=>(0,a.Ay)({method:"PATCH",url:c.W1s(t,e),data:n}).then((t=>{const n=i()(t,"data"),o=[...s().settings.categoriesOfClub].map((t=>t.value===e?n:t));u(D(o)),r(t)})).catch((t=>{null===o||void 0===o||o(t)}))}function H(t,e,n,r){return(o,u)=>(0,a.Ay)({method:"DELETE",url:c.W1s(t,e.value),data:e}).then((t=>{const r=[...u().settings.categoriesOfClub].filter((t=>t.value!==e.value));o(D(r)),n(t)})).catch((t=>{null===r||void 0===r||r(t)}))}function L(t,e,n){return u=>(0,a.Ay)({method:"PUT",url:c.lHq(t),data:e}).then((()=>(u((0,r.Nf)(t)),u(m(d.cXI)),null===n||void 0===n?void 0:n()))).catch((t=>{u(h((0,o.vG)(t,d.xaA)))}))}function $(t){return{type:s.C_3,data:t}}function F(t){return e=>a.Ay.get(c.RKR(t)).then((t=>{e($(t.data||[]))})).catch((()=>{e($([]))}))}function P(t,e,n){return r=>(0,a.Ay)({url:`${c.RKR(t)}`,method:"POST",data:e}).then((()=>{!function(t,e,n){e(F(t)).then((()=>null===n||void 0===n?void 0:n()))}(t,r,n)})).catch((t=>{null===n||void 0===n||n(t.response),r(h((0,o.vG)(t,"")))}))}function N(t){return e=>(e({type:s.GtL}),(0,a.Ay)({url:`${c.SOc(t)}`,method:"GET"}).then((t=>{var n,r;e((r=null===(n=t.data.results)||void 0===n?void 0:n[0],{type:s.WdW,data:r}))})).catch((t=>{e({type:s.xp6}),e(h((0,o.vG)(t,"")))})))}function x(t,e,n){return r=>(r(v()),(0,a.Ay)({url:`${c.SOc(t)}`,method:"POST",data:e}).then((t=>{r(A(t.data)),n()})).catch((t=>{r(_()),r(h((0,o.vG)(t,"")))})))}function U(t,e,n,r){return u=>(u(v()),(0,a.Ay)({url:`${c.jvU(t,e)}`,method:"PATCH",data:n}).then((t=>{u(A(t.data)),r()})).catch((t=>{u(_()),u(h((0,o.vG)(t,"")))})))}function V(t,e,n){return r=>(r({type:s.QP_}),(0,a.Ay)({url:`${c.jvU(t,e)}`,method:"DELETE"}).then((()=>{r({type:s.aV}),n()})).catch((t=>{r({type:s.TYi}),r(h((0,o.vG)(t,"")))})))}}}]);
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.