1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[883],{511:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/surveys/[slug]",function(){return r(3777)}])},1363:function(e,t,r){"use strict";r.d(t,{Ah:function(){return l},DS:function(){return d},FU:function(){return o},Hw:function(){return p},MM:function(){return a},Nu:function(){return c},Te:function(){return n},WQ:function(){return m},dn:function(){return i},p0:function(){return u},pt:function(){return s}});let n="/img/logo/logo-dark.svg",s="/img/logo/logo-icon.svg",i="/img/app-store/black.svg",a="/img/google-play/black.png",l="/img/previews/course-pt.png",o="/img/previews/flashcard-pt.png",c="/img/previews/video-pt.png",d="/img/reviews/deuciane.jpg",u="/img/reviews/diego.jpg",m="/img/reviews/jessica.jpg",p="Prosa, Aprender ingl\xeas, Curso de ingl\xeas, Aplicativo de aprendizado, Frases essenciais em ingl\xeas, Vocabul\xe1rio em ingl\xeas, Conversa\xe7\xe3o em ingl\xeas, Flu\xeancia em ingl\xeas, Brasil, Brasileiros, Ingl\xeas para brasileiros, Aulas de ingl\xeas, Dicas de ingl\xeas, V\xeddeos explicativos, Erros comuns em ingl\xeas, Pron\xfancia em ingl\xeas, Gram\xe1tica em ingl\xeas, Palavras em ingl\xeas, Treinamento de ingl\xeas, Desenvolvimento de vocabul\xe1rio, Algoritmo de mem\xf3ria, Exerc\xedcios de ingl\xeas, Praticar ingl\xeas, Aperfei\xe7oamento em ingl\xeas, Comunica\xe7\xe3o em ingl\xeas, Express\xf5es em ingl\xeas, Idioma ingl\xeas, Did\xe1tica de ensino, Instrutor de ingl\xeas, V\xeddeos educativos, App para aprender ingl\xeas, Ferramenta de aprendizado, Tradu\xe7\xe3o para o ingl\xeas, Leitura em ingl\xeas, Intera\xe7\xe3o em ingl\xeas, Di\xe1logo em ingl\xeas, Express\xe3o oral, Memoriza\xe7\xe3o de palavras, Pr\xe1tica de conversa\xe7\xe3o, Profici\xeancia em ingl\xeas, Aquisi\xe7\xe3o de idiomas, T\xe9cnicas de estudo, Dom\xednio do ingl\xeas, Compreens\xe3o oral, Escuta ativa, Aprendizado adaptativo, Estrat\xe9gias de ensino, Recursos educacionais, Did\xe1tica moderna, Tutoria personalizada, Aprimoramento lingu\xedstico, Cultura inglesa, Interc\xe2mbio cultural, Aprendizado interativo, Ferramentas de ensino, Aprendizado cont\xednuo, Profissional de educa\xe7\xe3o, Foco no aluno, Suporte de aprendizado, Instru\xe7\xe3o individualizada, Motiva\xe7\xe3o para aprender, Experi\xeancia educacional, Aprendizagem eficaz, Metodologia de ensino, Aulas online, Plataforma educativa, Tutoria de idiomas, Pr\xe1tica consistente, Comunidade de aprendizado, Inova\xe7\xe3o educacional, Compet\xeancias lingu\xedsticas, Progresso no idioma, Ingl\xeas americano, Ingl\xeas brit\xe2nico, Abordagem pr\xe1tica, Simula\xe7\xe3o de conversas, Treinamento auditivo, Experi\xeancia imersiva, Interatividade educacional, Testes de profici\xeancia, Certifica\xe7\xe3o em ingl\xeas, Desafios de aprendizado, Ambiente de aprendizado, Atividades educativas, Compreens\xe3o escrita, Pr\xe1tica de escrita, Exerc\xedcios pr\xe1ticos, T\xe9cnicas de memoriza\xe7\xe3o, Desenvolvimento pessoal, Melhoria cont\xednua, Aprendizado aut\xf4nomo, Aprendizagem flex\xedvel, Ambiente de aprendizado seguro, Simon Gurney"},7962:function(e,t,r){"use strict";r.d(t,{bp:function(){return n},mq:function(){return s}});let n={tabPortrait:600,tabLandscape:900,desktop:1200,bigDesktop:1800},s=(e,t)=>{let r=[];void 0!==e&&r.push("(min-width: ".concat("string"==typeof e?e:"".concat(e,"px"),")")),void 0!==t&&r.push("(max-width: ".concat("string"==typeof t?t:"".concat(t,"px"),")"));let n=r.join(" and ");return"@media ".concat(n)}},2511:function(e,t,r){"use strict";r.d(t,{A:function(){return a}});var n=r(5893),s=r(761);let i={rightBlob:(0,s.iv)({position:"absolute",top:-300,left:"20vw",width:"150vw",minWidth:1200,maxWidth:2e3,height:"160vh",overflow:"hidden"}),leftBlob:(0,s.iv)({position:"absolute",top:-700,right:"50vw",width:"150vw",height:"160vh",overflow:"hidden"}),outer:(0,s.iv)({position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1,overflow:"hidden"})},a=()=>(0,n.jsxs)("div",{className:i.outer,children:[(0,n.jsx)("svg",{preserveAspectRatio:"none",className:i.rightBlob,viewBox:"0 0 480 480",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:(0,n.jsx)("path",{fill:"var(--color-primary-50)",d:"M389,258.5Q329,277,325.5,299.5Q322,322,319,373Q316,424,278,419Q240,414,202.5,418Q165,422,158,375.5Q151,329,101.5,323.5Q52,318,54,279Q56,240,82,212.5Q108,185,107,145.5Q106,106,141,95Q176,84,208,83Q240,82,271.5,85Q303,88,353.5,82Q404,76,418.5,118Q433,160,441,200Q449,240,389,258.5Z"})}),(0,n.jsx)("svg",{preserveAspectRatio:"none",className:i.leftBlob,viewBox:"0 0 480 480",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:(0,n.jsx)("path",{fill:"var(--color-primary-50)",d:"M389,258.5Q329,277,325.5,299.5Q322,322,319,373Q316,424,278,419Q240,414,202.5,418Q165,422,158,375.5Q151,329,101.5,323.5Q52,318,54,279Q56,240,82,212.5Q108,185,107,145.5Q106,106,141,95Q176,84,208,83Q240,82,271.5,85Q303,88,353.5,82Q404,76,418.5,118Q433,160,441,200Q449,240,389,258.5Z"})})]})},569:function(e,t,r){"use strict";r.d(t,{I:function(){return c}});var n=r(5893),s=r(761),i=r(1664),a=r.n(i),l=r(2440);let o={outer:(0,s.iv)({height:"3.5rem",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",paddingRight:"2rem",paddingLeft:"2rem",fontSize:"1rem",fontWeight:600,color:"var(--color-neutral-900)",letterSpacing:"0.05em",fontFamily:"var(--font-heading)",textDecoration:"none",background:"var(--gold-gradient-2)",outline:"none",borderRadius:"calc(0.5 * 3.5rem)",border:"none",transition:"border-color 200ms, color 200ms, background-color 200ms, box-shadow 200ms",":not(:disabled):hover, :not(:disabled):active":{cursor:"pointer",boxShadow:"0rem 0.5rem 3rem rgba(218, 165, 32, 0.4)"},position:"relative",overflow:"hidden","&::before":{content:'""',position:"absolute",top:"-50%",left:"-50%",width:"200%",height:"200%",background:"linear-gradient(45deg, transparent 20%, rgba(255,255,255,0.2) 30%, transparent 40%)",transform:"rotate(30deg)",animation:"shine 3s infinite"},":disabled":{opacity:.6,cursor:"not-allowed","&::before":{display:"none"}},"@keyframes shine":{"0%":{transform:"translateX(-100%) rotate(30deg)"},"100%":{transform:"translateX(100%) rotate(30deg)"}}})},c=e=>{let{id:t,className:r,style:i,href:c,children:d,onClick:u,isLoading:m,...p}=e,x=(0,n.jsx)(n.Fragment,{children:m?(0,n.jsx)(l.s5,{strokeColor:"#B8860B",strokeWidth:"5",animationDuration:"0.75",width:"32"}):d});return c?(0,n.jsx)(a(),{...p,id:t,prefetch:!0,style:i,href:c,className:(0,s.iv)(o.outer,r),onClick:m?e=>e.preventDefault():u,children:x}):(0,n.jsx)("button",{...p,id:t,style:i,disabled:m,onClick:m?void 0:u,className:(0,s.iv)(o.outer,r),children:x})}},1824:function(e,t,r){"use strict";r.d(t,{K:function(){return n}});let n={features:"features",reviews:"reviews",pricing:"pricing",faqs:"faq",top:"top"}},6031:function(e,t,r){"use strict";r.d(t,{_:function(){return d}});
1var n=r(2729),s=r(5893),i=r(5202),a=r(761),l=r(7294);function o(){let e=(0,n._)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n display: block;\n position: relative;\n overflow-x: hidden;\n overflow-y: scroll;\n height: 100vh;\n width: 100vw;\n"]);return o=function(){return e},e}let c=(0,a.iv)(o()),d=e=>{let{children:t,isReady:r=!0,...n}=e,o=(0,l.useRef)(null),d=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=o.current,t=()=>{d.current!==location.pathname&&(d.current=location.pathname,null===i.bO||void 0===i.bO||i.bO.track("scroll"))};return null==e||e.addEventListener("scroll",t),()=>{null==e||e.removeEventListener("scroll",t)}},[]),(0,s.jsx)("div",{...n,ref:o,className:(0,a.iv)(c,n.className),style:n.style,children:t})}},3793:function(e,t,r){"use strict";r.d(t,{bv:function(){return l}});var n=r(5893),s=r(7294);let i=()=>(0,n.jsx)("br",{}),a=e=>{let{item:t}=e;return(0,n.jsx)("span",{style:{fontWeight:t.isBold?"bold":void 0},children:t.content})},l=(e=>{let{NewLine:t=i,Span:r=a}=e;return e=>{let{text:i,...a}=e;return(0,n.jsx)("p",{...a,children:(null!=i?i:[]).map((e,i)=>(0,n.jsx)(s.Fragment,{children:"newLine"===e.type?(0,n.jsx)(t,{item:e}):"text"===e.type?(0,n.jsx)(r,{item:e}):null},i))})}})({})},9075:function(e,t,r){"use strict";r.d(t,{D:function(){return w}});var n=r(5893),s=r(761),i=r(5675),a=r.n(i),l=r(1664),o=r.n(l),c=r(7294),d=r(1363),u=r(7962),m=r(1824);let p=[{href:"/#"+m.K.reviews,text:"Avalia\xe7\xf5es"},{href:"/#"+m.K.features,text:"Sobre"},{href:"/#"+m.K.pricing,text:"Pre\xe7o"},{href:"/#"+m.K.faqs,text:"FAQs"}],x=(0,s.iv)({width:"100%",paddingLeft:"1rem",paddingRight:"1rem",boxSizing:"border-box",position:"relative"}),h=(0,s.iv)({maxWidth:"70rem",margin:"auto",display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"1rem",paddingBottom:"1rem"}),v=(0,s.iv)({display:"flex",flexDirection:"row",[(0,u.mq)(0,u.bp.tabPortrait)]:{display:"none"}}),f=(0,s.iv)({width:"3rem",height:"3rem",borderRadius:"50%",border:"2px solid var(--color-neutral-600)",backgroundColor:"white",display:"flex",flexDirection:"column",justifyContent:"space-between",paddingTop:"0.9rem",paddingBottom:"0.9rem",paddingLeft:"0.8rem",paddingRight:"0.8rem",flexShrink:0,"> *":{height:"2.5px",width:"100%",backgroundColor:"var(--color-neutral-700)"},[(0,u.mq)(u.bp.tabPortrait)]:{display:"none"}}),g=(0,s.iv)({display:"flex",flexDirection:"column",position:"absolute",top:"5rem",backgroundColor:"white",border:"2px solid var(--color-neutral-700)",left:"0.5rem",right:"0.5rem",zIndex:1,padding:"0.5rem",borderRadius:"1.5rem",[(0,u.mq)(u.bp.tabPortrait)]:{display:"none"},"> *":{marginBottom:"0.5rem",marginTop:"0.5rem"}}),b=(0,s.iv)({fontFamily:"var(--font-heading)",fontSize:"1rem",paddingTop:"0.1rem",marginRight:"1.7rem",marginLeft:"0.5rem",display:"inline-block",textDecoration:"none",verticalAlign:"middle",fontWeight:500,color:"var(--color-neutral-700)",position:"relative",paddingBottom:"0.3rem",transition:"color 200ms","&:before":{content:'""',position:"absolute",bottom:0,left:0,display:"block",width:"1rem",backgroundColor:"var(--color-neutral-600)",height:"2px",transition:"width 200ms, background-color 200ms"},":hover":{color:"var(--color-primary-500)","&:before":{width:"2rem",backgroundColor:"var(--color-primary-500)"}}}),j=(0,s.iv)({height:"2.1rem",width:"7.6rem",marginTop:"0.5rem",display:"block",position:"relative"}),w=e=>{let{hideLinks:t}=e,[r,s]=(0,c.useState)(!1);return(0,n.jsx)("div",{className:x,children:(0,n.jsxs)("nav",{className:h,children:[(0,n.jsx)(o(),{href:"/",className:j,children:(0,n.jsx)(a(),{fill:!0,alt:"Prosa",src:d.Te})}),t?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:v,children:p.map(e=>{let{href:t,text:r}=e;return(0,n.jsx)("a",{className:b,href:t,children:r},t)})}),(0,n.jsxs)("button",{className:f,onClick:()=>s(e=>!e),children:[(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{})]}),r?(0,n.jsx)("span",{className:g,children:p.map(e=>{let{href:t,text:r}=e;return(0,n.jsx)("a",{className:b,href:t,children:r},t)})}):null]})]})})}},3777:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return $}});var n=r(5893),s=r(5202),i=r(2511),a=r(569),l=r(6031),o=r(3793),c=r(7294);let d=e=>{let{size:t="md",variant:r="primary",className:s=""}=e;return(0,n.jsx)("div",{className:"\n inline-block \n animate-spin \n rounded-full\n ".concat({sm:"h-4 w-4 border-2",md:"h-8 w-8 border-3",lg:"h-12 w-12 border-4"}[t],"\n ").concat({default:"border-neutral-200 border-t-neutral-600",primary:"border-primary-200 border-t-primary-600"}[r],"\n ").concat(s,"\n "),role:"status","aria-label":"loading",children:(0,n.jsx)("span",{className:"sr-only",children:"Loading..."})})};var u=r(9075);/** 2 * @license lucide-react v0.454.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */let m=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),p=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim()};/** 7 * @license lucide-react v0.454.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 12 * @license lucide-react v0.454.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */let h=(0,c.forwardRef)((e,t)=>{let{color:r="currentColor",size:n=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:l,iconNode:o,...d}=e;return(0,c.createElement)("svg",{ref:t,...x,width:n,height:n,stroke:r,strokeWidth:i?24*Number(s)/Number(n):s,className:p("lucide",a),...d},[...o.map(e=>{let[t,r]=e;return(0,c.createElement)(t,r)}),...Array.isArray(l)?l:[l]])}),v=((e,t)=>{let r=(0,c.forwardRef)((r,n)=>{let{className:s,...i}=r;return(0,c.createElement)(h,{ref:n,iconNode:t,className:p("lucide-".concat(m(e)),s),...i})});return r.displayName="".concat(e),r})("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),f=e=>{let{variant:t="default",className:r="",children:s}=e;return(0,n.jsx)("div",{className:"".concat("p-6 rounded-2xl border shadow-lg"," ").concat({default:"bg-white border-neutral-200 text-neutral-700",destructive:"bg-white border-red-200 text-red-700"}[t]," ").concat(r),children:s})},g=e=>{let{children:t}=e;return(0,n.jsx)("div",{className:"text-sm lg:text-base font-body leading-[1.7]",children:t})},b=e=>{let{as:t,variant:r="default",className:s="",children:i,...a}=e;return(0,n.jsx)(t||"button",{className:"".concat("px-6 py-3 rounded-2xl font-medium transition-colors duration-200 text-sm lg:text-base inline-flex items-center justify-center"," ").concat({default:"bg-primary-500 text-white hover:bg-primary-600 shadow-lg",outline:"border border-neutral-200 hover:bg-neutral-50"}[r]," ").concat(s),...a,children:i})},j=e=>{let{className:t="",children:r}=e;return(0,n.jsx)("div",{className:"bg-white rounded-2xl border border-neutral-200 shadow-lg ".concat(t),children:r})},w=e=>{let{children:t,className:r}=e;return(0,n.jsx)("div",{className:"p-6 border-b border-neutral-200 ".concat(null!=r?r:""),children:t})},y=e=>{let{children:t,className:r}=e;return(0,n.jsx)("h3",{className:"font-semibold text-neutral-800 font-heading text-2xl leading-normal ".concat(null!=r?r:""),children:t})},N=e=>{var t;return(0,n.jsx)("div",{...e,className:"p-6 ".concat(null!==(t=e.className)&&void 0!==t?t:"")})},k=e=>{var t;return(0,n.jsx)("div",{...e,className:"p-6 ".concat(null!==(t=e.className)&&void 0!==t?t:""," border-t border-neutral-200 ")})},C=e=>{let{options:t,value:r,onChange:s}=e,i=e=>{s(r.includes(e)?r.filter(t=>t!==e):[...r,e])};return(0,n.jsx)("div",{children:t.map(e=>(0,n.jsxs)("div",{className:"flex items-center hover:bg-neutral-50 cursor-pointer",onClick:()=>i(e.value),children:[(0,n.jsxs)("div",{className:"relative flex items-center px-2 h-8",children:[(0,n.jsx)("input",{type:"checkbox",className:"peer sr-only",checked:r.includes(e.value)}
16),(0,n.jsx)("div",{className:"h-4 w-4 rounded-sm border border-gray-300 flex items-center justify-center\n transition-colors duration-200 text-white bg-white peer-checked:bg-primary-500\n peer-checked:border-primary-500 cursor-pointer",children:(0,n.jsx)(v,{strokeWidth:3})})]}),(0,n.jsx)("label",{className:" text-sm text-gray-700 select-none block flex-1 cursor-pointer",children:e.label})]},e.value))})},S=e=>{let{value:t,className:r=""}=e;return(0,n.jsx)("div",{className:"h-2 bg-neutral-100 rounded-full overflow-hidden shadow-inner ".concat(r),children:(0,n.jsx)("div",{className:"h-full bg-primary-500 transition-all duration-300",style:{width:"".concat(Math.min(100,Math.max(0,t)),"%")}})})},_=(0,c.createContext)(void 0),A=e=>{let{value:t,onValueChange:r,className:s="",children:i}=e;return(0,n.jsx)(_.Provider,{value:{value:t,onValueChange:r},children:(0,n.jsx)("div",{className:"".concat(s," flex flex-col items-stretch"),role:"radiogroup",children:i})})},Q=e=>{let{value:t,label:r,className:s="",...i}=e,{value:a,onValueChange:l}=function(){let e=(0,c.useContext)(_);if(!e)throw Error("RadioGroup.Item must be used within a RadioGroup");return e}();return(0,n.jsxs)("div",{className:"flex items-center hover:bg-neutral-50 cursor-pointer",onClick:()=>l(t),children:[(0,n.jsxs)("div",{className:"relative flex items-center px-2 h-8",children:[(0,n.jsx)("input",{type:"radio",value:t,className:"peer sr-only",...i,checked:t===a}),(0,n.jsx)("div",{className:"h-5 w-5 rounded-full border border-gray-300\n peer-checked:border-primary-500\n peer-checked:before:bg-primary-500\n before:absolute before:top-1/2 before:left-1/2\n before:-translate-y-1/2 before:-translate-x-1/2\n before:h-3 before:w-3 before:rounded-full\n before:transition-all before:duration-300\n peer-checked:before:opacity-100 before:opacity-0"})]}),(0,n.jsx)("label",{className:" text-sm text-gray-700 select-none block flex-1 cursor-pointer",children:r})]})},q=e=>{let{min:t,max:r,step:s,value:i,onValueChange:a,labels:l}=e,o=c.useMemo(()=>Array.from({length:Math.floor((r-t)/s)+1},(e,r)=>t+r*s),[t,r,s]),d=o.findIndex(e=>e===i);return(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{type:"range",min:t,max:r,step:s,value:i,onChange:e=>a(Number(e.target.value)),className:"w-full h-2 bg-neutral-100 rounded-full appearance-none cursor-pointer shadow-inner"}),(0,n.jsx)("div",{className:"relative w-full flex justify-between mt-2 px-1",children:o.map(e=>(0,n.jsx)("div",{className:"flex flex-col items-center",style:{width:"20px"},children:(0,n.jsx)("div",{className:"h-1 w-px bg-neutral-500"})},e))})]}),l&&(0,n.jsx)("div",{className:"text-center mt-4 text-sm font-medium",children:l[d]})]})},P=e=>{let{className:t="",...r}=e;return(0,n.jsx)("textarea",{className:"w-full p-4 border border-neutral-200 rounded-2xl shadow-sm font-body text-sm text-neutral-700 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 ".concat(t),...r})},E=c.forwardRef((e,t)=>{let{label:r,error:s,className:i="",...a}=e;return(0,n.jsxs)("div",{className:"w-full",children:[r&&(0,n.jsx)("label",{className:"block mb-2 text-sm font-medium text-neutral-700",children:r}),(0,n.jsx)("input",{ref:t,className:"\n w-full px-4 h-12 \n border border-neutral-200 \n rounded-2xl\n shadow-sm\n font-body text-sm text-neutral-700\n placeholder:text-neutral-400\n focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500\n disabled:bg-neutral-50 disabled:text-neutral-400 disabled:cursor-not-allowed\n ".concat(s?"border-red-300 focus:ring-red-500 focus:border-red-500":"","\n ").concat(i,"\n "),...a}),s&&(0,n.jsx)("p",{className:"mt-2 text-sm text-red-600",children:s})]})});var T=r(8717);class I extends Error{constructor(e,t,r){super(t),this.status=e,this.data=r,this.name="SurveyApiError"}}class z{async request(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="".concat(this.baseUrl).concat(e),n=await fetch(r,{...t,headers:{...this.headers,...t.headers}});if(!n.ok)throw new I(n.status,"API request failed: ".concat(n.statusText),await n.json().catch(()=>void 0));return n.json()}async getSurvey(e){return(await this.request("/api/surveys/".concat(e))).item}async getSurveys(e){let t=new URLSearchParams;return(null==e?void 0:e.slug)&&t.set("slug",e.slug),(null==e?void 0:e.skip)&&t.set("skip",e.skip.toString()),(null==e?void 0:e.take)&&t.set("take",e.take.toString()),this.request("/api/surveys?".concat(t.toString()))}async createSurveyResponse(e){return(await this.request("/api/survey-responses",{method:"POST",body:JSON.stringify(e)})).item}async updateSurveyResponse(e,t){return(await this.request("/api/survey-responses/".concat(e),{method:"PATCH",body:JSON.stringify(t)})).item}constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,""),this.headers={"Content-Type":"application/json",...e.headers}}}function R(e,t,r){return e.find(e=>e.slug===t.slug&&e.type===r)}var L=r(9008),D=r.n(L),M=r(1163);let B=e=>{var t,r,s;let{question:i,value:a,onChange:l}=e,[o,d]=(0,c.useState)(""),u=null===(t=i.options)||void 0===t?void 0:t.some(e=>"other"===e.slug),m=a.includes("other");(0,c.useEffect)(()=>{var e,t;let r=null===(t=i.answers)||void 0===t?void 0:null===(e=t.find(e=>e.slug===i.slug))||void 0===e?void 0:e.otherText;r&&d(r)},[i]);let p=e=>{l({type:"multiple_choice",slug:i.slug,selectedOptions:e,otherText:m?o:void 0})},x=e=>{d(e),l({type:"multiple_choice",slug:i.slug,selectedOptions:a,otherText:e})};return i.selectMultiple?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(C,{options:null!==(s=null===(r=i.options)||void 0===r?void 0:r.map(e=>({label:e.title.pt_br,value:e.slug})))&&void 0!==s?s:[],onChange:p,value:a}),u&&m&&(0,n.jsx)("div",{className:"ml-6",children:(0,n.jsx)(E,{placeholder:"Especifique sua resposta",value:o,onChange:e=>x(e.target.value),className:"max-w-md"})})]}):(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(A,{onValueChange:e=>p([e]),value:a[0],children:i.options.map(e=>(0,n.jsx)(Q,{value:e.slug,label:e.title.pt_br},e.slug))}),u&&m&&(0,n.jsx)("div",{className:"ml-6",children:(0,n.jsx)(E,{placeholder:"Especifique sua resposta",value:o,onChange:e=>x(e.target.value),className:"max-w-md"})})]})},O=e=>{var t,r;let{question:s,value:i,onChange:a}=e;return(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)(q,{min:1,max:s.stepCount||5,step:1,value:i||0,onValueChange:e=>a({type:"scale",slug:s.slug,value:e})}),(0,n.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,n.jsx)("span",{children:null===(t=s.minLabel)||void 0===t?void 0:t.pt_br}),(0,n.jsx)("span",{children:null===(r=s.maxLabel)||void 0===r?void 0:r.pt_br})]})]})},F=e=>{let{question:t,value:r,onChange:s}=e;return(0,n.jsx)(P,{value:r||"",onChange:e=>s({type:"free_text",slug:t.slug,text:e.target.value}),className:"h-32"})},W=e=>{var t,r;let{question:s,importance:i,satisfaction:a,onChange:l}=e;return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"mb-2 text-sm",children:null===(t=s.importanceQuestionTitle)||void 0===t?void 0:t.pt_br}),(0,n.jsx)(q,{min:1,max:5,step:1,value:i||1,onValueChange:e=>l({type:"gap",slug:s.slug,importance:e,satisfaction:a}
16),labels:["Nada importante","Pouco importante","Moderadamente importante","Muito importante","Extremamente importante"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"mb-2 text-sm",children:null===(r=s.satisfactionQuestionTitle)||void 0===r?void 0:r.pt_br}),(0,n.jsx)(q,{min:-3,max:3,step:1,value:a||0,onValueChange:e=>l({type:"gap",slug:s.slug,importance:i,satisfaction:e}),labels:["Completamente insatisfeito","Muito insatisfeito","Levemente insatisfeito","Nem satisfeito nem insatisfeito","Levemente satisfeito","Muito satisfeito","Completamente satisfeito"]})]})]})},V=e=>{let{question:t,answers:r,onAnswer:s}=e;switch(t.type){case"multiple_choice":{let e=R(r,t,"multiple_choice");return(0,n.jsx)(B,{question:t,value:(null==e?void 0:e.selectedOptions)||[],onChange:s})}case"scale":{let e=R(r,t,"scale");return(0,n.jsx)(O,{question:t,value:(null==e?void 0:e.value)||0,onChange:s})}case"free_text":{let e=R(r,t,"free_text");return(0,n.jsx)(F,{question:t,value:(null==e?void 0:e.text)||"",onChange:s})}case"gap":{let e=R(r,t,"gap");return(0,n.jsx)(W,{question:t,importance:(null==e?void 0:e.importance)||0,satisfaction:(null==e?void 0:e.satisfaction)||0,onChange:s})}default:return null}},U=e=>{let{current:t,total:r}=e;return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(S,{value:t/r*100,className:"w-full"}),(0,n.jsxs)("div",{className:"text-sm text-gray-500 text-center",children:[t+1," / ",r]})]})},X=e=>{let{isLoading:t,currentIndex:r,totalQuestions:s,onPrevious:i,onNext:a}=e,l=t?"opacity-50 cursor-not-allowed":"";return(0,n.jsxs)("div",{className:"flex flex-row justify-between relative",children:[t&&(0,n.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-0",children:(0,n.jsx)(d,{size:"lg",variant:"default"})}),(0,n.jsx)(b,{className:l,variant:"outline",onClick:t?()=>{}:i,children:"Anterior"}),(0,n.jsx)(b,{className:l,onClick:t?()=>{}:a,children:r===s-1?"Concluir":"Pr\xf3ximo"})]})},K=new z({baseUrl:T.OB.API_URL}),G=e=>{var t,r;let{survey:s,onStart:i}=e;return(0,n.jsxs)(j,{className:"w-full mt-4 mb-8",children:[(0,n.jsxs)(w,{children:[(0,n.jsx)(y,{children:s.title.pt_br}),(null===(t=s.subtitle)||void 0===t?void 0:t.pt_br)&&(0,n.jsx)("p",{className:"text-sm text-neutral-600",children:(0,n.jsx)(o.bv,{text:s.subtitle.pt_br})})]}),(0,n.jsx)(N,{className:"flex flex-col items-center justify-center",children:(null===(r=s.welcomeText)||void 0===r?void 0:r.pt_br)&&(0,n.jsx)("div",{className:"prose text-sm",children:(0,n.jsx)(o.bv,{text:s.welcomeText.pt_br})})}),(0,n.jsx)(k,{className:"flex justify-center",children:(0,n.jsx)(a.I,{onClick:i,children:"Iniciar Pesquisa"})})]})},J=e=>{var t;let{survey:r,onBack:s}=e;return(0,n.jsxs)(j,{className:"w-full mt-4 mb-8",children:[(0,n.jsx)(w,{children:(0,n.jsx)(y,{children:"Obrigado!"})}),(0,n.jsx)(N,{className:"min-h-[30rem] flex flex-col items-center justify-center space-y-6",children:(null===(t=r.completionText)||void 0===t?void 0:t.pt_br)?(0,n.jsx)("div",{className:"prose max-w-2xl text-center",children:(0,n.jsx)(o.bv,{text:r.completionText.pt_br})}):(0,n.jsxs)("div",{className:"text-center space-y-4",children:[(0,n.jsx)("p",{className:"text-2xl font-semibold",children:"Pesquisa Conclu\xedda"}),(0,n.jsx)("p",{className:"text-lg",children:"Obrigado por completar nossa pesquisa. Suas respostas foram registradas com sucesso."})]})}),(0,n.jsx)(k,{className:"flex justify-center",children:(0,n.jsx)(b,{variant:"outline",onClick:s,children:"Voltar para a \xfaltima pergunta"})})]})},Z=e=>{var t,r,s;let{isCompletingFinalPage:i,survey:a,currentQuestionIndex:l,setCurrentQuestionIndex:c,answers:d,onAnswer:u,onComplete:m,onBack:p}=e,x=a.questions[l],h=null===(t=x.title)||void 0===t?void 0:t.pt_br,v=null===(r=x.subtitle)||void 0===r?void 0:r.pt_br;return(0,n.jsxs)(j,{className:"w-full mt-4 mb-8",children:[(0,n.jsxs)(w,{children:[(0,n.jsx)(y,{children:a.title.pt_br}),(null===(s=a.subtitle)||void 0===s?void 0:s.pt_br)&&(0,n.jsx)("p",{className:"text-sm text-neutral-600",children:(0,n.jsx)(o.bv,{text:a.subtitle.pt_br})})]}),(0,n.jsxs)(N,{className:"min-h-[30rem]",children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h2",{className:"text-xl font-heading font-semibold",children:h}),v&&(0,n.jsx)("p",{className:"text-sm mt-2",children:v})]}),(0,n.jsx)(V,{question:x,answers:d,onAnswer:u})]}),(0,n.jsxs)(k,{className:"flex flex-col items-stretch space-y-4",children:[(0,n.jsx)(U,{current:l,total:a.questions.length}),(0,n.jsx)(X,{isLoading:i,currentIndex:l,totalQuestions:a.questions.length,onPrevious:()=>{0===l?p():c(Math.max(0,l-1))},onNext:()=>{l===a.questions.length-1?m():c(Math.min(a.questions.length-1,l+1))}})]})]})};var $=()=>{let{slug:e}=(0,M.useRouter)().query,[t,r]=(0,c.useState)(null),[a,o]=(0,c.useState)(0),[d,m]=(0,c.useState)([]),[p,x]=(0,c.useState)(!0),[h,v]=(0,c.useState)(null),[b,j]=(0,c.useState)("welcome"),[w,y]=(0,c.useState)(null);(0,c.useEffect)(()=>{let t=localStorage.getItem("survey-answers-"+e);m(t?JSON.parse(t):[])},[e]),(0,c.useEffect)(()=>{localStorage.setItem("survey-answers-"+e,JSON.stringify(d))},[d]),(0,c.useEffect)(()=>{(null==w?void 0:w.id)&&K.updateSurveyResponse(w.id,{answers:d}).catch(console.error)},[a]),(0,c.useEffect)(()=>{e&&(async()=>{try{x(!0);let t=await K.getSurvey(e);r(t);let n=await K.createSurveyResponse({surveyId:t.id,webSessionId:s.W4});y(n)}catch(e){v("Falha ao carregar a pesquisa. Por favor, tente novamente.")}finally{x(!1)}})()},[e]);let N=async e=>{let t=[...d],r=d.findIndex(t=>t.slug===e.slug);r>=0?t[r]=e:t.push(e),m(t)},[k,C]=(0,c.useState)(!1),S=async()=>{C(!0);try{await K.updateSurveyResponse(null==w?void 0:w.id,{answers:d,isComplete:!0}),j("completed")}catch(e){v("Falha ao enviar a pesquisa. Por favor, tente novamente.")}finally{C(!1)}};return p?(0,n.jsx)("div",{className:"flex justify-center items-center min-h-screen",children:"Carregando..."}):h?(0,n.jsx)(f,{variant:"destructive",className:"max-w-lg mx-auto mt-8",children:(0,n.jsx)(g,{children:h})}):t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D(),{children:(0,n.jsx)("meta",{name:"robots",content:"noindex"})}),(0,n.jsxs)(l._,{children:[(0,n.jsx)(u.D,{hideLinks:!0}),(0,n.jsx)(i.A,{}),(0,n.jsxs)("div",{className:"max-w-[40rem] mx-auto w-full min-h-[80vh] px-4 relative",children:["welcome"===b&&(0,n.jsx)(G,{survey:t,onStart:()=>j("questions")}),"questions"===b&&(0,n.jsx)(Z,{isCompletingFinalPage:k,survey:t,currentQuestionIndex:a,setCurrentQuestionIndex:o,answers:d,onAnswer:N,onComplete:S,onBack:()=>j("welcome")}),"completed"===b&&(0,n.jsx)(J,{survey:t,onBack:()=>{j("questions"),o(t.questions.length-1)}})]})]})]}):null}},1163:function(e,t,r){e.exports=r(6036)}},function(e){e.O(0,[794,191,664,411,888,774,179],function(){return e(e.s=511)}),_N_E=e.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.