PageSourceSearch

https://studio--ai-navigator-1x49m.us-central1.hosted.app/_next/static/chunks/6244-2c7e5fd3564cb1ff.js

js studio--ai-navigator-1x49m.us-central1.hosted.app collected 2026-10-03 04:09:19 UTC 19,892 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6244],{31866:(e,s,t)=>{t.d(s,{l:()=>a});var n=t(34477);let a=(0,n.createServerReference)("4079eb35ce7fdc7129bc258ad504c12e2ed6f40525",n.callServer,void 0,n.findSourceMapURL,"processMultimodalContent")},62678:(e,s,t)=>{t.d(s,{I:()=>C});var n=t(95155),a=t(34477);let l=(0,a.createServerReference)("401630af7c4e88902b25d3cd8c8806f4d234750345",a.callServer,void 0,a.findSourceMapURL,"createGuidedPath");var i=t(30285),r=t(66695),o=t(12115),c=t(8531),d=t(18763),u=t(37607),h=t(15300),p=t(60679),m=t(15599),x=t(7390),g=t(60620),w=t(15873),f=t(26597),y=t(44838),j=t(55365),v=t(7270),S=t(62523),N=t(88539),b=t(3132);function C(e){let{topic:s}=e,[t,a]=(0,o.useState)([]),[C,T]=(0,o.useState)([]),[F,k]=(0,o.useState)(!1),[z,A]=(0,o.useState)(!1),[D,R]=(0,o.useState)(null),[P,E]=(0,o.useState)("Copy"),[O,I]=(0,o.useState)(!1),[$,G]=(0,o.useState)("idle"),M=(0,o.useRef)(null),[_,L]=(0,o.useState)([]),[W,U]=(0,o.useState)("Copy & Open"),[B,Z]=(0,o.useState)("Copy & Open");(0,o.useEffect)(()=>{if("undefined"!=typeof navigator&&navigator.share&&I(!0),window.speechSynthesis){let e=window.speechSynthesis.getVoices();e.length>0?L(e):window.speechSynthesis.onvoiceschanged=()=>{if(window.speechSynthesis){let e=window.speechSynthesis.getVoices();e.length>0&&(L(e),(e.some(e=>e.default)||e.length>5)&&(window.speechSynthesis.onvoiceschanged=null))}}}return()=>{window.speechSynthesis&&(window.speechSynthesis.onvoiceschanged=null,M.current&&(window.speechSynthesis.cancel(),M.current=null)),G("idle")}},[]);let V=()=>C,Y=V().map(e=>"".concat(e.subtopic,". ").concat(e.description)).join("\n\n"),H=V().map((e,s)=>"".concat(s+1,". ").concat(e.subtopic,":\n").concat(e.description)).join("\n\n");(0,o.useEffect)(()=>{let e=async()=>{A(!0),R(null),k(!1),E("Copy"),U("Copy & Open"),Z("Copy & Open"),"idle"!==$&&(window.speechSynthesis.cancel(),G("idle"),M.current&&(M.current.onend=null,M.current=null));try{let e=await l({topic:s});e.error?(R(e.error),a([]),T([])):(a(e.learningPath),T(e.learningPath))}catch(e){console.error("Failed to generate learning path:",e),R("Failed to load learning path. Please try again."),a([]),T([])}finally{A(!1)}};s&&e()},[s]);let X=(e,s,t)=>{let n=[...C];n[e]={...n[e],[s]:t},T(n)},q=async()=>{if(H&&navigator.clipboard)try{await navigator.clipboard.writeText(H),E("Copied!"),setTimeout(()=>E("Copy"),2e3)}catch(e){console.error("Failed to copy text: ",e),E("Failed"),setTimeout(()=>E("Copy"),2e3)}else E("Failed"),setTimeout(()=>E("Copy"),2e3)},J=async()=>{if(O&&H)try{await navigator.share({title:"Guidelines for: ".concat(s),text:H})}catch(e){console.error("Error sharing:",e)}else H&&alert("Web Share API not supported. Please copy the text manually.")},K=async()=>{if(H)try{await navigator.clipboard.writeText(H),U("Copied!"),window.open("https://docs.google.com/document/create","_blank"),setTimeout(()=>U("Copy & Open"),2e3)}catch(e){console.error("Failed to copy to clipboard or open Google Docs:",e),U("Failed"),setTimeout(()=>U("Copy & Open"),2e3)}},Q=async()=>{let e=V();if(0===e.length)return;let s="Subtopic	Description\n"+e.map(e=>"".concat(e.subtopic.replace(/\t/g," "),"	").concat(e.description.replace(/\t/g," ").replace(/\n/g," "))).join("\n");try{await navigator.clipboard.writeText(s),Z("Copied!"),window.open("https://docs.google.com/spreadsheets/create","_blank"),setTimeout(()=>Z("Copy & Open"),2e3)}catch(e){console.error("Failed to copy to clipboard or open Google Sheets:",e),Z("Failed"),setTimeout(()=>Z("Copy & Open"),2e3)}};return(0,n.jsxs)(r.Zp,{className:"mt-4",children:[(0,n.jsxs)(r.aR,{className:"flex flex-row items-start justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)(r.ZB,{className:"text-lg",children:["Guidelines for: ",s]}),(0,n.jsx)(r.BT,{className:"text-primary",children:z?"Loading...":"Follow these guidelines for the topic in a structured way."})]}),(0,n.jsx)("div",{className:"flex items-center space-x-1",children:C.length>0&&!z&&!D&&(0,n.jsxs)(n.Fragment,{children:[F&&(0,n.jsx)(i.$,{variant:"ghost",size:"icon",onClick:()=>{T(t)},title:"Reset Changes",children:(0,n.jsx)(c.A,{className:"h-4 w-4"})}),(0,n.jsx)(i.$,{variant:"ghost",size:"icon",onClick:()=>k(!F),title:F?"Done Editing":"Edit Guidelines",children:(0,n.jsx)(d.A,{className:"h-4 w-4"})}),(0,n.jsxs)(y.DropdownMenu,{children:[(0,n.jsx)(y.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsx)(i.$,{variant:"ghost",size:"icon",children:(0,n.jsx)(u.A,{className:"h-4 w-4"})})}),(0,n.jsxs)(y.DropdownMenuContent,{align:"end",children:[(0,n.jsxs)(y.DropdownMenuItem,{onClick:K,children:[(0,n.jsx)(h.A,{className:"mr-1 h-3.5 w-3.5"}),"Copy & Open"===W?"To Google Docs":W]}),(0,n.jsxs)(y.DropdownMenuItem,{onClick:Q,children:[(0,n.jsx)(p.A,{className:"mr-1 h-3.5 w-3.5"}),"Copy & Open"===B?"To Google Sheets":B]})]})]})]})})]}),(0,n.jsx)(r.Wu,{children:z?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-3/4 animate-pulse"}),(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-full animate-pulse"}),(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-5/6 animate-pulse"})]}):D?(0,n.jsxs)(j.Fc,{variant:"destructive",children:[(0,n.jsx)(v.A,{className:"h-4 w-4"}),(0,n.jsx)(j.XL,{children:"Error"}),(0,n.jsx)(j.TN,{children:D})]}):F?(0,n.jsx)("ol",{className:"list-inside list-decimal space-y-4",children:C.map((e,s)=>(0,n.jsxs)("li",{children:[(0,n.jsx)(S.p,{value:e.subtopic,onChange:e=>X(s,"subtopic",e.target.value),className:"font-semibold mb-1 h-8"}),(0,n.jsx)(N.T,{value:e.description,onChange:e=>X(s,"description",e.target.value),className:"text-sm"})]},s))}):(0,n.jsx)("ol",{className:"list-decimal list-inside",children:C.map((e,s)=>(0,n.jsxs)("li",{className:"mb-2",children:[(0,n.jsx)("h3",{className:"font-semibold",children:e.subtopic}),(0,n.jsx)("p",{className:"text-sm",children:e.description})]},s))})}),C.length>0&&!z&&!D&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.wL,{className:"flex justify-center space-x-4 pt-4",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(i.$,{variant:"default",size:"icon",onClick:q,disabled:"Copy"!==P,className:"rounded-full h-10 w-10",children:(0,n.jsx)(m.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:P})]}),O&&(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(i.$,{variant:"default",size:"icon",onClick:J,className:"rounded-full h-10 w-10",children:(0,n.jsx)(x.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"Share"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(i.$,{variant:"default",size:"icon",onClick:()=>{let e=V();if(0===e.length)return;let t=new f.default,n=t.internal.pageSize.height,a=t.internal.pageSize.width,l=15;t.setFontSize(16),t.setFont(void 0,"bold");let i="Guidelines for: ".concat(s),r=t.splitTextToSize(i,a-30);t.text(r,15,l),l+=9*r.length+5,e.forEach((e,s)=>{let i="".concat(s+1,". ").concat(e.subtopic);t.setFontSize(14),t.setFont(void 0,"bold");let r=t.splitTextToSize(i,a-30);t.setFontSize(12),t.setFont(void 0,"normal");let o=t.splitTextToSize(e.description,a-30-5),c=8*r.length+7*o.length+10;l+c>n-15&&(t.addPage(),l=15),t.setFontSize(14),t.setFont(void 0,"bold"),t.text(r,15,l),l+=8*r.length,t.setFontSize(12),t.setFont(void 0,"normal"),o.forEach(e
1=>{l+7>n-15&&(t.addPage(),l=15),t.text(e,20,l),l+=7}),l+=10}),t.save("guidelines-".concat(s.replace(/\s+/g,"_").toLowerCase(),".pdf"))},className:"rounded-full h-10 w-10",children:(0,n.jsx)(h.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"PDF"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(i.$,{variant:"default",size:"icon",onClick:()=>{if(!Y||!window.speechSynthesis){console.error(Y?"Speech synthesis is not supported.":"No guidelines to read.");return}if("playing"===$)window.speechSynthesis.pause(),G("paused");else if("paused"===$)window.speechSynthesis.resume(),G("playing");else{M.current&&window.speechSynthesis.cancel();let e=new SpeechSynthesisUtterance(Y);M.current=e,e.lang="en-US";let s=_.find(s=>s.lang===e.lang);s||(s=_.find(e=>e.default)),e.voice=s||null,e.onstart=()=>G("playing"),e.onend=()=>{G("idle"),M.current=null},e.onerror=e=>{console.error("Speech synthesis error:",e.error),G("idle"),M.current&&(M.current=null)},e.onpause=()=>{"playing"===$&&G("paused")},e.onresume=()=>{"paused"===$&&G("playing")},window.speechSynthesis.speak(e),G("speaking")}},"aria-label":"Read guidelines aloud",disabled:!window.speechSynthesis||!Y||"speaking"===$,className:"rounded-full h-10 w-10",children:(0,n.jsx)(g.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"playing"===$||"speaking"===$?"Pause":"paused"===$?"Resume":"Speak"})]})]}),(0,n.jsx)("div",{className:"p-4 border-t",children:(0,n.jsxs)(r.Zp,{className:"bg-muted/50",children:[(0,n.jsxs)(r.aR,{children:[(0,n.jsxs)(r.ZB,{className:"text-md font-semibold flex items-center",children:[(0,n.jsx)(w.A,{className:"h-5 w-5 mr-2 text-primary"}),"Translate Language"]}),(0,n.jsx)(r.BT,{children:"Translate the generated guidelines into another language."})]}),(0,n.jsx)(r.Wu,{children:(0,n.jsx)(b.P,{textToTranslate:H})})]})})]})]})}},94141:(e,s,t)=>{t.d(s,{f:()=>C});var n=t(95155),a=t(34477);let l=(0,a.createServerReference)("404bdff27cf75155ca2cb06629778bd992d91563e6",a.callServer,void 0,a.findSourceMapURL,"generateInformation");var i=t(31866),r=t(66695),o=t(30285),c=t(8531),d=t(18763),u=t(37607),h=t(15300),p=t(60679),m=t(15599),x=t(7390),g=t(60620),w=t(15873),f=t(12115),y=t(26597),j=t(44838),v=t(66766),S=t(88539),N=t(3132);let b="VIDEO_URL:";function C(e){let{topic:s,file:t}=e,[a,C]=(0,f.useState)(null),[T,F]=(0,f.useState)(null),[k,z]=(0,f.useState)(!1),[A,D]=(0,f.useState)(null),[R,P]=(0,f.useState)(!1),[E,O]=(0,f.useState)("Copy"),[I,$]=(0,f.useState)(!1),[G,M]=(0,f.useState)("idle"),_=(0,f.useRef)(null),[L,W]=(0,f.useState)([]),[U,B]=(0,f.useState)("Copy & Open"),[Z,V]=(0,f.useState)("Copy & Open");(0,f.useEffect)(()=>{if("undefined"!=typeof navigator&&navigator.share&&$(!0),window.speechSynthesis){let e=window.speechSynthesis.getVoices();e.length>0?W(e):window.speechSynthesis.onvoiceschanged=()=>{if(window.speechSynthesis){let e=window.speechSynthesis.getVoices();e.length>0&&(W(e),(e.some(e=>e.default)||e.length>5)&&(window.speechSynthesis.onvoiceschanged=null))}}}return()=>{window.speechSynthesis&&(window.speechSynthesis.onvoiceschanged=null,_.current&&(window.speechSynthesis.cancel(),_.current.onend=null,_.current.onpause=null,_.current.onresume=null,_.current.onerror=null,_.current=null)),M("idle")}},[]),(0,f.useEffect)(()=>{let e=async()=>{P(!0),C(null),F(null),z(!1),D(null),O("Copy"),B("Copy & Open"),V("Copy & Open"),"idle"!==G&&_.current&&(window.speechSynthesis.cancel(),M("idle"),_.current&&(_.current.onend=null,_.current.onpause=null,_.current.onresume=null,_.current.onerror=null,_.current=null));try{let e="";if(t){let n=await new Promise((e,s)=>{let n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=s,n.readAsDataURL(t)});e=(await (0,i.l)({textInput:s,mediaDataUri:n})).processedText}else{let t=await l({topic:s});e=t.information,t.diagramImageUrl&&D(t.diagramImageUrl)}let n=e.trim();C(n),F(n)}catch(s){console.error("Failed to generate information:",s);let e="Failed to load information. Please try again.";C(e),F(e)}finally{P(!1)}};
1(s||t)&&e()},[s,t]);let Y=()=>{let e=T||"";return e.startsWith("DIRECT_ANSWER: ")&&(e=e.substring(15).trim()),e},H=async()=>{let e=Y();if(e&&navigator.clipboard)try{await navigator.clipboard.writeText(e),O("Copied!"),setTimeout(()=>O("Copy"),2e3)}catch(e){console.error("Failed to copy text: ",e),O("Failed"),setTimeout(()=>O("Copy"),2e3)}else O("Failed"),setTimeout(()=>O("Copy"),2e3)},X=async()=>{let e=Y();if(I&&e)try{await navigator.share({title:"Prompt: ".concat(s),text:e})}catch(e){console.error("Error sharing:",e)}else e&&alert("Web Share API not supported. Please copy the text manually.")},q=async()=>{let e=Y();if(e)try{await navigator.clipboard.writeText(e),B("Copied!"),window.open("https://docs.google.com/document/create","_blank"),setTimeout(()=>B("Copy & Open"),2e3)}catch(e){console.error("Failed to copy to clipboard or open Google Docs:",e),B("Failed"),setTimeout(()=>B("Copy & Open"),2e3)}},J=async()=>{let e=Y();if(e)try{await navigator.clipboard.writeText(e),V("Copied!"),window.open("https://docs.google.com/spreadsheets/create","_blank"),setTimeout(()=>V("Copy & Open"),2e3)}catch(e){console.error("Failed to copy to clipboard or open Google Sheets:",e),V("Failed"),setTimeout(()=>V("Copy & Open"),2e3)}};return(0,n.jsxs)(r.Zp,{children:[(0,n.jsxs)(r.aR,{className:"flex flex-row items-start justify-between",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)(r.ZB,{className:"text-lg",children:["Prompt: ",s||(null==t?void 0:t.name)||"..."]}),(0,n.jsx)(r.BT,{className:"text-primary",children:R?"Generating information...":"Here is some information about the prompt."})]}),(0,n.jsx)("div",{className:"flex items-center space-x-1",children:a&&!R&&(0,n.jsxs)(n.Fragment,{children:[k&&(0,n.jsx)(o.$,{variant:"ghost",size:"icon",onClick:()=>{F(a)},title:"Reset Changes",children:(0,n.jsx)(c.A,{className:"h-4 w-4"})}),(0,n.jsx)(o.$,{variant:"ghost",size:"icon",onClick:()=>z(!k),title:k?"Done Editing":"Edit Information",children:(0,n.jsx)(d.A,{className:"h-4 w-4"})}),(0,n.jsxs)(j.DropdownMenu,{children:[(0,n.jsx)(j.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsx)(o.$,{variant:"ghost",size:"icon",children:(0,n.jsx)(u.A,{className:"h-4 w-4"})})}),(0,n.jsxs)(j.DropdownMenuContent,{align:"end",children:[(0,n.jsxs)(j.DropdownMenuItem,{onClick:q,children:[(0,n.jsx)(h.A,{className:"mr-1 h-3.5 w-3.5"}),"Copy & Open"===U?"To Google Docs":U]}),(0,n.jsxs)(j.DropdownMenuItem,{onClick:J,children:[(0,n.jsx)(p.A,{className:"mr-1 h-3.5 w-3.5"}),"Copy & Open"===Z?"To Google Sheets":Z]})]})]})]})})]}),(0,n.jsx)(r.Wu,{children:R?(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-3/4 animate-pulse"}),(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-full animate-pulse"}),(0,n.jsx)("div",{className:"h-4 bg-muted rounded w-5/6 animate-pulse"})]}):(0,n.jsxs)("div",{className:"prose prose-sm max-w-none text-foreground",children:[(()=>{if(!T)return!R&&(0,n.jsx)("p",{children:"No information available for this prompt."});if(k)return(0,n.jsx)(S.T,{value:T,onChange:e=>F(e.target.value),className:"min-h-[250px] w-full text-base font-sans",placeholder:"Start editing..."});let e=T;return e.startsWith("DIRECT_ANSWER: ")&&(e=e.substring(15).trim()),e.split("\n\n").map((e,s)=>{let t=e.trim();if(t.startsWith(b)){let e=t.substring(b.length).trim(),a=function(e){let s=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/);return s&&11===s[2].length?s[2]:null}(e);return a?(0,n.jsx)("div",{className:"aspect-video w-full max-w-xl mx-auto my-4",children:(0,n.jsx)("iframe",{width:"100%",height:"100%",src:"https://www.youtube.com/embed/".concat(a),title:"YouTube video player",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,className:"rounded-md"})},"video-".concat(s)):e.match(/\.(mp4|webm|ogg)$/i)?(0,n.jsx)("div",{className:"my-4 flex justify-center",children:(0,n.jsxs)("video",{controls:!0,width:"100%",className:"max-w-xl rounded-md",children:[(0,n.jsx)("source",{src:e,type:"video/".concat(e.split(".").pop())}),"Your browser does not support the video tag."]})},"video-".concat(s)):e?(0,n.jsx)("p",{className:"mb-4",children:(0,n.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:e})},"video-link-".concat(s)):null}return t&&(0,n.jsx)("p",{className:"mb-4 whitespace-pre-wrap",children:t},"info-".concat(s))})})(),A&&(0,n.jsxs)("div",{className:"mt-6",children:[(0,n.jsx)("h3",{className:"text-md font-semibold mb-2 text-foreground",children:"Diagram:"}),(0,n.jsx)("div",{className:"relative aspect-video w-full max-w-md mx-auto",children:(0,n.jsx)(v.default,{src:A,alt:"Diagram for ".concat(s),fill:!0,className:"rounded-md object-contain border","data-ai-hint":"diagram illustration"})})]})]})}),a&&!R&&!k&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(r.wL,{className:"flex justify-center space-x-4 pt-4",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(o.$,{variant:"default",size:"icon",onClick:H,disabled:"Copy"!==E,className:"rounded-full h-10 w-10",children:(0,n.jsx)(m.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:E})]}),I&&(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(o.$,{variant:"default",size:"icon",onClick:X,className:"rounded-full h-10 w-10",children:(0,n.jsx)(x.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"Share"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(o.$,{variant:"default",size:"icon",onClick:()=>{let e=Y();if(!e)return;let t=new y.default,n=t.internal.pageSize.height,a=t.internal.pageSize.width,l=15;t.setFontSize(16),t.setFont(void 0,"bold");let i="Prompt: ".concat(s),r=t.splitTextToSize(i,a-30);t.text(r,15,l),l+=9*r.length+5,t.setFontSize(12),t.setFont(void 0,"normal");let o=e.split("\n\n");o.forEach((e,s)=>{let i=e.trim();if(i){if(i.startsWith(b)){let e=i.substring(b.length).trim();
1t.splitTextToSize("Video: ".concat(e),a-30).forEach(e=>{l+7>n-15&&(t.addPage(),l=15),t.text(e,15,l),l+=7})}else t.splitTextToSize(i,a-30).forEach(e=>{l+7>n-15&&(t.addPage(),l=15),t.text(e,15,l),l+=7});s<o.length-1&&o[s+1].trim()&&(l+=3.5)+7>n-15&&(t.addPage(),l=15)}}),t.save("prompt-".concat(s.replace(/\s+/g,"_").toLowerCase(),".pdf"))},className:"rounded-full h-10 w-10",children:(0,n.jsx)(h.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"PDF"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)(o.$,{variant:"default",size:"icon",onClick:()=>{if(!T||!window.speechSynthesis){console.error(T?"Speech synthesis is not supported.":"No information to read.");return}let e=Y();if(e=e.split("\n").filter(e=>!e.trim().startsWith(b)).join("\n"),"playing"===G)window.speechSynthesis.pause(),M("paused");else if("paused"===G)window.speechSynthesis.resume(),M("playing");else{_.current&&(_.current.onend=null,_.current.onpause=null,_.current.onresume=null,_.current.onerror=null,window.speechSynthesis.cancel());let s=new SpeechSynthesisUtterance(e);_.current=s,s.lang="en-US";let t=L.find(e=>e.lang===s.lang);t||(t=L.find(e=>e.default)),s.voice=t||null,s.onstart=()=>M("playing"),s.onend=()=>{M("idle"),_.current=null},s.onerror=e=>{console.error("Speech synthesis error:",e.error),M("idle"),_.current&&(_.current=null)},s.onpause=()=>{"playing"===G&&M("paused")},s.onresume=()=>{"paused"===G&&M("playing")},window.speechSynthesis.speak(s),M("speaking")}},"aria-label":"Read information aloud",disabled:!window.speechSynthesis||!T||"speaking"===G,className:"rounded-full h-10 w-10",children:(0,n.jsx)(g.A,{className:"h-4 w-4"})}),(0,n.jsx)("span",{className:"mt-1 text-xs text-muted-foreground",children:"playing"===G||"speaking"===G?"Pause":"paused"===G?"Resume":"Speak"})]})]}),(0,n.jsx)("div",{className:"p-4 border-t",children:(0,n.jsxs)(r.Zp,{className:"bg-muted/50",children:[(0,n.jsxs)(r.aR,{children:[(0,n.jsxs)(r.ZB,{className:"text-md font-semibold flex items-center",children:[(0,n.jsx)(w.A,{className:"h-5 w-5 mr-2 text-primary"}),"Translate Language"]}),(0,n.jsx)(r.BT,{children:"Translate the generated information into another language."})]}),(0,n.jsx)(r.Wu,{children:(0,n.jsx)(N.P,{textToTranslate:Y()})})]})})]})]})}}}]);

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.