1import{f as he,u as ft,e as yt,s as wt,a as vt,c as xt,b as kt,i as _t,d as zt}from"#entry";import{a as St,_ as $t,c as Tt}from"./useWorkspaceInsert-DY_2ip2F-29.js";import{e as Ee,U as l,H as i,V as W,O as y,W as Oe,$ as e,B as c,a9 as R,ad as be,a2 as T,a3 as C,a1 as S,T as Fe,ai as qe,r as b,c as I,a8 as Le,o as Ct,b as At,a0 as o,F as J,ab as le,aa as ge,af as Wt,ac as Dt,i as pe,ag as Pt}from"./lazy-qrcode-oXPcgXJC-29.js";import{n as It}from"./util-id-Q4hRbfS9-29.js";import{W as Mt}from"./Grid-BPS4GyVH-29.js";import{m as Et,n as Lt,o as Nt}from"./workspaceImageExport-CzIIdiO4-29.js";import{_ as Ue}from"./_plugin-vue_export-helper-DlAUqK2U-29.js";import{r as Gt}from"./XMarkIcon-drPAhXvj-29.js";import{r as ze}from"./PrinterIcon-YQc8B1oZ-29.js";import{r as Ot}from"./ArrowDownTrayIcon-DDooZsub-29.js";import Ft from"./Feature-DHNL6Ihq-29.js";import qt from"./HowToWork-DVsS-Zlt-29.js";import Ut from"./FAQ-BxG5g6Hl-29.js";import Rt from"./Benefits-BTRTaa0g-29.js";import Ht from"./Testimonials-kJisZ5MW-29.js";import{s as jt,c as Bt,a as Vt,T as Yt}from"./structuredData-D6QDT0Zj-29.js";import"./lazy-pdf-GO-7vVHk-29.js";import{r as _e}from"./SparklesIcon-C8fouFii-29.js";import{r as Jt}from"./DocumentDuplicateIcon-DdDKQlq1-29.js";import{r as Ne}from"./ArrowPathIcon-CkyHREyi-29.js";import{r as Zt}from"./AdjustmentsHorizontalIcon-DuRgYJBO-29.js";import{r as Kt}from"./EyeIcon-Z-H7U58h-29.js";import{r as Qt}from"./EyeSlashIcon-Df2FXzCZ-29.js";import{r as Xt}from"./PlusIcon-Cou2tlSA-29.js";import{r as er}from"./MagnifyingGlassIcon-b15mC2dn-29.js";import{r as Ge}from"./ShareIcon-BZ_Nn_uD-29.js";import{r as tr}from"./PencilSquareIcon-4FkLi6g3-29.js";import{r as rr}from"./CheckCircleIcon-DMxaflmY-29.js";import{r as ar}from"./ClipboardDocumentCheckIcon-BA4MbIqn-29.js";import{r as sr}from"./ClipboardDocumentIcon-DfvaZB1o-29.js";import"./useWorkspaceHost-DU2TCSNo-29.js";import"./generator-B9Z-PAk9-29.js";import"./FeatureIcon-CGq9ZIrf-29.js";import"./nuxt-link-D_rgCK5z-29.js";import"./index-BvZBNbWF-29.js";const Se={RIGHT:[0,1],DOWN:[1,0],DOWN_RIGHT:[1,1],DOWN_LEFT:[1,-1],LEFT:[0,-1],UP:[-1,0],UP_LEFT:[-1,-1],UP_RIGHT:[-1,1]},or={RIGHT:"Horizontal â",DOWN:"Vertical â",DOWN_RIGHT:"Diagonal â",DOWN_LEFT:"Diagonal â",LEFT:"Horizontal â",UP:"Vertical â",UP_LEFT:"Diagonal â",UP_RIGHT:"Diagonal â"},ne=[8,10,12,15,18,20];function lr(m){switch(m){case"easy":return["RIGHT","DOWN"];case"medium":return["RIGHT","DOWN","DOWN_RIGHT","DOWN_LEFT"];case"hard":case"expert":return Object.keys(Se);default:return["RIGHT","DOWN"]}}function nr(m){return Array.from({length:m},()=>Array(m).fill(""))}function ir(m,t,h,u,w,g){const[_,x]=Se[w];for(let v=0;v<t.length;v++){const z=h+_*v,n=u+x*v;if(z<0||z>=g||n<0||n>=g||m[z][n]!==""&&m[z][n]!==t[v])return!1}return!0}function dr(m,t,h,u,w){const[g,_]=Se[w],x=[];for(let v=0;v<t.length;v++){const z=h+g*v,n=u+_*v;m[z][n]=t[v],x.push({row:z,col:n})}return x}function cr(m,t=15,h="medium"){const u=[...new Set(m.map(n=>n.trim().toUpperCase().replace(/[^A-Z]/g,"")).filter(n=>n.length>0))];u.sort((n,d)=>d.length-n.length);const w=lr(h),g=nr(t),_=[],x=[],v=100;for(const n of u){if(n.length>t){x.push(n);continue}let d=!1;for(let p=0;p<v;p++){const f=w[Math.floor(Math.random()*w.length)],te=Math.floor(Math.random()*t),re=Math.floor(Math.random()*t);if(ir(g,n,te,re,f,t)){const me=dr(g,n,te,re,f);_.push({word:n,row:te,col:re,direction:f,directionLabel:or[f],cells:me}),d=!0;break}}d||x.push(n)}const z="ABCDEFGHIJKLMNOPQRSTUVWXYZ";for(let n=0;n<t;n++)for(let d=0;d<t;d++)g[n][d]===""&&(g[n][d]=z[Math.floor(Math.random()*26)]);return{grid:g,placements:_,unplacedWords:x}}function ur(m){const t=m.map(g=>g.trim().toUpperCase().replace(/[^A-Z]/g,"")).filter(g=>g.length>0);if(t.length===0)return 10;const h=Math.max(...t.map(g=>g.length)),u=t.length,w=Math.max(h+2,Math.ceil(Math.sqrt(u*h*1.5)));return ne.find(g=>w<=g)||ne[ne.length-1]}function gr(m,t=[]){if(m==="auto")return ur(t);const h=Number(m);return ne.includes(h)?h:15}function pr(){return["auto",...ne]}const hr={class:"print-view"},br={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4"},mr={class:"bg-white dark:bg-gray-800 rounded-2xl shadow-2xl max-w-4xl w-full mx-4 max-h-[94vh] overflow-hidden flex flex-col"},fr={class:"p-5 pb-3 flex-shrink-0"},yr={class:"flex items-center justify-between mb-5"},wr={class:"flex flex-wrap gap-4"},vr={class:"flex items-center gap-2 cursor-pointer"},xr={class:"flex items-center gap-2 cursor-pointer"},kr={class:"px-5 overflow-y-auto flex-1 min-h-0"},_r={key:0,class:"flex justify-center gap-2 mb-3"},zr={class:"print-image-preview-stage pb-6"},Sr=["src","alt"],$r=["src","alt"],Tr={class:"flex gap-3 p-5 pt-3 flex-shrink-0"},Cr={__name:"WordSearchPrintView",props:{showPreview:{type:Boolean,default:!1},grid:{type:Array,required:!0},size:{type:Number,default:15},words:{type:Array,default:()=>[]},placements:{type:Array,default:()=>[]},title:{type:String,default:"Word Search"}},emits:["close"],setup(m){const t=m,h=b(!0),u=b(!0),w=b("puzzle");Ee(h,d=>{!d&&w.value==="answer"&&(w.value="puzzle")}),Ee(()=>t.showPreview,d=>{d&&(w.value="puzzle")});const g=I(()=>typeof document>"u"?"":Et({title:u.value&&t.title||"Word Search",grid:t.grid,size:t.size,words:t.words,includeTitle:u.value})),_=I(()=>typeof document>"u"||!h.value?"":Lt({grid:t.grid,size:t.size,words:t.words,placements:t.placements}));function x(){const d=window.open("","_blank");if(!d)return;const p=[{src:g.value,alt:`${t.title||"Word Search"} puzzle`}
1];h.value&&_.value&&p.push({src:_.value,alt:`${t.title||"Word Search"} answer key`}),d.document.write(` 2 <!DOCTYPE html> 3 <html> 4 <head> 5 <title>${t.title||"Word Search"}</title> 6 <style> 7 * { margin: 0; padding: 0; box-sizing: border-box; } 8 body { background: #fff; font-family: Arial, sans-serif; } 9 .print-page { 10 min-height: 100vh; 11 display: flex; 12 align-items: flex-start; 13 justify-content: center; 14 padding: 18px; 15 page-break-after: always; 16 break-after: page; 17 } 18 .print-page:last-child { 19 page-break-after: auto; 20 break-after: auto; 21 } 22 .print-page img { 23 display: block; 24 max-width: 100%; 25 max-height: calc(100vh - 36px); 26 width: auto; 27 height: auto; 28 } 29 @page { margin: 0.35in; } 30 </style> 31 </head> 32 <body> 33 ${p.map(f=>` 34 <section class="print-page"> 35 <img src="${f.src}" alt="${f.alt}" /> 36 </section> 37 `).join("")} 38 <script>window.onload = function() { window.print(); window.close(); }<\/script> 39 </body> 40 </html> 41 `),d.document.close()}async function v(){const d=n(t.title||"word-search");z(g.value,`${d}-puzzle.png`),h.value&&z(_.value,`${d}-answer-key.png`)}function z(d,p){if(!d)return;const f=document.createElement("a");f.href=d,f.download=p,document.body.appendChild(f),f.click(),document.body.removeChild(f)}function n(d){return String(d).trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"word-search"}return(d,p)=>(l(),i("div",hr,[(l(),W(qe,{to:"body"},[y(Fe,{name:"modal"},{default:Oe(()=>[m.showPreview?(l(),i("div",br,[e("div",mr,[e("div",fr,[e("div",yr,[p[5]||(p[5]=e("h3",{class:"text-xl font-bold text-gray-900 dark:text-gray-100"}," Print Preview ",-1)),e("button",{onClick:p[0]||(p[0]=f=>d.$emit("close")),class:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors"},[y(c(Gt),{class:"w-5 h-5 text-gray-500"})])]),e("div",wr,[e("label",vr,[R(e("input",{type:"checkbox","onUpdate:modelValue":p[1]||(p[1]=f=>h.value=f),class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500"},null,512),[[be,h.value]]),p[6]||(p[6]=e("span",{class:"text-sm text-gray-700 dark:text-gray-300"},"Include answer key",-1))]),e("label",xr,[R(e("input",{type:"checkbox","onUpdate:modelValue":p[2]||(p[2]=f=>u.value=f),class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500"},null,512),[[be,u.value]]),p[7]||(p[7]=e("span",{class:"text-sm text-gray-700 dark:text-gray-300"},"Include title",-1))])])]),e("div",kr,[h.value?(l(),i("div",_r,[e("button",{type:"button",class:T(["px-4 py-2 rounded-lg text-sm font-semibold transition-colors",w.value==="puzzle"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"]),onClick:p[3]||(p[3]=f=>w.value="puzzle")}," Puzzle ",2),e("button",{type:"button",class:T(["px-4 py-2 rounded-lg text-sm font-semibold transition-colors",w.value==="answer"?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"]),onClick:p[4]||(p[4]=f=>w.value="answer")}," Answer Key ",2)])):C("",!0),e("div",zr,[w.value==="puzzle"||!h.value?(l(),i("img",{key:0,src:g.value,alt:`${m.title||"Word Search"} puzzle preview`,class:"print-preview-image"},null,8,Sr)):(l(),i("img",{key:1,src:_.value,alt:`${m.title||"Word Search"} answer key preview`,class:"print-preview-image"},null,8,$r))])]),e("div",Tr,[e("button",{onClick:x,class:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-xl transition-colors"},[y(c(ze),{class:"w-5 h-5"}),p[8]||(p[8]=S(" Print ",-1))]),e("button",{onClick:v,class:"flex-1 flex items-center justify-center gap-2 px-4 py-3 bg-emerald-600 hover:bg-emerald-700 text-white font-medium rounded-xl transition-colors"},[y(c(Ot),{class:"w-5 h-5"}),p[9]||(p[9]=S(" Download PNG ",-1))])])])])):C("",!0)]),_:1})]))]))}},Ar=Ue(Cr,[["__scopeId","data-v-998887dd"]]),Wr={__name:"WordSearchLandingPage",setup(m){const{t}=he(),h=[{label:t("wordsearch.features[0].label")||"AI-Powered",title:t("wordsearch.features[0].title")||"Generate Word Lists from Any Topic with AI",description:t("wordsearch.features[0].description")||"Simply type a topic and our AI instantly generates a relevant word list. No need to brainstorm vocabulary.",linkText:t("wordsearch.features[0].linkText")||"Try AI Generation",link:"/tools/word-search-generator",iconBgClass:"bg-blue-100",iconClass:"text-blue-600",iconType:"sparkles",imageSrc:"https://project.deletetweets.ai/teachany_images/tools/word-search-generator-1.webp",imageAlt:"AI-powered word search generator creating puzzles from topics",gradientClass:"from-blue-400 to-indigo-400"},{label:t("wordsearch.features[1].label")||"Customizable",title:t("wordsearch.features[1].title")||"Full Control Over Difficulty and Grid Size",description:t("wordsearch.features[1].description")||"Choose from Easy, Medium, or Hard difficulty. Pick grid sizes from 10x10 to 20
41x20.",linkText:t("wordsearch.features[1].linkText")||"Customize Puzzle",link:"/tools/word-search-generator",iconBgClass:"bg-green-100",iconClass:"text-green-600",iconType:"settings",imageSrc:"https://project.deletetweets.ai/teachany_images/tools/word-search-generator-2.webp",imageAlt:"Word search puzzle with customizable grid size and difficulty",gradientClass:"from-green-400 to-teal-400"}],u=[{title:t("wordsearch.steps[0].title")||"Enter Topic or Words",description:t("wordsearch.steps[0].description")||"Type a subject for AI-generated vocabulary, or paste your own custom word list.",iconType:"edit",iconBgClass:"bg-blue-100",iconClass:"text-blue-600"},{title:t("wordsearch.steps[1].title")||"Choose Settings",description:t("wordsearch.steps[1].description")||"Select grid size, difficulty level, and number of words for your puzzle.",iconType:"settings",iconBgClass:"bg-purple-100",iconClass:"text-purple-600"},{title:t("wordsearch.steps[2].title")||"Play or Print",description:t("wordsearch.steps[2].description")||"Find words interactively online, or print the puzzle with an optional answer key.",iconType:"play",iconBgClass:"bg-green-100",iconClass:"text-green-600"}],w=[{title:t("wordsearch.benefitsData[0].title")||"Boost Vocabulary Learning",description:t("wordsearch.benefitsData[0].description")||"Word search puzzles reinforce spelling, word recognition, and topic-specific vocabulary in a fun way.",points:[t("wordsearch.benefitsData[0].points[0]")||"Strengthen spelling skills",t("wordsearch.benefitsData[0].points[1]")||"Build subject vocabulary",t("wordsearch.benefitsData[0].points[2]")||"Engage visual learners"],iconName:"book",iconBgClass:"bg-blue-50",iconColor:"text-blue-600"},{title:t("wordsearch.benefitsData[1].title")||"Save Hours of Prep Time",description:t("wordsearch.benefitsData[1].description")||"Generate classroom-ready worksheets in seconds instead of manually creating them.",points:[t("wordsearch.benefitsData[1].points[0]")||"AI generates word lists instantly",t("wordsearch.benefitsData[1].points[1]")||"Print-ready with answer key",t("wordsearch.benefitsData[1].points[2]")||"Multiple difficulty levels"],iconName:"
41clock",iconBgClass:"bg-green-50",iconColor:"text-green-600"},{title:t("wordsearch.benefitsData[2].title")||"Engage Every Student",description:t("wordsearch.benefitsData[2].description")||"Adjustable difficulty ensures every student is challenged at the right level.",points:[t("wordsearch.benefitsData[2].points[0]")||"Easy mode for younger students",t("wordsearch.benefitsData[2].points[1]")||"Hard mode for advanced learners",t("wordsearch.benefitsData[2].points[2]")||"Interactive online play"],iconName:"eye",iconBgClass:"bg-purple-50",iconColor:"text-purple-600"}],g=[{name:t("wordsearch.testimonialsData[0].name")||"Sarah Mitchell",designation:t("wordsearch.testimonialsData[0].designation")||"5th Grade Teacher",quote:t("wordsearch.testimonialsData[0].quote")||"I use this every week to create vocabulary review puzzles. My students love the interactive mode!",image:"https://video.deletetweets.ai/Transmonkey/Transmonkey_video_translator/user2.webp"},{name:t("wordsearch.testimonialsData[1].name")||"James Park",designation:t("wordsearch.testimonialsData[1].designation")||"ESL Instructor",quote:t("wordsearch.testimonialsData[1].quote")||"The AI topic feature is amazing â I just type a topic and get a perfect word list for my English learners.",image:"https://video.deletetweets.ai/Transmonkey/homepage/user5.webp"},{name:t("wordsearch.testimonialsData[2].name")||"Lisa Chen",designation:t("wordsearch.testimonialsData[2].designation")||"Homeschool Parent",quote:t("wordsearch.testimonialsData[2].quote")||"My kids beg me to make word searches! The print feature with answer keys is a lifesaver.",image:"https://video.deletetweets.ai/Transmonkey/Transmonkey_video_translator/user4.webp"}],_=ft(),{locale:x}=he(),v=n=>{const d=_("/tools/crossword-puzzle-generator");return x.value==="es"?`Además de sopas de letras, también puedes crear <a href="${d}" style="color: #3b82f6; text-decoration: underline;">generador de crucigramas</a> cuando necesites actividades de vocabulario con definiciones y pistas. Los crucigramas son ideales para reforzar el aprendizaje con contexto adicional.`:x.value==="it"?`Oltre ai crucipuzzle, puoi anche creare <a href="${d}" style="color: #3b82f6; text-decoration: underline;">cruciverba online</a> quando hai bisogno di attività di vocabolario con definizioni e indizi. I cruciverba sono ideali per rafforzare l'apprendimento con contesto aggiuntivo.`:null},z=[{question:t("wordsearch.faqsData[0].question")||"How does the AI word generation work?",answer:t("wordsearch.faqsData[0].answer")||"Enter any topic and our AI generates a relevant word list suited for a word search puzzle. You can edit the list before generating.",isOpen:!0},{question:t("wordsearch.faqsData[1].question")||"What grid sizes are available?",answer:t("wordsearch.faqsData[1].answer")||"We offer five grid sizes: 10x10, 12x12, 15x15, 18x18, and 20x20.",isOpen:!1},{question:t("wordsearch.faqsData[2].question")||"What do the difficulty levels mean?",answer:t("wordsearch.faqsData[2].answer")||"Easy: horizontal and vertical only. Medium: adds diagonals. Hard: all 8 directions including backwards.",isOpen:!1},{question:t("wordsearch.faqsData[3].question")||"Can I print with an answer key?",answer:t("wordsearch.faqsData[3].answer")||"Yes! Click Print to open a preview. You can include an answer key on a separate page.",isOpen:!1},{question:t("wordsearch.faqsData[4].question")||"Is there a word limit?",answer:t("wordsearch.faqsData[4].answer")||"You can include 5 to 30 words. The actual fit depends on word length and grid size.",isOpen:!1},{question:t("wordsearch.faqsData[5].question")||"Can students play online?",answer:t("wordsearch.faqsData[5].answer")||"Absolutely! Students can click and drag across letters to find words. Found words are highlighted with colors.",isOpen:!1}].concat((()=>{const n=v();return n?[{question:x.value==="es"?"¿Qué otros juegos de palabras puedo crear?":x.value==="it"?"Quali altri giochi di parole posso creare?":"",answer:n,isOpen:!1}]:[]})());return(n,d)=>(l(),i("div",null,[y(Ft,{title:n.$t("wordsearch.hero.title")||"Free Word Search Puzzle Generator",description:n.$t("wordsearch.hero.description")||"Create custom word search puzzles in seconds. Enter any topic and let AI generate vocabulary, or provide your own word list.",features:h},null,8,["title","description"]),y(qt,{title:n.$t("wordsearch.howtowork.title")||"How to Create a Word Search Puzzle",description:n.$t("wordsearch.howtowork.description")||"Generate custom word search puzzles in three easy steps.",ctaText:n.$t("wordsearch.howtowork.ctaText")||"Create Your Puzzle Now",steps:u,routePath:"/tools/word-search-generator"},null,8,["title","description","ctaText"]),y(Rt,{title:n.$t("wordsearch.benef
41its.title")||"Why Use Our Word Search Generator?",subtitle:n.$t("wordsearch.benefits.subtitle")||"The smartest way to create engaging vocabulary puzzles",benefitsData:w},null,8,["title","subtitle"]),y(Ht,{title:n.$t("wordsearch.testimonials.title")||"Loved by Teachers and Students",description:n.$t("wordsearch.testimonials.description")||"See how educators use our word search generator in classrooms.",testimonials:g},null,8,["title","description"]),y(Ut,{title:n.$t("wordsearch.faq.title")||"Word Search Generator FAQs",subtitle:n.$t("wordsearch.faq.subtitle")||"Common questions about creating word search puzzles",customFaqs:c(z)},null,8,["title","subtitle","customFaqs"])]))}},Dr={class:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-gray-900 dark:via-gray-800 dark:to-gray-900"},Pr={class:"px-4 py-6 md:px-8 md:py-8 pt-20 md:pt-24 max-w-6xl mx-auto"},Ir={class:"text-center mb-6 md:mb-8"},Mr={class:"text-2xl md:text-4xl font-bold text-gray-900 dark:text-gray-100 mb-2"},Er={class:"text-sm md:text-base text-gray-600 dark:text-gray-400 max-w-xl mx-auto"},Lr={key:0,class:"max-w-3xl mx-auto space-y-5"},Nr={class:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 overflow-hidden"},Gr={class:"flex border-b border-gray-200 dark:border-gray-700"},Or=["onClick"],Fr={key:2,class:"absolute bottom-0 left-4 right-4 h-0.5 bg-blue-500 rounded-full"},qr={class:"p-5 md:p-6"},Ur={key:0},Rr={class:"block text-sm font-semibold text-gray-700 dark:text-gray-200 mb-2.5"},Hr={class:"relative group"},jr=["placeholder"],Br={class:"absolute left-3.5 top-1/2 -translate-y-1/2 w-6 h-6 bg-gradient-to-br from-blue-500 to-indigo-500 rounded-lg flex items-center justify-center shadow-sm"},Vr={class:"text-xs text-gray-400 dark:text-gray-500 mt-2 flex items-center gap-1"},Yr={key:1},Jr={class:"flex items-center justify-between mb-2.5"},Zr={class:"block text-sm font-semibold text-gray-700 dark:text-gray-200"},Kr=["placeholder"],Qr={key:0,class:"flex flex-wrap gap-1.5 mt-3"},Xr={key:0,class:"inline-flex items-center px-2.5 py-1 text-gray-400 text-xs font-medium"},ea={class:"flex items-center gap-3 mt-4 pt-4 border-t border-gray-100 dark:border-gray-700/50"},ta={class:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-5 md:p-6"},ra={class:"text-sm font-bold text-gray-800 dark:text-gray-200 mb-4 flex items-center gap-2"}
41,aa={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-5"},sa={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3"},oa={class:"grid grid-cols-4 gap-2"},la=["onClick"],na={class:"text-[10px] text-gray-400 dark:text-gray-500 mt-2"},ia={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3"},da={class:"space-y-2"},ca=["onClick"],ua={class:"flex-1 text-left"},ga={key:0,class:"text-[10px] font-normal opacity-70"},pa={class:"text-[10px] text-gray-400 dark:text-gray-500 mt-2"},ha={key:0},ba={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3"},ma={class:"bg-gray-50 dark:bg-gray-700/50 rounded-xl p-4 border border-gray-100 dark:border-gray-600/50"},fa={class:"flex items-center justify-center mb-3"},ya={class:"text-3xl font-bold text-blue-600 dark:text-blue-400 tabular-nums"},wa={key:1},va={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3"},xa=["placeholder"],ka={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-3"},_a={class:"bg-gray-50 dark:bg-gray-700/50 rounded-xl p-3 border border-gray-100 dark:border-gray-600/50 space-y-2.5"},za={class:"flex items-center gap-2 cursor-pointer"},Sa={class:"text-xs font-semibold text-gray-600 dark:text-gray-300"},$a={class:"flex items-center gap-2 cursor-pointer"},Ta={class:"text-xs font-semibold text-gray-600 dark:text-gray-300"},Ca={class:"text-[10px] text-gray-400 dark:text-gray-500"},Aa={class:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-5 md:p-6"},Wa=["disabled"],Da={key:0,class:"mt-4 flex items-start gap-2.5 p-3.5 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800/50 rounded-xl"},Pa={class:"text-sm text-red-600 dark:text-red-400"},Ia={class:"text-xs text-gray-400 dark:text-gray-500 text-center mt-3"},Ma={key:1},Ea={class:"flex flex-col lg:flex-row gap-4 lg:gap-6 items-start justify-center"},La={class:"w-full lg:w-72 xl:w-80 order-1 lg:order-2 flex-shrink-0"},Na={class:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-4 md:p-5 lg:sticky lg:top-24"},Ga={class:"mb-4"},Oa={class:"flex items-center justify-between mb-2"},Fa={class:"text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide"},qa={class:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2"},Ua={key:0,class:"text-xs text-emerald-600 dark:text-emerald-400 font-semibold mt-1.5 text-center"},Ra={class:"mb-4"},Ha={class:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"},ja={class:"space-y-1.5 max-h-[40vh] overflow-y-auto pr-1"},Ba={key:1,class:"w-4 h-4 rounded-full border-2 border-gray-300 dark:border-gray-500 flex-shrink-0"},Va={class:"space-y-2.5"},Ya=["disabled"],Ja={class:"w-full lg:flex-1 order-2 lg:order-1"},Za={class:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm rounded-2xl shadow-lg border border-gray-200/50 dark:border-gray-700/50 p-3 md:p-5"},Ka={class:"flex items-center justify-between mb-3 pb-3 border-b border-gray-200 dark:border-gray-700"},Qa={class:"flex items-center gap-2"},Xa={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},es={class:"text-xs text-gray-400"},ts={class:"flex items-center gap-1"},rs=["disabled"],as={key:0,class:"animate-spin w-4 h-4",fill:"none",viewBox:"0 0 24 24"},ss={class:"flex justify-center overflow-x-auto"},os={class:"text-xs text-center text-gray-400 dark:text-gray-500 mt-3"},ls={key:0,class:"mt-3 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-200 dark:border-amber-800 rounded-xl"},ns={class:"text-xs text-amber-700 dark:text-amber-300"},is={class:"font-semibold"},ds={class:"font-medium"},cs={class:"bg-white dark:bg-gray-800 rounded-3xl shadow-2xl p-6 md:p-8 max-w-sm w-full text-center"},us={class:"w-16 h-16 bg-gradient-to-br from-blue-400 to-indigo-500 rounded-full flex items-center justify-center mx-auto mb-5 shadow-lg shadow-blue-500/30"},gs={class:"text-xl font-bold text-gray-900 dark:text-gray-100 mb-2"},ps={class:"text-sm text-gray-500 dark:text-gray-400 mb-5"},hs={class:"flex items-center gap-2 bg-gray-100 dark:bg-gray-700/50 rounded-xl p-3 mb-5"},bs=["value"],ms={__name:"word-search-generator",async setup(m){let t,h;const{t:u,te:w,locale:g}=he(),_=he(),x=yt(),{user:v,canUseNumber:z}=wt(x),n=pe("loginModal"),d=pe("payModal"),p=pe("isWorkspace"),f=pe("registerToolsBackHandler",null),{openaiFetch:te}=zt(),re=vt(),{isInserting:me,insertStatusType:Re,insertStatusMessage:He,insertButtonLabel:je,canInsert:Be,insertWorkspaceResult:Ve,resetWorkspaceInsertStatus:ie}=St({hasContent:()=>!!(Q.value&&F.value.length&&$.value.length),buildPayload:()=>Tt({toolSlug:"word-search-generator",title:P.value||"Word Search",dataUrl:Nt({title:P.value||"Word Search",grid:F.value,size:M.value,words:$.value.map(r=>r.word),placements:$.value,includeAnswer:!0}),meta:{difficulty:E.value,size:M.value,playStyle:{rotateLetters:j.value,scaleLetters:B.value}}})});function k(r,a){return w(r)?u(r):a}try{const{data:r}=([t,h]=Le(()=>xt(`i18n_wordsearch_${g.value}`,()=>$fetch(`https://project.deletetweets.ai/i18n_languages/teachany/word-search-generator/1.0.0/${g.value}
41.json`))),t=await t,h(),t);r.value&&_.mergeLocaleMessage(g.value,r.value)}catch{}if(g.value==="pt"){const r=([t,h]=Le(()=>_t(()=>import("./pt-YD1jLzrG-29.js"),[],import.meta.url)),t=await t,h(),t);_.mergeLocaleMessage("pt",r.default||r)}const L=b("topic"),H=b(re.query.text||""),Z=b(""),M=b(15),D=b("auto"),E=b("medium"),K=b(12),P=b(""),j=b(!1),B=b(!1),G=b(!1),O=b(""),Q=b(!1),F=b([]),$=b([]),ae=b([]),A=b([]),q=b(!1),se=b(!1),X=b([]),oe=b(!1),de=b(!1),ce=b(""),V=b(!1);let $e=null;Ct(()=>{f&&($e=f(()=>Q.value?(se.value=!1,We(),!0):!1,{title:()=>Q.value?"Back to Word Search":"Back to tools"}))}),At(()=>{$e?.()});const Ye=pr(),Je=I(()=>D.value==="auto"?k("wordsearch.page.hints.autoGridSize","Auto selects the smallest fitting grid"):`${D.value}Ã${D.value} ${k("wordsearch.page.hints.gridLabel","grid")}`),Ze=I(()=>[{value:"topic",label:k("wordsearch.page.inputMode.topic","AI Generate from Topic")},{value:"custom",label:k("wordsearch.page.inputMode.custom","Custom Word List")}]),Ke=I(()=>[{value:"easy",label:k("wordsearch.page.difficulties.easy","Easy")},{value:"medium",label:k("wordsearch.page.difficulties.medium","Medium")},{value:"hard",label:k("wordsearch.page.difficulties.hard","Hard")},{value:"expert",label:k("wordsearch.page.difficulties.expert","Expert")}]),Qe=I(()=>({easy:k("wordsearch.page.difficultyHints.easy","Horizontal & vertical only"),medium:k("wordsearch.page.difficultyHints.medium","Adds diagonal directions"),hard:k("wordsearch.page.difficultyHints.hard","All directions including backwards"),expert:k("wordsearch.page.difficultyHints.expert","All directions with partial word clues")})[E.value]||""),N=I(()=>Z.value.trim()?Z.value.split(/[,\n\r]+/).map(r=>r.trim().toUpperCase().replace(/[^A-Z]/g,"")).filter(r=>r.length>1):[]),Te=I(()=>L.value==="topic"?H.value.trim().length>0:N.value.length>=3),Xe=I(()=>$.value.length===0?0:Math.round(A.value.length/$.value.length*100)),fe=I(()=>$.value.length>0&&A.value.length===$.value.length);function et(r){return r==="auto"?k("wordsearch.page.gridSizes.auto","Auto"):r}function tt(r){return E.value===r?{easy:"bg-emerald-50 dark:bg-emerald-900/30 border-emerald-300 dark:border-emerald-700 text-emerald-700 dark:text-emerald-300 shadow-sm",medium:"bg-amber-50 dark:bg-amber-900/30 border-amber-300 dark:border-amber-700 text-amber-700 dark:text-amber-300 shadow-sm",hard:"bg-rose-50 dark:bg-rose-900/30 border-rose-300 dark:border-rose-700 text-rose-700 dark:text-rose-300 shadow-sm",expert:"bg-sky-50 dark:bg-sky-900/30 border-sky-300 dark:border-sky-700 text-sky-700 dark:text-sky-300 shadow-sm"}[r]:"bg-gray-50 dark:bg-gray-700/50 border-gray-200 dark:border-gray-600 text-gray-500 dark:text-gray-400 hover:border-gray-300 dark:hover:border-gray-500 hover:bg-gray-100 dark:hover:bg-gray-700"}function rt(r){return{easy:"bg-emerald-500",medium:"bg-amber-500",hard:"bg-rose-500",expert:"bg-sky-500"}[r]||"bg-gray-400"}function at(r){return{easy:"â â",medium:"â â â â",hard:"All 8 dirs",expert:"Partial clues"}[r]||""}function st(r){return E.value!=="expert"||q.value||A.value.includes(r)?r:r.length<=3?`${r[0]}${"_".repeat(r.length-1)}`:`${r[0]}${"_".repeat(r.length-2)}${r[r.length-1]}`}function ot(){H.value="",Z.value="",O.value="",K.value=12,M.value=15,D.value="auto",E.value="medium",P.value="",j.value=!1,B.value=!1,ie()}function lt(){L.value="topic",H.value=u("wordsearch.page.demo.topic")||"Solar System",Z.value=u("wordsearch.page.demo.words")||"MERCURY, VENUS, EARTH, MARS, JUPITER, SATURN, NEPTUNE, URANUS, PLANET, ORBIT, COMET, ASTEROID, GALAXY, MOON, SOLAR",M.value=15,D.value="auto",E.value="medium",K.value=15,j.value=!1,B.value=!1}async function Ce(){if(Te.value)if(O.value="",L.value==="topic"){if(!v.value){n.value.open();return}if(z.value===0&&!v.value.is_subscribed){d.value.open();return}await nt()}else{const r=N.value;if(r.length<3){O.value=u("wordsearch.page.errors.tooFewWords")||"Please provide at least 3 words";return}X.value=r,P.value=P.value.trim()||"Word Search",ye(r)}}function Ae(){return D.value==="auto"?20:Number(D.value)}async function nt(){G.value=!0;const r=Math.min(12,Ae()),a=`Generate exactly ${K.value} single English words related to the topic "${H.value}" that are suitable for a word search puzzle. 42 43Rules: 44- Each word must be a single word (no spaces or hyphens) 45- Words should be 3-${r} letters long 46- Words should be common and recognizable 47- No duplicates 48- Return ONLY a JSON array of uppercase strings, nothing else 49 50Example format: ["PLANET","ORBIT","STAR","MOON","COMET"]`,Y={payload:{messages:[{role:"system",content:"You are a vocabulary expert. Return only valid JSON arrays of uppercase English words. No markdown, no explanation."},{role:"user",content:a}],temperature:.8,top_p:1}};try{const s=await te.chat(Y);if(!s.ok)throw new Error("API request failed");const U=s.body.getReader(),pt=new TextDecoder;let De="",we="";for(;;){const{done:ee,value:ht}=await U.read();if(ee)break;const bt=pt.decode(ht,{stream:!0}),mt=we+bt;we="";const ue=mt.split(` 51`);for(let xe=0;xe<ue.length-1;xe++){const Ie=ue[xe].trim();if(Ie.startsWith("data: ")){const Me=Ie.substring(6);if(Me!=="[DONE]")try{const ke=JSON.parse(Me);ke.content&&(De+=ke.content)}catch{}}}we=ue[ue.length-1]}const Pe=De.trim().match(/\[[\s\S]*\]/);if(!Pe)throw new Error("Invalid AI response format");const ve=JSON.parse(Pe[0]).map(ee=>String(ee).trim().toUpperCase().replace(/[^A-Z]/g,"")).filter(ee=>ee.length>=2&&ee.length<=Ae());if(ve.length<3)throw new Error("Too few valid words generated");
51X.value=ve,P.value=H.value,ye(ve),x.addFreeUsageCnt()}catch{O.value=u("wordsearch.page.errors.generationFailed")||"Failed to generate puzzle. Please try again."}finally{G.value=!1}}function ye(r){G.value=!0;try{const a=gr(D.value,r);M.value=a;const{grid:Y,placements:s,unplacedWords:U}=cr(r,a,E.value);F.value=Y,$.value=s,ae.value=U,A.value=[],q.value=!1,Q.value=!0,ie()}catch{O.value=u("wordsearch.page.errors.generationFailed")||"Failed to generate puzzle. Please try again."}finally{G.value=!1}}function it(){X.value.length>0&&ye(X.value),ie()}function We(){Q.value=!1,F.value=[],$.value=[],ae.value=[],A.value=[],q.value=!1,X.value=[],O.value="",ie()}function dt(r){A.value.includes(r)||A.value.push(r)}async function ct(){if(!(!F.value.length||oe.value)){oe.value=!0,V.value=!1;try{const r=It(10),a={grid:F.value,placements:$.value,words:X.value,size:M.value,sizeSetting:D.value,difficulty:E.value,playStyle:{rotateLetters:j.value,scaleLetters:B.value},title:P.value||"Word Search"};if(!(await fetch("https://usa.imgkits.com/site/save",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`key=${encodeURIComponent("wordsearch_"+r)}&value=${encodeURIComponent(JSON.stringify(a))}&time=${3600*24*700}`})).ok)throw new Error("Failed to save puzzle");ce.value=`${window.location.origin}/word-search/${r}`,de.value=!0}catch{alert(u("wordsearch.page.share.error")||"Failed to share puzzle. Please try again.")}finally{oe.value=!1}}}async function ut(){try{await navigator.clipboard.writeText(ce.value),V.value=!0,setTimeout(()=>{V.value=!1},2e3)}catch{const a=document.createElement("input");a.value=ce.value,document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),V.value=!0,setTimeout(()=>{V.value=!1},2e3)}}const gt=I(()=>`${Yt}/${g.value==="en"?"":g.value+"/"}tools/word-search-generator`);return kt(()=>({title:u("wordsearch.meta.title")||"Free Word Search Generator - Create Custom Puzzles | TeachAny",meta:[{name:"keywords",content:u("wordsearch.meta.keywords")||"word search generator, word search maker, create word search"},{name:"description",content:u("wordsearch.meta.description")||"Generate custom word search puzzles instantly."},{property:"og:site_name",content:u("wordsearch.meta.ogSiteName")||"TeachAny"},{property:"og:title",content:u("wordsearch.meta.ogTitle")||"Free Word Search Generator"},{property:"og:image",content:""},{property:"og:description",content:u("wordsearch.meta.ogDescription")||"Generate custom word search puzzles with AI."}],script:[{type:"application/ld+json",innerHTML:jt({"@context":"https://schema.org","@graph":[Bt(),Vt({name:u("wordsearch.page.title")||"Word Search Generator",description:u("wordsearch.meta.description")||"Generate custom word search puzzles instantly from any topic or your own word list. AI-powered educational tool for teachers and students.",url:gt.value,applicationCategory:"EducationalApplication"})]})}]})),(r,a)=>{const Y=$t;return l(),i("div",Dr,[e("div",Pr,[e("div",Ir,[e("h1",Mr,o(r.$t("wordsearch.page.title")||"Word Search Generator"),1),e("p",Er,o(r.$t("wordsearch.page.description")||"Create custom word search puzzles from any topic or your own word list"),1)]),Q.value?(l(),i("div",Ma,[e("div",Ea,[e("div",La,[e("div",Na,[e("div",Ga,[e("div",Oa,[e("span",Fa,o(r.$t("wordsearch.page.status.wordsFound")||"Words Found"),1),e("span",{class:T(["text-sm font-bold",fe.value?"text-emerald-600 dark:text-emerald-400":"text-gray-700 dark:text-gray-200"])},o(A.value.length)+" / "+o($.value.length),3)]),e("div",qa,[e("div",{class:T(["h-2 rounded-full transition-all duration-500",fe.value?"bg-emerald-500":"bg-blue-500"]),style:Dt({width:Xe.value+"%"})},null,6)]),fe.value?(l(),i("p",Ua,o(r.$t("wordsearch.page.status.complete")||"All words foun
51d!")+" ð ",1)):C("",!0)]),e("div",Ra,[e("label",Ha,o(r.$t("wordsearch.page.labels.wordsToFind")||"Words to Find"),1),e("div",ja,[(l(!0),i(J,null,le($.value,s=>(l(),i("div",{key:s.word,class:T(["flex items-center gap-2 px-3 py-2 rounded-lg transition-all duration-200",A.value.includes(s.word)?"bg-emerald-50 dark:bg-emerald-900/30 border border-emerald-200 dark:border-emerald-800":"bg-gray-50 dark:bg-gray-700/50 border border-transparent"])},[A.value.includes(s.word)?(l(),W(c(rr),{key:0,class:"w-4 h-4 text-emerald-500 flex-shrink-0"})):(l(),i("span",Ba)),e("span",{class:T(["text-sm font-medium transition-all",A.value.includes(s.word)?"text-emerald-700 dark:text-emerald-300 line-through":"text-gray-700 dark:text-gray-200"])},o(st(s.word)),3)],2))),128))])]),e("div",Va,[e("button",{onClick:a[6]||(a[6]=s=>q.value=!q.value),class:"w-full py-2.5 px-4 bg-white dark:bg-gray-700 border-2 border-gray-200 dark:border-gray-600 hover:border-gray-300 dark:hover:border-gray-500 text-gray-700 dark:text-gray-200 font-semibold text-sm rounded-xl transition-all flex items-center justify-center gap-2"},[q.value?(l(),W(c(Qt),{key:1,class:"w-4 h-4"})):(l(),W(c(Kt),{key:0,class:"w-4 h-4"})),S(" "+o(q.value?r.$t("wordsearch.page.buttons.hideAnswers")||"Hide Answers":r.$t("wordsearch.page.buttons.showAnswers")||"Show Answers"),1)]),e("button",{onClick:it,disabled:G.value,class:"w-full py-2.5 px-4 bg-white dark:bg-gray-700 border-2 border-gray-200 dark:border-gray-600 hover:border-gray-300 dark:hover:border-gray-500 text-gray-700 dark:text-gray-200 font-semibold text-sm rounded-xl transition-all flex items-center justify-center gap-2 disabled:opacity-50"},[y(c(Ne),{class:T(["w-4 h-4",{"animate-spin":G.value}])},null,8,["class"]),S(" "+o(r.$t("wordsearch.page.buttons.regenerate")||"Shuffle"),1)],8,Ya),e("button",{onClick:a[7]||(a[7]=s=>se.value=!0),class:"w-full py-2.5 px-4 bg-white dark:bg-gray-700 border-2 border-gray-200 dark:border-gray-600 hover:border-gray-300 dark:hover:border-gray-500 text-gray-700 dark:text-gray-200 font-semibold text-sm rounded-xl transition-all flex items-center justify-center gap-2"},[y(c(ze),{class:"w-4 h-4"}),S(" "+o(r.$t("wordsearch.page.buttons.print")||"Print"),1)]),c(p)?(l(),W(Y,{key:0,disabled:!c(Be),loading:c(me),label:c(je),"status-message":c(He),"status-type":c(Re),onInsert:c(Ve)},null,8,["disabled","loading","label","status-message","status-type","onInsert"])):C("",!0),e("button",{onClick:We,class:"w-full py-3 px-4 bg-gradient-to-r from-orange-500 to-rose-500 hover:from-orange-600 hover:to-rose-600 text-white font-semibold text-sm rounded-xl shadow-md shadow-orange-500/30 transition-all flex items-center justify-center gap-2"},[y(c(Xt),{class:"w-4 h-4"}),S(" "+o(r.$t("wordsearch.page.buttons.newPuzzle")||"New Puzzle"),1)])])])]),e("div",Ja,[e("div",Za,[e("div",Ka,[e("div",Qa,[y(c(er),{class:"w-4 h-4 text-gray-400"}),e("span",Xa,o(P.value||"Word Search"),1),e("span",es,o(M.value)+"Ã"+o(M.value),1)]),e("div",ts,[e("button",{onClick:ct,disabled:oe.value,class:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-all disabled:opacity-50",title:"Share"},[oe.value?(l(),i("svg",as,[...a[17]||(a[17]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(l(),W(c(Ge),{key:1,class:"w-4 h-4"}))],8,rs),e("button",{onClick:a[8]||(a[8]=s=>se.value=!0),class:"p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-all",title:"Print"},[y(c(ze),{class:"w-4 h-4"})])])]),e("div",ss,[y(Mt,{grid:F.value,size:M.value,placements:$.value,foundWords:A.value,showAnswers:q.value,interactive:!0,rotateLetters:j.value,scaleLetters:B.value,onWordFound:dt},null,8,["grid","size","placements","foundWords","showAnswers","rotateLetters","scaleLetters"])]),e("p",os,o(r.$t("wordsearch.page.hints.gridInteraction")||"Click and drag across letters to find hidden words"),1)]),ae.value.length>0?(l(),i("div",ls,[e("p",ns,[e("span",is,o(r.$t("wordsearch.page.warnings.unplacedNote")||"Note:"),1),S(" "+o(ae.value.length)+" "+o(r.$t("wordsearch.page.warnings.unplacedMessage")||"word(s) couldn't fit in the grid:")+" ",1),e("span",ds,o(ae.value.join(", ")),1),S(". "+o(r.$t("wordsearch.page.warnings.unplacedSuggestion")||"Try a larger grid size."),1)])])):C("",!0)])])])):(l(),i("div",Lr,[e("div",Nr,[e("div",Gr,[(l(!0),i(J,null,le(Ze.value,s=>(l(),i("button",{key:s.value,onClick:U=>L.value=s.value,class:T(["flex-1 relative py-4 px-4 text-sm font-semibold transition-all duration-200 flex items-center justify-center gap-2",L.value===s.value?"text-blue-600 dar
51k:text-blue-400":"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300"])},[s.value==="topic"?(l(),W(c(_e),{key:0,class:"w-4 h-4"})):(l(),W(c(tr),{key:1,class:"w-4 h-4"})),S(" "+o(s.label)+" ",1),L.value===s.value?(l(),i("span",Fr)):C("",!0)],10,Or))),128))]),e("div",qr,[L.value==="topic"?(l(),i("div",Ur,[e("label",Rr,o(r.$t("wordsearch.page.labels.topic")||"Topic / Subject"),1),e("div",Hr,[R(e("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>H.value=s),type:"text",placeholder:r.$t("wordsearch.page.placeholders.topic")||"e.g. Solar System, US Presidents, Animals...",class:"w-full px-4 py-3.5 pl-12 border-2 border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/60 rounded-xl text-base text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 transition-all duration-200 focus:border-blue-500 dark:focus:border-blue-400 focus:bg-white dark:focus:bg-gray-700 focus:ring-4 focus:ring-blue-500/10 focus:outline-none",onKeyup:Wt(Ce,["enter"])},null,40,jr),[[ge,H.value]]),e("div",Br,[y(c(_e),{class:"w-3.5 h-3.5 text-white"})])]),e("p",Vr,[a[12]||(a[12]=e("svg",{class:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"})],-1)),S(" "+o(r.$t("wordsearch.page.hints.aiGenerate")||"AI will generate relevant vocabulary from your topic"),1)])])):(l(),i("div",Yr,[e("div",Jr,[e("label",Zr,o(r.$t("wordsearch.page.labels.customWords")||"Word List"),1),e("span",{class:T(["inline-flex items-center gap-1 px-2.5 py-1 bg-gray-100 dark:bg-gray-700 rounded-full text-xs font-medium",N.value.length>=3?"text-emerald-600 dark:text-emerald-400":"text-gray-400"])},[e("span",{class:T(["w-1.5 h-1.5 rounded-full",N.value.length>=3?"bg-emerald-500":"bg-gray-300 dark:bg-gray-500"])},null,2),S(" "+o(N.value.length)+" words ",1)],2)]),R(e("textarea",{"onUpdate:modelValue":a[1]||(a[1]=s=>Z.value=s),rows:"5",placeholder:r.$t("wordsearch.page.placeholders.customWords")||`Enter words separated by commas or new lines 52e.g. PLANET, STAR, MOON, GALAXY, ORBIT`,class:"w-full px-4 py-3.5 border-2 border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/60 rounded-xl text-base text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 resize-none transition-all duration-200 focus:border-blue-500 dark:focus:border-blue-400 focus:bg-white dark:focus:bg-gray-700 focus:ring-4 focus:ring-blue-500/10 focus:outline-none"},null,8,Kr),[[ge,Z.value]]),N.value.length>0?(l(),i("div",Qr,[(l(!0),i(J,null,le(N.value.slice(0,20),(s,U)=>(l(),i("span",{key:U,class:"inline-flex items-center px-2.5 py-1 bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 text-xs font-medium rounded-lg border border-blue-100 dark:border-blue-800/50"},o(s),1))),128)),N.value.length>20?(l(),i("span",Xr," +"+o(N.value.length-20)+" more ",1)):C("",!0)])):C("",!0)])),e("div",ea,[e("button",{onClick:lt,class:"inline-flex items-center gap-1.5 px-3.5 py-2 text-xs font-semibold text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20 rounded-lg hover:bg-blue-100 dark:hover:bg-blue-900/40 transition-colors"},[y(c(Jt),{class:"w-3.5 h-3.5"}),S(" "+o(r.$t("wordsearch.page.buttons.demo")||"Try Example"),1)]),e("button",{onClick:ot,class:"inline-flex items-center gap-1.5 px-3.5 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 bg-gray-50 dark:bg-gray-700/40 rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"},[y(c(Ne),{class:"w-3.5 h-3.5"}),S(" "+o(r.$t("wordsearch.page.buttons.clear")||"Clear"),1)])])])]),e("div",ta,[e("h3",ra,[y(c(Zt),{class:"w-4 h-4 text-gray-400"}),S(" "+o(r.$t("wordsearch.page.labels.puzzleSettings")||"Puzzle Settings"),1)]),e("div",aa,[e("div",null,[e("label",sa,o(r.$t("wordsearch.page.labels.gridSize")||"Grid Size"),1),e("div",oa,[(l(!0),i(J,null,le(c(Ye),s=>(l(),i("button",{key:s,onClick:U=>D.value=s,class:T(["relative py-2.5 rounded-xl font-bold text-xs transition-all duration-200 border-2",D.value===s?"bg-blue-500 border-blue-500 text-white shadow-lg shadow-blue-500/30 scale-105":"bg-gray-50 dark:bg-gray-700/50 border-gray-200 dark:border-gray-600 text-gray-600 dark:text-gray-300 hover:border-blue-300 dark:hover:border-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900/20"])},o(et(s)),11,la))),128))]),e("p",na,o(Je.value),1)]),e("div",null,[e("label",ia,o(r.$t("wordsearch.page.labels.difficulty")||"Difficulty"),1),e("div",da,[(l(!0),i(J,null,le(Ke.value,s=>(l(),i("button",{key:s.value,onClick:U=>E.value=s.value,class:T(["w-full flex items-center gap-3 py-2.5 px-3 rounded-xl text-xs font-semibold transition-all duration-200 border-2",tt(s.value)])},[e("span",{class:T(["w-2 h-2 rounded-full flex-shrink-0",rt(s.value)])},null,2),e("span",ua,o(s.label),1),E.value===s.value?(l(),i("span",ga,o(at(s.value)),1)):C("",!0)],10,ca))),128))]),e("p",pa,o(Qe.value),1)]),L.value==="topic"?(l(),i("div",ha,[e("label",ba,o(r.$t("wordsearch.page.labels.wordCount")||"Word Count"),1),e("div",ma,[e("div",fa,[e("span",ya,o(K.value),1),a[13]||(a[13]=e("span",{class:"text-xs text-gray-400 ml-1.5 mt-1"},"words",-1))]),R(e("input",{"onUpdate:modelValue":a[2]||(a[2]=s=>K.value=s),type:"range",min:"8",max:"20",class:"word-count-slider w-full h-1.5 bg-gray-200 dark:bg-gray-600 rounded-full appearance-none cursor-pointer"},null,512),[[ge,K.value,void 0,{number:!0}]]),a[14]||(a[14]=e("div",{class:"flex justify-between text-[10px] text-gray-400 mt-1.5"},[e("span",null,"8"),e("span",null,"14"),e("span",null,"20")],-1))])])):C("",!0),L.value==="custom"?(l(),i("div",wa,[e("label",va,o(r.$t("wordsearch.page.labels.puzzleTitle")||"Puzzle Title"),1),R(e("input",{"onUpdate:modelValue":a[3]||(a[3]=s=>P.value=s),type:"text",placeholder:r.$t("wordsearch.page.placeholders.puzzleTitle")||"My Word Search",class:"w-full px-3.5 py-2.5 border-2 border-gray-200 dark:border-gray-600 bg-gray-50 dark:bg-gray-700/60 rounded-xl text-sm text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 transition-all duration-200 focus:border-blue-500 dark:focus:border-blue-400 focus:bg-white dark:focus:bg-gray-700 focus:ring-4 focus:ring-blue-500/10 focus:outline-none"},null,8,xa),[[ge,P.value]])])):C("",!0),e("div",null,[e("label",ka,o(k("wordsearch.page.labels.playStyle","Play Style")),1),e("div",_a,[e("label",za,[R(e("input",{"onUpdate:modelValue":a[4]||(a[4]=s=>j.value=s),type:"checkbox",class:"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"},null,512),[[be,j.value]]),e("span",Sa,o(k("wordsearch.page.playStyle.rotate","Rotate letters")),1)]),e("label",$a,[R(e("input",{"onUpdate:modelValue":a[5]||(a[5]=s=>B.value=s),type:"checkbox",class:"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500"},null,512),[[be,B.value]]),e("span",Ta,o(k("wordsearch.page.playStyle.scale","Random size")),1)]),e("p",Ca,o(k("wordsearch.page.playStyle.printNote","Applies to online play only; print stays clean.")),1)])])])]),e("div",Aa,[e("button",{onClick:Ce,disabled:G.value||!Te.value,class:"w-full py-4 px-6 bg-gradient-to-r from-blue-500 via-blue-600 to-indigo-600 hover:from-blue-600 hover:via-blue-700 hover:to-indigo-700 text-white font-bold text-base rounded-xl shadow-xl shadow-blue-500/25 transition-all duration-200 transform hover:scale-[1.01] hover:shadow-2xl hover:shadow-blue-500/30 active:scale-[0.99] disabled:opacity-50 disabled:transform-none disabled:shadow-none flex items-center justify-center gap-2.5"},[G.value?(l(),i(J,{key:0},[a[15]||(a[15]=e("svg",{class:"animate-spin w-5 h-5",fill:"none",viewBox:"0 0 24 24"},[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),S(" "+o(r.$t("wordsearch.page.buttons.generating")||"Generating..."),1)],64)):(l(),i(J,{key:1},[y(c(_e),{class:"w-5 h-5"}),S(" "+o(r.$t("wordsearch.page.buttons.generate")||"Generate Puzzle"),1)],64))],8,Wa),O.value?(l(),i("div",Da,[a[16]||(a[16]=e("svg",{class:"w-4 h-4 text-red-500 mt-0.5 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20"},[e("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z","clip-rule":"evenodd"})],-1)),e("p",Pa,o(O.value),1)])):C("",!0),e("p",Ia,o(r.$t("wordsearch.page.hints.enterToGenerate")||"Press Enter to generate quickly"),1)])]))]),(l(),W(qe,{to:"body"},[y(Fe,{name:"modal"},{default:Oe(()=>[de.value?(l(),i("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",onClick:a[10]||(a[10]=Pt(s=>de.value=!1,["self"]))},[e("div",cs,[e("div",us,[y(c(Ge),{class:"w-8 h-8 text-white"})]),e("h3",gs,o(r.$t("wordsearch.page.share.title")||"Share Puzzle"),1),e("p",ps,o(r.$t("wordsearch.page.share.message")||"Share this word search with friends, students, or colleagues!"),1),e("div",hs,[e("input",{type:"text",value:ce.value,readonly:"",class:"flex-1 bg-transparent text-sm text-gray-700 dark:text-gray-200 outline-none font-mono truncate"},null,8,bs),e("button",{onClick:ut,class:T(["flex-shrink-0 p-2 rounded-lg transition-all",V.value?"bg-emerald-100 dark:bg-emerald-900/40 text-emerald-600 dark:text-emerald-400":"bg-white dark:bg-gray-600 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-500"])},[V.value?(l(),W(c(ar),{key:0,class:"w-5 h-5"})):(l(),W(c(sr),{key:1,class:"w-5 h-5"}))],2)]),e("button",{onClick:a[9]||(a[9]=s=>de.value=!1),class:"w-full py-3 px-4 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white font-semibold rounded-xl shadow-lg shadow-blue-500/25 transition-all"},o(r.$t("wordsearch.page.share.done")||"Done"),1)])])):C("",!0)]),_:1})])),y(Ar,{showPreview:se.value,grid:F.value,size:M.value,words:$.value.map(s=>s.word),placements:$.value,title:P.value,onClose:a[11]||(a[11]=s=>se.value=!1)},null,8,["showPreview","grid","size","words","placements","title"]),!c(p)&&!c(v)?(l(),W(Wr,{key:0})):C("",!0)])}}},Xs=Ue(ms,[["__scopeId","data-v-3cc21f40"]]);export{Xs as default};
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.