PageSourceSearch

https://www.codedex.io/_next/static/chunks/pages/cpp/article-gen-e77d9144ae95d830.js

js codedex.io collected 2026-09-25 14:56:06 UTC 2,307 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4888],{8005:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/cpp/article-gen",function(){return n(87910)}])},87910:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return g}});var s=n(82729),i=n(85893),o=n(67294),r=n(19521),a=n(30984),u=n(99428),c=n(50325),p=n(77831),l=n(609),d=n(9473),h=n(11163),f=n(41514);function _templateObject(){let e=(0,s._)(["\n  min-height: 100vh;\n  height: fit-content;\n  background-color: ",';\n  font-family: "Mulish", sans-serif;\n  padding-bottom: 5rem;\n  padding: 0px 1rem;\n  padding-top: 3.9rem;\n']);return _templateObject=function(){return e},e}let m=r.default.div.withConfig({componentId:"sc-a0ebbeae-0"})(_templateObject(),e=>{let{theme:t}=e;return t.colors.background.grey.primary});var g=!0;t.default=function(){let e=(0,d.v9)(l.xF),[t,n]=(0,o.useState)(""),[s,r]=(0,o.useState)(""),[g,b]=(0,o.useState)([]),[_,S]=(0,o.useState)(!0),[y,w]=(0,o.useState)(!1),[v,j]=(0,o.useState)(!1),k=(0,d.v9)(l.ot),x=(0,h.useRouter)();async function handleSubmit(i){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(i.preventDefault(),!k){x.push("/signup");return}r(""),v&&j(!1),S(!1),console.log(o);let a=null===o?t:o,u=[...g,{role:"user",content:a}];b(u);try{(0,f.C3)({eventName:"infinite_course_ai",properties:{message:a}})}catch(e){}let c=await fetch("/api/infiniteCourse",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:a,type:"cpp",club:e})}),p=c.body.getReader(),l=new TextDecoder;for(;;){let{done:e,value:t}=await p.read();if(w(e),window.scrollTo({left:0,top:document.body.scrollHeight+100,behavior:"smooth"}),e){n("");break}r(e=>e+l.decode(t,{stream:!0}))}b([...u,{role:"assistant",content:s}])}return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u.Z,{learningEnv:"python"}),(0,i.jsxs)(m,{children:[!s&&_&&(0,i.jsx)(a.Z,{setInput:n,input:t,handleSubmit:handleSubmit,type:"cpp"}),s&&(0,i.jsx)(c.Z,{response:s,setResponse:r,setInput:n,input:t,handleSubmit:handleSubmit,setFirstRender:S,streamEnded:y,showAskAgain:v,type:"cpp"})]}),(0,i.jsx)(p.Z,{response:s,setShowAskAgain:j,type:"cpp"})]})}}},function(e){e.O(0,[1272,8700,4153,1622,9280,286,1226,5024,155,2075,9428,1043,9774,2888,179],function(){return e(e.s=8005)}),_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.