1import{a as e,r as t,D as a,R as n,i}from"./index.BRp5kj-w.js";import{c as s,g as o,an as m,b2 as r,a$ as c,b0 as l,x as g,y as _}from"./main.BuRnQBwN.js";import{V as d,N as p}from"./index.BbIB4ULq.js";import{a as f,b as u}from"./NotificationsFollowButton.BukFgumm.js";import"./staticTextEn.D6WYEa6V.js";import"./staticTextEs.Dnr1pprf.js";import"./staticTextDe.D946bWlw.js";import"./staticTextFr.Dw7JJU6I.js";import"./index.BnHznzJZ.js";import"./withIcon.BAD5jE3T.js";let E=class extends t.Component{componentDidMount(){const{props:e}=this,{auth:t,getSubscriptions:n}=e;a(t)&&n()}componentDidUpdate(e){const{props:t}=this,{auth:n,user:i,getSubscriptions:s}=t,{user:o}=e;i.getIn(["data","language",0],"en")!==o.getIn(["data","language",0],"en")&&a(n)&&s()}getDescriptionText(){const{props:e}=this,{subscriptions:t,staticText:a}=e;return t.size?a.getIn(["data","followingDesc"]):a.getIn(["data","followingEmpty"])}renderSeries(e){const{props:t}=this,{staticText:a}=t,i=e.get("id"),s=e.getIn(["node","keyart_16x9_withtext","keyart_304x171"],""),o=e.getIn(["node","path"],""),c=e.getIn(["node","title"],""),l=e.getIn(["node","total_seasons"],""),g=e.getIn(["node","total_episodes"],""),_=l>1?a.getIn(["data","season"],""):a.getIn(["data","seasons"],""),d=g>1?a.getIn(["data","episode"],""):a.getIn(["data","episodes"],"");return n.createElement("li",{className:"notif-manage__item",key:i},n.createElement("div",{className:"notif-manage__item-hero-container"},n.createElement(m,{className:"notif-manage__item-hero",to:o},n.createElement("img",{className:"notif-manage__item-img",src:s,alt:""}))),n.createElement("div",{className:"notif-manage__item-meta"},n.createElement("div",{className:"notif-manage__item-meta-title"},c),n.createElement("div",{className:"notif-manage__item-meta-counts"},`${l} ${_}, ${g} ${d}`)),n.createElement("div",{className:"notif-manage__fb"},n.createElement(f,{subscriptionType:r.SERIES,contentId:e.get("contentId"),type:u.PRIMARY_SMALL,uiLocation:"Notification List Page"})))}renderTerm(e){const t=e.get("id"),a=e.getIn(["term","termImages","tile","tile_374x156"],""),i=e.getIn(["term","name"],""),s=e.getIn(["contentType"],""),o=i.split(" ").join("-").toLowerCase(),c="topic"!==s?`/person/${o}`:`/topic/${o}`;return n.createElement("li",{className:"notif-manage__item notif-manage__item--term",key:t},n.createElement("div",{className:"notif-manage__item-hero-container"},n.createElement(m,{className:"notif-manage__item-hero",to:c},n.createElement("img",{className:"notif-manage__item-img",src:a,alt:""}))),n.createElement("div",{className:"notif-manage__item-meta"},n.createElement("div",{className:"notif-manage__item-meta-title"},i),n.createElement("div",{className:"notif-manage__item-meta-counts"},s)),n.createElement("div",{className:"notif-manage__fb"},n.createElement(f,{subscriptionType:r.TERM,contentId:e.get("contentId"),type:u.PRIMARY_SMALL,title:s,uiLocation:"Notification List Page"})))}renderMember(e,t){const a=e.get("id"),i=e.getIn(["member","image"],""),s=e.getIn(["member","title"],""),o=e.getIn(["member","url"],"");return n.createElement("li",{className:"notif-manage__item notif-manage__item--member",key:a},n.createElement("div",{className:"notif-manage__item-hero-container"},n.createElement(m,{className:i?"notif-manage__item-hero":"notif-manage__item-hero notif-manage__no-avatar",to:o},n.createElement("img",{className:"notif-manage__item-img",src:i,alt:""}))),n.createElement("div",{className:"notif-manage__item-meta"},n.createElement("div",{className:"notif-manage__item-meta-title"},s),n.createElement("div",{className:"notif-manage__item-meta-counts"},t.getIn(["data","member"]))),n.createElement("div",{className:"notif-manage__fb"},n.createElement(f,{subscriptionType:r.MEMBER,contentId:e.get("contentId"),type:u.PRIMARY_SMALL,uiLocation:"Notification List Page"})))}renderSubscriptions(){const{props:e}=this,{subscriptions:t,processing:a,staticText:i}=e;return!1!==a?n.createElement(c,{type:l}):t.isEmpty()?null:t.map(e=>{switch(e.get("type")){case r.SERIES:return this.renderSeries(e);case r.TERM:return this.renderTerm(e);
1case r.MEMBER:return this.renderMember(e,i);default:return null}})}render(){const{props:e}=this,{auth:t,location:i,staticText:s,processing:o}=e;return a(t)?n.createElement("div",{className:"notif-manage__grid notif-manage"},n.createElement(d,{location:i,navType:p}),n.createElement("div",{className:"notif-manage__content-box notif-manage__main"},n.createElement(g,{as:_.H4,className:"notif-manage__header"},s.getIn(["data","following"])),n.createElement("div",{className:"notif-manage__desc"},!1!==o?null:this.getDescriptionText()),n.createElement("ul",{className:"notif-manage__list"},this.renderSubscriptions()),n.createElement(m,{className:"notif-manage__find-more",to:"/all-series/series"},s.getIn(["data","findMoreOriginalPrograms"])))):null}};const b=s(t=>({auth:t.auth,user:t.user,processing:t.notifications.getIn(["subscriptions","processing"]),subscriptions:t.notifications.getIn(["subscriptions","data"],e.List()),staticText:t.staticText.getIn(["data","notificationsCenterManage"],e.Map())}),e=>{const t=o(e);return{createSubscriber:t.notifications.createSubscriber,removeSubscriber:t.notifications.removeSubscriber,getSubscriptions:t.notifications.getSubscriptions}})(E),I=i(Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"})));export{I as default}; 2//# sourceMappingURL=index.CN2vW9qT.js.map
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.