PageSourceSearch

https://www.icsi.edu/assets/ChapterLayout-BPRremKG.js

js icsi.edu collected 2026-10-02 03:42:33 UTC 8,158 bytes, 1 lines download raw bytes

1import{r as n,j as e,z as C,A as S,B as M,C as L,L as A,R as F,M as R,a as _,u as B,D as E,E as $,H as I,I as T,J as K}from"./index-CMfIf9m3.js";import{P as z}from"./PageFooterRow-cP7M-1TF.js";import{u as W,S as O,A as G,a as H,K as J,b as U}from"./useCarouselA11y-YJAuwdPY.js";import{S as V}from"./SubsiteSidebar-DJWhFrIe.js";import{T as q,C as N}from"./ContactLines-NoYexyvK.js";import{L as Q}from"./index-B717YEAh.js";import{C as X}from"./CmsRichText-CPUTJk7b.js";import Y from"./OurClients-6gp4vgtr.js";import{N as Z}from"./NotFound-CxIs-pGt.js";import{h as ee}from"./slugLabel-G8ALJ0WS.js";import"./centerSections-BYvPu_Dt.js";import"./useAccessibleCarousel-C8Bcex-Z.js";const te=()=>typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,se=({tiles:r})=>{const[x,l]=n.useState(0),a=n.useRef(null),[i,c]=n.useState(()=>!te()),[f,d]=n.useState(!1),j=n.useRef(null),{syncInert:m,onSlideFocus:u,onKeyDown:y}=W(a,j),b=t=>{const s=a.current?.autoplay;s&&(t?s.start():s.stop())},g=()=>{const t=!i;c(t),b(t)},h=r?.cards??[],o=r?.autoplayDelay;if(h.length===0)return null;const w=Math.ceil(h.length/2);return e.jsxs("div",{className:"relative aspect-3/2 lg:w-1/3",role:"region","aria-roledescription":"carousel","aria-label":"Chapter highlights",onFocus:()=>{b(!1),d(!0)},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||(d(!1),i&&b(!0))},onFocusCapture:u,onKeyDown:y,children:[e.jsx(O,{direction:"vertical",slidesPerView:2,spaceBetween:32/3,loop:h.length>2&&!f,watchSlidesProgress:!0,autoplay:{delay:o,disableOnInteraction:!1,pauseOnMouseEnter:!0},speed:800,keyboard:{enabled:!0},modules:[G,H,J],onSwiper:t=>{a.current=t,i||t.autoplay?.stop(),m(t)},onSlideChange:t=>{l(t.realIndex),m(t)},onSlidesUpdated:m,className:"h-full",children:Array.from({length:w}).map((t,s)=>e.jsx(U,{children:e.jsx("div",{className:"grid grid-cols-2 gap-4",children:h.slice(s*2,s*2+2).map(p=>e.jsxs("a",{href:p.url,className:"relative rounded-lg overflow-hidden group",children:[e.jsx("img",{src:p.image,alt:p.alt_text||"",title:p.alt_text||"",className:"w-full aspect-3/2 object-cover transition-transform duration-300 group-hover:scale-105"}),e.jsx("div",{className:"absolute bottom-0 w-full h-10 bg-[rgba(0,0,0,0.6)] flex items-center px-2",children:e.jsx("h3",{className:"text-white text-[10px] leading-tight",children:p.title})})]},p.id))})},s))}),e.jsx("div",{"aria-hidden":"true",className:"absolute right-2 top-1/2 -translate-y-1/2 flex flex-col gap-2 z-40",children:Array.from({length:w}).map((t,s)=>e.jsx("span",{className:`w-1 h-1 rounded-full ${x===s?"bg-red-700 scale-125":"bg-black/40"}`},s))}),e.jsx("button",{ref:j,type:"button",onClick:g,"aria-label":i?"Pause slideshow":"Play slideshow",title:i?"Pause slideshow":"Play slideshow",className:"absolute bottom-2 right-2 z-50 bg-white p-1.5 rounded-full shadow text-[10px] hover:bg-gray-100",children:i?e.jsx(C,{"aria-hidden":"true"}):e.jsx(S,{"aria-hidden":"true"})})]})},ae=({banner:r,tiles:x})=>{const{slides:l=[],autoplay:a=!1,interval:i=3e3}=r||{},[c,f]=n.useState(0),[d,j]=n.useState(a),m=n.useRef(null);if(l.length===0)return null;const u=l[c],y=u.url?.startsWith("http"),b=({children:t})=>y?e.jsx("a",{href:u.url,"data-open-new-tab":u.open_in_new_tab?"true":"false",children:t}):u.open_in_new_tab?e.jsx("a",{href:u.url||"/",target:"_blank",rel:"noopener noreferrer",children:t}):e.jsx(A,{to:u.url||"/",children:t}),g=()=>{m.current&&(clearInterval(m.current),m.current=null)},h=()=>{g(),l.length>1&&(m.current=setInterval(()=>{f(t=>(t+1)%l.length)},i))};n.useEffect(()=>(d?h():g(),g),[d,c,l.length,i]);const o=()=>{f(t=>(t+1)%l.length)},w=()=>{f(t=>t===0?l.length-1:t-1)};return e.jsxs("div",{className:"flex flex-col md:flex-row justify-evenly gap-4 py-2 px-2 sm:px-4 md:px-4 lg:px-15",children:[e.jsx("div",{className:"md:w-1/2 lg:w-2/3 aspect-3/1 rounded-lg overflow-hidden shadow-amber-200",children:e.jsxs("div",{className:"relative h-full",onMouseEnter:g,onMouseLeave:()=>d&&h(),children:[e.jsx(b,{children:e.jsx("img",{src:u.image,alt:`Banner ${c+1} of ${l.length}`,title:`Banner ${c+1} of ${l.length}`,className:"w-full h-full object-cover cursor-pointer rounded-lg transition-all duration-500"})}),e.jsx("button",{type:"button",onClick:t=>{t.preventDefault(),w()},"aria-label":"Previous slide",title:"Previous slide",className:"absolute top-1/2 left-3 -translate-y-1/2 bg-white/80 p-2 rounded-full shadow hover:bg-white",children:e.jsx(M,{"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:t=>{t.preventDefault(),o()},"aria-label":"Next slide",title:"Next slide",className:"absolute top-1/2 right-3 -translate-y-1/2 bg-white/80 p-2 rounded-full shadow hover:bg-white",children:e.jsx(L,{"aria-hidden":"true"})}),e.jsx("button",{type:"button",onClick:t=>{t.preventDefault(),j(s=>!s)},"aria-label":d?"Pause slideshow":"Play slideshow",title:d?"Pause slideshow":"Play slideshow",className:"absolute bottom-4 right-4 bg-white p-2 rounded-full shadow hover:bg-gray-100",children:d?e.jsx(C,{"aria-hidden":"true"}):e.jsx(S,{"aria-hidden":"true"})}),e.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 flex gap-2",children:l.map((t,s)=>e.jsx("button",{type:"button",onClick:p=>{p.preventDefault(),f(s)},"aria-label":`Go to slide ${s+1}`,title:`Go to slide ${s+1}`,"aria-current":c===s,className:`w-2 h-2 rounded-full transition-transform ${c===s?"bg-red-700 scale-125":"bg-black/50"}`},s))})]})}),e.jsx(se,{tiles:x})]})},le=({note:r})=>{const{heading:x,description:l,address:a}=r;return e.jsxs("section",{className:"md:col-span-5",children:[e.jsx("h4",{className:"text-lg sm:text-xl lg:text-2xl font-semibold text-gray-900",children:x}),e.jsxs("div",{className:"mt-2 flex items-center",children:[e.jsx("div",{className:"h-1.5 w-12 md:w-20 bg-[#0F3479] rounded-l rounded-r"}),e.jsx("div",{className:"h-1 w-8 md:w-24 bg-[#8799BC] rounded-r"})]}),e.jsx(X,{html:l,className:"mt-3 text-sm"}),e.jsx("h4",{className:"text-sm sm:text-md lg:text-md font-semibold text-gray-900 my-2",children:a.title}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(q,{className:"mt-1 text-md"}),e.jsxs("span",{className:"text-sm leading-relaxed",children:[a.location.map((i,c)=>e.jsxs(F.Fragment,{children:[i,e.jsx("br",{})]},c)),a.pincode&&e.jsxs("span",{children:["PIN: ",a.pincode]})]})]}),(a.phones?.length||a.phone)&&e.jsxs("div",{className:"flex items-start gap-2 mt-1",children:[e.jsx(Q,{className:"mt-0.5 text-md","aria-hidden":"true"}),e.jsx(N,{values:a.phones,fallback:a.phone,kind:"phone",className:"text-sm"})]}),(a.emails?.length||a.email)&&e.jsxs("div",{className:"flex items-start gap-2 mt-1",children:[e.jsx(R,{className:"mt-0.5 text-md","aria-hidden":"true"}),e.jsx(N,{values:a.emails,fallback:a.email,kind:"email",className:"text-sm"})]})]})},re=({data:r,basePath:x})=>e.jsxs(e.Fragment,{children:[e.jsx(ae,{banner:r.banner,tiles:r.tiles}),e.jsxs("div",{className:"max-w-12xl z-40 px-2 sm:px-4 md:px-18 lg:px-15",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-7 gap-6",children:[e.jsx(V,{menu:r.sidebarMenu,basePath:x}),e.jsx(le,{note:r.welcomeNote})]}),e.jsx(Y,{})]})]}),je=()=>{const{city:r}=_();
1B([ee(r),"Chapter"].filter(Boolean).join(" "));const[x,l]=n.useState(!0),[a,i]=n.useState(null),[c,f]=n.useState(null),[d,j]=n.useState(null),[m,u]=n.useState(null),[y,b]=n.useState(null);if(n.useEffect(()=>{(async()=>{try{l(!0);const o=(r||"").toLowerCase(),t=(await E()).find(v=>(v.path||"").split("/").pop()?.toLowerCase()===o||(v.key||"").toLowerCase()===o||(v.name||"").toLowerCase()===o);if(!t){l(!1);return}const s=t.key;i(s);const[p,P,D,k]=await Promise.all([$(),I(),T(s),K()]);f(p[s]),j(P[s]),u(D[s]||[]),b(k[s])}catch(o){console.error("Error loading chapter data:",o)}finally{l(!1)}})()},[r]),x)return e.jsx("div",{children:"Loading..."});if(!a||!y)return e.jsx(Z,{});const g=h=>h?h.map(o=>({label:o.title,path:o.url||"#",submenu:o.submenu?g(o.submenu):void 0})):[];return e.jsxs(e.Fragment,{children:[e.jsx(re,{basePath:`/chapter/${r}`,data:{banner:c,tiles:d,sidebarMenu:g(m),welcomeNote:y}}),e.jsx("div",{className:"max-w-12xl px-2 sm:px-4 md:px-18 lg:px-15",children:e.jsx(z,{})})]})};export{je 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.