1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`50283208-8990-4275-9147-0e630be14073`,e._sentryDebugIdIdentifier=`sentry-dbid-50283208-8990-4275-9147-0e630be14073`)}catch{}})();import{o as e,r as t}from"./rolldown-runtime.T7Kr6sqh.chunk.js";import{Yr as n,ri as r}from"./vendor.CUKhofqW.chunk.js";import{Ht as i,Pr as a,Si as o,Vt as s,_a as c,_i as l,gs as u,on as d,t as f,ti as p,va as m,xi as h,ya as g}from"./contexts.D-gBjqy3.chunk.js";import{p as _}from"./SnippetIngredientInUseModal.DlZ4V_K8.chunk.js";import{t as v}from"./useTranslation.CPrHv7Cm.chunk.js";import{_ as y,b,o as x,y as S}from"./useBroadcast.CS_q5U8t.chunk.js";import{r as C}from"./DatePicker.BfOOhajU.chunk.js";import{t as w}from"./SuspenseContainer._C_ylut9.chunk.js";var T=e(r()),E=()=>{let{schedule:e,isLoading:t}=C(),{t:n}=v(`common`),r=S(),i=y();(0,T.useEffect)(()=>{if(!e)return;let t=e.title||n(`untitled_schedule`),a=l({id:e.id,title:t});if(!i.pathname.includes(a)){let e=i.pathname.split(`/`);e[2]=a,r(e.join(`/`)+i.search,{...i,replace:!0})}},[t,e,i,r,n])},D=n(),O=()=>{let{t:e}=v(`schedule`),t=y(),{isAuthenticated:n}=f(),{error:r,isLoading:c,isPublicRole:l}=C();return u(),E(),h(),o(),c?(0,D.jsx)(p,{"data-testid":`schedule-loader`}):_(r,`ScheduleNotFound`)?(0,D.jsx)(i,{children:(0,D.jsx)(d,{title:e(`errors.not_found.title`)})}):_(r,`InvalidPermission`)?(0,D.jsx)(i,{children:(0,D.jsx)(a,{})}):r?(0,D.jsx)(i,{children:(0,D.jsx)(d,{title:e(`errors.unknown.title`)})}):!n&&!l?(0,D.jsx)(x,{replace:!0,state:{from:t},to:`/auth`}):(0,D.jsx)(i,{children:(0,D.jsx)(w,{fallback:(0,D.jsx)(s,{children:(0,D.jsx)(p,{"data-testid":`bundle-loader`})})})})},k=()=>{let{t:e}=v(`schedule`),{slug:t}=b(),{isLoading:n}=f();return t?n?(0,D.jsx)(p,{"data-testid":`profile-loader`}):g(t)?(0,D.jsx)(m,{scheduleSlug:t,children:(0,D.jsx)(c,{children:(0,D.jsx)(O,{})})}):(0,D.jsx)(i,{children:(0,D.jsx)(d,{title:e(`errors.not_found.title`)})}):(0,D.jsx)(x,{to:`/`})},A=t({ScheduleLoader:()=>k});export{A as t}; 2//# sourceMappingURL=ScheduleLoader.DqEKET_z.chunk.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.