_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[86],{"/0+H":function(e,t,n){"use strict";t.__esModule=!0,t.isInAmpMode=i,t.useAmp=function(){return i(r.default.useContext(o.AmpStateContext))};var a,r=(a=n("q1tI"))&&a.__esModule?a:{default:a},o=n("lwAK");function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ampFirst,n=void 0!==t&&t,a=e.hybrid,r=void 0!==a&&a,o=e.hasQuery,i=void 0!==o&&o;return n||r&&i}},"1/b/":function(e,t,n){"use strict";var a=n("q1tI"),r=n.n(a),o=n("8Kt/"),i=n.n(o),c=n("nbPw"),u=n("LeJ0"),s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.length<=t?e:"".concat(e.substr(0,t)).concat(n?"...":"")},l=r.a.createElement;t.a=function(e){var t,n=e.title,a=void 0===n?"":n,r=e.description,o=void 0===r?"":r,d=e.keywords,p=void 0===d?"":d,f=e.imageUrl,m=e.noIndexPage,v=void 0!==m&&m,y=Object(c.a)().t,g=function(e){return e?"".concat(e," - ").concat(y("common:seo.slogan")," - ").concat(u.a.appTitle):"".concat(u.a.appTitle," - ").concat(y("common:seo.title"))},b=function(e){return e?s("".concat(y("common:seo.simpleDescription")," ").concat(e&&"| "+e),147,!0):"".concat(y("common:seo.descriptionWithDevices"))};return l(i.a,null,l("title",null,g(a)),l("meta",{property:"og:title",content:g(a),key:"og-title"}),l("meta",{property:"og:site_name",content:u.a.appTitle,key:"og-site-name"}),l("meta",{property:"og:description",content:b(o),key:"og-description"}),l("meta",{name:"description",content:b(o),key:"description"}),l("meta",{name:"keywords",content:(t=p,"".concat(y("common:seo.keywords")).concat(t&&", "+t)),key:"keywords"}),l("meta",{name:"robots",content:v?"noindex":"index, follow"}),f&&l("meta",{property:"og:image",content:f,key:"og-image"}))}},"1aGI":function(e,t,n){"use strict";n.r(t);var a=n("z7pX"),r=n("cpVT"),o=n("vJKn"),i=n.n(o),c=n("rg98"),u=n("q1tI"),s=n.n(u),l=n("nOHt"),d=n("Vmlc"),p=n("LeJ0"),f=n("RC5v"),m=n("k3JL");function v(e){return y.apply(this,arguments)}function y(){return(y=Object(c.a)(i.a.mark((function e(t){var n,a,r,o,c;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.idSection,a={SectionId:n,AuthenticationTicket:p.a.api.secret},e.next=4,f.b.post("/getsectionbyid",a);case 4:if(r=e.sent,0===(o=r.data).GetSectionByIdResult.Result){e.next=8;break}throw new Error("Ocorreu um erro ao carregar o conte\xfado ".concat(o.GetSectionByIdResult.Message));case 8:return c=Object(m.b)(o),e.abrupt("return",c);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var g=n("9akx"),b=n("5E+k"),h=n("1/b/"),_=n("IJPF"),w=n("e/F1"),O=n("fGnp"),M=n("6mMO"),P=n("46wD"),j=n("HWat"),k=n.n(j),x=n("nbPw"),I=s.a.createElement,S=function(e){var t=e.section,n=e.medias,a=e.loadMoreItemsFunction,r=e.hasMorePages,o=void 0!==r&&r,i=e.isLoading,c=void 0!==i&&i,u=Object(x.a)("common").t;return I(w.a,null,I("div",{className:k.a.wrapper},I(O.a,{title:null===t||void 0===t?void 0:t.name,image:null===t||void 0===t?void 0:t.image,isMainTitle:!0}),I(M.a,{style:null===t||void 0===t?void 0:t.style,sectionMedias:n}),I("div",{className:k.a.loadMoreWrapper},o&&I("button",{disabled:c,onClick:function(){a&&a()}},u("load_more")),(!(null===n||void 0===n?void 0:n.medias)||c)&&I(P.a,{message:"".concat(u("loading"),"...")}))))},E=n("m6EV"),C=n("OgpL"),H=s.a.createElement;function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=function(){var e;e=JSON.parse(localStorage.getItem(C.b.Profile)||"{}");var t=Object(u.useState)(!1),n=t[0],r=t[1],o=Object(u.useState)(1),f=o[0],m=o[1],y=Object(u.useState)(),w=y[0],O=y[1],M=Object(u.useState)(w),P=M[0],j=M[1],k=Object(u.useState)(),x=k[0],I=k[1],R=Object(l.useRouter)();Object(u.useEffect)((function(){function t(){return(t=Object(c.a)(i.a.mark((function t(){var n,a,r;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=R.query.id,t.next=3,v({idSection:Number(n)});case 3:return a=t.sent,I(a),t.next=7,Object(g.a)({type:d.a.Section,id:Number(n),ageRatingId:e.ageRatingId,mediasPerPage:p.a.lazyLoad.mediasPerPage});case 7:r=t.sent,O(r);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}!function(){t.apply(this,arguments)}()}),[]);var q=function(){var t=Object(c.a)(i.a.mark((function t(){var n,o,u;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(f<w.totalPages)){t.next=11;break}return r(!0),n=f+1,t.next=5,Object(b.a)("section/".concat(null===x||void 0===x?void 0:x.id,"/medias/pg/").concat(n,"x").concat(p.a.lazyLoad.mediasPerPage),Object(c.a)(i.a.mark((function t(){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(g.a)({type:d.a.Section,id:null===x||void 0===x?void 0:x.id,page:n,ageRatingId:e.ageRatingId,mediasPerPage:p.a.lazyLoad.mediasPerPage}));case 1:case"end":return t.stop()}}),t)}))),p.a.browserCache);case 5:o=t.sent,(u=A({},P)).medias=[].concat(Object(a.a)(u.medias),Object(a.a)(o.medias)),r(!1),j(u),m(n);case 11:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Object(u.useEffect)((function(){r(!1),m(1),j(w)}),[w]),R.isFallback?H(_.a,null):H(s.a.Fragment,null,H(h.a,{title:null===x||void 0===x?void 0:x.name,keywords:null===x||void 0===x?void 0:x.name}),H(S,{medias:P,section:x,loadMoreItemsFunction:q,hasMorePages:f<(null===w||void 0===w?void 0:w.totalPages),isLoading:n}),f<(null===w||void 0===w?void 0:w.totalPages)&&H(E.a,{loadMoreItemsFunction:q,enabled:!0===!!P&&!1===n&&f<(null===w||void 0===w?void 0:w.totalPages)}))}},"48fX":function(e,t,n){var a=n("qhzo");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}},"5fIB":function(e,t,n){var a=n("7eYB");e.exports=function(e){if(Array.isArray(e))return a(e)}},"5hfM":function(e,t,n){e.exports={wrapper:"styles_wrapper__3FRau",container:"styles_container__3vyHV",loader:"styles_loader__XPmp7",loader1:"styles_loader1__1pr7g",loader2:"styles_loader2__2nj4B",loader3:"styles_loader3__cWNF8"}},"6mMO":function(e,t,n){"use strict";var a=n("q1tI"),r=n.n(a),o=n("HE+r"),i=n("96Ec"),c=n("R1EJ"),u=n("M0Rp"),s=n.n(u),l=r.a.createElement;t.a=function(e){var t,n=e.sectionMedias,r=e.style,u=Object(a.useMemo)((function(){switch(r){case i.a.Horizontal:return[c.a.Landscape,o.a.ThumbHorizontal];default:return[c.a.Portrait,o.a.Thumb127]}}),[r]),d=u[0],p=u[1];return l("div",{className:"".concat(s.a.container)},l("ul",null,null===n||void 0===n||null===(t=n.medias)||void 0===t?void 0:t.map((function(e,t){var n=e.id,a=e.title,r=e.images,o=e.slug,i=e.badges;return l("li",{key:"".concat(n,"-").concat(t,"-item-cover")},l(c.b,{image:r[p],orientation:d,title:a,link:"/media/movies/".concat(n,"/").concat(o||"detail"),tag:i}))}))))}},"8Kt/":function(e,t,n){"use strict";n("oI91");t.__esModule=!0,t.defaultHead=l,t.default=void 0;var a,r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var o=a?Object.getOwnPropertyDescriptor(e,r):null;o&&(o.get||o.set)?Object.defineProperty(n,r,o):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("q1tI")),o=(a=n("Xuae"))&&a.__esModule?a:{default:a},i=n("lwAK"),c=n("FYa8"),u=n("/0+H");function s(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function l(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=[r.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(r.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"===typeof t||"number"===typeof t?e:t.type===r.default.Fragment?e.concat(r.default.Children.toArray(t.props.children).reduce((function(e,t){return"string"===typeof t||"number"===typeof t?e:e.concat(t)}),[])):e.concat(t)}var p=["name","httpEquiv","charSet","itemProp"];function f(e,t){return e.reduce((function(e,t){var n=r.default.Children.toArray(t.props.children);return e.concat(n)}),[]).reduce(d,[]).reverse().concat(l(t.inAmpMode)).filter(function(){var e=new Set,t=new Set,n=new Set,a={};return function(r){var o=!0;if(r.key&&"number"!==typeof r.key&&r.key.indexOf("$")>0){var i=r.key.slice(r.key.indexOf("$")+1);e.has(i)?o=!1:e.add(i)}switch(r.type){case"title":case"base":t.has(r.type)?o=!1:t.add(r.type);break;case"meta":for(var c=0,u=p.length;c<u;c++){var s=p[c];if(r.props.hasOwnProperty(s))if("charSet"===s)n.has(s)?o=!1:n.add(s);else{var l=r.props[s],d=a[s]||new Set;d.has(l)?o=!1:(d.add(l),a[s]=d)}}}return o}}()).reverse().map((function(e,t){var n=e.key||t;return r.default.cloneElement(e,{key:n})}))}function m(e){var t=e.children,n=(0,r.useContext)(i.AmpStateContext),a=(0,r.useContext)(c.HeadManagerContext);return r.default.createElement(o.default,{reduceComponentsToState:f,headManager:a,inAmpMode:(0,u.isInAmpMode)(n)},t)}m.rewind=function(){};var v=m;t.default=v},FYa8:function(e,t,n){"use strict";var a;t.__esModule=!0,t.HeadManagerContext=void 0;var r=((a=n("q1tI"))&&a.__esModule?a:{default:a}).default.createContext({});t.HeadManagerContext=r},GHY5:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/catalog/[id]/[slug]",function(){return n("1aGI")}])},HWat:function(e,t,n){e.exports={wrapper:"styles_wrapper__7Mi7p",loadMoreWrapper:"styles_loadMoreWrapper__2jLmL"}},IJPF:function(e,t,n){"use strict";var a=n("q1tI"),r=n.n(a),o=n("nbPw"),i=n("e/F1"),c=n("5hfM"),u=n.n(c),s=r.a.createElement;t.a=function(){var e=Object(o.a)().t;return s(i.a,null,s("div",{className:u.a.wrapper},s("div",{className:u.a.container},s("div",{className:u.a.loader},s("div",null),s("div",null),s("div",null),s("div",null)),s("p",null,e("common:loading"),"..."))))}},M0Rp:function(e,t,n){e.exports={container:"styles_container__azq3J"}},T0f4:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},Xuae:function(e,t,n){"use strict";var a=n("mPvQ"),r=n("/GRZ"),o=n("i2R6"),i=(n("qXWd"),n("48fX")),c=n("tCBg"),u=n("T0f4");function s(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=u(e);if(t){var r=u(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return c(this,n)}}t.__esModule=!0,t.default=void 0;var l=n("q1tI"),d=function(e){i(n,e);var t=s(n);function n(e){var o;return r(this,n),(o=t.call(this,e))._hasHeadManager=void 0,o.emitChange=function(){o._hasHeadManager&&o.props.headManager.updateHead(o.props.reduceComponentsToState(a(o.props.headManager.mountedInstances),o.props))},o._hasHeadManager=o.props.headManager&&o.props.headManager.mountedInstances,o}return o(n,[{key:"componentDidMount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.add(this),this.emitChange()}},{key:"componentDidUpdate",value:function(){this.emitChange()}},{key:"componentWillUnmount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.delete(this),this.emitChange()}},{key:"render",value:function(){return null}}]),n}(l.Component);t.default=d},kG2m:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},lwAK:function(e,t,n){"use strict";var a;t.__esModule=!0,t.AmpStateContext=void 0;var r=((a=n("q1tI"))&&a.__esModule?a:{default:a}).default.createContext({});t.AmpStateContext=r},mPvQ:function(e,t,n){var a=n("5fIB"),r=n("rlHP"),o=n("KckH"),i=n("kG2m");e.exports=function(e){return a(e)||r(e)||o(e)||i()}},oI91:function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},qXWd:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},rlHP:function(e,t){e.exports=function(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},tCBg:function(e,t,n){var a=n("C+bE"),r=n("qXWd");e.exports=function(e,t){return!t||"object"!==a(t)&&"function"!==typeof t?r(e):t}}},[["GHY5",1,2,9,0,3,4,5,6,7,8,11]]]);