PageSourceSearch

https://goexpired.com/assets/NameGenerator-Dho_oORG.js

js goexpired.com collected 2026-10-09 22:42:56 UTC 77,710 bytes, 12 lines download raw bytes

1import{w as je,b as Z,r as y,s as _,j as e,D as Se,i as Ne,bq as nt,ad as Pe,ah as ke,ak as ce,aj as ie,ay as it,aN as lt,av as _e,ai as ct,ag as dt,aw as ft,ax as ut,t as Te,br as ht,bs as J,T as G,d as M,e as W,a7 as E,Y as te,B,F as gt,bt as ee,u as Fe,a as De,ap as le,I as Le,Q as q,c as Re,R as mt,y as xt,X as pt,bu as bt,a1 as wt,G as yt,h as vt,k as Ct,S as jt,l as St,m as Nt,aA as Pt}from"./index-DocTL6Xp.js";import{C as O,b as kt,c as _t,a as Tt}from"./card-BSfcIW4Y.js";import{u as Ft}from"./index-Ds99ek2V.js";import{C as I}from"./circle-help-CXR2iWrR.js";import{T as Dt}from"./trash-2-Bcoczq4e.js";import{C as Y}from"./checkbox-D2alOpbD.js";import{T as Lt,a as Rt,b as ue,c as oe,d as $t,e as ae}from"./table-DkAu5atY.js";import{G as Gt}from"./globe-trM-BYBb.js";import{H as Mt}from"./heart-DohvxikY.js";/**
2 * @license lucide-react v0.462.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 */const Wt=je("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
7 * @license lucide-react v0.462.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 */const At=je("HeartOff",[["line",{x1:"2",y1:"2",x2:"22",y2:"22",key:"1w4vcy"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35",key:"3mpagl"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17",key:"1gh3v3"}]]),Et=({onCategoriesLoaded:t,onLoadingChange:n,onErrorChange:a,onTotalCountsChange:i,onLastRefreshTimeChange:s})=>{const{toast:d}=Z(),f=async r=>{console.log(`📄 Starting paginated fetch for ${r} categories...`);const g=[];let b=1e3,x=0,p=!0,l=0;for(;p;){console.log(`📄 Fetching ${r} categories: offset ${x}, limit ${b}`);const{data:c,error:u}=await _.from("words").select("category").eq("kind",r).not("category","is",null).order("category",{ascending:!0}).range(x,x+b-1);if(u)throw console.error(`❌ Error fetching ${r} categories at offset ${x}:`,u),new Error(`${r} categories error: ${u.message}`);if(!c||c.length===0){console.log(`✅ No more ${r} categories found at offset ${x}`),p=!1;break}console.log(`📊 Fetched ${c.length} ${r} rows at offset ${x}`);const o=c.map(m=>m.category).filter(Boolean);g.push(...o),l+=c.length,c.length<b?(console.log(`✅ Reached end of ${r} categories (got ${c.length} < ${b})`),p=!1):x+=b}return console.log(`🎯 PAGINATION COMPLETE for ${r}:`,{totalRowsFetched:l,totalCategoriesBeforeDedup:g.length,sampleCategories:g.slice(0,10),lastCategories:g.slice(-10),hasWeedCBD:g.includes("weed/cbd")}),g},h=async(r=!1,g=!1)=>{var b,x;console.log("🔄 Starting category loading process with pagination...",{showLoadingToast:r,forceRefresh:g,timestamp:new Date().toISOString()}),r&&n(!0),a(null);try{console.log("📡 Fetching ALL categories from Supabase words table with pagination...");const[p,l]=await Promise.all([f("prefix"),f("suffix")]);console.log("🔍 Raw paginated results received:",{prefixCategoriesTotal:p.length,suffixCategoriesTotal:l.length,prefixSample:p.slice(0,10),suffixSample:l.slice(0,10),prefixLastCategories:p.slice(-10),suffixLastCategories:l.slice(-10)}),console.log("📝 Categories before deduplication:",{prefix:p.length,suffix:l.length,prefixSample:p.slice(0,10),suffixSample:l.slice(0,10),hasWeedCBDPrefix:p.includes("weed/cbd"),hasWeedCBDSuffix:l.includes("weed/cbd"),hasLatePrefixCategories:p.some(o=>o&&o.toLowerCase()>"l"),hasLateSuffixCategories:l.some(o=>o&&o.toLowerCase()>"p"),lastPrefixAlphabetically:[...p].sort().slice(-10),lastSuffixAlphabetically:[...l].sort().slice(-10)});const c=[...new Set(p)].sort(),u=[...new Set(l)].sort();if(console.log("✅ FINAL VERIFICATION - Unique categories found with pagination:",{prefixCount:c.length,suffixCount:u.length,prefixCategories:c,suffixCategories:u,hasWeedCBDPrefixFinal:c.includes("weed/cbd"),hasWeedCBDSuffixFinal:u.includes("weed/cbd"),categoriesBeyondL:c.filter(o=>o.toLowerCase()>"l"),categoriesBeyondP:u.filter(o=>o.toLowerCase()>"p"),categoriesStartingWithR:c.filter(o=>o.toLowerCase().startsWith("r")),categoriesStartingWithS:u.filter(o=>o.toLowerCase().startsWith("s")),categoriesStartingWithT:[...c,...u].filter(o=>o.toLowerCase().startsWith("t"))}),i({prefix:c.length,suffix:u.length}),console.log("🎯 Updating state with paginated categories..."),console.log("🔧 DEBUG: Setting prefixCategories to:",c),console.log("🔧 DEBUG: Setting suffixCategories to:",u),t(c,u),s(new Date),console.log("✅ State updated successfully with paginated data - All categories should now be available"),r){let o=`Loa
11ded ${c.length} prefix and ${u.length} suffix categories (with pagination)`;d({title:"Categories updated successfully!",description:o})}if(c.length===0&&u.length===0){const o="No categories found in words table - it may be empty";console.warn("⚠️ "+o),a(o),r&&d({title:"No categories found",description:"The words table appears to be empty. Please add some words with categories.",variant:"destructive"})}else a(null)}catch(p){const l=p.message||"Unknown error occurred";if(console.error("💥 Category loading failed:",p),a(l),r&&d({title:"Failed to load categories",description:l,variant:"destructive"}),!g){console.log("🔄 Attempting fallback category loading...");try{const[c,u]=await Promise.all([_.from("words").select("category").eq("kind","prefix").not("category","is",null).order("category",{ascending:!0}),_.from("words").select("category").eq("kind","suffix").not("category","is",null).order("category",{ascending:!0})]);if(!c.error&&!u.error){const o=[...new Set(((b=c.data)==null?void 0:b.map(v=>v.category).filter(Boolean))||[])].sort(),m=[...new Set(((x=u.data)==null?void 0:x.map(v=>v.category).filter(Boolean))||[])].sort();console.log("✅ Fallback successful (limited to 1000 rows):",{prefixes:o.length,suffixes:m.length}),console.log("🔧 DEBUG FALLBACK: Setting prefixCategories to:",o),console.log("🔧 DEBUG FALLBACK: Setting suffixCategories to:",m),t(o,m),i({prefix:o.length,suffix:m.length}),a(null)}}catch(c){console.error("💥 Fallback also failed:",c)}}}
11finally{n(!1),console.log("🏁 Category loading process with pagination completed at:",new Date().toISOString())}};return y.useEffect(()=>{console.log("🚀 CategoryLoader mounted, loading categories with pagination..."),h()},[]),{loadCategories:h,refreshCategories:()=>h(!0,!1),forceRefreshCategories:()=>h(!0,!0)}};async function he({kind:t,filters:n,customWord:a,targetCount:i=1e3}){console.log("🌐 fetchDiverseWords called with:",{kind:t,filters:n,customWord:a,targetCount:i});try{console.log(`🎯 Starting robust diverse word fetching for ${t} with target: ${i}`),console.log(`📥 Fetching all available ${t} words...`);let s=[],d=0;const f=1e3;let h=!0;for(;h;){let o=_.from("words").select("word, category").eq("kind",t).order("category",{ascending:!0}).order("word",{ascending:!0}).range(d,d+f-1);if(t==="suffix"&&n.noPlural&&(o=o.eq("is_plural",!1)),n.short&&(o=o.lte("length",8)),n.alliteration&&a){const w=a.charAt(0).toLowerCase();console.log("🔤 Applying alliteration filter for letter:",w),o=o.ilike("word",`${w}%`)}const{data:m,error:v}=await o;if(v){console.error("❌ Error fetching words:",v);break}if(!m||m.length===0){h=!1;break}s=s.concat(m),d+=f,m.length<f&&(h=!1)}console.log(`📊 Fetched ${s.length} total words`);const r=new Map;for(const o of s)r.has(o.category)||r.set(o.category,[]),r.get(o.category).push(o.word);for(const[o,m]of r.entries())r.set(o,ge(m));console.log(`📂 Grouped into ${r.size} categories`);for(const[o,m]of r.entries())console.log(`  📁 ${o}: ${m.length} words`);const g=new Set,b=Array.from(r.keys()),x=new Map;for(const o of b)x.set(o,0);a&&a.trim().length>0&&g.add(a.trim());let p=0;const l=Math.ceil(i*2/b.length);for(console.log(`🔄 Starting round-robin selection. Max rounds: ${l}`);g.size<i&&p<l;){let o=0;for(const m of b){if(g.size>=i)break;const v=r.get(m),w=x.get(m);if(w<v.length){const C=v[w];C!==a&&!g.has(C)&&(g.add(C),o++),x.set(m,w+1)}}if(o===0){console.log("⚠️ No new words added in this round, all categories exhausted");break}console.log(`🔄 Round ${p+1}: Added ${o} words, total: ${g.size}/${i}`),p++}const c=Array.from(g),u=ge(c);return console.log(`🎉 Robust diverse word fetching complete: ${u.length}/${i} words from ${r.size} categories`),console.log("🔍 First 10 words:",u.slice(0,10)),u.slice(0,i)}catch(s){return console.error("❌ Error in fetchDiverseWords:",s),[]}}function ge(t){const n=[...t];for(let a=n.length-1;a>0;a--){const i=Math.floor(Math.random()*(a+1));[n[a],n[i]]=[n[i],n[a]]}return n}const It=({selectedPrefixCategories:t,selectedSuffixCategories:n,customPrefix:a,customSuffix:i,filters:s,superCategories:d})=>{const[f,h]=y.useState([]),[r,g]=y.useState([]);return y.useEffect(()=>{(async()=>{const x=a.trim().length>0,p=t.length>0,l=d.superPrefix,c=i.trim().length>0;if(!p&&!x&&!l&&c){console.log("🔄 Custom suffix provided - fetching diverse prefix words from all categories"),console.log("🔍 Alliteration filter status:",s==null?void 0:s.alliteration,"customSuffix:",i);try{const u=await he({kind:"prefix",filters:{...s,customWord:s.alliteration?i:void 0},targetCount:1e3});h(u),console.log(`Fetched ${u.length} diverse prefix words for custom suffix combination`)}catch(u){console.error("Error fetching diverse prefix words for custom suffix:",u)}return}if(!p&&!x&&!l){h([]);return}try{const u=[];if(x&&u.push(a),l){let o=_.from("words").select("word").eq("kind","prefix").eq("category","popular").limit(500);s.short&&(o=o.lte("length",8));const{data:m,error:v}=await o;if(!v&&m){const w=m.map(C=>C.word).filter(C=>C!==a);u.push(...w),console.log(`Fetched ${w.length} super prefix words`)}}if(p){const o=Math.max(50,Math.floor(1500/t.length)),m=Math.min(1e3,o);console.log(`Fetching ${m} words per category for ${t.length} prefix categories`);for(const v of t){let w=_.from("words").select("word").eq("kind","prefix").eq("category",v).limit(m);s.short&&(w=w.lte("length",8));const{data:C,error:j}=await w;if(j){console.error("Error fetching prefix words:",j);continue}const S=(C==null?void 0:C.map(N=>N.word).filter(N=>!u.includes(N)))||[];u.push(...S)}}console.log(`Total prefix words: ${u.length}`),h(u)}catch(u){console.error("Error fetching prefix words:",u)}})()},[t,a,i,s.short,s.alliteration,d.superPrefix]),y.useEffect(()=>{(async()=>{const x=i.trim().length>0,p=n.length>0,l=d.superSuffix,c=a.trim().length>0;if(!p&&!x&&!l&&c){console.log("🔄 Custom prefix provided - fetching diverse suffix words from all categories");try{const u=await he({kind:"suffix",filters:{...s,customWord:s.alliteration?a:void 0},targetCount:1e3});g(u),console.log(`Fetched ${u.length} diverse suffix words for custom prefix combination`)}catch(u){console.error("Error fetching diverse suffix words for custom prefix:",u)}return}if(!p&&!x&&!l){g([]);return}try{const u=[];
11if(x&&u.push(i),l){let o=_.from("words").select("word").eq("kind","suffix").eq("category","popular").limit(500);s.noPlural&&(o=o.eq("is_plural",!1)),s.short&&(o=o.lte("length",8));const{data:m,error:v}=await o;if(!v&&m){const w=m.map(C=>C.word).filter(C=>C!==i);u.push(...w),console.log(`Fetched ${w.length} super suffix words`)}}if(p){const o=Math.max(50,Math.floor(1500/n.length)),m=Math.min(1e3,o);console.log(`Fetching ${m} words per category for ${n.length} suffix categories`);for(const v of n){let w=_.from("words").select("word").eq("kind","suffix").eq("category",v).limit(m);s.noPlural&&(w=w.eq("is_plural",!1)),s.short&&(w=w.lte("length",8));const{data:C,error:j}=await w;if(j){console.error("Error fetching suffix words:",j);continue}const S=(C==null?void 0:C.map(N=>N.word).filter(N=>!u.includes(N)))||[];u.push(...S)}}console.log(`Total suffix words: ${u.length}`),g(u)}catch(u){console.error("Error fetching suffix words:",u)}})()},[n,i,a,s.noPlural,s.short,s.alliteration,d.superSuffix]),{selectedPrefixes:f,selectedSuffixes:r}},Bt=()=>({fetchRandomWords:async(n,a=[],i={})=>{try{let s=_.from("words").select("word").eq("kind",n).order("word",{ascending:!1}).limit(500);a.length>0&&(s=s.not("category","in",`(${a.join(",")})`)),n==="suffix"&&i.noPlural&&(s=s.eq("is_plural",!1)),i.short&&(s=s.lte("length",8));const{data:d,error:f}=await s;if(f)throw f;return(d==null?void 0:d.map(h=>h.word))||[]}catch(s){return console.error(`Error fetching random ${n} words:`,s),[]}}}),Vt=()=>{const[t,n]=y.useState(""),[a,i]=y.useState(""),[s,d]=y.useState([]),[f,h]=y.useState([]),[r,g]=y.useState(""),[b,x]=y.useState(""),[p,l]=y.useState(".com"),[c,u]=y.useState([]),[o,m]=y.useState([]),[v,w]=y.useState(0),[C,j]=y.useState(!1),[S,N]=y.useState(!1),[D,R]=y.useState(!1),[$,V]=y.useState(!0),[T,k]=y.useState(null),[P,F]=y.useState(null),[L,A]=y.useState({prefix:0,suffix:0}),[H,U]=y.useState({noPlural:!1,hyphen:!1,thePrefix:!1,alliteration:!1,short:!1}),[Q,Ye]=y.useState({superPrefix:!1,superSuffix:!1}),{loadCategories:Cs,refreshCategories:Ue,forceRefreshCategories:Qe}=Et({onCategoriesLoaded:(K,z)=>{u(K),m(z),console.log("🔄 Categories loaded in GeneratorForm:",{prefixes:K.length,suffixes:z.length}),w(at=>at+1)},onLoadingChange:V,onErrorChange:k,onTotalCountsChange:A,onLastRefreshTimeChange:F}),{selectedPrefixes:Je,selectedSuffixes:Ze}=It({selectedPrefixCategories:s,selectedSuffixCategories:f,customPrefix:t,customSuffix:a,filters:H,superCategories:Q}),{fetchRandomWords:et}=Bt(),tt=()=>{if(!c||c.length===0)return[];const K=r.trim();return K?c.filter(z=>z&&typeof z=="string"&&z.toLowerCase().includes(K.toLowerCase())):c},st=()=>{if(!o||o.length===0)return[];const K=b.trim();return K?o.filter(z=>z&&typeof z=="string"&&z.toLowerCase().includes(K.toLowerCase())):o},rt=tt(),ot=st();return{customPrefix:t,customSuffix:a,selectedPrefixCategories:s,selectedSuffixCategories:f,prefixSearch:r,suffixSearch:b,selectedTLD:p,prefixCategories:c,suffixCategories:o,renderKey:v,showSlotMachine:C,isSpinning:S,showUpgradeModal:D,categoriesLoading:$,categoriesError:T,lastRefreshTime:P,totalCategoriesInDB:L,filters:H,superCategories:Q,filteredPrefixes:rt,filteredSuffixes:ot,selectedPrefixes:Je,selectedSuffixes:Ze,setCustomPrefix:n,setCustomSuffix:i,setSelectedPrefixCategories:d,setSelectedSuffixCategories:h,setPrefixSearch:g,setSuffixSearch:x,setSelectedTLD:l,setShowSlotMachine:j,setIsSpinning:N,setShowUpgradeModal:R,setFilters:U,setSuperCategories:Ye,fetchRandomWords:et,refreshCategories:Ue,forceRefreshCategories:Qe}},qt=t=>{const{toast:n}=Z();return{handleSubmit:async o=>{o.preventDefault();let m=t.customPrefix.trim()?[t.customPrefix.trim()]:t.selectedPrefixes,v=t.customSuffix.trim()?[t.customSuffix.trim()]:t.selectedSuffixes;if(m.length===0&&v.length>0)m=await t.fetchRandomWords("prefix",[],t.filters);else if(v.length===0&&m.length>0)v=await t.fetchRandomWords("suffix",[],t.filters);else if(m.length===0&&v.length===0){const[w,C]=await Promise.all([t.fetchRandomWords("prefix",[],t.filters),t.fetchRandomWords("suffix",[],t.filters)]);m=w,v=C}if(m.length===0||v.length===0){n({title:"Please select at least one category for both prefix and suffix.",variant:"destructive"});return}t.onGenerate({customPrefix:t.customPrefix,customSuffix:t.customSuffix,selectedPrefixes:m,selectedSuffixes:v,filters:t.filters,selectedTLD:t.selectedTLD})},handleGenerate3Brandables:async()=>{let o=t.customPrefix.trim()?[t.customPrefix.trim()]:t.selectedPrefixes,m=t.customSuffix.trim()?[t.customSuffix.trim()]:t.selectedSuffixes;if(o.length===0&&m.length>0)o=await t.fetchRandomWords("prefix",[],t.filters);else if(m.length===0&&o.length>0)m=await t.fetchRandomWords("suffix",[],t.filters);else if(o.length===0&&m.length===0){const[v,w]=await Promise.all([t.fetchRandomWords("prefix",[],t.filters),t.fetchRandomWords("suffix",[],t.filters)]);o=v,m=w}t.onGenerate3Brandables({prefixes:o,suffixes:m,filters:t.filters,selectedTLD:t.selectedTLD})},handleGenerateAtomPremium:async()=>{try{const{data:o,error:m}=await _.from("atom_fragments").select("word").eq("kind","prefix").limit(1e3),{data:v,error:w}=await _.from("atom_fragments").select("word").eq("kind","suffix").limit(1e3);if(m||w){console.error("Error fetching atom fragments:",m||w),n({title:"Error fetching atom data",description:"Could not load premium atom fragments.",variant:"destructive"});return}const C=(o==null?void 0:o.map(S=>S.word))||[],j=(v==null?void 0:v.map(S=>S.word))||[];if(C.length===0||j.length===0){n({title:"No atom fragments available",description:"Premium atom data is not yet loaded.",variant:"destructive"});return}t.onGenerate({customPrefix:"",customSuffix:"",selectedPrefixes:C,selectedSuffixes:j,filters:{},selectedTLD:".com",generationMode:"atomOnly",atomCount:100})}catch(o){console.error("Error generating atom premium domains:",o),n({title:"Generation failed",description:o.message,variant:"destructive"})}},handleFilterChange:(o,m)=>{t.setFilters(v=>({...v,[o]:m}))},handleSuperCategoryChange:(o,m)=>
11{t.setSuperCategories(v=>({...v,[o]:m}))},handlePrefixToggle:o=>{console.log("🔘 Prefix toggle clicked for category:",o),t.setSelectedPrefixCategories(m=>m.includes(o)?m.filter(v=>v!==o):[...m,o])},handleSuffixToggle:o=>{console.log("🔘 Suffix toggle clicked for category:",o),t.setSelectedSuffixCategories(m=>m.includes(o)?m.filter(v=>v!==o):[...m,o])},clearAllSelections:()=>{t.setSelectedPrefixCategories([]),t.setSelectedSuffixCategories([]),t.setCustomPrefix(""),t.setCustomSuffix(""),t.setFilters({noPlural:!1,hyphen:!1,thePrefix:!1,alliteration:!1,short:!1}),t.setSuperCategories({superPrefix:!1,superSuffix:!1})},clearPrefixSelections:()=>{t.setSelectedPrefixCategories([])},clearSuffixSelections:()=>{t.setSelectedSuffixCategories([])},handleSpinTheWheel:()=>{t.isLoading||t.isSpinning||(t.setIsSpinning(!0),t.setShowSlotMachine(!0))},handleSlotMachineComplete:o=>{t.setShowSlotMachine(!1),t.setIsSpinning(!1),t.onTryMyLuck(o)},handleUpgradeClick:()=>{t.setShowUpgradeModal(!0)},handleUpgrade:o=>{window.location.href=`/pricing?plan=${o}`}}},zt=({isOpen:t,onComplete:n})=>{const[a,i]=y.useState(""),[s,d]=y.useState(!0),[f,h]=y.useState([]),[r,g]=y.useState([]);return y.useEffect(()=>{(async()=>{try{const{data:x,error:p}=await _.from("words").select("category").not("category","is",null);if(p)throw p;const l=[...new Set((x==null?void 0:x.map(c=>c.category))||[])];g(l),console.log("Fetched real categories:",l)}catch(x){console.error("Error fetching categories:",x),g(["animals","technology","food","nature","business"])}})()},[]),y.useEffect(()=>{if(!t||r.length===0){d(!0),h([]),i("");return}let b,x;return b=setInterval(()=>{const p=r[Math.floor(Math.random()*r.length)];i(p)},75),x=setTimeout(()=>{clearInterval(b),d(!1);const p=[...r];for(let c=p.length-1;c>0;c--){const u=Math.floor(Math.random()*(c+1));[p[c],p[u]]=[p[u],p[c]]}const l=p.slice(0,3);console.log("Selected categories for generation:",l),h(l),i(l.join(" • ")),setTimeout(()=>{n(l)},1500)},4e3),()=>{clearInterval(b),clearTimeout(x)}},[t,n,r]),e.jsx(Se,{open:t,children:e.jsx(Ne,{className:"bg-gradient-to-br from-indigo-500 via-purple-500 to-pink-500 border-none text-white max-w-sm",children:e.jsxs("div",{className:"text-center py-8",children:[e.jsx("div",{className:"text-lg font-semibold mb-6",children:s?"Spinning up fresh names… 🎰":"Generating 500 names based on your lucky combo… 🚀"}),e.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-lg p-6 mb-4",children:e.jsx("div",{className:"text-2xl font-bold text-white font-mono tracking-wider min-h-[2rem] flex items-center justify-center",children:a||"loading categories..."})}),s&&e.jsxs("div",{className:"flex justify-center space-x-1",children:[e.jsx("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce",style:{animationDelay:"0ms"}}),e.jsx("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce",style:{animationDelay:"150ms"}}),e.jsx("div",{className:"w-2 h-2 bg-white rounded-full animate-bounce",style:{animationDelay:"300ms"}})]})]})})})},Ot=({showSlotMachine:t,showUpgradeModal:n,currentTier:a,onSlotMachineComplete:i,onUpgradeModalClose:s,onUpgrade:d})=>e.jsxs(e.Fragment,{children:[e.jsx(zt,{isOpen:t,onComplete:i}),e.jsx(nt,{isOpen:n,onClose:s,currentTier:a,onUpgrade:d})]});var de="Radio",[Ht,$e]=Pe(de),[Kt,Xt]=Ht(de),Ge=y.forwardRef((t,n)=>{const{__scopeRadio:a,name:i,checked:s=!1,required:d,disabled:f,value:h="on",onCheck:r,form:g,...b}=t,[x,p]=y.useState(null),l=ke(n,o=>p(o)),c=y.useRef(!1),u=x?g||!!x.closest("form"):!0;return e.jsxs(Kt,{scope:a,checked:s,disabled:f,children:[e.jsx(ce.button,{type:"button",role:"radio","aria-checked":s,"data-state":Ae(s),"data-disabled":f?"":void 0,disabled:f,value:h,...b,ref:l,onClick:ie(t.onClick,o=>{s||r==null||r(),u&&(c.current=o.isPropagationStopped(),c.current||o.stopPropagation())})}),u&&e.jsx(Yt,{control:x,bubbles:!c.current,name:i,value:h,checked:s,required:d,disabled:f,form:g,style:{transform:"translateX(-100%)"}})]})});Ge.displayName=de;var Me="RadioIndicator",We=y.forwardRef((t,n)=>{const{__scopeRadio:a,forceMount:i,...s}=t,d=Xt(Me,a);return e.jsx(it,{present:i||d.checked,children:e.jsx(ce.span,{"data-state":Ae(d.checked),"data-disabled":d.disabled?"":void 0,...s,ref:n})})});We.displayName=Me;var Yt=t=>{const{control:n,checked:a,bubbles:i=!0,...s}=t,d=y.useRef(null),f=Ft(a),h=lt(n);return y.useEffect(()=>{const r=d.current,g=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(g,"checked").set;if(f!==a&&x){const p=new Event("click",{bubbles:i});x.call(r,a),r.dispatchEvent(p)}},[f,a,i]),e.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:a,...s,tabIndex:-1,ref:d,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ae(t){return t?"checked":"unchecked"}var Ut=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],fe="RadioGroup",[Qt,Ls]=Pe(fe,[_e,$e]),Ee=_e(),Ie=$e(),[Jt,Zt]=Qt(fe),Be=y.forwardRef((t,
11n)=>{const{__scopeRadioGroup:a,name:i,defaultValue:s,value:d,required:f=!1,disabled:h=!1,orientation:r,dir:g,loop:b=!0,onValueChange:x,...p}=t,l=Ee(a),c=ct(g),[u,o]=dt({prop:d,defaultProp:s,onChange:x});return e.jsx(Jt,{scope:a,name:i,required:f,disabled:h,value:u,onValueChange:o,children:e.jsx(ft,{asChild:!0,...l,orientation:r,dir:c,loop:b,children:e.jsx(ce.div,{role:"radiogroup","aria-required":f,"aria-orientation":r,"data-disabled":h?"":void 0,dir:c,...p,ref:n})})})});Be.displayName=fe;var Ve="RadioGroupItem",qe=y.forwardRef((t,n)=>{const{__scopeRadioGroup:a,disabled:i,...s}=t,d=Zt(Ve,a),f=d.disabled||i,h=Ee(a),r=Ie(a),g=y.useRef(null),b=ke(n,g),x=d.value===s.value,p=y.useRef(!1);return y.useEffect(()=>{const l=u=>{Ut.includes(u.key)&&(p.current=!0)},c=()=>p.current=!1;return document.addEventListener("keydown",l),document.addEventListener("keyup",c),()=>{document.removeEventListener("keydown",l),document.removeEventListener("keyup",c)}},[]),e.jsx(ut,{asChild:!0,...h,focusable:!f,active:x,children:e.jsx(Ge,{disabled:f,required:d.required,checked:x,...r,...s,name:d.name,ref:b,onCheck:()=>d.onValueChange(s.value),onKeyDown:ie(l=>{l.key==="Enter"&&l.preventDefault()}),onFocus:ie(s.onFocus,()=>{var l;p.current&&((l=g.current)==null||l.click())})})})});qe.displayName=Ve;var es="RadioGroupIndicator",ze=y.forwardRef((t,n)=>{const{__scopeRadioGroup:a,...i}=t,s=Ie(a);return e.jsx(We,{...s,...i,ref:n})});ze.displayName=es;var Oe=Be,He=qe,ts=ze;const Ke=y.forwardRef(({className:t,...n},a)=>e.jsx(Oe,{className:Te("grid gap-2",t),...n,ref:a}));Ke.displayName=Oe.displayName;const Xe=y.forwardRef(({className:t,...n},a)=>e.jsx(He,{ref:a,className:Te("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e.jsx(ts,{className:"flex items-center justify-center",children:e.jsx(ht,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Xe.displayName=He.displayName;const ss=({selectedTLD:t,onTLDChange:n,userTier:a="free",onUpgradeClick:i})=>{const s=a==="free",[d,f]=y.useState(""),[h,r]=y.useState(""),g=[".com",".ai",".io",".xyz",".org",".net",".now",".gg",".co",".dev",".eth",".vc"];y.useEffect(()=>{d.trim()?b(d):r("")},[d]);const b=l=>{/^\.[a-z]{2,63}$/.test(l.toLowerCase())?(r(""),n(l.toLowerCase())):r("TLD must start with . and contain 2-63 letters")},x=l=>{d.trim()||n(l)},p=l=>{if(s&&l&&i){i();return}f(l),l.trim()||n(t||".com")};return e.jsx(J,{children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:"TLD Selection"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-4 h-4 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Choose the domain extension (e.g., .com, .ai) for your generated names"})})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ke,{value:d.trim()?"":t,onValueChange:x,className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-2",children:g.map(l=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Xe,{value:l,id:`tld-${l}`,className:"border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary"}),e.jsx(E,{htmlFor:`tld-${l}`,className:"text-foreground text-sm",children:l})]},l))}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"text-foreground text-sm",children:"Or enter your own TLD"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"Upgrade to unlock custom TLDs":"Enter a custom domain extension (must start with a dot and contain 2-63 letters)"})})]})]}),e.jsx(te,{id:"custom-tld",placeholder:s?"Upgrade to unlock custom TLDs":".example",value:d,onChange:l=>p(l.target.value),disabled:s,className:`bg-input border border-border text-foreground placeholder:text-muted-foreground rounded-xl focus-visible:ring-2 focus-visible:ring-ring mt-1 ${s?"opacity-60 cursor-not-allowed":""}`}),h&&e.jsx("p",{className:"text-red-400 text-sm",children:h})]})]})]})})},rs=({customPrefix:t,customSuffix:n,onPrefixChange:a,onSuffixChange:i,onClearAll:s,selectedTLD:d,onTLDChange:f,onGenerate:h,userTier:r="free",onUpgradeClick:g})=>{const b=r==="free",x=(l,c)=>{if(b){g==null||g();return}l==="prefix"?a(c):i(c)},p=l=>{l.preventDefault(),h(l)};return e.jsx(J,{children:e.jsxs("form",{onSubmit:p,className:"space-y-4 w-full",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 items-end",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(E,{htmlFor:"prefix",className:"text-foreground text-sm",children:"Custom Prefix"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Add your own word to appear at the beginning of generated domain names"})})]})]}),e.jsx(te,{id:"prefix",placeholder:b?"Upgrade to GX PRO to unlock":"Type your own prefix…",value:b?"":t,onChange:l=>x("prefix",l.target.value),onFocus:()=>{b&&(g==null||g())},onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),p(l))},readOnly:b,className:`bg-input border border-border text-foreground placeholder:text-muted-foreground rounded-xl focus-visible:ring-2 focus-visible:ring-ring ${b?"opacity-60 cursor-not-allowed":""}`})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(E,{htmlFor:"suffix",className:"text-foreground text-sm",children:"Custom Suffix"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Add your own word to appear at the end of generated domain names"})})]})]}),e.jsx(te,{id:"suffix",placeholder:b?"Upgrade to GX PRO to unlock":"Type your own suffix…",value:b?"":n,onChange:l=>x("suffix",l.target.value),onFocus:()=>{b&&(g==null||g())},onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),p(l))},readOnly:b,className:`bg-input border border-border text-foreground placeholder:text-muted-foreground rounded-xl focus-visible:ring-2 focus-visible:ring-ring ${b?"opacity-60 cursor-not-allowed":""}`})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(E,{className:"text-foreground text-sm",children:"Clear all selections"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Wipe the slate clean and start over"})})]})]}
11),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(B,{type:"button",onClick:s,variant:"ghost",className:"w-full bg-input border border-border text-foreground hover:bg-[hsl(220_24%_22%)] rounded-xl px-3 py-2 transition-colors focus-visible:ring-2 focus-visible:ring-ring flex items-center justify-center",children:e.jsx(Dt,{className:"w-4 h-4 text-muted-foreground"})})}),e.jsx(W,{children:e.jsx("p",{children:"Wipe the slate clean and start over"})})]})]})]}),e.jsx(ss,{selectedTLD:d,onTLDChange:f,userTier:r,onUpgradeClick:g})]})})},os=({prefixCount:t,suffixCount:n,totalCategoriesInDB:a,filteredPrefixCount:i,filteredSuffixCount:s,lastRefreshTime:d,categoriesLoading:f,categoriesError:h,onRefresh:r,onForceRefresh:g})=>e.jsx(e.Fragment,{children:h&&e.jsx(O,{className:"p-4 bg-red-500/20 backdrop-blur-sm border border-red-500/30 mb-4",children:e.jsxs("div",{className:"text-red-200 text-sm",children:[e.jsx("strong",{children:"Category Loading Error:"})," ",h,e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(B,{onClick:r,variant:"outline",size:"sm",className:"border-red-400 text-red-200 hover:bg-red-500/20 text-xs",children:"Retry"}),e.jsx(B,{onClick:g,variant:"outline",size:"sm",className:"border-yellow-400 text-yellow-200 hover:bg-yellow-500/20 text-xs",children:"Force Reload"})]})]})})}),as=({filters:t,onFilterChange:n,userTier:a="free",onUpgradeClick:i})=>{const s=a==="free",d=(f,h)=>{s&&["noPlural","alliteration","short"].includes(f)&&i?i():n(f,h)};return e.jsx(J,{children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(E,{className:"text-foreground font-semibold text-lg",children:"Filters"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-4 h-4 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Apply specific rules to refine your domain name generation"})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Y,{id:"noPlural",checked:t.noPlural,onCheckedChange:f=>d("noPlural",!!f),className:`border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${s?"opacity-60 ":""} data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"noPlural",className:"text-foreground",children:"Exclude plural suffixes"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"Upgrade to unlock this filter":"Remove words ending in 's', 'es', 'ies' from suffix options"})})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Y,{id:"hyphen",checked:t.hyphen,onCheckedChange:f=>n("hyphen",!!f),className:"border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"hyphen",className:"text-foreground",children:"Add hyphen between words"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Insert a dash (-) between prefix and suffix (e.g., tech-hub)"})})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Y,{id:"thePrefix",checked:t.thePrefix,onCheckedChange:f=>n("thePrefix",!!f),className:"border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"thePrefix",className:"text-foreground",children:'Add "the" before prefix'}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:'Start domain names with "the" 
11(e.g., the-tech-hub)'})})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Y,{id:"alliteration",checked:t.alliteration,onCheckedChange:f=>d("alliteration",!!f),className:`border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${s?"opacity-60 ":""} data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"alliteration",className:"text-foreground",children:"Only show alliterations"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"Upgrade to unlock this filter":"Show only names where prefix and suffix start with the same letter"})})]})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Y,{id:"short",checked:t.short,onCheckedChange:f=>d("short",!!f),className:`border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${s?"opacity-60 ":""} data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"short",className:"text-foreground",children:"Only show short names (max 8 chars)"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"Upgrade to unlock this filter":"Limit results to domain names with 8 characters or fewer"})})]})]})]})]})]})})},ns=({superCategories:t,onSuperCategoryChange:n,userTier:a="free",onUpgradeClick:i})=>{const s=a==="free",d=(f,h)=>{s&&i?i():n(f,h)};return e.jsx(J,{children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(E,{className:"text-foreground font-semibold text-lg",children:"Super Categories"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-4 h-4 text-slate-400 hover:text-slate-600 cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:"Use pre-selected popular words for instant domain generation"})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:`flex items-center space-x-2 ${s?"cursor-pointer":""}`,onClick:s?f=>{f.preventDefault(),i==null||i()}:void 0,children:[e.jsx(Y,{id:"superPrefix",checked:t.superPrefix,onCheckedChange:f=>d("superPrefix",!!f),className:`border-gray-300 ${s?"opacity-60":""} data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"superPrefix",onClick:s?f=>{f.preventDefault(),i==null||i()}:void 0,className:`text-sm text-foreground transition-colors duration-200 cursor-pointer ${s?"opacity-60":""}`,children:"Super Prefix"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-slate-400 hover:text-slate-600 cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"GX PRO feature — click to upgrade":"Activate all popular prefix words for domain generation"})})]})]})]}),e.jsxs("div",{className:`flex items-center space-x-2 ${s?"cursor-pointer":""}`,onClick:s?f=>{f.preventDefault(),i==null||i()}:void 0,children:[e.jsx(Y,{id:"superSuffix",checked:t.superSuffix,onCheckedChange:f=>d("superSuffix",!!f),className:`border-gray-300 ${s?"opacity-60":""} data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary`}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{htmlFor:"superSuffix",onClick:s?f=>{f.preventDefault(),i==null||i()}:void 0,className:`text-sm text-foreground transition-colors duration-200 cursor-pointer ${s?"opacity-60":""}`,children:"Super Suffix"}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-3 h-3 text-slate-400 hover:text-slate-600 cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:s?"GX PRO feature — click to upgrade":"Activate all popular suffix words for domain generation"})})]})]})]})]})]})})},is=({customPrefix:t,customSuffix:n,onPrefixChange:a,onSuffixChange:i,prefixCategories:s,suffixCategories:d,totalCategoriesInDB:f,filteredPrefixCount:h,filteredSuffixCount:r,lastRefreshTime:g,categoriesLoading:b,categoriesError:x,onRefresh:p,onForceRefresh:l,filters:c,onFilterChange:u,selectedTLD:o,onTLDChange:m,onClearAll:v,superCategories:w,onSuperCategoryChange:C,onGenerate:j,userTier:S,onUpgradeClick:N})=>e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 items-stretch",children:[e.jsx(O,{className:"w-full p-6 bg-card border border-border rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.25)] text-foreground flex flex-col",children:e.jsx("div",{className:"space-y-6 flex-1",children:e.jsx(rs,{customPrefix:t,customSuffix:n,onPrefixChange:a,onSuffixChange:i,onClearAll:v,selectedTLD:o,onTLDChange:m,onGenerate:j,userTier:S,onUpgradeClick:N})})}),e.jsx(O,{className:"w-full p-6 bg-card border border-border rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.25)] text-foreground flex flex-col",children:e.jsxs("div",{className:"space-y-6 flex-1",children:[e.jsx(os,{prefixCount:s.length,suffixCount:d.length,totalCategoriesInDB:f,filteredPrefixCount:h,filteredSuffixCount:r,lastRefreshTime:g,categoriesLoading:b,categoriesError:x,onRefresh:p,onForceRefresh:l}),e.jsx(as,{filters:c,onFilterChange:u,userTier:S,onUpgradeClick:N}),e.jsx(ns,{superCategories:w,onSuperCategoryChange:C,userTier:S,onUpgradeClick:N})]})})]}
11),ls=new Set(["afternic top keywords","ai","buzzwords","editors choice","popular","technology","two letters","weed/cbd","brandable suffix","finance"]),me=t=>ls.has(t.toLowerCase()),cs=t=>({Advertising:"Words related to marketing, promotion, and advertising",Marketing:"Terms used in marketing strategies and campaigns",Buzzwords:"Trendy and popular business terminology",Industries:"Names of different business sectors and industries",Finance:"Words related to banking, money, and financial services","Human Resources":"Terms related to HR, hiring, and workforce management","Local Services":"Words for community-based and local businesses",Shopping:"Terms related to retail, commerce, and purchasing",Ai:"Words related to artificial intelligence and machine learning",Technology:"Terms related to tech, software, and digital innovation","Crypto/Web3":"Words related to cryptocurrency and blockchain technology","UX/UI":"Terms related to user experience and interface design","Startup Prefixes":"Popular prefixes used by startup companies",Pharma:"Words related to medicine and drugs","Healthcare & Medtech":"Terms related to healthcare and medical technology",Fitness:"Words related to exercise, health, and physical wellness","Weed/Cbd":"Terms related to cannabis and CBD products",Music:"Words related to music, instruments, and audio",Sport:"Terms related to sports and athletic activities",Tourism:"Words related to travel and tourism industry",Vacation:"Terms associated with holidays and leisure travel","Betting/Gambling":"Words related to gambling and betting activities",Animals:"Names of various animals and creatures",Nature:"Words related to the natural world and environment",Fruit:"Names of different fruits","Food And Drink":"Terms related to cuisine, beverages, and dining",Flavors:"Words describing different tastes and flavors","Basic Colors":"Primary and common color names",Shades:"Various shades and color variations",Size:"Words describing dimensions and scale",Shape:"Terms for geometric forms and physical shapes",Material:"Names of different materials and substances","Wood Types":"Different types and species of wood",Gemstones:"Names of precious stones and gems",Quality:"Words describing standards and characteristics",Condition:"Terms describing states and conditions",Appearance:"Words describing visual characteristics",Brightness:"Terms related to light and illumination levels","Heat Levels":"Words describing temperature and warmth",Intensity:"Terms describing strength and power levels",Volume:"Words related to sound levels and capacity",Feelings:"Words describing emotions and emotional states",Feel:"Terms related to physical and emotional sensations",Traits:"Words describing personality characteristics","People And Relationships":"Terms related to human connections and social bonds","Concepts And Ideas":"Abstract terms and philosophical concepts",Mythology:"Words from myths, legends, and folklore",Royalty:"Terms related to monarchy and noble titles",Duration:"Words describing time periods and length","Life Stage":"Terms describing different phases of life",Frequency:"Words describing how often something occurs",Pace:"Terms describing speed and rhythm",Amount:"Words describing quantities and measurements",Degree:"Terms describing levels and extent",Places:"Names of locations and geographical features",Space:"Words related to areas, rooms, and cosmic space",Proximity:"Terms describing distance and closeness",Housing:"Words related to homes and residential properties",Furniture:"Names of household items and furnishings",Professions:"Names of different jobs and career roles",Law:"Terms related to legal system and jurisprudence","Editors Choice":"Carefully selected premium words",Clothing:"Names of garments and fashion items","Body Parts":"Names of human body parts and anatomy","Posse
11ssives & Articles":"Grammar words like 'the', 'my', 'our'","Two Letters":"Short two-letter combinations and abbreviations",Popular:"Commonly used and trending words","Popular Nouns":"Frequently used noun words","Afternic Top Keywords":"High-performing keywords from Afternic marketplace","BrandBucket Top Keywords":"Popular terms from BrandBucket platform","Objects And Things":"Names of various items and objects","Brandable Suffix":"Endings that create brandable domain names"})[t]||"Category containing related word variations",xe=({title:t,categories:n,selectedCategories:a,filteredCategories:i,searchValue:s,categoriesLoading:d,categoriesError:f,renderKey:h,onSearchChange:r,onCategoryToggle:g,onRefresh:b,onClearAll:x,userTier:p="free",onUpgradeClick:l})=>{const c=p==="free",u=j=>{const S=me(j);c&&S&&l?l():g(j)},o=t.toLowerCase(),m=a.length;console.log(`🎯 CategoryPanel (${t}) rendering debug:`,{categoriesTotal:n.length,filteredCategoriesLength:i.length,filteredCategories:i,searchValue:s,renderKey:h,hasWeedCBD:i.includes("weed/cbd"),sampleCategories:i.slice(0,10)});const v=(j,S)=>{const N=j.replace(/[^a-zA-Z0-9]/g,"_");return`${o}-${N}-${S}-${h}`},w=()=>t==="Prefixes"?"Choose word categories to appear at the beginning of domain names":"Choose word categories to appear at the end of domain names",C=()=>{x&&x()};return e.jsx(J,{children:e.jsxs(O,{className:"p-6 bg-card border border-border rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.25)] text-foreground h-full",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("h3",{className:"text-xl font-semibold text-foreground",children:[t,m>0&&e.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",m," selected)"]})]}),e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(I,{className:"w-4 h-4 text-muted-foreground hover:text-foreground cursor-help"})}),e.jsx(W,{children:e.jsx("p",{children:w()})})]})]}),m>0&&x&&e.jsx("button",{onClick:C,className:"text-muted-foreground hover:text-foreground text-sm underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded",children:"Clear all"})]}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(gt,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),e.jsx(te,{type:"search",placeholder:"Search categories…",value:s,onChange:j=>r(j.target.value),className:"pl-10 bg-input border border-border text-foreground placeholder:text-muted-foreground rounded-xl focus-visible:ring-2 focus-visible:ring-ring"})]}),e.jsx("div",{className:"grid grid-cols-1 xl:grid-cols-2 2xl:grid-cols-3 gap-2 h-96 xl:h-[500px] overflow-y-auto pr-2",children:d?e.jsx("div",{className:"text-muted-foreground text-sm col-span-full",children:"Loading categories..."}):i.length===0?e.jsx("div",{className:"text-muted-foreground text-sm col-span-full",children:s?`No categories match "${s}"`:f?"Error loading categories":n.length===0?`No ${o} categories found in database`:"No categories to display"}):e.jsxs(e.Fragment,{children:[console.log(`🔍 RENDERING ${i.length} categories for ${t}:`,i),i.map((j,S)=>{if(!j||typeof j!="string")return console.warn(`⚠️ Invalid category at index ${S}:`,j),null;const N=v(j,S),D=a.includes(j),R=me(j);console.log(`🎨 Rendering category "${j}" with key "${N}", selected: ${D}`);const $=c&&R;return e.jsxs("div",{className:`flex items-center space-x-2 min-h-[32px] py-1 ${$?"cursor-pointer":""}`,onClick:$?V=>{V.preventDefault(),l==null||l()}:void 0,children:[e.jsx(Y,{id:N,checked:D,onCheckedChange:()=>{if($){l==null||l();return}u(j)},className:`border-border text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring flex-shrink-0 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:ring-1 data-[state=checked]:ring-primary ${$?"opacity-60":""}`}),e.jsx("div",{className:"flex items-center gap-1 flex-grow",children:e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(E,{htmlFor:N,onClick:$?V=>{V.preventDefault(),l==null||l()}:void 0,className:`text-foreground text-sm cursor-pointer break-words ${$?"opacity-60":""}`,children:j})}),e.jsx(W,{children:e.jsx("p",{children:$?"GX PRO feature — click to upgrade":cs(j)})})]})})]},N)}),console.log(`✅ CategoryPanel (${t}) rendered ${i.length} categories successfully`)]})})]})})},ds=({prefixCategories:t,suffixCategories:n,selectedPrefixCategories:a,selectedSuffixCategories:i,filteredPrefixes:s,filteredSuffixes:d,prefixSearch:f,suffixSearch:h,categoriesLoading:r,categoriesError:g,renderKey:b,onPrefixSearchChange:x,onSuffixSearchChange:p,onPrefixToggle:l,onSuffixToggle:c,onRefresh:u,onClearPrefixes:o,onClearSuffixes:m,userTier:v,userProfile:w,onUpgradeClick:C,onGenerate:j,isLoading:S})=>(ee(w),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 items-stretch",children:[e.jsxs("div",{className:"w-full flex flex-col gap-4",children:[e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(xe,{title:"Prefixes",categories:t,selectedCategories:a,filteredCategories:s,searchValue:f,categoriesLoading:r,categoriesError:g,renderKey:b,onSearchChange:x,onCategoryToggle:l,onRefresh:u,onClearAll:o,userTier:v,onUpgradeClick:C})}
11),j&&e.jsx(B,{type:"submit",onClick:j,disabled:S,className:"w-full h-12 sm:h-14 font-medium rounded-button text-sm sm:text-base bg-primary hover:bg-primary/90 text-primary-foreground",children:S?"Generating...":"Generate combinations"})]}),e.jsxs("div",{className:"w-full flex flex-col gap-4",children:[e.jsx("div",{className:"flex-1 min-h-0",children:e.jsx(xe,{title:"Suffixes",categories:n,selectedCategories:i,filteredCategories:d,searchValue:h,categoriesLoading:r,categoriesError:g,renderKey:b,onSearchChange:p,onCategoryToggle:c,onRefresh:u,onClearAll:m,userTier:v,onUpgradeClick:C})}),e.jsx("div",{className:"w-full h-12 sm:h-14","aria-hidden":"true"})]})]})),fs=({onGenerate:t,onTryMyLuck:n,onGenerate3Brandables:a,onGenerate3CVCVCV:i,isLoading:s,onGuestGenerate:d})=>{const{user:f}=Fe(),h=De(f),r=Vt(),g=qt({customPrefix:r.customPrefix,customSuffix:r.customSuffix,selectedPrefixes:r.selectedPrefixes,selectedSuffixes:r.selectedSuffixes,filters:r.filters,selectedTLD:r.selectedTLD,isLoading:s,isSpinning:r.isSpinning,fetchRandomWords:r.fetchRandomWords,setSelectedPrefixCategories:r.setSelectedPrefixCategories,setSelectedSuffixCategories:r.setSelectedSuffixCategories,setCustomPrefix:r.setCustomPrefix,setCustomSuffix:r.setCustomSuffix,setFilters:r.setFilters,setSuperCategories:r.setSuperCategories,setIsSpinning:r.setIsSpinning,setShowSlotMachine:r.setShowSlotMachine,setShowUpgradeModal:r.setShowUpgradeModal,onGenerate:t,onTryMyLuck:n,onGenerate3Brandables:a}),b={...g,handleSubmit:async x=>{var p;if(!f){(p=x==null?void 0:x.preventDefault)==null||p.call(x),d==null||d();return}return g.handleSubmit(x)}};return e.jsxs("div",{className:"space-y-8",children:[e.jsx(Ot,{showSlotMachine:r.showSlotMachine,showUpgradeModal:r.showUpgradeModal,currentTier:h.currentTier,onSlotMachineComplete:b.handleSlotMachineComplete,onUpgradeModalClose:()=>r.setShowUpgradeModal(!1),onUpgrade:b.handleUpgrade}),e.jsx(is,{customPrefix:r.customPrefix,customSuffix:r.customSuffix,onPrefixChange:r.setCustomPrefix,onSuffixChange:r.setCustomSuffix,prefixCategories:r.prefixCategories,suffixCategories:r.suffixCategories,totalCategoriesInDB:r.totalCategoriesInDB,filteredPrefixCount:r.filteredPrefixes.length,filteredSuffixCount:r.filteredSuffixes.length,lastRefreshTime:r.lastRefreshTime,categoriesLoading:r.categoriesLoading,categoriesError:r.categoriesError,onRefresh:r.refreshCategories,onForceRefresh:r.forceRefreshCategories,filters:r.filters,onFilterChange:b.handleFilterChange,selectedTLD:r.selectedTLD,onTLDChange:r.setSelectedTLD,onClearAll:b.clearAllSelections,superCategories:r.superCategories,onSuperCategoryChange:b.handleSuperCategoryChange,onGenerate:b.handleSubmit,userTier:h.currentTier,onUpgradeClick:b.handleUpgradeClick}),e.jsx(ds,{prefixCategories:r.prefixCategories,suffixCategories:r.suffixCategories,selectedPrefixCategories:r.selectedPrefixCategories,selectedSuffixCategories:r.selectedSuffixCategories,filteredPrefixes:r.filteredPrefixes,filteredSuffixes:r.filteredSuffixes,prefixSearch:r.prefixSearch,suffixSearch:r.suffixSearch,categoriesLoading:r.categoriesLoading,categoriesError:r.categoriesError,renderKey:r.renderKey,onPrefixSearchChange:r.setPrefixSearch,onSuffixSearchChange:r.setSuffixSearch,onPrefixToggle:b.handlePrefixToggle,onSuffixToggle:b.handleSuffixToggle,onRefresh:r.refreshCategories,onClearPrefixes:b.clearPrefixSelections,onClearSuffixes:b.clearSuffixSelections,userTier:h.currentTier,userProfile:h.userProfile,onUpgradeClick:b.handleUpgradeClick,onGenerate:b.handleSubmit,isLoading:s})]},r.renderKey)},us=t=>e.jsx(fs,{...t}),hs=({domains:t,isLoading:n})=>{const a=s=>{navigator.clipboard.writeText(s),q.success("Domain copied!")},i=()=>{const s=t.map(d=>d.domain).join(`
12`);navigator.clipboard.writeText(s),q.success(`${t.length} domain names copied!`)};return n?e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-xl font-semibold text-foreground",children:"Generating domains..."}),e.jsx(O,{className:"bg-[hsl(220_24%_18%)] border border-[hsl(220_22%_26%)] rounded-xl p-6 animate-pulse",children:e.jsx("div",{className:"space-y-3",children:[...Array(8)].map((s,d)=>e.jsx("div",{className:"h-8 bg-[hsl(220_24%_22%)] rounded"},d))})})]}):t.length===0?e.jsx(O,{className:"p-8 bg-card border border-border rounded-2xl shadow-[0_10px_30px_rgba(0,0,0,0.25)] text-center",children:e.jsx("p",{className:"text-muted-foreground",children:"Use the form above to generate domain combinations"})}):e.jsxs("div",{className:"space-y-4",id:"generated-results",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"text-xl font-semibold text-foreground",children:["Generated domain names (",t.length,")"]}),e.jsxs(B,{variant:"ghost",size:"sm",onClick:i,className:"bg-input border border-border text-foreground hover:bg-[hsl(220_24%_22%)] rounded-xl focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(le,{className:"w-4 h-4 mr-2"}),"Copy all to clipboard"]})]}),e.jsx(O,{className:"bg-[hsl(220_24%_18%)] border border-[hsl(220_22%_26%)] rounded-xl overflow-hidden",children:e.jsxs(Lt,{children:[e.jsx(Rt,{children:e.jsxs(ue,{className:"border-[hsl(220_22%_26%)] hover:bg-transparent",children:[e.jsx(oe,{className:"text-[hsl(220_20%_92%)] w-[60%]",children:"Domain"}),e.jsx(oe,{className:"text-[hsl(220_20%_92%)] w-[20%]",children:"Appraise"}),e.jsx(oe,{className:"text-[hsl(220_20%_92%)] w-[20%]",children:"Availability"})]})}),e.jsx($t,{children:t.map(s=>{const d=`/appraise-your-domain?domain=${encodeURIComponent(s.domain)}&autostart=1`,f=`https://www.dynadot.com/domain/search?domain=${s.domain}&rscreg=domaindingo`;return e.jsxs(ue,{className:"border-[hsl(220_22%_26%)] hover:bg-[hsl(220_24%_22%)]",children:[e.jsx(ae,{className:"font-medium text-[hsl(220_20%_92%)]",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{children:s.domain}),e.jsx("button",{type:"button",onClick:()=>a(s.domain),className:"text-[hsl(220_12%_70%)] hover:text-[hsl(220_20%_92%)] transition-colors",title:"Copy domain",children:e.jsx(le,{className:"w-3.5 h-3.5"})})]})}),e.jsx(ae,{children:e.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-medium text-[#2563EB] hover:text-[#1D4FD8] hover:underline",children:[e.jsx(Le,{className:"w-4 h-4"}),"Appraise"]})}),e.jsx(ae,{children:e.jsxs("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 text-sm font-medium text-[#2563EB] hover:text-[#1D4FD8] hover:underline",children:[e.jsx(Gt,{className:"w-4 h-4"}),"Check availability"]})})]},s.id)})})]})})]})},pe=({domains:t,favorites:n,onSaveFavorite:a,onRemoveFavorite:i,title:s,onAppraiseDomain:d,appraisingDomain:f,domainAppraisals:h})=>{const{toast:r}=Z();Re();const g=mt(),b=c=>{navigator.clipboard.writeText(c),r({title:"Domain copied!"})},x=c=>{d==null||d(c)},p=c=>n.some(u=>u.domain===c),l=c=>{const u=n.find(o=>o.domain===c);return u==null?void 0:u.id};return t.length===0?null:e.jsx(J,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("h3",{className:"text-lg font-semibold text-foreground",children:s}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:t.map((c,u)=>e.jsxs(O,{className:"group bg-[hsl(220_24%_18%)] hover:bg-[hsl(220_24%_22%)] active:bg-[hsl(220_24%_26%)] border border-[hsl(220_22%_26%)] rounded-xl shadow-[0_10px_24px_rgba(0,0,0,0.25)] text-[hsl(220_20%_92%)] transition-colors focus-within:outline-none focus-within:ring-1 focus-within:ring-[hsl(218_100%_70%)/0.30] p-3 flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("h4",{className:"text-base font-medium text-[hsl(220_20%_92%)] truncate",children:c})}),e.jsxs("div",{className:`flex items-center ml-3 ${g?"gap-0.5":"gap-1"}`,children:[e.jsx(B,{size:"sm",variant:"ghost",onClick:()=>
12b(c),className:`${g?"h-6 w-6":"h-8 w-8"} p-0 inline-flex items-center justify-center bg-[hsl(220_24%_18%)] hover:bg-[hsl(220_24%_22%)] border border-[hsl(220_22%_26%)] text-[hsl(220_12%_70%)] group-hover:text-[hsl(220_20%_92%)] rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(218_100%_70%)]`,title:"Copy domain",children:e.jsx(le,{className:g?"w-3 h-3":"w-4 h-4"})}),p(c)?e.jsx(B,{size:"sm",variant:"ghost",onClick:()=>i(l(c)),className:`inline-flex items-center justify-center bg-[hsl(220_24%_18%)] hover:bg-[hsl(220_24%_22%)] border border-[hsl(220_22%_26%)] text-red-400 hover:text-red-300 rounded-lg p-0 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(218_100%_70%)] ${g?"h-6 w-6":"h-8 w-8"}`,title:"Remove from favorites",children:e.jsx(At,{className:g?"w-3 h-3":"w-4 h-4"})}):e.jsx(B,{size:"sm",variant:"ghost",onClick:()=>a(c),className:`${g?"h-6 w-6":"h-8 w-8"} p-0 inline-flex items-center justify-center bg-[hsl(220_24%_18%)] hover:bg-[hsl(220_24%_22%)] border border-[hsl(220_22%_26%)] text-[hsl(220_12%_70%)] group-hover:text-[hsl(220_20%_92%)] rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(218_100%_70%)]`,title:"Save to favorites",children:e.jsx(Mt,{className:g?"w-3 h-3":"w-4 h-4"})}),d&&e.jsxs(G,{children:[e.jsx(M,{asChild:!0,children:e.jsx(B,{variant:"ghost",size:"sm",className:"p-1.5 h-8 w-8 inline-flex items-center justify-center bg-[hsl(220_24%_18%)] hover:bg-[hsl(220_24%_22%)] border border-[hsl(220_22%_26%)] text-[hsl(220_12%_70%)] group-hover:text-[hsl(220_20%_92%)] rounded-lg transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[hsl(218_100%_70%)]",onClick:()=>x(c),disabled:f===c||!!(h!=null&&h[c.toLowerCase()]),children:f===c?e.jsx(xt,{className:"h-4 w-4 animate-spin"}):e.jsx(Le,{className:"h-4 w-4"})})}),e.jsx(W,{children:e.jsx("p",{children:h!=null&&h[c.toLowerCase()]?"Already appraised":"Get appraisal"})})]})]})]}),(h==null?void 0:h[c.toLowerCase()])&&e.jsx("div",{className:"mt-3 pt-3 border-t border-[hsl(220_22%_26%)]",children:e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsx("span",{className:"text-[hsl(220_12%_70%)]",children:"Estimated Value:"}),e.jsxs("span",{className:"text-emerald-400 font-semibold",children:["$",h[c.toLowerCase()].value.toLocaleString()]})]})})]},u))})]})})},gs=({steps:t,currentStep:n,onNext:a,onPrevious:i,onSkip:s,onComplete:d,isVisible:f})=>{if(!f||n>=t.length)return null;const h=t[n],r=n===0,g=n===t.length-1;return e.jsxs("div",{className:"fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",children:[h.target&&e.jsx("div",{className:"absolute inset-0 pointer-events-none",children:e.jsx("div",{className:"relative h-full"})}),e.jsx("div",{className:"fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-full max-w-md mx-4",children:e.jsxs(O,{className:"bg-white shadow-xl border-0",children:[e.jsxs(kt,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(_t,{className:"text-lg font-bold",children:h.title}),e.jsx(B,{variant:"ghost",size:"sm",onClick:s,className:"h-8 w-8 p-0",children:e.jsx(pt,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex gap-1",children:t.map((b,x)=>e.jsx("div",{className:`h-2 flex-1 rounded-full ${x<=n?"bg-primary":"bg-gray-200"}`},x))})]}),e.jsxs(Tt,{children:[e.jsx("p",{className:"text-gray-700 mb-6",children:h.content}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{className:"text-sm text-gray-500",children:["Step ",n+1," of ",t.length]}),e.jsxs("div",{className:"flex gap-2",children:[!r&&e.jsxs(B,{variant:"outline",size:"sm",onClick:i,children:[e.jsx(Wt,{className:"w-4 h-4 mr-1"}),"Previous"]}),g?e.jsx(B,{onClick:d,children:"Complete Tour"}):e.jsxs(B,{onClick:a,children:["Next",e.jsx(bt,{className:"w-4 h-4 ml-1"})]})]})]})]})]})})]})},ms=(t,n)=>{const[a,i]=y.useState(0),[s,d]=y.useState(!1),{toast:f}=Z(),h=y.useCallback(()=>{i(0),d(!0)},[]),r=y.useCallback(()=>{a<n.length-1&&i(a+1)},[a,n.length]),g=y.useCallback(()=>{a>0&&i(a-1)},[a]),b=y.useCallback(async()=>{d(!1),await p(!0)},[]),x=y.useCallback(async()=>{d(!1),await p(!0),f({title:"Tour completed!",description:"You've successfully completed the tour."})},[f]),p=y.useCallback(async c=>{try{const{data:{user:u}}=await _.auth.getUser();if(!u)return;const{data:o}=await _.from("profiles").select("tour_progress").eq("id",u.id).single(),v={...(o==null?void 0:o.tour_progress)||{}
12,[t]:{completed:c,completedAt:c?new Date().toISOString():null,currentStep:c?n.length:a}},{error:w}=await _.from("profiles").update({tour_progress:v}).eq("id",u.id);if(w)throw w;console.log("Tour progress saved successfully:",{tourId:t,completed:c})}catch(u){console.error("Error saving tour progress:",u)}},[t,a,n.length]),l=y.useCallback(async()=>{var c;try{const{data:{user:u}}=await _.auth.getUser();if(!u)return!1;const{data:o,error:m}=await _.from("profiles").select("tour_progress").eq("id",u.id).single();if(m)return!1;const v=(c=o==null?void 0:o.tour_progress)==null?void 0:c[t];return(v==null?void 0:v.completed)||!1}catch(u){return console.error("Error checking tour completion:",u),!1}},[t]);return{currentStep:a,isVisible:s,startTour:h,nextStep:r,previousStep:g,skipTour:b,completeTour:x,checkTourCompletion:l}},se="aeiou".split(""),be="bcdfghjklmnpqrstvwxyz".split("");function xs(){return Array.from({length:6},(t,n)=>n%2===0?be[Math.floor(Math.random()*be.length)]:se[Math.floor(Math.random()*se.length)]).join("").toLowerCase()+".com"}function ps(t=".com"){const n=[...Array(3).fill("CVCVCV"),...Array(2).fill("CVCVCVC"),...Array(2).fill("CVCVC"),"CVCCVC","CVCVCC","CCVCVC","CVVCVC"],a=n[Math.floor(Math.random()*n.length)],i="bdfghjklmnprstvwz".split(""),s="bcdfghjklmnpqrstvwxz".split("");let d="";for(let f=0;f<a.length;f++)if(a[f]==="C"){const h=f===0?i:s;d+=h[Math.floor(Math.random()*h.length)]}else a[f]==="V"&&(d+=se[Math.floor(Math.random()*se.length)]);return d.charAt(0).toUpperCase()+d.slice(1).toLowerCase()+t}function re(t){const n=[...t];for(let a=n.length-1;a>0;a--){const i=Math.floor(Math.random()*(a+1));[n[a],n[i]]=[n[i],n[a]]}return n}function we(t=500){const n=["bright","smart","quick","swift","bold","crystal","rapid","instant","turbo","flash","power","super","mega","ultra","prime","elite","pro","max","top","best","core","pulse","wave","flow","drive","sharp","clear","pure","deep","wide","strong","fast","solid","fresh","clean","smooth","rich","full","high","great","real","true","new","hot","cool","warm","cold","hard","soft","light","dark","vivid","calm","wild","free","safe","open","zen","tech","cyber","digital","smart","quick","auto","cloud","data","web"],a=["tech","hub","lab","pro","max","core","zone","spot","point","base","line","link","sync","flow","boost","jump","leap","rush","dash","spark","glow","beam","ray","shine","edge","peak","wave","pulse","drive","shift","start","launch","space","place","world","land","city","port","gate","path","road","track","bridge","tower","house","room","box","kit","set","tool","app","net","web","cloud","data","code","byte","bit"],i=re(n),s=re(a),d=new Set;for(;d.size<t;){const f=i[Math.floor(Math.random()*i.length)],h=s[Math.floor(Math.random()*s.length)],r=`${f}${h}.com`;if(d.add(r),d.size>=i.length*s.length)break}return Array.from(d)}function ye(t){return t&&t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function ne(t,n,a={},i=".com"){var d,f;if(a.alliteration){const h=(d=t==null?void 0:t.charAt(0))==null?void 0:d.toLowerCase(),r=(f=n==null?void 0:n.charAt(0))==null?void 0:f.toLowerCase();if(console.log("🎨 Alliteration check:",{prefix:t,suffix:n,prefixFirstLetter:h,suffixFirstLetter:r}),!h||!r||h!==r)return null}if(a.short&&t.length+n.length>8)return null;let s="";return a.thePrefix&&(s+="the"),s+=ye(t),a.hyphen&&(s+="-"),s+=ye(n),s+=i,s}function ve(t,n,a="",i="",s={},d=".com",f=500){console.log("🔧 generateCombinations called with:",{prefixCount:t.length,suffixCount:n.length,customPrefix:a,customSuffix:i,filters:s,targetCount:f});const h=t.length>0?t:[],r=n.length>0?n:[],g=a.trim().length>0,b=i.trim().length>0,x=h.length>0,p=r.length>0;if(g&&!x&&!p||b&&!p&&!x)return console.log("⚠️ Custom word provided but no words loaded - waiting for hooks to fetch from all categories"),{domains:[],toast:{title:"Loading words from all categories for custom combination...",variant:"default"}};if(h.length===0||r.length===0)return console.log("❌ No words available for generation",{prefixWords:h.length,suffixWords:r.length}),{domains:[]};console.log(`✅ Starting generation with ${h.length} prefixes and ${r.length} suffixes`);const l=re(h),c=re(r),u=new Set,o=f,m=l.length*c.length;if(console.log(`💡 Total possible combinations: ${m}`),m>=o*2){console.log("🎯 Using systematic generation approach");let w=0;const C=Math.min(m,o*3);for(;u.size<o&&w<C;){const j=Math.floor(Math.random()*l.length),S=Math.floor(Math.random()*c.length),N=l[j],D=c[S],R=ne(N,D,s,d);R&&u.add(R),w++}if(u.size<o){console.log("🔄 Switching to systematic generation to fill remaining slots");for(let j=0;j<l.length&&u.size<o;j++)for(let S=0;S<c.length&&u.size<o;S++){const N=ne(l[j],c[S],s,d);N&&u.add(N)}}}else{console.log("⚡ Using optimized generation for limited combinations");for(let w=0;w<l.length;w++){for(let C=0;C<c.length;C++){const j=ne(l[w],c[C],s,d);if(j&&u.add(j),u.size>=o)break}if(u.size>=o)break}}const v=Array.from(u);
12if(console.log(`🎯 Generated ${v.length} domains out of ${o} target`),s.alliteration){const w=v.filter(C=>{var D,R,$,V;let S=C.split(".")[0];s.thePrefix&&S.startsWith("the")&&(S=S.substring(3));const N=s.hyphen?S.split("-"):[S];if(N.length>=2){const T=(D=N[0][0])==null?void 0:D.toLowerCase(),k=(R=N[1][0])==null?void 0:R.toLowerCase();return T===k}for(const T of l)if(S.toLowerCase().startsWith(T.toLowerCase())){const k=S.substring(T.length);if(k.length>0)return(($=T[0])==null?void 0:$.toLowerCase())===((V=k[0])==null?void 0:V.toLowerCase())}return!1});return w.length===0?{domains:[],toast:{title:"No alliterations found – try different filters.",variant:"destructive"}}:{domains:w}}return{domains:v}}function bs(){const t=new Set;for(;t.size<3;){const n=xs();t.add(n)}return Array.from(t)}function ws(t=[],n=[],a={},i=".com"){const s=new Set,d=50;let f=0;for(;s.size<3&&f<d;){const h=ps(i);s.add(h),f++}return Array.from(s)}const ys=async(t,n,a)=>{if(a)try{const i=[];t!=null&&t.trim()&&i.push(_.from("custom_word_usage").insert({user_id:a,word:t.trim().toLowerCase(),word_type:"prefix"})),n!=null&&n.trim()&&i.push(_.from("custom_word_usage").insert({user_id:a,word:n.trim().toLowerCase(),word_type:"suffix"})),i.length>0&&await Promise.all(i)}catch(i){console.error("Error logging custom word usage:",i)}},vs=({user:t,userProfile:n})=>{const[a,i]=y.useState([]),[s,d]=y.useState([]),[f,h]=y.useState([]),[r,g]=y.useState(!1),[b,x]=y.useState({}),[p,l]=y.useState(".com"),c=()=>{setTimeout(()=>{const w=document.getElementById("generated-results");w&&w.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})},100)};return{domains:a,brandables:s,cvcvcvs:f,isGenerating:r,handleGenerate:async w=>{const{customPrefix:C,customSuffix:j,selectedPrefixes:S,selectedSuffixes:N,filters:D,selectedTLD:R,generationMode:$,atomCount:V}=w;x(D),l(R),g(!0);try{let T=[];if($==="atomOnly"){const k=[],P=V||100;for(let F=0;F<P;F++){const L=S[Math.floor(Math.random()*S.length)],A=N[Math.floor(Math.random()*N.length)],H=`${L}${A}.com`;k.push(H)}T=k.map((F,L)=>({id:`atom-${L}`,domain:F,status:"available",isAtom:!0})),q.success("Atom Premium domains generated!",{description:`Generated ${T.length} premium atomic combinations.`})}else{const k=ee(n),P=ve(S,N,C,j,D,R,k);t&&(C||j)&&await ys(C,j,t.id),P.toast&&q.success(P.toast.title),T=P.domains.map((F,L)=>({id:`domain-${L}`,domain:F,status:"available"})),T.length>0&&q.success("Domains generated!",{description:`Generated ${T.length} unique domain combinations.`})}i(T),T.length>0&&c()}catch(T){q.error("Generation failed",{description:T.message})}finally{g(!1)}},handleTryMyLuck:async w=>{g(!0);try{if(w&&w.length>=3){console.log("Generating with selected categories:",w);const C=w.slice(0,3),j=async(k,P)=>{try{console.log(`Fetching ${P} words for category: ${k}`);const{data:F,error:L}=await _.from("words").select("word").eq("kind",P).eq("category",k).eq("is_plural",!1).limit(50);if(L)throw L;const A=(F==null?void 0:F.map(H=>H.word))||[];return console.log(`Found ${A.length} ${P} words for ${k}:`,A.slice(0,5)),A}catch(F){return console.error(`Error fetching ${P} words for category ${k}:`,F),[]}},S=[],N=[];for(const k of C){const[P,F]=await Promise.all([j(k,"prefix"),j(k,"suffix")]);S.push(...P),N.push(...F)}if(console.log(`Total words found - Prefixes: ${S.length}, Suffixes: ${N.length}`),S.length===0&&N.length===0){const P=we(500).map((F,L)=>({id:`luck-${L}`,domain:F,status:"available"}));i(P),c(),q.error("No words found in selected categories, generated random names instead!",{description:`Categories: ${C.join(", ")}`});return}const D=S.length>0?S:N,R=N.length>0?N:S;console.log(`Using for generation - Prefixes: ${D.length}, Suffixes: ${R.length}`);const $=ee(n),T=ve(D,R,"","",b,p,$).domains.map((k,P)=>({id:`luck-${P}`,domain:k,status:"available"}));i(T),c(),q.success(`Generated ${T.length} names from categories: ${C.join(", ")}!`,{description:`Using ${D.length} prefixes and ${R.length} suffixes from your lucky combo.`})}else{const C=ee(n),S=we(C).map((N,D)=>({id:`luck-${D}`,domain:N,status:"available"}));i(S),c(),q.success(`Generated ${S.length} random names!`,{description:"Lucky you! Check out these unique combinations."})}}catch(C){console.error("Generation error:",C),q.error("Generation failed",{description:C.message})}finally{g(!1)}},handleGenerate3Brandables:async w=>{const C=(w==null?void 0:w.selectedTLD)||p||".com",j=ws([],[],{},C);d(j),q.success("3 brandable names generated!",{description:"Fresh algorithmic brand name ideas ready for you."})},handleGenerate3CVCVCV:async()=>{const w=bs();h(w),q.success("3 CVCVCV domains generated!")}}},Ce=[{id:"welcome",title:"Welcome to Domain Generation!",content:"This tour will show you how to generate unique domain combinations using our powerful tools. Let's get started!"}
12,{id:"word-categories",title:"Select Word Categories",content:"Choose from over 20 categories like Tech, Business, Health, etc. Each category contains curated words optimized for domain generation.",target:'[data-tour="word-categories"]'},{id:"custom-words",title:"Add Custom Words",content:"Add your own custom prefixes and suffixes to create truly unique combinations that reflect your brand or idea.",target:'[data-tour="custom-words"]'},{id:"filters",title:"Apply Smart Filters",content:"Use filters to control domain length, avoid confusing characters, and ensure your domains are brandable and memorable.",target:'[data-tour="filters"]'},{id:"tld-selection",title:"Choose Your TLD",content:"Select from popular TLDs like .com, .io, .app, etc. Each TLD serves different purposes and audiences.",target:'[data-tour="tld-picker"]'},{id:"generate-button",title:"Generate Domains",content:'Click "Generate Combinations" to create up to 500 unique domain suggestions based on your selections.',target:'[data-tour="generate-button"]'},{id:"try-my-luck",title:"Spin The Wheel Feature",content:'Feeling adventurous? Use "Spin The Wheel" to generate domains from 3 random categories for unexpected inspiration!',target:'[data-tour="try-my-luck"]'},{id:"brandables",title:"Generate Brandables",content:"Create algorithmic brandable names that are perfect for startups and new businesses. These are completely unique!",target:'[data-tour="brandables"]'}],X={bg:"#FAF9F5",surface:"#FFFFFF",ink:"#1A1A1A",inkMuted:"#6B6B68",accent:"#2563EB",border:"#E8E5DD",borderStrong:"#D8D3C5"},Rs=()=>{const t=Re(),{toast:n}=Z(),{user:a}=Fe(),{favorites:i,handleSaveFavorite:s,handleRemoveFavorite:d}=wt(a),f=ms("domain-generation",Ce),h=De(a),{domains:r,brandables:g,cvcvcvs:b,isGenerating:x,handleGenerate:p,handleTryMyLuck:l,handleGenerate3Brandables:c,handleGenerate3CVCVCV:u}=vs({user:a,userProfile:h.userProfile}),[o,m]=y.useState(!1),[v,w]=y.useState(null),[C,j]=y.useState({}),[S,N]=y.useState({current_count:0,remaining_count:3}),[D,R]=y.useState(!1);y.useEffect(()=>{document.title="Name Generator - GoExpired.com"},[]),y.useEffect(()=>{a!=null&&a.id&&($(a.id),V(a.id))},[a==null?void 0:a.id]);const $=async k=>{try{const{data:P,error:F}=await _.from("user_appraisal_history").select("domain, appraisal_value, appraisal_source").eq("user_id",k);if(F)return;if(P&&P.length>0){const L={};P.forEach(A=>{L[A.domain.toLowerCase()]={value:A.appraisal_value,source:A.appraisal_source}}),j(L)}}catch(P){console.error(P)}},V=async k=>{try{const{data:P}=await _.from("profiles").select("tier").eq("id",k).single(),F=(P==null?void 0:P.tier)||"free";R(F!=="free");const{data:L}=await _.rpc("get_appraisal_usage",{user_uuid:k});L&&L.length>0&&N(L[0])}catch(P){console.error(P)}},T=async k=>{if(a&&v!==k&&!C[k.toLowerCase()]){if(S.remaining_count===0){n({title:D?"Insufficient tokens":"Daily limit reached",description:D?"You don't have enough tokens to perform this appraisal.":"You've hit your daily limit! Try again tomorrow or upgrade to continue instantly!",variant:"destructive"});return}w(k);try{const{data:P,error:F}=await _.rpc("increment_appraisal_count",{user_uuid:a.id});if(F){n({title:"Error",description:"Failed to process appraisal. Please try again.",variant:"destructive"}),w(null);return}if(P&&P.length>0&&!P[0].is_allowed){n({title:D?"Insufficient tokens":"Daily limit reached",description:D?"You don't have enough tokens to perform this appraisal.":"You've hit your daily limit! Try again tomorrow or upgrade to continue instantly!",variant:"destructive"}),w(null);return}await V(a.id);const L=k.trim().toLowerCase(),{data:A,error:H}=await _.functions.invoke("domain-appraisal",{body:{domain:L}});if(H){n({title:"Error",description:"Failed to get domain valuation. Please try again.",variant:"destructive"}),w(null);return}if(A&&A.value){const U=Number(A.value);if(!isNaN(U)){j(Q=>({...Q,[k.toLowerCase()]:{value:U,source:A.source||"appraisal"}}));try{await _.from("user_appraisal_history").insert({user_id:a.id,domain:k.toLowerCase(),appraisal_value:U,appraisal_source:A.source||"appraisal"})}catch(Q){console.error(Q)}
12n({title:"Appraisal Complete",description:`${k} valued at $${U.toLocaleString()}`})}}}catch(P){console.error(P),n({title:"Error",description:"Failed to process appraisal. Please try again.",variant:"destructive"})}finally{w(null)}}};return e.jsxs("div",{style:{backgroundColor:X.bg,color:X.ink,fontFamily:"'Inter', system-ui, sans-serif"},className:"min-h-screen gx-namegen",children:[e.jsx(yt,{}),e.jsx("main",{children:e.jsxs("section",{className:"max-w-6xl mx-auto px-6 md:px-8 pt-16 md:pt-24 pb-20",children:[e.jsxs("div",{className:"max-w-3xl mb-12",children:[e.jsx("h1",{className:"text-5xl md:text-6xl leading-[1.05] tracking-tight mb-5",style:{fontFamily:"'Cormorant', serif",fontWeight:600},children:"Name Generator."}),e.jsx("p",{className:"text-lg md:text-xl leading-relaxed",style:{color:X.inkMuted,fontFamily:"'Cormorant', serif",fontWeight:500},children:"Generate brandable domain name ideas and find available .com combinations for your next investment."})]}),e.jsx("div",{className:"p-6 md:p-8",style:{backgroundColor:X.surface,border:`1px solid ${X.border}`,borderRadius:"20px"},children:e.jsxs("div",{className:"space-y-8",children:[e.jsx(us,{onGenerate:p,onTryMyLuck:l,onGenerate3Brandables:c,onGenerate3CVCVCV:u,isLoading:x,onGuestGenerate:()=>m(!0)}),g.length>0&&e.jsx(pe,{domains:g,favorites:i,onSaveFavorite:s,onRemoveFavorite:d,title:"Brandable Domains",onAppraiseDomain:T,appraisingDomain:v,domainAppraisals:C}),b.length>0&&e.jsx(pe,{domains:b,favorites:i,onSaveFavorite:s,onRemoveFavorite:d,title:"CVCVCV Domains",onAppraiseDomain:T,appraisingDomain:v,domainAppraisals:C}),e.jsx(hs,{domains:r,favorites:i,onSaveFavorite:s,onRemoveFavorite:d,isLoading:x,onAppraiseDomain:T,appraisingDomain:v,domainAppraisals:C})]})})]})}),e.jsx(vt,{}),e.jsx(gs,{steps:Ce,currentStep:f.currentStep,isVisible:f.isVisible,onNext:f.nextStep,onPrevious:f.previousStep,onSkip:f.skipTour,onComplete:f.completeTour}),e.jsx(Se,{open:o,onOpenChange:m,children:e.jsxs(Ne,{className:"max-w-md",children:[e.jsxs(Ct,{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium mb-3 self-start",style:{backgroundColor:"#EEF2FF",color:X.accent},children:[e.jsx(jt,{className:"w-3.5 h-3.5"}),"Sign up required"]}),e.jsx(St,{className:"text-3xl leading-tight tracking-tight",style:{fontFamily:"Cormorant, serif",fontWeight:600},children:"Create a free account to generate names."}),e.jsx(Nt,{className:"text-base pt-2",style:{color:X.inkMuted},children:"Sign up for a free GoExpired account to start generating domain name combinations - or go GX PRO for unlimited access to filters, super categories and custom prefixes/suffixes."})]}),e.jsxs(Pt,{className:"flex-col sm:flex-row gap-2 sm:gap-2",children:[e.jsx(B,{variant:"outline",onClick:()=>{m(!1),t("/auth")},className:"w-full sm:w-auto",children:"Sign up free"}),e.jsx(B,{onClick:()=>{m(!1),t("/gxpro")},className:"w-full sm:w-auto text-white",style:{backgroundColor:X.accent},children:"Upgrade to GX PRO"})]})]})})]})};export{Rs 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.