PageSourceSearch

https://cloud.hatchet.run/assets/index-Dg1Ao9et.js

js hatchet.run collected 2026-10-03 19:09:55 UTC 17,541 bytes, 39 lines download raw bytes

1import{z as K,j as e,B as w,ad as U,e as f,ae as le,af as ce,ag as $,h as de,ah as ue,k as t,ai as G,aj as Q,ak as me,al as X,am as H,an as W,ao as ee,ap as se,R as he,aq as fe,ar as pe,as as ge,at as xe,g as ve,b as c,au as be,av as ye,aw as ke,ax as we,N as je,M as Ce,T as V,Q as ze,G as Ne,ay as Le}from"./index-Cik2NVpk.js";import{H as Z,S as Re,a as Se,b as Me,u as Ee}from"./outlet-D9ObWrcM.js";import{R as Te,a as We,b as _e,c as De,d as Ae,e as Ie,f as Pe,g as Fe,h as He,i as Be,j as Xe,k as Oe,l as Ue}from"./index-avdEcLN7.js";import"./index-CWT1opuj.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new i.Error().stack;s&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[s]="521aafbb-fc84-41fd-9268-6685d2483324",i._sentryDebugIdIdentifier="sentry-dbid-521aafbb-fc84-41fd-9268-6685d2483324")}catch{}})();function q({collapsed:i,className:s}){const{isSelfHosted:m,isControlPlaneLoading:x}=K();if(x||!m)return null;const o=le("sidebar");return i?e.jsx(w,{variant:"icon",size:"icon","aria-label":"Try Cloud",hoverText:"Try Cloud",hoverTextSide:"right",className:f("w-10",s),asChild:!0,children:e.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:e.jsx(U,{className:"h-6 w-6 cursor-pointer text-foreground"})})}):e.jsx(w,{variant:"ghost",className:f("w-full justify-start pl-2 min-w-0 overflow-hidden",s),asChild:!0,children:e.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(U,{className:"size-4 mr-2"}),e.jsx("span",{className:"truncate",children:"Try Cloud"})]})})}const Y={current:0};function Ge({className:i,navItems:s}){const{sidebarOpen:m,setSidebarOpen:x,isWide:o,collapsed:l,setCollapsed:d,expandedWidth:p,setExpandedWidth:k}=ce(),{tenantId:h}=$(),N=de(),j=ue(),[u,v]=t.useState(!1),[g,b]=t.useState(null),[C,L]=t.useState(0),[R,E]=t.useState(0),y=t.useRef(!1),S=t.useRef(!1),[_,O]=t.useState(!1),te=t.useRef(null),D=t.useRef(null),A=t.useCallback(()=>{o||x("closed")},[o,x]),ae=o?u&&g!==null?y.current?g<G:g<=Q:l:!1,ne=(()=>{if(o)return u&&g!==null?g:l?W:p})(),B=t.useCallback(a=>
1{if(!u)return;const r=a.clientX-C;!S.current&&Math.abs(r)>=me&&(S.current=!0);const n=Math.max(W,Math.min(H,R+r));b(n)},[u,C,R]),I=t.useCallback(()=>{if(!S.current){y.current?d(!1):d(!0),b(null),v(!1);return}const a=g??(l?W:p);y.current?a>=G?(d(!1),k(Math.max(X,Math.min(H,a)))):d(!0):a<=Q?d(!0):(d(!1),k(Math.max(X,Math.min(H,a)))),b(null),v(!1)},[g,l,p,d,k]),oe=t.useCallback(a=>{if(!o)return;a.preventDefault(),y.current=l,S.current=!1,v(!0),L(a.clientX);const r=l?W:p;E(r),b(r)},[o,l,p]);t.useEffect(()=>{if(u)return document.addEventListener("mousemove",B),document.addEventListener("mouseup",I),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",I),document.body.style.cursor=""}},[u,B,I]);const P=t.useMemo(()=>h?{tenant:h}:void 0,[h]);t.useLayoutEffect(()=>{D.current&&(D.current.scrollTop=Y.current)},[]);const re=t.useCallback(()=>{d(!l),b(null),v(!1)},[d,l]);return m==="closed"?null:e.jsxs("div",{ref:te,"data-cy":"v1-sidebar",className:f("absolute inset-x-0 top-0 bottom-0 z-[100] w-full overflow-hidden bg-slate-100 dark:bg-slate-900 md:relative md:inset-auto md:top-0 md:bottom-auto md:h-full md:bg-[unset] md:dark:bg-[unset]",!u&&"md:transition-[width] md:duration-200 md:ease-in-out",i),style:o?{width:ne,minWidth:u||l?W:X,maxWidth:H}:void 0,children:[e.jsx("div",{className:f("absolute right-0 top-0 bottom-0 z-20 hidden w-1 cursor-col-resize transition-colors hover:bg-blue-500/20 md:block",u&&"bg-blue-500/30"),"data-cy":"v1-sidebar-resize-handle",onMouseDown:oe,onMouseUp:a=>{a.stopPropagation(),I()},onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:o&&_&&e.jsx(w,{variant:"ghost",size:"icon",hoverText:l?"Expand sidebar":"Collapse sidebar",hoverTextSide:"right","aria-label":l?"Expand sidebar":"Collapse sidebar",className:f("absolute right-0 top-1/2 z-30 hidden h-8 w-5 -translate-y-1/2 rounded-l-md border border-r-0 bg-secondary/90 text-secondary-foreground shadow-sm opacity-0 backdrop-blur transition-opacity md:flex","opacity-100",u&&"pointer-events-none opacity-0"),"data-cy":"v1-sidebar-resize-toggle",onMouseDown:a=>{a.stopPropagation()},onClick:a=>{a.stopPropagation(),re()},children:l?e.jsx(ee,{className:"size-4"}):e.jsx(se,{className:"size-4"})})}),e.jsx("div",{className:"flex h-full flex-col overflow-hidden",children:ae?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-cy":"v1-sidebar-scroll-collapsed",className:"min-h-0 flex-1 overflow-auto py-4 pl-2 overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"flex w-full flex-col items-center gap-y-2 px-2",children:s.map((a,r)=>e.jsxs(he.Fragment,{children:[r>0&&e.jsx("div",{className:"my-2 h-px w-8 bg-slate-200 dark:bg-slate-800"}),a.items.map(n=>{const T=n.params??P,M=n.displayAsActiveWhenThisRouteIsMatched??("to"in n?n.to:null),ie=n.activeFuzzy??!1,F=(M?!!j({to:M,params:T,fuzzy:ie}):!1)||(n.additionalActiveMatches??[]).some(z=>!!j({to:z.to,params:z.params,fuzzy:z.fuzzy}));return n.children&&n.children.length>0?e.jsxs(fe,{children:[e.jsx(pe,{asChild:!0,children:e.jsx(w,{variant:"ghost",size:"icon",hoverText:n.name,hoverTextSide:"right","aria-label":n.name,className:f("w-10",F&&"bg-slate-200 dark:bg-slate-800"),children:n.icon({collapsed:!0,active:F})})}),e.jsx(ge,{side:"right",align:"start",className:"z-[100]",children:n.children.map(z=>e.jsx(xe,{asChild:!0,className:"w-full cursor-pointer",children:e.jsx(ve,{to:z.to,params:P,preload:!1,onClick:A,children:z.name})},z.key))})]},n.key):e.jsx(w,{variant:"ghost",size:"icon",hoverText:n.name,hoverTextSide:"right","aria-label":n.name,className:f("w-10",F&&"bg-slate-200 dark:bg-slate-800"),onClick:()=>{"onClick"in n?n.onClick():N({to:n.to,params:T}),A()},children:n.icon({collapsed:!0,active:F})},n.key)})]},a.key))})}),e.jsx("div",{className:"w-full shrink-0 py-2",children:e.jsxs("div",{className:"flex w-full flex-col items-center gap-1",children:[e.jsx(q,{collapsed:!0,className:"w-10"}),e.jsx(Z,{triggerVariant:"icon",align:"start",side:"right",className:"w-10"})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:D,"data-cy":"v1-sidebar-scroll",onScroll:()=>{var a;Y.current=((a=D.current)==null?void 0:a.scrollTop)??0},className:"min-h-0 flex-1 overflow-auto overscroll-contain touch-pan-y [-webkit-overflow-scrolling:touch] [scrollbar-gutter:stable] scrollbar-thin scrollbar-track-transparent scrollbar-thumb-muted-foreground",children:e.jsx("div",{className:"px-4 py-4",children:s.map(a=>e.jsxs("div",{className:"py-2",children:[e.jsx("h2",{className:"mb-2 text-xs font-mono tracking-widest uppercase text-muted-foreground",children:a.title}),e.jsx("div",{className:a.itemsClassName,children:a.items.map(r=>{var T;const n=r.params??P;return"onClick"in r?e.jsx(Re,{name:r.name,icon:r.icon({collapsed:!1}),onClick:r.onClick,muted:!0}
1,r.key):e.jsx(Se,{onNavLinkClick:A,to:r.to,params:n,prefix:r.prefix,additionalActiveMatches:r.additionalActiveMatches,name:r.name,icon:r.icon({collapsed:!1,active:!!j({to:r.to,params:n,fuzzy:r.activeFuzzy})}),collapsibleChildren:((T=r.children)==null?void 0:T.map(M=>e.jsx(Me,{onNavLinkClick:A,to:M.to,params:P,name:M.name},M.key)))??[]},r.key)})})]},a.key))})}),e.jsxs("div",{"data-cy":"v1-sidebar-footer",className:"flex w-full shrink-0 flex-col gap-1 border-t border-slate-200 px-4 py-2 dark:border-slate-800",children:[e.jsx(q,{collapsed:!1}),e.jsx(Z,{triggerVariant:"split",align:"start",side:"top",className:"w-full"})]})]})})]})}function Qe(i){return[{key:"overview",title:"",itemsClassName:"flex flex-col gap-y-1",items:[{key:"overview",name:"Overview",to:c.tenantOverviewRoute.to,icon:({collapsed:s,active:m})=>e.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s?"size-5":"mr-2 size-4 shrink-0",children:[e.jsx("style",{children:`
2                  @keyframes hatchet-fall {
3                    0% {
4                      transform: translateX(12px) translateY(-10px) rotate(179deg) scale(0.2);
5                      opacity: 0;
6                    }
7                    50% {
8                      opacity: 1;
9                      transform: translateX(0) translateY(-1px) rotate(20deg) scale(1);
10                    }
11                    55% {
12                      transform: translateY(0) rotate(-12deg);
13                    }
14                    60% {
15                      transform: translateY(0) rotate(0deg);
16                      opacity: 1;
17                    }
18                  }
19                  @keyframes stump-gap-animation {
20                    0% {
21                      fill-opacity: 0.64;
22                    }
23                    70% {
24                      fill-opacity: 0.64;
25                    }
26                    100% {
27                      fill-opacity: 0;
28                    }
29                  }
30                  .hatchet-animated {
31                    transform-origin: 8px 7px;
32                    animation: hatchet-fall 1s cubic-bezier(0.8, 0.1, 0.8, 0.2) forwards;
33                  }
34                  .stump-gap-animated {
35                    animation: stump-gap-animation 0.5s cubic-bezier(0.8, 0.1, 0.8, 0.2);
36                    animation-fill-mode: both;
37                  }
38                `}),e.jsx("path",{d:"M10.7088 5.33333L8.90785 9.33333L5.39489 5.79376C5.00305 5.39895 4.80713 5.20155 4.73366 4.97425C4.66902 4.77429 4.66902 4.55905 4.73366 4.35909C4.80713 4.13178 5.00305 3.93438 5.39489 3.53957L8.90785 7.38316e-07L11.6096 1.21071e-06L7.07243 4.88519C6.94095 5.02675 6.87522 5.09753 6.87203 5.15789C6.86927 5.2103 6.89135 5.26095 6.93164 5.29459C6.97803 5.33333 7.07463 5.33333 7.26782 5.33333L10.7088 5.33333Z",className:m?"hatchet-animated":"",fill:"currentColor"},m?"hatchet-active":"hatchet-inactive"),e.jsx("path",{d:"M11.9336 13.3389L5.93359 16.6729L5.28516 15.5068L11.2852 12.1738L11.9336 13.3389ZM12.9424 8C13.6788 8 14.2764 8.59761 14.2764 9.33398V12.5049C14.2765 12.8584 14.417 13.1983 14.667 13.4482L16.5518 15.334H13.1152L11.0166 16.5L10.6924 15.917L10.3691 15.334L12.4678 14.168C12.6657 14.058 12.8888 14.0001 13.1152 14H13.4023C13.1056 13.5618 12.9424 13.0417 12.9424 12.5049V9.33398H10.6846L11.2852 8H12.9424ZM6.86035 9.33398H3.60938V12.5049C3.60931 13.0252 3.4554 13.5294 3.17578 13.959L5.95215 12.418L6.27637 13L6.59961 13.583L3.75098 15.166C3.55304 15.2759 3.32991 15.3339 3.10352 15.334H0L1.1377 14.1953L1.88574 13.4482C2.1357 13.1983 2.27628 12.8584 2.27637 12.5049V9.33398C2.27637 8.59769 2.87311 8.00013 3.60938 8H5.53711L6.86035 9.33398Z",fill:"currentColor",fillOpacity:"0.64"}),e.jsx("path",{d:"M10.6846 9.33398L11.2852 8H5.53711L6.86035 9.33398H10.6846Z",fill:"currentColor",fillOpacity:"0",id:"stump-gap",className:m?"stump-gap-animated":""})]})}]},{key:"activity",title:"Activity",itemsClassName:"space-y-1",items:[{key:"runs",name:"Runs",to:c.tenantRunsRoute.to,icon:({collapsed:s})=>e.jsx(Te,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"events",name:"Events",to:c.tenantEventsRoute.to,icon:({collapsed:s})=>e.jsx(We,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"logs",name:"Logs",to:c.tenantLogsRoute.to,icon:({collapsed:s})=>e.jsx(_e,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]}
38,{key:"triggers",title:"Triggers",itemsClassName:"space-y-1",items:[{key:"scheduled",name:"Scheduled Runs",to:c.tenantScheduledRoute.to,icon:({collapsed:s})=>e.jsx(De,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"crons",name:"Cron Jobs",to:c.tenantCronJobsRoute.to,icon:({collapsed:s})=>e.jsx(Ae,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"webhooks",name:"Webhooks",to:c.tenantWebhooksRoute.to,icon:({collapsed:s})=>e.jsx(Ie,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"resources",title:"Resources",itemsClassName:"space-y-1",items:[{key:"workers",name:"Workers",to:c.tenantWorkersRoute.to,icon:({collapsed:s})=>e.jsx(Pe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"workflows",name:"Workflows",to:c.tenantWorkflowsRoute.to,icon:({collapsed:s})=>e.jsx(Fe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...i.isControlPlaneEnabled&&i.hasManagedWorkers?[{key:"managed-compute",name:"Managed Compute",to:c.tenantManagedWorkersRoute.to,icon:({collapsed:s})=>e.jsx(He,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]:[],{key:"rate-limits",name:"Rate Limits",to:c.tenantRateLimitsRoute.to,icon:({collapsed:s})=>e.jsx(Be,{className:s?"size-5":"mr-2 size-4 shrink-0"})},{key:"filters",name:"Filters",to:c.tenantFiltersRoute.to,icon:({collapsed:s})=>e.jsx(Xe,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]},{key:"settings",title:"Settings",itemsClassName:"space-y-1",items:[{key:"settings",name:"Settings",to:c.tenantSettingsOverviewRoute.to,prefix:c.tenantSettingsLayoutRoute.to,displayAsActiveWhenThisRouteIsMatched:c.tenantSettingsLayoutRoute.to,activeFuzzy:!0,additionalActiveMatches:[{to:c.organizationSettingsLayoutRoute.to,fuzzy:!0}],icon:({collapsed:s})=>e.jsx(Oe,{className:s?"size-5":"mr-2 size-4 shrink-0"})},...i.isControlPlaneEnabled?[]:[{key:"tenants",name:"Tenants",to:c.tenantsRoute.to,params:{},icon:({collapsed:s})=>e.jsx(Ue,{className:s?"size-5":"mr-2 size-4 shrink-0"})}]]}]}function Ve({sidebar:i,children:s,sidePanel:m,className:x,mainClassName:o,mainContainerType:l="normal"}){return e.jsxs("div",{className:f("relative grid h-full w-full min-h-0 min-w-0 grid-rows-1 grid-cols-[0px_1fr_auto] overflow-hidden md:grid-cols-[auto_1fr_auto]",x),children:[e.jsx("div",{className:"col-start-1 row-start-1 min-h-0",children:i}),e.jsx("div",{className:f("col-start-2 row-start-1 min-h-0 min-w-0",o),style:l==="inline-size"?{containerType:"inline-size"}:void 0,children:s}),e.jsx("div",{className:"col-start-3 row-start-1 min-h-0",children:m})]})}const Ze=650,J=350;function qe(){const{content:i,isOpen:s,close:m,canGoBack:x,canGoForward:o,goBack:l,goForward:d}=be(),[p,k]=ye("sidePanelWidth",Ze),[h,N]=t.useState(!1),[j,u]=t.useState(0),[v,g]=t.useState(0),b=t.useRef(null),C=s?p:0,L=t.useCallback(y=>{y.preventDefault(),N(!0),u(y.clientX),g(p)},[p]),R=t.useCallback(y=>{if(!h)return;const S=j-y.clientX,_=Math.max(J,v+S);_<J||k(_)},[h,j,v,k]),E=t.useCallback(()=>{N(!1)},[]);return t.useEffect(()=>{if(h)return document.addEventListener("mousemove",R),document.addEventListener("mouseup",E),document.body.style.cursor="col-resize",()=>{document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",E),document.body.style.cursor=""}},[h,R,E]),e.jsx("div",{ref:b,"data-cy":"side-panel",className:f("relative flex flex-shrink-0 flex-col overflow-hidden border-l border-border bg-background h-full",!h&&"transition-all duration-300 ease-in-out"),style:{width:C},children:i&&s&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:f("absolute bottom-0 left-0 top-0 z-10 w-1 cursor-col-resize transition-colors hover:bg-blue-500/20",h&&"bg-blue-500/30"),onMouseDown:L}),e.jsxs("div",{className:"sticky top-0 z-20 flex w-full flex-row items-center justify-between bg-background px-4 pb-2 pt-4",children:[e.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[e.jsxs(w,{variant:"ghost",size:"sm",onClick:l,disabled:!x,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(se,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Back"})]}),e.jsxs(w,{variant:"ghost",size:"sm",onClick:d,disabled:!o,className:"flex-shrink-0 rounded-sm border opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(ee,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Go Forward"})]})]}),e.jsx("div",{children:e.jsxs(w,{variant:"ghost",onClick:m,className:"flex-shrink-0 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[e.jsx(ke,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})})]}),e.jsx("div",{"data-cy":"side-panel-content",className:f("side-panel-content flex-1 overflow-hidden flex flex-col p-4",h&&"pointer-events-none"),children:i.component})]})})}function Ye({children:i}){var C,L;const s=we(),{user:m,memberships:x}=s,{tenantId:o,isUserUniverseLoaded:l}=$(),{isControlPlaneEnabled:d,canBill:p}=K(),{getOrganizationIdForTenant:k}=je(),h=Ce(),N=d&&o?k(o)??void 0:void 0;t.useEffect(()=>{o&&h.prefetchQuery(V.workflows.list(o,{limit:200}))},[h,o]);const u=(((L=(C=ze({...V.cloud.listManagedWorkers(o??""),enabled:d&&!!o}).data)==null?void 0:C.rows)==null?void 0:L.length)||0)>0,v=t.useMemo(()=>Qe({isControlPlaneEnabled:d,hasManagedWorkers:u}),[p,d,N,u]),g=Ee({user:m,memberships:x}),b=l?i??e.jsx(Le,{context:g}):e.jsx(Ne,{className:"items-center justify-center"});return e.jsx(Ve,{sidebar:e.jsx(Ge,{navItems:v}),sidePanel:e.jsx(qe,{}),mainContainerType:"inline-size",children:e.jsx("div",{className:"shadow-[inset_1px_0_0_0_hsl(var(--border)/0.5),inset_0_1px_0_0_hsl(var(--border)/0.5)] md:rounded-tl-xl p-4 h-full dark:bg-[#050A23] bg-background overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:b})})}function ss(){return e.jsx(Ye,{})}export{Ye as MainShell,ss as default};
39//# sourceMappingURL=index-Dg1Ao9et.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.