1(this["webpackJsonpmedia-alliance-app"]=this["webpackJsonpmedia-alliance-app"]||[]).push([[46],{1034:function(e,t,a){"use strict";a.r(t);a(947);var s=a(1),n=a(799),c=a(157),i=a(34),l=a(25),r=(a(767),a(15)),d=a(196),o=a(24),j=a(3),h=a(12),b=a.n(h),u=(a(37),a(105)),m=a(2);var g=e=>{let{newsAgency:t,newsAgencyIcon:a,title:n,tags:i,date:h,image:g,newsLink:O,id:v,desc:x}=e;const[p,w]=Object(s.useState)(!1),{t:N}=Object(c.a)();return Object(m.jsxs)("div",{className:"news-article-container",children:[Object(m.jsxs)("div",{className:"news-agency-text-container",children:[Object(m.jsx)(l.b,{to:r.a.news.details.replace("{idNumber}",v),className:"news-article-text-link",children:Object(m.jsx)("div",{className:"news-article-title",children:n})}),Object(m.jsx)("p",{className:"news-article-description",children:x}),Object(m.jsxs)("div",{className:"news-article-date-tag-container",children:[Object(m.jsx)("div",{className:"news-article-tags",children:Array.isArray(i)&&i.length>0&&Object(m.jsx)("figure",{className:"news-article-tags-figure",children:Object(m.jsx)(o.d,{className:"news-article-tags-img"})})&&i?i.map((e,t)=>Object(m.jsx)(l.c,{to:r.a.news.tag.replace("{tagName}",encodeURIComponent(String(e))),className:"news-article-tag",children:e},t)):null}),Object(m.jsx)("p",{className:"news-date",title:new Date(h),children:h&&Object(d.a)(new Date(h))})]})]}),Object(m.jsx)(l.b,{to:r.a.news.details.replace("{idNumber}",encodeURIComponent(String(v))),className:"news-article-image-link",children:Object(m.jsx)("figure",{className:"news-image-container",children:Object(m.jsx)("img",{src:g?Object(u.a)(g):j.R,alt:"particular news",className:b()("news-article-image",{noImg:!g})})})})]})},O=a(21),v=a(19),x=a(20);function p(e,t){return Object(O.useQuery)(["fetchNews",e,t],()=>((e,t)=>Object(x.a)().get(v.a.news.channel.base.replace("{slug}",e).replace("{paginateNumber}",t)))(e,t),{retry:3})}var w=a(8),N=(a(768),a(22));var f=()=>{var e;const[t,a]=Object(s.useState)(15),n=Object(w.useLocation)().state.state.channel,{status:l,data:r}=p(n,t),[d,o]=Object(s.useState)([]);Object(s.useEffect)(()=>{a(15)},[n]),Object(s.useEffect)(()=>{"success"===l&&o(null===r||void 0===r?void 0:r.payload)},[l,r]);const{t:j}=Object(c.a)();return"loading"===l?Object(m.jsx)("div",{className:"spinner",children:Object(m.jsx)(i.default,{})}):Object(m.jsxs)(m.Fragment,{children:[Object(m.jsx)("div",{className:"news-article-bundle-container",children:Array.isArray(d)&&(null===r||void 0===r||null===(e=r.payload)||void 0===e?void 0:e.map(e=>Object(m.jsx)(g,{id:e.id,newsAgency:e.channel_name,newsAgencyIcon:e.channel_icon,title:e.title,content:e.description,tags:e.news_tags?e.news_tags.slice(0,4):null,date:e.created_at,image:e.image?e.image:null,newsLink:e.link,desc:e.description,removeMediahouse:!0},e.id)))}),"loading"===l?Object(m.jsx)(i.default,{}):Object(m.jsx)("div",{className:"left-news-block-button-container",children:Object(m.jsx)(N.a,{size:"large",bgColor:"grey",handleButtonClick:function(){"success"===l&&(o(e=>[...new Set([...e,...r.payload.slice(t-15,t)])]),a(t+15))},description:j("more"),center:!0})})]})},y=a(186),_=a(188),k=a(675),S=(a(645),a(648)),C=(a(646),a(948));a(55);var A=e=>{let{payload:t}=e;const a=Object(C.useHistory)();return Object(m.jsx)(m.Fragment,{children:Array.isArray(t)&&t.length>0&&t.map((e,t)=>Object(m.jsx)("div",{className:"dashboard-list-template-item-section",onClick:t=>((e,t)=>{let s=t.toLowerCase().replace(/\s+/g,"-");a.push(r.a.mediahub.replace(":channelName",s),{state:{channel:t}})})(0,null===e||void 0===e?void 0:e.channel_name),children:Object(m.jsxs)("div",{className:"dashboard-list-template-item-container",children:[Object(m.jsx)("figure",{className:"dashboard-list-template-item-figure",children:Object(m.jsx)("img",{src:Object(u.a)(null===e||void 0===e?void 0:e.channel_icon),alt:"",className:"dashboard-list-template-item-img"})}),Object(m.jsx)("div",{className:"dashboard-list-template-item-text-container",children:Object(m.jsx)("h3",{className:"dashboard-list-template-item-title",children:null===e||void 0===e?void 0:e.channel_name})})]})},t))})};var B=e=>{let{payload:t,title:a}=e;const s=t.slice(0,18);return Object(m.jsxs)("div",{className:"dashboard-list-template-container",children:[Object(m.jsx)("div",{className:"dashboard-list-template-title-img-container",children:Object(m.jsx)(S.a,{title:a})}),Object(m.jsx)("div",{className:"dashboard-list-template-list-container",children:Object(m.jsx)(A,{payload:s})})]})};t.default=()=>{var e;const t=Object(w.useLocation)().state.state.channel,{t:a}=Object(c.a)(),[i,l]=Object(s.useState)(""),{data:r}=Object(k.a)();return Object(s.useEffect)(()=>{var e;if((null===r||void 0===r||null===(e=r.payload)||void 0===e?void 0:e.length)>0){const e=null===r||void 0===r?void 0:r.payload.find(e=>e.channel_name===t);l(null===e||void 0===e?void 0:e.channel_icon)}},[r,t]),Object(m.jsx)(y.a,{children:Object(m.jsx)("main",{className:"container",children:Object(m.jsxs)("section",{className:"dashboard-main-news-section",children:[Object(m.jsxs)("div",{className:"margin-title",children:[Object(m.jsx)("figure",{className:"dashboard-list-template-item-figure",children:Object(m.jsx)("img",{src:Object(u.a)(i),alt:"",className:"dashboard-list-template-item-img"})}),Object(m.jsx)(_.a,{title:t})]}),Object(m.jsxs)("section",{className:"dashboard-main-news",children:[Object(m.jsx)("section",{className:"dashboard-main-news-left-side",children:Object(m.jsx)("article",{className:"dashboard-single-news-block-section",children:Object(m.jsx)(f,{})})}),Object(m.jsx)("section",{className:"dashboard-main-news-right-side",children:Object(m.jsxs)("article",{className:"dashboard-fresh-popular-trending-news-section",children:[Object(m.jsx)("div",{className:"dashboard-fresh-popular-trending-news-container",children:Object(m.jsx)(n.a,{})}),(null===r||void 0===r||null===(e=r.payload)||void 0===e?void 0:e.length)>0&&Object(m.jsx)(B,{payload:null===r||void 0===r?void 0:r.payload,title:a("mediahub.mediaList")})]})})]})]})})})}},566:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var s=a(577),n=(a(1),a(11)),c=(a(578),a(2));var i={Option:e=>{let{data:t,...a}=e;return t&&Object(c.jsx)(n.p.Option,{className:"input-select",...a,children:Object(c.jsxs)("div",{className:"input-selector",children:[t.icon&&Object(c.jsx)("img",{src:t.icon,alt:"Icon",className:"selector-flag"}),Object(c.jsx)("span",{children:t.label})]})})},SingleValue:e=>{let{data:t,...a}=e;return t&&Object(c.jsx)(n.p.SingleValue,{...a,children:Object(c.jsxs)("div",{className:"input-selector",children:[t.icon&&Object(c.jsx)("img",{src:t.icon,alt:"Icon",className:"selector-flag"}),Object(c.jsx)("span",{children:t.label})]})})}};t.b=s.a},577:function(e,t,a){"use strict";var s=a(1),n=a(586),c=a(185),i=a(2);t.a=e=>{let{...t}=e;
1const[a,l]=Object(s.useState)(!1),[r,d]=Object(s.useState)(!1),o={control:e=>({...e,border:a?1:t.border?t.border:"1px solid #d6d6d6",minHeight:"30px",height:t.height?t.height:"30px",width:t.width?t.width:"30px",boxShadow:t.boxShadow&&a?t.boxShadow:"none"}),option:(e,t)=>({...e,backgroundColor:a&&"#f6f6f6",color:a&&"black","&:hover":{backgroundColor:"#d6d6d6"},"z-index":"100"}),singleValue:(e,a)=>({...e,color:t.textColor,fontWeight:t.fontWeight,fontSize:t.singleValueFontSize,overflow:"visible"}),valueContainer:(e,a)=>({...e,height:t.height?t.height:"30px",padding:"0 6px"}),input:(e,t)=>({...e,margin:"0px"}),indicatorSeparator:e=>({display:"none"}),indicatorsContainer:(e,a)=>({height:t.height?t.height:"30px",...e}),dropdownIndicator:e=>({...e,color:t.color?t.color:"#a90000"})};return!0===t.async?Object(i.jsx)(n.a,{...t,styles:o,onMenuOpen:()=>l(!0),onMenuClose:()=>l(!1),onChange:null===t||void 0===t?void 0:t.handleOnChange,className:null===t||void 0===t?void 0:t.className,classNamePrefix:null===t||void 0===t?void 0:t.classNamePrefix,defaultValue:null===t||void 0===t?void 0:t.selectDefaultValue,value:null===t||void 0===t?void 0:t.selectValue,isSearchable:null===t||void 0===t?void 0:t.isSearchable,loadOptions:null===t||void 0===t?void 0:t.options}):Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(c.a,{...t,styles:o,onMenuOpen:()=>l(!0),onMenuClose:()=>l(!1),onChange:null===t||void 0===t?void 0:t.handleOnChange,className:null===t||void 0===t?void 0:t.className,classNamePrefix:null===t||void 0===t?void 0:t.classNamePrefix,defaultValue:null===t||void 0===t?void 0:t.selectDefaultValue,value:null===t||void 0===t?void 0:t.selectValue,isSearchable:null===t||void 0===t?void 0:t.isSearchable,options:null===t||void 0===t?void 0:t.options,onBlur:()=>d(!0)}),r&&t.error&&Object(i.jsx)("p",{className:"select-error",children:t.error})]})}},578:function(e,t,a){},588:function(e,t,a){"use strict";a.d(t,"c",function(){return c}),a.d(t,"a",function(){return i}),a.d(t,"d",function(){return l}),a.d(t,"g",function(){return r}),a.d(t,"f",function(){return o}),a.d(t,"b",function(){return j}),a.d(t,"e",function(){return h});var s=a(554),n=a(2);const c=()=>Object(n.jsx)(n.Fragment,{children:Array(4).fill(null).map((e,t)=>Object(n.jsxs)("div",{className:"dashboard-news-bundle-skt",children:[Object(n.jsxs)("div",{className:"dashboard-news-bundle-skt__desc",children:[Object(n.jsx)(s.a,{height:"1.5rem",width:"30%"}),Object(n.jsx)(s.a,{height:30,width:"80%"}),Object(n.jsx)(s.a,{height:50,width:"100%"})]}),Object(n.jsx)("div",{className:"dashboard-news-bundle-skt__img",style:{width:"250px"},children:Object(n.jsx)(s.a,{height:"7.5rem",width:"100%"})})]},t))});const i=e=>{let{height:t,marginBottom:a}=e;return Object(n.jsx)("div",{style:{width:"100%",height:t||"100%",marginBottom:a},children:Object(n.jsx)(s.a,{height:"100%",width:"100%"})})};const l=e=>{let{showBullets:t=!1,height:a="3.5rem",gap:c="1rem",numbersOfBullet:i=5,showHeader:l=!1,headerProps:r={headerHeight:"2.5rem",headerWidth:"50%",headerBottomGap:"2rem"}}=e;return Object(n.jsxs)(n.Fragment,{children:[l&&Object(n.jsx)("div",{style:{width:null===r||void 0===r?void 0:r.headerWidth,marginBottom:r.headerBottomGap},children:Object(n.jsx)(s.a,{height:null===r||void 0===r?void 0:r.headerHeight,width:null===r||void 0===r?void 0:r.headerWidth})}),Array.from({length:i}).map((e,i)=>Object(n.jsxs)("div",{className:"list-skeleton__wrapper",children:[t&&Object(n.jsx)("div",{style:{width:a,marginRight:c},children:Object(n.jsx)(s.a,{height:a,width:a})}),Object(n.jsx)("div",{className:"list-skeleton__wrapper--body",children:Object(n.jsx)(s.a,{height:a,width:"100%"})})]},i))]})};const r=()=>Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{className:"videos-skeleton",children:Array(8).fill(null).map((e,t)=>Object(n.jsxs)("div",{className:"video-skeleton__wrapper",children:[Object(n.jsx)(s.a,{className:"video-skeleton"}),Object(n.jsx)(s.a,{height:20,width:"100%"}),Object(n.jsx)(s.a,{height:20,width:"100%"})]},t))})});var d=a(83);const o=()=>{const e=Object(d.a)("(max-width: 992px)");return Object(n.jsxs)("div",{className:"news-detail-skeleton",children:[Object(n.jsxs)("div",{className:"news-detail-skeleton__main-news",children:[Object(n.jsx)("div",{className:"news-detail-skeleton__headline",children:Object(n.jsx)(i,{height:e?"3rem":"6.25rem",width:"100%"})}),Object(n.jsx)(i,{height:e?"18rem":"31.25rem",width:"100%",marginBottom:"1.8rem"}),Object(n.jsxs)("div",{className:"news-detail-skeleton__meta",children:[Object(n.jsx)("div",{className:"news-detail-skeleton__meta-info",children:Object(n.jsx)(i,{height:"3.125rem"})}),Object(n.jsx)("div",{className:"news-detail-skeleton__meta-info",children:Object(n.jsx)(i,{height:"3.125rem"})})]}),Array(10).fill(null).map((e,t)=>Object(n.jsx)(i,{height:"1.25rem",width:"100%",marginBottom:"0.625rem"},t))]}),Object(n.jsxs)("div",{className:"news-detail-skeleton__list",children:[Object(n.jsx)(i,{height:"13.75rem",width:"100%",marginBottom:"0.625rem"}),Object(n.jsxs)("div",{className:"news-detail-skeleton__tabs",children:[Object(n.jsx)("div",{className:"news-detail-skeleton__tab",children:Object(n.jsx)(i,{height:"3.125rem"})}),Object(n.jsx)("div",{className:"news-detail-skeleton__tab",children:Object(n.jsx)(i,{height:"3.125rem"})})]}),Object(n.jsx)(l,{numbersOfBullet:5,height:"7rem"})]})]})};const j=e=>{let{height:t="40px",itemWidth:a="100px",count:c=10}=e;return Object(n.jsx)("div",{className:"categories-skeleton",children:Array.from({length:c}).map((e,c)=>Object(n.jsx)("div",{style:{width:a},children:Object(n.jsx)(s.a,{height:t,width:"100%"})},c))})},h=()=>Object(n.jsx)(n.Fragment,{children:Object(n.jsx)("div",{className:"news-bundle-skeleton",children:Array(8).fill(null).map((e,t)=>Object(n.jsx)(n.Fragment,{children:Object(n.jsxs)("div",{className:"news-bundle-skeleton__wrapper",children:[Object(n.jsx)(s.a,{className:"new-skeleton__img"}),Object(n.jsx)(s.a,{height:10,width:"20%"}),Object(n.jsx)(s.a,{height:20,width:"100%"}),Object(n.jsx)(s.a,{height:20,width:"100%"})]})}))})})},612:function(e,t,a){"use strict";a.d(t,"a",function(){return l});var s=a(21),n=a(19),c=a(20);const i=(e,t)=>t&&e?Object(c.a)().get(n.a.news.catPaginate.replace("{catName}",t).replace("{pageSize}",e)+"&status=1"):Object(c.a)().get(n.a.news.paginate.replace("{pageSize}",e)+"&status=1");function l(e,t){return Object(s.useQuery)(["fetchNewsPaginate",e,t],()=>i(e,t),{retry:3})}},624:function(e,t,a){"use strict";a.d(t,"a",function(){return l});var s=a(21),n=a(19),c=a(20);const i=e=>{const t=n.a.news.popularNews.paginate.replace("{number}",e)+"&status=1";return Object(c.a)().get(t)};function l(e){return Object(s.useQuery)(["fetchPopularNews",e],()=>i(e),{retry:3})}},645:function(e,t,a){},646:function(e,t,a){},648:function(e,t,a){"use strict";a(649);var s=a(205),n=a(2);t.a=e=>{let{title:t,urlLink:a}=e;return Object(n.jsx)("div",{className:"dashboard-list-template-title-container",children:Object(n.jsxs)("p",{className:"dashboard-list-template-title",children:[t,Object(n.jsx)("span",{className:"dashboard-list-template-title-arrow-container",children:Object(n.jsx)(s.a,{className:"dashboard-list-template-title-arrow"})})]})})}},649:function(e,t,a){},675:function(e,t,a){"use strict";a.d(t,"a",function(){return l});var s=a(19),n=a(20),c=a(21);const i=()=>{const e=s.a.news.channelList.base;return Object(n.a)().get(e)};function l(){return Object(c.useQuery)(["fetchNewsChannelList"],()=>i())}},763:function(e,t,a){},764:function(e,t,a){},765:function(e,t,a){},767:function(e,t,a){},768:function(e,t,a){},799:function(e,t,a){"use strict";var s=a(1),n=a(22),c=a(766),i=(a(763),a(764),a(3)),l=a(12),r=a.n(l),d=a(2);var o=e=>{let{img:t,title:a,newsAgencyName:s,newsAgencyIcon:n,handleClick:c,date:l}=e;return Object(d.jsxs)("div",{className:"single-tab-content-container",onClick:c,children:[Object(d.jsx)("figure",{className:"single-tab-content-figure",children:Object(d.jsx)("img",{src:t||i.ib,alt:"",className:r()("single-tab-content-img",{noImg:!t})})}),Object(d.jsxs)("div",{className:"single-tab-content-left-side",children:[Object(d.jsx)("p",{className:"single-tab-content-title",children:a}),Object(d.jsxs)("div",{className:"single-tab-content-news-agency-date-container",children:[Object(d.jsxs)("div",{className:"single-tab-content-news-agency",children:[n&&Object(d.jsx)("img",{src:n,alt:"",className:"single-tab-content-news-agency-img"}),Object(d.jsx)("span",{className:"single-tab-content-news-agency-name",children:s})]}),Object(d.jsx)("div",{className:"single-tab-content-date",children:l})]})]})]})},j=a(8),h=a(15),b=a(196),u=a(105);var m=e=>{let{payload:t,activeTabItem:a}=e;const s=Object(j.useHistory)();return Object(d.jsx)(d.Fragment,{children:Object(d.jsx)(o,{img:Object(u.a)(null===t||void 0===t?void 0:t.image),title:t.title,newsAgencyName:t.channel_name,newsAgencyIcon:Object(u.a)(null===t||void 0===t?void 0:t.channel_icon),activeTabItem:a,handleClick:e=>{s.push(h.a.news.details.replace("{idNumber}",null===t||void 0===t?void 0:t.id))},date:Object(b.a)(new Date((null===t||void 0===t?void 0:t.created_at)?t.created_at:null))})})},g=a(34);var O=e=>{let{tab:t,activeTabHeading:a}=e;const[n,c]=Object(s.useState)(a);return Object(s.useEffect)(()=>{c(null)},[a]),Object(d.jsx)("div",{className:"tab-content-container",children:null===t||void 0===t?void 0:t.map((e,t)=>Object(d.jsx)("div",{onClick:()=>c(t),className:"tab-content-single-item-container",children:e?Object(d.jsx)(m,{payload:e,activeTabItem:n===t,index:t}):Object(d.jsx)(g.default,{})},t))})},v=(a(765),a(157)),x=a(83),p=a(566),w=a(588);var N=e=>{let{newsContent:t}=e;const[a,n]=Object(s.useState)("recentNews"),c=Object(x.a)("(max-width: 768px)"),{t:i}=Object(v.a)(),l=[{label:i("recentlyUpdated"),value:"recentNews"},{label:i("news.selection.popular"),value:"popular"},{label:i("news.selection.trending"),value:"trending"}];return Object(d.jsxs)("div",{className:"tabs",children:[Object(d.jsxs)("div",{className:"tabs-nav",children:[!c&&(null===l||void 0===l?void 0:l.map((e,t)=>Object(d.jsx)("div",{className:r()("tab-heading",{activeTab:a===e.value}),onClick:()=>n(e.value),children:Object(d.jsx)("p",{className:r()("tab-heading-text",{activeTab:a===e.value}),children:e.label})},t))),c&&Object(d.jsx)(p.b,{options:l,selectDefaultValue:l[0],height:"100%",width:"100%",boxShadow:"0px 2px 12px rgba(0, 0, 0, 0.2)",color:"#1D1D1F",handleOnChange:e=>n(e.value),textColor:"#a90000",fontWeight:"700",singleValueFontSize:"18px"})]}),Object(d.jsx)("div",{className:"tabs-content",children:t.recentNews.length>0||t.popular.length>0||t.trending.length>0?Object(d.jsx)(O,{tab:"popular"===a?t.popular:"recentNews"===a?t.recentNews:t.trending,activeTabHeading:l.value}):Object(d.jsx)(w.d,{showBullets:!0,numbersOfBullet:6,gap:"1.5rem",height:"6.25rem"})})]})},f=a(612),y=a(624),_=a(21),k=a(19),S=a(20);function C(e){return Object(_.useQuery)(["fetchTrendingNews",e],()=>(e=>{const t=k.a.news.trendingNews.paginate.replace("{number}",e)+"&status=1";return Object(S.a)().get(t)})(e),{retry:3})}t.a=()=>{const[e,t]=Object(s.useState)(8),[a,i]=Object(s.useState)({popular:[],recentNews:[],trending:[]}),{status:l,data:r}=Object(y.a)(e),{status:o,data:j}=C(e),{status:h,data:b}=Object(f.a)(e+4);function u(){"success"===l&&"success"===h&&"success"===o&&(i(t=>{var a,s,n;return{...t,popular:[...new Set([...t.popular,...null===r||void 0===r||null===(a=r.payload)||void 0===a?void 0:a.slice(e-8,e)])],recentNews:[...new Set([...t.recentNews,...null===b||void 0===b||null===(s=b.payload)||void 0===s?void 0:s.slice(e-8,e)])],trending:[...new Set([...t.trending,...null===j||void 0===j||null===(n=j.payload)||void 0===n?void 0:n.slice(e-8,e)])]}}),t(e+8))}Object(s.useEffect)(()=>{u()},[]),Object(s.useEffect)(()=>{"success"===l&&i(e=>({...e,popular:null===r||void 0===r?void 0:r.payload})),"success"===h&&i(e=>{var t,a;return{...e,recentNews:null===b||void 0===b||null===(t=b.payload)||void 0===t?void 0:t.slice(4,null===b||void 0===b||null===(a=b.payload)||void 0===a?void 0:a.length)}}),"success"===o&&i(e=>({...e,trending:null===j||void 0===j?void 0:j.payload}))},[l,o,h]);const{t:m}=Object(v.a)();return Object(d.jsxs)(d.Fragment,{children:[Object(s.useMemo)(()=>Object(d.jsx)(N,{newsContent:a}),[a]),"success"===l||"success"===h||"success"===o?Object(d.jsx)(n.a,{description:m("more"),handleButtonClick:u,bgColor:"grey",size:"widthHundred",icon:Object(d.jsx)(c.a,{})}):Object(d.jsx)(n.a,{bgColor:"grey",size:"widthHundred"})]})}},947:function(e,t,a){}}]); 2//# sourceMappingURL=46.ddbe1d0f.chunk.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.