@igamingcareer/igaming-components 1.1.13 → 1.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7916,7 +7916,7 @@ The partnership is expected to close in Q3 2025, subject to regulatory approvals
7916
7916
  shadow-sm
7917
7917
  hover:shadow
7918
7918
  hover:bg-card/95
7919
- transition-all`,children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold tracking-tight text-lg",children:s(r)}),e.jsxs("p",{className:"font-semibold tracking-tight text-lg",children:[r.location," • ",n(r)]})]}),t.bookMeetingEnabled&&e.jsx(P,{size:"sm",variant:"accent",children:"Book Meeting"})]},i))})},xF=()=>e.jsx(ve,{value:"insights",className:"mt-0",children:e.jsx(V,{children:e.jsxs($,{className:"py-12 text-center",children:[e.jsx($a,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),e.jsx("h3",{className:"font-semibold mb-2",children:"Premium Insights"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Unlock demand trends, competitor analysis, and intent signals."}),e.jsx(P,{variant:"accent",children:"Upgrade to Access"})]})})}),yF=({companyOverview:t,similarCompanies:a})=>{var s;return e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{className:"text-base",children:"Contact"})}),e.jsxs($,{className:"space-y-3",children:[e.jsxs("a",{href:t.website,target:"_blank",className:"flex items-center gap-2 text-sm text-accent hover:underline",children:[e.jsx(_t,{className:"w-4 h-4"}),t.website.replace(/^https?:\/\//,"")]}),((s=t.socialLinks)==null?void 0:s.linkedin)&&e.jsxs("a",{href:t.socialLinks.linkedin,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(kc,{className:"w-4 h-4"}),"LinkedIn"]})]})]}),e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{className:"text-base",children:"Similar Companies"})}),e.jsx($,{className:"space-y-2",children:a.map((n,r)=>{const i=n.url??(n.slug?`/companies/${n.slug}`:void 0);return i?e.jsx("a",{href:i,className:"flex items-center gap-2 p-2 bg-secondary/50 rounded-lg text-sm text-foreground hover:underline",children:n.name},`${n.name}-${r}`):e.jsx("div",{className:"flex items-center gap-2 p-2 bg-secondary/50 rounded-lg text-sm",children:n.name},`${n.name}-${r}`)})})]})]})},gF=({review:t,onHelpful:a,onShare:s,onReport:n})=>{const r={employee:"Employee",client:"Client",partner:"Partner",competitor:"Industry Peer",other:"Other"};return e.jsx(V,{className:"border-border/50",children:e.jsxs($,{className:"p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-secondary flex items-center justify-center flex-shrink-0",children:e.jsx(os,{className:"w-5 h-5 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm text-foreground",children:t.author.displayName}),t.isVerified&&e.jsx(qe,{className:"w-3.5 h-3.5 text-gaming-success"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.author.relationship&&e.jsx("span",{children:r[t.author.relationship]??t.author.relationship}),t.author.jobTitle&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:t.author.jobTitle})]})]})]})]}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:jC(new Date(t.createdAt),{addSuffix:!0})})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h4",{className:"font-semibold text-foreground",children:t.title}),e.jsx(Yc,{rating:t.rating,size:"sm"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3 leading-relaxed",children:t.body}),(t.pros||t.cons)&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:[t.pros&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-medium text-gaming-success text-xs uppercase tracking-wide",children:"Pros"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t.pros})]}),t.cons&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-medium text-destructive text-xs uppercase tracking-wide",children:"Cons"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t.cons})]})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-3 border-t border-border/50",children:[e.jsxs(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-accent gap-1.5 h-8",onClick:()=>a==null?void 0:a(t.id),children:[e.jsx(Rl,{className:"w-3.5 h-3.5"}),"Useful ",t.helpfulCount>0&&`(${t.helpfulCount})`]}),e.jsxs(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-accent gap-1.5 h-8",onClick:()=>s==null?void 0:s(t.id),children:[e.jsx(rs,{className:"w-3.5 h-3.5"}),"Share"]}),e.jsx(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive gap-1.5 h-8 ml-auto",onClick:()=>n==null?void 0:n(t.id),children:e.jsx(Yo,{className:"w-3.5 h-3.5"})})]})]})})},fF=({summary:t,compact:a=!1})=>{if(t.totalReviews===0)return e.jsx("div",{className:"text-center py-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No reviews yet"})});const s=[5,4,3,2,1];return e.jsxs("div",{className:`flex ${a?"items-center gap-4":"flex-col sm:flex-row gap-6"}`,children:[e.jsxs("div",{className:`text-center ${a?"":"min-w-[100px]"}`,children:[e.jsx("div",{className:"text-3xl font-bold text-foreground",children:t.averageRating}),e.jsx(Yc,{rating:Math.round(t.averageRating),size:"sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[t.totalReviews," review",t.totalReviews!==1?"s":""]})]}),!a&&e.jsx("div",{className:"flex-1 space-y-1.5",children:s.map(n=>{const r=t.ratingDistribution[n]??0,i=t.totalReviews>0?r/t.totalReviews*100:0;return e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-3 text-right text-muted-foreground",children:n}),e.jsx(pa,{value:i,className:"h-2 flex-1"}),e.jsx("span",{className:"w-6 text-muted-foreground",children:r})]},n)})})]})},vF=({companyName:t,companyId:a,companySlug:s,open:n,onOpenChange:r,onSubmit:i})=>{const[l,c]=p.useState(0),[h,d]=p.useState(""),[u,x]=p.useState(""),[y,m]=p.useState(""),[g,f]=p.useState(""),[v,k]=p.useState(""),[M,N]=p.useState(!1),[b,S]=p.useState(!1),L=l>0&&h.trim().length>=5&&u.trim().length>=20&&v,C=()=>{!L||l===0||(i==null||i({companyId:a,companySlug:s,title:h.trim(),body:u.trim(),rating:l,pros:y.trim()||void 0,cons:g.trim()||void 0,relationship:v,isAnonymous:M}),S(!0))},j=()=>{c(0),d(""),x(""),m(""),f(""),k(""),N(!1),S(!1),r(!1)};return e.jsx(tt,{open:n,onOpenChange:j,children:e.jsx(Xe,{className:"sm:max-w-[520px]",children:b?e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-gaming-success/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(lt,{className:"w-8 h-8 text-gaming-success"})}),e.jsx(Se,{children:"Review Submitted!"}),e.jsx(nt,{className:"text-center",children:"Thank you for your review. It will be published after moderation (usually within 24-48 hours)."})]}),e.jsx(et,{children:e.jsx(P,{variant:"accent",onClick:j,className:"w-full",children:"Done"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-accent/20 to-primary/20 flex items-center justify-center mb-2",children:e.jsx(lt,{className:"w-6 h-6 text-accent"})}),e.jsxs(Se,{children:["Review ",t]}),e.jsxs(nt,{children:["Share your experience working with or for ",t,". All reviews are moderated before publishing."]})]}),e.jsxs("div",{className:"space-y-4 py-2 max-h-[60vh] overflow-y-auto",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Overall Rating *"}),e.jsx(Yc,{rating:l,size:"lg",interactive:!0,onRatingChange:w=>c(w)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Your Relationship *"}),e.jsxs(Ze,{value:v,onValueChange:k,children:[e.jsx(Be,{children:e.jsx(Ye,{placeholder:"How do you know this company?"})}),e.jsxs(He,{children:[e.jsx(me,{value:"employee",children:"Current/Former Employee"}),e.jsx(me,{value:"client",children:"Client / Customer"}),e.jsx(me,{value:"partner",children:"Business Partner"}),e.jsx(me,{value:"competitor",children:"Industry Peer"}),e.jsx(me,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Review Title *"}),e.jsx(se,{placeholder:"Summarize your experience in a few words",value:h,onChange:w=>d(w.target.value),maxLength:120})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Your Review * ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(min 20 characters)"})]}),e.jsx(st,{placeholder:"Share details about your experience...",value:u,onChange:w=>x(w.target.value),rows:4,maxLength:2e3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Pros ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"})]}),e.jsx(st,{placeholder:"What did you like?",value:y,onChange:w=>m(w.target.value),rows:2,maxLength:500})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Cons ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"})]}),e.jsx(st,{placeholder:"What could be improved?",value:g,onChange:w=>f(w.target.value),rows:2,maxLength:500})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Post anonymously"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Your name won't be shown publicly"})]}),e.jsx(kt,{checked:M,onCheckedChange:N})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"By submitting, you confirm this review is based on genuine experience and complies with our community guidelines."})]}),e.jsxs(et,{children:[e.jsx(P,{variant:"outline",onClick:j,children:"Cancel"}),e.jsx(P,{variant:"accent",onClick:C,disabled:!L,children:"Submit Review"})]})]})})})},kF=({companyId:t,companySlug:a,companyName:s,reviews:n,summary:r,onLeaveReview:i,onHelpful:l,onReport:c})=>{const[h,d]=p.useState("newest"),[u,x]=p.useState(!1),y=p.useMemo(()=>{const m=[...n];switch(h){case"newest":return m.sort((g,f)=>new Date(f.createdAt).getTime()-new Date(g.createdAt).getTime());case"oldest":return m.sort((g,f)=>new Date(g.createdAt).getTime()-new Date(f.createdAt).getTime());case"highest":return m.sort((g,f)=>f.rating-g.rating);case"lowest":return m.sort((g,f)=>g.rating-f.rating);case"most-helpful":return m.sort((g,f)=>f.helpfulCount-g.helpfulCount);default:return m}},[n,h]);return e.jsxs(ve,{value:"reviews",className:"space-y-6 mt-0",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(oe,{children:"Reviews"}),e.jsxs(P,{variant:"accent",size:"sm",className:"gap-1.5",onClick:()=>x(!0),children:[e.jsx(lt,{className:"w-4 h-4"}),"Add review"]})]})}),e.jsx($,{children:e.jsx(fF,{summary:r})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.length," review",n.length!==1?"s":""]}),e.jsxs(Ze,{value:h,onValueChange:m=>d(m),children:[e.jsx(Be,{className:"w-[180px]",children:e.jsx(Ye,{})}),e.jsxs(He,{children:[e.jsx(me,{value:"newest",children:"Newest reviews"}),e.jsx(me,{value:"oldest",children:"Oldest reviews"}),e.jsx(me,{value:"highest",children:"Highest rated"}),e.jsx(me,{value:"lowest",children:"Lowest rated"}),e.jsx(me,{value:"most-helpful",children:"Most helpful"})]})]})]}),y.length===0?e.jsx(V,{children:e.jsxs($,{className:"py-12 text-center",children:[e.jsx(lt,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-3"}),e.jsx("p",{className:"text-muted-foreground",children:"No reviews yet. Be the first to share your experience!"}),e.jsx(P,{variant:"accent",size:"sm",className:"mt-4",onClick:()=>x(!0),children:"Write a review"})]})}):e.jsx("div",{className:"space-y-4",children:y.map(m=>e.jsx(gF,{review:m,onHelpful:l,onReport:c},m.id))}),e.jsx(vF,{companyName:s,companyId:t,companySlug:a,open:u,onOpenChange:x,onSubmit:i})]})},bF=t=>{var a,s;if(t==null)return"";if(typeof t=="string"&&t.startsWith("http"))return t;if(typeof t=="string"&&t.startsWith("{"))try{const n=JSON.parse(t.replace(/'/g,'"'));return(n==null?void 0:n.url)??""}catch{return""}return typeof t=="object"?(t==null?void 0:t.url)??((s=(a=t==null?void 0:t.formats)==null?void 0:a.thumbnail)==null?void 0:s.url)??"":""},$I=t=>({profileViews30d:(t==null?void 0:t.profile_views_30d)??(t==null?void 0:t.profileViews30d)??0,followsCount:(t==null?void 0:t.follows_count)??(t==null?void 0:t.followsCount)??0,hiringIntensity:(t==null?void 0:t.hiring_intensity)??(t==null?void 0:t.hiringIntensity)??"Low",topSkillsHiring:(t==null?void 0:t.top_skills_hiring)??(t==null?void 0:t.topSkillsHiring)??[],topViewingCountries:(t==null?void 0:t.top_viewing_countries)??(t==null?void 0:t.topViewingCountries)??[],oftenComparedWith:(t==null?void 0:t.often_compared_with)??(t==null?void 0:t.oftenComparedWith)??[],similarCompanies:(t==null?void 0:t.similar_companies)??(t==null?void 0:t.similarCompanies)??[]}),jF=t=>{if(t)return{capabilitiesScore:t.capabilities_score??t.capabilitiesScore??0,credibilityScore:t.credibility_score??t.credibilityScore??0,complianceScore:t.compliance_score??t.complianceScore??0,hiringScore:t.hiring_score??t.hiringScore??0,overallScore:t.overall_score??t.overallScore??0,detectedBusinessModel:t.detected_business_model??t.detectedBusinessModel??"",detectedProducts:t.detected_products??t.detectedProducts??[],detectedMarkets:t.detected_markets??t.detectedMarkets??[]}},wF=t=>({id:String(t.id??t.company_id??""),name:t.name??"",slug:t.slug??"",companyType:t.company_type??t.companyType,overview:t.overview?{shortDescription:t.overview.short_description??t.overview.shortDescription,headquarters:t.overview.headquarters,employeeRange:t.overview.employee_range??t.overview.employeeRange}:void 0,isPrimary:t.is_primary??t.isPrimary}),MF=t=>({id:String((t==null?void 0:t.id)??(t==null?void 0:t.group_id)??""),name:(t==null?void 0:t.name)??(t==null?void 0:t.group_name)??"",slug:(t==null?void 0:t.slug)??"",website:(t==null?void 0:t.website)??"",description:(t==null?void 0:t.description)??"",primaryCompanyId:(t==null?void 0:t.primary_company_id)??(t==null?void 0:t.primaryCompanyId)??"",companies:Array.isArray(t==null?void 0:t.companies)?t.companies.map(wF):[],intelligenceProfile:$I((t==null?void 0:t.intelligence_profile)??(t==null?void 0:t.intelligenceProfile))}),NF=t=>{var a,s;return{shortDescription:(t==null?void 0:t.shortDescription)??(t==null?void 0:t.short_description)??"",longDescription:(t==null?void 0:t.longDescription)??(t==null?void 0:t.long_description),foundedYear:typeof(t==null?void 0:t.foundedYear)=="number"?t.foundedYear:0,headquarters:{city:((a=t==null?void 0:t.headquarters)==null?void 0:a.city)??"",country:((s=t==null?void 0:t.headquarters)==null?void 0:s.country)??""},officeLocations:t==null?void 0:t.officeLocations,employeeRange:(t==null?void 0:t.employeeRange)??(t==null?void 0:t.employee_range)??"",publicCompany:t==null?void 0:t.publicCompany,stockTicker:t==null?void 0:t.stockTicker,website:(t==null?void 0:t.website)??"",socialLinks:t==null?void 0:t.socialLinks}},CF=t=>({searchImpressions:(t==null?void 0:t.searchImpressions)??0,profileClicks:(t==null?void 0:t.profileClicks)??0,externalClicks:(t==null?void 0:t.externalClicks)??0}),SF=t=>{var a,s,n;return{...t,overview:NF(t.overview),logo:bF(t.logo),jobs:LF(t.jobs),group:MF(t.group),groupId:t.groupId??t.group_id??((a=t.group)==null?void 0:a.id),groupName:t.groupName??t.group_name??((s=t.group)==null?void 0:s.name),groupSlug:t.group_slug??t.groupSlug??((n=t.group)==null?void 0:n.slug),signalsAndInsights:$I(t.signalsAndInsights??t.signals_and_insights??t.signalsAndInsights)??t.signalsAndInsights,visibilityMetrics:CF(t.visibilityMetrics),intelligenceProfile:jF(t.intelligence_profile??t.intelligenceProfile),classification:IF(t.classification)}},LF=t=>({openRoles:Array.isArray(t==null?void 0:t.openRoles)||typeof(t==null?void 0:t.openRoles)=="number"?t.openRoles:[],departmentsHiring:Array.isArray(t==null?void 0:t.departmentsHiring)?t.departmentsHiring:[],locationsHiring:Array.isArray(t==null?void 0:t.locationsHiring)?t.locationsHiring:[],remotePolicy:(t==null?void 0:t.remotePolicy)??""}),IF=t=>({businessModel:(t==null?void 0:t.businessModel)??(t==null?void 0:t.business_model)??"",verticals:Array.isArray(t==null?void 0:t.verticals)?t.verticals:[],productCategories:Array.isArray(t==null?void 0:t.productCategories)?t.productCategories:[],tags:((t==null?void 0:t.tags)??[]).map(a=>typeof a=="string"?a:a.title??a.tag??"")}),AF=t=>({count:(t==null?void 0:t.count)??0,page:(t==null?void 0:t.page)??1,pageSize:(t==null?void 0:t.page_size)??(t==null?void 0:t.pageSize)??0,totalPages:(t==null?void 0:t.total_pages)??(t==null?void 0:t.totalPages)??1,results:Array.isArray(t==null?void 0:t.results)?t.results.map(SF):[],filterOptions:(t==null?void 0:t.filter_options)??(t==null?void 0:t.filterOptions)}),PF=t=>{if(typeof t=="string")return t;const a=t.city??t.cities??t.location,s=t.country;return`${a??"Remote"}, ${s??"Global"}`},TF=[{name:"Casino Games (Slots & RNG)",category:"Game Content",description:"RNG-based casino games including slots and table games.",keywords:["slot","rng","casino game","table game","jackpot","buy bonus"],negativeKeywords:["live casino games","live casino"],priority:10},{name:"Live Casino Games",category:"Live Casino",description:"Live dealer games streamed from professional studios.",keywords:["live casino games","live dealer games","roulette games","live roulette","sic-bo","presenter"],negativeKeywords:["real-time reporting"],priority:10},{name:"iGaming Platform / PAM",category:"Platform",description:"Core iGaming platform including player accounts, wallet, and cashier.",keywords:["pam","aggregation platform","cashier","player account"],negativeKeywords:[],priority:10},{name:"Game Aggregation",category:"Aggregation",description:"Single API access to multiple game providers.",keywords:["aggregation","aggregator","single api","content hub"],negativeKeywords:[],priority:10},{name:"Bonus & Promotions Platform",category:"CRM & Engagement",description:"Bonus management, promotions, and player engagement tools.",keywords:["bonus tools","promotional tools","free spins tools","tournament","leaderboard","rewards tools","bonus features","bonus platform"],negativeKeywords:[],priority:10},{name:"Back Office & Analytics",category:"Operations",description:"Reporting, dashboards, and performance analytics.",keywords:["back office","real-time reporting","analytics","easy-to-use tools","insights"],negativeKeywords:[],priority:10},{name:"Live Casino Infrastructure",category:"Technology",description:"Hardware, streaming, and infrastructure for live casino operations.",keywords:["streaming","video streaming","Live Casino studio","professional game hosts"],negativeKeywords:[],priority:10},{name:"Payments & Payouts",category:"Payments",description:"Payment processing, deposits, and withdrawals.",keywords:["Payment processing","psp","payout","withdrawal","deposit"],negativeKeywords:[],priority:10},{name:"Compliance & Risk",category:"Compliance",description:"KYC, AML, fraud prevention, and responsible gaming.",keywords:["kyc detection","aml detection","compliance tools","fraud detection","fraud prevention","responsible gaming tools"],negativeKeywords:[],priority:10}];function RF(t,a){var i;const s=a.toLowerCase();return!(!t.keywords.some(l=>s.includes(l))||((i=t.negativeKeywords)==null?void 0:i.some(l=>s.includes(l))))}function DF(t){return t!==null}const _F=t=>TF.map(a=>{const s=t.filter(n=>RF(a,n));return s.length===0?null:{name:a.name,category:a.category,description:a.description,keyDifferentiators:Array.from(new Set(s)),source:"derived",confidence:Math.min(1,s.length/5),priority:a.priority}}).filter(DF).sort((a,s)=>s.priority-a.priority),zF=(t,a)=>Array.isArray(t)&&t.length>0?t:a.map(s=>({name:s})),qF=({company:t,jobs:a,news:s,events:n,showReviews:r=!1,reviews:i,followLoading:l=!1,followDisabled:c=!1,onToggleFollow:h,onFollowAction:d,saveLoading:u=!1,saveDisabled:x=!1,onToggleSave:y,onSaveAction:m,canClaim:g,onClaimSubmit:f,claimPrefill:v,onBack:k,activeTab:M,tabPaths:N,onTabChange:b,similarCompanies:S})=>{var le,te,z,U,H,de,G,ge;const[L,C]=p.useState(!1),[j,w]=p.useState(M??"overview");if(p.useEffect(()=>{M&&w(M)},[M]),!t)return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(Me,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Company Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The company you're looking for doesn't exist."}),e.jsx("a",{href:"/companies",children:e.jsx(P,{variant:"accent",children:"Browse Directory"})})]})});const I=((te=(le=t.webIntelligence)==null?void 0:le.menus.primary_nav_details)==null?void 0:te.flatMap(je=>je.key_points))??[],T=t.trustAndCompliance.licenses.length+t.trustAndCompliance.certifications.length+t.trustAndCompliance.awards.length,A=t.signalsAndInsights,R=zF(S,A.similarCompanies),D=a??[],q=s??[],E=n??[],F=i??[],Z=r&&Array.isArray(i),Y=F.reduce((je,pt)=>(je.totalReviews+=1,je.ratingDistribution[pt.rating]+=1,je.averageRating+=pt.rating,je),{averageRating:0,totalReviews:0,ratingDistribution:{1:0,2:0,3:0,4:0,5:0}});Y.totalReviews>0&&(Y.averageRating=Math.round(Y.averageRating/Y.totalReviews*10)/10);const W=D.length>0?D.length:Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.length:t.jobs.openRoles,ee=((z=t.group)==null?void 0:z.name)??t.groupName??t.group_name??null,ne=((U=t.group)==null?void 0:U.slug)??t.groupSlug??t.group_slug??((H=t.group)==null?void 0:H.id)??t.groupId??t.group_id??void 0,K=_F(I),ae=[...t.productsAndServices??[],...K??[]],O=[{value:"overview",label:"Overview",icon:Ga},{value:"products",label:"Products",icon:Ll},{value:"trust",label:"Trust",icon:is},{value:"people",label:"People",icon:mn},{value:"jobs",label:"Jobs",icon:be},{value:"news",label:"News",icon:Ra},{value:"events",label:"Events",icon:Pa},...Z?[{value:"reviews",label:"Reviews",icon:lt}]:[],{value:"insights",label:"Insights",icon:$a,disabled:!0}],Q=je=>{const pt=je;M||w(pt),b==null||b({tab:pt,path:N==null?void 0:N[pt]})};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(GI,{companyName:t.name,companyType:t.companyType,overview:t.overview,classification:t.classification,companyId:t.id,companySlug:t.slug,groupSlug:ne,groupLabel:ee??"Gaming",signalsAndInsights:t.signalsAndInsights,claimedStatus:t.claimedStatus,isFollowing:t.isFollowing,isSaved:t.isSaved,openRolesCount:W,trustScore:T,onBack:k,saveDisabled:x,saveLoading:u,canClaim:g,onToggleFollow:h,onFollowAction:d,onToggleSave:y,onSaveAction:m,followLoading:l,followDisabled:c,onClaimClick:()=>C(!0)}),e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs(ls,{value:M??j,onValueChange:Q,className:"space-y-6",children:[e.jsx(UI,{items:O}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(oF,{overview:t.overview,classification:t.classification,officeLocations:t.overview.officeLocations??[],formatOfficeLocation:PF}),e.jsx(lF,{products:ae}),e.jsx(dF,{companyTrustData:t.trustAndCompliance,credibilityEvidence:(ge=(G=(de=t.webIntelligence)==null?void 0:de.signals)==null?void 0:G.evidence)==null?void 0:ge.credibility}),e.jsx(hF,{members:t.people.members}),e.jsx(uF,{company:t,jobListings:D,openRolesCount:W}),e.jsx(mF,{companyNews:t.newsAndMedia,newsArticles:q}),e.jsx(pF,{companyEvents:t.events,conferenceEvents:E}),Z&&e.jsx(kF,{companyId:t.id,companySlug:t.slug,companyName:t.name,reviews:F,summary:Y}),e.jsx(xF,{})]}),e.jsx(yF,{companyOverview:t.overview,similarCompanies:R})]})]})})}),e.jsx(rF,{company:t,open:L,onOpenChange:C,onClaimSubmit:f,claimPrefill:v})]})},FF=({group:t})=>{var n,r;if(!t)return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(Me,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Group Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The group you're looking for doesn't exist."}),e.jsx("a",{href:"/companies",children:e.jsx(P,{variant:"accent",children:"Browse Companies"})})]})});const a=t.intelligenceProfile,s=((n=t.companies)==null?void 0:n.length)??0;return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("section",{className:"bg-gradient-to-br from-primary via-primary to-primary-variant py-8",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("a",{href:"/companies",className:"inline-flex items-center text-primary-foreground/70 hover:text-primary-foreground mb-6 text-sm",children:[e.jsx(La,{className:"w-4 h-4 mr-1"})," Back to Directory"]}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-white/10 backdrop-blur flex items-center justify-center flex-shrink-0",children:e.jsx(Me,{className:"w-10 h-10 text-primary-foreground"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-primary-foreground",children:t.name}),e.jsx(_,{className:"bg-white/10 text-primary-foreground border-white/20",children:"Company Group"})]}),t.description&&e.jsx("p",{className:"text-primary-foreground/80 text-sm mb-4 max-w-2xl",children:t.description}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.website&&e.jsx("a",{href:t.website,target:"_blank",rel:"noreferrer",children:e.jsxs(P,{variant:"outline",className:"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10",children:[e.jsx(_t,{className:"w-4 h-4 mr-2"})," Visit Website"]})})})]}),a&&e.jsxs("div",{className:"flex gap-4 md:gap-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-primary-foreground",children:s}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Member Companies"})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-primary-foreground",children:[(a.profileViews30d/1e3).toFixed(1),"k"]}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Views/30d"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-primary-foreground",children:a.followsCount.toLocaleString()}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Followers"})]})]})]})]})}),e.jsx("section",{className:"py-8",children:e.jsxs("div",{className:"container mx-auto px-4 space-y-6",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Group Overview"})}),e.jsxs($,{className:"space-y-4",children:[t.website&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-accent",children:[e.jsx(_t,{className:"w-4 h-4"}),e.jsx("a",{href:t.website,target:"_blank",rel:"noreferrer",className:"hover:underline",children:t.website.replace(/^https?:\/\//,"")})]}),t.description?e.jsx("p",{className:"text-muted-foreground",children:t.description}):e.jsx("p",{className:"text-muted-foreground",children:"No group description available yet."})]})]}),e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Member Companies"})}),e.jsxs($,{className:"space-y-3",children:[s===0&&e.jsx("p",{className:"text-muted-foreground",children:"No member companies listed."}),(r=t.companies)==null?void 0:r.map(i=>{var c,h,d;const l=i.isPrimary||i.id===t.primaryCompanyId;return e.jsxs("div",{className:`flex flex-col md:flex-row md:items-center md:justify-between gap-3 rounded-lg border p-4 ${l?"border-accent/40 bg-accent/5":"border-border"}`,children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:`/companies/${i.slug}`,className:"font-semibold hover:text-accent",children:i.name}),l&&e.jsx(_,{className:"bg-accent/10 text-accent border-accent/20",children:"Primary"})]}),((c=i.overview)==null?void 0:c.shortDescription)&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:i.overview.shortDescription})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[((h=i.overview)==null?void 0:h.headquarters)&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Me,{className:"w-4 h-4"}),i.overview.headquarters.city,", ",i.overview.headquarters.country]}),((d=i.overview)==null?void 0:d.employeeRange)&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(De,{className:"w-4 h-4"}),i.overview.employeeRange]})]})]},i.id)})]})]}),a&&e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Group Intelligence"})}),e.jsxs($,{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(We,{className:"w-4 h-4"})," Followers"]}),e.jsx("div",{className:"text-2xl font-semibold mt-2",children:a.followsCount.toLocaleString()})]}),e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Ve,{className:"w-4 h-4"})," Hiring Intensity"]}),e.jsx("div",{className:"text-2xl font-semibold mt-2",children:a.hiringIntensity})]}),e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(De,{className:"w-4 h-4"})," Top Viewing Countries"]}),e.jsx("div",{className:"text-sm font-medium mt-2",children:a.topViewingCountries.join(", ")||"No data"})]})]})]})]})})]})},EF=(t,a)=>{const{buildUrl:s,initialData:n}=a,[r,i]=p.useState(n??null),[l,c]=p.useState(!n),h=p.useMemo(()=>s(t),[s,t]);return p.useEffect(()=>{let d=!1;return c(!0),fetch(h).then(u=>{if(!u.ok)throw new Error(`Failed to load companies: ${u.status}`);return u.json()}).then(u=>{d||i(AF(u))}).catch(u=>{console.error(u)}).finally(()=>{d||c(!1)}),()=>{d=!0}},[h]),{data:r,loading:l}},V7={query:"",filters:{},sort:"popularity_desc",page:1,pageSize:50,scope:"company"},Yt=(t,a)=>{var s;return((s=t.get(a))==null?void 0:s.split(",").filter(Boolean))??[]},L9=(t,a)=>{const s=Number(t);return Number.isFinite(s)&&s>0?s:a},OF=t=>{var s,n,r,i,l,c,h;const a=new URLSearchParams;return t.query&&a.set("query",t.query),t.sort&&a.set("sort",t.sort),t.scope&&t.scope!=="company"&&a.set("scope",t.scope),t.segment&&a.set("segment",t.segment),t.subcategory&&a.set("subcategory",t.subcategory),t.region&&a.set("region",t.region),a.set("page",String(t.page)),a.set("pageSize",String(t.pageSize)),t.filters.companyType&&a.set("filters[companyType]",t.filters.companyType),(s=t.filters.country)!=null&&s.length&&a.set("filters[country]",t.filters.country.join(",")),(n=t.filters.products)!=null&&n.length&&a.set("filters[products]",t.filters.products.join(",")),(r=t.filters.employees)!=null&&r.length&&a.set("filters[employees]",t.filters.employees.join(",")),(i=t.filters.verticals)!=null&&i.length&&a.set("filters[verticals]",t.filters.verticals.join(",")),(l=t.filters.productCategories)!=null&&l.length&&a.set("filters[productCategories]",t.filters.productCategories.join(",")),(c=t.filters.openRoles)!=null&&c.length&&a.set("filters[openRoles]",t.filters.openRoles.join(",")),(h=t.filters.yearsActive)!=null&&h.length&&a.set("filters[yearsActive]",t.filters.yearsActive.join(",")),t.filters.hiringNow&&a.set("filters[hiringNow]","true"),t.filters.claimedOnly&&a.set("filters[claimedOnly]","true"),t.filters.hasLicenses&&a.set("filters[hasLicenses]","true"),t.filters.hasAwards&&a.set("filters[hasAwards]","true"),a.toString()},BF=(t,a=V7)=>{const s=new URLSearchParams(t),n=s.get("scope"),r=n==="group"||n==="company"?n:a.scope,i=s.get("query")??s.get("search")??a.query??"",l=s.get("pageSize")??s.get("page_size");return{...a,query:i,sort:s.get("sort")??a.sort,page:L9(s.get("page"),a.page),pageSize:L9(l,a.pageSize),scope:r,segment:s.get("segment")??a.segment,subcategory:s.get("subcategory")??a.subcategory,region:s.get("region")??a.region,filters:{companyType:s.get("filters[companyType]")??s.get("companyType")??a.filters.companyType,country:Yt(s,"filters[country]").concat(Yt(s,"country")),products:Yt(s,"filters[products]").concat(Yt(s,"products")),employees:Yt(s,"filters[employees]").concat(Yt(s,"employees")).concat(Yt(s,"employeeRanges")),verticals:Yt(s,"filters[verticals]").concat(Yt(s,"verticals")),productCategories:Yt(s,"filters[productCategories]").concat(Yt(s,"productCategories")),openRoles:Yt(s,"filters[openRoles]").concat(Yt(s,"openRoles")),yearsActive:Yt(s,"filters[yearsActive]").concat(Yt(s,"yearsActive")),hiringNow:["true","1","yes"].includes(s.get("filters[hiringNow]")??s.get("hiringNow")??""),claimedOnly:["true","1","yes"].includes(s.get("filters[claimedOnly]")??s.get("claimedOnly")??""),hasLicenses:["true","1","yes"].includes(s.get("filters[hasLicenses]")??s.get("hasLicenses")??""),hasAwards:["true","1","yes"].includes(s.get("filters[hasAwards]")??s.get("hasAwards")??"")}}},HF=t=>({...EI,search:t.query??"",companyType:t.filters.companyType??"",verticals:t.filters.verticals??[],productCategories:t.filters.productCategories??[],employeeRanges:t.filters.employees??[],products:t.filters.products??[],openRolesRanges:t.filters.openRoles??[],yearsActiveRanges:t.filters.yearsActive??[],hiringNow:t.filters.hiringNow??!1,scope:t.scope,claimedOnly:t.filters.claimedOnly??!1,hasLicenses:t.filters.hasLicenses??!1,hasAwards:t.filters.hasAwards??!1}),VF=t=>({companyType:t.companyType||void 0,verticals:t.verticals.length?t.verticals:void 0,productCategories:t.productCategories.length?t.productCategories:void 0,employees:t.employeeRanges.length?t.employeeRanges:void 0,products:t.products.length?t.products:void 0,openRoles:t.openRolesRanges.length?t.openRolesRanges:void 0,yearsActive:t.yearsActiveRanges.length?t.yearsActiveRanges:void 0,hiringNow:t.hiringNow||void 0,claimedOnly:t.claimedOnly||void 0,hasLicenses:t.hasLicenses||void 0,hasAwards:t.hasAwards||void 0}),GF={companyTypes:[],verticals:[],productCategories:[],employeeRanges:[],products:[],openRolesRanges:[],yearsActiveRanges:[]},UF=[{value:"popularity",label:"Most Active"},{value:"name_asc",label:"Name (A-Z)"},{value:"name_desc",label:"Name (Z-A)"},{value:"employees",label:"Company Size"}],$F=4,WF=({initialData:t,initialFilterOptions:a,buildUrl:s,initialQuery:n,maxCompare:r=$F,sortOptions:i=UF,followDisabled:l=!1,followLoading:c=!1,onToggleFollow:h,onFollowAction:d,saveDisabled:u=!1,saveLoading:x=!1,onToggleSave:y,onSaveAction:m})=>{const[g,f]=p.useState(()=>n||(typeof window>"u"?V7:BF(window.location.search,V7))),[v,k]=p.useState("list"),[M,N]=p.useState(a),{data:b,loading:S}=EF(g,{buildUrl:s,initialData:t}),L=b??t,C=S&&!b,j=p.useMemo(()=>HF(g),[g]);p.useEffect(()=>{if(typeof window>"u")return;const D=OF(g),q=D?`${window.location.pathname}?${D}`:window.location.pathname;window.history.replaceState(null,"",q)},[g]),p.useEffect(()=>{b!=null&&b.filterOptions&&N({...GF,...b.filterOptions})},[b]);const w=D=>{f(q=>({...q,query:D.search,scope:D.scope,filters:VF(D),page:1}))},I=()=>{w(EI)},T=D=>{f(q=>({...q,page:D}))},A=D=>{f(q=>({...q,pageSize:D,page:1}))},R=()=>{k(D=>D==="grid"?"list":"grid")};return e.jsx(VI,{companies:L.results,loading:C,page:L.page,pageSize:L.pageSize||g.pageSize,totalCount:L.count,totalPages:L.totalPages,onPageChange:T,onPageSizeChange:A,filters:j,filterOptions:M,onFiltersChange:w,onClearFilters:I,viewMode:v,onViewModeChange:R,maxCompare:r,sortOptions:i,followDisabled:l,followLoading:c,onToggleFollow:h,onFollowAction:d,saveDisabled:u,saveLoading:x,onToggleSave:y,onSaveAction:m})},ZF=({isClaimed:t,canClaim:a,onClaimClick:s})=>t||!a?null:e.jsx(P,{type:"button",variant:"ghost",className:"text-primary-foreground",onClick:s,children:"Claim this company"});function YF({title:t,value:a,description:s,icon:n,trend:r}){return e.jsxs(V,{children:[e.jsxs(re,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(oe,{className:"text-sm font-medium",children:t}),e.jsx(n,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs($,{children:[e.jsx("div",{className:"text-2xl font-bold",children:a}),s&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s}),r&&e.jsxs("p",{className:`text-xs mt-1 ${r.isPositive?"text-green-600":"text-red-600"}`,children:[r.isPositive?"+":"-",r.value," from last month"]})]})]})}function JF({stats:t}){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:t.map((a,s)=>e.jsx(YF,{...a},s))})}const XF=["Sarah","Michael","Emma","James","Olivia","William","Sophia","Robert","Isabella","David","Mia","John","Charlotte","Daniel","Amelia"],KF=["Johnson","Smith","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez","Hernandez","Lopez","Wilson","Anderson","Thomas"],QF=["Malta","London, UK","Stockholm, Sweden","Madrid, Spain","Lisbon, Portugal","Remote","Berlin, Germany","Tallinn, Estonia","Athens, Greece"],eE=["Retention Manager","CRM Specialist","Senior Game Designer","Payments Risk Analyst","Compliance Officer","Affiliate Manager","Product Owner","VIP Support Lead","UX Researcher","Data Analyst"],I9=["Senior Backend Engineer","Game Producer","QA Lead","CRM Manager","Compliance Analyst","Fraud Specialist","Payments Manager","BI Analyst","VIP Account Manager"],u7=["Lifecycle marketing","Player engagement","Responsible gaming","SQL","Live casino ops","Fraud detection","A/B testing","Segmentation","KYC/AML","Game math","Figma","Analytics"],A9=["MGA","UKGC","DGA","B2B","Curaçao"],tE=["LinkedIn","Referral","Job board","Career page","Recruiter outreach"],aE=["new","reviewed","shortlisted","rejected"],sE=[1,2,3,4,5,null],ra=t=>t[Math.floor(Math.random()*t.length)],m7=t=>{const a=new Date;return a.setDate(a.getDate()-Math.floor(Math.random()*t)),a.toISOString()},nE=(t=32)=>Array.from({length:t}).map((a,s)=>{const n=ra(XF),r=ra(KF),i=ra(sE),l=ra(aE),c=m7(45),h=m7(14);return{id:`candidate-${s+1}`,firstName:n,lastName:r,title:ra(eE),location:ra(QF),appliedDate:c,lastActive:h,source:ra(tE),yearsExperience:Math.floor(Math.random()*8)+2,status:l,rating:i,skills:Array.from(new Set([ra(u7),ra(u7),ra(u7)])).slice(0,3),licenses:Array.from(new Set([ra(A9),ra(A9)])).slice(0,2),appliedJobs:Array.from(new Set([ra(I9),ra(I9)])).slice(0,2),notes:[{id:`note-${s}-1`,author:"Recruiter",note:"Strong iGaming domain knowledge with proven retention wins.",createdAt:m7(20),isInternal:!0}]}}),p7={new:"New",reviewed:"Reviewed",shortlisted:"Shortlisted",rejected:"Rejected"},P9={new:"outline",reviewed:"secondary",shortlisted:"default",rejected:"destructive"},WI=({candidate:t,canEdit:a=!1,onNameClick:s,onStatusChange:n,onRatingChange:r,onAddNote:i})=>{const[l,c]=p.useState(""),[h,d]=p.useState(!0),u=p.useMemo(()=>`${t.firstName} ${t.lastName}`,[t.firstName,t.lastName]),x=p.useMemo(()=>new Date(t.appliedDate).toLocaleDateString(),[t.appliedDate]),y=p.useMemo(()=>new Date(t.lastActive).toLocaleDateString(),[t.lastActive]),m=()=>{!l.trim()||!i||(i(t.id,l.trim(),h),c(""))};return e.jsxs(V,{className:"border-muted/60",children:[e.jsxs(re,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(P,{variant:"link",className:"h-auto p-0 text-lg font-semibold",onClick:()=>s==null?void 0:s(t.id),children:u}),e.jsx(_,{variant:P9[t.status],children:p7[t.status]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Te,{className:"h-4 w-4"}),t.location]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(be,{className:"h-4 w-4"}),t.yearsExperience,"+ yrs"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Pa,{className:"h-4 w-4"}),"Applied ",x]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:items-end",children:[a?e.jsxs(Ze,{value:t.status,onValueChange:g=>n==null?void 0:n(t.id,g),children:[e.jsx(Be,{className:"w-44",children:e.jsx(Ye,{placeholder:"Update status"})}),e.jsx(He,{children:Object.entries(p7).map(([g,f])=>e.jsx(me,{value:g,children:f},g))})]}):e.jsxs(_,{variant:P9[t.status],children:["Status: ",p7[t.status]]}),e.jsxs("div",{className:"flex items-center gap-1",children:[Array.from({length:5}).map((g,f)=>{const v=f+1,k=t.rating!==null&&t.rating>=v;return e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>a&&(r==null?void 0:r(t.id,v)),disabled:!a,children:e.jsx(We,{className:k?"h-4 w-4 text-yellow-500":"h-4 w-4 text-muted-foreground"})},`${t.id}-star-${f}`)}),t.rating===null&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Unrated"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.licenses.map(g=>e.jsx(_,{variant:"secondary",children:g},g)),t.skills.map(g=>e.jsx(_,{variant:"outline",children:g},g))]})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ga,{className:"h-4 w-4"}),"Source: ",t.source]}),e.jsxs("span",{children:["Last active ",y]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold",children:"Applied roles"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.appliedJobs.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No roles attached."}):t.appliedJobs.map(g=>e.jsx(_,{variant:"outline",children:g},g))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold",children:"Notes"}),e.jsx("div",{className:"space-y-2",children:t.notes.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No notes yet."}):t.notes.map(g=>e.jsxs("div",{className:"rounded-lg border px-3 py-2 text-sm",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[g.author," • ",new Date(g.createdAt).toLocaleDateString()]}),g.isInternal&&e.jsx(_,{variant:"outline",children:"Internal"})]}),e.jsx("p",{className:"mt-2",children:g.note})]},g.id))})]}),a&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(st,{value:l,onChange:g=>c(g.target.value),placeholder:"Add a note about this candidate...",rows:3}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Xt,{checked:h,onCheckedChange:g=>d(!!g)}),"Internal note"]}),e.jsx(P,{size:"sm",onClick:m,disabled:!l.trim(),children:"Add note"})]})]})]})]})},rE=[{value:"all",label:"All"},{value:"new",label:"New"},{value:"reviewed",label:"Reviewed"},{value:"shortlisted",label:"Shortlisted"},{value:"rejected",label:"Rejected"}],iE={recent:"Most recent",name:"Name",rating:"Rating"},ZI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState(()=>nE()),[l,c]=p.useState(""),[h,d]=p.useState("all"),[u,x]=p.useState("recent"),[y,m]=p.useState(null),g=p.useMemo(()=>r.reduce((b,S)=>(b[S.status]+=1,b.all+=1,b),{all:0,new:0,reviewed:0,shortlisted:0,rejected:0}),[r]),f=p.useMemo(()=>{const N=l.trim().toLowerCase(),b=C=>N?[`${C.firstName} ${C.lastName}`.toLowerCase(),C.title.toLowerCase(),C.location.toLowerCase(),C.skills.join(" ").toLowerCase()].join(" ").includes(N):!0;return(h==="all"?r:r.filter(C=>C.status===h)).filter(b).sort((C,j)=>{switch(u){case"name":{const w=`${C.lastName} ${C.firstName}`.toLowerCase(),I=`${j.lastName} ${j.firstName}`.toLowerCase();return w.localeCompare(I)}case"rating":{const w=C.rating??0;return(j.rating??0)-w}case"recent":default:return new Date(j.appliedDate).getTime()-new Date(C.appliedDate).getTime()}})},[r,l,u,h]),v=(N,b)=>{i(S=>S.map(L=>L.id===N?{...L,status:b}:L)),a({type:"candidates",payload:{action:"change-status",candidateId:N,status:b}})},k=(N,b)=>{i(S=>S.map(L=>L.id===N?{...L,rating:b}:L)),a({type:"candidates",payload:{action:"rate",candidateId:N,rating:b}})},M=(N,b,S)=>{i(L=>L.map(C=>C.id===N?{...C,notes:[{id:`${N}-${Date.now()}`,author:t.name,note:b,createdAt:new Date().toISOString(),isInternal:S},...C.notes]}:C)),a({type:"candidates",payload:{action:"add-note",candidateId:N,note:b,isInternal:S}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Candidates"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Review applicants and track status updates across your pipeline."}),y&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Selected candidate:"," ",(()=>{const N=r.find(b=>b.id===y);return N?`${N.firstName} ${N.lastName}`:"Unknown"})()]})]}),s&&e.jsx(_,{variant:"secondary",className:"w-fit",children:"Syncing updates..."})]}),e.jsxs(V,{children:[e.jsxs(re,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(oe,{children:"Pipeline overview"}),e.jsx(Ie,{children:"Filter, sort, and review candidate activity."})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:rE.map(N=>e.jsxs(P,{variant:h===N.value?"default":"outline",size:"sm",onClick:()=>d(N.value),children:[N.label,e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:g[N.value]})]},N.value))}),e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsx(se,{placeholder:"Search by name, role, or skill",value:l,onChange:N=>c(N.target.value),className:"md:max-w-sm"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Sort by"}),e.jsxs(Ze,{value:u,onValueChange:N=>x(N),children:[e.jsx(Be,{className:"w-40",children:e.jsx(Ye,{placeholder:"Sort by"})}),e.jsx(He,{children:Object.entries(iE).map(([N,b])=>e.jsx(me,{value:N,children:b},N))})]})]})]})]}),e.jsx($,{className:"space-y-6",children:f.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No candidates match the current filters."}):e.jsx("div",{className:"space-y-6",children:f.map(N=>e.jsx(WI,{candidate:N,canEdit:n,onNameClick:m,onStatusChange:v,onRatingChange:k,onAddNote:M},N.id))})})]})]})},wn=ya.Root,oE=ya.Portal,YI=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Overlay,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a,ref:s}));YI.displayName=ya.Overlay.displayName;const zs=ce.forwardRef(({className:t,...a},s)=>e.jsxs(oE,{children:[e.jsx(YI,{}),e.jsx(ya.Content,{ref:s,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...a})]}));zs.displayName=ya.Content.displayName;const qs=({className:t,...a})=>e.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",t),...a});qs.displayName="AlertDialogHeader";const Fs=({className:t,...a})=>e.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});Fs.displayName="AlertDialogFooter";const Es=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Title,{ref:s,className:ie("text-lg font-semibold",t),...a}));Es.displayName=ya.Title.displayName;const Os=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Description,{ref:s,className:ie("text-sm text-muted-foreground",t),...a}));Os.displayName=ya.Description.displayName;const Cn=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Action,{ref:s,className:ie(J7(),t),...a}));Cn.displayName=ya.Action.displayName;const Bs=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Cancel,{ref:s,className:ie(J7({variant:"outline"}),"mt-2 sm:mt-0",t),...a}));Bs.displayName=ya.Cancel.displayName;const lE=({open:t,onClose:a,onSave:s,existingEvent:n})=>{const[r,i]=p.useState({title:"",date:"",location:"",description:"",url:""});p.useEffect(()=>{i(n?{id:n.id,title:n.title,date:n.date,location:n.location,description:n.description??"",url:n.url??""}:{title:"",date:"",location:"",description:"",url:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`event-${Date.now()}`}),i({title:"",date:"",location:"",description:"",url:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Event":"Add Event"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:r.title,onChange:h=>l("title",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Date"}),e.jsx(se,{type:"date",value:r.date,onChange:h=>l("date",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Location"}),e.jsx(se,{value:r.location,onChange:h=>l("location",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Event URL"}),e.jsx(se,{type:"url",value:r.url,onChange:h=>l("url",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},cE=(t,a)=>"eventName"in t?{id:`event-${a}`,title:t.eventName,date:t.date,location:t.location,description:"",url:""}:{id:`event-${a}`,title:t.name,date:t.startDate,location:t.location,description:"",url:""},JI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({events:t.events.upcomingEvents.map(cE)}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{a({type:"events",payload:{events:r.events}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({events:v.events.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.events.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.events];return N[M]={...N[M],...v},{events:N}}return{events:[...k.events,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Events"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Keep your event calendar current."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add event"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Upcoming events"}),e.jsx(Ie,{children:"Highlight events, meetups, and conferences."})]}),e.jsx($,{className:"space-y-4",children:r.events.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No events scheduled yet."}):e.jsx("div",{className:"space-y-4",children:r.events.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:v.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[v.date||"Date TBD"," • ",v.location||"Location TBD"]}),v.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:v.description})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(lE,{open:l,onClose:()=>c(!1),onSave:f,existingEvent:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this event?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the event from the calendar."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},dE=({open:t,onClose:a,onSave:s,existingJob:n})=>{const[r,i]=p.useState({title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"});p.useEffect(()=>{i(n?{id:n.id,title:n.title,location:n.location,employmentType:n.employmentType,description:n.description??"",requirements:n.requirements??"",status:n.status??"Draft"}:{title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`job-${Date.now()}`,status:r.status??"Draft"}),i({title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Job":"Add Job"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:r.title,onChange:h=>l("title",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Location"}),e.jsx(se,{value:r.location,onChange:h=>l("location",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Employment Type"}),e.jsx(se,{value:r.employmentType,onChange:h=>l("employmentType",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Requirements"}),e.jsx(st,{rows:4,value:r.requirements,onChange:h=>l("requirements",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},XI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const r=Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.map((M,N)=>({id:`job-${N}`,title:M,location:"",employmentType:"",description:"",requirements:"",status:"Published"})):[],[i,l]=p.useState({jobs:r}),[c,h]=p.useState(!1),[d,u]=p.useState(null),[x,y]=p.useState(null),m=()=>{a({type:"jobs",payload:{jobs:i.jobs}})},g=M=>{u(M),h(!0)},f=()=>{x&&(l(M=>({jobs:M.jobs.filter(N=>N.id!==x)})),y(null))},v=M=>{l(N=>{const b=N.jobs.findIndex(S=>S.id===M.id);if(b>=0){const S=[...N.jobs];return S[b]={...S[b],...M},{jobs:S}}return{jobs:[...N.jobs,M]}})},k=M=>{M&&l(N=>({jobs:N.jobs.map(b=>b.id===M?{...b,status:b.status==="Published"?"Draft":"Published"}:b)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Jobs"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Publish and manage open roles."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{u(null),h(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add job"]}),n&&e.jsx(P,{onClick:m,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Open roles"}),e.jsx(Ie,{children:"Manage publishing status and job details."})]}),e.jsx($,{className:"space-y-4",children:i.jobs.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No roles added yet."}):e.jsx("div",{className:"space-y-4",children:i.jobs.map(M=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:M.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[M.location||"Location not specified"," • ",M.employmentType||"Type TBD"]}),e.jsx(_,{variant:M.status==="Published"?"default":"secondary",children:M.status??"Draft"})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex flex-wrap gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>k(M.id),children:M.status==="Published"?"Unpublish":"Publish"}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>g(M),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>y(M.id??null),children:"Delete"})]})]})},M.id))})})]}),e.jsx(dE,{open:c,onClose:()=>h(!1),onSave:v,existingJob:d}),e.jsx(wn,{open:!!x,onOpenChange:()=>y(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this job?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the job posting."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:f,children:"Delete"})]})]})})]})},hE=(t,a)=>typeof t=="string"?{id:`news-${a}`,title:t,date:"",excerpt:"",status:"Published",content:"",url:""}:{id:`news-${a}`,title:t.title,date:"",excerpt:t.source,status:"Published",content:"",url:t.url},KI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({news:t.newsAndMedia.pressMentions.map(hE)}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),[y,m]=p.useState({title:"",date:"",excerpt:"",status:"Draft",content:"",url:""});p.useEffect(()=>{m(h?{id:h.id,title:h.title,date:h.date,excerpt:h.excerpt,status:h.status,content:h.content,url:h.url??""}:{title:"",date:"",excerpt:"",status:"Draft",content:"",url:""})},[h,l]);const g=()=>{a({type:"news",payload:{news:r.news}})},f=N=>{d(N),c(!0)},v=()=>{u&&(i(N=>({news:N.news.filter(b=>b.id!==u)})),x(null))},k=()=>{const N={...y,id:(h==null?void 0:h.id)??y.id??`news-${Date.now()}`};i(b=>{const S=b.news.findIndex(L=>L.id===N.id);if(S>=0){const L=[...b.news];return L[S]=N,{news:L}}return{news:[...b.news,N]}}),c(!1),d(null)},M=N=>{N&&i(b=>({news:b.news.map(S=>S.id===N?{...S,status:S.status==="Published"?"Draft":"Published"}:S)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News & Media"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Publish announcements and press coverage."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add article"]}),n&&e.jsx(P,{onClick:g,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Latest updates"}),e.jsx(Ie,{children:"Manage your press mentions and announcements."})]}),e.jsx($,{className:"space-y-4",children:r.news.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No news items yet."}):e.jsx("div",{className:"space-y-4",children:r.news.map(N=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:N.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:N.date||"Date TBD"}),N.excerpt&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:N.excerpt}),e.jsx(_,{variant:N.status==="Published"?"default":"secondary",children:N.status})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex flex-wrap gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>M(N.id),children:N.status==="Published"?"Unpublish":"Publish"}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>f(N),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(N.id??null),children:"Delete"})]})]})},N.id))})})]}),e.jsx(tt,{open:l,onOpenChange:c,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:h?"Edit News":"Add News"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:y.title,onChange:N=>m(b=>({...b,title:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Date"}),e.jsx(se,{type:"date",value:y.date,onChange:N=>m(b=>({...b,date:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Excerpt"}),e.jsx(st,{rows:3,value:y.excerpt,onChange:N=>m(b=>({...b,excerpt:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Content"}),e.jsx(st,{rows:5,value:y.content,onChange:N=>m(b=>({...b,content:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"URL"}),e.jsx(se,{type:"url",value:y.url,onChange:N=>m(b=>({...b,url:N.target.value}))})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:k,children:"Save"})]})]})]})}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this news item?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the news entry."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:v,children:"Delete"})]})]})})]})},uE=["Operator","Platform Provider","Game Provider","Affiliate","Payments","Agency","Other"],mE=["1-10","11-50","51-100","101-200","201-500","501-1000","1000+","5000+"],pE=["Casino","Sportsbook","Poker","Lottery","Bingo","Esports","Fantasy Sports","Live Casino"],QI=["Malta","Gibraltar","UK","Sweden","Cyprus","Isle of Man","Curacao","Poland","Spain","Germany","Netherlands","Italy","Portugal","Estonia","Latvia","Lithuania","Bulgaria","Romania","Ukraine","Serbia","Croatia","Denmark","Finland","Norway","Ireland","Switzerland","Austria","Czech Republic","Slovakia","Hungary","Greece","Belgium","France","Luxembourg","Slovenia","Bosnia and Herzegovina","North Macedonia","Albania","Montenegro","Kosovo","Moldova","Belarus","Georgia","Armenia","Azerbaijan","Kazakhstan","USA","Canada","Brazil","Mexico","Colombia","Argentina","Chile","Peru","Ecuador","Uruguay","Paraguay","Bolivia","Venezuela","Panama","Costa Rica","Guatemala","Honduras","El Salvador","Nicaragua","Dominican Republic","Puerto Rico","Jamaica","Trinidad and Tobago","Philippines","Singapore","Hong Kong","Macau","Australia","New Zealand","India","Japan","South Korea","Taiwan","Thailand","Vietnam","Indonesia","Malaysia","Cambodia","Myanmar","Sri Lanka","Bangladesh","Nepal","United Arab Emirates","Israel","South Africa","Kenya","Nigeria","Ghana","Tanzania","Uganda","Zambia","Zimbabwe","Mozambique","Morocco","Egypt","Tunisia","Senegal","Ivory Coast","Other"],xE=["Valletta","St. Julian's","Sliema","Birkirkara","Msida","Gzira","London","Manchester","Leeds","Birmingham","Edinburgh","Glasgow","Bristol","Liverpool","Sheffield","Newcastle","Nottingham","Cardiff","Belfast","Brighton","Reading","Gibraltar","St. Helier","St. Peter Port","Limassol","Nicosia","Larnaca","Paphos","Stockholm","Gothenburg","Malmö","Copenhagen","Aarhus","Helsinki","Tampere","Turku","Oslo","Bergen","Trondheim","Reykjavik","Tallinn","Tartu","Riga","Vilnius","Kaunas","Sofia","Plovdiv","Bucharest","Cluj-Napoca","Timișoara","Belgrade","Novi Sad","Warsaw","Krakow","Wrocław","Gdańsk","Poznań","Kyiv","Lviv","Kharkiv","Odessa","Prague","Brno","Bratislava","Košice","Budapest","Debrecen","Bucharest","Zagreb","Split","Sarajevo","Skopje","Tirana","Podgorica","Chisinau","Tbilisi","Yerevan","Baku","Almaty","Astana","Madrid","Barcelona","Valencia","Seville","Bilbao","Berlin","Hamburg","Munich","Frankfurt","Cologne","Düsseldorf","Stuttgart","Leipzig","Amsterdam","Rotterdam","The Hague","Eindhoven","Utrecht","Isle of Man","Douglas","Dublin","Cork","Galway","Zurich","Geneva","Bern","Basel","Vienna","Graz","Salzburg","Lisbon","Porto","Rome","Milan","Turin","Naples","Florence","Bologna","Paris","Lyon","Marseille","Brussels","Antwerp","Ghent","Luxembourg City","Athens","Thessaloniki","Las Vegas","New York","Miami","Los Angeles","Chicago","Atlantic City","Philadelphia","Houston","Phoenix","San Francisco","Seattle","Boston","Washington D.C.","Denver","Nashville","Toronto","Vancouver","Montreal","Calgary","Ottawa","Bogota","Medellin","Cali","Sao Paulo","Rio de Janeiro","Brasilia","Belo Horizonte","Buenos Aires","Cordoba","Rosario","Santiago","Lima","Mexico City","Guadalajara","Monterrey","Panama City","San José","Montevideo","Manila","Cebu","Singapore","Hong Kong","Macau","Sydney","Melbourne","Brisbane","Perth","Auckland","Wellington","Tokyo","Osaka","Seoul","Busan","Taipei","Bangkok","Chiang Mai","Ho Chi Minh City","Hanoi","Kuala Lumpur","Jakarta","Bali","Phnom Penh","Mumbai","Delhi","Bengaluru","Hyderabad","Chennai","Colombo","Dhaka","Dubai","Abu Dhabi","Tel Aviv","Jerusalem","Haifa","Cape Town","Johannesburg","Durban","Pretoria","Nairobi","Lagos","Accra","Dar es Salaam","Kampala","Lusaka","Harare","Casablanca","Cairo","Tunis","Dakar","Abidjan"],id=1960,eA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({companyName:t.name,foundedYear:t.overview.foundedYear,website:t.overview.website,employeeRange:t.overview.employeeRange,shortDescription:t.overview.shortDescription,longDescription:t.overview.longDescription??"",headquartersCity:t.overview.headquarters.city,headquartersCountry:t.overview.headquarters.country}),[l,c]=p.useState("idle"),[h,d]=p.useState(""),u=p.useMemo(()=>{const g=new Date().getFullYear();return Array.from({length:g-id+1},(f,v)=>g-v)},[]),x=(g,f)=>{i(v=>({...v,[g]:f}))},y=async g=>{if(!g.trim()){c("idle"),d("");return}let f;try{f=new URL(g)}catch{c("invalid"),d("Please enter a full URL, e.g. https://example.com.");return}c("checking"),d("Checking website availability...");try{const v=`https://r.jina.ai/http://${f.host}${f.pathname}${f.search}`,k=await fetch(v,{method:"GET"});if(k.ok){c("valid"),d("Website is reachable.");return}c("invalid"),d(`Website check failed with status ${k.status}.`),alert(`Invalid website: ${g}. Please verify the URL.`)}catch{c("invalid"),d("Unable to verify website right now."),alert(`Invalid website: ${g}. Please verify the URL.`)}},m=()=>{if(r.foundedYear<id||r.foundedYear>new Date().getFullYear()){alert(`Founded year must be between ${id} and ${new Date().getFullYear()}.`);return}a({type:"overview",payload:r})};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("datalist",{id:"company-overview-country-suggestions",children:QI.map(g=>e.jsx("option",{value:g},g))}),e.jsx("datalist",{id:"company-overview-city-suggestions",children:xE.map(g=>e.jsx("option",{value:g},g))}),e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Company Overview"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your company information"})]}),n&&e.jsx(P,{onClick:m,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Company details"}),e.jsx(Ie,{children:"Keep your profile accurate and up to date."})]}),e.jsxs($,{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"companyName",children:"Company Name"}),n?e.jsx(se,{id:"companyName",value:r.companyName,onChange:g=>x("companyName",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.companyName})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"foundedYear",children:"Founded Year"}),n?e.jsx(se,{id:"foundedYear",type:"number",min:id,max:new Date().getFullYear(),list:"company-overview-founded-year-options",value:r.foundedYear,onChange:g=>x("foundedYear",Number(g.target.value))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.foundedYear}),e.jsx("datalist",{id:"company-overview-founded-year-options",children:u.map(g=>e.jsx("option",{value:g},g))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"website",children:"Website"}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative",children:[e.jsx(se,{id:"website",type:"url",value:r.website,onChange:g=>x("website",g.target.value),onBlur:g=>{y(g.target.value)},className:"pr-9"}),e.jsxs("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center",children:[l==="checking"&&e.jsx($e,{className:"h-4 w-4 animate-spin text-muted-foreground"}),l==="valid"&&e.jsx(qe,{className:"h-4 w-4 text-green-600"}),l==="invalid"&&e.jsx(Na,{className:"h-4 w-4 text-red-600"})]})]}),h&&e.jsx("p",{className:`text-xs ${l==="invalid"?"text-red-600":"text-muted-foreground"}`,children:h})]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.website})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"employeeRange",children:"Employee Range"}),n?e.jsx(se,{id:"employeeRange",list:"company-overview-employee-range-options",value:r.employeeRange,onChange:g=>x("employeeRange",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.employeeRange}),e.jsx("datalist",{id:"company-overview-employee-range-options",children:mE.map(g=>e.jsx("option",{value:g},g))})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(B,{htmlFor:"shortDescription",children:"Short Description"}),n?e.jsx(st,{id:"shortDescription",rows:3,value:r.shortDescription,onChange:g=>x("shortDescription",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.shortDescription})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(B,{htmlFor:"longDescription",children:"Long Description"}),n?e.jsx(st,{id:"longDescription",rows:6,value:r.longDescription,onChange:g=>x("longDescription",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.longDescription})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"headquartersCity",children:"Headquarters City"}),n?e.jsx(se,{id:"headquartersCity",list:"company-overview-city-suggestions",value:r.headquartersCity,onChange:g=>x("headquartersCity",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.headquartersCity})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"headquartersCountry",children:"Headquarters Country"}),n?e.jsx(se,{id:"headquartersCountry",list:"company-overview-country-suggestions",value:r.headquartersCountry,onChange:g=>x("headquartersCountry",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.headquartersCountry})]}),l==="invalid"&&n&&e.jsx("div",{className:"md:col-span-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:e.jsxs("p",{className:"flex items-center gap-2 font-medium",children:[e.jsx(Qt,{className:"h-4 w-4"}),"The entered website appears invalid. Please verify before saving."]})})]})]})]})},yE=({open:t,onClose:a,onSave:s,existingPerson:n})=>{const[r,i]=p.useState({name:"",role:"",linkedIn:"",email:""});p.useEffect(()=>{i(n?{id:n.id,name:n.name,role:n.role,linkedIn:n.linkedIn??"",email:n.email??""}:{name:"",role:"",linkedIn:"",email:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`person-${Date.now()}`}),i({name:"",role:"",linkedIn:"",email:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Team Member":"Add Team Member"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Name"}),e.jsx(se,{value:r.name,onChange:h=>l("name",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Role"}),e.jsx(se,{value:r.role,onChange:h=>l("role",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"LinkedIn"}),e.jsx(se,{value:r.linkedIn,onChange:h=>l("linkedIn",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Email"}),e.jsx(se,{type:"email",value:r.email,onChange:h=>l("email",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},tA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({members:t.people.members.map((v,k)=>({id:`person-${k}`,name:v.name,role:v.title,linkedIn:v.profileUrl??"",email:""}))}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{const v=r.members.map(k=>({name:k.name,title:k.role,profileUrl:k.linkedIn}));a({type:"people",payload:{members:v}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({members:v.members.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.members.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.members];return N[M]={...N[M],...v},{members:N}}return{members:[...k.members,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"People"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your leadership and team members."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add member"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Team directory"}),e.jsx(Ie,{children:"Highlight decision makers and team contacts."})]}),e.jsx($,{className:"space-y-4",children:r.members.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No team members added yet."}):e.jsx("div",{className:"space-y-4",children:r.members.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:v.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:v.role}),v.linkedIn&&e.jsx("a",{href:v.linkedIn,target:"_blank",rel:"noreferrer",className:"text-sm text-primary underline",children:"LinkedIn profile"})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(yE,{open:l,onClose:()=>c(!1),onSave:f,existingPerson:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this team member?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the member from your list."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},gE=({open:t,onClose:a,onSave:s,existingProduct:n})=>{const[r,i]=p.useState({name:"",category:"",description:"",url:""});p.useEffect(()=>{i(n?{id:n.id,name:n.name,category:n.category,description:n.description,url:n.url??""}:{name:"",category:"",description:"",url:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`product-${Date.now()}`}),i({name:"",category:"",description:"",url:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Product":"Add Product"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Name"}),e.jsx(se,{value:r.name,onChange:h=>l("name",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Category"}),e.jsx(se,{value:r.category,onChange:h=>l("category",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"URL"}),e.jsx(se,{type:"url",value:r.url,onChange:h=>l("url",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},aA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({products:t.productsAndServices.map((v,k)=>({id:`product-${k}`,...v}))}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{a({type:"products",payload:{products:r.products}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({products:v.products.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.products.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.products];return N[M]={...N[M],...v},{products:N}}return{products:[...k.products,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Products & Services"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Showcase the offerings that define your company."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add product"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Product catalog"}),e.jsx(Ie,{children:"Update categories, descriptions, and links."})]}),e.jsx($,{className:"space-y-4",children:r.products.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No products added yet."}):e.jsx("div",{className:"space-y-4",children:r.products.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-semibold",children:v.name}),v.category&&e.jsx(_,{variant:"secondary",children:v.category}),v.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:v.description})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(gE,{open:l,onClose:()=>c(!1),onSave:f,existingProduct:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this product?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the product from your catalog."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},sA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const r={visibility:t.claimedStatus==="claimed",notifications:{jobAlerts:!0,newsAlerts:!0,eventAlerts:!1},integrations:{slackEnabled:!1,webhookUrl:""},team:t.people.members.map((g,f)=>({id:`team-${f}`,name:g.name,role:g.title}))},i=t.settings,[l,c]=p.useState({...r,...i,notifications:{...r.notifications,...i==null?void 0:i.notifications},integrations:{...r.integrations,...i==null?void 0:i.integrations},team:(i==null?void 0:i.team)??r.team}),h=()=>{a({type:"settings",payload:l})},d=g=>{c(f=>({...f,notifications:{...f.notifications,[g]:!f.notifications[g]}}))},u=()=>{c(g=>({...g,integrations:{...g.integrations,slackEnabled:!g.integrations.slackEnabled}}))},x=(g,f)=>{c(v=>({...v,team:v.team.map(k=>k.id===g?{...k,role:f}:k)}))},y=()=>{c(g=>({...g,team:[...g.team,{id:`team-${Date.now()}`,name:"New member",role:"Contributor"}]}))},m=g=>{c(f=>({...f,team:f.team.filter(v=>v.id!==g)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Control visibility, notifications, and team roles."})]}),n&&e.jsx(P,{onClick:h,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Visibility & notifications"}),e.jsx(Ie,{children:"Adjust how your company appears and who gets notified."})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Public profile"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Show your company in the directory."})]}),e.jsx(kt,{checked:l.visibility,onCheckedChange:()=>n&&c(g=>({...g,visibility:!g.visibility})),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Job alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Notify recruiters about new applicants."})]}),e.jsx(kt,{checked:l.notifications.jobAlerts,onCheckedChange:()=>n&&d("jobAlerts"),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"News alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Send weekly press mention updates."})]}),e.jsx(kt,{checked:l.notifications.newsAlerts,onCheckedChange:()=>n&&d("newsAlerts"),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Event alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Notify teams about upcoming events."})]}),e.jsx(kt,{checked:l.notifications.eventAlerts,onCheckedChange:()=>n&&d("eventAlerts"),disabled:!n})]})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Integrations"}),e.jsx(Ie,{children:"Connect your workspace tools."})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Slack notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Send updates to a Slack channel."})]}),e.jsx(kt,{checked:l.integrations.slackEnabled,onCheckedChange:()=>n&&u(),disabled:!n})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"webhookUrl",children:"Webhook URL"}),n?e.jsx(se,{id:"webhookUrl",value:l.integrations.webhookUrl,onChange:g=>c(f=>({...f,integrations:{...f.integrations,webhookUrl:g.target.value}}))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:l.integrations.webhookUrl||"No webhook configured"})]})]})]})]}),e.jsxs(V,{children:[e.jsxs(re,{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx(oe,{children:"Team roles"}),e.jsx(Ie,{children:"Assign roles for company administrators."})]}),n&&e.jsxs(P,{variant:"outline",onClick:y,children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add member"]})]}),e.jsx($,{className:"space-y-4",children:l.team.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No team members assigned."}):l.team.map(g=>e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:g.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:g.role})]}),n&&e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(se,{className:"w-48",value:g.role,onChange:f=>x(g.id,f.target.value)}),e.jsx(P,{variant:"ghost",size:"icon",onClick:()=>m(g.id),children:e.jsx(un,{className:"h-4 w-4"})})]})]},g.id))})]})]})},fE=["Operator","Game Provider","Platform Provider","Affiliate","Payments","KYC/AML","Marketing","Hosting/Infrastructure","Legal/Compliance","Recruitment"],vE=ce.createContext(null),kE={overview:Ga,products:Me,people:De,jobs:be,candidates:mn,news:mn,events:Pa,settings:Za},bE={overview:"Overview",products:"Products",people:"People",jobs:"Jobs",events:"Events",news:"News",candidates:"Candidates",settings:"Settings"},jE={canViewOverview:"Overview",canManageProducts:"Products",canManagePeople:"People",canManageJobs:"Jobs",canManageEvents:"Events",canManageNews:"News",canManageCandidates:"Candidates",canManageSettings:"Settings"},wE={overview:"canViewOverview",products:"canManageProducts",people:"canManagePeople",jobs:"canManageJobs",events:"canManageEvents",news:"canManageNews",candidates:"canManageCandidates",settings:"canManageSettings"},ME=["overview","products","people","jobs","events","news","candidates","settings"],NE=({company:t,companyName:a,companySlug:s,activeTab:n,visibleTabs:r,onTabChange:i,role:l,permissions:c,summaryStats:h,onUpdate:d,isSaving:u})=>{const x=a??t.name,y=s??t.slug,m=l??"admin",g=r??ME,f=ce.useMemo(()=>{var A,R,D;if(h)return h;const I=Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.length:t.jobs.openRoles,T=(((A=t.trustAndCompliance.licenses)==null?void 0:A.length)??0)+(((R=t.trustAndCompliance.certifications)==null?void 0:R.length)??0)+(((D=t.trustAndCompliance.awards)==null?void 0:D.length)??0);return[{title:"Open roles",value:I,description:"Live listings",icon:be},{title:"Team members",value:t.people.members.length,description:"Listed people",icon:De},{title:"Trust signals",value:T,description:"Licenses & awards",icon:la}]},[t,h]),[v,k]=ce.useState(()=>n??g[0]??"overview"),M=n??v,N=Object.entries(jE).filter(([I])=>!!c[I]),b=ce.useMemo(()=>g.filter(I=>{const T=wE[I];return c[T]!==!1}),[c,g]),S=b.includes(M),L=ce.useCallback(I=>{i==null||i(I),n===void 0&&k(I)},[n,i]),C=ce.useCallback(I=>d==null?void 0:d(I),[d]);ce.useEffect(()=>{!S&&b.length>0&&L(b[0])},[L,S,b]);const j=ce.useMemo(()=>b.map(I=>({value:I,label:bE[I],icon:kE[I]})),[b]),w=()=>{switch(M){case"overview":return e.jsx(eA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canViewOverview});case"products":return e.jsx(aA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageProducts});case"people":return e.jsx(tA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManagePeople});case"jobs":return e.jsx(XI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageJobs});case"events":return e.jsx(JI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageEvents});case"news":return e.jsx(KI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageNews});case"candidates":return e.jsx(ZI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageCandidates});case"settings":return e.jsx(sA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageSettings});default:return null}};return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(GI,{companyName:x,isAdminView:!0,role:m,enabledPermissions:N,overview:t.overview,classification:t.classification,companyType:fE[0],companyId:y,companySlug:y,claimedStatus:"claimed",signalsAndInsights:t.signalsAndInsights,openRolesCount:0,trustScore:0}),f.length>0?e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx(JF,{stats:f})})}):null,e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:b.length>0?e.jsxs(ls,{value:M,onValueChange:I=>L(I),children:[e.jsx(UI,{items:j}),S?e.jsx(ve,{value:M,className:"mt-6",children:e.jsx(vE.Provider,{value:{onUpdate:C,isSaving:u,permissions:c},children:e.jsx("div",{className:"rounded-2xl border bg-background p-6 shadow-sm",children:w()})})}):null]}):null})})]})},CE=({companyName:t,companySlug:a,open:s,onOpenChange:n,onSave:r})=>{const[i,l]=p.useState({companyName:t,companySlug:a,shortDescription:"",website:""}),c=()=>{r==null||r(i),n(!1)};return e.jsx(tt,{open:s,onOpenChange:n,children:e.jsxs(Xe,{className:"sm:max-w-[520px]",children:[e.jsxs(Fe,{children:[e.jsx(Se,{children:"Edit company profile"}),e.jsx(nt,{children:"Update company details for admins with profile permissions. This dialog is layout-only and does not perform any API calls."})]}),e.jsxs("div",{className:"grid gap-4 py-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-name",children:"Company name"}),e.jsx(se,{id:"admin-company-name",value:i.companyName,onChange:h=>l(d=>({...d,companyName:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-slug",children:"Company slug"}),e.jsx(se,{id:"admin-company-slug",value:i.companySlug,onChange:h=>l(d=>({...d,companySlug:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-description",children:"Short description"}),e.jsx(st,{id:"admin-company-description",rows:4,value:i.shortDescription,onChange:h=>l(d=>({...d,shortDescription:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-website",children:"Website"}),e.jsx(se,{id:"admin-company-website",value:i.website,onChange:h=>l(d=>({...d,website:h.target.value}))})]})]}),e.jsxs(et,{children:[e.jsx(P,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),e.jsx(P,{variant:"accent",onClick:c,children:"Save changes"})]})]})})},SE=(t,a)=>t[a]===!0,LE=t=>Object.entries(t).filter(([a,s])=>s===!0).map(([a])=>a),IE=({slug:t,title:a,department:s,description:n,typicalTimeline:r,keySkills:i,nodesCount:l,entryPointsCount:c,marketHotspots:h,salaryRange:d,viewMode:u="grid",onNavigate:x})=>u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/career-paths/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent",children:e.jsx(Ve,{className:"h-6 w-6"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs",children:s})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),r]}),e.jsxs("span",{children:[l," career stages"]}),e.jsxs("span",{children:[c," entry points"]}),d&&e.jsxs("span",{className:"font-mono",children:[d.entry," → ",d.director]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/career-paths/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-accent/10 text-accent",children:e.jsx(Ve,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs mt-0.5",children:s})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:n}),e.jsx("div",{className:"mt-4 flex items-center gap-1",children:Array.from({length:l}).map((y,m)=>e.jsxs(p.Fragment,{children:[e.jsx("div",{className:`h-2 w-2 rounded-full ${m===0?"bg-accent":"bg-border group-hover:bg-accent/50"} transition-colors`}),m<l-1&&e.jsx("div",{className:"h-px flex-1 bg-border group-hover:bg-accent/30 transition-colors"})]},m))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),r]}),d&&e.jsxs("span",{className:"font-mono",children:[d.entry," → ",d.director]})]}),e.jsxs("div",{className:"mt-2 flex gap-1.5 flex-wrap",children:[i.slice(0,3).map(y=>e.jsx(_,{variant:"secondary",className:"text-xs",children:y},y)),i.length>3&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",i.length-3]})]}),h.length>0&&e.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Te,{className:"h-3 w-3"}),h.join(", ")]})]}),T9={Shield:e.jsx(is,{className:"h-5 w-5"}),TrendingUp:e.jsx(Ve,{className:"h-5 w-5"}),Heart:e.jsx(Ta,{className:"h-5 w-5"}),Code:e.jsx(mc,{className:"h-5 w-5"}),Lightbulb:e.jsx(Jo,{className:"h-5 w-5"}),Megaphone:e.jsx(bc,{className:"h-5 w-5"}),CreditCard:e.jsx(vl,{className:"h-5 w-5"}),Dice1:e.jsx(xc,{className:"h-5 w-5"})},AE=({slug:t,name:a,icon:s,description:n,roleGuideCount:r,careerPathCount:i,jobCount:l,keyFunctions:c,viewMode:h="grid",onNavigate:d})=>h==="list"?e.jsxs("div",{onClick:()=>d(`/knowledge/departments/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:T9[s]||e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[l," open jobs"]}),e.jsxs("span",{children:[r," role guides"]}),e.jsxs("span",{children:[i," career paths"]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>d(`/knowledge/departments/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:T9[s]||e.jsx(be,{className:"h-5 w-5"})}),e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:n}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[c.slice(0,3).map(u=>e.jsx(_,{variant:"secondary",className:"text-xs",children:u},u)),c.length>3&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",c.length-3]})]}),e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-xs text-muted-foreground pt-3 border-t border-border",children:[e.jsx("span",{className:"font-semibold text-foreground",children:l})," jobs",e.jsx("span",{children:"·"}),e.jsx("span",{className:"font-semibold text-foreground",children:r})," role guides",e.jsx("span",{children:"·"}),e.jsx("span",{className:"font-semibold text-foreground",children:i})," career paths"]})]}),R9={onboarding:"bg-gaming-success/10 text-gaming-success border-gaming-success/20",transition:"bg-accent/10 text-accent border-accent/20",growth:"bg-primary/10 text-primary border-primary/20",leadership:"bg-gaming-gold/10 text-gaming-gold border-gaming-gold/20","market-entry":"bg-gaming-warning/10 text-gaming-warning border-gaming-warning/20"},PE=({slug:t,title:a,type:s,department:n,seniority:r,market:i,description:l,estimatedReadTime:c,accessLevel:h,tags:d,viewMode:u="grid",onNavigate:x})=>{const y=h!=="public";return u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/playbooks/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(Bt,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{className:`${R9[s]||"bg-muted text-muted-foreground"} text-xs border capitalize`,children:s.replace("-"," ")}),y&&e.jsx($a,{className:"h-3 w-3 text-muted-foreground"})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:l}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),c," min read"]}),e.jsx(_,{variant:"outline",className:"text-xs",children:n}),e.jsx(_,{variant:"secondary",className:"text-xs",children:r}),i&&e.jsx("span",{children:i})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/playbooks/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[y&&e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx($a,{className:"h-4 w-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(_,{className:`${R9[s]||"bg-muted text-muted-foreground"} text-xs border capitalize`,children:s.replace("-"," ")}),e.jsx(_,{variant:"outline",className:"text-xs",children:n})]}),e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:a}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-2 flex-1",children:l}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:d.slice(0,3).map(m=>e.jsx(_,{variant:"secondary",className:"text-xs",children:m},m))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground pt-3 border-t border-border",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),c," min read"]}),e.jsxs("span",{children:[r,i?` · ${i}`:""]})]})]})},D9=t=>t==="Growing"?e.jsx(Ve,{className:"h-3 w-3 text-gaming-success"}):t==="Declining"?e.jsx(Dl,{className:"h-3 w-3 text-destructive"}):e.jsx(Sl,{className:"h-3 w-3 text-muted-foreground"}),_9=t=>t==="High"?"bg-gaming-success/10 text-gaming-success border-gaming-success/20":t==="Medium"?"bg-gaming-warning/10 text-gaming-warning border-gaming-warning/20":"bg-muted text-muted-foreground",TE=({slug:t,title:a,alternativeTitles:s,department:n,seniority:r,summary:i,demandLevel:l,growthTrend:c,markets:h,requiredSkills:d,viewMode:u="grid",onNavigate:x})=>u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/role-guides/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs",children:n}),e.jsx(_,{variant:"secondary",className:"text-xs",children:r})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:i}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs",children:[e.jsxs(_,{className:`${_9(l)} text-xs border`,children:[l," demand"]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[D9(c),c]}),h.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(Te,{className:"h-3 w-3"}),h.slice(0,3).join(", ")]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/role-guides/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[n," · ",r]})]})]}),e.jsx(_,{className:`${_9(l)} text-xs border`,children:l})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 flex-1",children:i}),s.length>0&&e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Also: ",s.slice(0,2).join(", ")]}),e.jsx("div",{className:"mt-3 flex gap-1.5 flex-wrap",children:d.slice(0,3).map(y=>e.jsx(_,{variant:"secondary",className:"text-xs",children:y},y))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[D9(c),c]}),h.length>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Te,{className:"h-3 w-3"}),h.slice(0,2).join(", ")]})]})]}),RE=({slug:t,term:a,fullName:s,definition:n,departments:r,topicCategory:i,synonyms:l=[],viewMode:c="grid",onNavigate:h})=>c==="list"?e.jsxs("div",{onClick:()=>h(`/knowledge/glossary/${t}`),className:"group relative flex items-start gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary font-bold text-sm font-mono",children:a.slice(0,3)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),s&&e.jsxs("span",{className:"text-sm text-muted-foreground",children:["— ",s]})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[e.jsx(_,{variant:"outline",className:"text-xs",children:i}),r.slice(0,2).map(d=>e.jsx(_,{variant:"secondary",className:"text-xs",children:d},d))]})]}),e.jsx(Lt,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0 mt-1"})]}):e.jsxs("div",{onClick:()=>h(`/knowledge/glossary/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-primary/10 text-primary font-bold text-sm font-mono",children:a.slice(0,3)}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),s&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 flex-1",children:n}),e.jsxs("div",{className:"mt-3 flex items-center gap-1.5 flex-wrap",children:[e.jsx(_,{variant:"outline",className:"text-xs",children:i}),r.slice(0,1).map(d=>e.jsx(_,{variant:"secondary",className:"text-xs",children:d},d)),l.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground ml-auto flex items-center gap-1",children:[e.jsx(Tl,{className:"h-3 w-3"}),l.length," synonyms"]})]})]}),z9=t=>{const a=Math.floor(t/60);return a>=60?`${Math.floor(a/60)}h ${a%60}m`:`${a} min`},DE=({slug:t,title:a,description:s,thumbnailUrl:n,duration:r,speaker:i,speakerRole:l,speakerCompany:c,conference:h,departments:d,sourceType:u,viewCount:x,saveCount:y,qualityRating:m,viewMode:g="grid",onNavigate:f})=>g==="list"?e.jsxs("div",{onClick:()=>f(`/knowledge/videos/${t}`),className:"group relative flex gap-4 rounded-lg border border-border bg-card p-3 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsxs("div",{className:"relative w-48 h-28 rounded-md overflow-hidden bg-muted shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent z-10"}),e.jsxs("div",{className:"absolute bottom-2 right-2 z-20 flex items-center gap-1 bg-black/80 text-white text-xs px-1.5 py-0.5 rounded font-mono",children:[e.jsx(ft,{className:"h-3 w-3"}),z9(r)]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("div",{className:"bg-primary/90 rounded-full p-2",children:e.jsx(Wa,{className:"h-5 w-5 text-primary-foreground",fill:"currentColor"})})}),e.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover",onError:v=>{v.target.style.display="none"}})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1",children:a}),e.jsx(_,{variant:"outline",className:"text-xs shrink-0 capitalize",children:u})]}),i&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 flex items-center gap-1",children:[e.jsx(Cl,{className:"h-3 w-3"}),i,c&&` · ${c}`]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:s}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),x.toLocaleString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Dt,{className:"h-3 w-3"}),y]}),e.jsx("span",{className:"flex items-center gap-1",children:Array.from({length:m}).map((v,k)=>e.jsx(We,{className:"h-3 w-3 fill-gaming-gold text-gaming-gold"},k))}),d.slice(0,2).map(v=>e.jsx(_,{variant:"secondary",className:"text-xs",children:v},v))]})]})]}):e.jsxs("div",{onClick:()=>f(`/knowledge/videos/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card overflow-hidden cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"relative w-full aspect-video bg-muted",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent z-10"}),e.jsxs("div",{className:"absolute bottom-2 right-2 z-20 flex items-center gap-1 bg-black/80 text-white text-xs px-1.5 py-0.5 rounded font-mono",children:[e.jsx(ft,{className:"h-3 w-3"}),z9(r)]}),h&&e.jsx("div",{className:"absolute top-2 left-2 z-20",children:e.jsx(_,{className:"bg-accent text-accent-foreground text-xs",children:h})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("div",{className:"bg-primary/90 rounded-full p-3",children:e.jsx(Wa,{className:"h-6 w-6 text-primary-foreground",fill:"currentColor"})})}),e.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover",onError:v=>{v.target.style.display="none"}})]}),e.jsxs("div",{className:"p-4 flex flex-col flex-1",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:a}),i&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 flex items-center gap-1",children:[e.jsx(Cl,{className:"h-3 w-3"}),i,c&&` · ${c}`]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-2 flex-1",children:s}),e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),x.toLocaleString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Dt,{className:"h-3 w-3"}),y]}),d.slice(0,1).map(v=>e.jsx(_,{variant:"secondary",className:"text-xs",children:v},v))]})]})]}),_E=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/channels/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[t.isDigital?e.jsxs(_,{className:"bg-gaming-success/10 text-gaming-success text-xs",children:[e.jsx(Qo,{className:"h-3 w-3 mr-1"}),"Digital"]}):e.jsxs(_,{variant:"secondary",className:"text-xs",children:[e.jsx(wc,{className:"h-3 w-3 mr-1"}),"Physical"]}),t.isRegulatedDifferently&&e.jsx(_,{className:"bg-gaming-warning/10 text-gaming-warning text-xs",children:"Separate regulation"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"flex items-center gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsx(Me,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"companies"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.typicalCompanyTypes.slice(0,4).map(n=>e.jsx(_,{variant:"outline",className:"text-xs capitalize",children:n.replace(/-/g," ")},n))})]}),zE={high:"bg-destructive/10 text-destructive",medium:"bg-gaming-warning/10 text-gaming-warning",low:"bg-gaming-success/10 text-gaming-success"},qE=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/verticals/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx(_,{variant:"secondary",className:"text-xs",children:t.channel}),e.jsxs(_,{className:`text-xs ${zE[t.regulationLevel]}`,children:[e.jsx(la,{className:"h-3 w-3 mr-1"}),t.regulationLevel," regulation"]}),t.isFastGrowing&&e.jsxs(_,{className:"bg-gaming-success/10 text-gaming-success text-xs",children:[e.jsx(Ve,{className:"h-3 w-3 mr-1"}),"Fast growing"]}),t.isFeatured&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"Featured"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(Me,{className:"h-3 w-3"})," Companies"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:t.topMarkets.slice(0,3).map(n=>e.jsx(_,{variant:"outline",className:"text-xs capitalize",children:n.replace(/-/g," ")},n))}),t.keyRoles[0]&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Ve,{className:"h-3 w-3 text-gaming-success"}),e.jsxs("span",{children:["Top role: ",e.jsx("strong",{className:"text-foreground",children:t.keyRoles[0].role})]})]})]}),q9={growing:{label:"Growing",cls:"text-gaming-success"},stable:{label:"Stable",cls:"text-muted-foreground"},declining:{label:"Declining",cls:"text-destructive"}},FE=({item:t,viewMode:a="grid",onNavigate:s})=>{const n=q9[t.growthTrend]??q9.stable;return e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/departments/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[t.isTechnical&&e.jsx(_,{variant:"secondary",className:"text-xs",children:"Technical"}),t.isRegulated&&e.jsx(_,{className:"bg-destructive/10 text-destructive text-xs",children:"Regulated"}),t.isIgamingSpecific&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"iGaming-specific"}),e.jsxs(_,{className:`text-xs ${n.cls} bg-transparent border border-current`,children:[e.jsx(Ve,{className:"h-3 w-3 mr-1"}),n.label]})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t.avgSalaryRange.currency==="EUR"?"€":t.avgSalaryRange.currency==="GBP"?"£":"$",Math.round(t.avgSalaryRange.min/1e3),"k–",Math.round(t.avgSalaryRange.max/1e3),"k"]}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(vs,{className:"h-3 w-3"})," Salary"]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[t.topSkills.slice(0,4).map(r=>e.jsx(_,{variant:"outline",className:"text-xs",children:r},r)),t.topSkills.length>4&&e.jsxs(_,{variant:"outline",className:"text-xs",children:["+",t.topSkills.length-4]})]}),t.subDepartments.length>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.subDepartments.length," sub-departments"]})]})},EE={High:"text-gaming-success",Medium:"text-gaming-warning",Low:"text-muted-foreground"},OE=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/company-types/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx(_,{variant:"secondary",className:"text-xs",children:t.businessModel.toUpperCase()}),t.isRegulated&&e.jsx(_,{className:"bg-destructive/10 text-destructive text-xs",children:"Regulated"}),t.isFeatured&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"Featured"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(Me,{className:"h-3 w-3"})," Companies"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:t.subtypes.slice(0,3).map(n=>e.jsx(_,{variant:"outline",className:"text-xs",children:n.name},n.slug))}),t.keyRoles[0]&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(De,{className:"h-3 w-3"}),e.jsxs("span",{children:["Top role: ",e.jsx("strong",{className:"text-foreground",children:t.keyRoles[0].role})]}),e.jsx("span",{className:EE[t.keyRoles[0].demand],children:t.keyRoles[0].demand})]})]}),MC=({title:t,icon:a,children:s,className:n,compact:r=!1})=>e.jsxs(V,{className:n,children:[t&&e.jsx("div",{className:"flex flex-col space-y-1.5 p-6 pb-0",children:e.jsxs("h3",{className:"flex items-center gap-2 font-semibold leading-none tracking-tight",children:[a,t]})}),e.jsx("div",{className:ie(r?"p-4 space-y-3":"p-6 pt-3"),children:s})]});MC.displayName="DirectoryDetailCard";const BE={High:"bg-gaming-success/10 text-gaming-success",Medium:"bg-gaming-warning/10 text-gaming-warning",Low:"bg-secondary text-muted-foreground"},nA=({roles:t,className:a})=>e.jsx("div",{className:ie("space-y-2",a),children:t.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(De,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:s.role})]}),e.jsxs(_,{className:ie("text-xs",BE[s.demand]),children:[s.demand," demand"]})]},s.role))});nA.displayName="DirectoryKeyRolesList";const rA=({title:t,rows:a,badges:s,links:n,onNavigate:r,className:i})=>e.jsxs(MC,{title:t,compact:!0,className:i,children:[a&&a.length>0&&e.jsx("div",{className:"space-y-3",children:a.map(({label:l,value:c})=>e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:l}),e.jsx("span",{className:"text-foreground font-medium capitalize",children:c})]},l))}),s&&s.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(l=>e.jsx(_,{variant:"outline",className:"text-xs",children:l},l))}),n&&n.length>0&&e.jsx("div",{className:"space-y-1.5",children:n.map(({slug:l,label:c,icon:h,href:d})=>e.jsxs(P,{variant:"outline",size:"sm",className:"w-full justify-start gap-2 capitalize",onClick:()=>r==null?void 0:r(d),children:[h,c]},l))})]});rA.displayName="DirectoryInfoPanel";function HE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var G7={exports:{}},NC={};function VE(t){return t&&t.__esModule?t:{default:t}}NC._=VE;var iA={};function oA(t){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(oA=function(n){return n?s:a})(t)}function GE(t,a){if(!a&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var s=oA(a);if(s&&s.has(t))return s.get(t);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var l=r?Object.getOwnPropertyDescriptor(t,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=t[i]}return n.default=t,s&&s.set(t,n),n}iA._=GE;var x7={},F9;function UE(){return F9||(F9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=NC._(p).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(x7)),x7}var od={exports:{}},E9;function $E(){return E9||(E9=1,function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"setAttributesFromProps",{enumerable:!0,get:function(){return i}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},n=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function r(l){return["async","defer","noModule"].includes(l)}function i(l,c){for(const[h,d]of Object.entries(c)){if(!c.hasOwnProperty(h)||n.includes(h)||d===void 0)continue;const u=s[h]||h.toLowerCase();l.tagName==="SCRIPT"&&r(u)?l[u]=!!d:l.setAttribute(u,String(d)),(d===!1||l.tagName==="SCRIPT"&&r(u)&&(!d||d==="false"))&&(l.setAttribute(u,""),l.removeAttribute(u))}}(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)}(od,od.exports)),od.exports}var ld={exports:{}},O9;function WE(){return O9||(O9=1,function(t,a){Object.defineProperty(a,"__esModule",{value:!0});function s(i,l){for(var c in l)Object.defineProperty(i,c,{enumerable:!0,get:l[c]})}s(a,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let l=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-l))}})},1)},r=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)}(ld,ld.exports)),ld.exports}(function(t,a){"use client";Object.defineProperty(a,"__esModule",{value:!0});function s(S,L){for(var C in L)Object.defineProperty(S,C,{enumerable:!0,get:L[C]})}s(a,{default:function(){return b},handleClientScriptLoad:function(){return f},initScriptLoader:function(){return M}});const n=NC,r=iA,i=e,l=n._(sS),c=r._(p),h=UE(),d=$E(),u=WE(),x=new Map,y=new Set,m=S=>{if(l.default.preinit){S.forEach(L=>{l.default.preinit(L,{as:"style"})});return}if(typeof window<"u"){let L=document.head;S.forEach(C=>{let j=document.createElement("link");j.type="text/css",j.rel="stylesheet",j.href=C,L.appendChild(j)})}},g=S=>{const{src:L,id:C,onLoad:j=()=>{},onReady:w=null,dangerouslySetInnerHTML:I,children:T="",strategy:A="afterInteractive",onError:R,stylesheets:D}=S,q=C||L;if(q&&y.has(q))return;if(x.has(L)){y.add(q),x.get(L).then(j,R);return}const E=()=>{w&&w(),y.add(q)},F=document.createElement("script"),Z=new Promise((Y,W)=>{F.addEventListener("load",function(ee){Y(),j&&j.call(this,ee),E()}),F.addEventListener("error",function(ee){W(ee)})}).catch(function(Y){R&&R(Y)});I?(F.innerHTML=I.__html||"",E()):T?(F.textContent=typeof T=="string"?T:Array.isArray(T)?T.join(""):"",E()):L&&(F.src=L,x.set(L,Z)),(0,d.setAttributesFromProps)(F,S),A==="worker"&&F.setAttribute("type","text/partytown"),F.setAttribute("data-nscript",A),D&&m(D),document.body.appendChild(F)};function f(S){const{strategy:L="afterInteractive"}=S;L==="lazyOnload"?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(S))}):g(S)}function v(S){document.readyState==="complete"?(0,u.requestIdleCallback)(()=>g(S)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(S))})}function k(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(L=>{const C=L.id||L.getAttribute("src");y.add(C)})}function M(S){S.forEach(f),k()}function N(S){const{id:L,src:C="",onLoad:j=()=>{},onReady:w=null,strategy:I="afterInteractive",onError:T,stylesheets:A,...R}=S,{updateScripts:D,scripts:q,getIsSsr:E,appDir:F,nonce:Z}=(0,c.useContext)(h.HeadManagerContext),Y=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ee=L||C;Y.current||(w&&ee&&y.has(ee)&&w(),Y.current=!0)},[w,L,C]);const W=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{W.current||(I==="afterInteractive"?g(S):I==="lazyOnload"&&v(S),W.current=!0)},[S,I]),(I==="beforeInteractive"||I==="worker")&&(D?(q[I]=(q[I]||[]).concat([{id:L,src:C,onLoad:j,onReady:w,onError:T,...R}]),D(q)):E&&E()?y.add(L||C):E&&!E()&&g(S)),F){if(A&&A.forEach(ee=>{l.default.preinit(ee,{as:"style"})}),I==="beforeInteractive")return C?(l.default.preload(C,R.integrity?{as:"script",integrity:R.integrity,nonce:Z,crossOrigin:R.crossOrigin}:{as:"script",nonce:Z,crossOrigin:R.crossOrigin}),(0,i.jsx)("script",{nonce:Z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([C,{...R,id:L}])+")"}})):(R.dangerouslySetInnerHTML&&(R.children=R.dangerouslySetInnerHTML.__html,delete R.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:Z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...R,id:L}])+")"}}));I==="afterInteractive"&&C&&l.default.preload(C,R.integrity?{as:"script",integrity:R.integrity,nonce:Z,crossOrigin:R.crossOrigin}:{as:"script",nonce:Z,crossOrigin:R.crossOrigin})}return null}Object.defineProperty(N,"__nextScript",{value:!0});const b=N;(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)})(G7,G7.exports);var ZE=G7.exports,YE=ZE;const JE=HE(YE),XE=`
7919
+ transition-all`,children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold tracking-tight text-lg",children:s(r)}),e.jsxs("p",{className:"font-semibold tracking-tight text-lg",children:[r.location," • ",n(r)]})]}),t.bookMeetingEnabled&&e.jsx(P,{size:"sm",variant:"accent",children:"Book Meeting"})]},i))})},xF=()=>e.jsx(ve,{value:"insights",className:"mt-0",children:e.jsx(V,{children:e.jsxs($,{className:"py-12 text-center",children:[e.jsx($a,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),e.jsx("h3",{className:"font-semibold mb-2",children:"Premium Insights"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Unlock demand trends, competitor analysis, and intent signals."}),e.jsx(P,{variant:"accent",children:"Upgrade to Access"})]})})}),yF=({companyOverview:t,similarCompanies:a})=>{var s;return e.jsxs("aside",{className:"space-y-4",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{className:"text-base",children:"Contact"})}),e.jsxs($,{className:"space-y-3",children:[e.jsxs("a",{href:t.website,target:"_blank",className:"flex items-center gap-2 text-sm text-accent hover:underline",children:[e.jsx(_t,{className:"w-4 h-4"}),t.website.replace(/^https?:\/\//,"")]}),((s=t.socialLinks)==null?void 0:s.linkedin)&&e.jsxs("a",{href:t.socialLinks.linkedin,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[e.jsx(kc,{className:"w-4 h-4"}),"LinkedIn"]})]})]}),e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{className:"text-base",children:"Similar Companies"})}),e.jsx($,{className:"space-y-2",children:a.map((n,r)=>{const i=n.url??(n.slug?`/companies/${n.slug}`:void 0);return i?e.jsx("a",{href:i,className:"flex items-center gap-2 p-2 bg-secondary/50 rounded-lg text-sm text-foreground hover:underline",children:n.name},`${n.name}-${r}`):e.jsx("div",{className:"flex items-center gap-2 p-2 bg-secondary/50 rounded-lg text-sm",children:n.name},`${n.name}-${r}`)})})]})]})},gF=({review:t,onHelpful:a,onShare:s,onReport:n})=>{const r={employee:"Employee",client:"Client",partner:"Partner",competitor:"Industry Peer",other:"Other"};return e.jsx(V,{className:"border-border/50",children:e.jsxs($,{className:"p-5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-secondary flex items-center justify-center flex-shrink-0",children:e.jsx(os,{className:"w-5 h-5 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-sm text-foreground",children:t.author.displayName}),t.isVerified&&e.jsx(qe,{className:"w-3.5 h-3.5 text-gaming-success"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.author.relationship&&e.jsx("span",{children:r[t.author.relationship]??t.author.relationship}),t.author.jobTitle&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:t.author.jobTitle})]})]})]})]}),e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:jC(new Date(t.createdAt),{addSuffix:!0})})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h4",{className:"font-semibold text-foreground",children:t.title}),e.jsx(Yc,{rating:t.rating,size:"sm"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-3 leading-relaxed",children:t.body}),(t.pros||t.cons)&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3",children:[t.pros&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-medium text-gaming-success text-xs uppercase tracking-wide",children:"Pros"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t.pros})]}),t.cons&&e.jsxs("div",{className:"text-sm",children:[e.jsx("span",{className:"font-medium text-destructive text-xs uppercase tracking-wide",children:"Cons"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:t.cons})]})]}),e.jsxs("div",{className:"flex items-center gap-3 pt-3 border-t border-border/50",children:[e.jsxs(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-accent gap-1.5 h-8",onClick:()=>a==null?void 0:a(t.id),children:[e.jsx(Rl,{className:"w-3.5 h-3.5"}),"Useful ",t.helpfulCount>0&&`(${t.helpfulCount})`]}),e.jsxs(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-accent gap-1.5 h-8",onClick:()=>s==null?void 0:s(t.id),children:[e.jsx(rs,{className:"w-3.5 h-3.5"}),"Share"]}),e.jsx(P,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-destructive gap-1.5 h-8 ml-auto",onClick:()=>n==null?void 0:n(t.id),children:e.jsx(Yo,{className:"w-3.5 h-3.5"})})]})]})})},fF=({summary:t,compact:a=!1})=>{if(t.totalReviews===0)return e.jsx("div",{className:"text-center py-4",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"No reviews yet"})});const s=[5,4,3,2,1];return e.jsxs("div",{className:`flex ${a?"items-center gap-4":"flex-col sm:flex-row gap-6"}`,children:[e.jsxs("div",{className:`text-center ${a?"":"min-w-[100px]"}`,children:[e.jsx("div",{className:"text-3xl font-bold text-foreground",children:t.averageRating}),e.jsx(Yc,{rating:Math.round(t.averageRating),size:"sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[t.totalReviews," review",t.totalReviews!==1?"s":""]})]}),!a&&e.jsx("div",{className:"flex-1 space-y-1.5",children:s.map(n=>{const r=t.ratingDistribution[n]??0,i=t.totalReviews>0?r/t.totalReviews*100:0;return e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-3 text-right text-muted-foreground",children:n}),e.jsx(pa,{value:i,className:"h-2 flex-1"}),e.jsx("span",{className:"w-6 text-muted-foreground",children:r})]},n)})})]})},vF=({companyName:t,companyId:a,companySlug:s,open:n,onOpenChange:r,onSubmit:i})=>{const[l,c]=p.useState(0),[h,d]=p.useState(""),[u,x]=p.useState(""),[y,m]=p.useState(""),[g,f]=p.useState(""),[v,k]=p.useState(""),[M,N]=p.useState(!1),[b,S]=p.useState(!1),L=l>0&&h.trim().length>=5&&u.trim().length>=20&&v,C=()=>{!L||l===0||(i==null||i({companyId:a,companySlug:s,title:h.trim(),body:u.trim(),rating:l,pros:y.trim()||void 0,cons:g.trim()||void 0,relationship:v,isAnonymous:M}),S(!0))},j=()=>{c(0),d(""),x(""),m(""),f(""),k(""),N(!1),S(!1),r(!1)};return e.jsx(tt,{open:n,onOpenChange:j,children:e.jsx(Xe,{className:"sm:max-w-[520px]",children:b?e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{className:"text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-gaming-success/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(lt,{className:"w-8 h-8 text-gaming-success"})}),e.jsx(Se,{children:"Review Submitted!"}),e.jsx(nt,{className:"text-center",children:"Thank you for your review. It will be published after moderation (usually within 24-48 hours)."})]}),e.jsx(et,{children:e.jsx(P,{variant:"accent",onClick:j,className:"w-full",children:"Done"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(Fe,{children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-accent/20 to-primary/20 flex items-center justify-center mb-2",children:e.jsx(lt,{className:"w-6 h-6 text-accent"})}),e.jsxs(Se,{children:["Review ",t]}),e.jsxs(nt,{children:["Share your experience working with or for ",t,". All reviews are moderated before publishing."]})]}),e.jsxs("div",{className:"space-y-4 py-2 max-h-[60vh] overflow-y-auto",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Overall Rating *"}),e.jsx(Yc,{rating:l,size:"lg",interactive:!0,onRatingChange:w=>c(w)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Your Relationship *"}),e.jsxs(Ze,{value:v,onValueChange:k,children:[e.jsx(Be,{children:e.jsx(Ye,{placeholder:"How do you know this company?"})}),e.jsxs(He,{children:[e.jsx(me,{value:"employee",children:"Current/Former Employee"}),e.jsx(me,{value:"client",children:"Client / Customer"}),e.jsx(me,{value:"partner",children:"Business Partner"}),e.jsx(me,{value:"competitor",children:"Industry Peer"}),e.jsx(me,{value:"other",children:"Other"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{children:"Review Title *"}),e.jsx(se,{placeholder:"Summarize your experience in a few words",value:h,onChange:w=>d(w.target.value),maxLength:120})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Your Review * ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(min 20 characters)"})]}),e.jsx(st,{placeholder:"Share details about your experience...",value:u,onChange:w=>x(w.target.value),rows:4,maxLength:2e3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Pros ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"})]}),e.jsx(st,{placeholder:"What did you like?",value:y,onChange:w=>m(w.target.value),rows:2,maxLength:500})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(B,{children:["Cons ",e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"})]}),e.jsx(st,{placeholder:"What could be improved?",value:g,onChange:w=>f(w.target.value),rows:2,maxLength:500})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border px-4 py-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Post anonymously"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Your name won't be shown publicly"})]}),e.jsx(kt,{checked:M,onCheckedChange:N})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"By submitting, you confirm this review is based on genuine experience and complies with our community guidelines."})]}),e.jsxs(et,{children:[e.jsx(P,{variant:"outline",onClick:j,children:"Cancel"}),e.jsx(P,{variant:"accent",onClick:C,disabled:!L,children:"Submit Review"})]})]})})})},kF=({companyId:t,companySlug:a,companyName:s,reviews:n,summary:r,onLeaveReview:i,onHelpful:l,onReport:c})=>{const[h,d]=p.useState("newest"),[u,x]=p.useState(!1),y=p.useMemo(()=>{const m=[...n];switch(h){case"newest":return m.sort((g,f)=>new Date(f.createdAt).getTime()-new Date(g.createdAt).getTime());case"oldest":return m.sort((g,f)=>new Date(g.createdAt).getTime()-new Date(f.createdAt).getTime());case"highest":return m.sort((g,f)=>f.rating-g.rating);case"lowest":return m.sort((g,f)=>g.rating-f.rating);case"most-helpful":return m.sort((g,f)=>f.helpfulCount-g.helpfulCount);default:return m}},[n,h]);return e.jsxs(ve,{value:"reviews",className:"space-y-6 mt-0",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(oe,{children:"Reviews"}),e.jsxs(P,{variant:"accent",size:"sm",className:"gap-1.5",onClick:()=>x(!0),children:[e.jsx(lt,{className:"w-4 h-4"}),"Add review"]})]})}),e.jsx($,{children:e.jsx(fF,{summary:r})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.length," review",n.length!==1?"s":""]}),e.jsxs(Ze,{value:h,onValueChange:m=>d(m),children:[e.jsx(Be,{className:"w-[180px]",children:e.jsx(Ye,{})}),e.jsxs(He,{children:[e.jsx(me,{value:"newest",children:"Newest reviews"}),e.jsx(me,{value:"oldest",children:"Oldest reviews"}),e.jsx(me,{value:"highest",children:"Highest rated"}),e.jsx(me,{value:"lowest",children:"Lowest rated"}),e.jsx(me,{value:"most-helpful",children:"Most helpful"})]})]})]}),y.length===0?e.jsx(V,{children:e.jsxs($,{className:"py-12 text-center",children:[e.jsx(lt,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-3"}),e.jsx("p",{className:"text-muted-foreground",children:"No reviews yet. Be the first to share your experience!"}),e.jsx(P,{variant:"accent",size:"sm",className:"mt-4",onClick:()=>x(!0),children:"Write a review"})]})}):e.jsx("div",{className:"space-y-4",children:y.map(m=>e.jsx(gF,{review:m,onHelpful:l,onReport:c},m.id))}),e.jsx(vF,{companyName:s,companyId:t,companySlug:a,open:u,onOpenChange:x,onSubmit:i})]})},bF=t=>{var a,s;if(t==null)return"";if(typeof t=="string"&&t.startsWith("http"))return t;if(typeof t=="string"&&t.startsWith("{"))try{const n=JSON.parse(t.replace(/'/g,'"'));return(n==null?void 0:n.url)??""}catch{return""}return typeof t=="object"?(t==null?void 0:t.url)??((s=(a=t==null?void 0:t.formats)==null?void 0:a.thumbnail)==null?void 0:s.url)??"":""},$I=t=>({profileViews30d:(t==null?void 0:t.profile_views_30d)??(t==null?void 0:t.profileViews30d)??0,followsCount:(t==null?void 0:t.follows_count)??(t==null?void 0:t.followsCount)??0,hiringIntensity:(t==null?void 0:t.hiring_intensity)??(t==null?void 0:t.hiringIntensity)??"Low",topSkillsHiring:(t==null?void 0:t.top_skills_hiring)??(t==null?void 0:t.topSkillsHiring)??[],topViewingCountries:(t==null?void 0:t.top_viewing_countries)??(t==null?void 0:t.topViewingCountries)??[],oftenComparedWith:(t==null?void 0:t.often_compared_with)??(t==null?void 0:t.oftenComparedWith)??[],similarCompanies:(t==null?void 0:t.similar_companies)??(t==null?void 0:t.similarCompanies)??[]}),jF=t=>{if(t)return{capabilitiesScore:t.capabilities_score??t.capabilitiesScore??0,credibilityScore:t.credibility_score??t.credibilityScore??0,complianceScore:t.compliance_score??t.complianceScore??0,hiringScore:t.hiring_score??t.hiringScore??0,overallScore:t.overall_score??t.overallScore??0,detectedBusinessModel:t.detected_business_model??t.detectedBusinessModel??"",detectedProducts:t.detected_products??t.detectedProducts??[],detectedMarkets:t.detected_markets??t.detectedMarkets??[]}},wF=t=>({id:String(t.id??t.company_id??""),name:t.name??"",slug:t.slug??"",companyType:t.company_type??t.companyType,overview:t.overview?{shortDescription:t.overview.short_description??t.overview.shortDescription,headquarters:t.overview.headquarters,employeeRange:t.overview.employee_range??t.overview.employeeRange}:void 0,isPrimary:t.is_primary??t.isPrimary}),MF=t=>({id:String((t==null?void 0:t.id)??(t==null?void 0:t.group_id)??""),name:(t==null?void 0:t.name)??(t==null?void 0:t.group_name)??"",slug:(t==null?void 0:t.slug)??"",website:(t==null?void 0:t.website)??"",description:(t==null?void 0:t.description)??"",primaryCompanyId:(t==null?void 0:t.primary_company_id)??(t==null?void 0:t.primaryCompanyId)??"",companies:Array.isArray(t==null?void 0:t.companies)?t.companies.map(wF):[],intelligenceProfile:$I((t==null?void 0:t.intelligence_profile)??(t==null?void 0:t.intelligenceProfile))}),NF=t=>{var a,s;return{shortDescription:(t==null?void 0:t.shortDescription)??(t==null?void 0:t.short_description)??"",longDescription:(t==null?void 0:t.longDescription)??(t==null?void 0:t.long_description),foundedYear:typeof(t==null?void 0:t.foundedYear)=="number"?t.foundedYear:0,headquarters:{city:((a=t==null?void 0:t.headquarters)==null?void 0:a.city)??"",country:((s=t==null?void 0:t.headquarters)==null?void 0:s.country)??""},officeLocations:t==null?void 0:t.officeLocations,employeeRange:(t==null?void 0:t.employeeRange)??(t==null?void 0:t.employee_range)??"",publicCompany:t==null?void 0:t.publicCompany,stockTicker:t==null?void 0:t.stockTicker,website:(t==null?void 0:t.website)??"",socialLinks:t==null?void 0:t.socialLinks}},CF=t=>({searchImpressions:(t==null?void 0:t.searchImpressions)??0,profileClicks:(t==null?void 0:t.profileClicks)??0,externalClicks:(t==null?void 0:t.externalClicks)??0}),SF=t=>{var a,s,n;return{...t,overview:NF(t.overview),logo:bF(t.logo),jobs:LF(t.jobs),group:MF(t.group),groupId:t.groupId??t.group_id??((a=t.group)==null?void 0:a.id),groupName:t.groupName??t.group_name??((s=t.group)==null?void 0:s.name),groupSlug:t.group_slug??t.groupSlug??((n=t.group)==null?void 0:n.slug),signalsAndInsights:$I(t.signalsAndInsights??t.signals_and_insights??t.signalsAndInsights)??t.signalsAndInsights,visibilityMetrics:CF(t.visibilityMetrics),intelligenceProfile:jF(t.intelligence_profile??t.intelligenceProfile),classification:IF(t.classification)}},LF=t=>({openRoles:Array.isArray(t==null?void 0:t.openRoles)||typeof(t==null?void 0:t.openRoles)=="number"?t.openRoles:[],departmentsHiring:Array.isArray(t==null?void 0:t.departmentsHiring)?t.departmentsHiring:[],locationsHiring:Array.isArray(t==null?void 0:t.locationsHiring)?t.locationsHiring:[],remotePolicy:(t==null?void 0:t.remotePolicy)??""}),IF=t=>({businessModel:(t==null?void 0:t.businessModel)??(t==null?void 0:t.business_model)??"",verticals:Array.isArray(t==null?void 0:t.verticals)?t.verticals:[],productCategories:Array.isArray(t==null?void 0:t.productCategories)?t.productCategories:[],tags:((t==null?void 0:t.tags)??[]).map(a=>typeof a=="string"?a:a.title??a.tag??"")}),AF=t=>({count:(t==null?void 0:t.count)??0,page:(t==null?void 0:t.page)??1,pageSize:(t==null?void 0:t.page_size)??(t==null?void 0:t.pageSize)??0,totalPages:(t==null?void 0:t.total_pages)??(t==null?void 0:t.totalPages)??1,results:Array.isArray(t==null?void 0:t.results)?t.results.map(SF):[],filterOptions:(t==null?void 0:t.filter_options)??(t==null?void 0:t.filterOptions)}),PF=t=>{if(typeof t=="string")return t;const a=t.city??t.cities??t.location,s=t.country;return`${a??"Remote"}, ${s??"Global"}`},TF=[{name:"Casino Games (Slots & RNG)",category:"Game Content",description:"RNG-based casino games including slots and table games.",keywords:["slot","rng","casino game","table game","jackpot","buy bonus"],negativeKeywords:["live casino games","live casino"],priority:10},{name:"Live Casino Games",category:"Live Casino",description:"Live dealer games streamed from professional studios.",keywords:["live casino games","live dealer games","roulette games","live roulette","sic-bo","presenter"],negativeKeywords:["real-time reporting"],priority:10},{name:"iGaming Platform / PAM",category:"Platform",description:"Core iGaming platform including player accounts, wallet, and cashier.",keywords:["pam","aggregation platform","cashier","player account"],negativeKeywords:[],priority:10},{name:"Game Aggregation",category:"Aggregation",description:"Single API access to multiple game providers.",keywords:["aggregation","aggregator","single api","content hub"],negativeKeywords:[],priority:10},{name:"Bonus & Promotions Platform",category:"CRM & Engagement",description:"Bonus management, promotions, and player engagement tools.",keywords:["bonus tools","promotional tools","free spins tools","tournament","leaderboard","rewards tools","bonus features","bonus platform"],negativeKeywords:[],priority:10},{name:"Back Office & Analytics",category:"Operations",description:"Reporting, dashboards, and performance analytics.",keywords:["back office","real-time reporting","analytics","easy-to-use tools","insights"],negativeKeywords:[],priority:10},{name:"Live Casino Infrastructure",category:"Technology",description:"Hardware, streaming, and infrastructure for live casino operations.",keywords:["streaming","video streaming","Live Casino studio","professional game hosts"],negativeKeywords:[],priority:10},{name:"Payments & Payouts",category:"Payments",description:"Payment processing, deposits, and withdrawals.",keywords:["Payment processing","psp","payout","withdrawal","deposit"],negativeKeywords:[],priority:10},{name:"Compliance & Risk",category:"Compliance",description:"KYC, AML, fraud prevention, and responsible gaming.",keywords:["kyc detection","aml detection","compliance tools","fraud detection","fraud prevention","responsible gaming tools"],negativeKeywords:[],priority:10}];function RF(t,a){var i;const s=a.toLowerCase();return!(!t.keywords.some(l=>s.includes(l))||((i=t.negativeKeywords)==null?void 0:i.some(l=>s.includes(l))))}function DF(t){return t!==null}const _F=t=>TF.map(a=>{const s=t.filter(n=>RF(a,n));return s.length===0?null:{name:a.name,category:a.category,description:a.description,keyDifferentiators:Array.from(new Set(s)),source:"derived",confidence:Math.min(1,s.length/5),priority:a.priority}}).filter(DF).sort((a,s)=>s.priority-a.priority),zF=(t,a)=>Array.isArray(t)&&t.length>0?t:a.map(s=>({name:s})),qF=({company:t,jobs:a,news:s,events:n,showReviews:r=!1,reviews:i,followLoading:l=!1,followDisabled:c=!1,onToggleFollow:h,onFollowAction:d,saveLoading:u=!1,saveDisabled:x=!1,onToggleSave:y,onSaveAction:m,canClaim:g,onClaimSubmit:f,claimPrefill:v,onBack:k,activeTab:M,tabPaths:N,onTabChange:b,similarCompanies:S})=>{var le,te,z,U,H,de,G,ge;const[L,C]=p.useState(!1),[j,w]=p.useState(M??"overview");if(p.useEffect(()=>{M&&w(M)},[M]),!t)return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(Me,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Company Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The company you're looking for doesn't exist."}),e.jsx("a",{href:"/companies",children:e.jsx(P,{variant:"accent",children:"Browse Directory"})})]})});const I=((te=(le=t.webIntelligence)==null?void 0:le.menus.primary_nav_details)==null?void 0:te.flatMap(je=>je.key_points))??[],T=t.trustAndCompliance.licenses.length+t.trustAndCompliance.certifications.length+t.trustAndCompliance.awards.length,A=t.signalsAndInsights,R=zF(S,A.similarCompanies),D=a??[],q=s??[],E=n??[],F=i??[],Z=r&&Array.isArray(i),Y=F.reduce((je,pt)=>(je.totalReviews+=1,je.ratingDistribution[pt.rating]+=1,je.averageRating+=pt.rating,je),{averageRating:0,totalReviews:0,ratingDistribution:{1:0,2:0,3:0,4:0,5:0}});Y.totalReviews>0&&(Y.averageRating=Math.round(Y.averageRating/Y.totalReviews*10)/10);const W=D.length>0?D.length:Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.length:t.jobs.openRoles,ee=((z=t.group)==null?void 0:z.name)??t.groupName??t.group_name??null,ne=((U=t.group)==null?void 0:U.slug)??t.groupSlug??t.group_slug??((H=t.group)==null?void 0:H.id)??t.groupId??t.group_id??void 0,K=_F(I),ae=[...t.productsAndServices??[],...K??[]],O=[{value:"overview",label:"Overview",icon:Ga},{value:"products",label:"Products",icon:Ll},{value:"trust",label:"Trust",icon:is},{value:"people",label:"People",icon:mn},{value:"jobs",label:"Jobs",icon:be},{value:"news",label:"News",icon:Ra},{value:"events",label:"Events",icon:Pa},...Z?[{value:"reviews",label:"Reviews",icon:lt}]:[],{value:"insights",label:"Insights",icon:$a,disabled:!0}],Q=je=>{const pt=je;M||w(pt),b==null||b({tab:pt,path:N==null?void 0:N[pt]})};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(GI,{companyName:t.name,companyType:t.companyType,overview:t.overview,classification:t.classification,companyId:t.id,companySlug:t.slug,groupSlug:ne,groupLabel:ee??"Gaming",signalsAndInsights:t.signalsAndInsights,claimedStatus:t.claimedStatus,isFollowing:t.isFollowing,isSaved:t.isSaved,openRolesCount:W,trustScore:T,onBack:k,saveDisabled:x,saveLoading:u,canClaim:g,onToggleFollow:h,onFollowAction:d,onToggleSave:y,onSaveAction:m,followLoading:l,followDisabled:c,onClaimClick:()=>C(!0)}),e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs(ls,{value:M??j,onValueChange:Q,className:"space-y-6",children:[e.jsx(UI,{items:O}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(oF,{overview:t.overview,classification:t.classification,officeLocations:t.overview.officeLocations??[],formatOfficeLocation:PF}),e.jsx(lF,{products:ae}),e.jsx(dF,{companyTrustData:t.trustAndCompliance,credibilityEvidence:(ge=(G=(de=t.webIntelligence)==null?void 0:de.signals)==null?void 0:G.evidence)==null?void 0:ge.credibility}),e.jsx(hF,{members:t.people.members}),e.jsx(uF,{company:t,jobListings:D,openRolesCount:W}),e.jsx(mF,{companyNews:t.newsAndMedia,newsArticles:q}),e.jsx(pF,{companyEvents:t.events,conferenceEvents:E}),Z&&e.jsx(kF,{companyId:t.id,companySlug:t.slug,companyName:t.name,reviews:F,summary:Y}),e.jsx(xF,{})]}),e.jsx(yF,{companyOverview:t.overview,similarCompanies:R})]})]})})}),e.jsx(rF,{company:t,open:L,onOpenChange:C,onClaimSubmit:f,claimPrefill:v})]})},FF=({group:t})=>{var n,r;if(!t)return e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("div",{className:"container mx-auto px-4 py-16 text-center",children:[e.jsx(Me,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Group Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The group you're looking for doesn't exist."}),e.jsx("a",{href:"/companies",children:e.jsx(P,{variant:"accent",children:"Browse Companies"})})]})});const a=t.intelligenceProfile,s=((n=t.companies)==null?void 0:n.length)??0;return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("section",{className:"bg-gradient-to-br from-primary via-primary to-primary-variant py-8",children:e.jsxs("div",{className:"container mx-auto px-4",children:[e.jsxs("a",{href:"/companies",className:"inline-flex items-center text-primary-foreground/70 hover:text-primary-foreground mb-6 text-sm",children:[e.jsx(La,{className:"w-4 h-4 mr-1"})," Back to Directory"]}),e.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[e.jsx("div",{className:"w-20 h-20 rounded-2xl bg-white/10 backdrop-blur flex items-center justify-center flex-shrink-0",children:e.jsx(Me,{className:"w-10 h-10 text-primary-foreground"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-primary-foreground",children:t.name}),e.jsx(_,{className:"bg-white/10 text-primary-foreground border-white/20",children:"Company Group"})]}),t.description&&e.jsx("p",{className:"text-primary-foreground/80 text-sm mb-4 max-w-2xl",children:t.description}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.website&&e.jsx("a",{href:t.website,target:"_blank",rel:"noreferrer",children:e.jsxs(P,{variant:"outline",className:"border-primary-foreground/30 text-primary-foreground hover:bg-primary-foreground/10",children:[e.jsx(_t,{className:"w-4 h-4 mr-2"})," Visit Website"]})})})]}),a&&e.jsxs("div",{className:"flex gap-4 md:gap-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-primary-foreground",children:s}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Member Companies"})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"text-2xl font-bold text-primary-foreground",children:[(a.profileViews30d/1e3).toFixed(1),"k"]}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Views/30d"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-2xl font-bold text-primary-foreground",children:a.followsCount.toLocaleString()}),e.jsx("div",{className:"text-xs text-primary-foreground/70",children:"Followers"})]})]})]})]})}),e.jsx("section",{className:"py-8",children:e.jsxs("div",{className:"container mx-auto px-4 space-y-6",children:[e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Group Overview"})}),e.jsxs($,{className:"space-y-4",children:[t.website&&e.jsxs("div",{className:"flex items-center gap-2 text-sm text-accent",children:[e.jsx(_t,{className:"w-4 h-4"}),e.jsx("a",{href:t.website,target:"_blank",rel:"noreferrer",className:"hover:underline",children:t.website.replace(/^https?:\/\//,"")})]}),t.description?e.jsx("p",{className:"text-muted-foreground",children:t.description}):e.jsx("p",{className:"text-muted-foreground",children:"No group description available yet."})]})]}),e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Member Companies"})}),e.jsxs($,{className:"space-y-3",children:[s===0&&e.jsx("p",{className:"text-muted-foreground",children:"No member companies listed."}),(r=t.companies)==null?void 0:r.map(i=>{var c,h,d;const l=i.isPrimary||i.id===t.primaryCompanyId;return e.jsxs("div",{className:`flex flex-col md:flex-row md:items-center md:justify-between gap-3 rounded-lg border p-4 ${l?"border-accent/40 bg-accent/5":"border-border"}`,children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:`/companies/${i.slug}`,className:"font-semibold hover:text-accent",children:i.name}),l&&e.jsx(_,{className:"bg-accent/10 text-accent border-accent/20",children:"Primary"})]}),((c=i.overview)==null?void 0:c.shortDescription)&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:i.overview.shortDescription})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-sm text-muted-foreground",children:[((h=i.overview)==null?void 0:h.headquarters)&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Me,{className:"w-4 h-4"}),i.overview.headquarters.city,", ",i.overview.headquarters.country]}),((d=i.overview)==null?void 0:d.employeeRange)&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(De,{className:"w-4 h-4"}),i.overview.employeeRange]})]})]},i.id)})]})]}),a&&e.jsxs(V,{children:[e.jsx(re,{children:e.jsx(oe,{children:"Group Intelligence"})}),e.jsxs($,{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(We,{className:"w-4 h-4"})," Followers"]}),e.jsx("div",{className:"text-2xl font-semibold mt-2",children:a.followsCount.toLocaleString()})]}),e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Ve,{className:"w-4 h-4"})," Hiring Intensity"]}),e.jsx("div",{className:"text-2xl font-semibold mt-2",children:a.hiringIntensity})]}),e.jsxs("div",{className:"rounded-lg border border-border/60 p-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(De,{className:"w-4 h-4"})," Top Viewing Countries"]}),e.jsx("div",{className:"text-sm font-medium mt-2",children:a.topViewingCountries.join(", ")||"No data"})]})]})]})]})})]})},EF=(t,a)=>{const{buildUrl:s,initialData:n}=a,[r,i]=p.useState(n??null),[l,c]=p.useState(!n),h=p.useMemo(()=>s(t),[s,t]);return p.useEffect(()=>{let d=!1;return c(!0),fetch(h).then(u=>{if(!u.ok)throw new Error(`Failed to load companies: ${u.status}`);return u.json()}).then(u=>{d||i(AF(u))}).catch(u=>{console.error(u)}).finally(()=>{d||c(!1)}),()=>{d=!0}},[h]),{data:r,loading:l}},V7={query:"",filters:{},sort:"popularity_desc",page:1,pageSize:50,scope:"company"},Yt=(t,a)=>{var s;return((s=t.get(a))==null?void 0:s.split(",").filter(Boolean))??[]},L9=(t,a)=>{const s=Number(t);return Number.isFinite(s)&&s>0?s:a},OF=t=>{var s,n,r,i,l,c,h;const a=new URLSearchParams;return t.query&&a.set("query",t.query),t.sort&&a.set("sort",t.sort),t.scope&&t.scope!=="company"&&a.set("scope",t.scope),t.segment&&a.set("segment",t.segment),t.subcategory&&a.set("subcategory",t.subcategory),t.region&&a.set("region",t.region),a.set("page",String(t.page)),a.set("pageSize",String(t.pageSize)),t.filters.companyType&&a.set("filters[companyType]",t.filters.companyType),(s=t.filters.country)!=null&&s.length&&a.set("filters[country]",t.filters.country.join(",")),(n=t.filters.products)!=null&&n.length&&a.set("filters[products]",t.filters.products.join(",")),(r=t.filters.employees)!=null&&r.length&&a.set("filters[employees]",t.filters.employees.join(",")),(i=t.filters.verticals)!=null&&i.length&&a.set("filters[verticals]",t.filters.verticals.join(",")),(l=t.filters.productCategories)!=null&&l.length&&a.set("filters[productCategories]",t.filters.productCategories.join(",")),(c=t.filters.openRoles)!=null&&c.length&&a.set("filters[openRoles]",t.filters.openRoles.join(",")),(h=t.filters.yearsActive)!=null&&h.length&&a.set("filters[yearsActive]",t.filters.yearsActive.join(",")),t.filters.hiringNow&&a.set("filters[hiringNow]","true"),t.filters.claimedOnly&&a.set("filters[claimedOnly]","true"),t.filters.hasLicenses&&a.set("filters[hasLicenses]","true"),t.filters.hasAwards&&a.set("filters[hasAwards]","true"),a.toString()},BF=(t,a=V7)=>{const s=new URLSearchParams(t),n=s.get("scope"),r=n==="group"||n==="company"?n:a.scope,i=s.get("query")??s.get("search")??a.query??"",l=s.get("pageSize")??s.get("page_size");return{...a,query:i,sort:s.get("sort")??a.sort,page:L9(s.get("page"),a.page),pageSize:L9(l,a.pageSize),scope:r,segment:s.get("segment")??a.segment,subcategory:s.get("subcategory")??a.subcategory,region:s.get("region")??a.region,filters:{companyType:s.get("filters[companyType]")??s.get("companyType")??a.filters.companyType,country:Yt(s,"filters[country]").concat(Yt(s,"country")),products:Yt(s,"filters[products]").concat(Yt(s,"products")),employees:Yt(s,"filters[employees]").concat(Yt(s,"employees")).concat(Yt(s,"employeeRanges")),verticals:Yt(s,"filters[verticals]").concat(Yt(s,"verticals")),productCategories:Yt(s,"filters[productCategories]").concat(Yt(s,"productCategories")),openRoles:Yt(s,"filters[openRoles]").concat(Yt(s,"openRoles")),yearsActive:Yt(s,"filters[yearsActive]").concat(Yt(s,"yearsActive")),hiringNow:["true","1","yes"].includes(s.get("filters[hiringNow]")??s.get("hiringNow")??""),claimedOnly:["true","1","yes"].includes(s.get("filters[claimedOnly]")??s.get("claimedOnly")??""),hasLicenses:["true","1","yes"].includes(s.get("filters[hasLicenses]")??s.get("hasLicenses")??""),hasAwards:["true","1","yes"].includes(s.get("filters[hasAwards]")??s.get("hasAwards")??"")}}},HF=t=>({...EI,search:t.query??"",companyType:t.filters.companyType??"",verticals:t.filters.verticals??[],productCategories:t.filters.productCategories??[],employeeRanges:t.filters.employees??[],products:t.filters.products??[],openRolesRanges:t.filters.openRoles??[],yearsActiveRanges:t.filters.yearsActive??[],hiringNow:t.filters.hiringNow??!1,scope:t.scope,claimedOnly:t.filters.claimedOnly??!1,hasLicenses:t.filters.hasLicenses??!1,hasAwards:t.filters.hasAwards??!1}),VF=t=>({companyType:t.companyType||void 0,verticals:t.verticals.length?t.verticals:void 0,productCategories:t.productCategories.length?t.productCategories:void 0,employees:t.employeeRanges.length?t.employeeRanges:void 0,products:t.products.length?t.products:void 0,openRoles:t.openRolesRanges.length?t.openRolesRanges:void 0,yearsActive:t.yearsActiveRanges.length?t.yearsActiveRanges:void 0,hiringNow:t.hiringNow||void 0,claimedOnly:t.claimedOnly||void 0,hasLicenses:t.hasLicenses||void 0,hasAwards:t.hasAwards||void 0}),GF={companyTypes:[],verticals:[],productCategories:[],employeeRanges:[],products:[],openRolesRanges:[],yearsActiveRanges:[]},UF=[{value:"popularity",label:"Most Active"},{value:"name_asc",label:"Name (A-Z)"},{value:"name_desc",label:"Name (Z-A)"},{value:"employees",label:"Company Size"}],$F=4,WF=({initialData:t,initialFilterOptions:a,buildUrl:s,initialQuery:n,maxCompare:r=$F,sortOptions:i=UF,followDisabled:l=!1,followLoading:c=!1,onToggleFollow:h,onFollowAction:d,saveDisabled:u=!1,saveLoading:x=!1,onToggleSave:y,onSaveAction:m})=>{const[g,f]=p.useState(()=>n||(typeof window>"u"?V7:BF(window.location.search,V7))),[v,k]=p.useState("list"),[M,N]=p.useState(a),{data:b,loading:S}=EF(g,{buildUrl:s,initialData:t}),L=b??t,C=S&&!b,j=p.useMemo(()=>HF(g),[g]);p.useEffect(()=>{if(typeof window>"u")return;const D=OF(g),q=D?`${window.location.pathname}?${D}`:window.location.pathname;window.history.replaceState(null,"",q)},[g]),p.useEffect(()=>{b!=null&&b.filterOptions&&N({...GF,...b.filterOptions})},[b]);const w=D=>{f(q=>({...q,query:D.search,scope:D.scope,filters:VF(D),page:1}))},I=()=>{w(EI)},T=D=>{f(q=>({...q,page:D}))},A=D=>{f(q=>({...q,pageSize:D,page:1}))},R=()=>{k(D=>D==="grid"?"list":"grid")};return e.jsx(VI,{companies:L.results,loading:C,page:L.page,pageSize:L.pageSize||g.pageSize,totalCount:L.count,totalPages:L.totalPages,onPageChange:T,onPageSizeChange:A,filters:j,filterOptions:M,onFiltersChange:w,onClearFilters:I,viewMode:v,onViewModeChange:R,maxCompare:r,sortOptions:i,followDisabled:l,followLoading:c,onToggleFollow:h,onFollowAction:d,saveDisabled:u,saveLoading:x,onToggleSave:y,onSaveAction:m})},ZF=({isClaimed:t,canClaim:a,onClaimClick:s})=>t||!a?null:e.jsx(P,{type:"button",variant:"ghost",className:"text-primary-foreground",onClick:s,children:"Claim this company"});function YF({title:t,value:a,description:s,icon:n,trend:r}){return e.jsxs(V,{children:[e.jsxs(re,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(oe,{className:"text-sm font-medium",children:t}),e.jsx(n,{className:"h-4 w-4 text-muted-foreground"})]}),e.jsxs($,{children:[e.jsx("div",{className:"text-2xl font-bold",children:a}),s&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s}),r&&e.jsxs("p",{className:`text-xs mt-1 ${r.isPositive?"text-green-600":"text-red-600"}`,children:[r.isPositive?"+":"-",r.value," from last month"]})]})]})}function JF({stats:t}){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:t.map((a,s)=>e.jsx(YF,{...a},s))})}const XF=["Sarah","Michael","Emma","James","Olivia","William","Sophia","Robert","Isabella","David","Mia","John","Charlotte","Daniel","Amelia"],KF=["Johnson","Smith","Williams","Brown","Jones","Garcia","Miller","Davis","Rodriguez","Martinez","Hernandez","Lopez","Wilson","Anderson","Thomas"],QF=["Malta","London, UK","Stockholm, Sweden","Madrid, Spain","Lisbon, Portugal","Remote","Berlin, Germany","Tallinn, Estonia","Athens, Greece"],eE=["Retention Manager","CRM Specialist","Senior Game Designer","Payments Risk Analyst","Compliance Officer","Affiliate Manager","Product Owner","VIP Support Lead","UX Researcher","Data Analyst"],I9=["Senior Backend Engineer","Game Producer","QA Lead","CRM Manager","Compliance Analyst","Fraud Specialist","Payments Manager","BI Analyst","VIP Account Manager"],u7=["Lifecycle marketing","Player engagement","Responsible gaming","SQL","Live casino ops","Fraud detection","A/B testing","Segmentation","KYC/AML","Game math","Figma","Analytics"],A9=["MGA","UKGC","DGA","B2B","Curaçao"],tE=["LinkedIn","Referral","Job board","Career page","Recruiter outreach"],aE=["new","reviewed","shortlisted","rejected"],sE=[1,2,3,4,5,null],ra=t=>t[Math.floor(Math.random()*t.length)],m7=t=>{const a=new Date;return a.setDate(a.getDate()-Math.floor(Math.random()*t)),a.toISOString()},nE=(t=32)=>Array.from({length:t}).map((a,s)=>{const n=ra(XF),r=ra(KF),i=ra(sE),l=ra(aE),c=m7(45),h=m7(14);return{id:`candidate-${s+1}`,firstName:n,lastName:r,title:ra(eE),location:ra(QF),appliedDate:c,lastActive:h,source:ra(tE),yearsExperience:Math.floor(Math.random()*8)+2,status:l,rating:i,skills:Array.from(new Set([ra(u7),ra(u7),ra(u7)])).slice(0,3),licenses:Array.from(new Set([ra(A9),ra(A9)])).slice(0,2),appliedJobs:Array.from(new Set([ra(I9),ra(I9)])).slice(0,2),notes:[{id:`note-${s}-1`,author:"Recruiter",note:"Strong iGaming domain knowledge with proven retention wins.",createdAt:m7(20),isInternal:!0}]}}),p7={new:"New",reviewed:"Reviewed",shortlisted:"Shortlisted",rejected:"Rejected"},P9={new:"outline",reviewed:"secondary",shortlisted:"default",rejected:"destructive"},WI=({candidate:t,canEdit:a=!1,onNameClick:s,onStatusChange:n,onRatingChange:r,onAddNote:i})=>{const[l,c]=p.useState(""),[h,d]=p.useState(!0),u=p.useMemo(()=>`${t.firstName} ${t.lastName}`,[t.firstName,t.lastName]),x=p.useMemo(()=>new Date(t.appliedDate).toLocaleDateString(),[t.appliedDate]),y=p.useMemo(()=>new Date(t.lastActive).toLocaleDateString(),[t.lastActive]),m=()=>{!l.trim()||!i||(i(t.id,l.trim(),h),c(""))};return e.jsxs(V,{className:"border-muted/60",children:[e.jsxs(re,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(P,{variant:"link",className:"h-auto p-0 text-lg font-semibold",onClick:()=>s==null?void 0:s(t.id),children:u}),e.jsx(_,{variant:P9[t.status],children:p7[t.status]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Te,{className:"h-4 w-4"}),t.location]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(be,{className:"h-4 w-4"}),t.yearsExperience,"+ yrs"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Pa,{className:"h-4 w-4"}),"Applied ",x]})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:items-end",children:[a?e.jsxs(Ze,{value:t.status,onValueChange:g=>n==null?void 0:n(t.id,g),children:[e.jsx(Be,{className:"w-44",children:e.jsx(Ye,{placeholder:"Update status"})}),e.jsx(He,{children:Object.entries(p7).map(([g,f])=>e.jsx(me,{value:g,children:f},g))})]}):e.jsxs(_,{variant:P9[t.status],children:["Status: ",p7[t.status]]}),e.jsxs("div",{className:"flex items-center gap-1",children:[Array.from({length:5}).map((g,f)=>{const v=f+1,k=t.rating!==null&&t.rating>=v;return e.jsx(P,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>a&&(r==null?void 0:r(t.id,v)),disabled:!a,children:e.jsx(We,{className:k?"h-4 w-4 text-yellow-500":"h-4 w-4 text-muted-foreground"})},`${t.id}-star-${f}`)}),t.rating===null&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"Unrated"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.licenses.map(g=>e.jsx(_,{variant:"secondary",children:g},g)),t.skills.map(g=>e.jsx(_,{variant:"outline",children:g},g))]})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ga,{className:"h-4 w-4"}),"Source: ",t.source]}),e.jsxs("span",{children:["Last active ",y]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold",children:"Applied roles"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.appliedJobs.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No roles attached."}):t.appliedJobs.map(g=>e.jsx(_,{variant:"outline",children:g},g))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold",children:"Notes"}),e.jsx("div",{className:"space-y-2",children:t.notes.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No notes yet."}):t.notes.map(g=>e.jsxs("div",{className:"rounded-lg border px-3 py-2 text-sm",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[g.author," • ",new Date(g.createdAt).toLocaleDateString()]}),g.isInternal&&e.jsx(_,{variant:"outline",children:"Internal"})]}),e.jsx("p",{className:"mt-2",children:g.note})]},g.id))})]}),a&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(st,{value:l,onChange:g=>c(g.target.value),placeholder:"Add a note about this candidate...",rows:3}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(Xt,{checked:h,onCheckedChange:g=>d(!!g)}),"Internal note"]}),e.jsx(P,{size:"sm",onClick:m,disabled:!l.trim(),children:"Add note"})]})]})]})]})},rE=[{value:"all",label:"All"},{value:"new",label:"New"},{value:"reviewed",label:"Reviewed"},{value:"shortlisted",label:"Shortlisted"},{value:"rejected",label:"Rejected"}],iE={recent:"Most recent",name:"Name",rating:"Rating"},ZI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState(()=>nE()),[l,c]=p.useState(""),[h,d]=p.useState("all"),[u,x]=p.useState("recent"),[y,m]=p.useState(null),g=p.useMemo(()=>r.reduce((b,S)=>(b[S.status]+=1,b.all+=1,b),{all:0,new:0,reviewed:0,shortlisted:0,rejected:0}),[r]),f=p.useMemo(()=>{const N=l.trim().toLowerCase(),b=C=>N?[`${C.firstName} ${C.lastName}`.toLowerCase(),C.title.toLowerCase(),C.location.toLowerCase(),C.skills.join(" ").toLowerCase()].join(" ").includes(N):!0;return(h==="all"?r:r.filter(C=>C.status===h)).filter(b).sort((C,j)=>{switch(u){case"name":{const w=`${C.lastName} ${C.firstName}`.toLowerCase(),I=`${j.lastName} ${j.firstName}`.toLowerCase();return w.localeCompare(I)}case"rating":{const w=C.rating??0;return(j.rating??0)-w}case"recent":default:return new Date(j.appliedDate).getTime()-new Date(C.appliedDate).getTime()}})},[r,l,u,h]),v=(N,b)=>{i(S=>S.map(L=>L.id===N?{...L,status:b}:L)),a({type:"candidates",payload:{action:"change-status",candidateId:N,status:b}})},k=(N,b)=>{i(S=>S.map(L=>L.id===N?{...L,rating:b}:L)),a({type:"candidates",payload:{action:"rate",candidateId:N,rating:b}})},M=(N,b,S)=>{i(L=>L.map(C=>C.id===N?{...C,notes:[{id:`${N}-${Date.now()}`,author:t.name,note:b,createdAt:new Date().toISOString(),isInternal:S},...C.notes]}:C)),a({type:"candidates",payload:{action:"add-note",candidateId:N,note:b,isInternal:S}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Candidates"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Review applicants and track status updates across your pipeline."}),y&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Selected candidate:"," ",(()=>{const N=r.find(b=>b.id===y);return N?`${N.firstName} ${N.lastName}`:"Unknown"})()]})]}),s&&e.jsx(_,{variant:"secondary",className:"w-fit",children:"Syncing updates..."})]}),e.jsxs(V,{children:[e.jsxs(re,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(oe,{children:"Pipeline overview"}),e.jsx(Ie,{children:"Filter, sort, and review candidate activity."})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:rE.map(N=>e.jsxs(P,{variant:h===N.value?"default":"outline",size:"sm",onClick:()=>d(N.value),children:[N.label,e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:g[N.value]})]},N.value))}),e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[e.jsx(se,{placeholder:"Search by name, role, or skill",value:l,onChange:N=>c(N.target.value),className:"md:max-w-sm"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Sort by"}),e.jsxs(Ze,{value:u,onValueChange:N=>x(N),children:[e.jsx(Be,{className:"w-40",children:e.jsx(Ye,{placeholder:"Sort by"})}),e.jsx(He,{children:Object.entries(iE).map(([N,b])=>e.jsx(me,{value:N,children:b},N))})]})]})]})]}),e.jsx($,{className:"space-y-6",children:f.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No candidates match the current filters."}):e.jsx("div",{className:"space-y-6",children:f.map(N=>e.jsx(WI,{candidate:N,canEdit:n,onNameClick:m,onStatusChange:v,onRatingChange:k,onAddNote:M},N.id))})})]})]})},wn=ya.Root,oE=ya.Portal,YI=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Overlay,{className:ie("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...a,ref:s}));YI.displayName=ya.Overlay.displayName;const zs=ce.forwardRef(({className:t,...a},s)=>e.jsxs(oE,{children:[e.jsx(YI,{}),e.jsx(ya.Content,{ref:s,className:ie("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",t),...a})]}));zs.displayName=ya.Content.displayName;const qs=({className:t,...a})=>e.jsx("div",{className:ie("flex flex-col space-y-2 text-center sm:text-left",t),...a});qs.displayName="AlertDialogHeader";const Fs=({className:t,...a})=>e.jsx("div",{className:ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...a});Fs.displayName="AlertDialogFooter";const Es=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Title,{ref:s,className:ie("text-lg font-semibold",t),...a}));Es.displayName=ya.Title.displayName;const Os=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Description,{ref:s,className:ie("text-sm text-muted-foreground",t),...a}));Os.displayName=ya.Description.displayName;const Cn=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Action,{ref:s,className:ie(J7(),t),...a}));Cn.displayName=ya.Action.displayName;const Bs=ce.forwardRef(({className:t,...a},s)=>e.jsx(ya.Cancel,{ref:s,className:ie(J7({variant:"outline"}),"mt-2 sm:mt-0",t),...a}));Bs.displayName=ya.Cancel.displayName;const lE=({open:t,onClose:a,onSave:s,existingEvent:n})=>{const[r,i]=p.useState({title:"",date:"",location:"",description:"",url:""});p.useEffect(()=>{i(n?{id:n.id,title:n.title,date:n.date,location:n.location,description:n.description??"",url:n.url??""}:{title:"",date:"",location:"",description:"",url:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`event-${Date.now()}`}),i({title:"",date:"",location:"",description:"",url:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Event":"Add Event"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:r.title,onChange:h=>l("title",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Date"}),e.jsx(se,{type:"date",value:r.date,onChange:h=>l("date",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Location"}),e.jsx(se,{value:r.location,onChange:h=>l("location",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Event URL"}),e.jsx(se,{type:"url",value:r.url,onChange:h=>l("url",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},cE=(t,a)=>"eventName"in t?{id:`event-${a}`,title:t.eventName,date:t.date,location:t.location,description:"",url:""}:{id:`event-${a}`,title:t.name,date:t.startDate,location:t.location,description:"",url:""},JI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({events:t.events.upcomingEvents.map(cE)}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{a({type:"events",payload:{events:r.events}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({events:v.events.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.events.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.events];return N[M]={...N[M],...v},{events:N}}return{events:[...k.events,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Events"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Keep your event calendar current."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add event"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Upcoming events"}),e.jsx(Ie,{children:"Highlight events, meetups, and conferences."})]}),e.jsx($,{className:"space-y-4",children:r.events.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No events scheduled yet."}):e.jsx("div",{className:"space-y-4",children:r.events.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:v.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[v.date||"Date TBD"," • ",v.location||"Location TBD"]}),v.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:v.description})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(lE,{open:l,onClose:()=>c(!1),onSave:f,existingEvent:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this event?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the event from the calendar."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},dE=({open:t,onClose:a,onSave:s,existingJob:n})=>{const[r,i]=p.useState({title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"});p.useEffect(()=>{i(n?{id:n.id,title:n.title,location:n.location,employmentType:n.employmentType,description:n.description??"",requirements:n.requirements??"",status:n.status??"Draft"}:{title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`job-${Date.now()}`,status:r.status??"Draft"}),i({title:"",location:"",employmentType:"",description:"",requirements:"",status:"Draft"}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Job":"Add Job"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:r.title,onChange:h=>l("title",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Location"}),e.jsx(se,{value:r.location,onChange:h=>l("location",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Employment Type"}),e.jsx(se,{value:r.employmentType,onChange:h=>l("employmentType",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Requirements"}),e.jsx(st,{rows:4,value:r.requirements,onChange:h=>l("requirements",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},XI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const r=Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.map((M,N)=>({id:`job-${N}`,title:M,location:"",employmentType:"",description:"",requirements:"",status:"Published"})):[],[i,l]=p.useState({jobs:r}),[c,h]=p.useState(!1),[d,u]=p.useState(null),[x,y]=p.useState(null),m=()=>{a({type:"jobs",payload:{jobs:i.jobs}})},g=M=>{u(M),h(!0)},f=()=>{x&&(l(M=>({jobs:M.jobs.filter(N=>N.id!==x)})),y(null))},v=M=>{l(N=>{const b=N.jobs.findIndex(S=>S.id===M.id);if(b>=0){const S=[...N.jobs];return S[b]={...S[b],...M},{jobs:S}}return{jobs:[...N.jobs,M]}})},k=M=>{M&&l(N=>({jobs:N.jobs.map(b=>b.id===M?{...b,status:b.status==="Published"?"Draft":"Published"}:b)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Jobs"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Publish and manage open roles."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{u(null),h(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add job"]}),n&&e.jsx(P,{onClick:m,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Open roles"}),e.jsx(Ie,{children:"Manage publishing status and job details."})]}),e.jsx($,{className:"space-y-4",children:i.jobs.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No roles added yet."}):e.jsx("div",{className:"space-y-4",children:i.jobs.map(M=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:M.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[M.location||"Location not specified"," • ",M.employmentType||"Type TBD"]}),e.jsx(_,{variant:M.status==="Published"?"default":"secondary",children:M.status??"Draft"})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex flex-wrap gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>k(M.id),children:M.status==="Published"?"Unpublish":"Publish"}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>g(M),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>y(M.id??null),children:"Delete"})]})]})},M.id))})})]}),e.jsx(dE,{open:c,onClose:()=>h(!1),onSave:v,existingJob:d}),e.jsx(wn,{open:!!x,onOpenChange:()=>y(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this job?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the job posting."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:f,children:"Delete"})]})]})})]})},hE=(t,a)=>typeof t=="string"?{id:`news-${a}`,title:t,date:"",excerpt:"",status:"Published",content:"",url:""}:{id:`news-${a}`,title:t.title,date:"",excerpt:t.source,status:"Published",content:"",url:t.url},KI=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({news:t.newsAndMedia.pressMentions.map(hE)}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),[y,m]=p.useState({title:"",date:"",excerpt:"",status:"Draft",content:"",url:""});p.useEffect(()=>{m(h?{id:h.id,title:h.title,date:h.date,excerpt:h.excerpt,status:h.status,content:h.content,url:h.url??""}:{title:"",date:"",excerpt:"",status:"Draft",content:"",url:""})},[h,l]);const g=()=>{a({type:"news",payload:{news:r.news}})},f=N=>{d(N),c(!0)},v=()=>{u&&(i(N=>({news:N.news.filter(b=>b.id!==u)})),x(null))},k=()=>{const N={...y,id:(h==null?void 0:h.id)??y.id??`news-${Date.now()}`};i(b=>{const S=b.news.findIndex(L=>L.id===N.id);if(S>=0){const L=[...b.news];return L[S]=N,{news:L}}return{news:[...b.news,N]}}),c(!1),d(null)},M=N=>{N&&i(b=>({news:b.news.map(S=>S.id===N?{...S,status:S.status==="Published"?"Draft":"Published"}:S)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News & Media"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Publish announcements and press coverage."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add article"]}),n&&e.jsx(P,{onClick:g,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Latest updates"}),e.jsx(Ie,{children:"Manage your press mentions and announcements."})]}),e.jsx($,{className:"space-y-4",children:r.news.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No news items yet."}):e.jsx("div",{className:"space-y-4",children:r.news.map(N=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:N.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:N.date||"Date TBD"}),N.excerpt&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:N.excerpt}),e.jsx(_,{variant:N.status==="Published"?"default":"secondary",children:N.status})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex flex-wrap gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>M(N.id),children:N.status==="Published"?"Unpublish":"Publish"}),e.jsx(P,{variant:"outline",size:"sm",onClick:()=>f(N),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(N.id??null),children:"Delete"})]})]})},N.id))})})]}),e.jsx(tt,{open:l,onOpenChange:c,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:h?"Edit News":"Add News"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Title"}),e.jsx(se,{value:y.title,onChange:N=>m(b=>({...b,title:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Date"}),e.jsx(se,{type:"date",value:y.date,onChange:N=>m(b=>({...b,date:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Excerpt"}),e.jsx(st,{rows:3,value:y.excerpt,onChange:N=>m(b=>({...b,excerpt:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Content"}),e.jsx(st,{rows:5,value:y.content,onChange:N=>m(b=>({...b,content:N.target.value}))})]}),e.jsxs("div",{children:[e.jsx(B,{children:"URL"}),e.jsx(se,{type:"url",value:y.url,onChange:N=>m(b=>({...b,url:N.target.value}))})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:k,children:"Save"})]})]})]})}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this news item?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the news entry."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:v,children:"Delete"})]})]})})]})},uE=["Operator","Platform Provider","Game Provider","Affiliate","Payments","Agency","Other"],mE=["1-10","11-50","51-100","101-200","201-500","501-1000","1000+","5000+"],pE=["Casino","Sportsbook","Poker","Lottery","Bingo","Esports","Fantasy Sports","Live Casino"],QI=["Malta","Gibraltar","UK","Sweden","Cyprus","Isle of Man","Curacao","Poland","Spain","Germany","Netherlands","Italy","Portugal","Estonia","Latvia","Lithuania","Bulgaria","Romania","Ukraine","Serbia","Croatia","Denmark","Finland","Norway","Ireland","Switzerland","Austria","Czech Republic","Slovakia","Hungary","Greece","Belgium","France","Luxembourg","Slovenia","Bosnia and Herzegovina","North Macedonia","Albania","Montenegro","Kosovo","Moldova","Belarus","Georgia","Armenia","Azerbaijan","Kazakhstan","USA","Canada","Brazil","Mexico","Colombia","Argentina","Chile","Peru","Ecuador","Uruguay","Paraguay","Bolivia","Venezuela","Panama","Costa Rica","Guatemala","Honduras","El Salvador","Nicaragua","Dominican Republic","Puerto Rico","Jamaica","Trinidad and Tobago","Philippines","Singapore","Hong Kong","Macau","Australia","New Zealand","India","Japan","South Korea","Taiwan","Thailand","Vietnam","Indonesia","Malaysia","Cambodia","Myanmar","Sri Lanka","Bangladesh","Nepal","United Arab Emirates","Israel","South Africa","Kenya","Nigeria","Ghana","Tanzania","Uganda","Zambia","Zimbabwe","Mozambique","Morocco","Egypt","Tunisia","Senegal","Ivory Coast","Other"],xE=["Valletta","St. Julian's","Sliema","Birkirkara","Msida","Gzira","London","Manchester","Leeds","Birmingham","Edinburgh","Glasgow","Bristol","Liverpool","Sheffield","Newcastle","Nottingham","Cardiff","Belfast","Brighton","Reading","Gibraltar","St. Helier","St. Peter Port","Limassol","Nicosia","Larnaca","Paphos","Stockholm","Gothenburg","Malmö","Copenhagen","Aarhus","Helsinki","Tampere","Turku","Oslo","Bergen","Trondheim","Reykjavik","Tallinn","Tartu","Riga","Vilnius","Kaunas","Sofia","Plovdiv","Bucharest","Cluj-Napoca","Timișoara","Belgrade","Novi Sad","Warsaw","Krakow","Wrocław","Gdańsk","Poznań","Kyiv","Lviv","Kharkiv","Odessa","Prague","Brno","Bratislava","Košice","Budapest","Debrecen","Bucharest","Zagreb","Split","Sarajevo","Skopje","Tirana","Podgorica","Chisinau","Tbilisi","Yerevan","Baku","Almaty","Astana","Madrid","Barcelona","Valencia","Seville","Bilbao","Berlin","Hamburg","Munich","Frankfurt","Cologne","Düsseldorf","Stuttgart","Leipzig","Amsterdam","Rotterdam","The Hague","Eindhoven","Utrecht","Isle of Man","Douglas","Dublin","Cork","Galway","Zurich","Geneva","Bern","Basel","Vienna","Graz","Salzburg","Lisbon","Porto","Rome","Milan","Turin","Naples","Florence","Bologna","Paris","Lyon","Marseille","Brussels","Antwerp","Ghent","Luxembourg City","Athens","Thessaloniki","Las Vegas","New York","Miami","Los Angeles","Chicago","Atlantic City","Philadelphia","Houston","Phoenix","San Francisco","Seattle","Boston","Washington D.C.","Denver","Nashville","Toronto","Vancouver","Montreal","Calgary","Ottawa","Bogota","Medellin","Cali","Sao Paulo","Rio de Janeiro","Brasilia","Belo Horizonte","Buenos Aires","Cordoba","Rosario","Santiago","Lima","Mexico City","Guadalajara","Monterrey","Panama City","San José","Montevideo","Manila","Cebu","Singapore","Hong Kong","Macau","Sydney","Melbourne","Brisbane","Perth","Auckland","Wellington","Tokyo","Osaka","Seoul","Busan","Taipei","Bangkok","Chiang Mai","Ho Chi Minh City","Hanoi","Kuala Lumpur","Jakarta","Bali","Phnom Penh","Mumbai","Delhi","Bengaluru","Hyderabad","Chennai","Colombo","Dhaka","Dubai","Abu Dhabi","Tel Aviv","Jerusalem","Haifa","Cape Town","Johannesburg","Durban","Pretoria","Nairobi","Lagos","Accra","Dar es Salaam","Kampala","Lusaka","Harare","Casablanca","Cairo","Tunis","Dakar","Abidjan"],id=1960,eA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({companyName:t.name,foundedYear:t.overview.foundedYear,website:t.overview.website,employeeRange:t.overview.employeeRange,shortDescription:t.overview.shortDescription,longDescription:t.overview.longDescription??"",headquartersCity:t.overview.headquarters.city,headquartersCountry:t.overview.headquarters.country}),[l,c]=p.useState("idle"),[h,d]=p.useState(""),u=p.useMemo(()=>{const g=new Date().getFullYear();return Array.from({length:g-id+1},(f,v)=>g-v)},[]),x=(g,f)=>{i(v=>({...v,[g]:f}))},y=async g=>{if(!g.trim()){c("idle"),d("");return}let f;try{f=new URL(g)}catch{c("invalid"),d("Please enter a full URL, e.g. https://example.com.");return}c("checking"),d("Checking website availability...");try{const v=`https://r.jina.ai/http://${f.host}${f.pathname}${f.search}`,k=await fetch(v,{method:"GET"});if(k.ok){c("valid"),d("Website is reachable.");return}c("invalid"),d(`Website check failed with status ${k.status}.`),alert(`Invalid website: ${g}. Please verify the URL.`)}catch{c("invalid"),d("Unable to verify website right now."),alert(`Invalid website: ${g}. Please verify the URL.`)}},m=()=>{if(r.foundedYear<id||r.foundedYear>new Date().getFullYear()){alert(`Founded year must be between ${id} and ${new Date().getFullYear()}.`);return}a({type:"overview",payload:r})};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("datalist",{id:"company-overview-country-suggestions",children:QI.map(g=>e.jsx("option",{value:g},g))}),e.jsx("datalist",{id:"company-overview-city-suggestions",children:xE.map(g=>e.jsx("option",{value:g},g))}),e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Company Overview"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your company information"})]}),n&&e.jsx(P,{onClick:m,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Company details"}),e.jsx(Ie,{children:"Keep your profile accurate and up to date."})]}),e.jsxs($,{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"companyName",children:"Company Name"}),n?e.jsx(se,{id:"companyName",value:r.companyName,onChange:g=>x("companyName",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.companyName})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"foundedYear",children:"Founded Year"}),n?e.jsx(se,{id:"foundedYear",type:"number",min:id,max:new Date().getFullYear(),list:"company-overview-founded-year-options",value:r.foundedYear,onChange:g=>x("foundedYear",Number(g.target.value))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.foundedYear}),e.jsx("datalist",{id:"company-overview-founded-year-options",children:u.map(g=>e.jsx("option",{value:g},g))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"website",children:"Website"}),n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative",children:[e.jsx(se,{id:"website",type:"url",value:r.website,onChange:g=>x("website",g.target.value),onBlur:g=>{y(g.target.value)},className:"pr-9"}),e.jsxs("div",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center",children:[l==="checking"&&e.jsx($e,{className:"h-4 w-4 animate-spin text-muted-foreground"}),l==="valid"&&e.jsx(qe,{className:"h-4 w-4 text-green-600"}),l==="invalid"&&e.jsx(Na,{className:"h-4 w-4 text-red-600"})]})]}),h&&e.jsx("p",{className:`text-xs ${l==="invalid"?"text-red-600":"text-muted-foreground"}`,children:h})]}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.website})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"employeeRange",children:"Employee Range"}),n?e.jsx(se,{id:"employeeRange",list:"company-overview-employee-range-options",value:r.employeeRange,onChange:g=>x("employeeRange",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.employeeRange}),e.jsx("datalist",{id:"company-overview-employee-range-options",children:mE.map(g=>e.jsx("option",{value:g},g))})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(B,{htmlFor:"shortDescription",children:"Short Description"}),n?e.jsx(st,{id:"shortDescription",rows:3,value:r.shortDescription,onChange:g=>x("shortDescription",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.shortDescription})]}),e.jsxs("div",{className:"space-y-2 md:col-span-2",children:[e.jsx(B,{htmlFor:"longDescription",children:"Long Description"}),n?e.jsx(st,{id:"longDescription",rows:6,value:r.longDescription,onChange:g=>x("longDescription",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.longDescription})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"headquartersCity",children:"Headquarters City"}),n?e.jsx(se,{id:"headquartersCity",list:"company-overview-city-suggestions",value:r.headquartersCity,onChange:g=>x("headquartersCity",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.headquartersCity})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"headquartersCountry",children:"Headquarters Country"}),n?e.jsx(se,{id:"headquartersCountry",list:"company-overview-country-suggestions",value:r.headquartersCountry,onChange:g=>x("headquartersCountry",g.target.value)}):e.jsx("p",{className:"text-sm text-muted-foreground",children:r.headquartersCountry})]}),l==="invalid"&&n&&e.jsx("div",{className:"md:col-span-2 rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700",children:e.jsxs("p",{className:"flex items-center gap-2 font-medium",children:[e.jsx(Qt,{className:"h-4 w-4"}),"The entered website appears invalid. Please verify before saving."]})})]})]})]})},yE=({open:t,onClose:a,onSave:s,existingPerson:n})=>{const[r,i]=p.useState({name:"",role:"",linkedIn:"",email:""});p.useEffect(()=>{i(n?{id:n.id,name:n.name,role:n.role,linkedIn:n.linkedIn??"",email:n.email??""}:{name:"",role:"",linkedIn:"",email:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`person-${Date.now()}`}),i({name:"",role:"",linkedIn:"",email:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Team Member":"Add Team Member"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Name"}),e.jsx(se,{value:r.name,onChange:h=>l("name",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Role"}),e.jsx(se,{value:r.role,onChange:h=>l("role",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"LinkedIn"}),e.jsx(se,{value:r.linkedIn,onChange:h=>l("linkedIn",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Email"}),e.jsx(se,{type:"email",value:r.email,onChange:h=>l("email",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},tA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({members:t.people.members.map((v,k)=>({id:`person-${k}`,name:v.name,role:v.title,linkedIn:v.profileUrl??"",email:""}))}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{const v=r.members.map(k=>({name:k.name,title:k.role,profileUrl:k.linkedIn}));a({type:"people",payload:{members:v}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({members:v.members.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.members.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.members];return N[M]={...N[M],...v},{members:N}}return{members:[...k.members,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"People"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your leadership and team members."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add member"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Team directory"}),e.jsx(Ie,{children:"Highlight decision makers and team contacts."})]}),e.jsx($,{className:"space-y-4",children:r.members.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No team members added yet."}):e.jsx("div",{className:"space-y-4",children:r.members.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"font-semibold",children:v.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:v.role}),v.linkedIn&&e.jsx("a",{href:v.linkedIn,target:"_blank",rel:"noreferrer",className:"text-sm text-primary underline",children:"LinkedIn profile"})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(yE,{open:l,onClose:()=>c(!1),onSave:f,existingPerson:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this team member?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the member from your list."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},gE=({open:t,onClose:a,onSave:s,existingProduct:n})=>{const[r,i]=p.useState({name:"",category:"",description:"",url:""});p.useEffect(()=>{i(n?{id:n.id,name:n.name,category:n.category,description:n.description,url:n.url??""}:{name:"",category:"",description:"",url:""})},[n,t]);const l=(h,d)=>i(u=>({...u,[h]:d})),c=()=>{s({...r,id:(n==null?void 0:n.id)??r.id??`product-${Date.now()}`}),i({name:"",category:"",description:"",url:""}),a()};return e.jsx(tt,{open:t,onOpenChange:a,children:e.jsxs(Xe,{children:[e.jsx(Se,{children:n?"Edit Product":"Add Product"}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Name"}),e.jsx(se,{value:r.name,onChange:h=>l("name",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Category"}),e.jsx(se,{value:r.category,onChange:h=>l("category",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"Description"}),e.jsx(st,{rows:4,value:r.description,onChange:h=>l("description",h.target.value)})]}),e.jsxs("div",{children:[e.jsx(B,{children:"URL"}),e.jsx(se,{type:"url",value:r.url,onChange:h=>l("url",h.target.value)})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(P,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(P,{onClick:c,children:"Save"})]})]})]})})},aA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const[r,i]=p.useState({products:t.productsAndServices.map((v,k)=>({id:`product-${k}`,...v}))}),[l,c]=p.useState(!1),[h,d]=p.useState(null),[u,x]=p.useState(null),y=()=>{a({type:"products",payload:{products:r.products}})},m=v=>{d(v),c(!0)},g=()=>{u&&(i(v=>({products:v.products.filter(k=>k.id!==u)})),x(null))},f=v=>{i(k=>{const M=k.products.findIndex(N=>N.id===v.id);if(M>=0){const N=[...k.products];return N[M]={...N[M],...v},{products:N}}return{products:[...k.products,v]}})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Products & Services"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Showcase the offerings that define your company."})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&e.jsxs(P,{variant:"outline",onClick:()=>{d(null),c(!0)},children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add product"]}),n&&e.jsx(P,{onClick:y,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Product catalog"}),e.jsx(Ie,{children:"Update categories, descriptions, and links."})]}),e.jsx($,{className:"space-y-4",children:r.products.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No products added yet."}):e.jsx("div",{className:"space-y-4",children:r.products.map(v=>e.jsx("div",{className:"p-4 border rounded-lg space-y-2 relative group",children:e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h4",{className:"font-semibold",children:v.name}),v.category&&e.jsx(_,{variant:"secondary",children:v.category}),v.description&&e.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:v.description})]}),n&&e.jsxs("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-2",children:[e.jsx(P,{variant:"outline",size:"sm",onClick:()=>m(v),children:"Edit"}),e.jsx(P,{variant:"destructive",size:"sm",onClick:()=>x(v.id??null),children:"Delete"})]})]})},v.id))})})]}),e.jsx(gE,{open:l,onClose:()=>c(!1),onSave:f,existingProduct:h}),e.jsx(wn,{open:!!u,onOpenChange:()=>x(null),children:e.jsxs(zs,{children:[e.jsxs(qs,{children:[e.jsx(Es,{children:"Delete this product?"}),e.jsx(Os,{children:"This action cannot be undone and will remove the product from your catalog."})]}),e.jsxs(Fs,{children:[e.jsx(Bs,{children:"Cancel"}),e.jsx(Cn,{onClick:g,children:"Delete"})]})]})})]})},sA=({company:t,onUpdate:a,isSaving:s=!1,canEdit:n=!1})=>{const r={visibility:t.claimedStatus==="claimed",notifications:{jobAlerts:!0,newsAlerts:!0,eventAlerts:!1},integrations:{slackEnabled:!1,webhookUrl:""},team:t.people.members.map((g,f)=>({id:`team-${f}`,name:g.name,role:g.title}))},i=t.settings,[l,c]=p.useState({...r,...i,notifications:{...r.notifications,...i==null?void 0:i.notifications},integrations:{...r.integrations,...i==null?void 0:i.integrations},team:(i==null?void 0:i.team)??r.team}),h=()=>{a({type:"settings",payload:l})},d=g=>{c(f=>({...f,notifications:{...f.notifications,[g]:!f.notifications[g]}}))},u=()=>{c(g=>({...g,integrations:{...g.integrations,slackEnabled:!g.integrations.slackEnabled}}))},x=(g,f)=>{c(v=>({...v,team:v.team.map(k=>k.id===g?{...k,role:f}:k)}))},y=()=>{c(g=>({...g,team:[...g.team,{id:`team-${Date.now()}`,name:"New member",role:"Contributor"}]}))},m=g=>{c(f=>({...f,team:f.team.filter(v=>v.id!==g)}))};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Control visibility, notifications, and team roles."})]}),n&&e.jsx(P,{onClick:h,disabled:s,children:s?e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):"Save Changes"})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Visibility & notifications"}),e.jsx(Ie,{children:"Adjust how your company appears and who gets notified."})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Public profile"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Show your company in the directory."})]}),e.jsx(kt,{checked:l.visibility,onCheckedChange:()=>n&&c(g=>({...g,visibility:!g.visibility})),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Job alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Notify recruiters about new applicants."})]}),e.jsx(kt,{checked:l.notifications.jobAlerts,onCheckedChange:()=>n&&d("jobAlerts"),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"News alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Send weekly press mention updates."})]}),e.jsx(kt,{checked:l.notifications.newsAlerts,onCheckedChange:()=>n&&d("newsAlerts"),disabled:!n})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Event alerts"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Notify teams about upcoming events."})]}),e.jsx(kt,{checked:l.notifications.eventAlerts,onCheckedChange:()=>n&&d("eventAlerts"),disabled:!n})]})]})]}),e.jsxs(V,{children:[e.jsxs(re,{children:[e.jsx(oe,{children:"Integrations"}),e.jsx(Ie,{children:"Connect your workspace tools."})]}),e.jsxs($,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(B,{children:"Slack notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Send updates to a Slack channel."})]}),e.jsx(kt,{checked:l.integrations.slackEnabled,onCheckedChange:()=>n&&u(),disabled:!n})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(B,{htmlFor:"webhookUrl",children:"Webhook URL"}),n?e.jsx(se,{id:"webhookUrl",value:l.integrations.webhookUrl,onChange:g=>c(f=>({...f,integrations:{...f.integrations,webhookUrl:g.target.value}}))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:l.integrations.webhookUrl||"No webhook configured"})]})]})]})]}),e.jsxs(V,{children:[e.jsxs(re,{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx(oe,{children:"Team roles"}),e.jsx(Ie,{children:"Assign roles for company administrators."})]}),n&&e.jsxs(P,{variant:"outline",onClick:y,children:[e.jsx(St,{className:"mr-2 h-4 w-4"}),"Add member"]})]}),e.jsx($,{className:"space-y-4",children:l.team.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No team members assigned."}):l.team.map(g=>e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:g.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:g.role})]}),n&&e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(se,{className:"w-48",value:g.role,onChange:f=>x(g.id,f.target.value)}),e.jsx(P,{variant:"ghost",size:"icon",onClick:()=>m(g.id),children:e.jsx(un,{className:"h-4 w-4"})})]})]},g.id))})]})]})},fE=["Operator","Game Provider","Platform Provider","Affiliate","Payments","KYC/AML","Marketing","Hosting/Infrastructure","Legal/Compliance","Recruitment"],vE=ce.createContext(null),kE={overview:Ga,products:Me,people:De,jobs:be,candidates:mn,news:mn,events:Pa,settings:Za},bE={overview:"Overview",products:"Products",people:"People",jobs:"Jobs",events:"Events",news:"News",candidates:"Candidates",settings:"Settings"},jE={canViewOverview:"Overview",canManageProducts:"Products",canManagePeople:"People",canManageJobs:"Jobs",canManageEvents:"Events",canManageNews:"News",canManageCandidates:"Candidates",canManageSettings:"Settings"},wE={overview:"canViewOverview",products:"canManageProducts",people:"canManagePeople",jobs:"canManageJobs",events:"canManageEvents",news:"canManageNews",candidates:"canManageCandidates",settings:"canManageSettings"},ME=["overview","products","people","jobs","events","news","candidates","settings"],NE=({company:t,companyName:a,companySlug:s,activeTab:n,visibleTabs:r,onTabChange:i,role:l,permissions:c,summaryStats:h,onUpdate:d,isSaving:u})=>{const x=a??t.name,y=s??t.slug,m=l??"admin",g=r??ME,f=ce.useMemo(()=>{var A,R,D;if(h)return h;const I=Array.isArray(t.jobs.openRoles)?t.jobs.openRoles.length:t.jobs.openRoles,T=(((A=t.trustAndCompliance.licenses)==null?void 0:A.length)??0)+(((R=t.trustAndCompliance.certifications)==null?void 0:R.length)??0)+(((D=t.trustAndCompliance.awards)==null?void 0:D.length)??0);return[{title:"Open roles",value:I,description:"Live listings",icon:be},{title:"Team members",value:t.people.members.length,description:"Listed people",icon:De},{title:"Trust signals",value:T,description:"Licenses & awards",icon:la}]},[t,h]),[v,k]=ce.useState(()=>n??g[0]??"overview"),M=n??v,N=Object.entries(jE).filter(([I])=>!!c[I]),b=ce.useMemo(()=>g.filter(I=>{const T=wE[I];return c[T]!==!1}),[c,g]),S=b.includes(M),L=ce.useCallback(I=>{i==null||i(I),n===void 0&&k(I)},[n,i]),C=ce.useCallback(I=>d==null?void 0:d(I),[d]);ce.useEffect(()=>{!S&&b.length>0&&L(b[0])},[L,S,b]);const j=ce.useMemo(()=>b.map(I=>({value:I,label:bE[I],icon:kE[I]})),[b]),w=()=>{switch(M){case"overview":return e.jsx(eA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canViewOverview});case"products":return e.jsx(aA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageProducts});case"people":return e.jsx(tA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManagePeople});case"jobs":return e.jsx(XI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageJobs});case"events":return e.jsx(JI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageEvents});case"news":return e.jsx(KI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageNews});case"candidates":return e.jsx(ZI,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageCandidates});case"settings":return e.jsx(sA,{company:t,onUpdate:C,isSaving:u,canEdit:c.canManageSettings});default:return null}};return e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(GI,{companyName:x,isAdminView:!0,role:m,enabledPermissions:N,overview:t.overview,classification:t.classification,companyType:fE[0],companyId:y,companySlug:y,claimedStatus:"claimed",signalsAndInsights:t.signalsAndInsights,openRolesCount:0,trustScore:0}),f.length>0?e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx(JF,{stats:f})})}):null,e.jsx("section",{className:"py-6",children:e.jsx("div",{className:"container mx-auto px-4",children:b.length>0?e.jsxs(ls,{value:M,onValueChange:I=>L(I),children:[e.jsx(UI,{items:j}),S?e.jsx(ve,{value:M,className:"mt-6",children:e.jsx(vE.Provider,{value:{onUpdate:C,isSaving:u,permissions:c},children:e.jsx("div",{className:"rounded-2xl border bg-background p-6 shadow-sm",children:w()})})}):null]}):null})})]})},CE=({companyName:t,companySlug:a,open:s,onOpenChange:n,onSave:r})=>{const[i,l]=p.useState({companyName:t,companySlug:a,shortDescription:"",website:""}),c=()=>{r==null||r(i),n(!1)};return e.jsx(tt,{open:s,onOpenChange:n,children:e.jsxs(Xe,{className:"sm:max-w-[520px]",children:[e.jsxs(Fe,{children:[e.jsx(Se,{children:"Edit company profile"}),e.jsx(nt,{children:"Update company details for admins with profile permissions. This dialog is layout-only and does not perform any API calls."})]}),e.jsxs("div",{className:"grid gap-4 py-2",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-name",children:"Company name"}),e.jsx(se,{id:"admin-company-name",value:i.companyName,onChange:h=>l(d=>({...d,companyName:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-slug",children:"Company slug"}),e.jsx(se,{id:"admin-company-slug",value:i.companySlug,onChange:h=>l(d=>({...d,companySlug:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-description",children:"Short description"}),e.jsx(st,{id:"admin-company-description",rows:4,value:i.shortDescription,onChange:h=>l(d=>({...d,shortDescription:h.target.value}))})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(B,{htmlFor:"admin-company-website",children:"Website"}),e.jsx(se,{id:"admin-company-website",value:i.website,onChange:h=>l(d=>({...d,website:h.target.value}))})]})]}),e.jsxs(et,{children:[e.jsx(P,{variant:"outline",onClick:()=>n(!1),children:"Cancel"}),e.jsx(P,{variant:"accent",onClick:c,children:"Save changes"})]})]})})},SE=(t,a)=>t[a]===!0,LE=t=>Object.entries(t).filter(([a,s])=>s===!0).map(([a])=>a),IE=({slug:t,title:a,department:s,description:n,typicalTimeline:r,keySkills:i,nodesCount:l,entryPointsCount:c,marketHotspots:h,salaryRange:d,viewMode:u="grid",onNavigate:x})=>u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/career-paths/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-accent/10 text-accent",children:e.jsx(Ve,{className:"h-6 w-6"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs",children:s})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),r]}),e.jsxs("span",{children:[l," career stages"]}),e.jsxs("span",{children:[c," entry points"]}),d&&e.jsxs("span",{className:"font-mono",children:[d.entry," → ",d.director]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/career-paths/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-accent/10 text-accent",children:e.jsx(Ve,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs mt-0.5",children:s})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:n}),e.jsx("div",{className:"mt-4 flex items-center gap-1",children:Array.from({length:l}).map((y,m)=>e.jsxs(p.Fragment,{children:[e.jsx("div",{className:`h-2 w-2 rounded-full ${m===0?"bg-accent":"bg-border group-hover:bg-accent/50"} transition-colors`}),m<l-1&&e.jsx("div",{className:"h-px flex-1 bg-border group-hover:bg-accent/30 transition-colors"})]},m))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),r]}),d&&e.jsxs("span",{className:"font-mono",children:[d.entry," → ",d.director]})]}),e.jsxs("div",{className:"mt-2 flex gap-1.5 flex-wrap",children:[i.slice(0,3).map(y=>e.jsx(_,{variant:"secondary",className:"text-xs",children:y},y)),i.length>3&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",i.length-3]})]}),h.length>0&&e.jsxs("div",{className:"mt-2 flex items-center gap-1 text-xs text-muted-foreground",children:[e.jsx(Te,{className:"h-3 w-3"}),h.join(", ")]})]}),T9={Shield:e.jsx(is,{className:"h-5 w-5"}),TrendingUp:e.jsx(Ve,{className:"h-5 w-5"}),Heart:e.jsx(Ta,{className:"h-5 w-5"}),Code:e.jsx(mc,{className:"h-5 w-5"}),Lightbulb:e.jsx(Jo,{className:"h-5 w-5"}),Megaphone:e.jsx(bc,{className:"h-5 w-5"}),CreditCard:e.jsx(vl,{className:"h-5 w-5"}),Dice1:e.jsx(xc,{className:"h-5 w-5"})},AE=({slug:t,name:a,icon:s,description:n,roleGuideCount:r,careerPathCount:i,jobCount:l,keyFunctions:c,viewMode:h="grid",onNavigate:d})=>h==="list"?e.jsxs("div",{onClick:()=>d(`/knowledge/departments/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:T9[s]||e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{children:[l," open jobs"]}),e.jsxs("span",{children:[r," role guides"]}),e.jsxs("span",{children:[i," career paths"]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>d(`/knowledge/departments/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:T9[s]||e.jsx(be,{className:"h-5 w-5"})}),e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:n}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-1.5",children:[c.slice(0,3).map(u=>e.jsx(_,{variant:"secondary",className:"text-xs",children:u},u)),c.length>3&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",c.length-3]})]}),e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-xs text-muted-foreground pt-3 border-t border-border",children:[e.jsx("span",{className:"font-semibold text-foreground",children:l})," jobs",e.jsx("span",{children:"·"}),e.jsx("span",{className:"font-semibold text-foreground",children:r})," role guides",e.jsx("span",{children:"·"}),e.jsx("span",{className:"font-semibold text-foreground",children:i})," career paths"]})]}),R9={onboarding:"bg-gaming-success/10 text-gaming-success border-gaming-success/20",transition:"bg-accent/10 text-accent border-accent/20",growth:"bg-primary/10 text-primary border-primary/20",leadership:"bg-gaming-gold/10 text-gaming-gold border-gaming-gold/20","market-entry":"bg-gaming-warning/10 text-gaming-warning border-gaming-warning/20"},PE=({slug:t,title:a,type:s,department:n,seniority:r,market:i,description:l,estimatedReadTime:c,accessLevel:h,tags:d,viewMode:u="grid",onNavigate:x})=>{const y=h!=="public";return u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/playbooks/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(Bt,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{className:`${R9[s]||"bg-muted text-muted-foreground"} text-xs border capitalize`,children:s.replace("-"," ")}),y&&e.jsx($a,{className:"h-3 w-3 text-muted-foreground"})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:l}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),c," min read"]}),e.jsx(_,{variant:"outline",className:"text-xs",children:n}),e.jsx(_,{variant:"secondary",className:"text-xs",children:r}),i&&e.jsx("span",{children:i})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/playbooks/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[y&&e.jsx("div",{className:"absolute top-3 right-3",children:e.jsx($a,{className:"h-4 w-4 text-muted-foreground"})}),e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(_,{className:`${R9[s]||"bg-muted text-muted-foreground"} text-xs border capitalize`,children:s.replace("-"," ")}),e.jsx(_,{variant:"outline",className:"text-xs",children:n})]}),e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:a}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-2 flex-1",children:l}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5",children:d.slice(0,3).map(m=>e.jsx(_,{variant:"secondary",className:"text-xs",children:m},m))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground pt-3 border-t border-border",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ft,{className:"h-3 w-3"}),c," min read"]}),e.jsxs("span",{children:[r,i?` · ${i}`:""]})]})]})},D9=t=>t==="Growing"?e.jsx(Ve,{className:"h-3 w-3 text-gaming-success"}):t==="Declining"?e.jsx(Dl,{className:"h-3 w-3 text-destructive"}):e.jsx(Sl,{className:"h-3 w-3 text-muted-foreground"}),_9=t=>t==="High"?"bg-gaming-success/10 text-gaming-success border-gaming-success/20":t==="Medium"?"bg-gaming-warning/10 text-gaming-warning border-gaming-warning/20":"bg-muted text-muted-foreground",TE=({slug:t,title:a,alternativeTitles:s,department:n,seniority:r,summary:i,demandLevel:l,growthTrend:c,markets:h,requiredSkills:d,viewMode:u="grid",onNavigate:x})=>u==="list"?e.jsxs("div",{onClick:()=>x(`/knowledge/role-guides/${t}`),className:"group relative flex items-center gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsx(_,{variant:"outline",className:"text-xs",children:n}),e.jsx(_,{variant:"secondary",className:"text-xs",children:r})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-1",children:i}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs",children:[e.jsxs(_,{className:`${_9(l)} text-xs border`,children:[l," demand"]}),e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[D9(c),c]}),h.length>0&&e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(Te,{className:"h-3 w-3"}),h.slice(0,3).join(", ")]})]})]}),e.jsx(Ft,{className:"h-5 w-5 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]}):e.jsxs("div",{onClick:()=>x(`/knowledge/role-guides/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 text-primary",children:e.jsx(be,{className:"h-5 w-5"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[n," · ",r]})]})]}),e.jsx(_,{className:`${_9(l)} text-xs border`,children:l})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 flex-1",children:i}),s.length>0&&e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Also: ",s.slice(0,2).join(", ")]}),e.jsx("div",{className:"mt-3 flex gap-1.5 flex-wrap",children:d.slice(0,3).map(y=>e.jsx(_,{variant:"secondary",className:"text-xs",children:y},y))}),e.jsxs("div",{className:"mt-3 flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[D9(c),c]}),h.length>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Te,{className:"h-3 w-3"}),h.slice(0,2).join(", ")]})]})]}),RE=({slug:t,term:a,fullName:s,definition:n,departments:r,topicCategory:i,synonyms:l=[],viewMode:c="grid",onNavigate:h})=>c==="list"?e.jsxs("div",{onClick:()=>h(`/knowledge/glossary/${t}`),className:"group relative flex items-start gap-4 rounded-lg border border-border bg-card p-4 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary font-bold text-sm font-mono",children:a.slice(0,3)}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),s&&e.jsxs("span",{className:"text-sm text-muted-foreground",children:["— ",s]})]}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:n}),e.jsxs("div",{className:"mt-2 flex items-center gap-2 flex-wrap",children:[e.jsx(_,{variant:"outline",className:"text-xs",children:i}),r.slice(0,2).map(d=>e.jsx(_,{variant:"secondary",className:"text-xs",children:d},d))]})]}),e.jsx(Lt,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0 mt-1"})]}):e.jsxs("div",{onClick:()=>h(`/knowledge/glossary/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card p-5 cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-md bg-primary/10 text-primary font-bold text-sm font-mono",children:a.slice(0,3)}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors",children:a}),s&&e.jsx("p",{className:"text-xs text-muted-foreground",children:s})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-3 flex-1",children:n}),e.jsxs("div",{className:"mt-3 flex items-center gap-1.5 flex-wrap",children:[e.jsx(_,{variant:"outline",className:"text-xs",children:i}),r.slice(0,1).map(d=>e.jsx(_,{variant:"secondary",className:"text-xs",children:d},d)),l.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground ml-auto flex items-center gap-1",children:[e.jsx(Tl,{className:"h-3 w-3"}),l.length," synonyms"]})]})]}),z9=t=>{const a=Math.floor(t/60);return a>=60?`${Math.floor(a/60)}h ${a%60}m`:`${a} min`},DE=({slug:t,title:a,description:s,thumbnailUrl:n,duration:r,speaker:i,speakerRole:l,speakerCompany:c,conference:h,departments:d,sourceType:u,viewCount:x,saveCount:y,qualityRating:m,viewMode:g="grid",onNavigate:f})=>g==="list"?e.jsxs("div",{onClick:()=>f(`/knowledge/videos/${t}`),className:"group relative flex gap-4 rounded-lg border border-border bg-card p-3 cursor-pointer transition-all hover:border-primary/30 hover:shadow-sm",children:[e.jsxs("div",{className:"relative w-48 h-28 rounded-md overflow-hidden bg-muted shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent z-10"}),e.jsxs("div",{className:"absolute bottom-2 right-2 z-20 flex items-center gap-1 bg-black/80 text-white text-xs px-1.5 py-0.5 rounded font-mono",children:[e.jsx(ft,{className:"h-3 w-3"}),z9(r)]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("div",{className:"bg-primary/90 rounded-full p-2",children:e.jsx(Wa,{className:"h-5 w-5 text-primary-foreground",fill:"currentColor"})})}),e.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover",onError:v=>{v.target.style.display="none"}})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-1",children:a}),e.jsx(_,{variant:"outline",className:"text-xs shrink-0 capitalize",children:u})]}),i&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 flex items-center gap-1",children:[e.jsx(Cl,{className:"h-3 w-3"}),i,c&&` · ${c}`]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-1",children:s}),e.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),x.toLocaleString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Dt,{className:"h-3 w-3"}),y]}),e.jsx("span",{className:"flex items-center gap-1",children:Array.from({length:m}).map((v,k)=>e.jsx(We,{className:"h-3 w-3 fill-gaming-gold text-gaming-gold"},k))}),d.slice(0,2).map(v=>e.jsx(_,{variant:"secondary",className:"text-xs",children:v},v))]})]})]}):e.jsxs("div",{onClick:()=>f(`/knowledge/videos/${t}`),className:"group relative flex flex-col rounded-lg border border-border bg-card overflow-hidden cursor-pointer transition-all hover:border-primary/30 hover:shadow-md",children:[e.jsxs("div",{className:"relative w-full aspect-video bg-muted",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent z-10"}),e.jsxs("div",{className:"absolute bottom-2 right-2 z-20 flex items-center gap-1 bg-black/80 text-white text-xs px-1.5 py-0.5 rounded font-mono",children:[e.jsx(ft,{className:"h-3 w-3"}),z9(r)]}),h&&e.jsx("div",{className:"absolute top-2 left-2 z-20",children:e.jsx(_,{className:"bg-accent text-accent-foreground text-xs",children:h})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center z-20 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("div",{className:"bg-primary/90 rounded-full p-3",children:e.jsx(Wa,{className:"h-6 w-6 text-primary-foreground",fill:"currentColor"})})}),e.jsx("img",{src:n,alt:a,className:"w-full h-full object-cover",onError:v=>{v.target.style.display="none"}})]}),e.jsxs("div",{className:"p-4 flex flex-col flex-1",children:[e.jsx("h3",{className:"font-semibold text-foreground group-hover:text-primary transition-colors line-clamp-2",children:a}),i&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-1 flex items-center gap-1",children:[e.jsx(Cl,{className:"h-3 w-3"}),i,c&&` · ${c}`]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mt-2 flex-1",children:s}),e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ns,{className:"h-3 w-3"}),x.toLocaleString()]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Dt,{className:"h-3 w-3"}),y]}),d.slice(0,1).map(v=>e.jsx(_,{variant:"secondary",className:"text-xs",children:v},v))]})]})]}),_E=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/gambling-channels/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[t.isDigital?e.jsxs(_,{className:"bg-gaming-success/10 text-gaming-success text-xs",children:[e.jsx(Qo,{className:"h-3 w-3 mr-1"}),"Digital"]}):e.jsxs(_,{variant:"secondary",className:"text-xs",children:[e.jsx(wc,{className:"h-3 w-3 mr-1"}),"Physical"]}),t.isRegulatedDifferently&&e.jsx(_,{className:"bg-gaming-warning/10 text-gaming-warning text-xs",children:"Separate regulation"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"flex items-center gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsx(Me,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"companies"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.typicalCompanyTypes.slice(0,4).map(n=>e.jsx(_,{variant:"outline",className:"text-xs capitalize",children:n.replace(/-/g," ")},n))})]}),zE={high:"bg-destructive/10 text-destructive",medium:"bg-gaming-warning/10 text-gaming-warning",low:"bg-gaming-success/10 text-gaming-success"},qE=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/gambling-verticals/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx(_,{variant:"secondary",className:"text-xs",children:t.channel}),e.jsxs(_,{className:`text-xs ${zE[t.regulationLevel]}`,children:[e.jsx(la,{className:"h-3 w-3 mr-1"}),t.regulationLevel," regulation"]}),t.isFastGrowing&&e.jsxs(_,{className:"bg-gaming-success/10 text-gaming-success text-xs",children:[e.jsx(Ve,{className:"h-3 w-3 mr-1"}),"Fast growing"]}),t.isFeatured&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"Featured"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(Me,{className:"h-3 w-3"})," Companies"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:t.topMarkets.slice(0,3).map(n=>e.jsx(_,{variant:"outline",className:"text-xs capitalize",children:n.replace(/-/g," ")},n))}),t.keyRoles[0]&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Ve,{className:"h-3 w-3 text-gaming-success"}),e.jsxs("span",{children:["Top role: ",e.jsx("strong",{className:"text-foreground",children:t.keyRoles[0].role})]})]})]}),q9={growing:{label:"Growing",cls:"text-gaming-success"},stable:{label:"Stable",cls:"text-muted-foreground"},declining:{label:"Declining",cls:"text-destructive"}},FE=({item:t,viewMode:a="grid",onNavigate:s})=>{const n=q9[t.growthTrend]??q9.stable;return e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/departments/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[t.isTechnical&&e.jsx(_,{variant:"secondary",className:"text-xs",children:"Technical"}),t.isRegulated&&e.jsx(_,{className:"bg-destructive/10 text-destructive text-xs",children:"Regulated"}),t.isIgamingSpecific&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"iGaming-specific"}),e.jsxs(_,{className:`text-xs ${n.cls} bg-transparent border border-current`,children:[e.jsx(Ve,{className:"h-3 w-3 mr-1"}),n.label]})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-sm font-bold text-foreground",children:[t.avgSalaryRange.currency==="EUR"?"€":t.avgSalaryRange.currency==="GBP"?"£":"$",Math.round(t.avgSalaryRange.min/1e3),"k–",Math.round(t.avgSalaryRange.max/1e3),"k"]}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(vs,{className:"h-3 w-3"})," Salary"]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-3",children:[t.topSkills.slice(0,4).map(r=>e.jsx(_,{variant:"outline",className:"text-xs",children:r},r)),t.topSkills.length>4&&e.jsxs(_,{variant:"outline",className:"text-xs",children:["+",t.topSkills.length-4]})]}),t.subDepartments.length>0&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.subDepartments.length," sub-departments"]})]})},EE={High:"text-gaming-success",Medium:"text-gaming-warning",Low:"text-muted-foreground"},OE=({item:t,viewMode:a="grid",onNavigate:s})=>e.jsxs(V,{className:"border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",onClick:()=>s(`/company-types/${t.slug}`),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[e.jsx(_,{variant:"secondary",className:"text-xs",children:t.businessModel.toUpperCase()}),t.isRegulated&&e.jsx(_,{className:"bg-destructive/10 text-destructive text-xs",children:"Regulated"}),t.isFeatured&&e.jsx(_,{className:"bg-primary text-primary-foreground text-xs",children:"Featured"})]}),e.jsx("h3",{className:"text-lg font-semibold text-foreground group-hover:text-accent transition-colors mb-1",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground mb-3 line-clamp-2",children:t.description}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 py-2 border-y border-border/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.jobCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(be,{className:"h-3 w-3"})," Jobs"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-lg font-bold text-foreground",children:t.companyCount.toLocaleString()}),e.jsxs("p",{className:"text-xs text-muted-foreground flex items-center justify-center gap-1",children:[e.jsx(Me,{className:"h-3 w-3"})," Companies"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-3",children:t.subtypes.slice(0,3).map(n=>e.jsx(_,{variant:"outline",className:"text-xs",children:n.name},n.slug))}),t.keyRoles[0]&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(De,{className:"h-3 w-3"}),e.jsxs("span",{children:["Top role: ",e.jsx("strong",{className:"text-foreground",children:t.keyRoles[0].role})]}),e.jsx("span",{className:EE[t.keyRoles[0].demand],children:t.keyRoles[0].demand})]})]}),MC=({title:t,icon:a,children:s,className:n,compact:r=!1})=>e.jsxs(V,{className:n,children:[t&&e.jsx("div",{className:"flex flex-col space-y-1.5 p-6 pb-0",children:e.jsxs("h3",{className:"flex items-center gap-2 font-semibold leading-none tracking-tight",children:[a,t]})}),e.jsx("div",{className:ie(r?"p-4 space-y-3":"p-6 pt-3"),children:s})]});MC.displayName="DirectoryDetailCard";const BE={High:"bg-gaming-success/10 text-gaming-success",Medium:"bg-gaming-warning/10 text-gaming-warning",Low:"bg-secondary text-muted-foreground"},nA=({roles:t,className:a})=>e.jsx("div",{className:ie("space-y-2",a),children:t.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg border border-border/50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(De,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:s.role})]}),e.jsxs(_,{className:ie("text-xs",BE[s.demand]),children:[s.demand," demand"]})]},s.role))});nA.displayName="DirectoryKeyRolesList";const rA=({title:t,rows:a,badges:s,links:n,onNavigate:r,className:i})=>e.jsxs(MC,{title:t,compact:!0,className:i,children:[a&&a.length>0&&e.jsx("div",{className:"space-y-3",children:a.map(({label:l,value:c})=>e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:l}),e.jsx("span",{className:"text-foreground font-medium capitalize",children:c})]},l))}),s&&s.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:s.map(l=>e.jsx(_,{variant:"outline",className:"text-xs",children:l},l))}),n&&n.length>0&&e.jsx("div",{className:"space-y-1.5",children:n.map(({slug:l,label:c,icon:h,href:d})=>e.jsxs(P,{variant:"outline",size:"sm",className:"w-full justify-start gap-2 capitalize",onClick:()=>r==null?void 0:r(d),children:[h,c]},l))})]});rA.displayName="DirectoryInfoPanel";function HE(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var G7={exports:{}},NC={};function VE(t){return t&&t.__esModule?t:{default:t}}NC._=VE;var iA={};function oA(t){if(typeof WeakMap!="function")return null;var a=new WeakMap,s=new WeakMap;return(oA=function(n){return n?s:a})(t)}function GE(t,a){if(!a&&t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var s=oA(a);if(s&&s.has(t))return s.get(t);var n={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&Object.prototype.hasOwnProperty.call(t,i)){var l=r?Object.getOwnPropertyDescriptor(t,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=t[i]}return n.default=t,s&&s.set(t,n),n}iA._=GE;var x7={},F9;function UE(){return F9||(F9=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});const n=NC._(p).default.createContext({});process.env.NODE_ENV!=="production"&&(n.displayName="HeadManagerContext")}(x7)),x7}var od={exports:{}},E9;function $E(){return E9||(E9=1,function(t,a){Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"setAttributesFromProps",{enumerable:!0,get:function(){return i}});const s={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},n=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function r(l){return["async","defer","noModule"].includes(l)}function i(l,c){for(const[h,d]of Object.entries(c)){if(!c.hasOwnProperty(h)||n.includes(h)||d===void 0)continue;const u=s[h]||h.toLowerCase();l.tagName==="SCRIPT"&&r(u)?l[u]=!!d:l.setAttribute(u,String(d)),(d===!1||l.tagName==="SCRIPT"&&r(u)&&(!d||d==="false"))&&(l.setAttribute(u,""),l.removeAttribute(u))}}(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)}(od,od.exports)),od.exports}var ld={exports:{}},O9;function WE(){return O9||(O9=1,function(t,a){Object.defineProperty(a,"__esModule",{value:!0});function s(i,l){for(var c in l)Object.defineProperty(i,c,{enumerable:!0,get:l[c]})}s(a,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});const n=typeof self<"u"&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(i){let l=Date.now();return self.setTimeout(function(){i({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-l))}})},1)},r=typeof self<"u"&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(i){return clearTimeout(i)};(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)}(ld,ld.exports)),ld.exports}(function(t,a){"use client";Object.defineProperty(a,"__esModule",{value:!0});function s(S,L){for(var C in L)Object.defineProperty(S,C,{enumerable:!0,get:L[C]})}s(a,{default:function(){return b},handleClientScriptLoad:function(){return f},initScriptLoader:function(){return M}});const n=NC,r=iA,i=e,l=n._(sS),c=r._(p),h=UE(),d=$E(),u=WE(),x=new Map,y=new Set,m=S=>{if(l.default.preinit){S.forEach(L=>{l.default.preinit(L,{as:"style"})});return}if(typeof window<"u"){let L=document.head;S.forEach(C=>{let j=document.createElement("link");j.type="text/css",j.rel="stylesheet",j.href=C,L.appendChild(j)})}},g=S=>{const{src:L,id:C,onLoad:j=()=>{},onReady:w=null,dangerouslySetInnerHTML:I,children:T="",strategy:A="afterInteractive",onError:R,stylesheets:D}=S,q=C||L;if(q&&y.has(q))return;if(x.has(L)){y.add(q),x.get(L).then(j,R);return}const E=()=>{w&&w(),y.add(q)},F=document.createElement("script"),Z=new Promise((Y,W)=>{F.addEventListener("load",function(ee){Y(),j&&j.call(this,ee),E()}),F.addEventListener("error",function(ee){W(ee)})}).catch(function(Y){R&&R(Y)});I?(F.innerHTML=I.__html||"",E()):T?(F.textContent=typeof T=="string"?T:Array.isArray(T)?T.join(""):"",E()):L&&(F.src=L,x.set(L,Z)),(0,d.setAttributesFromProps)(F,S),A==="worker"&&F.setAttribute("type","text/partytown"),F.setAttribute("data-nscript",A),D&&m(D),document.body.appendChild(F)};function f(S){const{strategy:L="afterInteractive"}=S;L==="lazyOnload"?window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(S))}):g(S)}function v(S){document.readyState==="complete"?(0,u.requestIdleCallback)(()=>g(S)):window.addEventListener("load",()=>{(0,u.requestIdleCallback)(()=>g(S))})}function k(){[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(L=>{const C=L.id||L.getAttribute("src");y.add(C)})}function M(S){S.forEach(f),k()}function N(S){const{id:L,src:C="",onLoad:j=()=>{},onReady:w=null,strategy:I="afterInteractive",onError:T,stylesheets:A,...R}=S,{updateScripts:D,scripts:q,getIsSsr:E,appDir:F,nonce:Z}=(0,c.useContext)(h.HeadManagerContext),Y=(0,c.useRef)(!1);(0,c.useEffect)(()=>{const ee=L||C;Y.current||(w&&ee&&y.has(ee)&&w(),Y.current=!0)},[w,L,C]);const W=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{W.current||(I==="afterInteractive"?g(S):I==="lazyOnload"&&v(S),W.current=!0)},[S,I]),(I==="beforeInteractive"||I==="worker")&&(D?(q[I]=(q[I]||[]).concat([{id:L,src:C,onLoad:j,onReady:w,onError:T,...R}]),D(q)):E&&E()?y.add(L||C):E&&!E()&&g(S)),F){if(A&&A.forEach(ee=>{l.default.preinit(ee,{as:"style"})}),I==="beforeInteractive")return C?(l.default.preload(C,R.integrity?{as:"script",integrity:R.integrity,nonce:Z,crossOrigin:R.crossOrigin}:{as:"script",nonce:Z,crossOrigin:R.crossOrigin}),(0,i.jsx)("script",{nonce:Z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([C,{...R,id:L}])+")"}})):(R.dangerouslySetInnerHTML&&(R.children=R.dangerouslySetInnerHTML.__html,delete R.dangerouslySetInnerHTML),(0,i.jsx)("script",{nonce:Z,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...R,id:L}])+")"}}));I==="afterInteractive"&&C&&l.default.preload(C,R.integrity?{as:"script",integrity:R.integrity,nonce:Z,crossOrigin:R.crossOrigin}:{as:"script",nonce:Z,crossOrigin:R.crossOrigin})}return null}Object.defineProperty(N,"__nextScript",{value:!0});const b=N;(typeof a.default=="function"||typeof a.default=="object"&&a.default!==null)&&typeof a.default.__esModule>"u"&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)})(G7,G7.exports);var ZE=G7.exports,YE=ZE;const JE=HE(YE),XE=`
7920
7920
  window.dataLayer = window.dataLayer || [];
