(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7964],{54534:function(e,t,r){"use strict";var a=r(59782),o=r(57437);t.Z=(0,a.Z)((0,o.jsx)("path",{d:"M10 18h4v-2h-4zM3 6v2h18V6zm3 7h12v-2H6z"}),"FilterListOutlined")},31628:function(e,t,r){"use strict";var a=r(59782),o=r(57437);t.Z=(0,a.Z)((0,o.jsx)("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"RadioButtonChecked")},60033:function(e,t,r){"use strict";var a=r(59782),o=r(57437);t.Z=(0,a.Z)((0,o.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchOutlined")},34482:function(e,t){"use strict";/*!
 * cookie
 * Copyright(c) 2012-2014 Roman Shtylman
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */t.parse=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var a={},o=e.split(";"),s=(t||{}).decode||r,i=0;i<o.length;i++){var n=o[i],d=n.indexOf("=");if(!(d<0)){var c=n.substring(0,d).trim();if(void 0==a[c]){var l=n.substring(d+1,n.length).trim();'"'===l[0]&&(l=l.slice(1,-1)),a[c]=function(e,t){try{return t(e)}catch(t){return e}}(l,s)}}}return a},t.serialize=function(e,t,r){var s=r||{},i=s.encode||a;if("function"!=typeof i)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var n=i(t);if(n&&!o.test(n))throw TypeError("argument val is invalid");var d=e+"="+n;if(null!=s.maxAge){var c=s.maxAge-0;if(isNaN(c)||!isFinite(c))throw TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(c)}if(s.domain){if(!o.test(s.domain))throw TypeError("option domain is invalid");d+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError("option path is invalid");d+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invalid");d+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(d+="; HttpOnly"),s.secure&&(d+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return d};var r=decodeURIComponent,a=encodeURIComponent,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},47713:function(e,t,r){"use strict";var a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__rest||function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(e);o<a.length;o++)0>t.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]]);return r};Object.defineProperty(t,"__esModule",{value:!0}),t.hasCookie=t.deleteCookie=t.setCookie=t.getCookie=t.getCookies=void 0;var s=r(34482),i=function(){return"undefined"!=typeof window},n=function(e){return!!e&&"getAll"in e&&"set"in e&&"function"==typeof e.getAll&&"function"==typeof e.set},d=function(e){return!!(null==e?void 0:e.req)&&"cookies"in e.req&&n(null==e?void 0:e.req.cookies)||!!(null==e?void 0:e.res)&&"cookies"in e.res&&n(null==e?void 0:e.res.cookies)||!!(null==e?void 0:e.cookies)&&n(e.cookies())},c=function(e){var t={};return e.getAll().forEach(function(e){var r=e.name,a=e.value;t[r]=a}),t},l=function(e){void 0===e&&(e="");try{var t=JSON.stringify(e);return/^[\{\[]/.test(t)?t:e}catch(t){return e}};t.getCookies=function(e){if(d(e)){if(null==e?void 0:e.req)return c(e.req.cookies);if(null==e?void 0:e.cookies)return c(e.cookies())}if(e&&(t=e.req),!i())return t&&t.cookies?t.cookies:t&&t.headers.cookie?(0,s.parse)(t.headers.cookie):{};for(var t,r={},a=document.cookie?document.cookie.split("; "):[],o=0,n=a.length;o<n;o++){var l=a[o].split("="),u=l.slice(1).join("=");r[l[0]]=u}return r},t.getCookie=function(e,r){var a=(0,t.getCookies)(r)[e];if(void 0!==a)return a?a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent):a},t.setCookie=function(e,t,r){if(d(r)){var n,c,u,m=r.req,f=r.res,p=r.cookies,h=o(r,["req","res","cookies"]),b=a({name:e,value:t},h);m&&m.cookies.set(b),f&&f.cookies.set(b),p&&p().set(b);return}if(r){var m=r.req,f=r.res,v=o(r,["req","res"]);c=m,u=f,n=v}var x=(0,s.serialize)(e,l(t),a({path:"/"},n));if(i())document.cookie=x;else if(u&&c){var g=u.getHeader("Set-Cookie");if(Array.isArray(g)||(g=g?[String(g)]:[]),u.setHeader("Set-Cookie",g.concat(x)),c&&c.cookies){var k=c.cookies;""===t?delete k[e]:k[e]=l(t)}if(c&&c.headers&&c.headers.cookie){var k=(0,s.parse)(c.headers.cookie);""===t?delete k[e]:k[e]=l(t),c.headers.cookie=Object.entries(k).reduce(function(e,t){return e.concat("".concat(t[0],"=").concat(t[1],";"))},"")}}},t.deleteCookie=function(e,r){return(0,t.setCookie)(e,"",a(a({},r),{maxAge:-1}))},t.hasCookie=function(e,r){return!!e&&(0,t.getCookies)(r).hasOwnProperty(e)}},69844:function(e,t,r){Promise.resolve().then(r.bind(r,78697)),Promise.resolve().then(r.bind(r,52314)),Promise.resolve().then(r.bind(r,19093)),Promise.resolve().then(r.bind(r,88061)),Promise.resolve().then(r.bind(r,1694)),Promise.resolve().then(r.bind(r,74707)),Promise.resolve().then(r.bind(r,67808)),Promise.resolve().then(r.t.bind(r,25250,23)),Promise.resolve().then(r.bind(r,16005)),Promise.resolve().then(r.bind(r,1015)),Promise.resolve().then(r.bind(r,95546)),Promise.resolve().then(r.bind(r,24043)),Promise.resolve().then(r.bind(r,61908)),Promise.resolve().then(r.bind(r,74652)),Promise.resolve().then(r.bind(r,4081))},62553:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var a=r(57437),o=r(61396),s=r.n(o);function i(e){let{children:t,...r}=e;return(0,a.jsx)(s(),{className:"w-full rounded-lg bg-brand-300 px-5 py-3 text-center text-sm-bold text-neutral-0 md:w-auto md:text-lg-bold","data-cy":"primary-button",...r,children:t})}},74652:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return p}});var a=r(57437),o=r(47713),s=r(2265),i=r(46220),n=r.n(i),d=r(69569),c=r(24033),l=r(74678),u=r(54167),m=r(84752);function f(e){switch(e.data.type){case"videocast":return(0,a.jsx)(m.Z,{mode:e.mode,video:e.data});case"podcast":return(0,a.jsx)(u.Z,{mode:e.mode,podcast:e.data});case"blogs-e-colunas":case"news":case"bunker":return(0,a.jsx)(l.Z,{mode:e.mode,news:e.data});default:return(0,a.jsxs)("p",{className:"mb-8 border-category-videos-200",children:[e.data.type," - ",e.data.slug]})}}function p(e){let t=(0,c.usePathname)(),r=(0,c.useSearchParams)(),[i,l]=(0,s.useState)(!1),[u,m]=(0,s.useState)(1),[p,h]=(0,s.useState)([]),[b,v]=(0,s.useState)(!1),x=e.offset||0;async function g(){l(!0);let t="page="+u+"&page_size="+e.pageSize+"&offset="+x;(0,o.setCookie)("token",e.token,{httpOnly:!1,sameSite:"strict",secure:!0});try{let r=await fetch("/api/pagination?endpoint="+e.endpoint+"&"+t),a=await r.json();switch(e.type){case"news":h([...p,...a.data.posts]);break;case"videocast":h([...p,...a.data.videocasts]);break;case"podcast":h([...p,...a.data.podcasts]);break;case"general":h([...p,...a.data.generalPosts])}m(u+1);let{currentPage:o,totalPages:s}=a.data.paginateData;o===s-1&&v(!0)}catch(e){console.error(e)}finally{l(!1)}}return(0,s.useEffect)(()=>{h([])},[t,r]),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{children:null==p?void 0:p.map((e,t)=>(0,a.jsx)(f,{data:e,mode:"horizontal"},t))}),(0,a.jsx)("div",{className:n().more,children:b?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("p",{className:"border-t border-surface pt-4 text-lg-regular text-secondary",children:[(0,a.jsxs)("b",{children:["Chegamos ao final dos resultados dispon\xedveis!"," "]}),"Se n\xe3o encontrou o que esperava, que tal explorar novos caminhos de pesquisa? Use o campo de busca e os filtros dispon\xedveis para obter conte\xfados mais espec\xedficos :)"]})}):(0,a.jsxs)("button",{"data-cy":"button-load-more",className:n().btn,onClick:g,disabled:i,children:[(0,a.jsx)(d.Z,{className:i?"animate-spin":""}),i?"Carregando...":"Carregar mais"]})})]})}},4081:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return g}});var a=r(57437),o=r(2265),s=r(62553),i=r(24043),n=r(35783),d=r(74678),c=r(54167),l=r(84752),u=r(27675),m=r(52314),f=r(47634),p=r(61396),h=r.n(p);function b(e){let{video:t}=e;return(0,a.jsxs)("div",{id:"video-".concat(t.id),className:"group mb-6 flex flex-col border-b border-b-surface pb-8 transition-all duration-200 md:mb-0 md:border-b-0 md:pb-12",children:[(0,a.jsx)(h(),{href:t.acf.url_tiktok,target:"_blank",children:(0,a.jsx)(f.Z,{src:t.acf.thumbnail||"/no-photo.png",className:"mb-4 aspect-square max-h-[540px] w-full rounded-t-lg border-b-4 border-b-category-videos bg-surface object-cover transition-all duration-300 group-hover:brightness-125 md:mb-6 md:aspect-auto",width:302,height:536,origin:"other",alt:t.title.rendered})}),(0,a.jsx)(h(),{target:"_blank",href:t.acf.url_tiktok,className:"mb-2 flex gap-2 text-sm-bold text-category-videos md:mb-6 md:text-md-bold",children:"Desenkaixa"}),(0,a.jsx)(h(),{target:"_blank",href:t.acf.url_tiktok,className:"mb-4 line-clamp-2 h-12 text-md-bold text-primary md:mb-6 md:h-16 md:text-display-sm-bold",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:t.title.rendered}})}),(0,a.jsx)(h(),{target:"_blank",href:t.acf.url_tiktok,className:"mb-6 line-clamp-2 hidden h-16 text-lg-regular text-secondary md:block",children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:t.acf.descricao}})}),(0,a.jsxs)("div",{className:"hidden gap-4 text-xs-bold text-secondary md:flex",children:[(0,a.jsx)("div",{className:"flex items-center gap-2","data-cy":"episode-vertical-videocard",children:(0,a.jsxs)(h(),{target:"_blank",href:"https://desenkaixa.com.br/search?author=".concat(t.acf.apresentador[0].term_id,"&author_name=").concat(t.acf.apresentador[0].name),className:"flex items-center gap-2",children:[(0,a.jsx)(f.Z,{className:"rounded-full",src:t.apresentador_foto[0],width:24,height:24,alt:t.acf.apresentador[0].name,origin:"other"}),t.acf.apresentador[0].name]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2","data-cy":"date-vertical-videocard",children:[(0,a.jsx)(m.default,{className:"!h-4 !w-4 text-tertiary"}),(0,u.p6)(t.date_gmt)]})]}),(0,a.jsx)("div",{className:"mt-6 border-t border-surface pt-6 text-center",children:t.acf.url_produto&&(0,a.jsx)(h(),{target:"_blank",href:t.acf.url_produto,className:"rounded-lg border border-interactive px-4 py-2 text-sm-bold text-interactive",children:"Link do produto"})})]})}var v=r(24906),x=r(1725);function g(e){let{type:t,items:r,content:u}=e,[m,f]=(0,o.useState)(0),p="data-[active=true]:text-category-brand data-[active=true]:border-category-brand";switch(t){case"news":p="data-[active=true]:text-category-noticias data-[active=true]:border-category-noticias";break;case"videocast":case"tiktok":p="data-[active=true]:text-category-videos data-[active=true]:border-category-videos";break;case"podcast":p="data-[active=true]:text-category-podcasts data-[active=true]:border-category-podcasts"}return(0,a.jsxs)("div",{className:"mb-6 md:mb-10",children:[(0,a.jsx)(n.Z,{children:r.map((e,t)=>(0,a.jsxs)("button",{"data-active":t===m,onClick:()=>f(t),className:"md:bg-category mb-6 md:mb-0 md:block md:w-full md:min-w-[190px] md:snap-start md:border-b-4 md:border-surface md:pb-2 md:text-secondary md:data-[active=true]:border-b-8 ".concat(p),children:[(0,a.jsx)("div",{className:"hidden text-display-xs-bold md:block",children:e.label}),(0,a.jsx)("div",{className:"md:hidden",children:(0,a.jsx)(x.Z,{label:e.label,current:t===m})})]},t))}),(0,a.jsxs)("h3",{className:"relative my-12 hidden overflow-hidden rounded-md bg-surface px-4 py-2 text-display-sm-bold text-secondary md:flex","data-cy":"title-tab",children:[(0,a.jsx)("span",{className:"absolute left-0 top-0 h-full w-1 rounded-lg bg-tertiary"}),r[m].label]}),(0,a.jsx)("div",{className:"-mx-4 md:mx-0",children:u.map((e,r)=>(0,a.jsx)("div",{"data-active":r===m,className:"hidden data-[active=true]:block",children:(0,a.jsx)(i.default,{id:"gallery-tab-".concat(t,"-").concat(r),loop:!1,autoplay:!1,breakpoints:{320:{slidesPerView:"tiktok"===t?2.5:1.1,spaceBetween:8,slidesOffsetAfter:16,slidesOffsetBefore:16},768:{slidesPerView:"tiktok"===t?4:3,slidesPerGroup:"tiktok"===t?4:3,spaceBetween:24,slidesOffsetAfter:0,slidesOffsetBefore:0}},children:e.map((e,r)=>{switch(t){case"podcast":return(0,a.jsx)(c.Z,{mode:"vertical",podcast:e},r);case"news":return(0,a.jsx)(d.Z,{mode:"vertical",news:e},r);case"videocast":return(0,a.jsx)(l.Z,{mode:"vertical",video:e},r);case"tiktok":if(e.acf)return(0,a.jsx)(b,{video:e},r);return(0,a.jsx)(v.h,{video:e},r)}})})},r))}),(0,a.jsx)("div",{className:"mb-12 mt-0 flex justify-center pt-6 md:mt-12 md:border-t md:border-surface md:pt-12",children:"_blank"===r[m].target?(0,a.jsxs)(s.Z,{href:"".concat(r[m].link),target:"_blank",children:["Veja mais em ",r[m].label]}):(0,a.jsxs)(s.Z,{href:"".concat(r[m].link),children:["Veja mais em"," ",r[m].button?r[m].button:r[m].label]})})]})}},46220:function(e){e.exports={more:"style_more__ElaXS",btn:"style_btn__AV7zY",loading:"style_loading__imkoS",rotation:"style_rotation__qIHKW"}}}]);