import{z as F,C as O,R as e,M as P,D as R,L as S,a as C,r as E,b as H,F as x,B as y,c as $,u as j,A as z,S as L}from"./index-7FhfNRPD.js";import{A as T}from"./index-B3SAaQLl.js";import{M as V}from"./index-Cr85L7t7.js";import{d as M,M as U,e as q,g as J,h as K,i as Q,V as X,a as Y,j as Z,k as D,S as ee,b as te}from"./index-B_0gWLOk.js";import{L as re}from"./loading-BKx1G5Wu.js";import{B as oe}from"./index-jsIXdPjR.js";import{N as ne}from"./index-B_n3aO36.js";import"./Helmet-DipkOvWI.js";import"./index.esm-C0AHCyb7.js";import"./index-Boa7Wo3s.js";var N=l=>F.jsx(O.div,{className:"chakra-stack__divider",...l,__css:{...l.__css,borderWidth:0,alignSelf:"stretch",borderColor:"inherit",width:"auto",height:"auto"}});N.displayName="StackDivider";function ae({data:l,selectedEntry:r,index:a}){var d;const{menu_items:t}=l;return e.createElement(P,null,e.createElement(R,{variant:"unstyled",fontSize:"20px",fontWeight:"700",lineHeight:"normal",color:r===a?"white":"Grey1",_groupHover:{color:"white"},cursor:"default"},e.createElement(S,{as:C,to:{pathname:(d=t==null?void 0:t.link)==null?void 0:d.href,state:r}},"General Info"),e.createElement(M,{px:"9px"})),e.createElement(U,{p:"0"},t==null?void 0:t.map((n,c)=>{var m,u;return e.createElement(q,{as:C,to:{pathname:(m=n==null?void 0:n.link)==null?void 0:m.href,state:r},textDecoration:"none",cursor:"default",key:c},(u=n==null?void 0:n.link)==null?void 0:u.title)})))}function se(l){const{data:r}=l,a=r==null?void 0:r.nav_links,[t,d]=E.useState(0),n=()=>{const c=H(),m=a==null?void 0:a.findIndex(s=>{var o;return((o=s==null?void 0:s.link)==null?void 0:o.title.trim().toLowerCase())==="general info"}),u=s=>{d(s)};return e.createElement(x,{pt:"32px",justifyContent:"center",alignItems:"flex-start"},e.createElement(x,{alignItems:"flex-start",gap:"43px",flexShrink:"0",borderBottom:`1px solid ${c.colors.Grey5}`},a==null?void 0:a.map((s,o)=>{var p,f;return e.createElement(y,{role:"group",key:o,px:4,py:2,bg:t===o?c.colors.Grey1:"transparent",borderBottom:t===o?`4px solid ${c.colors.PrimaryGreen}`:"none",borderTopRadius:"md",onClick:()=>u(o),_hover:{bg:"Grey2",borderBottom:t!==o?`4px solid ${c.colors.Grey2}`:`4px solid ${c.colors.PrimaryGreen}`},mr:2},m===o?e.createElement(ae,{data:r,selectedEntry:t,index:o}):e.createElement(S,{as:C,to:{pathname:(p=s==null?void 0:s.link)==null?void 0:p.href,state:t},fontSize:"20px",fontWeight:"700",lineHeight:"normal",color:t===o?c.colors.White:c.colors.Grey1,_hover:{textDecoration:"none",color:t!==o?c.colors.White:c.colors.Grey1},_groupHover:{color:"white"},cursor:"default"},(f=s==null?void 0:s.link)==null?void 0:f.title))})))};return e.createElement(e.Fragment,null,e.createElement(n,null))}function v(l){var g;const{data:r}=l,a=(g=r==null?void 0:r.nav_links[0].link)==null?void 0:g.title.toUpperCase(),t=r==null?void 0:r.nav_links,d=r==null?void 0:r.menu_items,n=H(),[c,m]=E.useState(!1),[u,s]=E.useState(!1),o=()=>{m(!0)},p=()=>{m(!1)},f=t==null?void 0:t.findIndex(h=>{var _;return((_=h==null?void 0:h.link)==null?void 0:_.title.trim().toLowerCase())==="general info"}),w=()=>{const[h,_]=E.useState(0),W=i=>{_(i),i!=f?p():o()},k=i=>{_(i),s(!u),p()};return e.createElement(x,{direction:"column",alignItems:"center",bg:"white",width:"100vw"},t==null?void 0:t.map((i,b)=>{var B,G;return e.createElement(y,{key:b,px:4,py:2,bg:h===b?n.colors.Grey1:"transparent",borderBottom:h===b?`4px solid ${n.colors.PrimaryGreen}`:"none",width:"100vw",onClick:()=>W(b),mb:2},f===b?e.createElement(e.Fragment,null,e.createElement(y,{fontSize:"20px",fontWeight:"700",lineHeight:"normal",color:"Grey1",onClick:()=>k(b)},"General Information",e.createElement(M,{px:"9px"})),u&&e.createElement(X,{divider:e.createElement(N,{borderColor:"white"}),align:"stretch",spacing:0},e.createElement(y,{height:"10px"}),d.map((I,A)=>e.createElement(S,{fontSize:"20px",fontWeight:"700",color:"white",bg:"PrimaryGreen",pl:"50px",py:"15px",key:A,href:I.link.href},I.link.title)))):e.createElement(S,{href:(B=i==null?void 0:i.link)==null?void 0:B.href,fontSize:"20px",fontWeight:"700",lineHeight:"normal",color:h===b?"white":n.colors.Grey1,cursor:"default"},(G=i==null?void 0:i.link)==null?void 0:G.title))}))};return e.createElement(e.Fragment,null,e.createElement(x,{as:$,rightIcon:e.createElement(M,{fasize:"fa-xs",m:"4px"}),width:"100vw",bg:"white",justifyContent:"space-between",onClick:o},a),e.createElement(J,{isOpen:c,onClose:p,size:"full"},e.createElement(K,{bgColor:"white"}),e.createElement(Q,{bg:"transparent",boxShadow:"none",width:"100vw",height:"100vh",padding:"0"},e.createElement(w,null))))}function ce(l){const[r,a]=Y();switch(E.useEffect(()=>{a()},[]),window.addEventListener("resize",a),r){case"lg":return e.createElement(se,l);case"md":return e.createElement(v,l);case"sm":return e.createElement(v,l)}}function be(l){var f,w;const{ct:r,parent:a}=l,[t,d]=E.useState(),[n,c]=E.useState(),m=window.location.pathname,u=j();E.useEffect(()=>{p()},[r,m]);function s(){const g=document.getElementById(u.hash.replace("#",""));if(g)return g.scrollIntoView({behavior:"smooth"}),o.disconnect()}const o=new MutationObserver(()=>{s()});async function p(){const g=await z.getArticle(r,m,"en-us","sub_nav");if(d(g[0]),a){const h=await z.getBanner(a);c(h?h[0]:void 0)}}return e.createElement("main",{className:"main"},e.createElement(L,null),t?e.createElement("div",null,t.seo&&e.createElement(V,{data:t.seo,override:t}),e.createElement(T,null),t.hero_banner&&e.createElement(Z,{data:t.hero_banner}),t.inherit_section_header_set_by_overview_page?(n==null?void 0:n.section_header_for_subpages[0])&&e.createElement(D,{data:n.section_header_for_subpages[0]}):((f=t.interior_section_header)==null?void 0:f.length)>0&&e.createElement(D,{data:t.interior_section_header[0]}),t.banner_group&&e.createElement(oe,{refData:t.banner_group[0]}),((w=t.section_hero_banner)==null?void 0:w.length)>0&&e.createElement(ee,{data:t.section_hero_banner[0]}),t.sub_nav&&e.createElement(ce,{data:t.sub_nav[0]}),t.show_breadcrumb&&e.createElement(ne,null),t.page_content&&e.createElement(te,{data:t.page_content})):e.createElement(re,{minH:"100vh"}),u.hash&&o.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["id"]}))}export{be as default};