7921
7921
  window.dataLayer.push({ event: 'consent_granted' });
7922
7922
  // gtag('consent', 'update', { ad_storage: 'granted', analytics_storage: 'granted' });
package/dist/index.mjs CHANGED
@@ -56212,7 +56212,7 @@ const oF = ({ open: t, onClose: a, onSave: n, existingEvent: i }) => {
56212
56212
  G,
56213
56213
  {
56214
56214
  className: "border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",
56215
- onClick: () => n(`/channels/${t.slug}`),
56215
+ onClick: () => n(`/gambling-channels/${t.slug}`),
56216
56216
  children: [
56217
56217
  /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 mb-2", children: [
56218
56218
  t.isDigital ? /* @__PURE__ */ r(j, { className: "bg-gaming-success/10 text-gaming-success text-xs", children: [
@@ -56243,7 +56243,7 @@ const oF = ({ open: t, onClose: a, onSave: n, existingEvent: i }) => {
56243
56243
  G,
56244
56244
  {
56245
56245
  className: "border border-transparent p-4 transition-all duration-200 hover:border-accent/20 hover:shadow-card cursor-pointer group",
56246
- onClick: () => n(`/verticals/${t.slug}`),
56246
+ onClick: () => n(`/gambling-verticals/${t.slug}`),
56247
56247
  children: [
56248
56248
  /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-2 mb-2", children: [
56249
56249
  /* @__PURE__ */ e(j, { variant: "secondary", className: "text-xs", children: t.channel }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igamingcareer/igaming-components",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "Reusable React component library for the iGamingCareer platform",
5
5
  "author": "iGamingCareer <info@igamingcareer.com>",
6
6
  "license": "MIT",