1/*! For license information please see 8413.a0bdd07d.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkstudent_management_app=self.webpackChunkstudent_management_app||[]).push([[8413],{268:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},606:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]])},15670:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},28400:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]])},28413:(e,t,s)=>{s.r(t),s.d(t,{default:()=>y});var a=s(9950),n=s(73814),r=s(47288),l=s(37488),o=s(28400),i=s(15670),c=s(606),d=s(268),m=s(74159),h=s(40648),x=s(57710),u=s(44414);const p=e=>{const t=new Date(e);return{month:t.toLocaleDateString("en-US",{month:"short"}).toUpperCase(),day:t.toLocaleDateString("en-US",{day:"2-digit"}),full:t.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}},g=e=>new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),b=e=>{const t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`},f=(e,t)=>{const s=Math.max(0,new Date(e).getTime()-t),a=Math.floor(s/1e3),n=Math.floor(a/86400);return[n?`${n}d`:"",`${Math.floor(a%86400/3600)}h`,`${Math.floor(a%3600/60)}m`,`${a%60}s`].filter(Boolean).join(" ")},y=()=>{const e=(0,h.M8)(),[t,s]=(0,a.useState)((null===e||void 0===e?void 0:e.schedules)||[]),[y,v]=(0,a.useState)(!e),[w,A]=(0,a.useState)(""),[N,j]=(0,a.useState)(()=>Date.now()),S=()=>{v(!0),A(""),(0,h.Yl)({force:!0}).then(e=>s((null===e||void 0===e?void 0:e.schedules)||[])).catch(()=>A("The class schedule is temporarily unavailable.")).finally(()=>v(!1))};(0,a.useEffect)(()=>{S()},[]),(0,a.useEffect)(()=>{const e=window.setInterval(()=>j(Date.now()),1e3);return()=>window.clearInterval(e)},[]);const C=(0,a.useMemo)(()=>{const e=new Map;return t.forEach(t=>{const s=t.seriesId||t.id;e.has(s)||e.set(s,{key:s,title:t.title,category:t.category,sessions:[]}),e.get(s).sessions.push(t)}),Array.from(e.values()).map(e=>({...e,sessions:e.sessions.sort((e,t)=>new Date(e.startAt).getTime()-new Date(t.startAt).getTime())})).filter(e=>new Date(e.sessions[e.sessions.length-1].endAt).getTime()>N).sort((e,t)=>{const s=new Date(e.sessions[0].startAt).getTime(),a=new Date(t.sessions[0].startAt).getTime(),n=s<=N;return n!==a<=N?n?1:-1:s-a})},[t,N]);return(0,u.jsxs)("div",{className:"min-h-screen bg-[#f7f7f5] text-slate-900",children:[(0,u.jsx)(m.A,{}),(0,u.jsx)("main",{children:(0,u.jsxs)("section",{className:"max-w-6xl mx-auto px-5 sm:px-8 py-8 sm:py-12",children:[(0,u.jsxs)("div",{className:"flex items-end justify-between gap-5 pb-5 border-b-2 border-[#0b2d3e]",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{className:"text-xs font-bold uppercase tracking-[0.18em] text-[#946715]",children:"Current availability"}),(0,u.jsx)("h1",{className:"mt-2 text-2xl sm:text-3xl font-bold text-[#0b2d3e]",children:"Upcoming classes"})]}),(0,u.jsx)("span",{className:"hidden sm:block text-sm text-slate-600",children:"Updated from the admissions schedule"})]}),y?(0,u.jsxs)("div",{className:"py-24 flex items-center justify-center",children:[(0,u.jsx)(r.A,{className:"w-6 h-6 animate-spin text-[#17607a]"}),(0,u.jsx)("span",{className:"ml-3 font-medium text-slate-600",children:"Loading classes\u2026"})]}):w?(0,u.jsxs)("div",{className:"py-20 text-center border-b border-slate-300",children:[(0,u.jsx)("p",{className:"font-semibold text-slate-800",children:w}),(0,u.jsx)("button",{onClick:S,className:"mt-5 h-10 px-5 bg-[#0b2d3e] text-white text-sm font-bold",children:"Try again"})]}):0===C.length?(0,u.jsxs)("div",{className:"py-20 text-center border-b border-slate-300",children:[(0,u.jsx)(l.A,{className:"w-9 h-9 mx-auto text-[#17607a]"}),(0,u.jsx)("h3",{className:"mt-4 text-2xl font-bold text-[#0b2d3e]",children:"New dates coming soon"}),(0,u.jsx)("p",{className:"mt-2 text-slate-600",children:"When the admissions team publishes a class, it will appear here."}),(0,u.jsx)("a",{href:"tel:+12064609022",className:"inline-block mt-5 font-bold text-[#17607a]",children:"Call (206) 460-9022"})]}):(0,u.jsx)("div",{children:C.map(e=>{const t=e.sessions[0],s=p(t.startAt),a=e.sessions[e.sessions.length-1],r=p(a.startAt),m=Math.max(0,Number(t.capacity||0)-Number(t.reservedCount||0)),h=(0,x.HV)(e.sessions),y=N>=new Date(t.startAt).getTime();return(0,u.jsxs)("article",{className:"my-4 sm:my-5 border shadow-sm grid lg:grid-cols-[1fr_auto] gap-5 p-5 sm:p-6 lg:p-7 items-center "+(y?"border-amber-200 bg-amber-50/70":"border-slate-200 bg-white"),children:[(0,u.jsxs)("div",{className:"min-w-0",children:[(0,u.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,u.jsx)("span",{className:`text-[11px] uppercase tracking-wider font-bold border px-2 py-1 ${(0,x.zd)(h.tone)}`,children:h.label}),e.sessions.length>1&&(0,u.jsxs)("span",{className:"text-xs text-slate-500",children:[e.sessions.length," class days"]}),!y&&(0,u.jsxs)("span",{className:"inline-flex items-center gap-1.5 border border-cyan-200 bg-cyan-50 px-2 py-1 text-[11px] font-bold text-[#17607a]",children:[(0,u.jsx)(o.A,{className:"h-3 w-3"}),"Starts in ",f(t.startAt,N)]})]}),(0,u.jsx)("h3",{className:"mt-1.5 text-xl sm:text-2xl font-bold text-[#0b2d3e]",children:e.title}),h.detail&&(0,u.jsx)("p",{className:"mt-1 text-sm font-semibold text-slate-700",children:h.detail}),(0,u.jsxs)("div",{className:"mt-3 flex flex-col sm:flex-row sm:flex-wrap gap-x-6 gap-y-2 text-sm text-slate-600",children:[(0,u.jsxs)("span",{className:"flex items-center gap-2",children:[(0,u.jsx)(l.A,{className:"w-4 h-4 text-[#17607a] flex-none"}),e.sessions.length>1?`${s.full} \u2013 ${r.full}`:s.full]}),(0,u.jsxs)("span",{className:"flex items-center gap-2",children:[(0,u.jsx)(o.A,{className:"w-4 h-4 text-[#17607a]"}),g(t.startAt),"\u2013",g(t.endAt)]}),(0,u.jsxs)("span",{className:"flex items-center gap-2",children:[(0,u.jsx)(i.A,{className:"w-4 h-4 text-[#17607a]"}),(0,x.g5)(t.location)]})]})]}),(0,u.jsxs)("div",{className:"border-t lg:border-t-0 lg:border-l border-slate-200 pt-5 lg:pt-0 lg:pl-7 flex flex-col sm:flex-row lg:flex-col sm:items-center lg:items-stretch gap-4 sm:justify-between lg:min-w-[190px]",children:[(0,u.jsxs)("div",{className:"lg:text-right",children:[(0,u.jsx)("p",{className:"text-xl font-bold text-[#0b2d3e]",children:t.priceCents?(v=t.priceCents,new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:Number(v)%100?2:0}).format((Number(v)||0)/100)):"No cost"}),(0,u.jsxs)("p",{className:"mt-1 text-xs text-slate-600 flex lg:justify-end items-center gap-1.5",children:[(0,u.jsx)(c.A,{className:"w-3.5 h-3.5"}),m>0?`${m} seats available`:"Cohort full"]})]}),y?(0,u.jsx)("span",{className:"h-12 px-6 inline-flex items-center justify-center border border-amber-200 bg-amber-50 text-amber-800 text-sm font-bold",children:"In progress"}):m>0?(0,u.jsxs)(n.N_,{to:`/register?programId=${encodeURIComponent(t.moduleId||"")}&programName=${encodeURIComponent(e.title)}
2&scheduleId=${encodeURIComponent(t.id)}&start=${b(t.startAt)}&amountCents=${Number(t.priceCents)||0}`,className:"h-12 px-6 inline-flex items-center justify-center gap-2 bg-[#0b2d3e] text-white text-sm font-bold hover:bg-[#16465b]",children:["Enroll ",(0,u.jsx)(d.A,{className:"w-4 h-4"})]}):(0,u.jsx)("span",{className:"h-12 px-6 inline-flex items-center justify-center bg-slate-200 text-slate-600 text-sm font-bold",children:"Cohort full"})]})]},e.key);var v})})]})})]})}},37488:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},40648:(e,t,s)=>{s.d(t,{M8:()=>c,NO:()=>u,Pb:()=>o,Ve:()=>l,Y2:()=>i,Yd:()=>x,Yl:()=>d,hb:()=>h,rW:()=>m});const a=({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_FIREBASE_API_KEY:"AIzaSyCWxqxJST91KCC18B_zbsoBrP4G7VychBI",REACT_APP_FIREBASE_APP_ID:"1:510503057097:web:1ca69bea212415c8e6ff18",REACT_APP_FIREBASE_AUTH_DOMAIN:"hudumacna-2831c.firebaseapp.com",REACT_APP_FIREBASE_DATABASE_URL:"",REACT_APP_FIREBASE_MEASUREMENT_ID:"G-61E0FFVCBQ",REACT_APP_FIREBASE_MESSAGING_SENDER_ID:"510503057097",REACT_APP_FIREBASE_PROJECT_ID:"hudumacna-2831c",REACT_APP_FIREBASE_STORAGE_BUCKET:"hudumacna-2831c.firebasestorage.app",REACT_APP_STRIPE_PUBLISHABLE_KEY:"pk_live_51T2d2o4M2zSJeFA21XsMhTwj1NMSm9vDmTaESCiCAT1f9n7oKpQU5BO7fvGUsa4HQKtmpBIW45zfVKKVGCy4vvmz007R2WJy0H"}.REACT_APP_FUNCTIONS_BASE_URL||"https://us-central1-hudumacna-2831c.cloudfunctions.net").replace(/\/$/,""),n="hca_public_schedule_v2",r=async function(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await fetch(`${a}/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await n.json();if(!n.ok)throw new Error((null===(t=r.error)||void 0===t?void 0:t.message)||"Request failed");return r.result},l=async e=>{const t=await(async e=>{let{studentId:t,amount:s,successUrl:n,cancelUrl:r}=e;const l=await fetch(`${a}/createCheckoutSession`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({studentId:t,amount:s,successUrl:n||`${window.location.origin}/dashboard/student/${t}?payment=success`,cancelUrl:r||`${window.location.origin}/dashboard/student/${t}?payment=cancelled`})}),o=await l.json();var i;if(!l.ok)throw new Error((null===(i=o.error)||void 0===i?void 0:i.message)||"Failed to create checkout session");return o.result})(e);window.location.href=t.url},o=async e=>{var t;const s=await fetch(`${a}/finalizeCheckoutSession`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})}),n=await s.json();if(!s.ok)throw new Error((null===(t=n.error)||void 0===t?void 0:t.message)||"Failed to finalize payment");return n.result},i=async e=>{var t;const s=await fetch(`${a}/reconcileStudentBalance`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{studentId:e}})}),n=await s.json();if(!s.ok)throw new Error((null===(t=n.error)||void 0===t?void 0:t.message)||"Reconcile failed");return n.result},c=()=>{try{var e;const t=JSON.parse(sessionStorage.getItem(n)||"null");return null===t||void 0===t||!t.savedAt||Date.now()-t.savedAt>6e4||!Array.isArray(null===(e=t.data)||void 0===e?void 0:e.schedules)?null:t.data}catch(t){return null}},d=async function(){var e;let{force:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t){const e=c();if(e)return e}const s=await fetch("/api/class-schedules",{method:"GET",headers:{Accept:"application/json"}}),a=await s.json();if(!s.ok)throw new Error((null===(e=a.error)||void 0===e?void 0:e.message)||"The class schedule could not be loaded");try{sessionStorage.setItem(n,JSON.stringify({savedAt:Date.now(),data:a.result}))}catch(r){}return a.result},m=e=>r("createClassReservationCheckout",e),h=e=>{let{reservationId:t,token:s}=e;return r("getClassReservationStatus",{reservationId:t,token:s})},x=e=>{let{reservationId:t,token:s}=e;return r("cancelClassReservationHold",{reservationId:t,token:s})},u=async e=>{var t;let{reservationId:s,token:n}=e;const r=`class_receipt_downloaded_${s}`;try{const e=Number(sessionStorage.getItem(r)||0);if(e&&Date.now()-e<3e4)return!1}catch(x){}const l=new URLSearchParams({reservationId:s,token:n}),o=await fetch(`${a}/downloadClassEnrollmentReceipt?${l.toString()}`);if(!o.ok){var i;const e=await o.json().catch(()=>({}));throw new Error((null===(i=e.error)||void 0===i?void 0:i.message)||"Could not download the enrollment receipt")}const c=await o.blob(),d=(null===(t=(o.headers.get("content-disposition")||"").match(/filename="?([^";]+)"?/i))||void 0===t?void 0:t[1])||"enrollment-receipt.pdf",m=URL.createObjectURL(c),h=document.createElement("a");h.href=m,h.download=d,document.body.appendChild(h),h.click(),h.remove(),setTimeout(()=>URL.revokeObjectURL(m),1e3);
2try{sessionStorage.setItem(r,String(Date.now()))}catch(x){}return!0}},47288:(e,t,s)=>{s.d(t,{A:()=>a});const a=(0,s(7101).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},57710:(e,t,s)=>{s.d(t,{HV:()=>n,g5:()=>l,zd:()=>r});const a=e=>new Date(e.startAt).getDay(),n=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const s=t[0];if(!s)return{label:"Schedule",detail:"",tone:"slate"};const n=null===(e=s.recurrence)||void 0===e?void 0:e.days,r=[...new Set(Array.isArray(n)&&n.length?n.map(Number):t.map(a))].sort(),l=r.length>0&&r.every(e=>0===e||6===e),o=r.length>0&&r.every(e=>e>=1&&e<=5),i=new Date(s.startAt).getHours();return l?{label:"Weekend cohort",detail:"Saturday & Sunday",tone:"gold"}:o&&i>=12?{label:"Weekday evening",detail:"Monday\u2013Friday",tone:"violet"}:o?{label:"Weekday morning",detail:"Monday\u2013Friday",tone:"blue"}:s.seriesId||1!==t.length?{label:"Custom schedule",detail:"",tone:"slate"}:{label:"Single class date",detail:"",tone:"slate"}},r=e=>({gold:"bg-amber-100 text-amber-900 border-amber-300",violet:"bg-violet-100 text-violet-900 border-violet-300",blue:"bg-blue-100 text-blue-900 border-blue-300",slate:"bg-slate-100 text-slate-800 border-slate-300"}[e]||"bg-slate-100 text-slate-800 border-slate-300"),l=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const s=String(t).split(",").map(e=>e.trim()).filter(Boolean),a=null===(e=s.at(-1))||void 0===e?void 0:e.match(/^([A-Z]{2})(?:\s+\d{5}(?:-\d{4})?)?$/i);return s.length>=2&&a?`${s.at(-2)}, ${a[1].toUpperCase()}`:t}},74159:(e,t,s)=>{s.d(t,{A:()=>o});var a=s(9950),n=s(56790),r=s(76087),l=s(44414);const o=()=>{const[e,t]=(0,a.useState)(!1);return(0,l.jsxs)("header",{className:"sticky top-0 z-50 bg-white border-b border-slate-200",children:[(0,l.jsxs)("div",{className:"max-w-6xl mx-auto h-[76px] px-5 sm:px-8 flex items-center justify-between gap-5",children:[(0,l.jsxs)("a",{href:"/",className:"flex items-center gap-3","aria-label":"Huduma CNA home",children:[(0,l.jsx)("img",{src:"/official-logo.png",alt:"Caregiver Training and Huduma Center LLC",className:"w-12 h-12 object-contain"}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"block text-lg font-extrabold leading-none text-[#0b2d3e]",children:"Huduma CNA"}),(0,l.jsx)("span",{className:"block mt-1 text-[10px] font-bold uppercase tracking-[0.18em] text-[#17607a]",children:"Student Portal"})]})]}),(0,l.jsxs)("nav",{className:"hidden md:flex items-center gap-7 text-sm font-bold text-slate-700",children:[(0,l.jsx)("a",{href:"/programs/cna-traditional",className:"hover:text-[#17607a]",children:"CNA Traditional"}),(0,l.jsx)("a",{href:"/programs/hca-cna-bridge",className:"hover:text-[#17607a]",children:"HCA\u2013CNA Bridge"}),(0,l.jsx)("a",{href:"/class-schedule",className:"hover:text-[#17607a]",children:"Class schedule"}),(0,l.jsx)("a",{href:"/login",className:"h-11 px-5 inline-flex items-center bg-[#0b2d3e] text-white hover:bg-[#16465b]",children:"Sign in"})]}),(0,l.jsx)("button",{type:"button",onClick:()=>t(!e),className:"md:hidden w-11 h-11 inline-flex items-center justify-center border border-slate-300","aria-label":"Toggle navigation",children:e?(0,l.jsx)(n.A,{className:"w-5 h-5"}):(0,l.jsx)(r.A,{className:"w-5 h-5"})})]}),e&&(0,l.jsxs)("nav",{className:"md:hidden border-t border-slate-200 px-5 py-4 bg-white space-y-1",children:[(0,l.jsx)("a",{href:"/programs/cna-traditional",className:"block py-3 font-bold",children:"CNA Traditional"}),(0,l.jsx)("a",{href:"/programs/hca-cna-bridge",className:"block py-3 font-bold",children:"HCA\u2013CNA Bridge"}),(0,l.jsx)("a",{href:"/class-schedule",className:"block py-3 font-bold",children:"Class schedule"}),(0,l.jsx)("a",{href:"/login",className:"mt-3 h-11 flex items-center justify-center bg-[#0b2d3e] text-white font-bold",children:"Sign in"})]})]})}}}]);
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.