1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[531],{30531:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var s=a(3576),l=a(62701),r=a(37876),n=a(14232),i=a(41452),o=a(82702),c=a(45342),d=a(92256),h=a(33578),p=a(66134),g=a(54524),y=a(69750),u=a(96136),m=a(31675),x=a(57220);let b=e=>{let t=(0,m.zy)(),{isAIView:a}=x.Ay.getState(),[b,k]=(0,n.useState)(null),[w,A]=(0,n.useState)(null),[j,f]=(0,n.useState)("hyperDart"),[v,D]=(0,n.useState)({amazon:!1,yelp:!1,nytimes:!1,golfdigest:!1,goodhousekeeping:!1,theverge:!1,techradar:!1,imdb:!1,bestbuy:!1,homedepot:!1,answerSnippet:!1,sidebar:!1,slideIn:!1,searchhelper:!1,genAI:!1}),S={creatorTool:{label:"Creator Tools",items:[{key:"answerSnippet",label:"Answer Snippet"},{key:"amazon",label:"Amazon"},{key:"yelp",label:"Yelp"},{key:"bestbuy",label:"BestBuy"},{key:"nytimes",label:"NY Times"},{key:"golfdigest",label:"Golf Digest"},{key:"goodhousekeeping",label:"Good Housekeeping"},{key:"theverge",label:"The Verge"},{key:"techradar",label:"Tech Radar"},{key:"imdb",label:"IMDB"},{key:"homedepot",label:"Home Depot"}]},searchTool:{label:"Search Tools",items:[{key:"searchhelper",label:"Search Helper"},{key:"sidebar",label:"Sidebar"},{key:"slideIn",label:"Slide In"}]}};(0,n.useEffect)(()=>{let e=new URLSearchParams(t.search).get("toolType");!e||S[e]?k(e):(console.error("Invalid toolType:",e),k(null))},[t.search]);let E=async t=>{let{current_url:a,enableExtension:s}=t;s.searchhelper?(await window.parent.postMessage({type:"get-searched-query-for-current-tab"},"*"),window.addEventListener("message",t=>{"hd-searched-query"===t.data.type&&e.history.push("/web/search?page=1&q=".concat(t.data.query))})):s.genAI&&e.history.push("/genai/viewsummary/".concat(encodeURIComponent(a.url)))};(0,n.useEffect)(()=>{let e=async e=>{if("hd-extension-sidepanel-message"===e.data.type){let{enableExtension:a}=e.data.data;new URLSearchParams(t.search).get("initialExtensionLoad")&&await E(e.data.data),a&&D((0,s._)({},v,a))}};return window.addEventListener("message",e),window.parent.postMessage({type:"get-extension-settings"},"*"),()=>window.removeEventListener("message",e)},[]);let C=e=>t=>{let a=(0,l._)((0,s._)({},v),{[e]:t.target.checked});D(a);try{window.parent.postMessage({type:"update-extension-settings",data:{enableExtension:a}},"*")}catch(e){console.error("Error sending update:",e),D(v)}},L=e=>{e&&f(e),A(null)};return(0,r.jsx)(i.A,{style:{maxWidth:"720px",width:"100%"},children:(0,r.jsxs)(h.A,{elevation:3,style:{padding:"24px",margin:"10px"},children:[(0,r.jsx)(o.A,{variant:"h5",gutterBottom:!0,children:"HyperDart Tools"}),(0,r.jsxs)(i.A,{display:"flex",alignItems:"center",mb:2,onClick:e=>A(e.currentTarget),style:{cursor:"pointer"},children:[(0,r.jsx)("img",{src:"favicon-32x32.png",alt:"hyperDart",width:"24",height:"24"}),(0,r.jsx)(o.A,{variant:"body1",style:{marginLeft:"8px"},children:j}),(0,r.jsx)(i.A,{flex:"1"}),(0,r.jsx)(u.A,{})]}),(0,r.jsxs)(p.A,{anchorEl:w,keepMounted:!0,open:!!w,onClose:()=>L(null),children:[(0,r.jsxs)(g.A,{onClick:()=>L("hyperDart"),children:[(0,r.jsx)("img",{src:"favicon-32x32.png",alt:"hyperDart",width:"24",height:"24"}),(0,r.jsx)(o.A,{variant:"body1",style:{marginLeft:"8px"},children:"hyperDart"})]}),(0,r.jsxs)(g.A,{onClick:()=>L("Google"),children:[(0,r.jsx)("img",{src:"https://icons.duckduckgo.com/ip3/www.google.com.ico",alt:"Google",width:"24",height:"24"}),(0,r.jsx)(o.A,{variant:"body1",style:{marginLeft:"8px"},children:"Google"})]}),(0,r.jsxs)(g.A,{onClick:()=>L("Bing"),children:[(0,r.jsx)("img",{src:"https://icons.duckduckgo.com/ip3/www.bing.com.ico",alt:"Bing",width:"24",height:"24"}),(0,r.jsx)(o.A,{variant:"body1",style:{marginLeft:"8px"},children:"Bing"})]}),(0,r.jsxs)(g.A,{onClick:()=>L("Duckduckgo"),children:[(0,r.jsx)("img",{src:"https://icons.duckduckgo.com/ip3/www.duckduckgo.com.ico",alt:"Duckduckgo",width:"24",height:"24"}),(0,r.jsx)(o.A,{variant:"body1",style:{marginLeft:"8px"},children:"Duckduckgo"})]})]}),(0,r.jsx)(y.A,{style:{margin:"24px 0"}}),(()=>{let e=S;b&&S[b]&&(e={[b]:S[b]});let t=[];for(let[a,s]of Object.entries(e)){if(!s||!s.label)continue;let e=[];for(let{key:t,label:a}of s.items)e.push((0,r.jsxs)(i.A,{display:"flex",alignItems:"center",mb:2,children:[(0,r.jsx)(o.A,{variant:"body1",style:{flex:1},children:a}),(0,r.jsx)(c.A,{control:(0,r.jsx)(d.A,{checked:!!v[t],onChange:C(t),color:"primary"}),label:"",labelPlacement:"end"})]},t));t.push((0,r.jsxs)(i.A,{mt:3,children:[(0,r.jsx)(o.A,{variant:"h6",style:{marginBottom:"16
1px"},children:s.label}),e]},a))}return t})()]})})}},96136:(e,t,a)=>{a.d(t,{A:()=>r});var s=a(44031),l=a(37876);let r=(0,s.A)((0,l.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown")}}]);
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.