wurk 1.8.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -1
  3. data/lib/wurk/rails_boot.rb +13 -3
  4. data/lib/wurk/version.rb +1 -1
  5. data/vendor/assets/dashboard/assets/{ArgsValue-DsPb_KZ-.js → ArgsValue-_MYkd_vA.js} +1 -1
  6. data/vendor/assets/dashboard/assets/{BatchDetail-BCIXJOpZ.js → BatchDetail-DPmg-hle.js} +1 -1
  7. data/vendor/assets/dashboard/assets/{Batches-IjaQfXW6.js → Batches-NTgqSlvD.js} +1 -1
  8. data/vendor/assets/dashboard/assets/{Busy-CaQrf1Ve.js → Busy-2rxcLJMq.js} +1 -1
  9. data/vendor/assets/dashboard/assets/{Cron-B18EHn_Y.js → Cron-BFpJgKYb.js} +1 -1
  10. data/vendor/assets/dashboard/assets/{Dashboard-DdT5ZaUg.js → Dashboard-C8VOE2S7.js} +1 -1
  11. data/vendor/assets/dashboard/assets/{Dead-DWIy-Mu8.js → Dead-Dse2YEbZ.js} +1 -1
  12. data/vendor/assets/dashboard/assets/{Extension-BjBUWhHf.js → Extension-BIc2c1zG.js} +1 -1
  13. data/vendor/assets/dashboard/assets/{FilterBox-DwH3PXXt.js → FilterBox-BfZm8ZzH.js} +1 -1
  14. data/vendor/assets/dashboard/assets/{FlowDetail-DnexL72n.js → FlowDetail-BWddOtgf.js} +1 -1
  15. data/vendor/assets/dashboard/assets/{FlowState-Cr4aX6-d.js → FlowState-6lGsojxE.js} +1 -1
  16. data/vendor/assets/dashboard/assets/{Flows-DO6EimbZ.js → Flows-BgKTlYwI.js} +1 -1
  17. data/vendor/assets/dashboard/assets/{JobDetailModal-aPjgq-U9.js → JobDetailModal-BrjmO98c.js} +1 -1
  18. data/vendor/assets/dashboard/assets/{Limiters-DxpwWCNe.js → Limiters-DeUkfbcg.js} +1 -1
  19. data/vendor/assets/dashboard/assets/{Metrics-C3JL1GIH.js → Metrics-DzmAgBFG.js} +1 -1
  20. data/vendor/assets/dashboard/assets/{NotFound-BfP9uAV9.js → NotFound-CQLLXIfa.js} +1 -1
  21. data/vendor/assets/dashboard/assets/{PageHeader-DbC97afG.js → PageHeader-CeSaqysY.js} +1 -1
  22. data/vendor/assets/dashboard/assets/{Profiles-BcaHreMe.js → Profiles-CI2i2tl8.js} +1 -1
  23. data/vendor/assets/dashboard/assets/{Queues-ZlBc5tyD.js → Queues-DUCQ_3St.js} +1 -1
  24. data/vendor/assets/dashboard/assets/{Retries-Bg3nkeiL.js → Retries-Dc2RFuTf.js} +1 -1
  25. data/vendor/assets/dashboard/assets/{Scheduled-BrMZPZGl.js → Scheduled-B8zOKCLC.js} +1 -1
  26. data/vendor/assets/dashboard/assets/{Search-B5X5pGht.js → Search-x0eS-V-U.js} +1 -1
  27. data/vendor/assets/dashboard/assets/{charts-uDyf4PN0.js → charts-VggSMFGc.js} +1 -1
  28. data/vendor/assets/dashboard/assets/i18n-B6AbnmJn.js +1 -0
  29. data/vendor/assets/dashboard/assets/index-CTWV8VL4.js +141 -0
  30. data/vendor/assets/dashboard/assets/index-WpZjU076.css +1 -0
  31. data/vendor/assets/dashboard/assets/{useResetPageOnEmpty-O3-5rMk3.js → useResetPageOnEmpty-BsYWeStI.js} +1 -1
  32. data/vendor/assets/dashboard/assets/{useSort-xfnwjQAu.js → useSort-BWWfpnZH.js} +1 -1
  33. data/vendor/assets/dashboard/assets/{utils-BIKHwNKB.js → utils-DnzJXljj.js} +1 -1
  34. data/vendor/assets/dashboard/index.html +3 -3
  35. data/vendor/assets/dashboard/wurk-manifest.json +2 -2
  36. metadata +30 -30
  37. data/vendor/assets/dashboard/assets/i18n-CJeYfeVt.js +0 -1
  38. data/vendor/assets/dashboard/assets/index-B36QCAf-.css +0 -1
  39. data/vendor/assets/dashboard/assets/index-DQujgZgH.js +0 -141
