1import{a as F,b as $,c as x,r as f,ab as j,j as t,Q as R,k as T,l as k,g as o,f as y,S as v,a8 as g,x as _}from"./index-v4KPeiCg.js";import{m as I}from"./react-error-boundary-DMlgtjX5.js";import{L as N,S as L,E as A}from"./Styles-GzTeA4Zl.js";import{C as S}from"./Card-BX6wRf_Y.js";import{a as C,E as D}from"./404-B8LfUn0P.js";import"./StatusWrapper-CdvKkPRK.js";import"./Styles-gjSrSUjN.js";import"./Avatar-D1iJsg0C.js";import"./Styles-CfSHj8lP.js";import"./Info-iqN3uBf3.js";import"./navigation-BjKiA5lV.js";import"./Icon-BZOJqJ3Q.js";import"./Checkbox-CCty_9VX.js";import"./FileType-Cffaw5-d.js";import"./PrograssBar-B2xQ8BBS.js";import"./PrograssBar2-dGvQZuzn.js";import"./Badge-BoQN51x4.js";import"./Flex-CiEVlWSF.js";import{P as H}from"./PageTitle-CDpVMbS0.js";import"./Form-CHjy8aSm.js";import"./Live-BhBGULay.js";import"./Text-CI01MKEu.js";import"./index-DK2tjJ2E.js";import"./SocialMedia-hKH2fBCu.js";import"./ResourcesSimplified-CfKMi-Al.js";import"./index-BNkhic_J.js";import"./onClickOutside-D3csa19_.js";import"./usePopperHook-CdhShD5o.js";import"./useNavItemTitle-nXgLq63J.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"5d6b59de93f22ddf3b0b25bc276cfa63c6440d8a"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="84597865-1fb4-4a58-a40f-961adf7a78a1",e._sentryDebugIdIdentifier="sentry-dbid-84597865-1fb4-4a58-a40f-961adf7a78a1")}catch{}})();const U=e=>({type:"CATEGORIES_FETCH_SUCCESS",payload:e}),O=(e,r)=>{switch(r.type){case"FETCH_INIT":return{...e,status:"PENDING"};case"FETCH_SUCCESS":return{...e,status:"SUCCESS"};case"FETCH_FAILURE":return{...e,status:"ERROR",error:r.payload};default:throw new Error}},P=()=>{const{t:e}=F(),r=$(),i=x(({event:s})=>s==null?void 0:s.slug),a=x(({categories:s})=>s==null?void 0:s.data),p=`https://app.gridaly.com/api/v1/live/${i}/exhibitors/categories`,[n,d]=f.useState(),[u,m]=f.useReducer(O,{status:"IDLE",error:!1});return f.useEffect(()=>{let s=!1;const h=j.CancelToken.source();if(n){const l=async()=>{await m({type:"FETCH_INIT"});try{s||j.get(p).then(c=>{s||(r(U(c.data)),m({type:"FETCH_SUCCESS"}),d())}).catch(c=>{var E,b;if(!s){let w=e("error");(b=(E=c==null?void 0:c.response)==null?void 0:E.data)!=null&&b.message&&(w=c.response.data.message),m({type:"FETCH_FAILURE",payload:w}),d()}})}catch{s||(m({type:"FETCH_FAILURE",payload:e("error")}),d())}};(a==null?void 0:a.length)>0?(m({type:"FETCH_SUCCESS"}),d()):l()}return()=>{s=!0,h.cancel()}},[n]),{state:u,setFetchInit:d}},M=o.div` 2 overflow: auto; 3 width: 100%; 4 margin: 0 auto; 5`,z=o.div` 6 display: flex; 7 flex-wrap: wrap; 8 9 /* @media (min-width: ${({theme:e})=>e.breakpoints.md}) { 10 flex-wrap: nowrap; 11 } */ 12`,G=o.div` 13 width: 100%; 14 max-height: 15rem; 15 16 @media (min-width: ${({theme:e})=>e.breakpoints.md}) { 17 padding-right: 1rem; 18 width: 30%; 19 max-width: 25rem; 20 max-height: 25rem; 21 } 22 23 ${({asideIsActive:e})=>e&&y` 24 @media (min-width: ${({theme:r})=>r.breakpoints.md}) and (max-width: ${({theme:r})=>r.breakpoints.lg}) { 25 width: 100%; 26 } 27 `} 28`,W=o.div` 29 width: 100%; 30 31 ${({isAside:e})=>e&&y` 32 @media (min-width: ${({theme:r})=>r.breakpoints.md}) { 33 width: 70%; 34 min-width: calc(100% - 25rem); 35 36 ${({asideIsActive:r})=>r&&y` 37 @media (min-width: ${({theme:i})=>i.breakpoints.md}) and (max-width: ${({theme:i})=>i.breakpoints.lg}) { 38 width: 100%; 39 } 40 `} 41 } 42 `} 43`,B=o.img` 44 width: 100%; 45 height: 100%; 46 border-radius: 0.75rem 0.75rem 0 0; 47 object-fit: cover; 48 49 @media (min-width: ${e=>e.theme.breakpoints.md}) { 50 border-radius: 0.75rem 0 0 0.75rem; 51 } 52 53 ${({asideIsActive:e})=>e&&y` 54 @media (min-width: ${({theme:r})=>r.breakpoints.md}) and (max-width: ${({theme:r})=>r.breakpoints.lg}) { 55 border-radius: 0.75rem 0.75rem 0 0; 56 } 57 `} 58`,q=o(_)` 59 display: flex; 60 width: 100%; 61 height: 100%; 62 text-align: center; 63 color: ${({theme:e})=>e.grey900}; 64 border: 1px solid ${({theme:e})=>e.grey200}; 65 border-radius: ${({theme:e})=>e.borderRadius200}; 66 padding: 0.5rem; 67 /* margin: 0 0.25rem; */ 68 margin-bottom: 0.5rem; 69 70 &:hover { 71 ${({theme:e})=>e.shadow} 72 } 73
74 img { 75 margin-bottom: 0.5rem; 76 max-height: 3rem; 77 max-width: 100%; 78 } 79`,K=o.div` 80 font-size: 1.15rem; 81 font-weight: ${({theme:e})=>e.bold}; 82`,Q=o.div` 83 text-align: center; 84 margin-right: 0.5rem; 85`,V=o.h5` 86 color: ${e=>e.theme.grey400}; 87 font-weight: 700; 88 font-size: 1.25rem; 89 text-transform: uppercase; 90`,Y=o.h4` 91 font-family: ${e=>e.theme.fontFeatured}; 92 font-weight: 500; 93`,J=({name:e,description:r,buttonLabel:i})=>{const[a,p]=f.useState(!1);return t.jsxs(t.Fragment,{children:[t.jsx(v.Root,{type:"button",underline:!0,onClick:()=>p(!0),"aria-label":i,children:i}),t.jsx(g.Root,{open:a,onOpenChange:p,children:t.jsxs(g.Content,{className:"max-w-3xl",children:[t.jsx(g.Header,{title:e}),t.jsx(g.Body,{children:t.jsx("div",{dangerouslySetInnerHTML:{__html:r}})})]})})]})},X=()=>{const{t:e}=F(),r=x(({categories:n})=>n==null?void 0:n.data),i=x(({aside:n})=>n.isActive),{state:a,setFetchInit:p}=P();return f.useEffect(()=>{p(!0)},[]),t.jsx(N,{variant:"scroll",children:t.jsx(L,{children:t.jsxs(M,{children:[(a==null?void 0:a.status)==="PENDING"&&t.jsx(R,{size:"3"}),(a==null?void 0:a.status)==="SUCCESS"&&t.jsx(t.Fragment,{children:(r==null?void 0:r.length)>0?t.jsx(t.Fragment,{children:r.map(({id:n,name:d,img:u,shortDescription:m,description:s,exhibitors:h})=>t.jsx(f.Fragment,{children:t.jsx(I,{FallbackComponent:C,children:t.jsx(S,{children:t.jsx(S.Body,{children:t.jsxs(z,{children:[u&&t.jsx(G,{asideIsActive:i,children:t.jsx(B,{src:u,alt:d,asideIsActive:i})}),t.jsxs(W,{asideIsActive:i,isAside:u,children:[t.jsx(Y,{children:d}),t.jsxs("div",{className:"mb-3",children:[t.jsx("span",{children:m}),s&&t.jsx(J,{name:d,description:s,buttonLabel:e("general.show-more")})]}),(h==null?void 0:h.length)>0&&t.jsxs(t.Fragment,{children:[t.jsx(V,{children:e("event.exhibitors")}),h.map(l=>t.jsx("div",{children:t.jsxs(q,{to:T(k.item.full,{exhibitorId:l.slug}),children:[l.logo&&t.jsx(Q,{children:t.jsx("img",{src:l.logo,alt:l.name})}),t.jsx(K,{children:l.name})]})},l.id))]})]})]})})})})},n))}):t.jsx(A,{icon:"fa-calendar-exclamation",text:e("schedule.no-agenda-items")})}),(a==null?void 0:a.status)==="ERROR"&&t.jsx(C,{error:{message:a==null?void 0:a.error}})]})})})},Re=()=>t.jsxs(I,{FallbackComponent:D,children:[t.jsx(H,{area:"expo-categories",fallbackKey:"general.categories"}),t.jsx(X,{})]});export{Re as default}; 94//# sourceMappingURL=Categories-CmiZXB1y.js.map
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.