PageSourceSearch

https://lablab.ai/_next/static/chunks/app/layout-b986ca66bf4e0ddc.js

js lablab.ai collected 2026-10-01 11:25:01 UTC 82,693 bytes, 3 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="f09e200e-d638-5b75-948b-d48e5ad68345")}catch(e){}}();(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{674:(e,t,r)=>{"use strict";r.d(t,{Tr:()=>s,d7:()=>l,o1:()=>n});var a=r(54842);function n(e){let{content:t,textInput:r}=e;return[(0,a.useMemo)(()=>{let e=r.toLowerCase();return t.filter(t=>Object.keys(t).some(r=>{let a=t[r];try{if(("techs"===r||"technologyList"===r)&&Array.isArray(a))return a.some(t=>{var r,a;return"object"==typeof t&&null!==t&&("techName"in t||"techSlug"in t)&&((null==(r=t.techName)?void 0:r.toLowerCase().includes(e))||(null==(a=t.techSlug)?void 0:a.toLowerCase().includes(e)))});if("object"==typeof a&&null!==a)return Object.values(a).some(t=>String(t).toLowerCase().includes(e));return String(a).toLowerCase().includes(e)}catch(e){return!1}}))},[t,r])]}function s(e){let{content:t,selected:r}=e;return[(0,a.useMemo)(()=>(null==r?void 0:r.id)===0?t:t.filter(e=>Object.values(e).some(e=>!!Array.isArray(e)&&e.some(e=>e.techName===r.name))),[t,r])]}function l(e){let t,{func:r,wait:a}=e;return function(){for(var e=arguments.length,n=Array(e),s=0;s<e;s++)n[s]=arguments[s];t&&clearTimeout(t),t=setTimeout(()=>{r(...n)},a)}}},766:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=r(23193)({enabled:!1,...!1})},4007:(e,t,r)=>{"use strict";r.d(t,{FloatingHelpButton:()=>v});var a=r(95442),n=r(54842),s=r(58174),l=r.n(s),i=r(56723),o=r(80600),c=r(77401),d=r(69611),u=r(92495),m=r(91400);function h(e){var t,r;let{eventSlug:s,isActive:i=!0,onNavigate:o}=e,[c,d]=(0,n.useState)(""),[h,y]=(0,n.useState)([]),[v,b]=(0,n.useState)("idle"),[j,w]=(0,n.useState)(null),[N,A]=(0,n.use
2State)(m.t),k=(0,n.useRef)(null),C=(0,n.useRef)(null),E=(0,n.useRef)(null),S=(0,u.sf)();(0,n.useEffect)(()=>()=>{var e;return null==(e=k.current)?void 0:e.abort()},[]),(0,n.useEffect)(()=>{var e;i&&(null==(e=E.current)||e.focus())},[i]),(0,n.useEffect)(()=>{i||k.current&&!k.current.signal.aborted&&(k.current.abort(),b("idle"),y(e=>{var t;return(null==(t=e.at(-1))?void 0:t.answer)===""?e.slice(0,-1):e}))},[i]),(0,n.useEffect)(()=>{let e=C.current;e&&(e.scrollTop=e.scrollHeight)},[h,v]);let _="thinking"===v||"streaming"===v,I=c.trim().length<5;async function T(){let e=c.trim();if(e.length<5||_)return;b("thinking"),w(null),A(m.t),d(""),y(t=>[...t,{question:e,answer:""}]);let t=new AbortController;k.current=t;let r=await (0,m.m)({question:e,history:h,eventSlug:s,signal:t.signal,onAnswer:e=>{b("streaming"),y(t=>t.map((r,a)=>a===t.length-1?{...r,answer:e}:r))},onAnswerComplete:()=>b("idle"),onActions:e=>y(t=>t.map((r,a)=>a===t.length-1?{...r,actions:e}:r)),onRateLimited:e=>{let{message:t}=e;return A(t)}});"aborted"!==r&&(b("idle"),"ok"!==r&&(y(e=>e.slice(0,-1)),w("rate-limited"===r?"rate":"network")))}return(0,a.jsxs)("div",{className:"flex h-[420px] flex-col",children:[(0,a.jsx)("p",{role:"status","aria-live":"polite",className:"sr-only",children:"thinking"===v?"Thinking…":"idle"===v&&(null==(t=h.at(-1))?void 0:t.answer)?"Answer ready: ".concat(null==(r=h.at(-1))?void 0:r.answer):""}),(0,a.jsxs)("div",{ref:C,className:"flex-1 space-y-4 overflow-y-auto px-4 py-4",children:[0===h.length&&!j&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-500",children:["Ask anything about lablab.ai",s?" or this hackathon":""," — teams, deadlines, submissions."]}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"For a human, try the Discord community or the Help Center."})]}),h.map((e,t)=>(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"ml-auto w-fit max-w-[85%] rounded-2xl rounded-br-sm bg-indigo-600 px-3.5 py-2 text-sm leading-relaxed text-white",children:e.question}),e.answer?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"max-w-[92%] whitespace-pre-line rounded-2xl rounded-bl-sm bg-gray-50 px-3.5 py-2 text-sm leading-relaxed text-gray-700",children:[e.answer,"streaming"===v&&t===h.length-1&&(0,a.jsx)(f,{})]}),e.actions&&e.actions.length>0&&(0,a.jsx)("div",{className:"flex max-w-[92%] flex-wrap gap-1.5",children:e.actions.map(e=>(0,a.jsxs)(l(),{href:e.href,onClick:()=>{null==S||S.capture("faq_action_clicked",{action_id:e.id,event_slug:s}),null==o||o()},className:"inline-flex items-center gap-1 rounded-full border border-indigo-200 bg-indigo-50 px-3 py-1.5 text-xs font-medium text-indigo-700 transition-colors hover:bg-indigo-100",children:[e.label,(0,a.jsx)(x,{})]},e.id))})]}):"thinking"===v&&t===h.length-1&&(0,a.jsxs)("span",{className:"flex h-[18px] items-center gap-[5px] px-1",children:[(0,a.jsx)(p,{delay:0}),(0,a.jsx)(p,{delay:.18}),(0,a.jsx)(p,{delay:.36})]})]},"".concat(t,"-").concat(e.question))),"rate"===j&&(0,a.jsx)("p",{className:"rounded-lg bg-amber-50 px-3.5 py-2.5 text-sm text-amber-700",children:N}),"network"===j&&(0,a.jsx)("p",{className:"rounded-lg bg-red-50 px-3.5 py-2.5 text-sm text-red-700",children:"Something went wrong. Please try again."})]}),(0,a.jsxs)("div",{className:"border-t border-gray-100 p-3",children:[(0,a.jsxs)("div",{className:"flex items-end gap-2",children:[(0,a.jsx)("textarea",{ref:E,rows:1,maxLength:500,value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),T())},placeholder:"Ask a question…","aria-label":"Ask the AI assistant a question",className:"max-h-24 min-h-[40px] flex-1 resize-none rounded-lg border border-gray-300 bg-gray-50 px-3 py-2.5 text-sm leading-snug text-gray-900 outline-none transition duration-150 focus:border-indigo-600 focus:ring-2 focus:ring-indigo-600/20"}),(0,a.jsx)("button",{type:"button",onClick:T,disabled:_||I,"aria-label":"Send question",className:"flex size-10 flex-none items-center justify-center rounded-lg bg-indigo-600 text-white transition-colors hover:bg-indigo-500 disabled:cursor-default disabled:bg-indigo-300",children:(0,a.jsx)(g,{})})]}),(0,a.jsx)("p",{className:"mt-2 text-center text-[11px] text-gray-400",children:"AI-generated \xb7 may not be accurate"})]})]})}function x(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-3","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M5 12h13"}),(0,a.jsx)("path",{d:"M12.5 5.5L19 12l-6.5 6.5"})]})}function f(){return(0,a.jsx)("span",{className:"ml-0.5 inline-block w-[7px] rounded-[1px] bg-indigo-600",style:{height:15,verticalAlign:"-2px",animation:"hccaret 0.9s steps(1) infinite"}})}function p(e){let{delay:t}=e;return(0,a.jsx)("span",{className:"inline-block size-1.5 rounded-full bg-gray-400",style:{animation:"hcblink 1.1s ".concat(t,"s infinite ease-in-out")}})}function g(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[18px]","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M5 12h13"}),(0,a.jsx)("path",{d:"M12.5 5.5L19 12l-6.5 6.5"})]})}let y="/help-center";function v(){let e=(0,i.usePathname)();return e===y?null:(0,a.jsx)(b,{pathname:e})}function b(e){let{pathname:t}
2=e,[r,s]=(0,n.useState)(!1),[i,u]=(0,n.useState)("menu"),[m,x]=(0,n.useState)(!1),f=(0,n.useRef)(null),p=(0,c.O)(t);return(0,n.useEffect)(()=>{if(!r)return;let e=e=>{f.current&&!f.current.contains(e.target)&&s(!1)},t=e=>{"Escape"===e.key&&s(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[r]),(0,a.jsxs)("div",{ref:f,"data-print":"hide",className:"fixed bottom-4 right-6 z-50 flex flex-col items-end",children:[(0,a.jsxs)("div",{"aria-hidden":!r,className:(0,d.cn)("absolute bottom-full right-0 mb-3 max-w-[calc(100vw-3rem)] origin-bottom-right overflow-hidden rounded-2xl border border-gray-200 bg-white shadow-lg transition-[opacity,transform,width] duration-150 ease-out","chat"===i?"w-[340px] sm:w-[380px]":"w-[300px] sm:w-[312px]",r?"visible translate-y-0 scale-100 opacity-100":"pointer-events-none invisible translate-y-2 scale-[0.985] opacity-0"),children:[m&&(0,a.jsxs)("div",{role:"dialog","aria-label":"AI assistant",className:"chat"===i?void 0:"hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-gray-100 px-3 py-2.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>u("menu"),"aria-label":"Back to help options",className:"flex size-8 flex-none items-center justify-center rounded-lg text-gray-400 transition-colors hover:bg-gray-50 hover:text-gray-600",children:(0,a.jsx)(A,{})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium leading-tight text-gray-900",children:"AI Assistant"}),p&&(0,a.jsx)("span",{className:"truncate text-[11px] leading-tight text-gray-400",children:p})]}),(0,a.jsx)("button",{type:"button",onClick:()=>s(!1),"aria-label":"Close",className:"ml-auto flex size-8 flex-none items-center justify-center rounded-lg text-gray-400 transition-colors hover:bg-gray-50 hover:text-gray-600",children:(0,a.jsx)(k,{})})]}),(0,a.jsx)(h,{eventSlug:p,isActive:r&&"chat"===i,onNavigate:()=>s(!1)})]}),(0,a.jsxs)("div",{role:"menu",className:"menu"===i?void 0:"hidden",children:[(0,a.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{x(!0),u("chat")},className:"group flex w-full items-center gap-3 px-4 py-3.5 text-left transition-colors hover:bg-gray-50",children:[(0,a.jsx)("span",{className:"flex w-[26px] flex-none items-center justify-center text-indigo-600",children:(0,a.jsx)(N,{})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium leading-tight text-gray-900",children:"Chat"}),(0,a.jsx)("span",{className:"text-[12.5px] leading-snug text-gray-500",children:p?"Ask our AI about this hackathon.":"Ask our AI anything."})]}),(0,a.jsx)("span",{className:"ml-auto flex flex-none items-center text-gray-400 transition-[color,transform] group-hover:translate-x-0.5 group-hover:text-gray-500",children:(0,a.jsx)(C,{})})]}),(0,a.jsx)("div",{className:"mx-4 h-px bg-gray-100"}),(0,a.jsxs)(l(),{href:y,role:"menuitem",onClick:()=>s(!1),className:"group flex items-center gap-3 px-4 py-3.5 transition-colors hover:bg-gray-50",children:[(0,a.jsx)("span",{className:"flex w-[26px] flex-none items-center justify-center text-gray-700",children:(0,a.jsx)(w,{})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium leading-tight text-gray-900",children:"Help Center"}),(0,a.jsx)("span",{className:"text-[12.5px] leading-snug text-gray-500",children:"Browse FAQs and guides."})]}),(0,a.jsx)("span",{className:"ml-auto flex flex-none items-center text-gray-400 transition-[color,transform] group-hover:translate-x-0.5 group-hover:text-gray-500",children:(0,a.jsx)(C,{})})]}),(0,a.jsx)("div",{className:"mx-4 h-px bg-gray-100"}),(0,a.jsxs)("a",{href:o.w.DISCORD,target:"_blank",rel:"noopener noreferrer",role:"menuitem",onClick:()=>s(!1),className:"group flex items-center gap-3 px-4 py-3.5 transition-colors hover:bg-gray-50",children:[(0,a.jsx)("span",{className:"flex w-[26px] flex-none items-center justify-center",children:(0,a.jsx)(S,{})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium leading-tight text-gray-900",children:"Discord Community"}),(0,a.jsx)("span",{className:"text-[12.5px] leading-snug text-gray-500",children:"Chat with mentors and the team."})]}),(0,a.jsx)("span",{className:"ml-auto flex flex-none items-center text-gray-400 transition-colors group-hover:text-gray-500",children:(0,a.jsx)(E,{})})]})]})]}),(0,a.jsxs)("button",{type:"button","aria-haspopup":"menu","aria-expanded":r,"aria-label":"Help",onClick:()=>s(e=>!e),className:"relative z-[1] flex size-12 items-center justify-center gap-0 rounded-full bg-indigo-600 font-semibold tracking-tight text-white shadow-sm transition-colors hover:bg-indigo-500 hover:shadow-md focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-4 focus-visible:outline-white active:translate-y-
2px sm:h-14 sm:w-auto sm:gap-2.5 sm:px-5 sm:text-sm",children:[(0,a.jsx)("span",{className:"flex",children:(0,a.jsx)(j,{})}),(0,a.jsx)("span",{className:"hidden whitespace-nowrap sm:inline",children:"Help"})]})]})}function j(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-5 sm:size-[21px]","aria-hidden":"true",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"9.5"}),(0,a.jsx)("path",{d:"M9.2 9.2a2.9 2.9 0 0 1 5.6 1c0 1.95-2.85 2.4-2.85 4.3"}),(0,a.jsx)("path",{d:"M12 17.6h.01"})]})}function w(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[22px]","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M12 6.4C10.4 5.2 8.2 4.7 5.4 4.7c-.55 0-1 .45-1 1v11.3c0 .55.45 1 1 1 2.8 0 5 .5 6.6 1.8"}),(0,a.jsx)("path",{d:"M12 6.4c1.6-1.2 3.8-1.7 6.6-1.7.55 0 1 .45 1 1v11.3c0 .55-.45 1-1 1-2.8 0-5 .5-6.6 1.8"}),(0,a.jsx)("path",{d:"M12 6.4v13.7"})]})}function N(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[22px]","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M12 3l1.6 4.8L18.4 9.4 13.6 11 12 15.8 10.4 11 5.6 9.4 10.4 7.8z"}),(0,a.jsx)("path",{d:"M18.5 14.5l.7 2 2 .7-2 .7-.7 2-.7-2-2-.7 2-.7z"})]})}function A(){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[17px]","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M15 6l-6 6 6 6"})})}function k(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[17px]","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M6 6l12 12"}),(0,a.jsx)("path",{d:"M18 6L6 18"})]})}function C(){return(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[17px]","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M9 6l6 6-6 6"})})}function E(){return(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"size-[17px]","aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M14 4h6v6"}),(0,a.jsx)("path",{d:"M20 4l-8.5 8.5"}),(0,a.jsx)("path",{d:"M18 13.5V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4.5"})]})}function S(){return(0,a.jsx)("svg",{viewBox:"0 0 26 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"h-[19px] w-6","aria-hidden":"true",children:(0,a.jsx)("path",{d:"M21.7328 1.74092C20.1266 0.981229 18.4042 0.421522 16.6034 0.100954C16.5706 0.0947673 16.5378 0.110229 16.5209 0.141152C16.2994 0.547271 16.0541 1.07709 15.8823 1.49352C13.9453 1.1946 12.0183 1.1946 10.1211 1.49352C9.94928 1.06783 9.69501 0.547271 9.47251 0.141152C9.45561 0.11126 9.42285 0.095799 9.39006 0.100954C7.59021 0.420497 5.86784 0.980205 4.26068 1.74092C4.24677 1.7471 4.23485 1.75742 4.22693 1.77081C0.959964 6.80203 0.0650046 11.7096 0.504041 16.5563C0.506028 16.58 0.518941 16.6027 0.53682 16.6171C2.69227 18.2488 4.7802 19.2394 6.82935 19.896C6.86214 19.9063 6.89689 19.894 6.91776 19.8661C7.40249 19.1838 7.83458 18.4643 8.20505 17.7077C8.22692 17.6634 8.20605 17.6108 8.16136 17.5933C7.47599 17.3253 6.82338 16.9985 6.19562 16.6274C6.14596 16.5975 6.14199 16.5243 6.18767 16.4893C6.31977 16.3872 6.45191 16.2811 6.57806 16.1739C6.60088 16.1543 6.63268 16.1502 6.65951 16.1625C10.7837 18.1035 15.2485 18.1035 19.324 16.1625C19.3508 16.1491 19.3826 16.1533 19.4065 16.1728C19.5326 16.28 19.6647 16.3872 19.7978 16.4893C19.8435 16.5243 19.8405 16.5975 19.7909 16.6274C19.1631 17.0057 18.5105 17.3253 17.8241 17.5922C17.7795 17.6098 17.7596 17.6634 17.7814 17.7077C18.1599 18.4632 18.592 19.1827 19.0677 19.8651C19.0876 19.894 19.1234 19.9063 19.1562 19.896C21.2152 19.2394 23.3032 18.2488 25.4586 16.6171C25.4775 16.6027 25.4894 16.581 25.4914 16.5573C26.0168 10.954 24.6113 6.08669 21.76
255 1.77184C21.7586 1.75742 21.7467 1.7471 21.7328 1.74092ZM8.82093 13.6052C7.57928 13.6052 6.55619 12.4301 6.55619 10.987C6.55619 9.5439 7.55944 8.36883 8.82093 8.36883C10.0923 8.36883 11.1055 9.55422 11.0856 10.987C11.0856 12.4301 10.0824 13.6052 8.82093 13.6052ZM17.1944 13.6052C15.9528 13.6052 14.9297 12.4301 14.9297 10.987C14.9297 9.5439 15.9329 8.36883 17.1944 8.36883C18.4658 8.36883 19.479 9.55422 19.4591 10.987C19.4591 12.4301 18.4658 13.6052 17.1944 13.6052Z",fill:"#5865F2"})})}},4705:(e,t,r)=>{"use strict";r.d(t,{FacebookTrackingInit:()=>l});var a=r(54842),n=r(11711),s=r(62096);function l(){return(0,a.useEffect)(()=>{if((0,s.IQ)())return;let e=n.b.getInstance();e.ensureFbpCookie();let t=new URLSearchParams(window.location.search).get("fbclid");e.updateFbcCookie(t)},[]),null}},8246:(e,t,r)=>{"use strict";r.d(t,{PosthogProvider:()=>c});var a=r(95442),n=r(54842),s=r(96508),l=r(36272),i=r(92495),o=r(32424);let c=e=>{let{children:t}=e;return(0,n.useEffect)(()=>{(0,o.p)(),null===l.Ay||void 0===l.Ay||l.Ay.capture("$pageview");let e=()=>{null===l.Ay||void 0===l.Ay||l.Ay.capture("$pageview")};return s.Router.events.on("routeChangeComplete",e),()=>{s.Router.events.off("routeChangeComplete",e)}},[]),(0,a.jsx)(i.so,{client:l.Ay,children:t})}},9583:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});let a=new Set(["lablab_website","function1website","function1chatbot","aiweek_website","eventpage"]);function n(e){return!!(null==e?void 0:e.utm_medium)&&a.has(e.utm_medium)}},14058:()=>{},20786:(e,t,r)=>{"use strict";r.d(t,{o:()=>o});var a=r(70673),n=r.n(a),s=r(89274);(0,s.Yj)().regex(/^\//);let l=(0,s.Yj)().url(),i=(0,s.g1)((0,s.KC)([(0,s.Yj)(),(0,s.YO)((0,s.Yj)()),l,(0,s.Vx)()])),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var r;let a=i.parse(t),{base:s,params:l}=(e=>{let{base:t,params:r}=e;if(!t&&r.callbackUrl){let e="string"==typeof r.callbackUrl?r.callbackUrl:r.callbackUrl[0];e.startsWith("http://")||e.startsWith("https://")||(e=e.startsWith("/")?e:"/".concat(e));let{callbackUrl:a,...n}=r;return{base:t=e,params:n}}return{base:t,params:r}})({base:e,params:a}),o=(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[t,r]=e;try{return i.parse({[t]:r}),!0}catch(e){return!1}}));return n().stringify(t,{arrayFormat:"indices"})})(l),c=s.includes("?")?"&":"?";return(r=o?"".concat(s).concat(c).concat(o):s).startsWith("http://")||r.startsWith("https://")||r.startsWith("/")?r:"/".concat(r)}catch(e){throw Error("Failed to compose URL: ".concat(e))}}},22298:(e,t,r)=>{"use strict";function a(e){if(!e)return e;let[t,r=""]=e.split("?");if(!r)return e;let a=new URLSearchParams(r),n=!1;for(let e of Array.from(a.keys()))e.toLowerCase().startsWith("utm_")&&(a.delete(e),n=!0);if(!n)return e;let s=a.toString();return s?"".concat(t,"?").concat(s):t}r.d(t,{b:()=>a})},32552:(e,t,r)=>{"use strict";r.r(t),r.d(t,{RenderBuilderContent:()=>c});var a=r(95442),n=r(11415),s=r(56975),l=r.n(s),i=r(92540),o=r(40165);function c(e){let{content:t,model:r}=e;return t||(0,n.Tz)()?(0,a.jsx)(n.UC,{content:t,model:r,apiKey:o._.NEXT_PUBLIC_BUILDER_API_KEY,customComponents:i.K,locale:"en"}):(0,a.jsx)(l(),{statusCode:404})}},34789:()=>{},36631:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var a=r(95442),n=r(674),s=r(69611),l=r(18130);let i=e=>{let{onClick:t,onChange:r,defaultValue:i,placeholder:o="Search by topic or keyword",debounceOnChange:c=!1,debounceTime:d=500,className:u,labelClassName:m,id:h,label:x,backgroundColor:f="bg-white"}=e,p=(0,n.d7)({func:r||(()=>{}),wait:d});return(0,a.jsxs)("div",{className:"flex-1",children:[x?(0,a.jsx)("label",{htmlFor:h,className:(0,s.cn)("text-sm font-semibold text-gray-500",m),children:x}):null,(0,a.jsxs)("div",{className:"relative mx-auto w-full text-center",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-30 flex items-center pl-3",children:(0,a.jsx)(l.A,{className:"size-5 text-gray-400","aria-hidden":"true"})}),(0,a.jsx)("input",{id:h,type:"text",className:(0,s.cn)("relative block w-full cursor-pointer rounded-lg border border-gray-300 py-2 pl-10 pr-3 text-base shadow-sm outline-none placeholder:text-gray-400 hover:border-gray-600 hover:placeholder:text-gray-600 focus:border-indigo-700 focus:text-gray-900 focus:shadow-xl focus:outline-none focus:ring-1 focus:ring-indigo-500",f,u),onClick:t,onChange:c?p:r,defaultValue:i,placeholder:o})]})]})}},36774:(e,t,r)=>{"use strict";
2r.d(t,{AdvertisementModalProvider:()=>f,s:()=>p,j:()=>y});var a=r(95442),n=r(54842),s=r(56723),l=r(20791),i=r(4818),o=r(26574),c=r(36272);let d=function(){let{delay:e=3e3,storageKey:t="advertisementModal"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{openModal:r}=p(),a=(0,n.useRef)(null);(0,n.useEffect)(()=>{try{let e=localStorage.getItem(t);if(e){let r=JSON.parse(e);if(r.expiresAt){if(Date.now()<r.expiresAt)return;localStorage.removeItem(t)}}}catch(e){}return a.current=setTimeout(()=>{r()},e),()=>{a.current&&clearTimeout(a.current)}},[e,r,t])};function u(e){let{storageKey:t}=e;return d({delay:3e3,storageKey:t}),null}var m=r(40165),h=r(22298);let x=(0,n.createContext)(void 0),f=e=>{let{children:t}=e,[r,d]=(0,n.useState)(null),[f,p]=(0,n.useState)(!1),[g,y]=(0,n.useState)(!1),[v,b]=(0,n.useState)(null),j=(0,s.usePathname)(),w=r?"advertisementModal:".concat(r.id):"advertisementModal",N=r?(0,h.b)(r.ctaLink):"",A="".concat(m._.NEXT_PUBLIC_BASE_URL).concat(N),k=N.split("?")[0].replace(/\/$/,""),C=k&&j.endsWith(k);(0,n.useEffect)(()=>{fetch("/api/v4/banner-campaign/eligible").then(e=>e.json()).then(e=>{e.campaign&&d(e.campaign)}).catch(e=>console.error("Failed to fetch banner campaign:",e))},[]);let E=(0,s.useRouter)(),S=(0,n.useCallback)(()=>p(!0),[]),_=(0,n.useCallback)(()=>b(j),[j]),I=null!==v&&v===j,T=(0,n.useCallback)(()=>{p(!1);try{let e=Date.now()+2592e5;localStorage.setItem(w,JSON.stringify({closed:!0,expiresAt:e,closedAt:Date.now()}))}catch(e){}},[w]);(0,n.useEffect)(()=>{if(!f)return;let e=e=>{"Escape"===e.key&&T()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,T]);let L=(0,n.useMemo)(()=>({openModal:S,closeModal:T,isOpen:f,suppress:_}),[S,T,f,_]),M=r&&!C&&!I;return(0,a.jsxs)(x.Provider,{value:L,children:[t,M&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u,{storageKey:w}),(0,a.jsx)(l.e.Root,{show:f,as:n.Fragment,children:(0,a.jsxs)("div",{className:"relative z-[99999]",role:"complementary","aria-label":"Promotion",children:[(0,a.jsx)(l.e.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)("div",{className:"pointer-events-none fixed inset-x-0 bottom-24 top-0 bg-black/80 transition-opacity sm:bottom-0"})}),(0,a.jsx)("div",{className:"pointer-events-none fixed inset-x-0 bottom-24 top-0 z-10 overflow-y-auto sm:bottom-0",children:(0,a.jsx)("div",{className:"flex min-h-full items-center justify-center p-4",children:(0,a.jsx)(l.e.Child,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:scale-95",children:(0,a.jsxs)("div",{className:"pointer-events-auto relative w-full max-w-md transform overflow-hidden bg-[#0F0F0F] shadow-xl transition-all",children:[(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{onClick:T,"aria-label":"Dismiss promotion",className:"z-10 p-2 text-white transition-colors hover:bg-black/30",children:(0,a.jsx)(o.In,{icon:"mdi:close",className:"size-8"})})}),(0,a.jsxs)("div",{className:"relative bg-[#0F0F0F]",children:[!g&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsx)("div",{className:"size-12 animate-spin rounded-full border-4 border-gray-700 border-t-white"})}),(0,a.jsx)("a",{href:A,onClick:e=>(e=>{let{e:t,link:a}=e;if(t.preventDefault(),r){var n;null===c.Ay||void 0===c.Ay||c.Ay.capture("internal_banner_clicked",{campaign_id:r.id,campaign_name:r.name,event_id:null!=(n=r.eventId)?n:null,cta_path:k})}T(),E.push(a)})({e,link:A}),className:"block cursor-pointer overflow-hidden",children:(0,a.jsx)(i.default,{src:r.imageUrl,alt:"Advertisement banner",width:800,height:600,className:"h-auto w-full object-contain transition duration-300 hover:scale-105 hover:brightness-110",priority:!0,onLoad:()=>y(!0)})})]})]})})})})]})})]})]})},p=()=>{let e=(0,n.useContext)(x);
2if(!e)throw Error("useAdvertisementModal must be used within AdvertisementModalProvider");return e},g=()=>{},y=()=>{var e;let t=(0,n.useContext)(x);return null!=(e=null==t?void 0:t.suppress)?e:g}},37226:(e,t,r)=>{"use strict";r.d(t,{B_:()=>l,w8:()=>s,iM:()=>i,s9:()=>n});var a=r(84244);let n=()=>["/api/v4/notifications/unread-count",1];function s(){return Promise.all([(0,a.j)(n()),(0,a.j)(e=>"string"==typeof e&&e.startsWith("/api/v4/notifications"))])}function l(){return(0,a.j)(n(),e=>e?{unread:Math.max(0,e.unread-1),unseen:e.unseen,total:Math.max(0,e.total-1)}:e,!1)}function i(){return(0,a.j)(n())}},37904:(e,t,r)=>{"use strict";r.d(t,{Hf:()=>d,IQ:()=>o,Sq:()=>c,eT:()=>i,rn:()=>l});var a=r(40165),n=r(45886);let s="lablab:bustGetUserCacheOnce",l=()=>{try{sessionStorage.setItem(s,"1")}catch(e){}},i=async e=>{let t=!1;try{t="1"===sessionStorage.getItem(s)}catch(e){}let r=await fetch("".concat(a._.NEXT_PUBLIC_BASE_URL,"api/v4/user/getUser"),{signal:e,method:"GET",cache:t?"reload":"default",headers:{"Content-Type":"application/json"}}),l=await (0,n.q)(r);if(t)try{sessionStorage.removeItem(s)}catch(e){}return l},o=async e=>{let t=await fetch("".concat(a._.NEXT_PUBLIC_BASE_URL,"api/v4/user/export"),{signal:e,method:"GET",headers:{"Content-Type":"application/json"}});return(0,n.q)(t)},c=async e=>{let t=await fetch("".concat(a._.NEXT_PUBLIC_BASE_URL,"api/v4/user/canJudge"),{signal:e,method:"GET",headers:{"Content-Type":"application/json"}});return(0,n.q)(t)},d=async e=>{let{name:t,subscribedToMail:r}=e,s=await fetch("".concat(a._.NEXT_PUBLIC_BASE_URL,"api/v4/user/updateUser"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,subscribedToMail:r})}),i=await (0,n.q)(s);return l(),i}},41767:(e,t,r)=>{"use strict";function a(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function n(e,t){return 400!==t&&"string"==typeof e&&!!e}function s(e){let{body:t,status:r,fallback:a}=e;if("string"==typeof t.error&&t.error)return t.error;if(n(t.message,r))return t.message;if(Array.isArray(t.errors)){let e=t.errors.find(e=>"object"==typeof e&&null!==e),r=e?Object.values(e)[0]:void 0;if("string"==typeof r&&r)return r}return n(t.msg,r)?t.msg:a}function l(e){return a(e)?e:{}}r.d(t,{LW:()=>l,Ms:()=>s,Qd:()=>a})},43032:(e,t,r)=>{"use strict";r.d(t,{Analytics:()=>l});var a=r(54842),n=r(56723);let s="GTM-PQZ5V5C";function l(){let e=(0,n.usePathname)(),t=(0,n.useSearchParams)();return(0,a.useEffect)(()=>{if(!s||document.getElementById("gtm-script"))return;let e=document.createElement("script");if(e.id="gtm-script",e.innerHTML="\n      (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n      new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n      j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;
2j.src=\n      'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n      })(window,document,'script','dataLayer','".concat(s,"');\n    "),document.head.appendChild(e),!document.getElementById("gtm-noscript")){let e=document.createElement("noscript");e.id="gtm-noscript",e.innerHTML='\n        <iframe src="https://www.googletagmanager.com/ns.html?id='.concat(s,'"\n          height="0" width="0" style="display:none;visibility:hidden"></iframe>\n      '),document.body.prepend(e)}},[]),(0,a.useEffect)(()=>{if(!window.dataLayer)return;let r=e+(t.toString()?"?".concat(t):"");window.dataLayer.push({event:"pageview",page:r})},[e,t]),null}},44158:(e,t,r)=>{"use strict";r.d(t,{q:()=>n});var a=r(54842);function n(){let[e,t]=(0,a.useState)(!1);return(0,a.useEffect)(()=>t(!0),[]),e}},45446:(e,t,r)=>{"use strict";r.d(t,{default:()=>v});var a=r(95442),n=r(24945),s=r.n(n),l=r(4818);let i={src:"/_next/static/media/lablab-logo-invertedcolor.190bb0b1.png",height:285,width:330,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAHlBMVEX///////////////////////////////////////8V2MxSAAAACnRSTlPOsqLb+8TseZasbtqx7gAAAAlwSFlzAAALEwAACxMBAJqcGAAAADFJREFUeJwlybEBwEAIA7HDxg/sv3CKqBXTzSOmXk/dwjmSLlC2te+vEhyRdgOhDfMBGxwA0cBtRu4AAAAASUVORK5CYII=",blurWidth:8,blurHeight:7};var o=r(62941);let c=[{key:"1",link:"https://nativelyai.com",url:"/nativelyai.svg"}],d=()=>{let e=(0,o.J)();return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-gray-200",children:e("footer.otherBrands")}),(0,a.jsx)("div",{className:"flex w-full flex-col gap-7 md:flex-row",children:c.map(e=>(0,a.jsx)("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",children:(0,a.jsx)(l.default,{className:"h-6 w-auto object-cover brightness-90 hover:brightness-50",src:e.url,alt:e.link,width:110,height:25},e.key)},e.key))})]})};var u=r(58174),m=r.n(u);let h="text-sm text-gray-200 hover:text-gray-500 cursor-pointer",x=e=>{let{items:t,linkType:r,title:n}=e;return(0,a.jsxs)("div",{children:[n&&(0,a.jsx)("span",{className:"text-sm font-semibold uppercase tracking-wider text-gray-400",children:n}),(0,a.jsx)("ul",{role:"list",className:"mt-4 ".concat(n?"space-y-2":"flex flex-row gap-6"),children:t.map(e=>(0,a.jsx)("li",{children:"Link"===r?(0,a.jsx)(m(),{prefetch:!1,href:e.href,target:e.target||null,rel:e.rel||null,className:h,children:e.name}):(0,a.jsx)("a",{target:e.target||"_blank",rel:e.rel||"noopener noreferrer nofollow",href:e.href,className:h,children:e.icon?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"sr-only",children:e.name}),(0,a.jsx)(e.icon,{className:"size-6","aria-hidden":"true"})]}):(0,a.jsx)("span",{children:e.name})})},e.name))})]})};var f=r(2812),p=r(80600);let g={navigation:[{labelKey:"footer.links.aiTech",href:"/tech"},{labelKey:"footer.links.hackathons",href:f.B.Event},{labelKey:"footer.links.tutorials",href:f.B.Tutorials},{labelKey:"footer.links.applications",href:"/apps"},{labelKey:"footer.links.natively",href:"https://nativelyai.com/#products",target:"_blank"},{labelKey:"footer.links.articles",href:"/ai-articles"},{labelKey:"footer.links.leaderboard",href:"/leaderboard"},{labelKey:"footer.links.writers",href:"/writers"}],lablab:[{labelKey:"footer.links.about",href:"/about"},{labelKey:"footer.links.brand",href:"/brand"},{labelKey:"footer.links.guidelines",href:"/guide"},{labelKey:"footer.links.terms",href:"/terms-of-use"},{labelKey:"footer.links.conduct",href:"/code-of-conduct"},{labelKey:"footer.links.privacy",href:"/privacy-policy"},{labelKey:"footer.links.security",href:f.B.SecurityPolicy}],contact:[{labelKey:"footer.links.discord",href:"https://discord.gg/lablabai"},{labelKey:"footer.links.sponsor",href:"/sponsor",rel:"opener"},{labelKey:"footer.links.cooperation",href:"/cooperation",target:"_self",rel:"opener"},{labelKey:"footer.links.contribute",href:"https://wkf.ms/3PQMLlq"},{labelKey:"footer.links.communityEmail",href:"mailto:[email protected]",rel:"opener"}],social:[{labelKey:"footer.links.linkedIn",href:p.w.LINKEDIN,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.063 2.063 0 112.063 2.065zm1.778 13.019H3.555V9h3.56v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})},{labelKey:"footer.links.twitter",href:p.w.TWITTER,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 23 23",...e,children:(0,a.jsx)("path",{d:"M13.1515 9.8785L20.8594 1H19.0978L12.3619 8.70548L6.98892 1H1L9.10285 12.7808L1 22.1123H2.76158L9.89155 13.9595L15.5904 22.1123H21.5793L13.1511 9.8785H13.1515ZM10.8099 12.8671L10.0056 11.7311L3.39916 2.32295H6.14039L11.4881 10.0656L12.2924 11.2016L19.0987 20.8401
2H16.3575L10.8099 12.8675V12.8671Z"})})},{labelKey:"footer.links.instagram",href:p.w.INSTAGRAM,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z",clipRule:"evenodd"})})},{labelKey:"footer.links.discord",href:p.w.DISCORD,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{d:"M20.317 4.369a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.683 12.683 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.369a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.056 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028 14.09 14.09 0 001.226-1.994.076.076 0 00-.041-.105 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 01.077-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 01.078.009c.12.099.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.04.106c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.331c-1.182 0-2.156-1.085-2.156-2.419 0-1.333.955-2.419 2.156-2.419 1.21 0 2.175 1.095 2.156 2.42 0 1.333-.955 2.418-2.156 2.418zm7.974 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.175 1.095 2.156 2.42 0 1.333-.946 2.418-2.156 2.418z"})})},{labelKey:"footer.links.youTube",href:p.w.YOUTUBE,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{d:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})},{labelKey:"footer.links.twitch",href:p.w.TWITCH,icon:e=>(0,a.jsx)("svg",{fill:"currentColor",viewBox:"0 0 24 24",...e,children:(0,a.jsx)("path",{d:"M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"})})}]};function y(e,t){return e.map(e=>({...e,name:t(e.labelKey)}))}let v=e=>{let{version:t}=e,r=(0,o.J)(),n=String(new Date().getFullYear());return(0,a.jsxs)("footer",{className:"z-10 mt-auto bg-black","aria-labelledby":"footer-heading",children:[(0,a.jsx)("h3",{id:"footer-heading",className:"sr-only",children:r("footer.navigationLabel")}),(0,a.jsxs)("div",{className:"mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8 lg:py-16",children:[(0,a.jsxs)("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[(0,a.jsxs)("div",{className:"space-y-8 xl:col-span-1",children:[(0,a.jsx)(l.default,{width:40,height:40,src:i,alt:r("footer.logoAlt"),priority:!1}),(0,a.jsx)("p",{className:"text-base text-gray-400",children:r("footer.tagline")}),(0,a.jsx)(x,{items:y(g.social,r),linkType:"a"}),(0,a.jsx)(d,{})]}),(0,a.jsxs)("div",{className:"mg:grid-cols-2 mt-12 grid grid-cols-1 gap-2 sm:grid-cols-3 lg:pl-24 xl:col-span-2 xl:mt-0",children:[(0,a.jsx)(x,{items:y(g.navigation,r),linkType:"Link",title:r("footer.columns.links")}),(0,a.jsx)(x,{items:y(g.lablab,r),linkType:"Link",title:r("footer.columns.lablab")}),(0,a.jsx)(x,{items:y(g.contact,r),linkType:"a",title:r("footer.columns.contact")})]})]}),(0,a.jsxs)("div",{className:"mt-12 flex flex-col md:flex-row md:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-gray-400 xl:text-center",children:r("footer.copyright",{year:n})}),(0,a.jsx)("p",{className:"text-sm text-gray-400 xl:text-center",children:function(e){var t,r;return void 0!==e?e:null==(r=s()())||null==(t=r.publicRuntimeConfig)?void 0:t.ver
2sion}(t)})]})]})]})}},45886:(e,t,r)=>{"use strict";r.d(t,{i:()=>n,q:()=>a});let a=async e=>{let t=await e.json().catch(()=>({}));if(!e.ok){var r,a,n,s;return{body:{...t},status:e.status,message:null!=(s=null!=(n=null!=(a=null!=(r=null==t?void 0:t.error)?r:null==t?void 0:t.message)?a:null==t?void 0:t.msg)?n:e.statusText)?s:"Request failed"}}return t},n=async e=>{var t,r,a,n;let s=await e.json().catch(()=>({}));return{body:{...s},status:e.status,message:null!=(n=null!=(a=null!=(r=null!=(t=null==s?void 0:s.error)?t:null==s?void 0:s.message)?r:null==s?void 0:s.msg)?a:e.statusText)?n:"Request failed"}}},55293:(e,t,r)=>{"use strict";r.d(t,{Ru:()=>l,um:()=>s,wm:()=>n});var a=r(89274);let n=(0,a.Ik)({utm_source:(0,a.Yj)().optional(),utm_medium:(0,a.Yj)().optional(),utm_campaign:(0,a.Yj)().optional(),utm_content:(0,a.Yj)().optional()}),s=n.passthrough().refine(e=>Object.entries(e).some(e=>{let[t,r]=e;return t.startsWith("utm_")&&void 0!==r}),{message:"At least one UTM parameter must be present"}),l=Object.keys(n.shape)},57817:(e,t,r)=>{"use strict";r.d(t,{Ox:()=>o,XD:()=>i,Yu:()=>l});let a="lablab_invite",n="inv_";function s(e){return"string"==typeof e&&e.length>n.length&&e.length<=128&&e.startsWith(n)}function l(){try{let e=new URLSearchParams(window.location.search).get("invite");if(!s(e))return;let t={code:e,ts:Date.now()};localStorage.setItem(a,JSON.stringify(t))}catch(e){}}function i(){try{let e=localStorage.getItem(a);if(!e)return;let t=function(e){try{let t=JSON.parse(e);if(t&&"object"==typeof t&&"number"==typeof t.ts&&s(t.code))return t}catch(e){}try{localStorage.removeItem(a)}catch(e){}}(e);if(!t)return;if(Date.now()-t.ts>=2592e6)return void localStorage.removeItem(a);return t.code}catch(e){return}}function o(){try{localStorage.removeItem(a)}catch(e){}}},58139:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(3515);let n=r(89274).z.enum([a.Role.USER,a.Role.ADMIN,a.Role.MENTOR,a.Role.WRITER])},61929:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var a=r(42039);let n=(0,r(89274).Yj)();var s=r(55293);let l=(e,t)=>{let r=a.A.get(t);if(n.safeParse(r).success&&void 0!==r){let a=decodeURIComponent(r);e[t]=a}return e},i=()=>{try{return s.wm.parse(s.Ru.reduce(l,{}))}catch(e){}}},66492:(e,t,r)=>{"use strict";r.d(t,{ec:()=>o,qL:()=>i});var a=r(55293),n=r(61929),s=r(9583);let l="lablab_utm";function i(){try{let e=new URLSearchParams(window.location.search),t={},r=!1;for(let n of a.Ru){let a=e.get(n);a&&(t[n]=a,r=!0)}if(!r)return;let n=a.wm.safeParse(t);if(!n.success||(0,s.r)(n.data))return;let i={params:n.data,ts:Date.now()};localStorage.setItem(l,JSON.stringify(i))}catch(e){}}function o(){try{let e=localStorage.getItem(l);if(e){let t=function(e){try{let t=JSON.parse(e);if(t&&"object"==typeof t&&"number"==typeof t.ts&&a.wm.safeParse(t.params).success)return t}catch(e){}try{localStorage.removeItem(l)}catch(e){}}(e);if(t&&Date.now()-t.ts<2592e6&&Object.values(t.params).some(e=>void 0!==e))return t.params;localStorage.removeItem(l)}}catch(e){}return(0,n.s)()}},68207:(e,t,r)=>{"use strict";r.d(t,{PostHogPageView:()=>x});var a=r(54842),n=r(56723),s=r(36272),l=r(32424),i=r(66492),o=r(57817),c=r(42039),d=r(55293),u=r(61929),m=r(9583);let h={expires:30,path:"/",sameSite:"lax"};function x(){let e=(0,n.usePathname)(),t=(0,n.useSearchParams)();return(0,a.useEffect)(()=>{(0,l.p)(),(0,i.qL)(),(0,o.Yu)();let r={};for(let e of d.Ru){let a=t.get(e);a&&(r[e]=a)}if(d.um.safeParse(r).success&&!t.get("callbackUrl")&&(e=>{try{let t=(0,u.s)();if(!e||!d.wm.safeParse(e).success||(0,m.r)(e))return;(e=>{let{query:t,currentUtmParams:r}=e;d.Ru.forEach(e=>{let a=t[e];void 0!==a?c.A.set(e,a,h):r&&void 0!==r[e]&&(c.A.remove(e,{path:"/"}),c.A.remove(e))})})({query:e,currentUtmParams:t})}catch(e){return}})(r),e){let r=window.origin+e+(t.toString()?"?".concat(t.toString()):"");s.Ay.capture("$pageview",{$current_url:r})}},[e,t]),null}},68964:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,34789,23)),Promise.resolve().then(r.bind(r,45446)),Promise.resolve().then(r.bind(r,68207)),Promise.resolve().then(r.bind(r,43032)),Promise.resolve().then(r.bind(r,94428)),Promise.resolve().then(r.bind(r,32552)),Promise.resolve().then(r.bind(r,4007)),Promise.resolve().then(r.bind(r,36774)),Promise.resolve().then(r.bind(r,8246)),Promise.resolve().then(r.bind(r,4705)),Promise.resolve().then(r.bind(r,74065)),Promise.resolve().then(r.t.bind(r,4632,23)),Promise.resolve().then(r.t.bind(r,77001,23))},69611:(e,t,r)=>{"use strict";r.d(t,{cn:()=>l});var a=r(17356),n=r.n(a),s=r(15392);let l=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)(n()(...t))}},70106:(e,t,r)=>{"use strict";r.d(t,{a:()=>s,y:()=>n});var a=r(95442);let n=e=>{let{inverted:t,showText:r=!0,label:n,absolute:s=!0}=e,l="absolute w-full h-full rounded-full border-solid ".concat("".concat(t?"border-gray-100":"border-gray-600"));return(0,a.jsxs)("div",{className:"flex flex-col ".concat(s?"absolute left-[calc(50%-32px)] top-[calc(50%-40px)]":"relative"),children:[(0,a.jsxs)("div",{className:"size-16 relative m-auto",children:[(0,a.jsx)("div",{className:"".concat(l," left-0 top-0 animate-rotate-one border-b-4")}),(0,a.jsx)("div",{className:"".concat(l," right-0 top-0 animate-rotate-two border-r-4")}),(0,a.jsx)("div",{className:"".concat(l," bottom-0 right-0 animate-rotate-three border-t-4")})]}
2),r?(0,a.jsx)("p",{className:"mt-2 text-sm ".concat("".concat(t?"font-gray-100":"font-gray-800")),children:n||"Loading..."}):null]})},s=()=>(0,a.jsxs)("svg",{"aria-hidden":"true",className:"size-8 mr-2 animate-spin fill-white text-gray-200",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,a.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})},77401:(e,t,r)=>{"use strict";r.d(t,{O:()=>n});var a=r(2812);function n(e){let[t,r]=e.split("/").filter(Boolean);if(t&&"/".concat(t)===a.B.Event)return r||void 0}},80600:(e,t,r)=>{"use strict";r.d(t,{w:()=>a});let a={TWITTER:"https://x.com/lablabai",INSTAGRAM:"https://www.instagram.com/lablab.ai/",LINKEDIN:"https://www.linkedin.com/company/lablab-ai/",YOUTUBE:"https://www.youtube.com/@lablabai",TWITCH:"https://www.twitch.tv/lablabai",DISCORD:"https://discord.gg/lablabai"}},91400:(e,t,r)=>{"use strict";r.d(t,{t:()=>o,m:()=>c});var a=r(2812);let n="application/x-ndjson";function s(e){return"object"==typeof e&&null!==e&&"string"==typeof e.id&&"string"==typeof e.label&&"string"==typeof e.href&&e.href.startsWith("/")&&!e.href.startsWith("//")}var l=r(91782);let i="".concat(a.B.ApiBaseUrlV4,"/faq/ask"),o=(0,l.cV)({body:{messageKey:l.dw},status:429});async function c(e){let{question:t,history:r,eventSlug:a,signal:s,onAnswer:o,onAnswerComplete:c,onActions:u,onRateLimited:m}=e,h=(null!=r?r:[]).filter(e=>e.answer).slice(-6);try{var x;let e=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Accept:n},body:JSON.stringify({question:t,...a?{eventSlug:a}:{},...h.length>0?{history:h}:{}}),signal:s});if(429===e.status){let t=(0,l.LW)(await e.json().catch(()=>({}))),r=function(e,t){let r=e.headers.get("Retry-After");if(r){let e=Number(r);if(Number.isFinite(e)&&e>=0)return e}if("number"==typeof t.retryAfter&&Number.isFinite(t.retryAfter)&&t.retryAfter>=0)return t.retryAfter}(e,t);return null==m||m({message:(0,l.cV)({body:t,status:429,fallback:"Daily limit reached. Try again tomorrow."}),...void 0!==r?{retryAfter:r}:{}}),"rate-limited"}if(!e.ok||!e.body)return"failed";if(null==(x=e.headers.get("content-type"))?void 0:x.includes(n))return await d({body:e.body,onAnswer:o,onAnswerComplete:c,onActions:u}),"ok";let r=e.body.getReader(),f=new TextDecoder,p="";for(;;){let{done:e,value:t}=await r.read();if(e)break;p+=f.decode(t,{stream:!0}),o(p)}return p+=f.decode(),o(p),null==c||c(),"ok"}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return"aborted";return"failed"}}async function d(e){let{body:t,onAnswer:r,onAnswerComplete:a,onActions:n}=e,l=t.getReader(),i=new TextDecoder,o="",c="",d=!1,u=()=>{d||(d=!0,null==a||a())},m=e=>{let t=function(e){let t;if(!e.trim())return null;try{t=JSON.parse(e)}catch(e){return null}if("object"!=typeof t||null===t)return null;let r=t;return"answer"===r.type&&"string"==typeof r.text?{type:"answer",text:r.text}:"answer_complete"===r.type?{type:"answer_complete"}:"actions"===r.type&&Array.isArray(r.actions)?{type:"actions",actions:r.actions.filter(s)}:null}(e);if(t){if("answer"===t.type)return void r(c+=t.text);if("answer_complete"===t.type)return void u();t.actions.length>0&&(null==n||n(t.actions))}};for(;;){var h;let{done:e,value:t}=await l.read();if(e)break;let r=(o+=i.decode(t,{stream:!0})).split("\n");for(let e of(o=null!=(h=r.pop())?h:"",r))m(e)}(o+=i.decode()).trim()&&m(o),u()}},91599:(e,t,r)=>{"use strict";r.d(t,{F7:()=>i,JN:()=>o,To:()=>s,k5:()=>c,ys:()=>l});var a=r(36272),n=r(5019);function s(){var e;null===a.Ay||void 0===a.Ay||null==(e=a.Ay.capture)||e.call(a.Ay,n.f7.NOTIFICATION_BELL_OPENED)}function l(e){var t;let{type:r,surface:s}=e;null===a.Ay||void 0===a.Ay||null==(t=a.Ay.capture)||t.call(a.Ay,n.f7.NOTIFICATION_CLICKED,{t
2ype:r,surface:s})}function i(e){var t;let{surface:r}=e;null===a.Ay||void 0===a.Ay||null==(t=a.Ay.capture)||t.call(a.Ay,n.f7.NOTIFICATION_MARKED_READ,{surface:r})}function o(e){var t;let{surface:r}=e;null===a.Ay||void 0===a.Ay||null==(t=a.Ay.capture)||t.call(a.Ay,n.f7.NOTIFICATIONS_MARKED_ALL_READ,{surface:r})}function c(e){var t;let{surface:r}=e;null===a.Ay||void 0===a.Ay||null==(t=a.Ay.capture)||t.call(a.Ay,n.f7.ANNOUNCEMENT_DISMISSED,{surface:r})}},91782:(e,t,r)=>{"use strict";r.d(t,{Jh:()=>n,uV:()=>a,dw:()=>s,LW:()=>l.LW,cV:()=>i.c});class a extends Error{constructor(e,t=500,r,a,n){super(e),this.statusCode=t,this.originalError=r,this.code=a,this.messageKey=n,this.name=this.constructor.name}}let n={DISCORD_CONNECT_REQUIRED:"DISCORD_CONNECT_REQUIRED",DISCORD_COMMUNITY_JOIN_REQUIRED:"DISCORD_COMMUNITY_JOIN_REQUIRED",PENDING_INVITE_ELSEWHERE:"PENDING_INVITE_ELSEWHERE",JOIN_REQUEST_EXISTS:"JOIN_REQUEST_EXISTS",CONTRIBUTOR_GUIDELINES_REQUIRED:"CONTRIBUTOR_GUIDELINES_REQUIRED",CONTENT_VERSION_CONFLICT:"CONTENT_VERSION_CONFLICT",STUDIO_SLUG_TAKEN:"STUDIO_SLUG_TAKEN",PUBLISH_NOT_READY:"PUBLISH_NOT_READY",RATE_LIMITED:"RATE_LIMITED",VENUE_AT_CAPACITY:"VENUE_AT_CAPACITY",JOIN_REQUEST_ALREADY_HANDLED:"JOIN_REQUEST_ALREADY_HANDLED",JOIN_REQUEST_NOT_FOUND:"JOIN_REQUEST_NOT_FOUND",TEAM_AT_CAPACITY:"TEAM_AT_CAPACITY"},s="errors.faq.dailyLimit";var l=r(41767),i=r(94511)},92540:(e,t,r)=>{"use strict";r.d(t,{K:()=>p});var a=r(53312),n=r(95442),s=r(11415),l=r(54842),i=r(76935);let o="data-builder-script",c=["","text/javascript","application/javascript","application/ecmascript"],d="data-lablab-widget",u=(0,l.lazy)(()=>Promise.all([r.e(58174),r.e(42051),r.e(2850),r.e(41440),r.e(60501)]).then(r.bind(r,60501)).then(e=>({default:e.QuestXpStandings}))),m={"quest-xp-standings":e=>(0,n.jsx)(u,{eventSlug:e.dataset.eventSlug,hideCaveats:"false"!==e.dataset.hideCaveats})},h=(0,a.default)(()=>Promise.all([r.e(42051),r.e(31148)]).then(r.bind(r,5619)).then(e=>e.Challange),{loadableGenerated:{webpack:()=>[5619]}}),x=(0,a.default)(()=>Promise.all([r.e(15392),r.e(43913)]).then(r.bind(r,43913)),{loadableGenerated:{webpack:()=>[43913]}}),f=(0,a.default)(()=>Promise.all([r.e(15392),r.e(70215)]).then(r.bind(r,70215)).then(e=>e.Container),{loadableGenerated:{webpack:()=>[70215]}}),p=[{component:h,name:"CardWithImage",inputs:[{name:"title",type:"text"},{name:"description",type:"text"},{name:"children",type:"html"},{name:"image",type:"file"}]}
2,{component:x,name:"Timeline",inputs:[{name:"title",type:"text"},{name:"timelineEvents",type:"list",subFields:[{name:"id",type:"text"},{name:"name",type:"text"},{name:"description",type:"text"},{name:"timestamp",type:"date"},{name:"showTime",type:"boolean"},{name:"autoCheck",type:"boolean"}]}]},{component:(0,a.default)(()=>Promise.all([r.e(58174),r.e(42051),r.e(15392),r.e(67773)]).then(r.bind(r,67773)).then(e=>e.Cta),{loadableGenerated:{webpack:()=>[67773]}}),name:"Cta",inputs:[{name:"title",type:"text"},{name:"label",type:"text"},{name:"button",type:"text"},{name:"alt",type:"text"},{name:"image",type:"file"},{name:"link",type:"text"},{name:"description",type:"text"}]},{component:f,name:"Container",inputs:[{name:"id",type:"text"}],canHaveChildren:!0},{component:e=>{let{tabList:t,builderBlock:r,builderContext:a,builderComponents:i}=e,[o,c]=(0,l.useState)(0);return(null==t?void 0:t.length)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-2 border-b border-gray-200 text-center text-sm font-medium text-gray-500 dark:border-gray-700 dark:text-gray-400",children:(0,n.jsx)("div",{className:"-mb-px flex flex-wrap",children:t.map((e,t)=>(0,n.jsx)("button",{className:"inline-block rounded-t-lg border-b-2 p-4 "+(o===t?"active border-blue-600 text-blue-600 dark:border-blue-500 dark:text-blue-500":"border-transparent hover:border-gray-300 hover:text-gray-600 dark:hover:text-gray-300"),onClick:()=>c(t),"aria-current":o===t?"page":void 0,type:"button",children:e.tabName},t))})}),(0,n.jsx)(s.rK,{blocks:t[o].blocks,parent:null==r?void 0:r.id,path:"tabList.".concat(o,".blocks"),context:a,registeredComponents:i})]}):null},name:"TabFields",inputs:[{name:"tabList",type:"array",defaultValue:[],subFields:[{name:"tabName",type:"string"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0}},{component:e=>{let{title:t,blocks:r,builderBlock:a,builderContext:i,builderComponents:o}=e,[c,d]=(0,l.useState)(!1);return(0,n.jsxs)("div",{className:"mx-auto w-full max-w-2xl overflow-hidden rounded-lg border border-gray-200",children:[(0,n.jsxs)("button",{className:"flex w-full items-center justify-between bg-gray-100 px-4 py-3 transition-colors duration-200 hover:bg-gray-200 focus:outline-none",onClick:()=>d(!c),"aria-expanded":c,type:"button",children:[(0,n.jsx)("span",{className:"text-left font-medium text-gray-800",children:t}),(0,n.jsx)("svg",{className:"size-5 transform transition-transform duration-300 ".concat(c?"rotate-180":"rotate-0"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),(0,n.jsx)("div",{className:"overflow-y-scroll bg-white px-4 transition-all duration-300 ".concat(c?"max-h-96 py-4 opacity-100":"max-h-0 py-0 opacity-0"),style:{willChange:"max-height, opacity, padding"},children:c&&(0,n.jsx)(s.rK,{blocks:r,parent:null==a?void 0:a.id,path:"blocks",context:i,registeredComponents:o})})]})},name:"Accordion",inputs:[{name:"title",type:"string",defaultValue:"Accordion Title"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0}},{component:e=>{let{code:t,replaceNodes:r}=e,a=(0,l.useRef)(null),s=(0,l.useMemo)(()=>({__html:t}),[t]),[u,h]=(0,l.useState)([]);return(0,l.useEffect)(()=>{var e;let t={sources:new Set,bodies:new Set};null==(e=a.current)||e.querySelectorAll("script").forEach(e=>{(function(e){return e.hasAttribute(o)||c.includes(e.type)})(e)&&function(e,t){var r;let{sources:a,bodies:n}=t;if(e.src){if(a.has(e.src))return;a.add(e.src);let t=document.createElement("script");for(let{name:r,value:a}of Array.from(e.attributes))"type"!==r&&r!==o&&t.setAttribute(r,a);e.nonce&&(t.nonce=e.nonce),document.head.appendChild(t);return}let s=null!=(r=e.textContent)?r:"";if(!n.has(s)){n.add(s);try{Function(s)()}catch(e){}}}(e,t)})},[t]),(0,l.useEffect)(()=>{var e,t;let r=null!=(t=null==(e=a.current)?void 0:e.querySelectorAll("[".concat(d,"]")))?t:[],n=[];
2r.forEach(e=>{let t=function(e){let t=e.getAttribute(d);return t&&Object.hasOwn(m,t)?m[t](e):null}(e);t&&n.push({placeholder:e,widget:t})}),h(n)},[t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:a,className:"builder-custom-code".concat(r?"replace-nodes":""),dangerouslySetInnerHTML:s}),u.map((e,t)=>{let{placeholder:r,widget:a}=e;return(0,i.createPortal)((0,n.jsx)(l.Suspense,{fallback:null,children:a}),r,"widget-".concat(t))})]})},name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,code:!0},{name:"replaceNodes",type:"boolean",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,advanced:!0}]},{component:(0,a.default)(()=>Promise.all([r.e(58174),r.e(42051),r.e(2850),r.e(41440),r.e(60501)]).then(r.bind(r,60501)).then(e=>e.QuestXpStandings),{loadableGenerated:{webpack:()=>[60501]}}),name:"QuestXpStandings",friendlyName:"Quest XP Standings",inputs:[{name:"eventSlug",type:"text",helperText:"Event slug. Leave empty to use the event page this block sits on."},{name:"hideCaveats",friendlyName:"Hide caveats",type:"boolean",defaultValue:!0,helperText:'Hide the "AMD Quest" eyebrow, the pips note and "Partial standings".'}]}]},94428:(e,t,r)=>{"use strict";r.d(t,{LayoutClientWrapper:()=>ex});var a=r(95442),n=r(2484),s=r(2850),l=r(56723),i=r(54842),o=r(58174),c=r.n(o),d=r(53312),u=r(2812),m=r(23895),h=r(766),x=r(69611),f=r(40165);let p=e=>{let{currentPath:t,expectedPathname:r}=e;return t.includes(r)};var g=r(4818);let y={src:"/_next/static/media/lablab-logo.0e55f70d.png",height:285,width:330,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAHlBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC3KG9qAAAACnRSTlOxzaPV6fvElnCCpLLdEgAAAAlwSFlzAAALEwAACxMBAJqcGAAAADBJREFUeJwtybkBACAMA7GznQf2X5gGteJ2q6SC6oM3kLHNIJJ4f2GBxt4dNOqS7gMWjAC3e4oFywAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:7},v=e=>{let{size:t=40,alt:r="lablab.ai logo - Community innovating and building with artificial intelligence"}=e;return(0,a.jsx)(g.default,{width:t,height:t,src:y,alt:r})};var b=r(36631),j=r(36272),w=r(12602),N=r(66492);let A=e=>{let{className:t}=e;return(0,a.jsxs)(w.Button,{href:"/ai-hackathons/amd-lablab-ai-academy-challenge",color:"black",size:"sm",className:t,onClick:()=>{var e;(0,N.qL)(),null===j.Ay||void 0===j.Ay||null==(e=j.Ay.capture)||e.call(j.Ay,"claim_credits_clicked",{location:"header"})},children:["Join",(0,a.jsx)("img",{src:"/amd-logo-white.svg",alt:"AMD",width:"48",height:"12",className:"mx-2"}),"Challenge + Get $100 credits"]})};var k=r(92495);let C="forum-v1";var E=r(44158);let S=[{labelKey:"nav.hackathons",href:u.B.Event,target:"_self",group:"explore",icon:"trophy"},{labelKey:"nav.apps",href:u.B.Apps,target:"_self",group:"explore",icon:"squares-2x2"},{labelKey:"nav.tech",href:u.B.Tech,target:"_self",group:"explore",icon:"cpu-chip"},{labelKey:"nav.aiTutorials",href:u.B.Tutorials,target:"_self",group:"learn",icon:"academic-cap"},{labelKey:"nav.articles",href:u.B.Article,target:"_self",group:"learn",icon:"document-text"},{labelKey:"nav.forum",href:u.B.Forum,target:"_self",group:"explore",icon:"chat-bubble-left-right",flag:C},{labelKey:"nav.natively",href:"https://nativelyai.com/#products",target:"_blank",group:"footer",icon:"arrow-top-right-on-square",isExternal:!0},{labelKey:"nav.sponsor",href:u.B.Sponsor,target:"_self",group:"footer",icon:"star",isAccent:!0}];function _(){let e=(0,E.q)(),t=(0,k.Tp)(C);return(0,i.useMemo)(()=>{let r={[C]:e&&!0===t};return S.filter(e=>!e.flag||!0===r[e.flag])},[e,t])}var I=r(26574),T=r(70106),L=r(58139),M=r(88931);let O=e=>{let t=(0,i.useRef)(null);return(0,M.A)(t,e),t};var R=r(96136),B=r(62941);let P=e=>{let{logIn:t,logOut:r,currentPath:n,image:l,userName:i,isDropdownOpen:o,handleDropdownOpen:d,handleDropdownClose:m,canJudge:h,verified:f}=e,y=O(()=>{o&&m()}),{data:v,status:b}=(0,s.useSession)(),j=(0,B.J)();return(0,a.jsxs)("div",{className:(0,x.cn)({"pointer-events-none":p({currentPath:n,expectedPathname:u.B.Login})||p({currentPath:n,expectedPathname:u.B.Signup})}),ref:y,children:[(0,a.jsxs)("button",{className:"relative my-auto size-9",onClick:()=>
2{if(o)return m();d()},children:[l?(0,a.jsx)("div",{className:"size-full overflow-hidden rounded-full",children:(0,a.jsx)(g.default,{src:l,width:36,height:36,alt:j("nav.userImageAlt")})}):(0,a.jsx)(I.In,{icon:"heroicons:user-circle",className:"text-4xl text-slate-700"}),f&&l&&(0,a.jsxs)("span",{className:"absolute -end-1 -top-1 z-10",children:[(0,a.jsx)("span",{className:"sr-only",children:j("nav.verified")}),(0,a.jsx)(R.M,{size:16})]})]}),o?(0,a.jsx)("div",{className:"absolute right-6 z-50 mt-2 flex w-auto origin-top-right flex-col divide-y rounded-lg bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none lg:right-8",children:"loading"===b?(0,a.jsx)("div",{className:"flex items-center justify-center px-4 py-2 text-sm text-gray-700",children:(0,a.jsx)(T.a,{})}):v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(c(),{href:i?u.B.UserEdit:u.B.Signup,onClick:m,className:"flex w-full items-center justify-start gap-x-2 px-5 py-3 hover:bg-indigo-50 md:px-8 md:py-4",children:[(0,a.jsx)(I.In,{icon:"heroicons:user-circle",className:"text-lg"}),j("nav.profile")]}),(0,a.jsxs)(c(),{href:u.B.UserTeams,onClick:m,className:"flex w-full items-center justify-start gap-x-2 px-5 py-3 hover:bg-indigo-50 md:px-8 md:py-4",children:[(0,a.jsx)(I.In,{icon:"heroicons:user-group",className:"text-lg"}),j("nav.myTeams")]})]}),h||v.user.role===L.A.enum.ADMIN?(0,a.jsxs)("div",{children:[h&&(0,a.jsxs)(c(),{href:u.B.Judging,onClick:m,className:"flex w-full items-center justify-start gap-x-2 px-5 py-3 hover:bg-indigo-50 md:px-8 md:py-4",children:[(0,a.jsx)(I.In,{icon:"heroicons:trophy",className:"text-lg"}),j("nav.judging")]}),v.user.role===L.A.enum.ADMIN&&(0,a.jsxs)(c(),{href:u.B.Dash,onClick:m,className:"flex w-full items-center justify-start gap-x-2 px-5 py-3 hover:bg-indigo-50 md:px-8 md:py-4",children:[(0,a.jsx)(I.In,{icon:"heroicons:home-solid",className:"text-lg"}),j("nav.dashboard")]})]}):null,(0,a.jsx)("div",{children:(0,a.jsx)(w.Button,{size:"lg",color:"red",onClick:r,className:"w-48",children:j("nav.signOut")})})]}):(0,a.jsx)("div",{children:(0,a.jsx)(w.Button,{size:"lg",color:"blue",onClick:t,className:"w-48",children:j("nav.signIn")})})}):null]})},D=e=>{let{href:t,label:r,handleDropdownClose:n,target:s}=e;return(0,a.jsx)(c(),{href:t,target:s,className:(0,x.cn)("inline-flex items-center px-1 pt-1 text-sm font-semibold leading-6 text-slate-700 hover:text-sky-500"),onClick:n,children:r})};var U=r(7859),z=r(41440),F=r(67712),K=r(3609),W=r(91599),J=r(37226);async function H(e){let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch notifications");return t.json()}async function V(e){let t=await fetch(e);if(!t.ok)throw Error("Failed to fetch unread count");return t.json()}function q(e){let{item:t,onMarkRead:r,onDismiss:n,onNavigate:s}=e,l="targeted"===t.kind&&!t.read,i="broadcast"===t.kind,o="targeted"===t.kind?t.resourceUrl:t.url,d=(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 rounded-lg px-4 py-3 transition-colors ".concat(l?"bg-indigo-50":"bg-white hover:bg-gray-50"),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium leading-snug text-gray-900",children:t.title}),l&&(0,a.jsx)("button",{type:"button","aria-label":"Mark as read",title:"Mark as read",onClick:e=>{e.preventDefault(),e.stopPropagation(),r(t.id)},className:"mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full border border-gray-200 bg-white text-gray-400 transition hover:border-indigo-300 hover:bg-indigo-50 hover:text-indigo-600",children:(0,a.jsx)(F.A,{className:"size-3.5",strokeWidth:2})}),i&&(0,a.jsx)("button",{type:"button","aria-label":"Dismiss",title:"Dismiss",onClick:e=>{e.preventDefault(),e.stopPropagation(),n(t.id)},className:"mt-0.5 flex size-6 flex-shrink-0 items-center justify-center rounded-full border border-gray-200 bg-white text-gray-400 transition hover:border-indigo-300 hover:bg-indigo-50 hover:text-indigo-600",children:(0,a.jsx)(F.A,{className:"size-3.5",strokeWidth:2})})]}),t.body&&(0,a.jsx)("p",{className:"line-clamp-2 text-xs text-gray-500",children:t.body}),(0,a.jsx)("span",{className:"text-[10px] tabular-nums text-gray-400",children:function(e){try{return(0,K.m)(new Date(e),{addSuffix:!0})}catch(e){return""}}(t.createdAt)})]});return o?(0,a.jsx)(c(),{href:o,className:"block",onClick:()=>{l&&r(t.id,{revalidateList:!1}),(0,W.ys)({type:"targeted"===t.kind?t.type:"broadcast",surface:"bell"}),s()},children:d}):(0,a.jsx)("div",{children:d})}function G(e){var t,r;let{onClose:n}=e,[s,l]=(0,i.useState)(new Set),[o,d]=(0,i.useState)(!1),[u,m]=(0,i.useState)(new Set),[h,x]=(0,i.useState)(!1),f="".concat("/api/v4/notifications","?limit=").concat(10,"&sort=unread-first"),{isLoading:p,data:g}=(0,z.Ay)(f,H,{revalidateOnFocus:!1}),{data:y}=(0,z.Ay)((0,J.s9)(),e=>{let[t]=e;return V(t)},{revalidateOnFocus:!1}),v=(0,i.useMemo)(()=>{var e;let t=(null!=(e=null==g?void 0:g.items)?e:[]).filter(e=>!u.has(e.id));return o||0!==s.size?t.map(e=>"targeted"!==e.kind?e:o||s.has(e.id)?{...e,read:!0}:e):t},[g,s,o,u]),b=(0,i.useCallback)(async(e,t)=>{(0,W.F7)({surface:"bell"}),l(t=>new Set([...t,e])),(0,J.B_)(),await fetch("/api/v4/notifications/".concat(e,"/read"),{method:"POST"}
2),await ((null==t?void 0:t.revalidateList)===!1?(0,J.iM)():(0,J.w8)())},[]),j=(0,i.useCallback)(async e=>{(0,W.k5)({surface:"bell"}),m(t=>new Set([...t,e])),await fetch("/api/v4/notifications/announcements/".concat(e,"/dismiss"),{method:"POST"}),await (0,J.w8)()},[]),w=(0,i.useCallback)(async()=>{h||((0,W.JN)({surface:"bell"}),x(!0),d(!0),await fetch("/api/v4/notifications/read-all",{method:"POST"}),await (0,J.w8)(),x(!1))},[h]),N=v.some(e=>"targeted"===e.kind&&!e.read),A=v.filter(e=>"targeted"===e.kind&&!e.read).length,k=v.filter(e=>"broadcast"===e.kind).length,C=o?0:Math.max(0,(null!=(t=null==y?void 0:y.unread)?t:0)-A)+Math.max(0,(null!=(r=null==y?void 0:y.unseen)?r:0)-k);return(0,a.jsxs)("div",{className:"fixed inset-x-4 top-13 z-50 rounded-2xl border border-gray-200 bg-white shadow-md sm:absolute sm:inset-x-auto sm:right-0 sm:top-10 sm:w-96",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-100 px-4 py-3",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Notifications"}),N&&(0,a.jsx)("button",{type:"button",onClick:w,disabled:h,className:"text-xs font-medium text-indigo-600 hover:text-indigo-500 disabled:opacity-50",children:"Mark all read"})]}),(0,a.jsx)("div",{className:"max-h-[calc(100vh-12rem)] overflow-y-auto",children:p?(0,a.jsx)("div",{className:"divide-y divide-gray-100 px-2 py-1",children:Array.from({length:5}).map((e,t)=>(0,a.jsxs)("div",{className:"flex gap-3 rounded-lg px-4 py-3",children:[(0,a.jsx)("div",{className:"mt-0.5 size-8 flex-shrink-0 animate-pulse rounded-full bg-gray-100"}),(0,a.jsxs)("div",{className:"flex-1 space-y-2 py-0.5",children:[(0,a.jsx)("div",{className:"h-3 w-3/4 animate-pulse rounded bg-gray-100"}),(0,a.jsx)("div",{className:"h-3 w-full animate-pulse rounded bg-gray-100"}),(0,a.jsx)("div",{className:"h-2.5 w-1/3 animate-pulse rounded bg-gray-50"})]})]},t))}):0===v.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12",children:[(0,a.jsx)(U.A,{className:"size-8 text-gray-300",strokeWidth:1.5}),(0,a.jsx)("span",{className:"text-sm text-gray-400",children:"You're all caught up"})]}):(0,a.jsx)("div",{className:"divide-y divide-gray-100 px-2 py-1",children:v.map(e=>(0,a.jsx)(q,{item:e,onMarkRead:b,onDismiss:j,onNavigate:n},e.id))})}),(0,a.jsx)("div",{className:"border-t border-gray-100 px-4 py-2.5",children:(0,a.jsx)(c(),{href:"/notifications",onClick:n,className:"flex w-full items-center justify-center gap-1.5 rounded-lg py-2 text-xs font-medium text-gray-500 transition hover:bg-gray-50 hover:text-gray-900",children:C>0?(0,a.jsxs)("span",{className:"font-medium text-indigo-600",children:[C," more unread — view all"]}):"View all notifications"})})]})}async function Y(e){let t=await fetch(e);if(410===t.status)throw Object.assign(Error("notifications-tombstone"),{status:410});if(!t.ok)throw Error("unread-count fetch failed");return t.json()}function Q(e){return e>99?"99+":String(e)}function X(e){var t;let{onOpen:r}=e,{status:n}=(0,s.useSession)(),l=(0,E.q)(),o=(0,B.J)(),c="authenticated"===n,[d,u]=(0,i.useState)(!1),m=(0,i.useRef)(null);(0,M.A)(m,()=>{d&&u(!1)});let{data:h}=(0,z.Ay)(c?(0,J.s9)():null,e=>{let[t]=e;return Y(t)},{revalidateOnFocus:!0,revalidateOnReconnect:!0,refreshWhenHidden:!1,refreshWhenOffline:!1,onErrorRetry:(e,t,r,a,n)=>{let{retryCount:s}=n;410!==e.status&&(s>=3||setTimeout(()=>a({retryCount:s}),5e3))}}),x=(0,i.useCallback)(()=>u(!1),[]),f=(0,i.useCallback)(()=>{u(e=>(e||((0,W.To)(),null==r||r()),!e))},[r]);if(!l||!c)return null;let p=null!=(t=null==h?void 0:h.total)?t:0;return(0,a.jsxs)("div",{ref:m,className:"relative",children:[(0,a.jsxs)("button",{type:"button","aria-label":p>0?o("nav.notificationsWithCount",{count:Q(p)}):o("nav.notifications"),"aria-expanded":d,onClick:f,className:"relative flex items-center justify-center rounded-lg p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-900",children:[(0,a.jsx)(U.A,{className:"size-5",strokeWidth:1.5}),p>0&&(0,a.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex min-w-[1.1rem] items-center justify-center rounded-full bg-indigo-600 px-1 py-px text-[10px] font-medium tabular-nums leading-none text-white",children:Q(p)})]}),d&&(0,a.jsx)(G,{onClose:x})]})}let Z=e=>{let{logIn:t,logOut:r,currentPath:n,image:s,userName:l,isLoading:o,canJudge:c,verified:d,onSearchOpen:u}=e,m=_(),h=(0,B.J)(),[x,f]=(0,i.useState)(!1),p=(0,i.useCallback)(()=>{f(!0)},[]),g=(0,i.useCallback)(()=>{f(!1)},[]);return(0,a.jsxs)("nav",{className:"hidden w-full items-center justify-end gap-x-4 md:flex lg:justify-between",role:"navigation","aria-label":h("nav.desktopNavigation"),children:[(0,a.jsx)("span",{className:"hidden max-w-3xl flex-1 lg:block",children:(0,a.jsx)(b.I,{onClick:u,placeholder:h("nav.searchPlaceholder"),"aria-label":h("nav.openSearch")})}),(0,a.jsx)(A,{className:"hidden shrink-0 lg:flex"}),(0,a.jsxs)("span",{className:"flex items-center gap-x-4",children:[m.map(e=>(0,a.jsx)(D,{href:e.href,label:h(e.labelKey),handleDropdownClose:g,target:e.target},e.href)),(0,a.jsx)(X,{}),(0,a.jsx)(P,{logIn:t,logOut:r,currentPath:n,isDropdownOpen:x,handleDropdownOpen:p,handleDropdownClose:g,image:s,userName:l,isLoading:o,canJudge:c,verified:d})]})]})};var $=r(99591);let ee=e=>{let{label:t,href:r,icon:n,className:s,handleMobileMenuClose:l,target:i}=e;return(0,a.jsxs)(c(),{href:r,className:(0,x.cn)("flex min-h-[36px] items-center gap-x-2 text-sm font-medium text-gray-900 transition-colors hover:text-indigo-600",s),onClick:l,target:i,children:[n&&(0,a.jsx)(I.In,{icon:"heroicons:".concat(n),className:"size-4 shrink-0 text-gray-400"}),t]})},et=e=>{let{currentPath:t,isMenuOpen:r,setIsMenuOpen:n}=e,s=(0,B.J)();return(0,a.jsxs)("button",{className:(0,x.cn)("inline-flex items-center justify-center rounded-md p-2 text-gray-900 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-transparent focus:ring-offset-2",{"pointer-events-none":p({currentPath:t,expectedPathname:u.B.Login})||p({currentPath:t,expectedPathname:u.B.Signup})}),onClick:()=>n(e=>!e),children:[(0,a.jsx)("span",{className:"sr-only",children:s("nav.toggleMenu")}),(0,a.jsx)(I.In,{icon:r?"heroicons:x-mark-solid":"heroicons:bars-3-solid",className:"text-2xl","aria-label":s("nav.toggleMenu")})]})},er=e=>{let{logIn:t,logOut:r,currentPath:n,userName:l,isLoading:o,canJudge:c,onSearchOpen:d}=e,m=(0,B.J)(),h=_(),{exploreItems:x,learnItems:f,footerItems:p}=(0,i.useMemo)(()=>({exploreItems:h.filter(e=>"explore"===e.group),learnItems:h.filter(e=>"learn"===e.group),footerItems:h.filter(e=>"footer"===e.group)}),[h]),[g,y]=(0,i.useState)(!1),{status:v,data:b}
2=(0,s.useSession)(),j="loading"!==v&&!o,w=(0,i.useCallback)(()=>{y(!1)},[]),N=O(()=>{w()}),k=(0,i.useCallback)(()=>{t(),w()},[t,w]),C=(0,i.useCallback)(()=>{r(),w()},[r,w]),E=(0,i.useCallback)(()=>{w(),d()},[w,d]);return(0,a.jsxs)("div",{ref:N,className:"md:hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(X,{onOpen:w}),(0,a.jsx)(et,{currentPath:n,isMenuOpen:g,setIsMenuOpen:y})]}),g&&(0,a.jsxs)("nav",{className:"absolute left-0 top-13 z-[99] w-full border-b bg-white px-6 py-4 shadow-md",role:"navigation","aria-label":m("nav.mobileNavigation"),children:[(0,a.jsxs)("button",{type:"button",onClick:E,className:"mb-4 flex w-full items-center gap-x-2 rounded-lg border border-gray-200 px-3 py-2 text-left transition-colors hover:bg-gray-50","aria-label":m("nav.openSearchShort"),children:[(0,a.jsx)($.A,{className:"size-4 shrink-0 text-gray-400",strokeWidth:1.5}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-500",children:m("nav.search")})]}),(0,a.jsx)(A,{className:"mb-4 w-full"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-gray-400",children:m("nav.explore")}),(0,a.jsx)("div",{className:"flex flex-col gap-y-2",children:x.map(e=>(0,a.jsx)(ee,{href:e.href,label:m(e.labelKey),icon:e.icon,target:e.target,handleMobileMenuClose:w},e.href))})]}),(0,a.jsxs)("div",{className:"mt-4 border-t border-gray-100 pt-4",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-gray-400",children:m("nav.learn")}),(0,a.jsx)("div",{className:"flex flex-col gap-y-2",children:f.map(e=>(0,a.jsx)(ee,{href:e.href,label:m(e.labelKey),icon:e.icon,target:e.target,handleMobileMenuClose:w},e.href))})]}),j&&b&&(0,a.jsxs)("div",{className:"mt-4 border-t border-gray-100 pt-4",children:[(0,a.jsx)("p",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-gray-400",children:m("nav.account")}),(0,a.jsxs)("div",{className:"flex flex-col gap-y-2",children:[l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ee,{href:u.B.UserEdit,label:m("nav.profile"),icon:"user",handleMobileMenuClose:w}),(0,a.jsx)(ee,{href:u.B.UserTeams,label:m("nav.myTeams"),icon:"user-group",handleMobileMenuClose:w})]}),c&&(0,a.jsx)(ee,{href:u.B.Judging,label:m("nav.judging"),icon:"scale",handleMobileMenuClose:w}),b.user.role===L.A.enum.ADMIN&&(0,a.jsx)(ee,{href:u.B.Dash,label:m("nav.dashboard"),icon:"squares-2x2",handleMobileMenuClose:w})]})]}),(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-y-2 border-t border-gray-100 pt-4",children:[p.map(e=>(0,a.jsx)(ee,{href:e.href,label:m(e.labelKey),icon:e.icon,target:e.target,className:e.isAccent?"text-indigo-600":void 0,handleMobileMenuClose:w},e.href)),j?b?(0,a.jsxs)("button",{className:"flex min-h-[36px] w-max items-center gap-x-2 text-sm font-medium text-red-600 transition-colors hover:text-red-700",onClick:C,type:"button","aria-label":m("nav.signOut"),children:[(0,a.jsx)(I.In,{icon:"heroicons:arrow-left-on-rectangle",className:"size-4 shrink-0 text-red-400"}),m("nav.signOut")]}):(0,a.jsxs)("button",{className:"flex min-h-[36px] w-max items-center gap-x-2 text-sm font-medium text-gray-900 transition-colors hover:text-indigo-600",onClick:k,type:"button","aria-label":m("nav.signIn"),children:[(0,a.jsx)(I.In,{icon:"heroicons:arrow-right-on-rectangle",className:"size-4 shrink-0 text-gray-400"}),m("nav.signInMobile")]}):(0,a.jsx)("div",{className:"flex items-center py-1",children:(0,a.jsx)(T.a,{})})]})]})]})};var ea=r(37904);let en=()=>{let e=(0,B.J)();return(0,a.jsx)("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/50",children:(0,a.jsx)("div",{className:"text-white",children:e("nav.loadingSearch")})})},es=(0,d.default)(()=>Promise.all([r.e(37949),r.e(18590),r.e(70733),r.e(8721),r.e(93365),r.e(48994),r.e(4587),r.e(96849)]).then(r.bind(r,57764)),{loadableGenerated:{webpack:()=>[57764]},ssr:!1,loading:()=>(0,a.jsx)(en,{})}),el=()=>{let e=(0,B.J)();return(0,a.jsxs)("div",{className:"z-50 flex size-8 items-center justify-center text-sm font-extrabold text-red-700 hover:rotate-45",id:"ribbon","aria-label":e("nav.devIndicator"),children:[e("nav.devBadge"),(0,a.jsx)("br",{}),e("nav.devBadge")]})},ei=e=>{var t;let{currentPath:r}=e,[n,l]=(0,i.useState)(null),[o,d]=(0,i.useState)(!1),[g,y]=(0,i.useState)(!1),[b,j]=(0,i.useState)(!1),w=(0,i.useCallback)(()=>{j(!0)},[]),N=(0,i.useCallback)(()=>{j(!1)},[]),{data:A,status:k}
2=(0,s.useSession)(),C=(0,B.J)(),E=(0,i.useMemo)(()=>"true"===f._.NEXT_PUBLIC_DEVENV,[]),S=(0,i.useMemo)(()=>p({currentPath:r,expectedPathname:u.B.Event}),[r]),_=(0,i.useMemo)(()=>p({currentPath:r,expectedPathname:"".concat(u.B.Challenge,"/")}),[r]),I=(0,i.useMemo)(()=>p({currentPath:r,expectedPathname:"".concat(u.B.EventPreview,"/")}),[r]);(0,i.useEffect)(()=>{var e;if("loading"===k||"unauthenticated"===k||!(null==A||null==(e=A.user)?void 0:e.id)){l(null),d(!1),y(!1);return}let t=new AbortController,r=!0;return(async()=>{var e,a;if(d(!0),null==A||null==(e=A.user)?void 0:e.id)try{let[e,a]=await Promise.all([(0,ea.eT)(t.signal),(0,ea.Sq)(t.signal).catch(()=>({canJudge:!1}))]);if(!r)return;if(!(null==e?void 0:e.id)||!(null==e?void 0:e.profile)){l(null),y(!1);return}l(e.profile),y(!!(null==a?void 0:a.canJudge))}catch(e){if(e instanceof DOMException&&"AbortError"===e.name)return void h.A.debug("User fetch aborted - component unmounted or session changed");if(!r)return;e instanceof Error?h.A.error("Failed to fetch user profile: ".concat(e.message),{accountId:null==A||null==(a=A.user)?void 0:a.id,error:e.stack}):h.A.error("Failed to fetch user profile with unknown error",{error:String(e)}),l(null)}finally{r&&d(!1)}})(),()=>{r=!1,t.abort()}},[null==A||null==(t=A.user)?void 0:t.id,k]);let T=(0,i.useCallback)(async()=>{try{await (0,s.signIn)(void 0,{callbackUrl:r})}catch(e){h.A.error("Failed to sign in",{error:e})}},[r]),L=(0,i.useCallback)(async()=>{try{(0,m.deleteCookie)("lablab-auth-indicator",{path:"/",domain:".lablab.ai"})}catch(e){h.A.error("Failed to delete cookie: ".concat(e instanceof Error?e.message:String(e)))}try{await (0,s.signOut)({callbackUrl:"/"})}catch(e){h.A.error("Failed to sign out",{error:e})}},[]);return(0,a.jsxs)("nav",{className:(0,x.cn)("relative top-0 z-[999] flex items-center justify-between gap-x-4 border-b border-gray-200 bg-white px-6 py-2 shadow-md backdrop-blur-lg lg:px-8 lg:py-4 xl:gap-x-16",{"sm:sticky":S||_||I}),role:"navigation","aria-label":C("nav.mainNavigation"),children:[(0,a.jsxs)("span",{className:"flex items-center",children:[(0,a.jsx)(c(),{href:"/",className:"flex shrink-0 items-center","aria-label":C("nav.goHome"),children:(0,a.jsx)(v,{})}),E&&(0,a.jsx)(el,{})]}),(0,a.jsx)(Z,{logIn:T,logOut:L,currentPath:r,image:null==n?void 0:n.picture,userName:null==n?void 0:n.userName,isLoading:"loading"===k||o,canJudge:g,verified:null==n?void 0:n.verified,onSearchOpen:w}),(0,a.jsx)(er,{logIn:T,logOut:L,currentPath:r,isEventPage:S,userName:null==n?void 0:n.userName,isLoading:"loading"===k||o,canJudge:g,onSearchOpen:w}),b&&(0,a.jsx)(es,{open:b,setOpen:N})]})};function eo(){return null}r(12432),r(79673);var ec=r(20786),ed=r(62096);function eu(){let{status:e}=(0,s.useSession)();return(0,i.useEffect)(()=>(0,ed.WW)({recordToServer:"authenticated"===e}),[e]),null}function em(){return!function(){var e,t;let{data:r,status:a}=(0,s.useSession)(),n=(0,k.sf)(),{freshUser:l}=function(){var e,t;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7,{data:a}=(0,s.useSession)();return{freshUser:(0,i.useMemo)(()=>{var e,t;return(e=>{let{createdAt:t,daysThreshold:r=7}=e;if(!t)return!1;let a="string"==typeof t?new Date(t):t instanceof Date?t:void 0;return!!a&&(new Date().getTime()-a.getTime())/864e5<=r})({createdAt:null!=(t=null==a||null==(e=a.user)?void 0:e.createdAt)?t:void 0,daysThreshold:r})},[null==a||null==(e=a.user)?void 0:e.createdAt,r]),createdAt:null==a||null==(t=a.user)?void 0:t.createdAt}}(),o=(0,i.useRef)(null),c=(0,i.useRef)(null),d=null==r||null==(e=r.user)?void 0:e.id,u=null==r||null==(t=r.user)?void 0:t.createdAt;(0,i.useEffect)(()=>{if("authenticated"===a&&d&&c.current!==d){let e=function(){let e={},t=(0,N.ec)();t&&(t.utm_source&&(e.last_utm_source=t.utm_source),t.utm_medium&&(e.last_utm_medium=t.utm_medium),t.utm_campaign&&(e.last_utm_campaign=t.utm_campaign),t.utm_content&&(e.last_utm_content=t.utm_content));try{let t=document.referrer;if(t){let r=new URL(t).hostname;"lablab.ai"===r||r.endsWith(".lablab.ai")||(e.last_referrer=t,e.last_referring_domain=r)}}catch(e){}return Object.keys(e).length>0&&(e.last_touch_at=new Date().toISOString()),e}();null==n||n.identify(d,{authenticated:!0,fresh_user:l,...e},{date_of_first_identify:u}),c.current=d}else"unauthenticated"===a&&"authenticated"===o.current&&(null==n||n.reset(),c.current=null);o.current=a},[d,u,a,n,l])}(),null}let eh=()=>{let e=(0,l.usePathname)(),t=(0,l.useSearchParams)(),r=(0,ec.o)(e,Object.fromEntries(t));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ei,{currentPath:r}),(0,a.jsx)(eo,{})]})},ex=e=>{let{children:t}=e;return(0,a.jsxs)(s.SessionProvider,{children:[(0,a.jsx)(em,{}),(0,a.jsx)(eu,{}),(0,a.jsx)(i.Suspense,{children:(0,a.jsx)(eh,{})}),t,(0,a.jsx)(n.l$,{})]})}},94511:(e,t,r)=>{"use strict";r.d(t,{c:()=>d});var a=r(89790),n=r(79673),s=r(15550),l=r(41767);let i="errors.generic.internal",o=new WeakMap;function c(e){let{messages:t,locale:r,key:n,params:s}=e;if(void 0===function(e,t){let r=e;for(let e of t.split(".")){if(!(0,l.Qd)(r))return;r=r[e]}return"string"==typeof r?r:void 0}(t,n))return;let i=function(e,t){let r=o.get(e);r||(r=new Map,o.set(e,r));let n=r.get(t);if(n)return n;let s=(0,a.HM)({locale:t,messages:e,onError:()=>{},getMessageFallback:()=>""});return r.set(t,s),s}(t,r),c=s?i(n,s):i(n);if("string"==typeof c&&""!==c&&c!==n)return c}function d(e){var t,r;let{body:a,status:o,fallback:d,locale:u=n.Xn,messages:m,genericFallback:h=!0}=e,x=null!=m?m:(0,s.f)(u),f=(0,s.f)(n.Xn),p="string"==typeof a.messageKey?a.messageKey:void 0,g=function(e){if(!(0,l.Qd)(e))return;let t={};for(let[r,a]of Object.entries(e))("string"==typeof a||"number"==typeof a)&&(t[r]=a);return Object.keys(t).length>0?t:void 0}(a.params);
2if(p){let e=c({messages:x,locale:u,key:p,params:g});if(e)return e;let t=c({messages:f,locale:n.Xn,key:p,params:g});if(t)return t}let y=(0,l.Ms)({body:a,status:o,fallback:null!=d?d:""});return y||(h?null!=(r=null!=(t=c({messages:x,locale:u,key:i}))?t:c({messages:f,locale:n.Xn,key:i}))?r:"Something went wrong. Please try again.":null!=d?d:"")}},96136:(e,t,r)=>{"use strict";r.d(t,{M:()=>n});var a=r(95442);function n(e){let{size:t=20,className:r}=e;return(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",className:r,children:[(0,a.jsx)("path",{className:"fill-white",d:"M3.046 8.277A4.402 4.402 0 0 1 8.303 3.03a4.4 4.4 0 0 1 7.411 0 4.397 4.397 0 0 1 5.19 3.068c.207.713.23 1.466.067 2.19a4.4 4.4 0 0 1 0 7.415 4.403 4.403 0 0 1-3.06 5.187 4.398 4.398 0 0 1-2.186.072 4.398 4.398 0 0 1-7.422 0 4.398 4.398 0 0 1-5.257-5.248 4.4 4.4 0 0 1 0-7.437Z"}),(0,a.jsx)("path",{className:"fill-green-500",d:"M4.674 8.954a3.602 3.602 0 0 1 4.301-4.293 3.6 3.6 0 0 1 6.064 0 3.598 3.598 0 0 1 4.3 4.302 3.6 3.6 0 0 1 0 6.067 3.6 3.6 0 0 1-4.29 4.302 3.6 3.6 0 0 1-6.074 0 3.598 3.598 0 0 1-4.3-4.293 3.6 3.6 0 0 1 0-6.085Z"}),(0,a.jsx)("path",{className:"fill-white",d:"M15.707 9.293a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414L11 12.586l3.293-3.293a1 1 0 0 1 1.414 0Z"})]})}}},e=>{e.O(0,[43960,70952,20475,44811,39884,58174,42051,15392,66893,2484,26574,46633,2850,41440,7212,92495,22586,15166,96146,45774,43318,15550,12166,46169,77828,57128,77358],()=>e(e.s=68964)),_N_E=e.O()}]);
3//# chunkId=f09e200e-d638-5b75-948b-d48e5ad68345

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.