@@ -0,0 +1,141 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-C8VOE2S7.js","assets/i18n-B6AbnmJn.js","assets/utils-DnzJXljj.js","assets/PageHeader-CeSaqysY.js","assets/charts-VggSMFGc.js","assets/Queues-DUCQ_3St.js","assets/useResetPageOnEmpty-BsYWeStI.js","assets/useSort-BWWfpnZH.js","assets/ArgsValue-_MYkd_vA.js","assets/JobDetailModal-BrjmO98c.js","assets/Retries-Dc2RFuTf.js","assets/FilterBox-BfZm8ZzH.js","assets/Scheduled-B8zOKCLC.js","assets/Dead-Dse2YEbZ.js","assets/Busy-2rxcLJMq.js","assets/Batches-NTgqSlvD.js","assets/BatchDetail-DPmg-hle.js","assets/Flows-BgKTlYwI.js","assets/FlowState-6lGsojxE.js","assets/FlowDetail-BWddOtgf.js","assets/Limiters-DeUkfbcg.js","assets/Cron-BFpJgKYb.js","assets/Metrics-DzmAgBFG.js","assets/Profiles-CI2i2tl8.js","assets/Search-x0eS-V-U.js","assets/Extension-BIc2c1zG.js","assets/NotFound-CQLLXIfa.js"])))=>i.map(i=>d[i]);
2
+ import{$ as e,A as t,C as n,D as r,E as i,F as a,G as o,H as s,I as c,J as l,K as u,L as d,M as f,N as p,P as m,Q as h,R as g,S as _,U as v,V as y,W as b,X as x,Y as S,Z as ee,_ as C,a as te,b as w,c as T,d as ne,et as E,f as re,g as ie,h as ae,i as oe,j as D,k as se,l as O,m as ce,n as le,o as k,p as A,q as ue,r as de,s as fe,t as pe,u as j,v as M,w as me,x as he,z as N}from"./i18n-B6AbnmJn.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ge(){let e=new Set;function t(t){return e.add(t),()=>e.delete(t)}let n=!1;function r(t,r){if(n)return!(n=!1);let i={to:t,options:r,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(let a of e)a.listener({to:t,options:r,get defaultPrevented(){return i.defaultPrevented},preventDefault:i.preventDefault,from:a.location,retry:e=>{e&&(n=!0),a.navigate(t,{...r,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}var _e;function ve(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},``),_e=window.history.state._depth}ve();function ye(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function be(e,t){let n=!1;return()=>{let r=_e;ve();let i=r==null?null:_e-r;if(n){n=!1;return}i&&t(i)?(n=!0,window.history.go(-i)):e()}}var xe=/^(?:[a-z0-9]+:)?\/\//i,Se=/^\/+|(\/)\/+$/g,Ce=`http://sr`;function P(e,t=!1){let n=e.replace(Se,`$1`);return n?t||/^[?#]/.test(n)?n:`/`+n:``}function we(e,t,n){if(xe.test(t))return;let r=P(e),i=n&&P(n),a=``;return a=!i||t.startsWith(`/`)?r:i.toLowerCase().indexOf(r.toLowerCase())===0?i:r+i,(a||`/`)+P(t,!a)}function Te(e,t){if(e==null)throw Error(t);return e}function Ee(e,t){return P(e).replace(/\/*(\*.*)?$/g,``)+P(t)}function De(e){let t={};return e.searchParams.forEach((e,n)=>{n in t?Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]:t[n]=e}),t}function Oe(e,t,n){let[r,i]=e.split(`/*`,2),a=r.split(`/`).filter(Boolean),o=a.length;return e=>{let r=e.split(`/`);if(r[0]===``&&r.shift(),r.length&&r[r.length-1]===``&&r.pop(),r.includes(``))return null;let s=r.length-o;if(s<0||s>0&&i===void 0&&!t)return null;let c={path:o?``:`/`,params:{}},l=e=>n===void 0?void 0:n[e];for(let e=0;e<o;e++){let t=a[e],n=t[0]===`:`,i=n?r[e]:r[e].toLowerCase(),o=n?t.slice(1):t.toLowerCase();if(n&&ke(i,l(o)))c.params[o]=i;else if(n||!ke(i,o))return null;c.path+=`/${i}`}if(i){let e=s?r.slice(-s).join(`/`):``;if(ke(e,l(i)))c.params[i]=e;else return null}return c}}function ke(e,t){let n=t=>t===e;return t===void 0?!0:typeof t==`string`?n(t):typeof t==`function`?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp&&t.test(e)}function Ae(e){let[t,n]=e.pattern.split(`/*`,2),r=t.split(`/`).filter(Boolean);return r.reduce((e,t)=>e+(t.startsWith(`:`)?2:3),r.length-(n===void 0?0:1))}function je(e){let t=new Map,n=s();return new Proxy({},{get(r,i){return t.has(i)||S(n,()=>t.set(i,a(()=>e()[i]))),t.get(i)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())},has(t,n){return n in e()}})}function Me(e,t){let n=new URLSearchParams(e);Object.entries(t).forEach(([e,t])=>{t==null||t===``||t instanceof Array&&!t.length?n.delete(e):t instanceof Array?(n.delete(e),t.forEach(t=>{n.append(e,String(t))})):n.set(e,String(t))});let r=n.toString();return r?`?${r}`:``}function Ne(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length),i=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)i.push(n+=t[1]),r=r.slice(t[0].length);return Ne(r).reduce((e,t)=>[...e,...i.map(e=>e+t)],[])}var Pe=100,Fe=p(),Ie=p(),F=()=>Te(E(Fe),`<A> and 'use' router primitives can be only used inside a Route.`),Le=()=>E(Ie)||F().base,Re=e=>{let t=Le();return a(()=>t.resolvePath(e()))},ze=e=>{let t=F();return a(()=>{let n=e();return n===void 0?n:t.renderPath(n)})},Be=()=>F().navigatorFactory(),Ve=()=>F().location,He=()=>F().params,Ue=()=>{let t=F(),n=t.location,r=Be();return[n.query,(i,a)=>{let o=e(()=>{let e=t.pendingTarget&&new URL(t.pendingTarget.value,`http://sr`),r=e?e.pathname:n.pathname,a=e?e.search:n.search,o=e?e.hash:n.hash;return r+Me(a,i)+o});r(o,{scroll:!1,resolve:!1,...a})}]},We=e=>encodeURIComponent(e).replace(/%(2B|40|3A|24|26|2C|3B|3D)/g,e=>decodeURIComponent(e));function Ge(e,t=``){let{component:n,preload:r,load:i,children:a,info:o}=e,s=!a||Array.isArray(a)&&!a.length,c={key:e,component:n,preload:r||i,info:o};return qe(e.path).reduce((n,r)=>{for(let i of Ne(r)){let a=Ee(t,i),o=s?a:a.split(`/*`,1)[0];o=o.split(`/`).map(e=>e.startsWith(`:`)||e.startsWith(`*`)?e:We(e)).join(`/`),n.push({...c,originalPath:r,pattern:o,matcher:Oe(o,!s,e.matchFilters)})}return n},[])}function Ke(e,t=0){return{routes:e,score:Ae(e[e.length-1])*1e4-t,matcher(t){let n=[];for(let r=e.length-1;r>=0;r--){let i=e[r],a=i.matcher(t);if(!a)return null;n.unshift({...a,route:i})}return n}}}function qe(e){return Array.isArray(e)?e:[e]}function Je(e,t=``,n=[],r=[]){let i=qe(e);for(let e=0,a=i.length;e<a;e++){let a=i[e];if(a&&typeof a==`object`){a.hasOwnProperty(`path`)||(a.path=``);let e=Ge(a,t);for(let t of e){n.push(t);let e=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!e)Je(a.children,t.pattern,n,r);else{let e=Ke([...n],r.length);r.push(e)}n.pop()}}}return n.length?r:r.sort((e,t)=>t.score-e.score)}function Ye(e,t){for(let n=0,r=e.length;n<r;n++){let r=e[n].matcher(t);if(r)return r}return[]}function Xe(e,t,n){let r=new URL(Ce),i=a(t=>{let n=e();try{return new URL(n[0]===`/`?Ce+n:n,r)}catch{return console.error(`Invalid path ${n}`),t}},r,{equals:(e,t)=>e.href===t.href}),s=a(()=>i().pathname),c=a(()=>i().search,!0),l=a(()=>i().hash),u=()=>``,d=o(c,()=>De(i()));return{get pathname(){return s()},get search(){return c()},get hash(){return l()},get state(){return t()},get key(){return u()},query:n?n(d):je(d)}}var I;function Ze(){return I}function Qe(t,n,r,i={}){let{signal:[s,u],utils:d={}}=t,f=d.parsePath||(e=>e),p=d.renderPath||(e=>e),m=d.beforeLeave||ge(),g=we(``,i.base||``);if(g===void 0)throw Error(`${g} is not a valid base path`);g&&!s().value&&u({value:g,replace:!0,scroll:!1});let[_,v]=N(!1),y,b=(e,t)=>{(t.value!==x()||t.state!==C())&&(y===void 0&&v(!0),I=e,y=t,h(()=>{y===t&&(ee(y.value),te(y.state),l(),ne[1](e=>e.filter(e=>e.pending)))}).finally(()=>{y===t&&se(()=>{I=void 0,e===`navigate`&&ce(y),v(!1),y=void 0})}))},[x,ee]=N(s().value),[C,te]=N(s().state),w=Xe(x,C,d.queryWrapper),T=[],ne=N([]),re=a(()=>typeof i.transformUrl==`function`?Ye(n(),i.transformUrl(w.pathname)):Ye(n(),w.pathname)),ie=()=>{let e=re(),t={};for(let n=0;n<e.length;n++)Object.assign(t,e[n].params);return t},ae=d.paramsWrapper?d.paramsWrapper(ie,n):je(ie),oe={pattern:g,path:()=>g,outlet:()=>null,resolvePath(e){return we(g,e)}};return c(o(s,e=>b(`native`,e),{defer:!0})),{base:oe,location:w,params:ae,isRouting:_,get pendingTarget(){return y},renderPath:p,parsePath:f,navigatorFactory:O,matches:re,beforeLeave:m,preloadRoute:le,singleFlight:i.singleFlight===void 0||i.singleFlight,submissions:ne};function D(t,n,r){e(()=>{if(typeof n==`number`){n&&(d.go?d.go(n):console.warn(`Router integration does not support relative routing`));return}let e=!n||n[0]===`?`,{replace:i,resolve:a,scroll:o,state:s}={replace:!1,resolve:!e,scroll:!0,...r},c=a?t.resolvePath(n):we(e&&w.pathname||``,n);if(c===void 0)throw Error(`Path '${n}' is not a routable path`);if(T.length>=Pe)throw Error(`Too many redirects`);let l=x();(c!==l||s!==C())&&m.confirm(c,r)&&(T.push({value:l,replace:i,scroll:o,state:C()}),b(`navigate`,{value:c,state:s}))})}function O(e){return e=e||E(Ie)||oe,(t,n)=>D(e,t,n)}function ce(e){let t=T[0];t&&(u({...e,replace:t.replace,scroll:t.scroll}),T.length=0)}function le(e,t){let i=Ye(n(),e.pathname),a=I;I=`preload`;for(let n in i){let{route:a,params:o}=i[n];a.component&&a.component.preload&&a.component.preload();let{preload:s}=a;t&&s&&S(r(),()=>s({params:o,location:{pathname:e.pathname,search:e.search,hash:e.hash,query:De(e),state:null,key:``},intent:`preload`}))}I=a}}function $e(e,t,n,r){let{base:i,location:o,params:s}=e,{pattern:c,component:l,preload:u}=r().route,d=a(()=>r().path);l&&l.preload&&l.preload();let f=u?u({params:s,location:o,intent:I||`initial`}):void 0;return{parent:t,pattern:c,path:d,outlet:()=>l?D(l,{params:s,location:o,data:f,get children(){return n()}}):n(),resolvePath(e){return we(i.path(),e,d())}}}var et=e=>n=>{let{base:r}=n,i=t(()=>n.children),o=a(()=>Je(i(),n.base||``)),c,l=Qe(e,o,()=>c,{base:r,singleFlight:n.singleFlight,transformUrl:n.transformUrl});return e.create&&e.create(l),D(Fe.Provider,{value:l,get children(){return D(tt,{routerState:l,get root(){return n.root},get preload(){return n.rootPreload||n.rootLoad},get children(){return[ne(()=>(c=s())&&null),D(nt,{routerState:l,get branches(){return o()}})]}})}})};function tt(t){let n=t.routerState.location,r=t.routerState.params,o=a(()=>t.preload&&e(()=>{t.preload({params:r,location:n,intent:Ze()||`initial`})}));return D(i,{get when(){return t.root},keyed:!0,get fallback(){return t.children},children:e=>D(e,{params:r,location:n,get data(){return o()},get children(){return t.children}})})}function nt(e){let t=[],n;u(()=>t.forEach(e=>e()));let r=a(o(e.routerState.matches,(i,a,o)=>{let s=a&&i.length===a.length,c=[];for(let n=0,l=i.length;n<l;n++){let l=a&&a[n],u=i[n];o&&l&&u.route.key===l.route.key?c[n]=o[n]:(s=!1,t[n]&&t[n](),g(i=>{t[n]=i,c[n]=$e(e.routerState,c[n-1]||e.routerState.base,rt(()=>r()[n+1]),()=>{let t=e.routerState.matches();return t[n]??t[0]})}))}return t.splice(i.length).forEach(e=>e()),o&&s?o:(n=c[0],c)}));return rt(()=>r()&&n)()}var rt=e=>()=>D(i,{get when(){return e()},keyed:!0,children:e=>D(Ie.Provider,{value:e,get children(){return e.outlet()}})}),L=e=>{let n=t(()=>e.children);return b(e,{get children(){return n()}})};function it([e,t],n,r){return[n?()=>n(e()):e,r?e=>t(r(e)):t]}function at(e){let t=!1,n=e=>typeof e==`string`?{value:e}:e,r=it(N(n(e.get()),{equals:(e,t)=>e.value===t.value&&e.state===t.state}),void 0,n=>(!t&&e.set(n),x.registry&&!x.done&&(x.done=!0),n));return e.init&&u(e.init((i=e.get())=>{t=!0,r[1](n(i)),t=!1})),et({signal:r,create:e.create,utils:e.utils})}function ot(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function st(e,t){let n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}var ct=new Map;function lt({preload:e=!0,explicitLinks:t=!1,actionBase:n=`/_server`,transformUrl:r}={}){return i=>{let a=i.base.path(),o=i.navigatorFactory(i.base),s,c;function l(e){return e.namespaceURI===`http://www.w3.org/2000/svg`}function d(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return;let n=e.composedPath().find(e=>e instanceof Node&&e.nodeName.toUpperCase()===`A`);if(!n||t&&!n.hasAttribute(`link`))return;let r=l(n),i=r?n.href.baseVal:n.href;if((r?n.target.baseVal:n.target)||!i&&!n.hasAttribute(`state`))return;let o=(n.getAttribute(`rel`)||``).split(/\s+/);if(n.hasAttribute(`download`)||o&&o.includes(`external`))return;let s=r?new URL(i,document.baseURI):new URL(i);if(!(s.origin!==window.location.origin||a&&s.pathname&&!s.pathname.toLowerCase().startsWith(a.toLowerCase())))return[n,s]}function f(e){let t=d(e);if(!t)return;let[n,r]=t,a=i.parsePath(r.pathname+r.search+r.hash),s=n.getAttribute(`state`);e.preventDefault(),o(a,{resolve:!1,replace:n.hasAttribute(`replace`),scroll:!n.hasAttribute(`noscroll`),state:s?JSON.parse(s):void 0})}function p(e){let t=d(e);if(!t)return;let[n,a]=t;r&&(a.pathname=r(a.pathname)),i.preloadRoute(a,n.getAttribute(`preload`)!==`false`)}function m(e){clearTimeout(s);let t=d(e);if(!t)return c=null;let[n,a]=t;c!==n&&(r&&(a.pathname=r(a.pathname)),s=setTimeout(()=>{i.preloadRoute(a,n.getAttribute(`preload`)!==`false`),c=n},20))}function h(e){if(e.defaultPrevented)return;let t=e.submitter&&e.submitter.hasAttribute(`formaction`)?e.submitter.getAttribute(`formaction`):e.target.getAttribute(`action`);if(!t)return;if(!t.startsWith(`https://action/`)){let e=new URL(t,Ce);if(t=i.parsePath(e.pathname+e.search),!t.startsWith(n))return}if(e.target.method.toUpperCase()!==`POST`)throw Error(`Only POST forms are supported for Actions`);let r=ct.get(t);if(r){e.preventDefault();let t=new FormData(e.target,e.submitter);r.call({r:i,f:e.target},e.target.enctype===`multipart/form-data`?t:new URLSearchParams(t))}}O([`click`,`submit`]),document.addEventListener(`click`,f),e&&(document.addEventListener(`mousemove`,m,{passive:!0}),document.addEventListener(`focusin`,p,{passive:!0}),document.addEventListener(`touchstart`,p,{passive:!0})),document.addEventListener(`submit`,h),u(()=>{document.removeEventListener(`click`,f),e&&(document.removeEventListener(`mousemove`,m),document.removeEventListener(`focusin`,p),document.removeEventListener(`touchstart`,p)),document.removeEventListener(`submit`,h)})}}var ut=`solid-router:scroll`;function dt(){window.history.scrollRestoration=`manual`,ve();let e={};try{e=JSON.parse(sessionStorage.getItem(ut))||{}}catch{}let t=()=>window.history.state&&window.history.state._depth,n=!1,r,i=[ot(window,`scroll`,()=>{let i=t();i!=null&&(e[i]=window.scrollY),n||(r=void 0)}),ot(window,`pagehide`,()=>{try{sessionStorage.setItem(ut,JSON.stringify(e))}catch{}})],a=()=>{if(r==null)return;let t=e[r];r=void 0,t!=null&&(n=!0,window.scrollTo(0,t),n=!1)};return{onPop(){r=t()},onPush(){let n=t();if(n!=null)for(let t in e)+t>=n&&delete e[t]},create(e){m(o(e.isRouting,e=>e||a(),{defer:!0})),u(()=>i.forEach(e=>e()));let[n]=performance.getEntriesByType&&performance.getEntriesByType(`navigation`);n&&n.type!==`navigate`&&(r=t(),a())}}}function ft(e){let t=e.scrollRestoration?dt():void 0,n=()=>{let e=window.location.pathname+window.location.search,t=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:e+window.location.hash,state:t}},r=ge();return at({get:n,set({value:e,replace:n,scroll:r,state:i}){n?window.history.replaceState(ye(i),``,e):window.history.pushState(i,``,e),st(decodeURIComponent(window.location.hash.slice(1)),r),ve(),t&&!n&&t.onPush()},init:e=>{let i=be(e,e=>{if(e)return!r.confirm(e);{let e=n();return!r.confirm(e.value,{state:e.state})}});return ot(window,`popstate`,t?()=>{t.onPop(),i()}:i)},create:n=>{lt({preload:e.preload,explicitLinks:e.explicitLinks,actionBase:e.actionBase,transformUrl:e.transformUrl})(n),t&&t.create(n)},utils:{go:e=>window.history.go(e),beforeLeave:r}})(e)}var pt=C(`<a>`);function mt(e){e=b({inactiveClass:`inactive`,activeClass:`active`},e);let[,t]=ee(e,[`href`,`state`,`class`,`activeClass`,`inactiveClass`,`end`]),n=Re(()=>e.href),r=ze(n),i=Ve(),o=a(()=>{let t=n();if(t===void 0)return[!1,!1];let r=P(t.split(/[?#]/,1)[0]).toLowerCase().replace(/\/$/,``),a=decodeURI(P(i.pathname).toLowerCase().replace(/\/$/,``));return[e.end?r===a:a.startsWith(r+`/`)||a===r,r===a]});return(()=>{var n=pt();return ae(n,b(t,{get href(){return r()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!o()[0],[e.activeClass]:o()[0],...t.classList}},link:``,get"aria-current"(){return o()[1]?`page`:void 0}}),!1,!1),n})()}var ht=Symbol(`store-raw`),R=Symbol(`store-node`),z=Symbol(`store-has`),gt=Symbol(`store-self`);function _t(e){let t=e[w];if(!t&&(Object.defineProperty(e,w,{value:t=new Proxy(e,Ct)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),a=i!==null&&typeof e==`object`&&!!e&&!Array.isArray(e)&&i!==Object.prototype;if(a){let e=Object.getOwnPropertyDescriptors(i);n.push(...Object.keys(e)),Object.assign(r,e)}for(let i=0,o=n.length;i<o;i++){let o=n[i];a&&o===`constructor`||r[o].get&&Object.defineProperty(e,o,{configurable:!0,enumerable:r[o].enumerable,get:r[o].get.bind(t)})}}return t}function B(e){let t;return typeof e==`object`&&!!e&&(e[w]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function V(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[ht])return n;if(!B(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=V(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=V(i,t))!==i&&(e[a]=r))}return e}function vt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function yt(e,t,n){if(e[t])return e[t];let[r,i]=N(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function bt(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===w||t===R?n:(delete n.value,delete n.writable,n.get=()=>e[w][t],n)}function xt(e){y()&&yt(vt(e,R),gt)()}function St(e){return xt(e),Reflect.ownKeys(e)}var Ct={get(e,t,n){if(t===ht)return e;if(t===w)return n;if(t===he)return xt(e),n;let r=vt(e,R),i=r[t],a=i?i():e[t];if(t===R||t===z||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);y()&&(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,t))&&!(n&&n.get)&&(a=yt(r,t,a)())}return B(a)?_t(a):a},has(e,t){return t===ht||t===w||t===he||t===R||t===z||t===`__proto__`||(y()&&yt(vt(e,z),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:St,getOwnPropertyDescriptor:bt};function H(e,t,n,r=!1){if(t===`__proto__`||!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[z]&&e[z][t]&&i!==void 0&&e[z][t].$()):(e[t]=n,e[z]&&e[z][t]&&i===void 0&&e[z][t].$());let o=vt(e,R),s;if((s=yt(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=yt(o,`length`,a))&&s.$(e.length)}(s=o[gt])&&s.$()}function wt(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Tt(i)||H(e,i,t[i])}}function Tt(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Et(e,t){if(typeof t==`function`&&(t=t(e)),t=V(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&H(e,n,r)}H(e,`length`,r)}else wt(e,t)}function Dt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(a===`string`&&(r===`__proto__`||t.length>1&&Tt(r)))return;if(Array.isArray(r)){for(let i=0;i<r.length;i++)Dt(e,[r[i]].concat(t),n);return}if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Dt(e,[i].concat(t),n);return}if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Dt(e,[r].concat(t),n);return}if(t.length>1){Dt(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||(r!==void 0||a!=null)&&(a=V(a),r===void 0||B(i)&&B(a)&&!Array.isArray(a)?wt(i,a):H(e,r,a))}function Ot(...[e,t]){let n=V(e||{}),r=Array.isArray(n),i=_t(n);function a(...e){se(()=>{r&&e.length===1?Et(n,e[0]):Dt(n,e)})}return[i,a]}var kt=Symbol(`store-root`);function At(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function U(e,t,n,r,i){if(At(n))return;let a=t[n];if(e===a)return;let o=Array.isArray(e);if(n!==kt&&(!B(e)||!B(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){H(t,n,e);return}if(o){if(e.length&&a.length&&(!r||i&&e[0]&&e[0][i]!=null)){let t,n,o,s,c,l,u,d;for(o=0,s=Math.min(a.length,e.length);o<s&&(a[o]===e[o]||i&&a[o]&&e[o]&&a[o][i]&&a[o][i]===e[o][i]);o++)U(e[o],a,o,r,i);let f=Array(e.length),p=new Map;for(s=a.length-1,c=e.length-1;s>=o&&c>=o&&(a[s]===e[c]||i&&a[s]&&e[c]&&a[s][i]&&a[s][i]===e[c][i]);s--,c--)f[c]=a[s];if(o>c||o>s){for(n=o;n<=c;n++)H(a,n,e[n]);for(;n<e.length;n++)H(a,n,f[n]),U(e[n],a,n,r,i);a.length>e.length&&H(a,`length`,e.length);return}for(u=Array(c+1),n=c;n>=o;n--)l=e[n],d=i&&l?l[i]:l,t=p.get(d),u[n]=t===void 0?-1:t,p.set(d,n);for(t=o;t<=s;t++)l=a[t],d=i&&l?l[i]:l,n=p.get(d),n!==void 0&&n!==-1&&(f[n]=a[t],n=u[n],p.set(d,n));for(n=o;n<e.length;n++)n in f?(H(a,n,f[n]),U(e[n],a,n,r,i)):H(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)U(e[t],a,t,r,i);a.length>e.length&&H(a,`length`,e.length);return}let s=Object.keys(e);for(let t=0,n=s.length;t<n;t++)At(s[t])||U(e[s[t]],a,s[t],r,i);let c=Object.keys(a);for(let t=0,n=c.length;t<n;t++)e[c[t]]===void 0&&H(a,c[t],void 0)}function jt(e,t={}){let{merge:n,key:r=`id`}=t,i=V(e);return e=>{if(!B(e)||!B(i))return i;let t=U(i,{[kt]:e},kt,n,r);return t===void 0?e:t}}var Mt={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},W=new class{#e=Mt;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Nt(e){setTimeout(e,0)}var Pt=typeof window>`u`||`Deno`in globalThis;function G(){}function Ft(e,t){return typeof e==`function`?e(t):e}function It(e){return typeof e==`number`&&e>=0&&e!==1/0}function Lt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function K(e,t){return typeof e==`function`?e(t):e}function Rt(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Bt(o,t.options))return!1}else if(!J(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function zt(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(q(t.options.mutationKey)!==q(a))return!1}else if(!J(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Bt(e,t){return(t?.queryKeyHashFn||q)(e)}function q(e){return JSON.stringify(e,(e,t)=>Gt(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function J(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!J(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!J(e[r],t[r]))return!1;return!0}return!1}var Vt=Object.prototype.hasOwnProperty;function Ht(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Wt(e)&&Wt(t);if(!r&&!(Gt(e)&&Gt(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Vt.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Ht(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ut(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Wt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gt(e){if(!Kt(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Kt(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Kt(e){return Object.prototype.toString.call(e)===`[object Object]`}function qt(e){return new Promise(t=>{W.setTimeout(t,e)})}function Jt(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Ht(e,t)}function Yt(e){return e}function Xt(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Zt(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Qt=Symbol();function $t(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Qt?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function en(e,t){return typeof e==`function`?e(...t):!!e}function tn(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var nn=()=>Pt,rn=()=>nn(),Y=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},an=new class extends Y{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function on(e){let t;if(e.then(e=>(t=e,e),G)?.catch?.(G),t!==void 0)return{data:t}}function sn(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?on(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a?a(f):f,m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,dataUpdatedAt:l,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status,...r.status===`pending`&&p!==void 0&&{dataUpdatedAt:l}});c&&!d&&!h&&!g&&l>m.state.dataUpdatedAt&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(G)})}var cn=Nt;function ln(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=cn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var X=ln(),un=new class extends Y{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function dn(e){return Math.min(1e3*2**e,3e4)}function fn(e){return(e??`online`)!==`online`||un.isOnline()}var pn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function mn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(G);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new pn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>an.isFocused()&&(e.networkMode===`always`||un.isOnline())&&e.canRun(),p=()=>fn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(rn()?0:3),a=e.retryDelay??dn,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),qt(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var hn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),It(this.gcTime)&&(this.#e=W.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(rn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(W.clearTimeout(this.#e),this.#e=void 0)}};function gn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{tn(e,()=>t.signal,()=>n=!0)},u=$t(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Zt:Xt;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?vn:_n,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:_n(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function _n(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var yn=class extends hn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Sn(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Sn(this.options);e.data!==void 0&&(this.setState(xn(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Jt(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(G).catch(G):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>K(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>K(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Lt(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=$t(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?gn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=mn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof pn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof pn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...bn(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xn(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),X.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function bn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Sn(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Cn=class extends Y{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Tn(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return En(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return En(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof K(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ut(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Dn(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||K(this.options.enabled,this.#t)!==K(t.enabled,this.#t)||K(this.options.staleTime,this.#t)!==K(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||K(this.options.enabled,this.#t)!==K(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ut(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(G)),t}#h(e){return!rn()&&K(this.options.enabled,this.#t)!==!1&&It(e)}#g(){this.#b();let e=K(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Lt(this.#r.dataUpdatedAt,e)+1;this.#u=W.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return K(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=W.setInterval(()=>{(this.options.refetchIntervalInBackground||an.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(W.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(W.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Tn(e,t),o=i&&Dn(e,n,t,r);(a||o)&&(l={...l,...bn(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Jt(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Jt(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:On(e,t),refetch:this.refetch,isEnabled:K(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Ut(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();X.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function wn(e,t){return K(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||K(t.retryOnMount,e)!==!1)}function Tn(e,t){return wn(e,t)||e.state.data!==void 0&&En(e,t,t.refetchOnMount)}function En(e,t,n){if(K(t.enabled,e)!==!1&&K(t.staleTime,e)!==`static`){let r=K(n,e);return r===`always`||r!==!1&&On(e,t)}return!1}function Dn(e,t,n,r){return(e!==t||K(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&On(e,n)}function On(e,t){return K(t.enabled,e)!==!1&&e.isStaleByTime(K(t.staleTime,e))}var kn=class extends hn{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||An(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=mn({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),X.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function An(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var jn=class extends Y{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new kn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Mn(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Mn(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Mn(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Mn(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){X.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>zt(t,e))}findAll(e={}){return this.getAll().filter(t=>zt(e,t))}notify(e){X.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return X.batch(()=>Promise.all(e.map(e=>e.continue().catch(G))))}};function Mn(e){return e.options.scope?.id}var Nn=class extends Y{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Ut(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&q(t.mutationKey)!==q(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??An();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){X.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Pn=class extends Y{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Bt(r,t),a=this.get(i);return a||(a=new yn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){X.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Rt(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Rt(e,t)):t}notify(e){X.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){X.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){X.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Fn=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Pn,this.#t=e.mutationCache||new jn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=an.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=un.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(K(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Ft(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return X.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;X.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return X.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=X.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(G).catch(G)}invalidateQueries(e,t={}){return X.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=X.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(G)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(G)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(K(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(K(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(G).catch(G)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(G).catch(G)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return un.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{J(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{J(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Bt(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Qt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},In=p(void 0),Ln=`No QueryClient set, use QueryClientProvider to set one`,Rn=e=>{if(e)return e;let t=E(In);if(!t)throw Error(Ln);return t()},zn=e=>{let t=E(In);return()=>{let n=e?.();if(n)return n;if(!t)throw Error(Ln);return t()}},Bn=e=>(c(t=>(t?.(),e.client.mount(),e.client.unmount.bind(e.client))),u(()=>e.client.unmount()),D(In.Provider,{value:()=>e.client,get children(){return e.children}})),Vn=p(()=>!1),Hn=()=>E(Vn);Vn.Provider;function Un(e,t,n,r){if(n===!1)return t;if(typeof n==`function`){let r=n(e.data,t.data);return{...t,data:r}}let i=t.data;if(e.data===void 0)try{i=structuredClone(i)}catch{}let a=jt(i,{key:n})(e.data);return{...t,data:a}}var Wn=(e,t)=>t;function Gn(e,t,n){let r=zn(n),i=a(()=>r()),s=Hn(),c=a(()=>{let t=i().defaultQueryOptions(e());return t._optimisticResults=s()?`isRestoring`:`optimistic`,t.structuralSharing=!1,t}),l=c(),[p,m]=N(new t(i(),c())),h=p().getOptimisticResult(c()),[g,_]=Ot(h),v=()=>p().subscribe(e=>{h=e,queueMicrotask(()=>{x&&C()})});function y(e){let t=p().options,n=t.reconcile;_(r=>Un(r,e,n!==void 0&&n,t.queryHash))}function b(){return[()=>g,e=>{let t=V(g);if(typeof e==`function`&&(e=e(t)),e?.hydrationData){let{hydrationData:t,...n}=e;e=n}y(e)}]}let x=null,S=null,[ee,{refetch:C}]=d(()=>{let e=p();return new Promise((t,n)=>{if(S=t,!x&&!s()&&(x=v()),e.updateResult(),h.isError&&!h.isFetching&&!s()&&en(e.options.throwOnError,[h.error,e.getCurrentQuery()]))return y(h),n(h.error);if(!h.isLoading)return S=null,t(Wn(e.getCurrentQuery(),h));y(h)})},{storage:b,get deferStream(){return e().deferStream},onHydrated(e,t){if(t.value&&`hydrationData`in t.value&&sn(i(),{queries:[{...t.value.hydrationData}]}),x)return;let n={...l};(l.staleTime||!l.initialData)&&t.value&&(n.refetchOnMount=!1),p().setOptions(n),y(p().getOptimisticResult(n)),x=v()}});return f(o(i,e=>{x&&x();let n=new t(e,c());x=v(),m(n)},{defer:!0})),f(o(s,e=>{!e&&C()},{defer:!0})),u(()=>{x&&=(x(),null),S&&=(S(h),null)}),f(o([p,c],([e,t])=>{e.setOptions(t),y(e.getOptimisticResult(t)),C()},{defer:!0})),new Proxy(g,{get(e,t){return t===`data`?g.data===void 0?ee()?.data:ee.latest?.data:Reflect.get(e,t)}})}function Kn(e,t){return Gn(a(()=>e()),Cn,t)}function qn(e,t){let n=zn(t),r=new Nn(a(()=>n())(),e()),i=(...e)=>{r.mutate(e[0],e[1]).catch(G)},[s,c]=Ot({...r.getCurrentResult(),mutate:i,mutateAsync:r.getCurrentResult().mutate});f(()=>{r.setOptions(e())}),f(o(()=>s.status,()=>{if(s.isError&&en(r.options.throwOnError,[s.error]))throw s.error}));let l=r.subscribe(e=>{c({...e,mutate:i,mutateAsync:e.mutate})});return u(l),s}var Jn=class extends Fn{constructor(e={}){super(e)}};function Yn(){return((typeof window<`u`?window.__WURK_BASE__:void 0)??`/wurk`).replace(/\/+$/,``)}var Xn=class extends Error{status;body;constructor(e,t){super(`Request failed (${e})`),this.name=`RequestError`,this.status=e,this.body=t}};function Zn(e){if(!(e instanceof Xn)||e.status!==422)return null;let t=e.body;return t&&Array.isArray(t.failed)&&typeof t.count==`number`?t:null}async function Qn(e,t){let n=await fetch(e,{method:`POST`,headers:t===void 0?{}:{"Content-Type":`application/json`},body:t===void 0?void 0:JSON.stringify(t)});if(!n.ok)throw new Xn(n.status,await n.json().catch(()=>void 0));return n}async function $n(e){let t=await fetch(e);if(!t.ok)throw new Xn(t.status);return t.json()}async function er(e,t){let n=await fetch(e,t);return{ok:n.ok,status:n.status,text:await n.text()}}function tr(){return Kn(()=>({queryKey:[`meta`],queryFn:()=>$n(`${Yn()}/api/meta`),staleTime:1/0}))}var nr=1e3,[rr,ir]=N(0),ar=null,or=0;function sr(){return rr()}function cr(){ar!==null&&clearInterval(ar),ar=null}function lr(){ue(()=>{or===0&&(ar=setInterval(()=>ir(e=>e+1),nr)),or+=1,u(()=>{--or,or===0&&cr()})})}var[ur,dr]=N(null),[fr,pr]=N(!1),Z=null,mr=0,hr=2,gr=3e3,_r=3e4,vr=5e3,yr=0,br,Q;function xr(){clearTimeout(br),clearTimeout(Q),br=void 0,Q=void 0,yr=0}function Sr(){let e=new EventSource(`${Yn()}/api/stream`);Z=e,e.addEventListener(`stats`,e=>{try{dr(JSON.parse(e.data))}catch{}}),e.onopen=()=>{yr=0,clearTimeout(Q),Q=void 0,pr(!0)},e.onerror=()=>{if(Z!==e)return;if(e.readyState!==hr){Q??=setTimeout(()=>{Q=void 0,pr(!1)},vr);return}clearTimeout(Q),Q=void 0,pr(!1),e.close(),Z=null;let t=Math.min(_r,gr*2**yr);yr+=1,br=setTimeout(()=>{br=void 0,mr>0&&!Z&&Sr()},t)}}function Cr(){xr(),Z?.close(),Z=null,pr(!1),dr(null)}function wr(e=!0){return ue(()=>{e&&(mr===0&&Sr(),mr+=1,u(()=>{--mr,mr===0&&Cr()}))}),{stats:ur,connected:fr}}var Tr=C(`<button type=button class="wurk-navlink locale-picker__trigger"aria-haspopup=menu><i class="fa-solid fa-language wurk-navlink__icon"aria-hidden=true></i><span class=nav-label><bdi>`),Er=C(`<div role=menu class=locale-menu>`),Dr=C(`<i class="fa-solid fa-check"aria-hidden=true>`),Or=C(`<button type=button role=menuitemradio class=locale-menu__item><bdi>`),kr={en:`English`,es:`Español`,fr:`Français`,de:`Deutsch`,"pt-BR":`Português (Brasil)`,ja:`日本語`,"zh-CN":`简体中文`,ar:`العربية`},Ar=8,jr=160;function Mr(){let e=de(oe),t=kr[e??``]??oe,r,a,o=[],[s,l]=N(null),d=()=>s()!==null,f=()=>Math.max(0,le.indexOf(e??``)),p=()=>{let e=r.getBoundingClientRect(),t=document.documentElement.dir===`rtl`,n=e.top-16,i=window.innerHeight-e.bottom-16,a=n>=jr||n>=i;l({start:t?window.innerWidth-e.right:e.left,up:a,offset:a?window.innerHeight-e.top+Ar:e.bottom+Ar,maxHeight:Math.max(a?n:i,0)}),o[f()]?.focus()},h=e=>{l(null),e&&r.focus()},g=e=>{h(!1),te(e)},_=e=>o[e]?.focus(),v=e=>{let t=le.length-1,n=o.findIndex(e=>e===document.activeElement);switch(e.key){case`ArrowDown`:_(n>=t?0:n+1);break;case`ArrowUp`:_(n<=0?t:n-1);break;case`Home`:_(0);break;case`End`:_(t);break;case`Escape`:case`Tab`:h(!0);break;default:return}e.preventDefault()},y=e=>{d()||e.key!==`ArrowUp`&&e.key!==`ArrowDown`||(e.preventDefault(),p())};return m(()=>{if(!d())return;let e=e=>{let t=e.target;!a?.contains(t)&&!r.contains(t)&&h(!1)},t=()=>h(!1);document.addEventListener(`pointerdown`,e,!0),window.addEventListener(`scroll`,t,!0),window.addEventListener(`resize`,t),u(()=>{document.removeEventListener(`pointerdown`,e,!0),window.removeEventListener(`scroll`,t,!0),window.removeEventListener(`resize`,t)})}),[(()=>{var e=Tr(),n=e.firstChild.nextSibling.firstChild;e.$$keydown=y,e.$$click=()=>d()?h(!1):p();var i=r;return typeof i==`function`?M(i,e):r=e,j(n,t),c(n=>{var r=d(),i=k(`nav.language_current`,{name:t}),a=k(`nav.language`);return r!==n.e&&A(e,`aria-expanded`,n.e=r),i!==n.t&&A(e,`aria-label`,n.t=i),a!==n.a&&A(e,`title`,n.a=a),n},{e:void 0,t:void 0,a:void 0}),e})(),D(i,{get when(){return s()},children:t=>D(fe,{get children(){var r=Er();r.$$keydown=v;var s=a;return typeof s==`function`?M(s,r):a=r,j(r,D(n,{each:le,children:(t,n)=>(()=>{var r=Or(),a=r.firstChild;return r.$$click=()=>g(t),M(e=>o[n()]=e,r),A(r,`aria-checked`,t===e),A(r,`lang`,t),j(a,()=>kr[t]??t),j(r,D(i,{when:t===e,get children(){return Dr()}}),null),r})()})),c(e=>{var n=k(`nav.language`),i={"inset-inline-start":`${t().start}px`,...t().up?{bottom:`${t().offset}px`}:{top:`${t().offset}px`},"max-height":`${t().maxHeight}px`};return n!==e.e&&A(r,`aria-label`,e.e=n),e.t=ie(r,i,e.t),e},{e:void 0,t:void 0}),r}})})]}O([`click`,`keydown`]);var Nr=`wurk.theme`;function Pr(e){return e===`light`||e===`dark`||e===`system`?e:void 0}var Fr;function Ir(){try{return Pr(localStorage.getItem(Nr))}catch{return}}function Lr(){return Pr(window.__WURK_THEME__)}function Rr(){return Fr??Ir()??Lr()??`system`}function zr(){return window.matchMedia?.(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function Br(e){return e===`system`?zr():e}function Vr(e){document.documentElement.dataset.theme=e;let t=document.querySelector(`meta[name="theme-color"]`),n=getComputedStyle(document.documentElement).getPropertyValue(`--bg`).trim();t&&n&&t.setAttribute(`content`,n)}function Hr(e=Rr()){let t=Br(e);return Vr(t),t}function Ur(e){Fr=e;try{localStorage.setItem(Nr,e)}catch{}Hr(e)}var Wr,Gr=()=>{Hr()};function Kr(){Hr(),!Wr&&(Wr=window.matchMedia?.(`(prefers-color-scheme: light)`),Wr?.addEventListener(`change`,Gr))}var qr=C(`<button type=button class="wurk-navlink theme-toggle__trigger"><i aria-hidden=true></i><span class=nav-label>`),Jr=[{preference:`system`,icon:`fa-circle-half-stroke`},{preference:`light`,icon:`fa-sun`},{preference:`dark`,icon:`fa-moon`}];function Yr(){let[e,t]=N(Rr()),n=()=>Jr.findIndex(t=>t.preference===e()),r=()=>Jr[n()].icon,i=()=>Jr[(n()+1)%Jr.length].preference,a=e=>k(`theme.${e}`),o=()=>{let e=i();t(e),Ur(e)};return(()=>{var t=qr(),n=t.firstChild,s=n.nextSibling;return t.$$click=o,j(s,()=>a(e())),c(o=>{var s=k(`nav.theme_current`,{name:a(e())}),c=k(`nav.theme_next`,{name:a(i())}),l=`fa-solid ${r()} wurk-navlink__icon`;return s!==o.e&&A(t,`aria-label`,o.e=s),c!==o.t&&A(t,`title`,o.t=c),l!==o.a&&T(n,o.a=l),o},{e:void 0,t:void 0,a:void 0}),t})()}O([`click`]);var Xr=`wurk.tz`;function Zr(e){if(e)try{return Intl.DateTimeFormat(void 0,{timeZone:e}).resolvedOptions().timeZone}catch{return}}function Qr(){return Zr(Intl.DateTimeFormat().resolvedOptions().timeZone)??`UTC`}function $r(){try{return Zr(localStorage.getItem(Xr))}catch{return}}function ei(){return $r()??Qr()}var ti=ei();function ni(e){let t=e===null?null:Zr(e);if(t!==void 0){try{t===null?localStorage.removeItem(Xr):localStorage.setItem(Xr,t)}catch{return}window.location.reload()}}var ri;function ii(){if(!ri){let e=typeof Intl.supportedValuesOf==`function`?Intl.supportedValuesOf(`timeZone`):[Qr()];ri=Object.freeze([`UTC`,...e.filter(e=>e!==`UTC`)])}return ri}var ai=C(`<div class=modal-footer>`),oi=C(`<dialog class=modal><div class=modal-panel><div class=modal-header><h2 class=modal-title></h2><button class=modal-close><i class="fa-solid fa-xmark"></i></button></div><div class=modal-body>`),si=240;function ci(e){let n,r=`modal-title-${Math.random().toString(36).slice(2)}`,a=t(()=>e.children),[o,s]=N({title:e.title,children:a()});m(()=>{if(e.open)s({title:e.title,children:a()});else{let e=setTimeout(()=>s(null),si);u(()=>clearTimeout(e))}});let l=()=>e.open?{title:e.title,children:a()}:o();return m(()=>{e.open&&!n.open?n.showModal():!e.open&&n.open&&n.close()}),ue(()=>{let t=t=>{t.preventDefault(),e.onClose()};n.addEventListener(`cancel`,t),u(()=>n.removeEventListener(`cancel`,t))}),(()=>{var t=oi(),a=t.firstChild,o=a.firstChild,s=o.firstChild,u=s.nextSibling,d=o.nextSibling;t.$$click=t=>{t.target===n&&e.onClose()};var f=n;return typeof f==`function`?M(f,t):n=t,A(t,`aria-labelledby`,r),A(s,`id`,r),j(s,()=>l()?.title),u.$$click=()=>e.onClose(),j(d,()=>l()?.children),j(a,D(i,{get when(){return e.footer},get children(){var t=ai();return j(t,()=>e.footer),t}}),null),c(t=>{var n=`${e.width??640}px`,r=k(`common.close`);return n!==t.e&&ce(a,`max-width`,t.e=n),r!==t.t&&A(u,`aria-label`,t.t=r),t},{e:void 0,t:void 0}),t})()}O([`click`]);var li=C(`<button type=button class="wurk-navlink timezone-picker__trigger"aria-haspopup=dialog><i class="fa-solid fa-globe wurk-navlink__icon"aria-hidden=true></i><span class=nav-label><bdi>`),ui=C(`<p class=timezone-picker__hint>`),di=C(`<input class="input timezone-picker__filter"type=search aria-controls=timezone-picker-list>`),fi=C(`<div id=timezone-picker-list role=listbox class=timezone-picker__list>`),pi=C(`<p class=timezone-picker__empty>`),mi=C(`<i class="fa-solid fa-check"aria-hidden=true>`),hi=C(`<button type=button role=option class=timezone-picker__option><bdi>`);function gi(e){return e.toLowerCase().replace(/[_/]/g,` `)}function _i(e){return e.slice(e.lastIndexOf(`/`)+1).replace(/_/g,` `)}function vi(){let e=$r(),t=Qr(),[r,o]=N(!1),[s,l]=N(``),u,d,f=()=>Array.from(d?.querySelectorAll(`[role="option"]`)??[]),p=a(()=>{let n=[{zone:null,label:k(`timezone.automatic`,{name:t}),selected:e===void 0},...ii().map(t=>({zone:t,label:t,selected:t===e}))],r=gi(s().trim());return r?n.filter(e=>gi(e.label).includes(r)):n}),h=()=>{o(!1),l(``)},g=e=>{h(),ni(e)};m(()=>{r()&&u?.focus()});let _=e=>{if(e.key===`ArrowDown`)f()[0]?.focus();else if(e.key===`Enter`&&s().trim()){let e=p()[0];if(!e)return;g(e.zone)}else return;e.preventDefault()},v=e=>{let t=f(),n=t.findIndex(e=>e===document.activeElement);switch(e.key){case`ArrowDown`:t[Math.min(n+1,t.length-1)]?.focus();break;case`ArrowUp`:n<=0?u?.focus():t[n-1].focus();break;case`Home`:t[0]?.focus();break;case`End`:t[t.length-1]?.focus();break;default:return}e.preventDefault()};return[(()=>{var e=li(),t=e.firstChild.nextSibling.firstChild;return e.$$click=()=>o(!0),j(t,()=>_i(ti)),c(t=>{var n=r(),i=k(`nav.timezone_current`,{name:ti}),a=k(`timezone.shown_in`,{name:ti});return n!==t.e&&A(e,`aria-expanded`,t.e=n),i!==t.t&&A(e,`aria-label`,t.t=i),a!==t.a&&A(e,`title`,t.a=a),t},{e:void 0,t:void 0,a:void 0}),e})(),D(ci,{get open(){return r()},onClose:h,get title(){return k(`timezone.title`)},width:420,get children(){return D(i,{get when(){return r()},get children(){return[(()=>{var e=ui();return j(e,()=>k(`timezone.shown_in`,{name:ti})),e})(),(()=>{var e=di();e.$$keydown=_,e.$$input=e=>l(e.currentTarget.value);var t=u;return typeof t==`function`?M(t,e):u=e,c(t=>{var n=k(`timezone.filter`),r=k(`timezone.filter`);return n!==t.e&&A(e,`placeholder`,t.e=n),r!==t.t&&A(e,`aria-label`,t.t=r),t},{e:void 0,t:void 0}),c(()=>e.value=s()),e})(),(()=>{var e=fi();e.$$keydown=v;var t=d;return typeof t==`function`?M(t,e):d=e,j(e,D(n,{get each(){return p()},children:e=>(()=>{var t=hi(),n=t.firstChild;return t.$$click=()=>g(e.zone),j(n,()=>e.label),j(t,D(i,{get when(){return e.selected},get children(){return mi()}}),null),c(()=>A(t,`aria-selected`,e.selected)),t})()})),c(()=>A(e,`aria-label`,k(`timezone.title`))),e})(),D(i,{get when(){return p().length===0},get children(){var e=pi();return j(e,()=>k(`timezone.empty`,{query:s().trim()})),e}})]}})}})]}O([`click`,`input`,`keydown`]);var yi=`/wurk-assets/assets/wurk-logo-Vy3xW4K0.png`,bi=C(`<div class=nav-overlay style=position:fixed;inset:0;background:var(--scrim);z-index:99;display:none>`),xi=C(`<img alt=Wurk style="height:36px;width:auto;display:block;flex:none;filter:drop-shadow(0 2px 6px var(--shadow-color))">`),Si=C(`<span style="font-family:var(--font-mono);font-size:10px;font-weight:500;letter-spacing:0.02em;color:var(--text-muted);background:var(--surface-strong);border:1px solid var(--border);border-radius:5px;padding:0.05rem 0.3rem">v`),Ci=C(`<span class=nav-label style=display:flex;flex-direction:column;line-height:1.15><span style=display:inline-flex;align-items:baseline;gap:0.4rem><span style=font-size:18px;font-weight:700;letter-spacing:-0.02em;color:var(--text-bright)>Wurk</span></span><span style=font-family:var(--font-mono);font-size:9px;font-weight:500;letter-spacing:0.1em;text-transform:uppercase;color:var(--text-muted);margin-top:2px;display:inline-flex;align-items:center;gap:5px><span class=live-dot style=width:6px;height:6px>`),wi=C(`<li aria-hidden=true style="padding:0.5rem 0.95rem 0.2rem;margin-top:0.4rem"><div style=height:1px;background:var(--border);margin-bottom:0.45rem></div><span class=nav-label style=font-size:10px;font-weight:600;letter-spacing:0.06em;text-transform:uppercase;color:var(--text-muted)>`),Ti=C(`<nav class=wurk-nav style="position:fixed;top:0;inset-inline-start:0;bottom:0;background:var(--surface);border-inline-end:1px solid var(--border);display:flex;flex-direction:column;z-index:100;overflow-y:auto;overflow-x:hidden"><div class=nav-brand-wrap style="padding:1.25rem 1rem 0.75rem"></div><div style="height:1px;background:var(--border);margin:0 1rem 0.5rem"></div><ul style=list-style:none;flex:1></ul><div style="height:1px;background:var(--border);margin:0.5rem 1rem 0"></div><button type=button class=nav-collapse-toggle style="display:flex;align-items:center;gap:0.625rem;width:calc(100% - 16px);padding:0.5rem 0.85rem;margin:4px 8px;border-radius:8px;border:none;background:transparent;color:var(--text-muted);font-size:13px;cursor:pointer;font:inherit"><i aria-hidden=true></i><span class=nav-label></span></button><div style="height:1px;background:var(--border);margin:0.5rem 1rem"></div><a href=https://github.com/developerz-ai/wurk target=_blank rel="noopener noreferrer"class=wurk-navlink style="display:flex;align-items:center;gap:0.625rem;padding:0.5rem 0.85rem;margin:2px 8px 0.85rem;border-radius:8px;color:var(--text-muted);font-size:13px;text-decoration:none;transition:background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard)"><i class="fa-brands fa-github"style=font-size:16px;width:20px;text-align:center;flex:none></i><span class=nav-label>GitHub`),Ei=C(`<style>
3
+ .wurk-nav { width: var(--nav-width); transition: width var(--dur-page) var(--ease-emphasized); }
4
+ /* Base nav-item chrome (was an inline style function under React; Solid's
5
+ &lt;A> toggles the .active class, so the active look lives in CSS now). */
6
+ .wurk-navlink {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: 0.625rem;
10
+ padding: 0.5rem 0.85rem;
11
+ border-radius: 8px;
12
+ margin: 2px 8px;
13
+ color: var(--text);
14
+ background: transparent;
15
+ box-shadow: none;
16
+ font-weight: 400;
17
+ font-size: 14px;
18
+ text-decoration: none;
19
+ transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
20
+ }
21
+ /* Text stays white for every item; the active one is marked by a subtle
22
+ dark raised pill + hairline, not a bright white box. */
23
+ .wurk-navlink.active {
24
+ color: var(--accent);
25
+ background: var(--surface-strong);
26
+ box-shadow: inset 0 0 0 1px var(--border);
27
+ font-weight: 600;
28
+ }
29
+ .wurk-navlink:hover {
30
+ background: var(--surface-hover) !important;
31
+ color: var(--accent) !important;
32
+ text-decoration: none !important;
33
+ }
34
+ /* The collapse toggle is a control, not a nav item — it only shifts
35
+ colour on hover, no filled pill/active box. */
36
+ .nav-collapse-toggle:hover { color: var(--text) !important; }
37
+ .nav-label { white-space: nowrap; }
38
+ .wurk-navlink__icon { width: 24px; font-size: 18px; text-align: center; flex: none; transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard); }
39
+ /* Subtle lift on hover so the nav feels reactive. */
40
+ .wurk-navlink:hover .wurk-navlink__icon { transform: scale(1.12); }
41
+ @media (prefers-reduced-motion: reduce) {
42
+ .wurk-navlink__icon { transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard); }
43
+ .wurk-navlink:hover .wurk-navlink__icon { transform: none; }
44
+ }
45
+ @media (max-width: 767px) {
46
+ .wurk-nav {
47
+ transform: translateX(-100%);
48
+ transition: transform var(--dur-slow) var(--ease-standard);
49
+ }
50
+ .wurk-nav--open {
51
+ transform: translateX(0);
52
+ }
53
+ /* RTL: the rail is pinned to the right edge, so it slides off to the
54
+ right when closed. */
55
+ [dir="rtl"] .wurk-nav {
56
+ transform: translateX(100%);
57
+ }
58
+ [dir="rtl"] .wurk-nav--open {
59
+ transform: translateX(0);
60
+ }
61
+ .nav-overlay {
62
+ display: block !important;
63
+ }
64
+ /* The collapse control is desktop-only; on mobile the nav is a
65
+ full-width drawer toggled by the hamburger. */
66
+ .nav-collapse-toggle { display: none !important; }
67
+ }
68
+ /* Desktop: a fixed-width rail the user pins open or collapsed (icons only)
69
+ via the toggle button — no hover-driven movement. The width change
70
+ animates; prefers-reduced-motion drops the animation. */
71
+ @media (min-width: 768px) {
72
+ .wurk-nav { transform: none !important; }
73
+ .wurk-nav--collapsed { width: var(--nav-rail); }
74
+ /* !important: the brand wordmark span carries an inline display:flex,
75
+ which a plain class rule can't beat — without this the "Wurk /
76
+ System Status" text stays rendered in the 64px rail and gets clipped. */
77
+ .wurk-nav--collapsed .nav-label { display: none !important; }
78
+ /* Collapsed: center each icon. The glyph lives in a FIXED 38px round
79
+ container at all times, so idle → hover → active only swaps its
80
+ background colour, never its size — the icon never shifts when you
81
+ click it, and the highlight is always a circle, never a square link
82
+ box. Tight link padding keeps the icons from drifting apart. */
83
+ /* !important: the &lt;A> carries an inline padding (0.5rem 0.85rem)
84
+ that outranks any class rule. Zero it in the rail so the fixed-size
85
+ round glyph container — not link padding — defines the footprint;
86
+ the horizontal inline padding would otherwise cramp the circle in
87
+ the 64px rail and make it shift when the active background appears.
88
+ width/margin pin each control to a fixed rail-width box anchored at
89
+ the nav's start edge, so the centred glyph sits on a constant x
90
+ (rail/2). Without this, justify-content:center re-centres against the
91
+ *animating* nav width (248→64px), so the icons leap right on collapse
92
+ and glide back — a visible jump (#272 follow-up). */
93
+ .wurk-nav--collapsed .wurk-navlink,
94
+ .wurk-nav--collapsed .nav-collapse-toggle {
95
+ justify-content: center;
96
+ width: var(--nav-rail) !important;
97
+ margin-inline: 0 !important;
98
+ padding: 0 !important;
99
+ }
100
+ .wurk-nav--collapsed .wurk-navlink__icon {
101
+ display: grid;
102
+ place-items: center;
103
+ width: 36px;
104
+ height: 36px;
105
+ border-radius: 50%;
106
+ }
107
+ /* The link/button never fills — the round glyph container carries the
108
+ highlight instead of a boxy pill. */
109
+ .wurk-nav--collapsed .wurk-navlink:hover,
110
+ .wurk-nav--collapsed .wurk-navlink.active {
111
+ background: transparent !important;
112
+ box-shadow: none !important;
113
+ }
114
+ .wurk-nav--collapsed .wurk-navlink:hover .wurk-navlink__icon {
115
+ background: var(--surface-hover);
116
+ color: var(--accent);
117
+ }
118
+ .wurk-nav--collapsed .wurk-navlink.active .wurk-navlink__icon {
119
+ background: var(--surface-strong);
120
+ box-shadow: inset 0 0 0 1px var(--border);
121
+ color: var(--accent);
122
+ }
123
+ /* Collapsed: drop the wordmark and show just the logo mark, centered
124
+ with balanced padding so it sits squarely in the rail instead of
125
+ hugging the top-left. */
126
+ /* !important: the wrap carries an inline padding (1.25rem 1rem 0.75rem)
127
+ whose 1rem sides a plain class rule can't beat — leaving it in place
128
+ offsets the fixed-width brand box below by 16px, so the centred logo
129
+ lands right-of-centre in the rail. Zero the sides so the box anchors
130
+ at the nav's start edge and the logo sits on the rail mid-line. */
131
+ .wurk-nav--collapsed .nav-brand-wrap { padding: 0.9rem 0 !important; }
132
+ /* Same fixed rail-width box as the nav controls above, so the logo
133
+ centres on the constant rail mid-line instead of leaping right
134
+ against the animating nav width on collapse. */
135
+ .wurk-nav--collapsed .nav-brand-wrap a { justify-content: center; gap: 0; width: var(--nav-rail); }
136
+ .wurk-nav--collapsed .nav-brand-wrap img { height: 38px !important; }
137
+ }
138
+ @media (min-width: 768px) and (prefers-reduced-motion: reduce) {
139
+ .wurk-nav { transition: none; }
140
+ }
141
+ `),Di=C(`<i aria-hidden=true>`),Oi=C(`<span class=nav-label>`),ki=C(`<li>`),Ai=C(`<i class="fa-solid fa-puzzle-piece wurk-navlink__icon"aria-hidden=true>`),ji=[{to:`/`,label:k(`nav.dashboard`),icon:`fa-gauge-high`,end:!0},{to:`/queues`,label:k(`nav.queues`),icon:`fa-layer-group`,end:!1},{to:`/retries`,label:k(`nav.retries`),icon:`fa-rotate-right`,end:!1},{to:`/scheduled`,label:k(`nav.scheduled`),icon:`fa-clock`,end:!1},{to:`/dead`,label:k(`nav.dead`),icon:`fa-skull`,end:!1},{to:`/busy`,label:k(`nav.busy`),icon:`fa-gears`,end:!1},{to:`/batches`,label:k(`nav.batches`),icon:`fa-table-cells-large`,end:!1},{to:`/flows`,label:k(`nav.flows`),icon:`fa-diagram-project`,end:!1},{to:`/limiters`,label:k(`nav.limiters`),icon:`fa-gauge`,end:!1},{to:`/cron`,label:k(`nav.cron`),icon:`fa-stopwatch`,end:!1},{to:`/metrics`,label:k(`nav.metrics`),icon:`fa-chart-line`,end:!1},{to:`/profiles`,label:k(`nav.profiles`),icon:`fa-fire`,end:!1},{to:`/search`,label:k(`nav.search`),icon:`fa-magnifying-glass`,end:!1}];function Mi(e){let t=tr(),r=()=>t.data?.custom_tabs??[],{connected:a}=wr(),o=()=>e.onClose();return[D(i,{get when(){return e.open},get children(){var e=bi();return e.$$click=o,e}}),(()=>{var s=Ti(),l=s.firstChild,u=l.nextSibling.nextSibling,d=u.nextSibling.nextSibling,f=d.firstChild,p=f.nextSibling,m=d.nextSibling;return m.nextSibling.firstChild,j(l,D(mt,{href:`/`,end:!0,onClick:o,get"aria-label"(){return k(`nav.home_label`)},style:{color:`var(--text)`,"text-decoration":`none`,display:`flex`,"align-items":`center`,gap:`0.6rem`},get children(){return[(()=>{var e=xi();return A(e,`src`,yi),e})(),(()=>{var e=Ci(),n=e.firstChild;n.firstChild;var r=n.nextSibling,o=r.firstChild;return j(n,D(i,{get when(){return t.data?.version},get children(){var e=Si();return e.firstChild,j(e,()=>t.data?.version,null),e}}),null),j(r,(()=>{var e=ne(()=>!!a());return()=>e()?k(`nav.status_active`):k(`nav.status_inactive`)})(),null),c(e=>ce(o,`background`,a()?void 0:`var(--text-muted)`)),e})()]}})),j(u,D(n,{each:ji,children:e=>(()=>{var t=ki();return j(t,D(mt,{get href(){return e.to},get end(){return e.end},onClick:o,get title(){return e.label},class:`wurk-navlink`,activeClass:`active`,get children(){return[(()=>{var t=Di();return c(()=>T(t,`fa-solid ${e.icon} wurk-navlink__icon`)),t})(),(()=>{var t=Oi();return j(t,()=>e.label),t})()]}})),t})()}),null),j(u,D(i,{get when(){return r().length>0},get children(){var e=wi(),t=e.firstChild.nextSibling;return j(t,()=>k(`nav.extensions`)),e}}),null),j(u,D(n,{get each(){return r()},children:e=>(()=>{var t=ki();return j(t,D(mt,{get href(){return`/ext/${e.path.replace(/\/+$/,``)}`},onClick:o,get title(){return e.name},class:`wurk-navlink`,activeClass:`active`,get children(){return[Ai(),(()=>{var t=Oi();return j(t,()=>e.name),t})()]}})),t})()}),null),d.$$click=()=>e.onToggleCollapse(),j(p,()=>k(`nav.collapse`)),j(s,D(Mr,{}),m),j(s,D(vi,{}),m),j(s,D(Yr,{}),m),c(t=>{var n=!!e.open,r=!!e.collapsed,i=e.collapsed?k(`nav.expand`):k(`nav.collapse`),a=!e.collapsed,o=e.collapsed?k(`nav.expand`):k(`nav.collapse`),c=`fa-solid ${e.collapsed?`fa-angles-right`:`fa-angles-left`} wurk-navlink__icon`;return n!==t.e&&s.classList.toggle(`wurk-nav--open`,t.e=n),r!==t.t&&s.classList.toggle(`wurk-nav--collapsed`,t.t=r),i!==t.a&&A(d,`aria-label`,t.a=i),a!==t.o&&A(d,`aria-expanded`,t.o=a),o!==t.i&&A(d,`title`,t.i=o),c!==t.n&&T(f,t.n=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),s})(),Ei()]}O([`click`]);var Ni=C(`<span aria-hidden=true>`),Pi=C(`<span aria-hidden=true class="skeleton skeleton--text">`),Fi=C(`<div class=skeleton-table role=status aria-busy=true>`),Ii=C(`<div class=skeleton-table__row>`),Li=C(`<span class="skeleton skeleton-table__cell"aria-hidden=true>`),Ri=C(`<div class=skeleton-cards role=status aria-busy=true>`),zi=C(`<div class=skeleton-card>`),Bi=C(`<div role=status aria-busy=true><div class=page-header style=animation:none><div class=skeleton-stack style=flex:1;max-width:18rem>`),Vi=e=>typeof e==`number`?`${e}px`:e;function Hi(e){return(()=>{var t=Ni();return c(n=>{var r=`skeleton${e.circle?` skeleton--circle`:``}${e.class?` ${e.class}`:``}`,i={width:Vi(e.width),height:Vi(e.height),"border-radius":Vi(e.radius),...e.style};return r!==n.e&&T(t,n.e=r),n.t=ie(t,i,n.t),n},{e:void 0,t:void 0}),t})()}function Ui(e){return(()=>{var t=Pi();return c(n=>ie(t,{width:Vi(e.width??`100%`),...e.style},n)),t})()}function Wi(e){return(()=>{var t=Fi();return j(t,D(me,{get each(){return Array.from({length:e.rows??6})},children:()=>(()=>{var t=Ii();return j(t,D(me,{get each(){return Array.from({length:e.cols??4})},children:()=>Li()})),t})()})),c(()=>A(t,`aria-label`,k(`common.loading`))),t})()}function Gi(e){return(()=>{var t=Ri();return j(t,D(me,{get each(){return Array.from({length:e.count??4})},children:()=>(()=>{var e=zi();return j(e,D(Ui,{width:`45%`}),null),j(e,D(Hi,{height:`1.6rem`,width:`60%`}),null),e})()})),c(()=>A(t,`aria-label`,k(`common.loading`))),t})()}function Ki(){return(()=>{var e=Bi(),t=e.firstChild,n=t.firstChild;return j(t,D(Hi,{width:`2.75rem`,height:`2.75rem`,radius:`var(--radius)`}),n),j(n,D(Hi,{height:`1.4rem`,width:`45%`}),null),j(n,D(Ui,{width:`70%`}),null),j(e,D(Wi,{rows:8,cols:4}),null),c(()=>A(e,`aria-label`,k(`common.loading`))),e})()}var qi=C(`<div class=empty-state role=alert><div style=font-size:15px;font-weight:600;color:var(--text);margin-bottom:0.4rem></div><p style="max-width:26rem;margin:0 auto 1.1rem;font-size:13px"></p><button class="btn btn-accent">`);function Ji(e){return D(_,{fallback:e=>(console.error(`Dashboard route error:`,e),(()=>{var e=qi(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling;return j(t,()=>k(`common.load_failed`)),j(n,()=>k(`common.load_failed_hint`)),r.$$click=()=>window.location.reload(),j(r,()=>k(`common.reload`)),e})()),get children(){return e.children}})}O([`click`]);var Yi=C(`<div class=toasts role=region aria-live=polite>`),Xi=C(`<div role=alert><i aria-hidden=true></i><span class=toast__msg></span><button type=button class=toast__close><i class="fa-solid fa-xmark"aria-hidden=true>`),[Zi,Qi]=N([]),$i=6e3,ea=5,ta=0;function na(e,t=`error`){let n=ta+=1,r=typeof window<`u`?window.setTimeout(()=>ra(n),$i):void 0;return Qi(i=>{let a=[...i,{id:n,kind:t,message:e,timer:r}];if(a.length<=ea)return a;let o=a.slice(0,a.length-ea);for(let e of o)e.timer!==void 0&&window.clearTimeout(e.timer);return a.slice(a.length-ea)}),n}function ra(e){Qi(t=>{let n=t.find(t=>t.id===e);return n?.timer!==void 0&&window.clearTimeout(n.timer),t.filter(t=>t.id!==e)})}function ia(e){let t=e instanceof Xn?e.status:0;na(k(t===403?`toast.readonly`:t===404?`toast.gone`:t===503?`toast.unavailable`:`toast.failed`),`error`)}var aa={error:`fa-circle-exclamation`,success:`fa-circle-check`};function oa(){return(()=>{var e=Yi();return j(e,D(n,{get each(){return Zi()},children:e=>(()=>{var t=Xi(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling;return j(r,()=>e.message),i.$$click=()=>ra(e.id),c(r=>{var a=`toast toast--${e.kind}`,o=`fa-solid ${aa[e.kind]} toast__icon`,s=k(`toast.dismiss`);return a!==r.e&&T(t,r.e=a),o!==r.t&&T(n,r.t=o),s!==r.a&&A(i,`aria-label`,r.a=s),r},{e:void 0,t:void 0,a:void 0}),t})()})),c(()=>A(e,`aria-label`,k(`toast.region`))),e})()}O([`click`]);var sa=`modulepreload`,ca=function(e){return`/wurk-assets/`+e},la={},ua=function(e){return e.pathname.endsWith(`.css`)},da=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=ca(t,n);let r=s(t),i=ua(r);return da(la,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:sa,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},fa=C(`<div role=status style="background:var(--warning);color:var(--color-warning-content);text-align:center;padding:0.5rem 1rem;font-weight:600;font-size:13px;letter-spacing:0.01em;border-radius:8px;margin-bottom:1.75rem">`),pa=C(`<div style=display:flex;min-height:100vh><button class=hamburger style=position:fixed;top:12px;inset-inline-start:12px;z-index:200><i class="fa-solid fa-bars"></i></button><main class=main-content style=flex:1;padding:1.5rem>`),ma=v(()=>$(()=>import(`./Dashboard-C8VOE2S7.js`),__vite__mapDeps([0,1,2,3,4]))),ha=v(()=>$(()=>import(`./Queues-DUCQ_3St.js`),__vite__mapDeps([5,1,2,6,7,3,8,9]))),ga=v(()=>$(()=>import(`./Retries-Dc2RFuTf.js`),__vite__mapDeps([10,1,2,6,7,3,8,9,11]))),_a=v(()=>$(()=>import(`./Scheduled-B8zOKCLC.js`),__vite__mapDeps([12,1,2,6,7,3,8,9,11]))),va=v(()=>$(()=>import(`./Dead-Dse2YEbZ.js`),__vite__mapDeps([13,1,2,6,7,3,8,9,11]))),ya=v(()=>$(()=>import(`./Busy-2rxcLJMq.js`),__vite__mapDeps([14,1,2,3,8]))),ba=v(()=>$(()=>import(`./Batches-NTgqSlvD.js`),__vite__mapDeps([15,1,2,6,7,3]))),xa=v(()=>$(()=>import(`./BatchDetail-DPmg-hle.js`),__vite__mapDeps([16,1,2]))),Sa=v(()=>$(()=>import(`./Flows-BgKTlYwI.js`),__vite__mapDeps([17,1,2,6,7,3,18]))),Ca=v(()=>$(()=>import(`./FlowDetail-BWddOtgf.js`),__vite__mapDeps([19,1,2,18]))),wa=v(()=>$(()=>import(`./Limiters-DeUkfbcg.js`),__vite__mapDeps([20,1,2,6,7,3]))),Ta=v(()=>$(()=>import(`./Cron-BFpJgKYb.js`),__vite__mapDeps([21,1,2,7,3]))),Ea=v(()=>$(()=>import(`./Metrics-DzmAgBFG.js`),__vite__mapDeps([22,1,2,3,4]))),Da=v(()=>$(()=>import(`./Profiles-CI2i2tl8.js`),__vite__mapDeps([23,1,2]))),Oa=v(()=>$(()=>import(`./Search-x0eS-V-U.js`),__vite__mapDeps([24,1,2,3,8]))),ka=v(()=>$(()=>import(`./Extension-BIc2c1zG.js`),__vite__mapDeps([25,1,3]))),Aa=v(()=>$(()=>import(`./NotFound-CQLLXIfa.js`),__vite__mapDeps([26,1,3]))),ja=new Jn({defaultOptions:{queries:{staleTime:5e3,retry:1}}});function Ma(){let e=tr();return D(i,{get when(){return e.data?.read_only},get children(){var t=fa();return j(t,()=>e.data?.read_only_message||k(`readonly.banner`)),t}})}var Na=`wurk-nav-collapsed`;function Pa(e){lr();let[t,n]=N(!1),[i,a]=N((()=>{try{return typeof localStorage<`u`&&localStorage.getItem(Na)===`1`}catch{return!1}})()),[o,s]=N(typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0);m(()=>{if(typeof window>`u`)return;let e=window.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(!e)return;let t=()=>s(e.matches);e.addEventListener(`change`,t),u(()=>e.removeEventListener(`change`,t))});let l=()=>a(e=>{let t=!e;try{localStorage.setItem(Na,t?`1`:`0`)}catch{}return t});return D(Bn,{client:ja,get children(){var a=pa(),s=a.firstChild,u=s.nextSibling;return s.$$click=()=>n(e=>!e),j(u,D(Ma,{}),null),j(u,D(Ji,{get children(){return D(r,{get fallback(){return D(Ki,{})},get children(){return e.children}})}}),null),j(a,D(Mi,{get open(){return t()},onClose:()=>n(!1),get collapsed(){return i()},onToggleCollapse:l}),null),j(a,D(oa,{}),null),c(e=>{var t=k(`nav.toggle`),n=i()?`var(--nav-rail)`:`var(--nav-width)`,r=o()?`none`:`margin var(--dur-page) var(--ease-emphasized)`;return t!==e.e&&A(s,`aria-label`,e.e=t),n!==e.t&&ce(u,`margin-inline-start`,e.t=n),r!==e.a&&ce(u,`transition`,e.a=r),e},{e:void 0,t:void 0,a:void 0}),a}})}function Fa(){return[D(L,{path:`/`,component:ma}),D(L,{path:`/queues`,component:ha}),D(L,{path:`/queues/:name`,component:ha}),D(L,{path:`/retries`,component:ga}),D(L,{path:`/retries/:key`,component:ga}),D(L,{path:`/scheduled`,component:_a}),D(L,{path:`/scheduled/:key`,component:_a}),D(L,{path:`/dead`,component:va}),D(L,{path:`/dead/:key`,component:va}),D(L,{path:`/morgue`,component:va}),D(L,{path:`/morgue/:key`,component:va}),D(L,{path:`/busy`,component:ya}),D(L,{path:`/batches`,component:ba}),D(L,{path:`/batches/:bid`,component:xa}),D(L,{path:`/flows`,component:Sa}),D(L,{path:`/flows/:fid`,component:Ca}),D(L,{path:`/limiters`,component:wa}),D(L,{path:`/cron`,component:Ta}),D(L,{path:`/metrics`,component:Ea}),D(L,{path:`/metrics/:klass`,component:Ea}),D(L,{path:`/profiles`,component:Da}),D(L,{path:`/search`,component:Oa}),D(L,{path:`/ext/:tab`,component:ka}),D(L,{path:`*`,component:Aa})]}function Ia(){return D(ft,{root:Pa,get base(){return Yn()},get children(){return D(Fa,{})}})}O([`click`]);var La=C(`<div style=padding:2rem;text-align:center;color:var(--text-muted);font-size:14px;line-height:1.6>`);pe(oe),Kr();var Ra=window.self!==window.top&&new URLSearchParams(window.location.search).has(`wurk_ext_embed`),za=document.getElementById(`wurk-root`);za&&re(()=>Ra?(()=>{var e=La();return j(e,()=>k(`extension.notRendered`)),e})():D(Ia,{}),za);export{Ue as C,He as S,qn as _,Wi as a,mt as b,wr as c,er as d,$n as f,Rn as g,Yn as h,Gi as i,sr as l,Qn as m,na as n,ci as o,Zn as p,Hi as r,ti as s,ia as t,tr as u,Kn as v,Be as x,Yt as y};