1import{j as e,r as o}from"./vendor-react-CIi57Twg.js";import{g as G,r as V,m as de}from"./next-step-tracking-BoafmplD.js";import{a7 as ce,a as me,i as ue,F as xe,L as he,S as pe,c as ge,d as N,P as fe,aj as Y,O as be,ao as q,m as je,b as we,o as _,q as F,af as X,T as ve,f as ye,g as Ne}from"./index-HqOtYtG3.js";import{S as Ce}from"./ShapeTags-DPHhplG7.js";import{W as Se}from"./WaitlistForm-qCCPzkIx.js";import{C as ke}from"./CourseWaitlistOptIn-Cbd5F3uF.js";import{c as Ie,i as Le}from"./student-dashboard-o8jxHxdo.js";import{F as Ae}from"./funnel-C55NSr8I.js";import{H as Fe}from"./heart-D6R6TLt2.js";import{d as Ee}from"./lesson-duration-DUOSmgHU.js";import{M as Pe}from"./message-square-BDMIbjwC.js";import{L as Oe}from"./lightbulb-Bpe_1AQw.js";import{L as Me}from"./lock-DpU6jqso.js";import{e as Te,r as $e,h as ze}from"./currency-price-DxuEv-zg.js";function Re({courseSlug:n}){return e.jsx(ke,{courseSlug:n,testIdPrefix:"course-card-waitlist",stopPropagation:!0})}const Ue=["THINK","KNOW","COMMUNICATE","GOVERN","APPLY"],Be={THINK:"AI thinking",KNOW:"AI knowledge",COMMUNICATE:"Prompt engineering",GOVERN:"AI governance",APPLY:"AI application"};function He(n){const i=new URLSearchParams(n??""),d=(i.get("dimensions")??"").split(",").map(c=>c.trim().toUpperCase()).filter(c=>Ue.includes(c)).filter((c,u,S)=>S.indexOf(c)===u),p=i.get("excludeCompleted")==="1";return d.length===0&&!p?null:{dimensions:d,excludeCompleted:p}}function Ke(n,i,d){return i?n.filter(p=>!(i.dimensions.length>0&&!(p.dimensionsCovered??[]).some(c=>i.dimensions.includes(c))||i.excludeCompleted&&d.has(p.id))):[...n]}function De(n){const i=new URLSearchParams(n);i.delete("dimensions"),i.delete("excludeCompleted");const d=i.toString();return d?`?${d}`:""}const C={beginner:{label:"Beginner",color:"bg-green-500/15 text-green-400 border-green-500/30",order:1},intermediate:{label:"Intermediate",color:"bg-blue-500/15 text-blue-400 border-blue-500/30",order:2},advanced:{label:"Advanced",color:"bg-purple-500/15 text-purple-400 border-purple-500/30",order:3},expert:{label:"Expert",color:"bg-red-500/15 text-red-400 border-red-500/30",order:4}},We={THINK:Ne,KNOW:Oe,COMMUNICATE:Pe,GOVERN:ye,APPLY:ve},Ge={THINK:"text-purple-400",KNOW:"text-blue-400",COMMUNICATE:"text-green-400",GOVERN:"text-amber-400",APPLY:"text-rose-400"};function ot(){const{formatPrice:n,currency:i}=ce(),d=me("academy-courses"),p=ue(d),[,c]=xe(),[u,S]=o.useState([]),[J,Q]=o.use
1State({}),[v,Z]=o.useState({}),[g,E]=o.useState(new Set),[k,P]=o.useState(null),[O,ee]=o.useState(!0),[f,M]=o.useState(""),[b,T]=o.useState(""),[I,te]=o.useState([]),[j,$]=o.useState(""),[w,z]=o.useState(""),[L,se]=o.useState(!1),[x,ae]=o.useState(()=>typeof window>"u"?null:He(window.location.search)),[R,re]=o.useState(new Set),U=o.useRef(new Set);o.useEffect(()=>{fetch("/api/academy/locked-courses",{credentials:"include"}).then(s=>s.ok?s.json():{locked:[]}).then(s=>{const l={},h={};for(const a of s.locked)l[a.id]=a.missing,h[a.id]=a.nextStep??null;Q(l),Z(h)}).catch(()=>{});const t=typeof window<"u"?new URLSearchParams(window.location.search).get("brand"):null,r=Le(t)?`/api/academy/courses?brand=${t}`:"/api/academy/courses";fetch(r).then(s=>s.json()).then(s=>S(s.courses||[])).catch(()=>{}).finally(()=>ee(!1)),fetch("/api/academy/wishlist",{credentials:"include"}).then(s=>s.ok?s.json():null).then(s=>{s?.courseIds&&E(new Set(s.courseIds))}).catch(()=>{}),fetch("/api/academy/categories").then(s=>s.ok?s.json():{categories:[]}).then(s=>te(s.categories||[])).catch(()=>{})},[]);const le=async t=>{if(k)return;const r=g.has(t);P(t);try{const s=await fetch(`/api/academy/wishlist/${t}`,{method:r?"DELETE":"POST",credentials:"include"});if(s.status===401){c("/dashboard/login");return}s.ok&&(E(l=>{const h=new Set(l);return r?h.delete(t):h.add(t),h}),window.dispatchEvent(new CustomEvent("wishlist:changed")))}catch{}finally{P(null)}},A=o.useMemo(()=>{const t=[];for(const r of Object.keys(v)){const s=Number(r),l=v[s];l&&l.course.id!==s&&t.push({lockedCourseId:s,suggestedCourseId:l.course.id})}return t},[v]);o.useEffect(()=>{if(A.length===0)return;const t=G();for(const r of A){const s=`${r.lockedCourseId}:${r.suggestedCourseId}`;U.current.has(s)||(U.current.add(s),V({lockedCourseId:r.lockedCourseId,suggestedCourseId:r.suggestedCourseId,eventType:"impression",source:"catalogue",sessionId:t}))}},[A]);const B=x?.excludeCompleted??!1;o.useEffect(()=>{if(!B)return;let t=!1;return fetch("/api/academy/learning-summary",{credentials:"include"}).then(r=>r.ok?r.json():null).then(r=>{if(t||!r?.enrollments)return;const s=r.enrollments.filter(l=>l.courseId!=null&&Ie(l)==="completed").map(l=>l.courseId);re(new Set(s))}).catch(()=>{}),()=>{t=!0}},[B]);const H=()=>{ae(null),typeof window<"u"&&window.history.replaceState(null,"",`${window.location.pathname}${De(window.location.search)}`)},K=o.useMemo(()=>Ke(u,x,R).filter(t=>!(f&&!t.title.toLowerCase().includes(f.toLowerCase())&&!t.subtitle?.toLowerCase().includes(f.toLowerCase())||b&&t.category!==b||j&&t.level!==j||w&&!t.dimensionsCovered.includes(w))),[u,f,b,j,w,x,R]),y=[b,j,w].filter(Boolean).length,oe=I.map(t=>t.slug),D=Object.fromEntries(I.map(t=>[t.slug,t.name])),ie=Object.fromEntries(I.map(t=>[t.slug,t])),ne=[...new Set(u.map(t=>t.level))].sort((t,r)=>(C[t]?.order||0)-(C[r]?.order||0)),W=()=>{T(""),$(""),z(""),M(""),x&&H()};return e.jsxs(he,{children:[e.jsx(pe,{title:"Course Catalogue - NexL Academy",description:"Browse AI leadership courses covering Strategy, Knowledge, Communication, Governance, and Application. Filter by category, level, or framework dimension.",canonical:"https://gonexl.ai/academy/courses",jsonLd:[ge([{name:"Home",url:"https://gonexl.ai/"},{name:"NexL Academy",url:"https://gonexl.ai/academy"},{name:"Courses",url:"https://gonexl.ai/academy/courses"}]),{"@context":"https://schema.org","@type":"CollectionPage",name:"AI Leadership Course Catalogue",description:"Browse AI leadership courses covering Strategy, Knowledge, Communication, Governance, and Application.",url:"https://gonexl.ai/academy/courses",isPartOf:{"@type":"WebSite",name:"GoNexL.AI",url:"https://gonexl.ai"}}]}),e.jsxs("section",{className:"relative pt-28 pb-12 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 hero-gradient opacity-50"}),e.jsxs("div",{className:"relative z-10 max-w-7xl mx-auto px-4",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(N,{href:"/academy",className:"text-sm text-slate-muted hover:text-orange transition-colors",children:"Academy"}),e.jsx("span",{className:"text-slate-muted",children:"/"}),e.jsx("span",{className:"text-sm text-white",children:"Courses"})]}),e.jsxs("div",{className:`flex flex-col gap-6 ${p?"":"md:flex-row md:items-end md:justify-between"}`,children:[e.jsxs(fe,{video:d,title:"Course Catalogue",besideCopyClassName:"text-left",videoColumnClassName:"min-w-0
1w-full max-w-3xl lg:max-w-none",children:[e.jsx(Y,{offering:"academy",surface:"light-background",maxHeight:56,className:"mb-3 dark:hidden"}),e.jsx(Y,{offering:"academy",surface:"dark-background",maxHeight:56,className:"mb-3 hidden dark:block"}),e.jsxs("h1",{className:"text-3xl md:text-4xl font-extrabold text-white",style:{fontFamily:"var(--app-font-heading)"},children:["Course ",e.jsx("span",{className:"gradient-text",children:"Catalogue"})]}),e.jsx("p",{className:"text-slate-muted mt-2 max-w-lg",children:u.length>0?`${u.length} course${u.length!==1?"s":""} built on the 5-Dimension AI Leadership Framework`:"AI leadership courses coming soon"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 md:w-64",children:[e.jsx(be,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-muted"}),e.jsx("input",{type:"text",value:f,onChange:t=>M(t.target.value),placeholder:"Search courses...",className:"w-full pl-9 pr-3 py-2.5 bg-white/5 border border-white/10 rounded-lg text-sm text-white placeholder:text-slate-muted focus:outline-none focus:border-orange/50 focus:ring-1 focus:ring-orange/30"})]}),e.jsxs("button",{onClick:()=>se(!L),className:`inline-flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border transition-colors ${L||y>0?"bg-orange/15 border-orange/30 text-orange":"bg-white/5 border-white/10 text-slate-muted hover:text-white hover:border-white/20"}`,children:[e.jsx(Ae,{size:16}),"Filters",y>0&&e.jsx("span",{className:"w-5 h-5 rounded-full bg-orange text-white text-xs flex items-center justify-center",children:y})]})]})]})]})]}),L&&e.jsx("div",{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-muted mb-1.5",children:"Category"}),e.jsxs("select",{value:b,onChange:t=>T(t.target.value),"aria-label":"Filter by category",className:"w-full px-3 py-2 bg-white/5 border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:border-orange/50",children:[e.jsx("option",{value:"",children:"All Categories"}),oe.map(t=>e.jsx("option",{value:t,children:D[t]||t},t))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-muted mb-1.5",children:"Level"}),e.jsxs("select",{value:j,onChange:t=>$(t.target.value),"aria-label":"Filter by level",className:"w-full px-3 py-2 bg-white/5 border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:border-orange/50",children:[e.jsx("option",{value:"",children:"All Levels"}),ne.map(t=>e.jsx("option",{value:t,children:C[t]?.label||t},t))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-slate-muted mb-1.5",children:"Dimension"}),e.jsxs("select",{value:w,onChange:t=>z(t.target.value),"aria-label":"Filter by dimension",className:"w-full px-3 py-2 bg-white/5 border border-white/10 rounded-lg text-sm text-white focus:outline-none focus:border-orange/50",children:[e.jsx("option",{value:"",children:"All Dimensions"}),e.jsx("option",{value:"THINK",children:"Think"}),e.jsx("option",{value:"KNOW",children:"Know"}),e.jsx("option",{value:"COMMUNICATE",children:"Communicate"}),e.jsx("option",{value:"GOVERN",children:"Govern"}),e.jsx("option",{value:"APPLY",children:"Apply"})]})]})]}),y>0&&e.jsxs("button",{onClick:W,className:"mt-3 text-xs text-orange hover:text-orange/80 flex items-center gap-1",children:[e.jsx(q,{size:12})," Clear all filters"]})]})}),e.jsxs(je,{children:[x&&!O?e.jsxs("div",{className:"mb-6 flex flex-col gap-2 rounded-xl border border-orange/30 bg-orange/10 px-4 py-3 text-sm text-white sm:flex-row sm:items-center sm:justify-between",role:"status","data-testid":"catalogue-skill-filter",children:[e.jsxs("span",{children:[x.dimensions.length>0?e.jsxs(e.Fragment,{children:["Showing courses for your focus areas: ",e.jsx("strong",{children:x.dimensions.map(t=>Be[t]).join(", ")})]}):"Showing courses you haven't completed",x.dimensions.length>0&&x.excludeCompleted?", excluding courses you've completed":"","."]}),e.jsxs("button",{type:"button",onClick:H,className:"inline-flex items-center gap-1 self-start text-xs font-semibold text-orange hover:text-orange/80 sm:self-auto","data-testid":"catalogue-skill-filter-clear",children:[e.jsx(q,{size:12})," Show all courses"]})]}):null,O?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(we,{className:"w-8 h-8 animate-spin text-orange"})}):K.length===0?u.length===0?e.jsxs("div",{className:"py-12",children:[e.jsx(Se,{scope:"courses"}),e.jsxs("div",{className:"text-center mt-8 flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx(N,{href:"/assessment",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 border border-white/10 text-white rounded-lg text-sm font-medium hover:bg-white/5 transition-colors",children:"Take Free AI Assessment"}),e.jsx(N,{href:"/academy/bootcamps",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 border border-white/10 text-white rounded-lg text-sm font-medium hover:bg-white/5 transition-colors",children:"View Bootcamps"})]})]}):e.jsxs("div",{className:"text-center py-20",children:[e.jsx("div",{className:"w-20 h-20 mx-auto mb-5 rounded-full bg-gradient-to-br from-orange-100 to-amber-100 dar
1k:from-orange-900/20 dark:to-amber-900/20 flex items-center justify-center",children:e.jsx(_,{size:36,className:"text-orange-500"})}),e.jsx("h3",{className:"text-xl font-semibold text-white mb-2",children:"No Courses Match Your Filters"}),e.jsx("p",{className:"text-sm text-slate-muted mb-6 max-w-md mx-auto",children:"Try adjusting your search or filters to find what you're looking for."}),e.jsx("button",{onClick:W,className:"inline-flex items-center gap-2 px-5 py-2.5 bg-orange-500 text-white rounded-lg text-sm font-medium hover:bg-orange-600 transition-colors",children:"Clear Filters"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:K.map(t=>{const r=J[t.id],s=!!r&&r.length>0,l=s?v[t.id]:null,h=s?`Locked, requires: ${r.map(a=>a.title+(a.requiredState==="certified"?" (certification)":"")).join(", ")}`:void 0;return e.jsxs(N,{href:`/academy/courses/${t.slug}`,title:h,className:`glass-card glass-card-hover rounded-xl overflow-hidden transition-all duration-300 group block relative ${s?"opacity-80":""}`,children:[e.jsx("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),le(t.id)},disabled:k===t.id,"aria-label":g.has(t.id)?"Remove from saved courses":"Save course",title:g.has(t.id)?"Remove from saved courses":"Save course","data-testid":`button-wishlist-${t.id}`,className:`absolute top-3 left-3 z-10 w-8 h-8 rounded-full flex items-center justify-center backdrop-blur transition-colors ${g.has(t.id)?"bg-rose-500/90 text-white hover:bg-rose-500":"bg-black/40 text-white/80 hover:bg-black/60 hover:text-rose-300"} ${k===t.id?"opacity-60":""}`,children:e.jsx(Fe,{size:14,className:g.has(t.id)?"fill-white":""})}),t.thumbnailUrl?e.jsxs("div",{className:"h-44 bg-cover bg-center relative",style:{backgroundImage:`url(${t.thumbnailUrl})`},children:[t.isComingSoon&&e.jsxs("div",{className:"absolute top-14 left-3 px-3 py-1.5 bg-purple-600/90 border border-purple-300/50 backdrop-blur rounded-full flex items-center gap-1.5 shadow-lg",children:[e.jsx(F,{size:12,className:"text-white"}),e.jsx("span",{className:"text-xs font-semibold text-white",children:"Coming Soon"})]}),t.isFeatured&&e.jsxs("div",{className:"absolute top-3 right-3 px-2 py-1 bg-yellow-500/90 rounded-md flex items-center gap-1",children:[e.jsx(X,{size:10,className:"text-white fill-white"}),e.jsx("span",{className:"text-xs font-semibold text-white",children:"Featured"})]})]}):e.jsxs("div",{className:"h-44 bg-gradient-to-br from-orange/10 via-purple/10 to-cyan/10 flex items-center justify-center relative",children:[e.jsx(_,{size:48,className:"text-white/10"}),t.isComingSoon&&e.jsxs("div",{className:"absolute top-14 left-3 px-3 py-1.5 bg-purple-600/90 border border-purple-300/50 backdrop-blur rounded-full flex items-center gap-1.5 shadow-lg",children:[e.jsx(F,{size:12,className:"text-white"}),e.jsx("span",{className:"text-xs font-semibold text-white",children:"Coming Soon"})]}),t.isFeatured&&e.jsxs("div",{className:"absolute top-3 right-3 px-2 py-1 bg-yellow-500/90 rounded-md flex items-center gap-1",children:[e.jsx(X,{size:10,className:"text-white fill-white"}),e.jsx("span",{className:"text-xs font-semibold text-white",children:"Featured"})]})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[(()=>{const a=ie[t.category],m=a?.color;return e.jsx("span",{className:`text-xs font-medium ${m?"":"text-cyan"}`,style:m?{color:m}:void 0,children:a?.name||D[t.category]||t.category})})(),(()=>{const a=Ee(t.durationSecondsEffective)??t.duration??null;return a?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-white/20",children:"|"}),e.jsxs("span",{className:"text-xs text-slate-muted flex items-center gap-1",children:[e.jsx(F,{size:10})," ",a]})]}):null})()]}),e.jsx("h3",{className:"text-white font-semibold mb-1 group-hover:text-orange transition-colors leading-snug",children:t.title}),t.subtitle&&e.jsx("p",{className:"text-xs text-slate-muted mb-3 line-clamp-2",children:t.subtitle}),t.dimensionsCovered.length>0&&e.jsx("div",{className:"flex items-center gap-1.5 mb-3",children:t.dimensionsCovered.map(a=>{const m=We[a];return m?e.jsx("div",{className:"w-6 h-6 rounded-md bg-white/5 flex items-center justify-center",title:a,children:e.jsx(m,{size:12,className:Ge[a]||"text-slate-muted"})},a):null})}),t.shapeEmphasis.length>0&&e.jsx("div",{className:"mb-3",children:e.jsx(Ce,{tags:t.shapeEmphasis,size:"xs"})}),t.isComingSoon&&e.jsx(Re,{courseSlug:t.slug}),s&&e.jsxs("div",{className:"mb-3 px-2 py-1.5 rounded-md border border-amber-500/40 bg-amber-500/10",children:[e.jsxs("div",{className:"flex items-start gap-1.5",children:[e.jsx(Me,{size:11,className:"text-amber-300 mt-0.5 flex-shrink-0"}),e.jsxs("span",{className:"text-[11px] text-amber-200 leading-tight",children:["Locked, requires ",r.map(a=>
1a.title).join(", ")]})]}),l&&l.course.id!==t.id&&e.jsxs("button",{type:"button",onClick:a=>{a.preventDefault(),a.stopPropagation(),V({lockedCourseId:t.id,suggestedCourseId:l.course.id,eventType:"click",source:"catalogue",sessionId:G()}),de({lockedCourseId:t.id,suggestedCourseId:l.course.id,source:"catalogue"}),c(`/academy/courses/${l.course.slug}`)},title:l.reason,"data-testid":`button-next-unlock-${t.id}`,className:"mt-2 w-full px-2 py-1.5 rounded-md bg-amber-500 hover:bg-amber-400 text-[11px] font-semibold text-slate-950 transition-colors flex items-center justify-center gap-1.5",children:["Start with: ",l.course.title]})]}),e.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-white/5",children:[e.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full border font-medium capitalize ${C[t.level]?.color||""}`,children:t.level}),e.jsx("span",{className:"text-sm font-semibold text-white",children:(()=>{const a=Te(t),m=$e(a,i);return ze(a)&&m?n(m.amount,m.currency):"Free"})()})]})]})]},t.id)})})]})]})}export{ot as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.