1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1868],{47336:function(a,b,c){(window.__NEXT_P=window.__NEXT_P||[]).push(["/theatres",function(){return c(23662)}])},23662:function(l,d,a){"use strict";a.r(d),a.d(d,{"__N_SSP":function(){return Q},default:function(){return R}});var b,c,m=a(5447),n=a(99728),o=a(2746),p=a(8014),e=a(1984),q=a.n(e),r=a(62044),s=a(46323),t=a(56168),u=a(95790),v=a(22135),w=a(3245),x=a(20010),f=a(54666),y=a.n(f),z=a(35507),A="_with-number",B=function(a){var e=a.plays,h=a.theatre,i=a.playsCount,f=a.loadImages,b=(0,t.useRef)(null),j=(0,r.Z)().lang,c=(0,t.useState)(),d=c[0],g=c[1];return(0,v.Yc)(b,f),(0,t.useEffect)(function(){var a=e;i>4&&((a=e.slice(0,4))[3].title=A),g(a)},[e,g]),(0,p.jsx)("div",{className:"theatre-wrapper",children:(0,p.jsx)("div",{className:"category-section theatre-section",children:(0,p.jsx)("div",{ref:b,className:"scroll-wrapper-theatre",children:(0,p.jsx)("ul",{className:"play-list swiper-wrapper",children:null==d?void 0:d.map(function(a){var c,b;return(0,p.jsx)("li",{className:[(null==a?void 0:a.title)===A?"with-number":"","swiper-slide"].join(" "),children:(0,p.jsx)(w.Z,{href:(c=a).title===A?u.xm.theatre(h):u.xm.play(c,j),children:(0,p.jsx)("a",{children:(b=a).title===A?(0,p.jsxs)("div",{children:["+",h.plays_count-(null==d?void 0:d.length)+1]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(x.Z,{loadImmediately:f,width:170,height:96,usePlaceholder:!0,src:b.poster_url,alt:b.title}),(0,p.jsx)("h3",{children:(0,u.ew)(b.title)})]})})})},a.id)})})})})})},C=function(f){var b,a=f.theatre,c=(0,t.useRef)(null),d=(0,t.useState)(null),g=d[0],i=d[1],h=(0,r.Z)(z.lS.Theaters).t;(0,t.useEffect)(function(){if(null==c?void 0:c.current){var a;i(null==c?void 0:null===(a=c.current)|| void 0===a?void 0:a.getBoundingClientRect().top)}},[c]);var e=(0,v.Vq)(g);return(0,p.jsxs)("li",{ref:c,className:[y().theatreRow,y().withBackground].join(" "),children:[(0,p.jsxs)("div",{className:y().info,children:[(0,p.jsx)(w.Z,{href:u.xm.theatre(a),children:(0,p.jsx)("a",{children:a.poster_url?(0,p.jsx)(x.Z,{width:48,placeholderClass:y().imgPlaceholder,height:48,alt:null==a?void 0:a.name,loadImmediately:e,usePlaceholder:!0,src:null==a?void 0:a.poster_url}):(0,p.jsx)("div",{className:y().imgPlaceholder,children:null==a?void 0:null===(b=a.name)|| void 0===b?void 0:b.substr(0,1)})})}),(0,p.jsxs)("div",{className:y().text,children:[(0,p.jsx)("h3",{children:(0,p.jsx)(w.Z,{href:u.xm.theatre(a),children:(0,p.jsx)("a",{children:null==a?void 0:a.name})})}),(0,p.jsx)("p",{children:h("plays_count_".concat((0,u.in)(null==a?void 0:a.plays_count)),{count:null==a?void 0:a.plays_count})})]})]}),(0,p.jsx)(B,{playsCount:null==a?void 0:a.plays_count,theatre:a,plays:a.plays.map(function(b){return Object.assign({},b,{theatre:a})}),loadImages:e})]},a.id)},D=a(99731),g=a(89269),E=a.n(g),h=a(52662),F=a(62139),i=function(){function a(){(0,F.Z)(this,a)}return a.prototype.getPopularPlay=function(a){return this.most_popular_plays.find(function(b){return b.theatre===a})},a.fromJSON=function(b){return Object.assign(new a,b)},a}(),G=i,j=a(75657),H=a.n(j),I=a(70082),J=a(60950),k=a(86999),K=a.n(k),L=function(e){var a=e.favoriteTheatres,f=(0,r.Z)(z.lS.Theaters).t,b=(0,t.useRef)(null),c=(0,t.useState)(!0),d=c[0],g=c[1];(0,t.useEffect)(function(){var b,c=function(){g(!1)},e=null===(b=a[0])|| void 0===b?void 0:b.poster_url;if(e){var d=new Image;d.onload=c,d.onerror=c,d.src=e}else c()},[a,g]),(0,v.qM)(b,d);var h=Array.from({length:10},function(b,a){return a});return(0,p.jsxs)("div",{className:[K().favoriteTheatres].join(" "),children:[(0,p.jsx)("h2",{children:f("popular_this_week_theatres")}),d?(0,p.jsx)(J.y,{baseColor:"#22222E",highlightColor:"rgba(72, 72, 72, 0.48)",children:(0,p.jsx)("ul",{className:K().skeleton,children:h.map(function(b,a){return(0,p.jsxs)("li",{children:[(0,p.jsx)("span",{className:K().number,children:a+1}),(0,p.jsx)("div",{className:K().circle,children:(0,p.jsx)(J.Z,{style:{height:"100%",width:"100%",borderRadius:48},duration:2})}),(0,p.jsxs)("div",{className:K().rows,children:[(0,p.jsx)("div",{className:K().firstRow,children:(0,p.jsx)(J.Z,{style:{height:"100%",width:"100%",borderRadius:3},duration:2})}),(0,p.jsx)("div",{className:K().secondRow,children:(0,p.jsx)(J.Z,{style:{height:"100%",width:"100%",borderRadius:3},duration:2})})]})]},a)})})}):(0,p.jsx)("div",{ref:b,className:"scroll-wrapper-theatre",children:(0,p.jsx)("ul",{className:["play-list","swiper-wrapper",K().favorites].join(" "),children:null==a?void 0:a.map(function(a,b){return(0,p.jsx)("li",{className:"swiper-slide",children:(0,p.jsx)(H(),{href:u.xm.theatre(a),children:(0,p.jsxs)("a",{children:[(0,p.jsx)("span",{className:K().order,children:b+1}),(0,p.jsx)("span",{style:{background:"url(".concat(a.poster_url,")")},className:K().favLogo}),(0,p.jsxs)("div",{className:K().favWrapper,children:[(0,p.jsx)("h4",{children:a.name}),(0,p.jsx)("p",{children:f("plays_count_".concat((0,u.in)(null==a?void 0:a.plays_count)),{count:null==a?void 0:a.plays_count})})]})]})})},b)})})})]})},M=a(53173);(c=b||(b={})).Name="name",c.Created="created",c.Popularity="popularity";var N=a(66564),O=a(48408),P={order_by:b.Popularity,play_genre:-1,play_language:"",plays_count:!0,include_plays:4},Q=!0,R=(0,h.DE)(function(d){var f,j=d.theatres,U=d.countryCode,V=d.popularTheatres,g=d.theatresFilters,W=d.defaultSelectedCountry,a=(0,r.Z)(D.l.Theaters).t,k=(0,t.useRef)(null),l=(0,t.useRef)(null),w=(0,t.useRef)(null),ae=(0,I.J)().locale,y=(0,t.useState)(j),h=y[0],X=y[1],z=(0,t.useState)((0,n.Z)((0,m.Z)({},P),{play_country:W})),c=z[0],Y=z[1],A=(0,t.useState)(!1),Z=A[0],$=A[1],B=(0,t.useState)(!1),F=B[0],_=B[1],af=(0,t.useRef)(F),ag=(0,t.useRef)(),K=(0,t.useState)(!1),i=K[0],aa=K[1],e=G.fromJSON(V);(0,t.useEffect)(function(){if(j.length>0&&!i){var b=function(){aa(!1)},a=new Image;a.onload=b,a.onerror=b,a.src=j[0].poster_url}},[j,i]),(0,v.qM)(k),(0,t.useEffect)(function(){if(!(0,u.sk)()){var c=l.current.getBoundingClientRect().y+document.documentElement.scrollTop,d=document.querySelector("header"),a=function(){if(af.current){var a=document.scrollingElement.scrollTop;a+64>c?($(af.current&&a+64>c),d.classList.add("solid-header")):(d.classList.remove("solid-header"),$(af.current&&!1))}else $(!1)},b=(0,u.Ds)(a,10);return window.addEventListener("scroll",b,!1),function(){window.removeEventListener("scroll",b)}}},[l,$,_,w]),(0,t.useEffect)(function(){if(!(0,u.sk)()){var a=function(){_((0,u.lZ)()),af.current=(0,u.lZ)()};return window.addEventListener("resize",a,!1),a(),function(){window.removeEventListener("resize",a)}}}
1,[]),(0,t.useEffect)(function(){af.current?ag.current=new O.Z(l.current,{direction:"horizontal",slidesPerView:"auto",observeParents:!0,observer:!0,freeMode:!0,updateOnWindowResize:!0,keyboard:{enabled:!0,onlyInViewport:!0}}):ag.current&&(ag.current.detachEvents(),ag.current.destroy(!0,!0),ag.current=null)},[F]);var ab=(0,t.useCallback)(function(c){var a=(0,m.Z)({},c);Object.keys(a).forEach(function(b){(-1===a[b]||""===a[b])&&delete a[b]}),aa(!0),(0,N.L)().getTheatres(a).then(function(c){a.order_by===b.Created&&(c=c.sort(function(b,c){var f=function(a,b){return a.id>b.id?-1:1},a=(0,o.Z)([b,c].map(function(a){return a.plays.sort(f)[0]}),2),d=a[0],e=a[1];return d.id>e.id?-1:1})),X(c),aa(!1)})},[X,N.L,aa]);(0,t.useEffect)(function(){ab(c)},[]);var ah=(0,t.useCallback)(function(b){var d=arguments.length>1&& void 0!==arguments[1]&&arguments[1],e=arguments.length>2&& void 0!==arguments[2]?arguments[2]:0,a=(0,m.Z)({},c,b);if(Y(a),ab(a),d&&window.scrollTo(0,0),ag.current)var f=setTimeout(function(){ag.current.update(),ag.current.slideTo(e),clearTimeout(f)},50)},[Y,c,ab]),ac=(0,t.useMemo)(function(){return c.order_by!==b.Name||(null==c?void 0:c.play_country)!== -1||(null==c?void 0:c.play_language)!==""|| -1!==c.play_genre},[c]),Q=(0,t.useMemo)(function(){return[{value:b.Name,label:"".concat(a("sort_alphabeticaly"))},{value:b.Created,label:"".concat(a("sort_newest"))},{value:b.Popularity,label:"".concat(a("sort_popular"))},]},[]),R=(0,t.useMemo)(function(){var b;return[{value:-1,label:a("filter_all")}].concat(null===(b=g.genres)|| void 0===b?void 0:b.map(function(a){return{value:a.id,label:a.name}}))},[g]),S=(0,t.useMemo)(function(){var b;return[{value:"",label:a("filter_all")}].concat(null===(b=g.languages)|| void 0===b?void 0:b.map(function(a){return{value:a.code,label:a.title}}))},[g]),T=(0,t.useMemo)(function(){var b;return[{value:-1,label:a("filter_all")}].concat(null===(b=g.countries)|| void 0===b?void 0:b.map(function(a){return{value:a.id,label:a.title}}))},[g]),ad=Array.from({length:3},function(b,a){return a}),ai=Array.from({length:4},function(b,a){return a});return(0,p.jsxs)(s.Z,{countryCode:U,children:[(0,p.jsx)(q(),{children:(0,u.Fi)(a("seo:theatres_title"),a("seo:theatres_description"))}),(0,p.jsxs)("main",{className:E().theatres,children:[(0,p.jsx)("h1",{children:a("most_popular_theatres")}),(0,p.jsx)("div",{ref:k,className:["scroll-wrapper-theatre",E().popularWrapper].join(" "),children:(0,p.jsx)("ul",{className:["play-list","swiper-wrapper",E().mostPopular].join(" "),children:null==e?void 0:null===(f=e.most_popular_theatres)|| void 0===f?void 0:f.map(function(b){return(0,p.jsx)("li",{className:"swiper-slide",children:(0,p.jsx)(H(),{href:u.xm.theatre(b,ae),children:(0,p.jsxs)("a",{children:[(0,p.jsx)(x.Z,{usePlaceholder:!0,alt:b.name,width:12e3,height:290,src:e.getPopularPlay(b.id).poster_url}),(0,p.jsxs)("div",{className:E().text,children:[(0,p.jsx)("span",{style:{background:"url(".concat(b.poster_url,")")},className:E().theaterLogo}),(0,p.jsx)("h3",{className:E().theaterName,children:b.name}),(0,p.jsx)("p",{className:E().playsCount,children:a("plays_count_".concat((0,u.in)(null==b?void 0:b.plays_count)),{count:null==b?void 0:b.plays_count})})]})]})})},b.id)})})}),(0,p.jsxs)("div",{className:E().columns,children:[(0,p.jsx)(L,{favoriteTheatres:null==e?void 0:e.this_week}),(0,p.jsxs)("div",{ref:w,className:[E().theatresWrapper].join(" "),children:[(0,p.jsxs)("div",{className:E().theatresHeader,children:[(0,p.jsx)("h2",{children:a("dramox_theatres")}),ac&&(0,p.jsx)("p",{onClick:function(){ah((0,m.Z)({},P),!0)},children:a("clear_filter")})]}),(0,p.jsx)("div",{ref:l,className:["scroll-wrapper-theatre",E().filters,Z?E().onScrolled:""].join(" "),children:(0,p.jsxs)("ul",{className:"play-list swiper-wrapper",children:[(0,p.jsx)("li",{onMouseMove:function(a){a.preventDefault(),a.stopPropagation()},className:"swiper-slide",children:(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{htmlFor:"sort",children:a("sort")}),(0,p.jsx)("span",{children:Q.find(function(a){return a.value===c.order_by}).label}),(0,p.jsx)(M.Z,{className:E().select,defaultValue:c.order_by,name:"sort",onChange:function(a){ah({order_by:a},!1,0)},options:Q})]})}),(0,p.jsx)("li",{className:"swiper-slide",children:(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{htmlFor:"genre",children:a("genre")}),(0,p.jsx)("span",{children:R.find(function(a){return a.value===c.play_genre}).label}),(0,p.jsx)(M.Z,{className:E().select,defaultValue:c.play_genre,name:"genre",onCh
1ange:function(a){ah({play_genre:parseInt(a)},!1,1)},options:R})]})}),(0,p.jsx)("li",{className:"swiper-slide",children:(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{htmlFor:"play_language",children:a("language")}),(0,p.jsx)("span",{children:S.find(function(a){return a.value===c.play_language}).label}),(0,p.jsx)(M.Z,{className:E().select,defaultValue:c.play_language,name:"play_language",onChange:function(a){ah({play_language:a},!1,2)},options:S})]})}),(0,p.jsx)("li",{className:"swiper-slide",children:(0,p.jsxs)("div",{children:[(0,p.jsx)("label",{htmlFor:"country",children:a("country")}),(0,p.jsx)("span",{children:T.find(function(a){return a.value===c.play_country}).label}),(0,p.jsx)(M.Z,{className:E().select,defaultValue:c.play_country,name:"country",onChange:function(a){ah({play_country:parseInt(a)},!1,3)},options:T})]})})]})}),(0,p.jsxs)("ul",{className:E().theatres,children:[i&&(0,p.jsx)(J.y,{baseColor:"#22222E",highlightColor:"rgba(72, 72, 72, 0.48)",children:ad.map(function(a){return(0,p.jsxs)("li",{className:E().skeletonRow,children:[(0,p.jsxs)("div",{className:E().wrap,children:[(0,p.jsx)("div",{className:E().circle,children:(0,p.jsx)(J.Z,{duration:2,style:{width:"100%",height:"100%",borderRadius:48}})}),(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:E().first,children:(0,p.jsx)(J.Z,{duration:2,style:{width:"100%",height:"100%",borderRadius:3}})}),(0,p.jsx)("div",{className:E().second,children:(0,p.jsx)(J.Z,{duration:2,style:{width:"100%",height:"100%",borderRadius:3}})})]})]}),(0,p.jsx)("ul",{className:E().slides,children:ai.map(function(a){return(0,p.jsxs)("li",{children:[(0,p.jsx)("div",{className:E().slide,children:(0,p.jsx)(J.Z,{duration:2,style:{width:"100%",height:"100%",borderRadius:6}})}),(0,p.jsx)("div",{className:E().slideDesc,children:(0,p.jsx)(J.Z,{duration:2,style:{width:"100%",height:"100%",borderRadius:6}})})]},a)})})]},a)})}),h.length>0&&h.map(function(a,b){return(0,p.jsx)(C,{theatre:a},b)}),!i&&0===h.length&&(0,p.jsxs)("li",{className:E().emptyState,children:[(0,p.jsx)("div",{className:E().img}),(0,p.jsx)("p",{children:a("no_theatres")}),(0,p.jsx)("a",{href:"#",onClick:function(a){a.preventDefault(),ah((0,m.Z)({},P),!0)},children:a("clear_filter")})]})]})]})]})]})]})})},86999:function(a){a.exports={favoriteTheatres:"FavoriteTheatres_favoriteTheatres__5__Dy",favorites:"FavoriteTheatres_favorites__d0wff",order:"FavoriteTheatres_order__WBFDC",favLogo:"FavoriteTheatres_favLogo__69lK3",favWrapper:"FavoriteTheatres_favWrapper__2OFWX",fixed:"FavoriteTheatres_fixed__QHV33",skeleton:"FavoriteTheatres_skeleton__qV_gK",number:"FavoriteTheatres_number__kKTER",circle:"FavoriteTheatres_circle__3sdSq",rows:"FavoriteTheatres_rows__rU4j6",firstRow:"FavoriteTheatres_firstRow__1aiR4",secondRow:"FavoriteTheatres_secondRow__mLDdx"}},54666:function(a){a.exports={theatreRow:"TheatreSection_theatreRow__qgWKJ",info:"TheatreSection_info__gylyW",imgPlaceholder:"TheatreSection_imgPlaceholder__xrQY7",text:"TheatreSection_text__Pu7uQ",withBackground:"TheatreSection_withBackground__oYOmc"}},89269:function(a){a.exports={theatres:"theatres_theatres__rchoL",popularWrapper:"theatres_popularWrapper__tiadV",mostPopular:"theatres_mostPopular__4D2K3",text:"theatres_text__GM09h",theaterLogo:"theatres_theaterLogo__RrdTA",theaterName:"theatres_theaterName__EtZd7",playsCount:"theatres_playsCount__SsFo6",columns:"theatres_columns__Jg6vE",theatresWrapper:"theatres_theatresWrapper__S5OT9",theatresHeader:"theatres_theatresHeader__sPaDr",filters:"theatres_filters__ijc3f",select:"theatres_select__eFNBl",onScrolled:"theatres_onScrolled__uQTw5",onRight:"theatres_onRight__Qn3vE",emptyState:"theatres_emptyState__kp7mG",img:"theatres_img__Ru579",skeletonRow:"theatres_skeletonRow__4UFgO",wrap:"theatres_wrap__xzUag",circle:"theatres_circle__TM9wM",first:"theatres_first___TDCB",second:"theatres_second__dmVRB",slides:"theatres_slides__Db9s4",slide:"theatres_slide__eF6ye",slideDesc:"theatres_slideDesc__DfUEa",placeholderHidden:"theatres_placeholderHidden__wdGu3"}}},function(a){a.O(0,[9774,2888,179],function(){var b;return a(a.s=47336)}),_N_E=a.O()}])
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.