conductor-remote 1.106.2 → 1.106.3
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.
|
@@ -10,7 +10,7 @@ Error generating stack: `+c.message+`
|
|
|
10
10
|
|
|
11
11
|
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let g=Fr(),p;if(n){let k=typeof n=="string"?ks(n):n;Vt(f==="/"||k.pathname?.startsWith(f),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${k.pathname}" was given in the \`location\` prop.`),p=k}else p=g;let y=p.pathname||"/",b=y;if(f!=="/"){let k=f.replace(/^\//,"").split("/");b="/"+y.replace(/^\//,"").split("/").slice(k.length).join("/")}let C=r&&r.state.matches.length?r.state.matches.map(k=>Object.assign(k,{route:r.manifest[k.route.id]||k.route})):n8(e,{pathname:b});Br(h||C!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),Br(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=Ob(C&&C.map(k=>Object.assign({},k,{params:Object.assign({},u,k.params),pathname:Tr([f,i.encodeLocation?i.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?f:Tr([f,i.encodeLocation?i.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),l,r);return n&&v?D.createElement(eo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...p},navigationType:"POP"}},v):v}function Mb(){let e=Ub(),n=fb(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:o},"ErrorBoundary")," or"," ",D.createElement("code",{style:o},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},n),r?D.createElement("pre",{style:l},r):null,u)}var jb=D.createElement(Mb,null),E8=class extends D.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=kb(e.digest);r&&(e=r)}let n=e!==void 0?D.createElement(wr.Provider,{value:this.props.routeContext},D.createElement(Gd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?D.createElement(Tb,{error:e},n):n}};E8.contextType=d8;var kx=new WeakMap;function Tb({children:e,error:n}){let{basename:r}=D.useContext(dr);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let i=Ab(n.digest);if(i){let l=kx.get(n);if(l)throw l;let o=u8(i.location,r),u=o.absoluteURL||o.to;if(gb(u))throw new Error("Invalid redirect location");if(c8&&!kx.get(n))if(o.isExternal||i.reloadDocument)window.location.href=u;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:i.replace}));throw kx.set(n,d),d}return D.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}function Rb({routeContext:e,match:n,children:r}){let i=D.useContext(Bs);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),D.createElement(wr.Provider,{value:e},r)}function Ob(e,n=[],r){let i=r?.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let l=e,o=i?.errors;if(o!=null){let g=l.findIndex(p=>p.route.id&&o?.[p.route.id]!==void 0);Vt(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),l=l.slice(0,Math.min(l.length,g+1))}let u=!1,d=-1;if(r&&i){u=i.renderFallback;for(let g=0;g<l.length;g++){let p=l[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=g),p.route.id){let{loaderData:y,errors:b}=i,C=p.route.loader&&!y.hasOwnProperty(p.route.id)&&(!b||b[p.route.id]===void 0);if(p.route.lazy||C){r.isStatic&&(u=!0),d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}}let f=r?.onError,h=i&&f?(g,p)=>{f(g,{location:i.location,params:i.matches?.[0]?.params??{},pattern:hb(i.matches),errorInfo:p})}:void 0;return l.reduceRight((g,p,y)=>{let b,C=!1,v=null,k=null;i&&(b=o&&p.route.id?o[p.route.id]:void 0,v=p.route.errorElement||jb,u&&(d<0&&y===0?(y8("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,k=null):d===y&&(C=!0,k=p.route.hydrateFallbackElement||null)));let B=n.concat(l.slice(0,y+1)),_=()=>{let S;return b?S=v:C?S=k:p.route.Component?S=D.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=g,D.createElement(Rb,{match:p,routeContext:{outlet:g,matches:B,isDataRoute:i!=null},children:S})};return i&&(p.route.ErrorBoundary||p.route.errorElement||y===0)?D.createElement(E8,{location:i.location,revalidation:i.revalidation,component:v,error:b,children:_(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:h}):_()},null)}function Vd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zb(e){let n=D.useContext(Bs);return Vt(n,Vd(e)),n}function Lb(e){let n=D.useContext(rc);return Vt(n,Vd(e)),n}function Pb(e){let n=D.useContext(wr);return Vt(n,Vd(e)),n}function Qd(e){let n=Pb(e),r=n.matches[n.matches.length-1];return Vt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ib(){return Qd("useRouteId")}function Ub(){let e=D.useContext(Gd),n=Lb("useRouteError"),r=Qd("useRouteError");return e!==void 0?e:n.errors?.[r]}function Hb(){let{router:e}=zb("useNavigate"),n=Qd("useNavigate"),r=D.useRef(!1);return m8(()=>{r.current=!0}),D.useCallback(async(l,o={})=>{Br(r.current,p8),r.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:n,...o}))},[e,n])}var Gm={};function y8(e,n,r){!n&&!Gm[e]&&(Gm[e]=!0,Br(!1,r))}D.memo($b);function $b({routes:e,manifest:n,future:r,state:i,isStatic:l,onError:o}){return g8(e,void 0,{manifest:n,state:i,isStatic:l,onError:o})}function qb({to:e,replace:n,state:r,relative:i}){Vt(Ni(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=D.useContext(dr);Br(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=D.useContext(wr),{pathname:u}=Fr(),d=_i(),f=nc(e,qd(o),u,i==="path"),h=JSON.stringify(f);return D.useEffect(()=>{d(JSON.parse(h),{replace:n,state:r,relative:i})},[d,h,i,n,r]),null}function Gb(e){return Sb(e.context)}function Rl(e){Vt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Vb({basename:e="/",children:n=null,location:r,navigationType:i="POP",navigator:l,static:o=!1,useTransitions:u}){Vt(!Ni(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=D.useMemo(()=>({basename:d,navigator:l,static:o,useTransitions:u,future:{}}),[d,l,o,u]);typeof r=="string"&&(r=ks(r));let{pathname:h="/",search:g="",hash:p="",state:y=null,key:b="default",mask:C}=r,v=D.useMemo(()=>{let k=pa(h,d);return k==null?null:{location:{pathname:k,search:g,hash:p,state:y,key:b,mask:C},navigationType:i}},[d,h,g,p,y,b,i,C]);return Br(v!=null,`<Router basename="${d}"> is not able to match the URL "${h}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:D.createElement(dr.Provider,{value:f},D.createElement(eo.Provider,{children:n,value:v}))}function Qb({children:e,location:n}){return _b(cd(e),n)}function cd(e,n=[]){let r=[];return D.Children.forEach(e,(i,l)=>{if(!D.isValidElement(i))return;let o=[...n,l];if(i.type===D.Fragment){r.push.apply(r,cd(i.props.children,o));return}Vt(i.type===Rl,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Vt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||o.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=cd(i.props.children,o)),r.push(u)}),r}var I0="get",U0="application/x-www-form-urlencoded";function ac(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Yb(e){return ac(e)&&e.tagName.toLowerCase()==="button"}function Kb(e){return ac(e)&&e.tagName.toLowerCase()==="form"}function Xb(e){return ac(e)&&e.tagName.toLowerCase()==="input"}function Zb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wb(e,n){return e.button===0&&(!n||n==="_self")&&!Zb(e)}function ud(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,r)=>{let i=e[r];return n.concat(Array.isArray(i)?i.map(l=>[r,l]):[[r,i]])},[]))}function Jb(e,n){let r=ud(e);return n&&n.forEach((i,l)=>{r.has(l)||n.getAll(l).forEach(o=>{r.append(l,o)})}),r}var D0=null;function e7(){if(D0===null)try{new FormData(document.createElement("form"),0),D0=!1}catch{D0=!0}return D0}var t7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Bx(e){return e!=null&&!t7.has(e)?(Br(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${U0}"`),null):e}function n7(e,n){let r,i,l,o,u;if(Kb(e)){let d=e.getAttribute("action");i=d?pa(d,n):null,r=e.getAttribute("method")||I0,l=Bx(e.getAttribute("enctype"))||U0,o=new FormData(e)}else if(Yb(e)||Xb(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(i=f?pa(f,n):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||I0,l=Bx(e.getAttribute("formenctype"))||Bx(d.getAttribute("enctype"))||U0,o=new FormData(d,e),!e7()){let{name:h,type:g,value:p}=e;if(g==="image"){let y=h?`${h}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else h&&o.append(h,p)}}else{if(ac(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=I0,i=null,l=U0,u=e}return o&&l==="text/plain"&&(u=o,o=void 0),{action:i,method:r.toLowerCase(),encType:l,formData:o,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yd(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function b8(e,n,r,i){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${i}`:l.pathname=`${l.pathname}.${i}`:l.pathname==="/"?l.pathname=`_root.${i}`:n&&pa(l.pathname,n)==="/"?l.pathname=`${Y0(n)}/_root.${i}`:l.pathname=`${Y0(l.pathname)}.${i}`,l}async function r7(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function a7(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function i7(e,n,r){let i=await Promise.all(e.map(async l=>{let o=n.routes[l.route.id];if(o){let u=await r7(o,r);return u.links?u.links():[]}return[]}));return c7(i.flat(1).filter(a7).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Vm(e,n,r,i,l,o){let u=(f,h)=>r[h]?f.route.id!==r[h].route.id:!0,d=(f,h)=>r[h].pathname!==f.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==f.params["*"];return o==="assets"?n.filter((f,h)=>u(f,h)||d(f,h)):o==="data"?n.filter((f,h)=>{let g=i.routes[f.route.id];if(!g||!g.hasLoader)return!1;if(u(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let p=f.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function s7(e,n,{includeHydrateFallback:r}={}){return l7(e.map(i=>{let l=n.routes[i.route.id];if(!l)return[];let o=[l.module];return l.clientActionModule&&(o=o.concat(l.clientActionModule)),l.clientLoaderModule&&(o=o.concat(l.clientLoaderModule)),r&&l.hydrateFallbackModule&&(o=o.concat(l.hydrateFallbackModule)),l.imports&&(o=o.concat(l.imports)),o}).flat(1))}function l7(e){return[...new Set(e)]}function o7(e){let n={},r=Object.keys(e).sort();for(let i of r)n[i]=e[i];return n}function c7(e,n){let r=new Set;return new Set(n),e.reduce((i,l)=>{let o=JSON.stringify(o7(l));return r.has(o)||(r.add(o),i.push({key:o,link:l})),i},[])}function Kd(){let e=D.useContext(Bs);return Yd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function u7(){let e=D.useContext(rc);return Yd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Xd=D.createContext(void 0);Xd.displayName="FrameworkContext";function ic(){let e=D.useContext(Xd);return Yd(e,"You must render this element inside a <HydratedRouter> element"),e}function x7(e,n){let r=D.useContext(Xd),[i,l]=D.useState(!1),[o,u]=D.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:g,onTouchStart:p}=n,y=D.useRef(null);D.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let v=B=>{B.forEach(_=>{u(_.isIntersecting)})},k=new IntersectionObserver(v,{threshold:.5});return y.current&&k.observe(y.current),()=>{k.disconnect()}}},[e]),D.useEffect(()=>{if(i){let v=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(v)}}},[i]);let b=()=>{l(!0)},C=()=>{l(!1),u(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Bl(d,b),onBlur:Bl(f,C),onMouseEnter:Bl(h,b),onMouseLeave:Bl(g,C),onTouchStart:Bl(p,b)}]:[!1,y,{}]}function Bl(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function d7({page:e,...n}){let r=Eb(),{nonce:i}=ic(),{router:l}=Kd(),o=D.useMemo(()=>n8(l.routes,e,l.basename),[l.routes,e,l.basename]);return o?(n.nonce==null&&i&&(n={...n,nonce:i}),r?D.createElement(h7,{page:e,matches:o,...n}):D.createElement(p7,{page:e,matches:o,...n})):null}function f7(e){let{manifest:n,routeModules:r}=ic(),[i,l]=D.useState([]);return D.useEffect(()=>{let o=!1;return i7(e,n,r).then(u=>{o||l(u)}),()=>{o=!0}},[e,n,r]),i}function h7({page:e,matches:n,...r}){let i=Fr(),{future:l}=ic(),{basename:o}=Kd(),u=D.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let d=b8(e,o,l.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let g of n)typeof g.route.shouldRevalidate=="function"?f=!0:h.push(g.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[o,l.v8_trailingSlashAwareDataRequests,e,i,n]);return D.createElement(D.Fragment,null,u.map(d=>D.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...r})))}function p7({page:e,matches:n,...r}){let i=Fr(),{future:l,manifest:o,routeModules:u}=ic(),{basename:d}=Kd(),{loaderData:f,matches:h}=u7(),g=D.useMemo(()=>Vm(e,n,h,o,i,"data"),[e,n,h,o,i]),p=D.useMemo(()=>Vm(e,n,h,o,i,"assets"),[e,n,h,o,i]),y=D.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let v=new Set,k=!1;if(n.forEach(_=>{let S=o.routes[_.route.id];!S||!S.hasLoader||(!g.some(M=>M.route.id===_.route.id)&&_.route.id in f&&u[_.route.id]?.shouldRevalidate||S.hasClientLoader?k=!0:v.add(_.route.id))}),v.size===0)return[];let B=b8(e,d,l.v8_trailingSlashAwareDataRequests,"data");return k&&v.size>0&&B.searchParams.set("_routes",n.filter(_=>v.has(_.route.id)).map(_=>_.route.id).join(",")),[B.pathname+B.search]},[d,l.v8_trailingSlashAwareDataRequests,f,i,o,g,n,e,u]),b=D.useMemo(()=>s7(p,o),[p,o]),C=f7(p);return D.createElement(D.Fragment,null,y.map(v=>D.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...r})),b.map(v=>D.createElement("link",{key:v,rel:"modulepreload",href:v,...r})),C.map(({key:v,link:k})=>D.createElement("link",{key:v,nonce:r.nonce,...k,crossOrigin:k.crossOrigin??r.crossOrigin})))}function m7(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var g7=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{g7&&(window.__reactRouterVersion="7.18.1")}catch{}function E7({basename:e,children:n,useTransitions:r,window:i}){let l=D.useRef();l.current==null&&(l.current=G4({window:i,v5Compat:!0}));let o=l.current,[u,d]=D.useState({action:o.action,location:o.location}),f=D.useCallback(h=>{r===!1?d(h):D.startTransition(()=>d(h))},[r]);return D.useLayoutEffect(()=>o.listen(f),[o,f]),D.createElement(Vb,{basename:e,children:n,location:u.location,navigationType:u.action,navigator:o,useTransitions:r})}var C8=D.forwardRef(function({onClick:n,discover:r="render",prefetch:i="none",relative:l,reloadDocument:o,replace:u,mask:d,state:f,target:h,to:g,preventScrollReset:p,viewTransition:y,defaultShouldRevalidate:b,...C},v){let{basename:k,navigator:B,useTransitions:_}=D.useContext(dr),S=typeof g=="string"&&$d.test(g),M=u8(g,k);g=M.to;let T=Bb(g,{relative:l}),w=Fr(),R=null;if(d){let Y=nc(d,[],w.mask?w.mask.pathname:"/",!0);k!=="/"&&(Y.pathname=Y.pathname==="/"?k:Tr([k,Y.pathname])),R=B.createHref(Y)}let[L,I,O]=x7(i,C),$=v7(g,{replace:u,mask:d,state:f,target:h,preventScrollReset:p,relative:l,viewTransition:y,defaultShouldRevalidate:b,useTransitions:_});function Q(Y){n&&n(Y),Y.defaultPrevented||$(Y)}let le=!(M.isExternal||o),W=D.createElement("a",{...C,...O,href:(le?R:void 0)||M.absoluteURL||T,onClick:le?Q:n,ref:m7(v,I),target:h,"data-discover":!S&&r==="render"?"true":void 0});return L&&!S?D.createElement(D.Fragment,null,W,D.createElement(d7,{page:T})):W});C8.displayName="Link";var y7=D.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:i="",end:l=!1,style:o,to:u,viewTransition:d,children:f,...h},g){let p=to(u,{relative:h.relative}),y=Fr(),b=D.useContext(rc),{navigator:C,basename:v}=D.useContext(dr),k=b!=null&&w7(p)&&d===!0,B=C.encodeLocation?C.encodeLocation(p).pathname:p.pathname,_=y.pathname,S=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(_=_.toLowerCase(),S=S?S.toLowerCase():null,B=B.toLowerCase()),S&&v&&(S=pa(S,v)||S);const M=B!=="/"&&B.endsWith("/")?B.length-1:B.length;let T=_===B||!l&&_.startsWith(B)&&_.charAt(M)==="/",w=S!=null&&(S===B||!l&&S.startsWith(B)&&S.charAt(B.length)==="/"),R={isActive:T,isPending:w,isTransitioning:k},L=T?n:void 0,I;typeof i=="function"?I=i(R):I=[i,T?"active":null,w?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(R):o;return D.createElement(C8,{...h,"aria-current":L,className:I,ref:g,style:O,to:u,viewTransition:d},typeof f=="function"?f(R):f)});y7.displayName="NavLink";var b7=D.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:i,replace:l,state:o,method:u=I0,action:d,onSubmit:f,relative:h,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:y,...b},C)=>{let{useTransitions:v}=D.useContext(dr),k=B7(),B=D7(d,{relative:h}),_=u.toLowerCase()==="get"?"get":"post",S=typeof d=="string"&&$d.test(d),M=T=>{if(f&&f(T),T.defaultPrevented)return;T.preventDefault();let w=T.nativeEvent.submitter,R=w?.getAttribute("formmethod")||u,L=()=>k(w||T.currentTarget,{fetcherKey:n,method:R,navigate:r,replace:l,state:o,relative:h,preventScrollReset:g,viewTransition:p,defaultShouldRevalidate:y});v&&r!==!1?D.startTransition(()=>L()):L()};return D.createElement("form",{ref:C,method:_,action:B,onSubmit:i?f:M,...b,"data-discover":!S&&e==="render"?"true":void 0})});b7.displayName="Form";function C7(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function v8(e){let n=D.useContext(Bs);return Vt(n,C7(e)),n}function v7(e,{target:n,replace:r,mask:i,state:l,preventScrollReset:o,relative:u,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let g=_i(),p=Fr(),y=to(e,{relative:u});return D.useCallback(b=>{if(Wb(b,n)){b.preventDefault();let C=r!==void 0?r:$l(p)===$l(y),v=()=>g(e,{replace:C,mask:i,state:l,preventScrollReset:o,relative:u,viewTransition:d,defaultShouldRevalidate:f});h?D.startTransition(()=>v()):v()}},[p,g,y,r,i,l,n,e,o,u,d,f,h])}function A8(e){Br(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=D.useRef(ud(e)),r=D.useRef(!1),i=Fr(),l=D.useMemo(()=>Jb(i.search,r.current?null:n.current),[i.search]),o=_i(),u=D.useCallback((d,f)=>{const h=ud(typeof d=="function"?d(new URLSearchParams(l)):d);r.current=!0,o("?"+h,f)},[o,l]);return[l,u]}var A7=0,k7=()=>`__${String(++A7)}__`;function B7(){let{router:e}=v8("useSubmit"),{basename:n}=D.useContext(dr),r=Ib(),i=e.fetch,l=e.navigate;return D.useCallback(async(o,u={})=>{let{action:d,method:f,encType:h,formData:g,body:p}=n7(o,n);if(u.navigate===!1){let y=u.fetcherKey||k7();await i(y,r,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:p,formMethod:u.method||f,formEncType:u.encType||h,flushSync:u.flushSync})}else await l(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:p,formMethod:u.method||f,formEncType:u.encType||h,replace:u.replace,state:u.state,fromRouteId:r,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,l,n,r])}function D7(e,{relative:n}={}){let{basename:r}=D.useContext(dr),i=D.useContext(wr);Vt(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),o={...to(e||".",{relative:n})},u=Fr();if(e==null){o.search=u.search;let d=new URLSearchParams(o.search),f=d.getAll("index");if(f.some(g=>g==="")){d.delete("index"),f.filter(p=>p).forEach(p=>d.append("index",p));let g=d.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&l.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Tr([r,o.pathname])),$l(o)}function w7(e,{relative:n}={}){let r=D.useContext(f8);Vt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=v8("useViewTransitionState"),l=to(e,{relative:n});if(!r.isTransitioning)return!1;let o=pa(r.currentLocation.pathname,i)||r.currentLocation.pathname,u=pa(r.nextLocation.pathname,i)||r.nextLocation.pathname;return ql(l.pathname,u)!=null||ql(l.pathname,o)!=null}const F7="modulepreload",S7=function(e){return"/"+e},Qm={},k8=function(n,r,i){let l=Promise.resolve();if(r&&r.length>0){let f=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");l=f(r.map(h=>{if(h=S7(h),h in Qm)return;Qm[h]=!0;const g=h.endsWith(".css"),p=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":F7,g||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),g)return new Promise((b,C)=>{y.addEventListener("load",b),y.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return l.then(u=>{for(const d of u||[])d.status==="rejected"&&o(d.reason);return n().catch(o)})};function N7(e={}){const{immediate:n=!1,onNeedReload:r,onNeedRefresh:i,onOfflineReady:l,onRegistered:o,onRegisteredSW:u,onRegisterError:d}=e;let f,h,g;const p=async(b=!0)=>{await h,g?.()};async function y(){if("serviceWorker"in navigator){if(f=await k8(async()=>{const{Workbox:b}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:b}},[]).then(({Workbox:b})=>new b("/sw.js",{scope:"/",type:"classic"})).catch(b=>{d?.(b)}),!f)return;g=()=>{f?.messageSkipWaiting()};{let b=!1;const C=()=>{b=!0,f?.addEventListener("controlling",v=>{v.isUpdate&&(r?r():window.location.reload())}),i?.()};f.addEventListener("installed",v=>{typeof v.isUpdate>"u"?typeof v.isExternal<"u"&&v.isExternal?C():!b&&l?.():v.isUpdate||l?.()}),f.addEventListener("waiting",C)}f.register({immediate:n}).then(b=>{u?u("/sw.js",b):o?.(b)}).catch(b=>{d?.(b)})}}return h=y(),p}function _7(e={}){const{immediate:n=!0,onNeedReload:r,onNeedRefresh:i,onOfflineReady:l,onRegistered:o,onRegisteredSW:u,onRegisterError:d}=e,[f,h]=D.useState(!1),[g,p]=D.useState(!1),[y]=D.useState(()=>N7({immediate:n,onNeedReload:r,onOfflineReady(){p(!0),l?.()},onNeedRefresh(){h(!0),i?.()},onRegistered:o,onRegisteredSW:u,onRegisterError:d}));return{needRefresh:[f,h],offlineReady:[g,p],updateServiceWorker:y}}const B8=(...e)=>e.filter((n,r,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===r).join(" ").trim();const M7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const j7=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,i)=>i?i.toUpperCase():r.toLowerCase());const Ym=e=>{const n=j7(e);return n.charAt(0).toUpperCase()+n.slice(1)};var T7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const R7=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1};const O7=D.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:l="",children:o,iconNode:u,...d},f)=>D.createElement("svg",{ref:f,...T7,width:n,height:n,stroke:e,strokeWidth:i?Number(r)*24/Number(n):r,className:B8("lucide",l),...!o&&!R7(d)&&{"aria-hidden":"true"},...d},[...u.map(([h,g])=>D.createElement(h,g)),...Array.isArray(o)?o:[o]]));const q=(e,n)=>{const r=D.forwardRef(({className:i,...l},o)=>D.createElement(O7,{ref:o,iconNode:n,className:B8(`lucide-${M7(Ym(e))}`,`lucide-${e}`,i),...l}));return r.displayName=Ym(e),r};const z7=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],L7=q("activity",z7);const P7=[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]],I7=q("anchor",P7);const U7=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]],H7=q("apple",U7);const $7=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"m9.5 17 5-5",key:"nakeu6"}],["path",{d:"m9.5 12 5 5",key:"1hccrj"}]],q7=q("archive-x",$7);const G7=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Zd=q("archive",G7);const V7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Q7=q("arrow-right",V7);const Y7=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],K7=q("arrow-up-right",Y7);const X7=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Z7=q("arrow-up",X7);const W7=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]],J7=q("atom",W7);const eC=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],tC=q("award",eC);const nC=[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]],rC=q("banknote",nC);const aC=[["path",{d:"M 22 14 L 22 10",key:"nqc4tb"}],["rect",{x:"2",y:"6",width:"16",height:"12",rx:"2",key:"13zb55"}]],iC=q("battery",aC);const sC=[["path",{d:"M17 11h1a3 3 0 0 1 0 6h-1",key:"1yp76v"}],["path",{d:"M9 12v6",key:"1u1cab"}],["path",{d:"M13 12v6",key:"1sugkk"}],["path",{d:"M14 7.5c-1 0-1.44.5-3 .5s-2-.5-3-.5-1.72.5-2.5.5a2.5 2.5 0 0 1 0-5c.78 0 1.57.5 2.5.5S9.44 2 11 2s2 1.5 3 1.5 1.72-.5 2.5-.5a2.5 2.5 0 0 1 0 5c-.78 0-1.5-.5-2.5-.5Z",key:"1510fo"}],["path",{d:"M5 8v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"19jb7n"}]],lC=q("beer",sC);const oC=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],D8=q("bell",oC);const cC=[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]],uC=q("bike",cC);const xC=[["path",{d:"M16 7h.01",key:"1kdx03"}],["path",{d:"M3.4 18H12a8 8 0 0 0 8-8V7a4 4 0 0 0-7.28-2.3L2 20",key:"oj1oa8"}],["path",{d:"m20 7 2 .5-2 .5",key:"12nv4d"}],["path",{d:"M10 18v3",key:"1yea0a"}],["path",{d:"M14 17.75V21",key:"1pymcb"}],["path",{d:"M7 18a6 6 0 0 0 3.84-10.61",key:"1npnn0"}]],dC=q("bird",xC);const fC=[["path",{d:"m7 7 10 10-5 5V2l5 5L7 17",key:"1q5490"}]],hC=q("bluetooth",fC);const pC=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],mC=q("book-open",pC);const gC=[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],EC=q("book",gC);const yC=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],bC=q("bookmark",yC);const CC=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],w8=q("bot",CC);const vC=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],AC=q("box",vC);const kC=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],BC=q("brain",kC);const DC=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],wC=q("briefcase",DC);const FC=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],SC=q("brush",FC);const NC=[["path",{d:"M10 19.655A6 6 0 0 1 6 14v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 3.97",key:"1gnv52"}],["path",{d:"M14 15.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z",key:"1weqy9"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],_C=q("bug-play",NC);const MC=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],jC=q("bug",MC);const TC=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],RC=q("building-2",TC);const OC=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],zC=q("building",OC);const LC=[["path",{d:"M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8",key:"1w3rig"}],["path",{d:"M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1",key:"n2jgmb"}],["path",{d:"M2 21h20",key:"1nyx9w"}],["path",{d:"M7 8v3",key:"1qtyvj"}],["path",{d:"M12 8v3",key:"hwp4zt"}],["path",{d:"M17 8v3",key:"1i6e5u"}],["path",{d:"M7 4h.01",key:"1bh4kh"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M17 4h.01",key:"1upcoc"}]],PC=q("cake",LC);const IC=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],UC=q("calendar",IC);const HC=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],$C=q("camera",HC);const qC=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],GC=q("car",qC);const VC=[["path",{d:"M2.27 21.7s9.87-3.5 12.73-6.36a4.5 4.5 0 0 0-6.36-6.37C5.77 11.84 2.27 21.7 2.27 21.7zM8.64 14l-2.05-2.04M15.34 15l-2.46-2.46",key:"rfqxbe"}],["path",{d:"M22 9s-1.33-2-3.5-2C16.86 7 15 9 15 9s1.33 2 3.5 2S22 9 22 9z",key:"6b25w4"}],["path",{d:"M15 2s-2 1.33-2 3.5S15 9 15 9s2-1.84 2-3.5C17 3.33 15 2 15 2z",key:"fn65lo"}]],QC=q("carrot",VC);const YC=[["path",{d:"M12 5c.67 0 1.35.09 2 .26 1.78-2 5.03-2.84 6.42-2.26 1.4.58-.42 7-.42 7 .57 1.07 1 2.24 1 3.44C21 17.9 16.97 21 12 21s-9-3-9-7.56c0-1.25.5-2.4 1-3.44 0 0-1.89-6.42-.5-7 1.39-.58 4.72.23 6.5 2.23A9.04 9.04 0 0 1 12 5Z",key:"x6xyqk"}],["path",{d:"M8 14v.5",key:"1nzgdb"}],["path",{d:"M16 14v.5",key:"1lajdz"}],["path",{d:"M11.25 16.25h1.5L12 17l-.75-.75Z",key:"12kq1m"}]],KC=q("cat",YC);const XC=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 16h8",key:"srdodz"}],["path",{d:"M7 11h12",key:"127s9w"}],["path",{d:"M7 6h3",key:"w9rmul"}]],ZC=q("chart-bar",XC);const WC=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],JC=q("chart-line",WC);const e3=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],t3=q("chart-pie",e3);const n3=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ma=q("check",n3);const r3=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ea=q("chevron-down",r3);const a3=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],i3=q("chevron-left",a3);const s3=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],F8=q("chevron-right",s3);const l3=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],o3=q("chevron-up",l3);const c3=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],u3=q("circle-x",c3);const x3=[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]],d3=q("clapperboard",x3);const f3=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],S8=q("clock",f3);const h3=[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],p3=q("cloud-off",h3);const m3=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],g3=q("cloud-upload",m3);const E3=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],y3=q("cloud",E3);const b3=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],C3=q("code-xml",b3);const v3=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],A3=q("code",v3);const k3=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],B3=q("coffee",k3);const D3=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],w3=q("cog",D3);const F3=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],S3=q("compass",F3);const N3=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Wd=q("copy",N3);const _3=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],M3=q("cpu",_3);const j3=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],T3=q("credit-card",j3);const R3=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],O3=q("crown",R3);const z3=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],L3=q("database",z3);const P3=[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]],I3=q("dna",P3);const U3=[["path",{d:"M11.25 16.25h1.5L12 17z",key:"w7jh35"}],["path",{d:"M16 14v.5",key:"1lajdz"}],["path",{d:"M4.42 11.247A13.152 13.152 0 0 0 4 14.556C4 18.728 7.582 21 12 21s8-2.272 8-6.444a11.702 11.702 0 0 0-.493-3.309",key:"u7s9ue"}],["path",{d:"M8 14v.5",key:"1nzgdb"}],["path",{d:"M8.5 8.5c-.384 1.05-1.083 2.028-2.344 2.5-1.931.722-3.576-.297-3.656-1-.113-.994 1.177-6.53 4-7 1.923-.321 3.651.845 3.651 2.235A7.497 7.497 0 0 1 14 5.277c0-1.39 1.844-2.598 3.767-2.277 2.823.47 4.113 6.006 4 7-.08.703-1.725 1.722-3.656 1-1.261-.472-1.855-1.45-2.239-2.5",key:"v8hric"}]],H3=q("dog",U3);const $3=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],q3=q("dollar-sign",$3);const G3=[["path",{d:"M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z",key:"9m4mmf"}],["path",{d:"m2.5 21.5 1.4-1.4",key:"17g3f0"}],["path",{d:"m20.1 3.9 1.4-1.4",key:"1qn309"}],["path",{d:"M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z",key:"1t2c92"}],["path",{d:"m9.6 14.4 4.8-4.8",key:"6umqxw"}]],V3=q("dumbbell",G3);const Q3=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Y3=q("earth",Q3);const K3=[["path",{d:"M12 2C8 2 4 8 4 14a8 8 0 0 0 16 0c0-6-4-12-8-12",key:"1le142"}]],X3=q("egg",K3);const Z3=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],W3=q("external-link",Z3);const J3=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M16 16h.01",key:"1f9h7w"}],["path",{d:"M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z",key:"1iv0i2"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],ev=q("factory",J3);const tv=[["path",{d:"M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z",key:"18jl4k"}],["path",{d:"M16 8 2 22",key:"vp34q"}],["path",{d:"M17.5 15H9",key:"1oz8nu"}]],nv=q("feather",tv);const rv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],av=q("file-code",rv);const iv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],N8=q("file-diff",iv);const sv=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],_8=q("file",sv);const lv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],ov=q("film",lv);const cv=[["path",{d:"M6.5 12c.94-3.46 4.94-6 8.5-6 3.56 0 6.06 2.54 7 6-.94 3.47-3.44 6-7 6s-7.56-2.53-8.5-6Z",key:"15baut"}],["path",{d:"M18 12v.5",key:"18hhni"}],["path",{d:"M16 17.93a9.77 9.77 0 0 1 0-11.86",key:"16dt7o"}],["path",{d:"M7 10.67C7 8 5.58 5.97 2.73 5.5c-1 1.5-1 5 .23 6.5-1.24 1.5-1.24 5-.23 6.5C5.58 18.03 7 16 7 13.33",key:"l9di03"}],["path",{d:"M10.46 7.26C10.2 5.88 9.17 4.24 8 3h5.8a2 2 0 0 1 1.98 1.67l.23 1.4",key:"1kjonw"}],["path",{d:"m16.01 17.93-.23 1.4A2 2 0 0 1 13.8 21H9.5a5.96 5.96 0 0 0 1.49-3.98",key:"1zlm23"}]],uv=q("fish",cv);const xv=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]],dv=q("flag",xv);const fv=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],hv=q("flame",fv);const pv=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],mv=q("flask-conical",pv);const gv=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Ev=q("folder-open",gv);const yv=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],M8=q("folder",yv);const bv=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Cv=q("funnel",bv);const vv=[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]],Av=q("gamepad-2",vv);const kv=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Bv=q("gauge",kv);const Dv=[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]],wv=q("gem",Dv);const Fv=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],Sv=q("gift",Fv);const Nv=[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],_v=q("git-branch-plus",Nv);const Mv=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],jv=q("git-branch",Mv);const Tv=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],j8=q("git-fork",Tv);const Rv=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],T8=q("git-merge",Rv);const Ov=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],zv=q("github",Ov);const Lv=[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]],Pv=q("glasses",Lv);const Iv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Uv=q("globe",Iv);const Hv=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],$v=q("graduation-cap",Hv);const qv=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Gv=q("grid-3x3",qv);const Vv=[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]],Qv=q("hammer",Vv);const Yv=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],Kv=q("headphones",Yv);const Xv=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]],Zv=q("heart-pulse",Xv);const Wv=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],Jv=q("heart",Wv);const eA=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],Jd=q("hourglass",eA);const tA=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],nA=q("house",tA);const rA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],aA=q("image",rA);const iA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sA=q("info",iA);const lA=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],oA=q("key",lA);const cA=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],uA=q("laptop",cA);const xA=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],dA=q("layers",xA);const fA=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],hA=q("layout-grid",fA);const pA=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],mA=q("leaf",pA);const gA=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],EA=q("lightbulb",gA);const yA=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],bA=q("link",yA);const CA=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],R8=q("list",CA);const vA=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rn=q("loader-circle",vA);const AA=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],kA=q("lock",AA);const BA=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],DA=q("log-out",BA);const wA=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],FA=q("mail",wA);const SA=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],NA=q("map-pin",SA);const _A=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],O8=q("map",_A);const MA=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M12 11v11",key:"ur9y6a"}],["path",{d:"m19 3-7 8-7-8Z",key:"1sgpiw"}]],jA=q("martini",MA);const TA=[["path",{d:"M7.21 15 2.66 7.14a2 2 0 0 1 .13-2.2L4.4 2.8A2 2 0 0 1 6 2h12a2 2 0 0 1 1.6.8l1.6 2.14a2 2 0 0 1 .14 2.2L16.79 15",key:"143lza"}],["path",{d:"M11 12 5.12 2.2",key:"qhuxz6"}],["path",{d:"m13 12 5.88-9.8",key:"hbye0f"}],["path",{d:"M8 7h8",key:"i86dvs"}],["circle",{cx:"12",cy:"17",r:"5",key:"qbz8iq"}],["path",{d:"M12 18v-2h-.5",key:"fawc4q"}]],RA=q("medal",TA);const OA=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],zA=q("message-circle",OA);const LA=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],PA=q("message-square",LA);const IA=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]],UA=q("mic-off",IA);const HA=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],z8=q("mic",HA);const $A=[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]],qA=q("microscope",$A);const GA=[["path",{d:"M5 12h14",key:"1ays0h"}]],VA=q("minus",GA);const QA=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],YA=q("monitor",QA);const KA=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],XA=q("moon",KA);const ZA=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],WA=q("music",ZA);const JA=[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]],ek=q("orbit",JA);const tk=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],nk=q("package",tk);const rk=[["path",{d:"m14.622 17.897-10.68-2.913",key:"vj2p1u"}],["path",{d:"M18.376 2.622a1 1 0 1 1 3.002 3.002L17.36 9.643a.5.5 0 0 0 0 .707l.944.944a2.41 2.41 0 0 1 0 3.408l-.944.944a.5.5 0 0 1-.707 0L8.354 7.348a.5.5 0 0 1 0-.707l.944-.944a2.41 2.41 0 0 1 3.408 0l.944.944a.5.5 0 0 0 .707 0z",key:"18tc5c"}],["path",{d:"M9 8c-1.804 2.71-3.97 3.46-6.583 3.948a.507.507 0 0 0-.302.819l7.32 8.883a1 1 0 0 0 1.185.204C12.735 20.405 16 16.792 16 15",key:"ytzfxy"}]],ak=q("paintbrush",rk);const ik=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],sk=q("panel-left",ik);const lk=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],sc=q("paperclip",lk);const ok=[["circle",{cx:"11",cy:"4",r:"2",key:"vol9p0"}],["circle",{cx:"18",cy:"8",r:"2",key:"17gozi"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}],["path",{d:"M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z",key:"1ydw1z"}]],ck=q("paw-print",ok);const uk=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],xk=q("pen",uk);const dk=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],fk=q("pencil",dk);const hk=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],H0=q("phone-call",hk);const pk=[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]],mk=q("phone-off",pk);const gk=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],Ek=q("phone",gk);const yk=[["path",{d:"m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z",key:"wa1lgi"}],["path",{d:"m8.5 8.5 7 7",key:"rvfmvr"}]],bk=q("pill",yk);const Ck=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],vk=q("pipette",Ck);const Ak=[["path",{d:"m12 14-1 1",key:"11onhr"}],["path",{d:"m13.75 18.25-1.25 1.42",key:"1yisr3"}],["path",{d:"M17.775 5.654a15.68 15.68 0 0 0-12.121 12.12",key:"1qtqk6"}],["path",{d:"M18.8 9.3a1 1 0 0 0 2.1 7.7",key:"fbbbr2"}],["path",{d:"M21.964 20.732a1 1 0 0 1-1.232 1.232l-18-5a1 1 0 0 1-.695-1.232A19.68 19.68 0 0 1 15.732 2.037a1 1 0 0 1 1.232.695z",key:"1hyfdd"}]],kk=q("pizza",Ak);const Bk=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],Dk=q("plane",Bk);const wk=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],xd=q("play",wk);const Fk=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Sk=q("plug",Fk);const Nk=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ef=q("plus",Nk);const _k=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Mk=q("power",_k);const jk=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],Tk=q("puzzle",jk);const Rk=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],L8=q("qr-code",Rk);const Ok=[["path",{d:"M13 16a3 3 0 0 1 2.24 5",key:"1epib5"}],["path",{d:"M18 12h.01",key:"yjnet6"}],["path",{d:"M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3",key:"ue9ozu"}],["path",{d:"M20 8.54V4a2 2 0 1 0-4 0v3",key:"49iql8"}],["path",{d:"M7.612 12.524a3 3 0 1 0-1.6 4.3",key:"1e33i0"}]],zk=q("rabbit",Ok);const Lk=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Pk=q("radio",Lk);const Ik=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],no=q("refresh-cw",Ik);const Uk=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Hk=q("rocket",Uk);const $k=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],qk=q("rotate-ccw",$k);const Gk=[["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z",key:"4rw317"}],["path",{d:"M11.38 12a2.4 2.4 0 0 1-.4-4.77 2.4 2.4 0 0 1 3.2-2.77 2.4 2.4 0 0 1 3.47-.63 2.4 2.4 0 0 1 3.37 3.37 2.4 2.4 0 0 1-1.1 3.7 2.51 2.51 0 0 1 .03 1.1",key:"10xrj0"}],["path",{d:"m13 12 4-4",key:"1hckqy"}],["path",{d:"M10.9 7.25A3.99 3.99 0 0 0 4 10c0 .73.2 1.41.54 2",key:"1p4srx"}]],Vk=q("salad",Gk);const Qk=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],Yk=q("ruler",Qk);const Kk=[["path",{d:"m13.5 6.5-3.148-3.148a1.205 1.205 0 0 0-1.704 0L6.352 5.648a1.205 1.205 0 0 0 0 1.704L9.5 10.5",key:"dzhfyz"}],["path",{d:"M16.5 7.5 19 5",key:"1ltcjm"}],["path",{d:"m17.5 10.5 3.148 3.148a1.205 1.205 0 0 1 0 1.704l-2.296 2.296a1.205 1.205 0 0 1-1.704 0L13.5 14.5",key:"nfoymv"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}],["path",{d:"M9.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l4.296-4.296a1.205 1.205 0 0 0 0-1.704l-2.296-2.296a1.205 1.205 0 0 0-1.704 0z",key:"nv9zqy"}]],Xk=q("satellite",Kk);const Zk=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Wk=q("save",Zk);const Jk=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],eB=q("scissors",Jk);const tB=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],P8=q("search",tB);const nB=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],rB=q("send",nB);const aB=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],iB=q("server",aB);const sB=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],lB=q("settings",sB);const oB=[["path",{d:"M14 11a2 2 0 1 1-4 0 4 4 0 0 1 8 0 6 6 0 0 1-12 0 8 8 0 0 1 16 0 10 10 0 1 1-20 0 11.93 11.93 0 0 1 2.42-7.22 2 2 0 1 1 3.16 2.44",key:"1cn552"}]],cB=q("shell",oB);const uB=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],xB=q("shield",uB);const dB=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],fB=q("ship",dB);const hB=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],pB=q("shopping-bag",hB);const mB=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],gB=q("shopping-cart",mB);const EB=[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]],yB=q("sliders-horizontal",EB);const bB=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],CB=q("smartphone",bB);const vB=[["path",{d:"M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0",key:"hneq2s"}],["circle",{cx:"10",cy:"13",r:"8",key:"194lz3"}],["path",{d:"M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6",key:"ixqyt7"}],["path",{d:"M18 3 19.1 5.2",key:"9tjm43"}],["path",{d:"M22 3 20.9 5.2",key:"j3odrs"}]],AB=q("snail",vB);const kB=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],BB=q("snowflake",kB);const DB=[["path",{d:"M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z",key:"4rw317"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M19.5 12 22 6",key:"shfsr5"}],["path",{d:"M16.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.73 1.62",key:"rpc6vp"}],["path",{d:"M11.25 3c.27.1.8.53.74 1.36-.05.83-.93 1.2-.98 2.02-.06.78.33 1.24.72 1.62",key:"1lf63m"}],["path",{d:"M6.25 3c.27.1.8.53.75 1.36-.06.83-.93 1.2-1 2.02-.05.78.34 1.24.74 1.62",key:"97tijn"}]],wB=q("soup",DB);const FB=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],SB=q("sparkles",FB);const NB=[["path",{d:"M14 9.536V7a4 4 0 0 1 4-4h1.5a.5.5 0 0 1 .5.5V5a4 4 0 0 1-4 4 4 4 0 0 0-4 4c0 2 1 3 1 5a5 5 0 0 1-1 3",key:"139s4v"}],["path",{d:"M4 9a5 5 0 0 1 8 4 5 5 0 0 1-8-4",key:"1dlkgp"}],["path",{d:"M5 21h14",key:"11awu3"}]],_B=q("sprout",NB);const MB=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],I8=q("square",MB);const jB=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],dd=q("star",jB);const TB=[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]],RB=q("stethoscope",TB);const OB=[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]],zB=q("store",OB);const LB=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14.837 16.385a6 6 0 1 1-7.223-7.222c.624-.147.97.66.715 1.248a4 4 0 0 0 5.26 5.259c.589-.255 1.396.09 1.248.715",key:"xlf6rm"}],["path",{d:"M16 12a4 4 0 0 0-4-4",key:"6vsxu"}],["path",{d:"m19 5-1.256 1.256",key:"1yg6a6"}],["path",{d:"M20 12h2",key:"1q8mjw"}]],PB=q("sun-moon",LB);const IB=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],U8=q("sun",IB);const UB=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],HB=q("tag",UB);const $B=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],qB=q("tags",$B);const GB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],VB=q("target",GB);const QB=[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]],YB=q("telescope",QB);const KB=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],XB=q("terminal",KB);const ZB=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],WB=q("ticket",ZB);const JB=[["path",{d:"M8 3.1V7a4 4 0 0 0 8 0V3.1",key:"1v71zp"}],["path",{d:"m9 15-1-1",key:"1yrq24"}],["path",{d:"m15 15 1-1",key:"1t0d6s"}],["path",{d:"M9 19c-2.8 0-5-2.2-5-5v-4a8 8 0 0 1 16 0v4c0 2.8-2.2 5-5 5Z",key:"1p0hjs"}],["path",{d:"m8 19-2 3",key:"13i0xs"}],["path",{d:"m16 19 2 3",key:"xo31yx"}]],eD=q("train-front",JB);const tD=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],nD=q("trash-2",tD);const rD=[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]],aD=q("tree-pine",rD);const iD=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],sD=q("trending-up",iD);const lD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lc=q("triangle-alert",lD);const oD=[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]],cD=q("trophy",oD);const uD=[["path",{d:"m12 10 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a8 8 0 1 0-16 0v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3l2-4h4Z",key:"1lbbv7"}],["path",{d:"M4.82 7.9 8 10",key:"m9wose"}],["path",{d:"M15.18 7.9 12 10",key:"p8dp2u"}],["path",{d:"M16.93 10H20a2 2 0 0 1 0 4H2",key:"12nsm7"}]],xD=q("turtle",uD);const dD=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],fD=q("user",dD);const hD=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pD=q("users",hD);const mD=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],gD=q("utensils",mD);const ED=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],yD=q("video",ED);const bD=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],CD=q("wallet",bD);const vD=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Km=q("wand-sparkles",vD);const AD=[["path",{d:"M18 21V10a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v11",key:"pb2vm6"}],["path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 1.132-1.803l7.95-3.974a2 2 0 0 1 1.837 0l7.948 3.974A2 2 0 0 1 22 8z",key:"doq5xv"}],["path",{d:"M6 13h12",key:"yf64js"}],["path",{d:"M6 17h12",key:"1jwigz"}]],kD=q("warehouse",AD);const BD=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],DD=q("waypoints",BD);const wD=[["path",{d:"M2 22 16 8",key:"60hf96"}],["path",{d:"M3.47 12.53 5 11l1.53 1.53a3.5 3.5 0 0 1 0 4.94L5 19l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1rdhi6"}],["path",{d:"M7.47 8.53 9 7l1.53 1.53a3.5 3.5 0 0 1 0 4.94L9 15l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"1sdzmb"}],["path",{d:"M11.47 4.53 13 3l1.53 1.53a3.5 3.5 0 0 1 0 4.94L13 11l-1.53-1.53a3.5 3.5 0 0 1 0-4.94Z",key:"eoatbi"}],["path",{d:"M20 2h2v2a4 4 0 0 1-4 4h-2V6a4 4 0 0 1 4-4Z",key:"19rau1"}],["path",{d:"M11.47 17.47 13 19l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L5 19l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"tc8ph9"}],["path",{d:"M15.47 13.47 17 15l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L9 15l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"2m8kc5"}],["path",{d:"M19.47 9.47 21 11l-1.53 1.53a3.5 3.5 0 0 1-4.94 0L13 11l1.53-1.53a3.5 3.5 0 0 1 4.94 0Z",key:"vex3ng"}]],FD=q("wheat",wD);const SD=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],tf=q("wifi-off",SD);const ND=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],H8=q("wifi",ND);const _D=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]],MD=q("wine",_D);const jD=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],oc=q("workflow",jD);const TD=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],RD=q("wrench",TD);const OD=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vn=q("x",OD);const zD=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],nf=q("zap",zD);function Xm(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ht(e,n){return{method:e,pattern:n,path:()=>n}}function yt(e,n){const[r,i]=n.split(/:[a-zA-Z]+/);if(i===void 0)throw new Error(`route ${n} declares no :param`);return{method:e,pattern:n,path:l=>`${r}${encodeURIComponent(l)}${i}`,re:new RegExp(`^${Xm(r)}([^/]+)${Xm(i)}$`)}}const be={state:Ht("GET","/api/state"),search:Ht("GET","/api/search"),repos:Ht("GET","/api/repos"),modelCatalog:Ht("GET","/api/models"),modelDefaults:Ht("GET","/api/models/defaults"),updateModelDefaults:Ht("PATCH","/api/models/defaults"),planUsage:Ht("GET","/api/usage"),voiceTicket:Ht("POST","/api/voice/ticket"),voiceCall:Ht("POST","/api/voice/calls"),voiceCallReady:yt("POST","/api/voice/calls/:callId/ready"),voiceCallEnd:yt("DELETE","/api/voice/calls/:callId"),repoIcon:yt("GET","/api/repos/:repo/icon"),localImage:yt("GET","/api/local-images/:path"),filePreview:yt("GET","/api/files/:reference"),toolImage:yt("GET","/api/tool-images/:reference"),stageAttachment:Ht("POST","/api/attachments"),discardStagedAttachment:yt("DELETE","/api/attachments/:attachmentId"),logs:Ht("GET","/api/logs"),restartConductor:Ht("POST","/api/conductor/restart"),settings:Ht("GET","/api/settings"),updateSettings:Ht("PATCH","/api/settings"),prefs:Ht("GET","/api/prefs"),updatePrefs:Ht("PATCH","/api/prefs"),armNoSleep:Ht("POST","/api/nosleep"),disarmNoSleep:Ht("DELETE","/api/nosleep"),push:Ht("GET","/api/push"),pushSubscribe:Ht("POST","/api/push/subscribe"),pushUnsubscribe:Ht("POST","/api/push/unsubscribe"),pushTest:Ht("POST","/api/push/test"),roles:Ht("GET","/api/roles"),updateRoles:Ht("PATCH","/api/roles"),delegations:Ht("GET","/api/delegations"),dismissDelegation:yt("DELETE","/api/delegations/:delegationId"),createWorkspace:Ht("POST","/api/workspaces"),workspace:yt("GET","/api/workspaces/:workspaceId"),sessions:yt("GET","/api/workspaces/:workspaceId/sessions"),newChat:yt("POST","/api/workspaces/:workspaceId/sessions"),diff:yt("GET","/api/workspaces/:workspaceId/diff"),fileDiff:yt("GET","/api/workspaces/:workspaceId/diff/file"),workspaceFiles:yt("GET","/api/workspaces/:workspaceId/files"),merge:yt("POST","/api/workspaces/:workspaceId/merge"),continueWorkspace:yt("POST","/api/workspaces/:workspaceId/continue"),workspaceStatus:yt("POST","/api/workspaces/:workspaceId/status"),archiveWorkspace:yt("POST","/api/workspaces/:workspaceId/archive"),devServer:yt("GET","/api/workspaces/:workspaceId/dev-server"),startDevServer:yt("POST","/api/workspaces/:workspaceId/dev-server"),stopDevServer:yt("DELETE","/api/workspaces/:workspaceId/dev-server"),dismissFirstPrompt:yt("DELETE","/api/workspaces/:workspaceId/prompt"),messages:yt("GET","/api/sessions/:sessionId/messages"),context:yt("GET","/api/sessions/:sessionId/context"),models:yt("GET","/api/sessions/:sessionId/models"),defaultModel:yt("POST","/api/sessions/:sessionId/default-model"),agent:yt("POST","/api/sessions/:sessionId/agent"),stop:yt("POST","/api/sessions/:sessionId/stop"),closeChat:yt("DELETE","/api/sessions/:sessionId"),sendPrompt:yt("POST","/api/sessions/:sessionId/prompt"),uploadAttachment:yt("POST","/api/sessions/:sessionId/attachments"),splitChat:yt("POST","/api/sessions/:sessionId/split"),delegateTask:yt("POST","/api/sessions/:sessionId/delegate"),dismissParkedPrompt:yt("DELETE","/api/sessions/:sessionId/prompt")},LD="## Workflow objective";function PD(e){const n=/^(\d+)(s|m|h)?$/.exec(e.trim());if(!n)return null;const r=Number(n[1]),i=n[2]??"s",l=r*(i==="h"?3600:i==="m"?60:1);return Number.isSafeInteger(l)?l:null}function ID(e){const n=e??"",i=(n.includes("/")?n.slice(n.indexOf("/")+1):n).replace(/[-_]/g," ").trim();return i?i[0].toUpperCase()+i.slice(1):""}function $r(e){return e.workspace_name||e.pr_title||ID(e.branch)||e.directory_name||e.id.slice(0,8)}function UD(e){return e.toLowerCase().match(/[\p{L}\p{N}_]+/gu)??[]}function Xn(e){const n=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)?$/.test(e);return Date.parse(n?`${e.replace(" ","T")}Z`:e)}function Gl(e){return e.endsWith(" NEW")?e.slice(0,-4):e}function fd(e){return Gl(e).replace(/^opencode-/i,"")}function $8(e){return e?e.replace(/^claude-/,"").replace(/-\d{8}$/,"").replace(/-latest$/,""):""}const hd=e=>e.toLowerCase().replace(/[^a-z0-9]/g,""),Zm=e=>hd(e.replace(/[\s\-_]\d+[mk]$/i,""));function HD(e){const n=[];for(const r of e){const i=n[n.length-1];i!==void 0&&/^\d+$/.test(r)&&/^\d[\d.]*$/.test(i)?n[n.length-1]=`${i}.${r}`:n.push(r)}return n}function $D(e){const n=HD(e.split("-")),r=i=>i?i.toLowerCase()==="1m"?"1M":i[0].toUpperCase()+i.slice(1):"";return n[0]==="gpt"&&n[1]?[n[1],...n.slice(2).map(r)].join(" "):/^(opus|sonnet|haiku|fable)$/.test(n[0]??"")?n.map(r).join(" "):e}function q8(e,n=[]){const r=$8(e);if(!r)return"";const i=r.split("/").pop()??r,l=i.split(":").pop()??i,o=hd(l);if(o){const u=n.find(f=>hd(f)===o);if(u)return u;const d=n.filter(f=>Zm(f)===Zm(l));if(d.length===1)return d[0]}return $D(l)}function G8(e){const n=Gl(e).trim().toLowerCase();if(n.startsWith("anthropic/"))return"Anthropic";if(n.startsWith("openai/"))return"OpenAI";if(n.startsWith("cursor/"))return"Cursor";if(/^(claude|fable|haiku|opus|sonnet)(?:[\s-]|$)/.test(n))return"Anthropic";if(/^(?:auto|gpt|o[1-9]|\d)(?:[\s.-]|$)/.test(n))return"OpenAI";if(/^(composer|grok)(?:[\s-]|$)/.test(n))return"Cursor";if(/^opencode(?:-go)?\//.test(n))return"OpenCode";const r=n.indexOf("/");return r>0?n.slice(0,r):"Other"}function Ds(e){const n=G8(e);if(n==="Anthropic")return"claude";if(n==="OpenAI")return"codex";if(n==="Cursor")return"cursor";if(n==="OpenCode")return"acp"}function rf(e){return e==="claude"||e==="codex"}function af(e){return e==="claude"||e==="codex"}function V8(e,n){const r=Gl(e);return n.some(i=>i.models.some(l=>Gl(l)===r))}function qD(e){const n=new Map;for(const r of e){const i=Gl(r).trim();if(!i)continue;const l=G8(i),o=n.get(l)??[];o.includes(i)||o.push(i),n.set(l,o)}return[...n].map(([r,i])=>({label:r,models:i.sort((l,o)=>l.localeCompare(o))})).sort((r,i)=>r.label.localeCompare(i.label))}function Q8(e,n){if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"){const r=e.message;if(typeof r=="string"&&r.trim())return r}return n}const GD="",VD="",Y8=["marin","cedar","alloy","ash","ballad","coral","echo","sage","shimmer","verse"],QD=["auto","no","en"];function YD(e){return typeof e=="string"&&Y8.includes(e)}function KD(e){return typeof e=="string"&&QD.includes(e)}const Wm=".context/attachments/";function XD(e){const n=[];let r=0;for(;r<e.length;){const i=e.indexOf("@⟦",r);if(i<0)break;const l=e.indexOf("⟧(",i+2);if(l<0||/[\r\n]/.test(e.slice(i,l))){r=i+2;continue}const o=e.slice(i+2,l),u=l+2;let d=u,f=!1;for(;!f&&(d=e.indexOf(")",d),!(d<0));){const h=e.slice(u,d);try{const g=decodeURIComponent(h),p=g.startsWith(Wm)?g.slice(Wm.length):"",y=p.indexOf("/"),b=y<0?"":p.slice(0,y),C=y<0?"":p.slice(y+1);if(/^[A-Za-z0-9]{6}$/.test(b)&&C===o&&!C.includes("/")){n.push({start:i,end:d+1,name:o,path:g}),r=d+1,f=!0;continue}}catch{}d+=1}f||(r=i+2)}return n}const ZD=new Set([".bash",".c",".cc",".cpp",".css",".go",".h",".hpp",".html",".java",".js",".json",".jsx",".md",".mjs",".mts",".php",".py",".rb",".rs",".scss",".sh",".sql",".svg",".swift",".toml",".ts",".tsx",".txt",".yaml",".yml"]),WD=new Set([".avif",".gif",".jpeg",".jpg",".png",".webp"]);function K8(e){const n=e.slice(e.lastIndexOf("/")+1),r=n.lastIndexOf(".");return r===-1?null:n.slice(r).toLowerCase()}function sf(e){const n=K8(e);return n!==null&&ZD.has(n)}function X8(e){const n=K8(e);return n!==null&&WD.has(n)}function Jm(e){return e.role==="tool"&&!e.tool&&e.output!==void 0}const JD="The Mac is locked";function Fi(e){return(e??"").includes(JD)}const ew="x-relay-device",Vl="conductor-remote-token";function tw(){const n=new URLSearchParams(location.hash.slice(1)).get("token");return n&&(localStorage.setItem(Vl,n),history.replaceState(null,"",location.pathname+location.search)),localStorage.getItem(Vl)}function lf(){return localStorage.getItem(Vl)}function nw(){localStorage.removeItem(Vl)}function rw(e){localStorage.setItem(Vl,e)}function aw(e){const n=e.trim();if(!n)return null;const r=n.match(/token=([^&\s]+)/);return r?decodeURIComponent(r[1]):/\s/.test(n)?null:n}class Dr extends Error{constructor(n,r){super(n),this.status=r}status}const Z8=6e3,Cn=45e3,iw=75e3,sw=75e3,e9=75e3,lw=75e3;async function Pe(e,n={},r=Z8){const i=lf();let l;try{l=await fetch(e,{...n,signal:AbortSignal.timeout(r),headers:{authorization:`Bearer ${i??""}`,"content-type":"application/json","x-client-timeout-ms":String(r),...n.headers}})}catch(o){throw o instanceof DOMException&&o.name==="TimeoutError"?new Dr("Request timed out",0):o}if(!l.ok){const o=await l.json().catch(()=>({}));throw new Dr(Q8(o.error,`HTTP ${l.status}`),l.status)}return l.json()}async function t9(e,n){const r=lf();let i;try{i=await fetch(e,{method:"POST",body:n,signal:AbortSignal.timeout(Cn),headers:{authorization:`Bearer ${r??""}`,"content-type":n.type||"application/octet-stream","x-attachment-name":encodeURIComponent(n.name),"x-client-timeout-ms":String(Cn)}})}catch(l){throw l instanceof DOMException&&l.name==="TimeoutError"?new Dr("Upload timed out",0):l}if(!i.ok){const l=await i.json().catch(()=>({}));throw new Dr(Q8(l.error,`HTTP ${i.status}`),i.status)}return i.json()}const Dx=new Map;async function ow(e){const n=lf(),r=await fetch(e,{headers:{authorization:`Bearer ${n??""}`},signal:AbortSignal.timeout(Z8)});if(!r.ok)throw new Dr(`HTTP ${r.status}`,r.status);return URL.createObjectURL(await r.blob())}function wx(e){let n=Dx.get(e);return n||(n=ow(e),n.catch(()=>Dx.delete(e)),Dx.set(e,n)),n}const Ne={state:()=>Pe(be.state.path()),voiceTicket:()=>Pe(be.voiceTicket.path(),{method:be.voiceTicket.method}),voiceCall:(e,n,r)=>Pe(be.voiceCall.path(),{method:be.voiceCall.method,body:JSON.stringify({sdp:e,voice:n,language:r})},Cn),voiceCallReady:e=>Pe(be.voiceCallReady.path(e),{method:be.voiceCallReady.method},Cn),voiceCallEnd:e=>Pe(be.voiceCallEnd.path(e),{method:be.voiceCallEnd.method},Cn),repoIcon:e=>wx(be.repoIcon.path(e)),localImage:e=>wx(be.localImage.path(e)),toolImage:e=>wx(be.toolImage.path(e)),filePreview:e=>Pe(be.filePreview.path(e)),stageAttachment:e=>t9(be.stageAttachment.path(),e),discardStagedAttachment:e=>Pe(be.discardStagedAttachment.path(e),{method:be.discardStagedAttachment.method}),workspace:e=>Pe(be.workspace.path(e)),sessions:e=>Pe(be.sessions.path(e)),messages:(e,n,r)=>Pe(`${be.messages.path(e)}?after=${n}`,{headers:r?{[ew]:r}:{}}),contextBreakdown:e=>Pe(be.context.path(e)),uploadAttachment:(e,n,r)=>t9(`${be.uploadAttachment.path(e)}?workspaceId=${encodeURIComponent(n)}`,r),diff:e=>Pe(be.diff.path(e)),fileDiff:(e,n)=>Pe(`${be.fileDiff.path(e)}?path=${encodeURIComponent(n)}`),workspaceFiles:e=>Pe(be.workspaceFiles.path(e)),sendPrompt:(e,n,r,i,l,o,u)=>Pe(be.sendPrompt.path(e),{method:be.sendPrompt.method,body:JSON.stringify({text:n,workspaceId:r,agent:i,clientId:l,queue:o,workflow:u})},sw),stop:(e,n)=>Pe(be.stop.path(e),{method:be.stop.method,body:JSON.stringify({workspaceId:n})},Cn),closeChat:(e,n,r=!1)=>Pe(be.closeChat.path(e),{method:be.closeChat.method,body:JSON.stringify({workspaceId:n,closeRunning:r})},Cn),newChat:e=>Pe(be.newChat.path(e),{method:be.newChat.method},Cn),splitChat:(e,n,r,i,l,o,u="chat")=>Pe(be.splitChat.path(e),{method:be.splitChat.method,body:JSON.stringify({workspaceId:n,includeThinking:r,includeTools:i,throughRowid:l,onlyRowid:o,destination:u})},Cn),repos:()=>Pe(be.repos.path()),modelCatalog:()=>Pe(be.modelCatalog.path()),modelDefaults:()=>Pe(be.modelDefaults.path()),patchModelDefaults:e=>Pe(be.updateModelDefaults.path(),{method:be.updateModelDefaults.method,body:JSON.stringify(e)}),planUsage:(e=!1)=>Pe(`${be.planUsage.path()}${e?"?refresh=1":""}`,{},15e3),roles:()=>Pe(be.roles.path()),updateRoles:e=>Pe(be.updateRoles.path(),{method:be.updateRoles.method,body:JSON.stringify(e)}),delegations:e=>Pe(`${be.delegations.path()}${e?`?workspaceId=${encodeURIComponent(e)}`:""}`),delegateTask:(e,n)=>Pe(be.delegateTask.path(e),{method:be.delegateTask.method,body:JSON.stringify(n)}),dismissDelegation:e=>Pe(be.dismissDelegation.path(e),{method:be.dismissDelegation.method}),search:(e,n=[],r=!0)=>{const i=new URLSearchParams({q:e});for(const l of n)i.append("repo",l);return r||i.set("archived","0"),Pe(`${be.search.path()}?${i}`)},dismissPrompt:e=>Pe(be.dismissFirstPrompt.path(e),{method:be.dismissFirstPrompt.method}),dismissParked:e=>Pe(be.dismissParkedPrompt.path(e),{method:be.dismissParkedPrompt.method}),createWorkspace:e=>Pe(be.createWorkspace.path(),{method:be.createWorkspace.method,body:JSON.stringify(e)},Cn),setAgent:(e,n,r)=>Pe(be.agent.path(e),{method:be.agent.method,body:JSON.stringify({...n,workspaceId:r})},Cn),models:(e,n)=>Pe(`${be.models.path(e)}?workspaceId=${encodeURIComponent(n)}`,{},Cn),setDefaultModel:(e,n,r)=>Pe(be.defaultModel.path(e),{method:be.defaultModel.method,body:JSON.stringify({model:n,workspaceId:r})},Cn),logs:(e,n=300)=>Pe(`${be.logs.path()}?limit=${n}${e?`&file=${encodeURIComponent(e)}`:""}`),push:()=>Pe(be.push.path()),pushSubscribe:(e,n)=>Pe(be.pushSubscribe.path(),{method:be.pushSubscribe.method,body:JSON.stringify({subscription:e,label:n})}),pushUnsubscribe:e=>Pe(be.pushUnsubscribe.path(),{method:be.pushUnsubscribe.method,body:JSON.stringify({endpoint:e})}),pushTest:e=>Pe(be.pushTest.path(),{method:be.pushTest.method,body:JSON.stringify({id:e})},Cn),merge:e=>Pe(be.merge.path(e),{method:be.merge.method},Cn),continueWorkspace:(e,n)=>Pe(be.continueWorkspace.path(e),{method:be.continueWorkspace.method,body:JSON.stringify({sessionId:n})},iw),setStatus:(e,n)=>Pe(be.workspaceStatus.path(e),{method:be.workspaceStatus.method,body:JSON.stringify({status:n})},Cn),archive:(e,n=!1)=>Pe(be.archiveWorkspace.path(e),{method:be.archiveWorkspace.method,body:JSON.stringify({stopAgents:n})},Cn),devServer:e=>Pe(be.devServer.path(e)),startDevServer:(e,n)=>Pe(be.startDevServer.path(e),{method:be.startDevServer.method,body:n?JSON.stringify({runConfigId:n}):void 0},e9),stopDevServer:e=>Pe(be.stopDevServer.path(e),{method:be.stopDevServer.method},e9),settings:()=>Pe(be.settings.path()),patchSettings:e=>Pe(be.updateSettings.path(),{method:be.updateSettings.method,body:JSON.stringify(e)}),prefs:()=>Pe(be.prefs.path()),patchPrefs:(e,n=!1)=>Pe(be.updatePrefs.path(),{method:be.updatePrefs.method,body:JSON.stringify(e),keepalive:n}),armNoSleep:e=>Pe(be.armNoSleep.path(),{method:be.armNoSleep.method,body:JSON.stringify({seconds:e})},Cn),disarmNoSleep:()=>Pe(be.disarmNoSleep.path(),{method:be.disarmNoSleep.method},Cn),restartConductor:(e=!1)=>Pe(be.restartConductor.path(),{method:be.restartConductor.method,body:JSON.stringify({stopAgents:e})},lw)},n9=e=>{let n;const r=new Set,i=(h,g)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const y=n;n=g??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(b=>b(n,y))}},l=()=>n,d={setState:i,getState:l,getInitialState:()=>f,subscribe:h=>(r.add(h),()=>r.delete(h))},f=n=e(i,l,d);return d},cw=(e=>e?n9(e):n9),uw=e=>e;function xw(e,n=uw){const r=B0.useSyncExternalStore(e.subscribe,B0.useCallback(()=>n(e.getState()),[e,n]),B0.useCallback(()=>n(e.getInitialState()),[e,n]));return B0.useDebugValue(r),r}const r9=e=>{const n=cw(e),r=i=>xw(n,i);return Object.assign(r,n),r},dw=(e=>e?r9(e):r9),fw=1e4;function hw(e,n=Date.now()){return Math.max(0,(e??n)+fw-n)}const pd="conductor-remote-pending",W8=20,pw=1440*60*1e3;function J8(e,n=[],r=!1){let i=r;const l=new Set;for(const o of e){if(l.add(o.text.trim()),o.status==="error")return"failed";o.status==="sending"&&(i=!0)}for(const o of n)if(!l.has(o.text.trim())){if(o.status==="failed")return"failed";o.status==="waiting"&&(i=!0)}return i?"sending":null}const a9=e=>e.status==="sending"||!!e.interrupted;function i9(e,n){const r=e.text.trim(),i=n.trim();return e.workflow?i.endsWith(`${LD}
|
|
12
12
|
|
|
13
|
-
${r}`):i===r}function mw(e){const n=e;return!!n&&typeof n.id=="string"&&typeof n.sessionId=="string"&&typeof n.workspaceId=="string"&&typeof n.text=="string"&&typeof n.createdAt=="number"&&(n.workflow===void 0||typeof n.workflow=="boolean")&&(n.status==="sending"||n.status==="error")}const gw=e=>e.status==="sending"?{...e,status:"error",interrupted:!0,error:"Never confirmed — the app reloaded"}:e;function Ew(){try{const e=JSON.parse(localStorage.getItem(pd)??"[]");if(!Array.isArray(e))return[];const n=Date.now()-pw;return e.filter(mw).filter(r=>r.createdAt>n).slice(-W8).map(gw)}catch{return[]}}function yw(e){try{const n=e.slice(-W8);n.length?localStorage.setItem(pd,JSON.stringify(n)):localStorage.removeItem(pd)}catch{}}const w0="conductor-remote-agent:",F0="conductor-remote-draft:",da="new-workspace",s9="conductor-remote-read",eg=(e,n,r)=>(e[n]??"")<r;function bw(e,n){return(e.unread_sessions??[]).filter(r=>eg(n,r.id,r.at)).length}function Cw(e,n){return!!e.unread_count&&eg(n,e.id,e.updated_at)}const l9="conductor-remote-prefs-v1";function Ar(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function md(e){const n=Ar(e);if(!n)return{};const r={};return typeof n.model=="string"&&(r.model=n.model),typeof n.effort=="string"&&(r.effort=n.effort),typeof n.plan=="boolean"&&(r.plan=n.plan),typeof n.fast=="boolean"&&(r.fast=n.fast),r}function ys(e){return Object.keys(e).length>0}function vw(e){const n=Ar(e);return!n||typeof n.name!="string"||typeof n.path!="string"||typeof n.token!="string"||!Number.isSafeInteger(Number(n.bytes))||Number(n.bytes)<0||n.stageId!==void 0&&typeof n.stageId!="string"?null:{name:n.name,path:n.path,bytes:Number(n.bytes),token:n.token,...n.stageId?{stageId:n.stageId}:{}}}function tg(e){if(!Array.isArray(e))return[];const n=new Set;return e.flatMap(r=>{const i=vw(r);return!i||n.has(i.path)?[]:(n.add(i.path),[i])})}function o9(e){const n=Ar(e);if(!n)return null;const r=Number(n.updatedAt);return!Number.isSafeInteger(r)||r<0?null:n.deleted===!0?{text:"",agent:{},attachments:[],updatedAt:r,deleted:!0}:typeof n.text!="string"?null:{text:n.text,agent:md(n.agent),attachments:tg(n.attachments),updatedAt:r,deleted:!1}}function ng(e,n){return e.model===n.model&&e.effort===n.effort&&e.plan===n.plan&&e.fast===n.fast}function Aw(e,n){return e.text===n.text&&e.updatedAt===n.updatedAt&&e.deleted===n.deleted&&ng(e.agent,n.agent)&&e.attachments.length===n.attachments.length&&e.attachments.every((r,i)=>{const l=n.attachments[i];return r.name===l?.name&&r.path===l.path&&r.bytes===l.bytes&&r.token===l.token&&r.stageId===l.stageId})}function ms(e,n,r,i){return e||ys(n)||r.length?{text:e,agent:{...n},attachments:tg(r),updatedAt:i,deleted:!1}:{text:"",agent:{},attachments:[],updatedAt:i,deleted:!0}}class kw{storage;prefs;clock;generation=0;touched=new Set;listeners=new Set;constructor(n){this.storage=n;const r=this.readRawDrafts(),i=this.readRawAgents(),l=this.readMetadata(),o=l?.drafts??{};if(this.clock=Math.max(Date.now(),...Object.values(o).map(u=>u.updatedAt)),l){const u={...o};for(const d of new Set([...Object.keys(o),...Object.keys(r),...Object.keys(i)])){const f=ms(r[d]??"",i[d]??{},[],o[d]?.updatedAt??0),h=o[d];!(h&&!h.deleted&&h.attachments.length>0&&!h.text&&!ys(h.agent)&&f.deleted)&&(!h||h.text!==f.text||h.deleted!==f.deleted||!ng(h.agent,f.agent))&&(u[d]=ms(f.text,f.agent,[],this.tick()),this.touched.add(d))}this.prefs={readMarks:this.readRawMarks(),drafts:u}}else{const u={};for(const d of new Set([...Object.keys(r),...Object.keys(i)]))u[d]=ms(r[d]??"",i[d]??{},[],0);this.prefs={readMarks:this.readRawMarks(),drafts:u}}this.persistAll()}snapshot(){return{readMarks:{...this.prefs.readMarks},drafts:Object.fromEntries(Object.entries(this.prefs.drafts).map(([n,r])=>[n,{...r,agent:{...r.agent},attachments:r.attachments.map(i=>({...i}))}]))}}project(){const n={},r={},i={};for(const[l,o]of Object.entries(this.prefs.drafts))o.deleted||(n[l]=o.text,ys(o.agent)&&(r[l]={...o.agent}),o.attachments.length&&(i[l]=o.attachments.map(u=>({...u}))));return{drafts:n,agentDrafts:r,draftAttachments:i,readMarks:{...this.prefs.readMarks}}}currentGeneration(){return this.generation}setDraft(n,r,i){return this.setLocal(n,r,i,this.prefs.drafts[n]?.attachments??[]),this.project()}setAgent(n,r,i){return this.setLocal(n,i,r,this.prefs.drafts[n]?.attachments??[]),this.project()}setAttachments(n,r,i,l){return this.setLocal(n,i,l,r),this.project()}setContent(n,r,i,l){return this.setLocal(n,r,i,l),this.project()}moveDraft(n,r){const i=this.prefs.drafts[n],l=this.prefs.drafts[r];return!i||i.deleted||n===r||l&&!l.deleted?this.project():(this.prefs.drafts[n]=ms("",{},[],this.tick()),this.prefs.drafts[r]=ms(i.text,i.agent,i.attachments,this.tick()),this.touched.add(n),this.touched.add(r),this.changed(),this.project())}markRead(n,r){return(this.prefs.readMarks[n]??"")>=r?this.project():(this.prefs.readMarks[n]=r,this.changed(),this.project())}merge(n,r){const i=Ar(Ar(n)?.drafts),l=this.cleanPrefs(n);for(const d of Object.values(l.drafts))this.clock=Math.max(this.clock,d.updatedAt);let o=!1,u=!1;for(const[d,f]of Object.entries(l.readMarks))(this.prefs.readMarks[d]??"")>=f||(this.prefs.readMarks[d]=f,o=!0);for(const[d,f]of Object.entries(this.prefs.readMarks))(l.readMarks[d]??"")<f&&(u=!0);for(const d of new Set([...Object.keys(this.prefs.drafts),...Object.keys(l.drafts)])){const f=this.prefs.drafts[d],h=l.drafts[d],g=Ar(i?.[d]);if(f&&h&&!h.deleted&&g&&!Object.hasOwn(g,"attachments")&&(h.attachments=f.attachments.map(b=>({...b}))),!f&&h){this.prefs.drafts[d]=h,o=!0;continue}if(f&&!h){u=!0;continue}if(!(f&&h)||Aw(f,h))continue;const p=r===d&&(this.touched.has(d)||!f.deleted&&(f.text.length>0||ys(f.agent)||f.attachments.length>0)),y=h.updatedAt>f.updatedAt||h.updatedAt===f.updatedAt&&(h.deleted||!f.deleted);if(y&&!p){this.prefs.drafts[d]=h,o=!0;continue}y&&(f.updatedAt=this.tick(h.updatedAt),o=!0),u=!0}return o&&this.persistAll(),{state:this.project(),needsUpload:u}}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}requestFlush(){for(const n of this.listeners)n(!0)}setLocal(n,r,i,l){this.prefs.drafts[n]=ms(r,md(i),l,this.tick()),this.touched.add(n),this.changed()}changed(){this.generation+=1,this.persistAll();for(const n of this.listeners)n(!1)}tick(n=0){return this.clock=Math.max(Date.now(),this.clock+1,n+1),this.clock}cleanPrefs(n){const r=Ar(n),i={};for(const[o,u]of Object.entries(Ar(r?.readMarks)??{}))typeof u=="string"&&(i[o]=u);const l={};for(const[o,u]of Object.entries(Ar(r?.drafts)??{})){const d=o9(u);d&&(l[o]=d)}return{readMarks:i,drafts:l}}readMetadata(){try{const n=Ar(JSON.parse(this.storage.getItem(l9)??"null"));if(n?.version!==1)return null;const r={};for(const[i,l]of Object.entries(Ar(n.drafts)??{})){const o=o9(l);o&&(r[i]=o)}return{drafts:r}}catch{return null}}readRawDrafts(){const n={};try{for(let r=0;r<this.storage.length;r++){const i=this.storage.key(r);if(!i?.startsWith(F0))continue;const l=this.storage.getItem(i);l&&(n[i.slice(F0.length)]=l)}}catch{}return n}readRawAgents(){const n={};try{for(let r=0;r<this.storage.length;r++){const i=this.storage.key(r);if(!i?.startsWith(w0))continue;const l=this.storage.getItem(i);if(!l)continue;const o=md(JSON.parse(l));ys(o)&&(n[i.slice(w0.length)]=o)}}catch{}return n}readRawMarks(){try{const n=Ar(JSON.parse(this.storage.getItem(s9)??"{}"));return n?Object.fromEntries(Object.entries(n).filter(r=>typeof r[1]=="string")):{}}catch{return{}}}persistAll(){try{for(const[n,r]of Object.entries(this.prefs.drafts))!r.deleted&&r.text?this.storage.setItem(F0+n,r.text):this.storage.removeItem(F0+n),!r.deleted&&ys(r.agent)?this.storage.setItem(w0+n,JSON.stringify(r.agent)):this.storage.removeItem(w0+n);this.storage.setItem(s9,JSON.stringify(this.prefs.readMarks)),this.storage.setItem(l9,JSON.stringify({version:1,drafts:this.prefs.drafts}))}catch{}}}let Fx=null;function Sr(){return Fx||(Fx=new kw(localStorage)),Fx}const Bw=()=>Sr().project(),Dw=()=>Sr().snapshot(),c9=()=>Sr().currentGeneration(),ww=(e,n,r)=>Sr().setDraft(e,n,r),u9=(e,n,r)=>Sr().setAgent(e,n,r),x9=(e,n,r,i)=>Sr().setAttachments(e,n,r,i),Fw=(e,n,r,i)=>Sr().setContent(e,n,r,i),Sw=(e,n)=>Sr().moveDraft(e,n),Nw=(e,n)=>Sr().markRead(e,n),_w=(e,n)=>Sr().merge(e,n),Mw=e=>Sr().subscribe(e),gd=()=>Sr().requestFlush();function jw({total:e,shown:n,hidden:r,repoFiltered:i}){if(e)return!i&&!r?`${e} active`:[`${n} of ${e}`,r?`${r} hidden`:null].filter(Boolean).join(" · ")}const vs={mode:"all"};function Tw(e,n){if(e&&typeof e=="object"&&"mode"in e){if(e.mode==="all")return vs;if(e.mode==="selected"&&"repos"in e&&Array.isArray(e.repos))return{mode:"selected",repos:e.repos.filter(i=>typeof i=="string")}}const r=Array.isArray(n)?n.filter(i=>typeof i=="string"):typeof n=="string"?[n]:[];return r.length?{mode:"selected",repos:r}:vs}function of(e){return e.mode==="selected"?e.repos:[]}function Rw(){return{mode:"selected",repos:[]}}function Ed(e,n){return e.mode==="all"||e.repos.includes(n)}function Ow(e,n,r){const i=n.mode==="all"?[...e]:n.repos,l=i.includes(r)?i.filter(o=>o!==r):[...i,r];return e.length>0&&e.every(o=>l.includes(o))?vs:{mode:"selected",repos:l}}let gs=null;const S0=Bw(),yd=15e3,rg="conductor-remote-view",ag="conductor-remote-last-new-workspace-repo",d9={groupBy:"status",repoSelection:vs,sortBy:"updated",showDiffs:!0,hideMerged:!1,hideDone:!1,collapsed:[]};function f9(e){const n={};return e.model!==void 0&&(n.model=e.model),e.effort!==void 0&&(n.effort=e.effort),e.plan!==void 0&&(n.plan=e.plan),e.fast!==void 0&&(n.fast=e.fast),n}function zw(){try{const{repo:e,repos:n,repoSelection:r,...i}=JSON.parse(localStorage.getItem(rg)??"{}"),l=Tw(r,n??e);return{...d9,...i,repoSelection:l}}catch{return d9}}function Lw(){try{return localStorage.getItem(ag)??""}catch{return""}}const De=dw((e,n)=>{const r=l=>{localStorage.setItem(rg,JSON.stringify(l)),e({view:l})},i=l=>{yw(l),e({pending:l})};return{token:tw(),online:!0,lastSyncAt:null,update:null,workingHints:{},pending:Ew(),drafts:S0.drafts,draftAttachments:S0.draftAttachments,agentDrafts:S0.agentDrafts,readMarks:S0.readMarks,focusedDraft:null,push:{deviceId:null,devices:0},sidebarOpen:!location.pathname.startsWith("/w/"),lastNewWorkspaceRepo:Lw(),view:zw(),setToken:l=>{l?rw(l):nw(),e({token:l})},setOnline:l=>{if(l){gs&&clearTimeout(gs),gs=null,e({online:l,lastSyncAt:Date.now()});return}if(!n().online||gs)return;const o=hw(n().lastSyncAt);if(o===0){e({online:!1});return}gs=setTimeout(()=>{gs=null,e({online:!1})},o)},setUpdate:l=>e({update:l}),markWorking:l=>e({workingHints:{...n().workingHints,[l]:Date.now()}}),clearWorking:l=>{const{[l]:o,...u}=n().workingHints;e({workingHints:u})},addPending:l=>i([...n().pending.filter(o=>o.id!==l.id),{...l,status:"sending",error:void 0,createdAt:Date.now()}]),failPending:(l,o)=>i(n().pending.map(u=>u.id===l?{...u,status:"error",error:o}:u)),removePending:l=>i(n().pending.filter(o=>o.id!==l)),setDraft:(l,o)=>{const u=ww(l,o,n().agentDrafts[l]??{});e({drafts:u.drafts,agentDrafts:u.agentDrafts,draftAttachments:u.draftAttachments})},addDraftAttachment:(l,o)=>{const u=n().draftAttachments[l]??[];if(u.some(f=>f.path===o.path))return;const d=x9(l,[...u,o],n().drafts[l]??"",n().agentDrafts[l]??{});e({drafts:d.drafts,agentDrafts:d.agentDrafts,draftAttachments:d.draftAttachments})},removeDraftAttachment:(l,o)=>{const u=n().draftAttachments[l]??[],d=u.filter(h=>h.path!==o);if(d.length===u.length)return;const f=x9(l,d,n().drafts[l]??"",n().agentDrafts[l]??{});e({drafts:f.drafts,agentDrafts:f.agentDrafts,draftAttachments:f.draftAttachments})},clearDraftContent:l=>{const o=Fw(l,"",n().agentDrafts[l]??{},[]);e({drafts:o.drafts,agentDrafts:o.agentDrafts,draftAttachments:o.draftAttachments})},moveDraft:(l,o)=>{const u=n().drafts,f=u[l]!==void 0||n().agentDrafts[l]!==void 0||n().draftAttachments[l]!==void 0,h=u[o]!==void 0||n().agentDrafts[o]!==void 0||n().draftAttachments[o]!==void 0;if(!f||l===o||h)return;const g=Sw(l,o);e({drafts:g.drafts,agentDrafts:g.agentDrafts,draftAttachments:g.draftAttachments})},markRead:(l,o)=>{(n().readMarks[l]??"")>=o||e({readMarks:Nw(l,o).readMarks})},stageAgent:(l,o)=>{const u=f9({...n().agentDrafts[l],...o}),d=u9(l,u,n().drafts[l]??"");e({drafts:d.drafts,agentDrafts:d.agentDrafts,draftAttachments:d.draftAttachments})},clearAgentDraft:(l,o)=>{const u=n().agentDrafts[l];if(!u)return;const d=f9({model:u.model===o.model?void 0:u.model,effort:u.effort===o.effort?void 0:u.effort,plan:u.plan===o.plan?void 0:u.plan,fast:u.fast===o.fast?void 0:u.fast}),f=u9(l,d,n().drafts[l]??"");e({drafts:f.drafts,agentDrafts:f.agentDrafts,draftAttachments:f.draftAttachments})},applySyncedPrefs:l=>e({drafts:l.drafts,agentDrafts:l.agentDrafts,draftAttachments:l.draftAttachments,readMarks:l.readMarks}),setFocusedDraft:l=>e({focusedDraft:l}),setPush:l=>e({push:l}),setSidebarOpen:l=>e({sidebarOpen:l}),setLastNewWorkspaceRepo:l=>{try{localStorage.setItem(ag,l)}catch{}e({lastNewWorkspaceRepo:l})},setView:l=>r({...n().view,...l}),toggleGroup:l=>{const{collapsed:o}=n().view;r({...n().view,collapsed:o.includes(l)?o.filter(u=>u!==l):[...o,l]})}}}),h9=6e4,Pw=1e4,Sx="pwa-update-attempted-at",Iw=2500,Uw=30*6e4,Dl="pwa-update-snoozed-until";async function Hw(){try{if("serviceWorker"in navigator){const n=await navigator.serviceWorker.getRegistrations();await Promise.all(n.map(r=>r.unregister()))}if("caches"in window){const n=await caches.keys();await Promise.all(n.map(r=>caches.delete(r)))}}catch{}const e=location.search?"&":"?";location.replace(`${location.pathname}${location.search}${e}_v=${Date.now()}`)}function $w(){const e=De(p=>p.token),n=D.useRef(null),r=D.useRef(!1),{needRefresh:[i,l],updateServiceWorker:o}=_7({onRegisteredSW(p,y){y&&(n.current=y,setInterval(()=>{y.update().catch(()=>{})},h9))}}),{data:u}=gn({queryKey:["state"],queryFn:()=>Ne.state(),enabled:!!e,refetchInterval:!1}),d=u?.version,f=D.useRef(null);if(D.useEffect(()=>{!d||d==="1.106.2"||f.current===d||(f.current=d,n.current?.update().catch(()=>{}))},[d]),D.useEffect(()=>{if(!i)return;const p=Number(sessionStorage.getItem(Sx));if(sessionStorage.removeItem(Sx),p&&Date.now()-p<Pw){l(!1);return}const y=Number(sessionStorage.getItem(Dl));y&&Date.now()<y&&l(!1)},[i,l]),D.useEffect(()=>{if(i)return;const p=()=>{const b=Number(sessionStorage.getItem(Dl));!b||Date.now()<b||n.current?.waiting&&(sessionStorage.removeItem(Dl),l(!0))},y=window.setInterval(p,h9);return document.addEventListener("visibilitychange",p),()=>{window.clearInterval(y),document.removeEventListener("visibilitychange",p)}},[i,l]),!i)return null;const h=()=>{sessionStorage.setItem(Dl,String(Date.now()+Uw)),l(!1)},g=()=>{sessionStorage.removeItem(Dl),sessionStorage.setItem(Sx,String(Date.now()));const p=()=>{r.current||(r.current=!0,window.location.reload())},y=n.current?.waiting;y?(navigator.serviceWorker?.addEventListener("controllerchange",p,{once:!0}),y.addEventListener("statechange",()=>{y.state==="activated"&&p()}),y.postMessage({type:"SKIP_WAITING"})):o(!0),window.setTimeout(()=>{r.current||(r.current=!0,Hw())},Iw)};return x.jsxs("div",{className:"pb-safe fade-in fixed inset-x-0 bottom-0 z-40 mx-auto flex max-w-sm items-center gap-3 rounded-t-2xl border border-border-soft bg-surface px-4 py-3 shadow-xl",children:[x.jsx(no,{size:15,className:"shrink-0 text-accent"}),x.jsx("span",{className:"flex-1 text-sm",children:"New version ready"}),x.jsx("button",{type:"button",onClick:h,className:"rounded-lg px-2 py-1 text-xs text-muted active:bg-surface-2",children:"Later"}),x.jsx("button",{type:"button",onClick:g,className:"rounded-lg bg-accent px-3 py-1 text-xs font-semibold text-on-solid transition active:scale-95",children:"Update"})]})}function qw(){return/iP(hone|ad|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function ig(){return window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0}function sg(){return window.isSecureContext?"serviceWorker"in navigator?!("PushManager"in window)||!("Notification"in window)?qw()&&!ig()?"needs-install":"unsupported":"ok":"unsupported":"insecure"}function lg(){const e=navigator.userAgent,n=/iPhone/.test(e)?"iPhone":/iPad/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1?"iPad":/Android/.test(e)?"Android":/Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":"Browser";return ig()?n:`${n} (browser)`}function Gw(e){const n=e+"=".repeat((4-e.length%4)%4),r=atob(n.replace(/-/g,"+").replace(/_/g,"/")),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i}function Vw(e){let n="";for(const r of new Uint8Array(e))n+=String.fromCharCode(r);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function cf(){if(!("serviceWorker"in navigator))return null;const e=await navigator.serviceWorker.getRegistration();return e||Promise.race([navigator.serviceWorker.ready,new Promise(n=>setTimeout(()=>n(null),5e3))])}async function Qw(e){const n=await cf();if(typeof n?.getNotifications=="function")try{for(const r of await n.getNotifications({tag:e}))r.close()}catch{}}async function og(){return await(await cf())?.pushManager.getSubscription()??null}function Yw(e,n){const r=e.options.applicationServerKey;return!!r&&Vw(r)===n}async function cg(e){const n=await cf();if(!n)throw new Error("the app’s service worker isn’t running yet — reload and try again");return n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Gw(e)})}function ug(e){const n=e.toJSON(),r=n.keys??{};if(!n.endpoint||!r.p256dh||!r.auth)throw new Error("the browser returned an incomplete subscription");return{endpoint:n.endpoint,keys:{p256dh:r.p256dh,auth:r.auth}}}async function Kw(e){let n=await og();if(n&&!Yw(n,e)&&(await n.unsubscribe().catch(()=>{}),n=Notification.permission==="granted"?await cg(e):null),!n)return null;const r=await Ne.pushSubscribe(ug(n),lg());return{id:r.id??null,devices:r.devices.length}}function K0(){const e=window.getSelection();return!!e&&!e.isCollapsed&&e.toString().length>0}const N0=28;function Xw(e,n){const r=window.getSelection();if(!r||r.isCollapsed||!r.rangeCount)return!1;for(const i of r.getRangeAt(0).getClientRects())if(e>=i.left-N0&&e<=i.right+N0&&n>=i.top-N0&&n<=i.bottom+N0)return!0;return!1}function Zw(e,n){const r=n.filter(o=>Jm(o)&&o.toolUseId);if(!r.length)return[...e,...n];const i=[...e,...n.filter(o=>!Jm(o))],l=new Map;i.forEach((o,u)=>{o.tool&&o.toolUseId&&!l.has(o.toolUseId)&&l.set(o.toolUseId,u)});for(const o of r){const u=o.toolUseId?l.get(o.toolUseId):void 0;if(u===void 0){o.error&&i.push(o);continue}const d=i[u];i[u]={...d,output:o.output,diff:o.diff,images:o.images,error:o.error??d.error}}return i}function Ww(e,n){if(!n.length)return[...e];const r=new Set(e.map(i=>i.id));return[...e,...n.filter(i=>!r.has(i.id))]}function Jw(e){const n=De(l=>l.setSidebarOpen),r=De(l=>l.sidebarOpen),i=D.useRef(r);i.current=r,D.useEffect(()=>{const l=e.current;l&&(l.style.transition="",l.style.transform="")},[r,e]),D.useEffect(()=>{const u=window.matchMedia("(min-width: 768px)"),d=()=>e.current;let f=!1,h=!1,g=!1,p=!1,y=0,b=0,C=0,v=0;const k=R=>{const L=d();L&&(L.style.transition="none",L.style.transform=`translateX(${R}px)`,v=R)},B=()=>{const R=d();R&&(R.style.transition="",R.style.transform="")},_=R=>{for(let L=R;L;L=L.parentElement)if(L.scrollLeft>0)return!0;return!1},S=()=>{f&&(f=!1,B())},M=R=>{if(S(),u.matches||R.touches.length!==1)return;const L=R.touches[0];if(i.current){const I=d()?.getBoundingClientRect().right??0;if(L.clientX>I)return}else if(L.clientX>44||_(R.target))return;Xw(L.clientX,L.clientY)||(f=!0,h=!1,g=!1,p=K0(),y=L.clientX,b=L.clientY,C=d()?.offsetWidth??0)},T=R=>{if(!f||g)return;if(!p&&K0()){g=!0;return}const L=R.touches[0],I=L.clientX-y,O=L.clientY-b;if(!h){if(Math.abs(O)>Math.abs(I)&&Math.abs(O)>8){g=!0;return}if(Math.abs(I)<6)return;h=!0}R.preventDefault();const $=i.current?0:-C;k(Math.max(-C,Math.min(0,$+I)))},w=()=>{if(!f)return;if(f=!1,!h||g)return B();const R=C?(v+C)/C:0;B(),n(R>.4)};return window.addEventListener("touchstart",M,{passive:!0}),window.addEventListener("touchmove",T,{passive:!1}),window.addEventListener("touchend",w),window.addEventListener("touchcancel",w),document.addEventListener("visibilitychange",S),()=>{window.removeEventListener("touchstart",M),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",w),window.removeEventListener("touchcancel",w),document.removeEventListener("visibilitychange",S)}},[e,n])}const p9='input, textarea, [contenteditable]:not([contenteditable="false"])';function eF(){D.useEffect(()=>{const e=window.visualViewport;if(!e)return;const n=document.documentElement;(matchMedia("(display-mode: standalone)").matches||navigator.standalone)&&n.setAttribute("data-standalone","");let r=0,i;const l=()=>{n.style.removeProperty("--app-height"),n.removeAttribute("data-keyboard")},o=g=>{g&&!i?i=setInterval(u,300):!g&&i&&(clearInterval(i),i=void 0)},u=()=>{const g=document.activeElement,p=g instanceof HTMLElement&&g.matches(p9),y=e.scale>1.01;!p||y?(!y&&window.innerHeight-e.height<120&&(r=e.height),l()):(r||window.innerHeight)-e.height>40?(n.style.setProperty("--app-height",`${Math.round(e.height+e.offsetTop)}px`),n.setAttribute("data-keyboard","")):l(),o(p||n.hasAttribute("data-keyboard")),window.scrollY!==0&&window.scrollTo(0,0)};let d;const f=()=>{u(),clearTimeout(d),d=setTimeout(u,350)},h=()=>{if(document.visibilityState==="hidden"){const g=document.activeElement;g instanceof HTMLElement&&g.matches(p9)&&g.blur(),l(),o(!1)}else f()};return u(),e.addEventListener("resize",u),e.addEventListener("scroll",u),window.addEventListener("pageshow",f),document.addEventListener("visibilitychange",h),document.addEventListener("focusin",f),document.addEventListener("focusout",f),()=>{clearTimeout(d),o(!1),e.removeEventListener("resize",u),e.removeEventListener("scroll",u),window.removeEventListener("pageshow",f),document.removeEventListener("visibilitychange",h),document.removeEventListener("focusin",f),document.removeEventListener("focusout",f),l()}},[])}function ws(){const e=De(r=>r.setOnline),n=De(r=>r.setToken);return D.useCallback((r,i)=>{e(r),i instanceof Dr&&i.status===401&&n(null)},[e,n])}function xg(){const e=ws(),n=De(i=>i.setUpdate),r=gn({queryKey:["state"],queryFn:()=>Ne.state(),refetchInterval:2500});return D.useEffect(()=>{r.isSuccess&&(e(!0),n(r.data.update??null)),r.isError&&e(!1,r.error)},[r.isSuccess,r.isError,r.error,r.data,e,n]),r}function tF(){const e=ws();D.useEffect(()=>{let i=!0,l=!1,o=!1,u=!1,d=null;const f=v=>{const k=_w(v,De.getState().focusedDraft);De.getState().applySyncedPrefs(k.state),k.needsUpload&&g(!1)},h=async(v,k=!1)=>{if(!i)return;if(l){o||=v,u||=k;return}l=!0;const B=c9();try{const _=v?await Ne.patchPrefs(Dw(),k):await Ne.prefs();if(!i)return;e(!0),f(_.prefs),c9()!==B&&g(!1)}catch(_){if(!i)return;_ instanceof Dr&&_.status===404||e(!1,_)}finally{if(l=!1,i&&o){const _=u;o=!1,u=!1,h(!0,_)}}};function g(v,k=!1){d&&clearTimeout(d),d=null,v?h(!0,k):d=setTimeout(()=>{h(!0)},700)}const p=Mw(v=>g(v)),y=setInterval(()=>{h(!1)},15e3),b=()=>{document.visibilityState==="hidden"?g(!0,!0):h(!1)},C=()=>g(!0);return document.addEventListener("visibilitychange",b),window.addEventListener("online",C),h(!0),()=>{i=!1,d&&clearTimeout(d),clearInterval(y),p(),document.removeEventListener("visibilitychange",b),window.removeEventListener("online",C)}},[e])}function dg(){return gn({queryKey:["repos"],queryFn:()=>Ne.repos(),staleTime:6e4})}function nF(e,n){const[r,i]=D.useState(e);return D.useEffect(()=>{const l=setTimeout(()=>i(e),n);return()=>clearTimeout(l)},[e,n]),r}function rF(e,n=[],r=!0){const i=e.trim();return gn({queryKey:["search",i,n,r],queryFn:()=>Ne.search(i,n,r),enabled:i.length>=2,staleTime:3e4,placeholderData:s4})}function aF(e,n){const r=ws(),i=gn({queryKey:["workspace",e],queryFn:()=>Ne.workspace(e),enabled:n&&!!e,staleTime:Number.POSITIVE_INFINITY,retry:(l,o)=>!(o instanceof Dr&&o.status===404)&&l<1});return D.useEffect(()=>{i.isError&&!(i.error instanceof Dr&&i.error.status===404)&&r(!1,i.error)},[i.isError,i.error,r]),i}function fg(e,n=!0){const r=ws(),i=gn({queryKey:["sessions",e],queryFn:()=>Ne.sessions(e),enabled:!!e,refetchInterval:n?2e3:!1});return D.useEffect(()=>{i.isError&&r(!1,i.error)},[i.isError,i.error,r]),i}function iF(e,n,r=!1){return gn({queryKey:["workspaceFiles",e],queryFn:()=>Ne.workspaceFiles(e),enabled:n&&!!e,staleTime:12e4,refetchInterval:r?5e3:!1,retry:!1})}function sF(e){return gn({queryKey:["dev-server",e],queryFn:()=>Ne.devServer(e),enabled:!!e,refetchInterval:2500})}function lF(e,n){const r=ws(),i=gn({queryKey:["diff",e],queryFn:()=>Ne.diff(e),enabled:n&&!!e,refetchInterval:5e3});return D.useEffect(()=>{i.isError&&r(!1,i.error)},[i.isError,i.error,r]),i}function oF(e,n,r){return gn({queryKey:["fileDiff",e,n],queryFn:()=>Ne.fileDiff(e,n),enabled:r&&!!e&&!!n,refetchInterval:5e3,retry:!1})}function cF(e,n){return gn({queryKey:["filePreview",e],queryFn:()=>Ne.filePreview(e),enabled:n&&!!e,refetchInterval:5e3,retry:!1})}function uF(e){return gn({queryKey:["repoIcon",e],queryFn:()=>Ne.repoIcon(e),enabled:!!e,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function xF(e,n){return gn({queryKey:["logs",e],queryFn:()=>Ne.logs(e),enabled:n,refetchInterval:3e3,retry:!1})}function cc(){return gn({queryKey:["model-catalog"],queryFn:Ne.modelCatalog,staleTime:6e4,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function hg(){return gn({queryKey:["model-defaults"],queryFn:Ne.modelDefaults,staleTime:0,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function dF(e){return gn({queryKey:["plan-usage"],queryFn:()=>Ne.planUsage(),enabled:e,staleTime:6e4,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function pg(e,n=!0,r){return gn({queryKey:["context-breakdown",e,r??null],queryFn:()=>Ne.contextBreakdown(e),enabled:n&&!!e,staleTime:0,retry:!1})}function uf(e=!0){return gn({queryKey:["roles"],queryFn:Ne.roles,enabled:e,staleTime:3e4,retry:!1})}function fF(e,n,r){const i=e?.agent_type??"claude",l=xr();return gn({queryKey:["models",i],queryFn:async()=>{const o=await Ne.models(e.id,n);if(!o.ok||!o.models?.length)throw new Error(o.error??"could not read the model list");return await l.invalidateQueries({queryKey:["model-catalog"]}),o},enabled:r&&!!e,staleTime:0,gcTime:Number.POSITIVE_INFINITY,retry:!1})}const hF=(e,n)=>e.length===n.length&&e.every((r,i)=>r.id===n[i].id&&r.text===n[i].text);function pF(e,n=!0){const r=ws(),[i,l]=D.useState({entries:[],queued:[],loading:!0,error:null}),o=D.useRef(0),u=De(h=>h.push.deviceId),d=D.useRef(u);return d.current=u,D.useEffect(()=>{if(!e){l({entries:[],queued:[],loading:!1,error:null});return}o.current=0,l({entries:[],queued:[],loading:!0,error:null});let h=!0,g=!1;const p=async()=>{if(!g){g=!0;try{const b=document.visibilityState==="visible"?d.current:null,{entries:C,queued:v=[],cursor:k}=await Ne.messages(e,o.current,b);if(!h)return;r(!0),o.current=k,l(B=>{const _=C.length?Zw(B.entries,C):B.entries,S=hF(B.queued,v);return _===B.entries&&S&&!B.loading&&!B.error?B:{entries:_,queued:S?B.queued:v,loading:!1,error:null}})}catch(b){if(!h)return;r(!1,b),l(C=>({...C,loading:!1,error:b instanceof Error?b.message:String(b)}))}finally{g=!1}}};p();const y=n?setInterval(p,1e3):void 0;return()=>{h=!1,y&&clearInterval(y)}},[e,n,r]),{entries:D.useMemo(()=>Ww(i.entries,i.queued),[i.entries,i.queued]),loading:i.loading,error:i.error}}function mg(){const e=xr(),n=De(u=>u.addPending),r=De(u=>u.failPending),i=De(u=>u.removePending),l=De(u=>u.markWorking),o=De(u=>u.clearAgentDraft);return D.useCallback(async u=>{const d=u.text.trim();if(!d)return!1;const f=u.id??crypto.randomUUID(),{sessionId:h,workspaceId:g}=u;n({id:f,sessionId:h,workspaceId:g,text:d,queue:u.queue,workflow:u.workflow});try{const p=De.getState().agentDrafts[h],y=!u.workflow&&p&&Object.keys(p).length?p:void 0,b=await Ne.sendPrompt(h,d,g,y,f,u.queue,u.workflow);if(b.ok||b.parked){const C=u.workflow?p:y;return C&&(o(h,C),e.invalidateQueries({queryKey:["sessions",g]})),b.ok&&l(h),e.invalidateQueries({queryKey:["state"]}),setTimeout(()=>i(f),4e3),!0}r(f,b.error||"Send failed")}catch(p){r(f,p instanceof Error?p.message:String(p))}return!1},[n,r,i,l,o,e])}function gg(e){return gn({queryKey:["push"],queryFn:()=>Ne.push(),enabled:e,staleTime:3e4})}function mF(){const[e]=D.useState(sg),n=De(l=>l.setPush),{data:r}=gg(e==="ok"),i=r?.publicKey;D.useEffect(()=>{if(e!=="ok"||!i)return;let l=!0;return Kw(i).then(o=>{l&&n({deviceId:o?.id??null,devices:o?.devices??0})}).catch(()=>{}),()=>{l=!1}},[e,i,n])}function gF(){const[e]=D.useState(sg),[n,r]=D.useState(()=>"Notification"in window?Notification.permission:"unsupported"),[i,l]=D.useState(!1),[o,u]=D.useState(null),{deviceId:d,devices:f}=De(v=>v.push),h=De(v=>v.setPush),g=gg(e==="ok"),p=g.data?.publicKey,y=D.useCallback(async()=>{l(!0),u(null);try{const v=await Notification.requestPermission();if(r(v),v!=="granted"){u(v==="denied"?"Notifications are blocked for this app — allow them in your device settings, then try again.":"Notification permission wasn’t granted.");return}const k=p??(await Ne.push()).publicKey,B=await cg(k),_=await Ne.pushSubscribe(ug(B),lg());h({deviceId:_.id??null,devices:_.devices.length})}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}},[p,h]),b=D.useCallback(async()=>{l(!0),u(null);try{const v=await og();let k=0;v&&(k=(await Ne.pushUnsubscribe(v.endpoint).catch(()=>null))?.devices.length??0,await v.unsubscribe()),h({deviceId:null,devices:k})}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}},[h]),C=D.useCallback(async()=>{if(d){l(!0),u(null);try{const v=await Ne.pushTest(d);v.ok||u(v.error??"The push service rejected it.")}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}}},[d]);return{support:e,permission:n,enabled:!!d,relayDisabled:g.data?.enabled===!1,busy:i,error:o,devices:f,enable:y,disable:b,test:C}}const EF="push-route",m9="/__push-route",yF=12e4;async function g9(){if(!("caches"in window))return null;try{const e=await caches.open(EF),n=await e.match(m9);if(!n)return null;await e.delete(m9);const{url:r,ts:i}=await n.json();return typeof r!="string"||!r.startsWith("/")||typeof i!="number"||Date.now()-i>yF?null:r}catch{return null}}function bF(){const e=_i();D.useEffect(()=>{let n=!0;const r=()=>{g9().then(o=>{n&&o&&e(o)})},i=o=>{const u=o.data;u?.type==="push-navigate"&&typeof u.url=="string"&&u.url.startsWith("/")&&(g9(),e(u.url))},l=()=>{document.visibilityState==="visible"&&r()};return"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",i),document.addEventListener("visibilitychange",l),r(),()=>{n=!1,"serviceWorker"in navigator&&navigator.serviceWorker.removeEventListener("message",i),document.removeEventListener("visibilitychange",l)}},[e])}function CF(e,n){D.useEffect(()=>{if(!e)return;const r=()=>{document.visibilityState==="visible"&&Qw(e)};return r(),document.addEventListener("visibilitychange",r),()=>document.removeEventListener("visibilitychange",r)},[e,n])}function Eg(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=Eg(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function vF(){for(var e,n,r=0,i="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=Eg(e))&&(i&&(i+=" "),i+=n);return i}const AF=(e,n)=>{const r=new Array(e.length+n.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<n.length;i++)r[e.length+i]=n[i];return r},kF=(e,n)=>({classGroupId:e,validator:n}),yg=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),X0="-",E9=[],BF="arbitrary..",DF=e=>{const n=FF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return wF(u);const d=u.split(X0),f=d[0]===""&&d.length>1?1:0;return bg(d,f,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=i[u],h=r[u];return f?h?AF(h,f):f:h||E9}return r[u]||E9}}},bg=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const l=e[n],o=r.nextPart.get(l);if(o){const h=bg(e,n+1,o);if(h)return h}const u=r.validators;if(u===null)return;const d=n===0?e.join(X0):e.slice(n).join(X0),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},wF=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),i=n.slice(0,r);return i?BF+i:void 0})(),FF=e=>{const{theme:n,classGroups:r}=e;return SF(r,n)},SF=(e,n)=>{const r=yg();for(const i in e){const l=e[i];xf(l,r,i,n)}return r},xf=(e,n,r,i)=>{const l=e.length;for(let o=0;o<l;o++){const u=e[o];NF(u,n,r,i)}},NF=(e,n,r,i)=>{if(typeof e=="string"){_F(e,n,r);return}if(typeof e=="function"){MF(e,n,r,i);return}jF(e,n,r,i)},_F=(e,n,r)=>{const i=e===""?n:Cg(n,e);i.classGroupId=r},MF=(e,n,r,i)=>{if(TF(e)){xf(e(i),n,r,i);return}n.validators===null&&(n.validators=[]),n.validators.push(kF(r,e))},jF=(e,n,r,i)=>{const l=Object.entries(e),o=l.length;for(let u=0;u<o;u++){const[d,f]=l[u];xf(f,Cg(n,d),r,i)}},Cg=(e,n)=>{let r=e;const i=n.split(X0),l=i.length;for(let o=0;o<l;o++){const u=i[o];let d=r.nextPart.get(u);d||(d=yg(),r.nextPart.set(u,d)),r=d}return r},TF=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,RF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),i=Object.create(null);const l=(o,u)=>{r[o]=u,n++,n>e&&(n=0,i=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=i[o])!==void 0)return l(o,u),u},set(o,u){o in r?r[o]=u:l(o,u)}}},bd="!",y9=":",OF=[],b9=(e,n,r,i,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:i,isExternal:l}),zF=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=l=>{const o=[];let u=0,d=0,f=0,h;const g=l.length;for(let v=0;v<g;v++){const k=l[v];if(u===0&&d===0){if(k===y9){o.push(l.slice(f,v)),f=v+1;continue}if(k==="/"){h=v;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const p=o.length===0?l:l.slice(f);let y=p,b=!1;p.endsWith(bd)?(y=p.slice(0,-1),b=!0):p.startsWith(bd)&&(y=p.slice(1),b=!0);const C=h&&h>f?h-f:void 0;return b9(o,b,y,C)};if(n){const l=n+y9,o=i;i=u=>u.startsWith(l)?o(u.slice(l.length)):b9(OF,!1,u,void 0,!0)}if(r){const l=i;i=o=>r({className:o,parseClassName:l})}return i},LF=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{n.set(r,1e6+i)}),r=>{const i=[];let l=[];for(let o=0;o<r.length;o++){const u=r[o],d=u[0]==="[",f=n.has(u);d||f?(l.length>0&&(l.sort(),i.push(...l),l=[]),i.push(u)):l.push(u)}return l.length>0&&(l.sort(),i.push(...l)),i}},PF=e=>({cache:RF(e.cacheSize),parseClassName:zF(e),sortModifiers:LF(e),postfixLookupClassGroupIds:IF(e),...DF(e)}),IF=e=>{const n=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let i=0;i<r.length;i++)n[r[i]]=!0;return n},UF=/\s+/,HF=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:o,postfixLookupClassGroupIds:u}=n,d=[],f=e.trim().split(UF);let h="";for(let g=f.length-1;g>=0;g-=1){const p=f[g],{isExternal:y,modifiers:b,hasImportantModifier:C,baseClassName:v,maybePostfixModifierPosition:k}=r(p);if(y){h=p+(h.length>0?" "+h:h);continue}let B=!!k,_;if(B){const R=v.substring(0,k);_=i(R);const L=_&&u[_]?i(v):void 0;L&&L!==_&&(_=L,B=!1)}else _=i(v);if(!_){if(!B){h=p+(h.length>0?" "+h:h);continue}if(_=i(v),!_){h=p+(h.length>0?" "+h:h);continue}B=!1}const S=b.length===0?"":b.length===1?b[0]:o(b).join(":"),M=C?S+bd:S,T=M+_;if(d.indexOf(T)>-1)continue;d.push(T);const w=l(_,B);for(let R=0;R<w.length;++R){const L=w[R];d.push(M+L)}h=p+(h.length>0?" "+h:h)}return h},$F=(...e)=>{let n=0,r,i,l="";for(;n<e.length;)(r=e[n++])&&(i=vg(r))&&(l&&(l+=" "),l+=i);return l},vg=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=vg(e[i]))&&(r&&(r+=" "),r+=n);return r},qF=(e,...n)=>{let r,i,l,o;const u=f=>{const h=n.reduce((g,p)=>p(g),e());return r=PF(h),i=r.cache.get,l=r.cache.set,o=d,d(f)},d=f=>{const h=i(f);if(h)return h;const g=HF(f,r);return l(f,g),g};return o=u,(...f)=>o($F(...f))},GF=[],bn=e=>{const n=r=>r[e]||GF;return n.isThemeGetter=!0,n},Ag=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VF=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,KF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ya=e=>VF.test(e),at=e=>!!e&&!Number.isNaN(Number(e)),Ur=e=>!!e&&Number.isInteger(Number(e)),Nx=e=>e.endsWith("%")&&at(e.slice(0,-1)),fa=e=>QF.test(e),Bg=()=>!0,WF=e=>YF.test(e)&&!KF.test(e),df=()=>!1,JF=e=>XF.test(e),eS=e=>ZF.test(e),tS=e=>!Se(e)&&!Me(e),nS=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),rS=e=>Ja(e,Fg,df),Se=e=>Ag.test(e),bi=e=>Ja(e,Sg,WF),C9=e=>Ja(e,xS,at),aS=e=>Ja(e,_g,Bg),iS=e=>Ja(e,Ng,df),v9=e=>Ja(e,Dg,df),sS=e=>Ja(e,wg,eS),_0=e=>Ja(e,Mg,JF),Me=e=>kg.test(e),wl=e=>Mi(e,Sg),lS=e=>Mi(e,Ng),A9=e=>Mi(e,Dg),oS=e=>Mi(e,Fg),cS=e=>Mi(e,wg),M0=e=>Mi(e,Mg,!0),uS=e=>Mi(e,_g,!0),Ja=(e,n,r)=>{const i=Ag.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},Mi=(e,n,r=!1)=>{const i=kg.exec(e);return i?i[1]?n(i[1]):r:!1},Dg=e=>e==="position"||e==="percentage",wg=e=>e==="image"||e==="url",Fg=e=>e==="length"||e==="size"||e==="bg-size",Sg=e=>e==="length",xS=e=>e==="number",Ng=e=>e==="family-name",_g=e=>e==="number"||e==="weight",Mg=e=>e==="shadow",dS=()=>{const e=bn("color"),n=bn("font"),r=bn("text"),i=bn("font-weight"),l=bn("tracking"),o=bn("leading"),u=bn("breakpoint"),d=bn("container"),f=bn("spacing"),h=bn("radius"),g=bn("shadow"),p=bn("inset-shadow"),y=bn("text-shadow"),b=bn("drop-shadow"),C=bn("blur"),v=bn("perspective"),k=bn("aspect"),B=bn("ease"),_=bn("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...M(),Me,Se],w=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],L=()=>[Me,Se,f],I=()=>[Ya,"full","auto",...L()],O=()=>[Ur,"none","subgrid",Me,Se],$=()=>["auto",{span:["full",Ur,Me,Se]},Ur,Me,Se],Q=()=>[Ur,"auto",Me,Se],le=()=>["auto","min","max","fr",Me,Se],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...L()],V=()=>[Ya,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],X=()=>[Ya,"screen","full","dvw","lvw","svw","min","max","fit",...L()],fe=()=>[Ya,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],j=()=>[e,Me,Se],z=()=>[...M(),A9,v9,{position:[Me,Se]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",oS,rS,{size:[Me,Se]}],te=()=>[Nx,wl,bi],ae=()=>["","none","full",h,Me,Se],xe=()=>["",at,wl,bi],ve=()=>["solid","dashed","dotted","double"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[at,Nx,A9,v9],nt=()=>["","none",C,Me,Se],ot=()=>["none",at,Me,Se],$t=()=>["none",at,Me,Se],Ct=()=>[at,Me,Se],we=()=>[Ya,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[Bg],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[tS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",at],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ya,Se,Me,k]}],container:["container"],"container-type":[{"@container":["","normal","size",Me,Se]}],"container-named":[nS],columns:[{columns:[at,Se,Me,d]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Ur,"auto",Me,Se]}],basis:[{basis:[Ya,"full","auto",d,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[at,Ya,"auto","initial","none",Se]}],grow:[{grow:["",at,Me,Se]}],shrink:[{shrink:["",at,Me,Se]}],order:[{order:[Ur,"first","last","none",Me,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...V()]}],"min-w":[{"min-w":[d,"screen","none",...V()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,wl,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,uS,aS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nx,Se]}],"font-family":[{font:[lS,iS,n]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Me,Se]}],"line-clamp":[{"line-clamp":[at,"none",Me,C9]}],leading:[{leading:[o,...L()]}],"list-image":[{"list-image":["none",Me,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[at,"from-font","auto",Me,bi]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[at,"auto",Me,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[Ur,Me,Se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ur,Me,Se],radial:["",Me,Se],conic:[Ur,Me,Se]},cS,sS]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[at,Me,Se]}],"outline-w":[{outline:["",at,wl,bi]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",g,M0,_0]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",p,M0,_0]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[at,bi]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",y,M0,_0]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[at,Me,Se]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[at]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Me,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[at]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Se]}],filter:[{filter:["","none",Me,Se]}],blur:[{blur:nt()}],brightness:[{brightness:[at,Me,Se]}],contrast:[{contrast:[at,Me,Se]}],"drop-shadow":[{"drop-shadow":["","none",b,M0,_0]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",at,Me,Se]}],"hue-rotate":[{"hue-rotate":[at,Me,Se]}],invert:[{invert:["",at,Me,Se]}],saturate:[{saturate:[at,Me,Se]}],sepia:[{sepia:["",at,Me,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Se]}],"backdrop-blur":[{"backdrop-blur":nt()}],"backdrop-brightness":[{"backdrop-brightness":[at,Me,Se]}],"backdrop-contrast":[{"backdrop-contrast":[at,Me,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",at,Me,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[at,Me,Se]}],"backdrop-invert":[{"backdrop-invert":["",at,Me,Se]}],"backdrop-opacity":[{"backdrop-opacity":[at,Me,Se]}],"backdrop-saturate":[{"backdrop-saturate":[at,Me,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",at,Me,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[at,"initial",Me,Se]}],ease:[{ease:["linear","initial",B,Me,Se]}],delay:[{delay:[at,Me,Se]}],animate:[{animate:["none",_,Me,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Me,Se]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:ot()}],"rotate-x":[{"rotate-x":ot()}],"rotate-y":[{"rotate-y":ot()}],"rotate-z":[{"rotate-z":ot()}],scale:[{scale:$t()}],"scale-x":[{"scale-x":$t()}],"scale-y":[{"scale-y":$t()}],"scale-z":[{"scale-z":$t()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[Me,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],zoom:[{zoom:[Ur,Me,Se]}],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,Se]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[at,wl,bi,C9]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fS=qF(dS);function pe(...e){return fS(vF(e))}const hS=200,jg=1e3;function pS(e,n){if(!e||e.length>jg)return null;let r;try{r=decodeURIComponent(e)}catch{return null}if(!X8(r)||r.includes("\0")||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")||r.split("/").includes(".."))return null;if(r.startsWith("/")||r.startsWith("~/"))return r;const i=r.replace(/^(?:\.\/)+/,"");return i?n?`${n}/${i}`:i:null}function mS(e,n){if(!e||e.length>jg||e.includes("\0")||!/^\.context\/attachments\/[A-Za-z0-9]{6}\/[^/]+$/.test(e))return null;const r=X8(e)?"image":sf(e)?"source":null;return r?{reference:n?`${n}/${e}`:e,kind:r}:null}function Tg(e,n){const r=new Map;for(const i of n??[]){const l=i.slice(i.lastIndexOf("/")+1),o=r.get(l);o?o.push(i):r.set(l,[i])}return i=>{const l=gS(i);if(!l)return null;const{path:o,location:u}=l;if(o.startsWith("/")||o.startsWith("~/"))return o+u;if(!e)return null;const d=ES(r,o);return d?`${e}/${d}${u}`:null}}function gS(e){if(!e||e.length>hS||/\s/.test(e)||e.includes("://"))return null;const n=e.match(/:([1-9]\d*)(?::\d+)?$/),r=n?n[0]:"",i=n?e.slice(0,-r.length):e;return i.startsWith("../")||i.includes("/../")?null:sf(i)?{path:i.startsWith("./")?i.slice(2):i,location:r}:null}function ES(e,n){const r=n.slice(n.lastIndexOf("/")+1),i=e.get(r);if(!i)return null;const l=i.filter(o=>o===n||o.endsWith(`/${n}`));return l.length===1?l[0]:null}const uc=D.createContext(null),yS=uc.Provider,bS=Tg(null,void 0);function Rg(e){const n=D.useContext(uc)?.resolveMention??bS;return e===null?null:n(e)}function Og(e){return pS(e,D.useContext(uc)?.worktree??null)}function CS(e){return mS(e,D.useContext(uc)?.worktree??null)}function k9(e){return e.endsWith(".0")?e.slice(0,-2):e}function $0(e){return e>=1e6?`${k9((e/1e6).toFixed(e<1e7?1:0))}M`:e>=1e3?`${k9((e/1e3).toFixed(e<1e5?1:0))}k`:String(e)}function B9(e,n){if(e<=0||n<=0)return"0%";const r=e/n*100;return r<1?"<1%":`${Math.round(r)}%`}function vS(e){const n=[],r=e.split(GD);for(let i=0;i<r.length;i++){const l=r[i];if(i===0){l&&n.push({text:l,hit:!1});continue}const o=l.indexOf(VD);if(o<0){l&&n.push({text:l,hit:!0});continue}const u=l.slice(0,o),d=l.slice(o+1);u&&n.push({text:u,hit:!0}),d&&n.push({text:d,hit:!1})}return n}function zg(e){return e.state==="setting_up"}const AS={merged:"var(--color-pr-merged)",draft:"var(--color-pr-draft)",conflicts:"var(--color-pr-attention)",checks_failed:"var(--color-pr-attention)",checks_pending:"var(--color-working)",mergeable:"var(--color-pr-mergeable)"};function kS(e){return zg(e)?{color:"var(--color-muted)",spinning:!0}:{color:e.pr_status&&AS[e.pr_status]||"var(--color-done)",spinning:e.session_status==="working"||e.pr_status==="checks_pending"}}function BS(e){return e.pr_status==="merged"}function DS(e){return ff(e)==="done"}function ff(e){return zg(e)?"setting-up":e.manual_status||e.derived_status||"in-progress"}const D9=["done","in-review","in-progress","setting-up","backlog","canceled"],wS=["backlog","in-progress","in-review","done","canceled"];function Cd(e){return{done:"Done","in-review":"In review","in-progress":"In progress","setting-up":"Setting up",backlog:"Backlog",canceled:"Canceled"}[e]??e}const FS=["today","yesterday","week","month","older"];function SS(e){return{today:"Today",yesterday:"Yesterday",week:"Past week",month:"Past month",older:"Older"}[e]}function w9(e){const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()}function NS(e,n=new Date){const r=new Date(Xn(e));if(!Number.isFinite(r.getTime()))return"older";const i=Math.round((w9(n)-w9(r))/864e5);return i<=0?"today":i===1?"yesterday":i<7?"week":i<30?"month":"older"}const hf={done:"var(--color-pr-merged)","in-review":"var(--color-pr-mergeable)","in-progress":"var(--color-done)","setting-up":"var(--color-muted)"};function pf(e,n=120){const i=(e.split(`
|
|
13
|
+
${r}`):i===r}function mw(e){const n=e;return!!n&&typeof n.id=="string"&&typeof n.sessionId=="string"&&typeof n.workspaceId=="string"&&typeof n.text=="string"&&typeof n.createdAt=="number"&&(n.workflow===void 0||typeof n.workflow=="boolean")&&(n.status==="sending"||n.status==="error")}const gw=e=>e.status==="sending"?{...e,status:"error",interrupted:!0,error:"Never confirmed — the app reloaded"}:e;function Ew(){try{const e=JSON.parse(localStorage.getItem(pd)??"[]");if(!Array.isArray(e))return[];const n=Date.now()-pw;return e.filter(mw).filter(r=>r.createdAt>n).slice(-W8).map(gw)}catch{return[]}}function yw(e){try{const n=e.slice(-W8);n.length?localStorage.setItem(pd,JSON.stringify(n)):localStorage.removeItem(pd)}catch{}}const w0="conductor-remote-agent:",F0="conductor-remote-draft:",da="new-workspace",s9="conductor-remote-read",eg=(e,n,r)=>(e[n]??"")<r;function bw(e,n){return(e.unread_sessions??[]).filter(r=>eg(n,r.id,r.at)).length}function Cw(e,n){return!!e.unread_count&&eg(n,e.id,e.updated_at)}const l9="conductor-remote-prefs-v1";function Ar(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function md(e){const n=Ar(e);if(!n)return{};const r={};return typeof n.model=="string"&&(r.model=n.model),typeof n.effort=="string"&&(r.effort=n.effort),typeof n.plan=="boolean"&&(r.plan=n.plan),typeof n.fast=="boolean"&&(r.fast=n.fast),r}function ys(e){return Object.keys(e).length>0}function vw(e){const n=Ar(e);return!n||typeof n.name!="string"||typeof n.path!="string"||typeof n.token!="string"||!Number.isSafeInteger(Number(n.bytes))||Number(n.bytes)<0||n.stageId!==void 0&&typeof n.stageId!="string"?null:{name:n.name,path:n.path,bytes:Number(n.bytes),token:n.token,...n.stageId?{stageId:n.stageId}:{}}}function tg(e){if(!Array.isArray(e))return[];const n=new Set;return e.flatMap(r=>{const i=vw(r);return!i||n.has(i.path)?[]:(n.add(i.path),[i])})}function o9(e){const n=Ar(e);if(!n)return null;const r=Number(n.updatedAt);return!Number.isSafeInteger(r)||r<0?null:n.deleted===!0?{text:"",agent:{},attachments:[],updatedAt:r,deleted:!0}:typeof n.text!="string"?null:{text:n.text,agent:md(n.agent),attachments:tg(n.attachments),updatedAt:r,deleted:!1}}function ng(e,n){return e.model===n.model&&e.effort===n.effort&&e.plan===n.plan&&e.fast===n.fast}function Aw(e,n){return e.text===n.text&&e.updatedAt===n.updatedAt&&e.deleted===n.deleted&&ng(e.agent,n.agent)&&e.attachments.length===n.attachments.length&&e.attachments.every((r,i)=>{const l=n.attachments[i];return r.name===l?.name&&r.path===l.path&&r.bytes===l.bytes&&r.token===l.token&&r.stageId===l.stageId})}function ms(e,n,r,i){return e||ys(n)||r.length?{text:e,agent:{...n},attachments:tg(r),updatedAt:i,deleted:!1}:{text:"",agent:{},attachments:[],updatedAt:i,deleted:!0}}class kw{storage;prefs;clock;generation=0;touched=new Set;listeners=new Set;constructor(n){this.storage=n;const r=this.readRawDrafts(),i=this.readRawAgents(),l=this.readMetadata(),o=l?.drafts??{};if(this.clock=Math.max(Date.now(),...Object.values(o).map(u=>u.updatedAt)),l){const u={...o};for(const d of new Set([...Object.keys(o),...Object.keys(r),...Object.keys(i)])){const f=ms(r[d]??"",i[d]??{},[],o[d]?.updatedAt??0),h=o[d];!(h&&!h.deleted&&h.attachments.length>0&&!h.text&&!ys(h.agent)&&f.deleted)&&(!h||h.text!==f.text||h.deleted!==f.deleted||!ng(h.agent,f.agent))&&(u[d]=ms(f.text,f.agent,[],this.tick()),this.touched.add(d))}this.prefs={readMarks:this.readRawMarks(),drafts:u}}else{const u={};for(const d of new Set([...Object.keys(r),...Object.keys(i)]))u[d]=ms(r[d]??"",i[d]??{},[],0);this.prefs={readMarks:this.readRawMarks(),drafts:u}}this.persistAll()}snapshot(){return{readMarks:{...this.prefs.readMarks},drafts:Object.fromEntries(Object.entries(this.prefs.drafts).map(([n,r])=>[n,{...r,agent:{...r.agent},attachments:r.attachments.map(i=>({...i}))}]))}}project(){const n={},r={},i={};for(const[l,o]of Object.entries(this.prefs.drafts))o.deleted||(n[l]=o.text,ys(o.agent)&&(r[l]={...o.agent}),o.attachments.length&&(i[l]=o.attachments.map(u=>({...u}))));return{drafts:n,agentDrafts:r,draftAttachments:i,readMarks:{...this.prefs.readMarks}}}currentGeneration(){return this.generation}setDraft(n,r,i){return this.setLocal(n,r,i,this.prefs.drafts[n]?.attachments??[]),this.project()}setAgent(n,r,i){return this.setLocal(n,i,r,this.prefs.drafts[n]?.attachments??[]),this.project()}setAttachments(n,r,i,l){return this.setLocal(n,i,l,r),this.project()}setContent(n,r,i,l){return this.setLocal(n,r,i,l),this.project()}moveDraft(n,r){const i=this.prefs.drafts[n],l=this.prefs.drafts[r];return!i||i.deleted||n===r||l&&!l.deleted?this.project():(this.prefs.drafts[n]=ms("",{},[],this.tick()),this.prefs.drafts[r]=ms(i.text,i.agent,i.attachments,this.tick()),this.touched.add(n),this.touched.add(r),this.changed(),this.project())}markRead(n,r){return(this.prefs.readMarks[n]??"")>=r?this.project():(this.prefs.readMarks[n]=r,this.changed(),this.project())}merge(n,r){const i=Ar(Ar(n)?.drafts),l=this.cleanPrefs(n);for(const d of Object.values(l.drafts))this.clock=Math.max(this.clock,d.updatedAt);let o=!1,u=!1;for(const[d,f]of Object.entries(l.readMarks))(this.prefs.readMarks[d]??"")>=f||(this.prefs.readMarks[d]=f,o=!0);for(const[d,f]of Object.entries(this.prefs.readMarks))(l.readMarks[d]??"")<f&&(u=!0);for(const d of new Set([...Object.keys(this.prefs.drafts),...Object.keys(l.drafts)])){const f=this.prefs.drafts[d],h=l.drafts[d],g=Ar(i?.[d]);if(f&&h&&!h.deleted&&g&&!Object.hasOwn(g,"attachments")&&(h.attachments=f.attachments.map(b=>({...b}))),!f&&h){this.prefs.drafts[d]=h,o=!0;continue}if(f&&!h){u=!0;continue}if(!(f&&h)||Aw(f,h))continue;const p=r===d&&(this.touched.has(d)||!f.deleted&&(f.text.length>0||ys(f.agent)||f.attachments.length>0)),y=h.updatedAt>f.updatedAt||h.updatedAt===f.updatedAt&&(h.deleted||!f.deleted);if(y&&!p){this.prefs.drafts[d]=h,o=!0;continue}y&&(f.updatedAt=this.tick(h.updatedAt),o=!0),u=!0}return o&&this.persistAll(),{state:this.project(),needsUpload:u}}subscribe(n){return this.listeners.add(n),()=>this.listeners.delete(n)}requestFlush(){for(const n of this.listeners)n(!0)}setLocal(n,r,i,l){this.prefs.drafts[n]=ms(r,md(i),l,this.tick()),this.touched.add(n),this.changed()}changed(){this.generation+=1,this.persistAll();for(const n of this.listeners)n(!1)}tick(n=0){return this.clock=Math.max(Date.now(),this.clock+1,n+1),this.clock}cleanPrefs(n){const r=Ar(n),i={};for(const[o,u]of Object.entries(Ar(r?.readMarks)??{}))typeof u=="string"&&(i[o]=u);const l={};for(const[o,u]of Object.entries(Ar(r?.drafts)??{})){const d=o9(u);d&&(l[o]=d)}return{readMarks:i,drafts:l}}readMetadata(){try{const n=Ar(JSON.parse(this.storage.getItem(l9)??"null"));if(n?.version!==1)return null;const r={};for(const[i,l]of Object.entries(Ar(n.drafts)??{})){const o=o9(l);o&&(r[i]=o)}return{drafts:r}}catch{return null}}readRawDrafts(){const n={};try{for(let r=0;r<this.storage.length;r++){const i=this.storage.key(r);if(!i?.startsWith(F0))continue;const l=this.storage.getItem(i);l&&(n[i.slice(F0.length)]=l)}}catch{}return n}readRawAgents(){const n={};try{for(let r=0;r<this.storage.length;r++){const i=this.storage.key(r);if(!i?.startsWith(w0))continue;const l=this.storage.getItem(i);if(!l)continue;const o=md(JSON.parse(l));ys(o)&&(n[i.slice(w0.length)]=o)}}catch{}return n}readRawMarks(){try{const n=Ar(JSON.parse(this.storage.getItem(s9)??"{}"));return n?Object.fromEntries(Object.entries(n).filter(r=>typeof r[1]=="string")):{}}catch{return{}}}persistAll(){try{for(const[n,r]of Object.entries(this.prefs.drafts))!r.deleted&&r.text?this.storage.setItem(F0+n,r.text):this.storage.removeItem(F0+n),!r.deleted&&ys(r.agent)?this.storage.setItem(w0+n,JSON.stringify(r.agent)):this.storage.removeItem(w0+n);this.storage.setItem(s9,JSON.stringify(this.prefs.readMarks)),this.storage.setItem(l9,JSON.stringify({version:1,drafts:this.prefs.drafts}))}catch{}}}let Fx=null;function Sr(){return Fx||(Fx=new kw(localStorage)),Fx}const Bw=()=>Sr().project(),Dw=()=>Sr().snapshot(),c9=()=>Sr().currentGeneration(),ww=(e,n,r)=>Sr().setDraft(e,n,r),u9=(e,n,r)=>Sr().setAgent(e,n,r),x9=(e,n,r,i)=>Sr().setAttachments(e,n,r,i),Fw=(e,n,r,i)=>Sr().setContent(e,n,r,i),Sw=(e,n)=>Sr().moveDraft(e,n),Nw=(e,n)=>Sr().markRead(e,n),_w=(e,n)=>Sr().merge(e,n),Mw=e=>Sr().subscribe(e),gd=()=>Sr().requestFlush();function jw({total:e,shown:n,hidden:r,repoFiltered:i}){if(e)return!i&&!r?`${e} active`:[`${n} of ${e}`,r?`${r} hidden`:null].filter(Boolean).join(" · ")}const vs={mode:"all"};function Tw(e,n){if(e&&typeof e=="object"&&"mode"in e){if(e.mode==="all")return vs;if(e.mode==="selected"&&"repos"in e&&Array.isArray(e.repos))return{mode:"selected",repos:e.repos.filter(i=>typeof i=="string")}}const r=Array.isArray(n)?n.filter(i=>typeof i=="string"):typeof n=="string"?[n]:[];return r.length?{mode:"selected",repos:r}:vs}function of(e){return e.mode==="selected"?e.repos:[]}function Rw(){return{mode:"selected",repos:[]}}function Ed(e,n){return e.mode==="all"||e.repos.includes(n)}function Ow(e,n,r){const i=n.mode==="all"?[...e]:n.repos,l=i.includes(r)?i.filter(o=>o!==r):[...i,r];return e.length>0&&e.every(o=>l.includes(o))?vs:{mode:"selected",repos:l}}let gs=null;const S0=Bw(),yd=15e3,rg="conductor-remote-view",ag="conductor-remote-last-new-workspace-repo",d9={groupBy:"status",repoSelection:vs,sortBy:"updated",showDiffs:!0,hideMerged:!1,hideDone:!1,collapsed:[]};function f9(e){const n={};return e.model!==void 0&&(n.model=e.model),e.effort!==void 0&&(n.effort=e.effort),e.plan!==void 0&&(n.plan=e.plan),e.fast!==void 0&&(n.fast=e.fast),n}function zw(){try{const{repo:e,repos:n,repoSelection:r,...i}=JSON.parse(localStorage.getItem(rg)??"{}"),l=Tw(r,n??e);return{...d9,...i,repoSelection:l}}catch{return d9}}function Lw(){try{return localStorage.getItem(ag)??""}catch{return""}}const De=dw((e,n)=>{const r=l=>{localStorage.setItem(rg,JSON.stringify(l)),e({view:l})},i=l=>{yw(l),e({pending:l})};return{token:tw(),online:!0,lastSyncAt:null,update:null,workingHints:{},pending:Ew(),drafts:S0.drafts,draftAttachments:S0.draftAttachments,agentDrafts:S0.agentDrafts,readMarks:S0.readMarks,focusedDraft:null,push:{deviceId:null,devices:0},sidebarOpen:!location.pathname.startsWith("/w/"),lastNewWorkspaceRepo:Lw(),view:zw(),setToken:l=>{l?rw(l):nw(),e({token:l})},setOnline:l=>{if(l){gs&&clearTimeout(gs),gs=null,e({online:l,lastSyncAt:Date.now()});return}if(!n().online||gs)return;const o=hw(n().lastSyncAt);if(o===0){e({online:!1});return}gs=setTimeout(()=>{gs=null,e({online:!1})},o)},setUpdate:l=>e({update:l}),markWorking:l=>e({workingHints:{...n().workingHints,[l]:Date.now()}}),clearWorking:l=>{const{[l]:o,...u}=n().workingHints;e({workingHints:u})},addPending:l=>i([...n().pending.filter(o=>o.id!==l.id),{...l,status:"sending",error:void 0,createdAt:Date.now()}]),failPending:(l,o)=>i(n().pending.map(u=>u.id===l?{...u,status:"error",error:o}:u)),removePending:l=>i(n().pending.filter(o=>o.id!==l)),setDraft:(l,o)=>{const u=ww(l,o,n().agentDrafts[l]??{});e({drafts:u.drafts,agentDrafts:u.agentDrafts,draftAttachments:u.draftAttachments})},addDraftAttachment:(l,o)=>{const u=n().draftAttachments[l]??[];if(u.some(f=>f.path===o.path))return;const d=x9(l,[...u,o],n().drafts[l]??"",n().agentDrafts[l]??{});e({drafts:d.drafts,agentDrafts:d.agentDrafts,draftAttachments:d.draftAttachments})},removeDraftAttachment:(l,o)=>{const u=n().draftAttachments[l]??[],d=u.filter(h=>h.path!==o);if(d.length===u.length)return;const f=x9(l,d,n().drafts[l]??"",n().agentDrafts[l]??{});e({drafts:f.drafts,agentDrafts:f.agentDrafts,draftAttachments:f.draftAttachments})},clearDraftContent:l=>{const o=Fw(l,"",n().agentDrafts[l]??{},[]);e({drafts:o.drafts,agentDrafts:o.agentDrafts,draftAttachments:o.draftAttachments})},moveDraft:(l,o)=>{const u=n().drafts,f=u[l]!==void 0||n().agentDrafts[l]!==void 0||n().draftAttachments[l]!==void 0,h=u[o]!==void 0||n().agentDrafts[o]!==void 0||n().draftAttachments[o]!==void 0;if(!f||l===o||h)return;const g=Sw(l,o);e({drafts:g.drafts,agentDrafts:g.agentDrafts,draftAttachments:g.draftAttachments})},markRead:(l,o)=>{(n().readMarks[l]??"")>=o||e({readMarks:Nw(l,o).readMarks})},stageAgent:(l,o)=>{const u=f9({...n().agentDrafts[l],...o}),d=u9(l,u,n().drafts[l]??"");e({drafts:d.drafts,agentDrafts:d.agentDrafts,draftAttachments:d.draftAttachments})},clearAgentDraft:(l,o)=>{const u=n().agentDrafts[l];if(!u)return;const d=f9({model:u.model===o.model?void 0:u.model,effort:u.effort===o.effort?void 0:u.effort,plan:u.plan===o.plan?void 0:u.plan,fast:u.fast===o.fast?void 0:u.fast}),f=u9(l,d,n().drafts[l]??"");e({drafts:f.drafts,agentDrafts:f.agentDrafts,draftAttachments:f.draftAttachments})},applySyncedPrefs:l=>e({drafts:l.drafts,agentDrafts:l.agentDrafts,draftAttachments:l.draftAttachments,readMarks:l.readMarks}),setFocusedDraft:l=>e({focusedDraft:l}),setPush:l=>e({push:l}),setSidebarOpen:l=>e({sidebarOpen:l}),setLastNewWorkspaceRepo:l=>{try{localStorage.setItem(ag,l)}catch{}e({lastNewWorkspaceRepo:l})},setView:l=>r({...n().view,...l}),toggleGroup:l=>{const{collapsed:o}=n().view;r({...n().view,collapsed:o.includes(l)?o.filter(u=>u!==l):[...o,l]})}}}),h9=6e4,Pw=1e4,Sx="pwa-update-attempted-at",Iw=2500,Uw=30*6e4,Dl="pwa-update-snoozed-until";async function Hw(){try{if("serviceWorker"in navigator){const n=await navigator.serviceWorker.getRegistrations();await Promise.all(n.map(r=>r.unregister()))}if("caches"in window){const n=await caches.keys();await Promise.all(n.map(r=>caches.delete(r)))}}catch{}const e=location.search?"&":"?";location.replace(`${location.pathname}${location.search}${e}_v=${Date.now()}`)}function $w(){const e=De(p=>p.token),n=D.useRef(null),r=D.useRef(!1),{needRefresh:[i,l],updateServiceWorker:o}=_7({onRegisteredSW(p,y){y&&(n.current=y,setInterval(()=>{y.update().catch(()=>{})},h9))}}),{data:u}=gn({queryKey:["state"],queryFn:()=>Ne.state(),enabled:!!e,refetchInterval:!1}),d=u?.version,f=D.useRef(null);if(D.useEffect(()=>{!d||d==="1.106.3"||f.current===d||(f.current=d,n.current?.update().catch(()=>{}))},[d]),D.useEffect(()=>{if(!i)return;const p=Number(sessionStorage.getItem(Sx));if(sessionStorage.removeItem(Sx),p&&Date.now()-p<Pw){l(!1);return}const y=Number(sessionStorage.getItem(Dl));y&&Date.now()<y&&l(!1)},[i,l]),D.useEffect(()=>{if(i)return;const p=()=>{const b=Number(sessionStorage.getItem(Dl));!b||Date.now()<b||n.current?.waiting&&(sessionStorage.removeItem(Dl),l(!0))},y=window.setInterval(p,h9);return document.addEventListener("visibilitychange",p),()=>{window.clearInterval(y),document.removeEventListener("visibilitychange",p)}},[i,l]),!i)return null;const h=()=>{sessionStorage.setItem(Dl,String(Date.now()+Uw)),l(!1)},g=()=>{sessionStorage.removeItem(Dl),sessionStorage.setItem(Sx,String(Date.now()));const p=()=>{r.current||(r.current=!0,window.location.reload())},y=n.current?.waiting;y?(navigator.serviceWorker?.addEventListener("controllerchange",p,{once:!0}),y.addEventListener("statechange",()=>{y.state==="activated"&&p()}),y.postMessage({type:"SKIP_WAITING"})):o(!0),window.setTimeout(()=>{r.current||(r.current=!0,Hw())},Iw)};return x.jsxs("div",{className:"pb-safe fade-in fixed inset-x-0 bottom-0 z-40 mx-auto flex max-w-sm items-center gap-3 rounded-t-2xl border border-border-soft bg-surface px-4 py-3 shadow-xl",children:[x.jsx(no,{size:15,className:"shrink-0 text-accent"}),x.jsx("span",{className:"flex-1 text-sm",children:"New version ready"}),x.jsx("button",{type:"button",onClick:h,className:"rounded-lg px-2 py-1 text-xs text-muted active:bg-surface-2",children:"Later"}),x.jsx("button",{type:"button",onClick:g,className:"rounded-lg bg-accent px-3 py-1 text-xs font-semibold text-on-solid transition active:scale-95",children:"Update"})]})}function qw(){return/iP(hone|ad|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function ig(){return window.matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0}function sg(){return window.isSecureContext?"serviceWorker"in navigator?!("PushManager"in window)||!("Notification"in window)?qw()&&!ig()?"needs-install":"unsupported":"ok":"unsupported":"insecure"}function lg(){const e=navigator.userAgent,n=/iPhone/.test(e)?"iPhone":/iPad/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1?"iPad":/Android/.test(e)?"Android":/Mac OS X/.test(e)?"Mac":/Windows/.test(e)?"Windows":"Browser";return ig()?n:`${n} (browser)`}function Gw(e){const n=e+"=".repeat((4-e.length%4)%4),r=atob(n.replace(/-/g,"+").replace(/_/g,"/")),i=new Uint8Array(r.length);for(let l=0;l<r.length;l++)i[l]=r.charCodeAt(l);return i}function Vw(e){let n="";for(const r of new Uint8Array(e))n+=String.fromCharCode(r);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function cf(){if(!("serviceWorker"in navigator))return null;const e=await navigator.serviceWorker.getRegistration();return e||Promise.race([navigator.serviceWorker.ready,new Promise(n=>setTimeout(()=>n(null),5e3))])}async function Qw(e){const n=await cf();if(typeof n?.getNotifications=="function")try{for(const r of await n.getNotifications({tag:e}))r.close()}catch{}}async function og(){return await(await cf())?.pushManager.getSubscription()??null}function Yw(e,n){const r=e.options.applicationServerKey;return!!r&&Vw(r)===n}async function cg(e){const n=await cf();if(!n)throw new Error("the app’s service worker isn’t running yet — reload and try again");return n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Gw(e)})}function ug(e){const n=e.toJSON(),r=n.keys??{};if(!n.endpoint||!r.p256dh||!r.auth)throw new Error("the browser returned an incomplete subscription");return{endpoint:n.endpoint,keys:{p256dh:r.p256dh,auth:r.auth}}}async function Kw(e){let n=await og();if(n&&!Yw(n,e)&&(await n.unsubscribe().catch(()=>{}),n=Notification.permission==="granted"?await cg(e):null),!n)return null;const r=await Ne.pushSubscribe(ug(n),lg());return{id:r.id??null,devices:r.devices.length}}function K0(){const e=window.getSelection();return!!e&&!e.isCollapsed&&e.toString().length>0}const N0=28;function Xw(e,n){const r=window.getSelection();if(!r||r.isCollapsed||!r.rangeCount)return!1;for(const i of r.getRangeAt(0).getClientRects())if(e>=i.left-N0&&e<=i.right+N0&&n>=i.top-N0&&n<=i.bottom+N0)return!0;return!1}function Zw(e,n){const r=n.filter(o=>Jm(o)&&o.toolUseId);if(!r.length)return[...e,...n];const i=[...e,...n.filter(o=>!Jm(o))],l=new Map;i.forEach((o,u)=>{o.tool&&o.toolUseId&&!l.has(o.toolUseId)&&l.set(o.toolUseId,u)});for(const o of r){const u=o.toolUseId?l.get(o.toolUseId):void 0;if(u===void 0){o.error&&i.push(o);continue}const d=i[u];i[u]={...d,output:o.output,diff:o.diff,images:o.images,error:o.error??d.error}}return i}function Ww(e,n){if(!n.length)return[...e];const r=new Set(e.map(i=>i.id));return[...e,...n.filter(i=>!r.has(i.id))]}function Jw(e){const n=De(l=>l.setSidebarOpen),r=De(l=>l.sidebarOpen),i=D.useRef(r);i.current=r,D.useEffect(()=>{const l=e.current;l&&(l.style.transition="",l.style.transform="")},[r,e]),D.useEffect(()=>{const u=window.matchMedia("(min-width: 768px)"),d=()=>e.current;let f=!1,h=!1,g=!1,p=!1,y=0,b=0,C=0,v=0;const k=R=>{const L=d();L&&(L.style.transition="none",L.style.transform=`translateX(${R}px)`,v=R)},B=()=>{const R=d();R&&(R.style.transition="",R.style.transform="")},_=R=>{for(let L=R;L;L=L.parentElement)if(L.scrollLeft>0)return!0;return!1},S=()=>{f&&(f=!1,B())},M=R=>{if(S(),u.matches||R.touches.length!==1)return;const L=R.touches[0];if(i.current){const I=d()?.getBoundingClientRect().right??0;if(L.clientX>I)return}else if(L.clientX>44||_(R.target))return;Xw(L.clientX,L.clientY)||(f=!0,h=!1,g=!1,p=K0(),y=L.clientX,b=L.clientY,C=d()?.offsetWidth??0)},T=R=>{if(!f||g)return;if(!p&&K0()){g=!0;return}const L=R.touches[0],I=L.clientX-y,O=L.clientY-b;if(!h){if(Math.abs(O)>Math.abs(I)&&Math.abs(O)>8){g=!0;return}if(Math.abs(I)<6)return;h=!0}R.preventDefault();const $=i.current?0:-C;k(Math.max(-C,Math.min(0,$+I)))},w=()=>{if(!f)return;if(f=!1,!h||g)return B();const R=C?(v+C)/C:0;B(),n(R>.4)};return window.addEventListener("touchstart",M,{passive:!0}),window.addEventListener("touchmove",T,{passive:!1}),window.addEventListener("touchend",w),window.addEventListener("touchcancel",w),document.addEventListener("visibilitychange",S),()=>{window.removeEventListener("touchstart",M),window.removeEventListener("touchmove",T),window.removeEventListener("touchend",w),window.removeEventListener("touchcancel",w),document.removeEventListener("visibilitychange",S)}},[e,n])}const p9='input, textarea, [contenteditable]:not([contenteditable="false"])';function eF(){D.useEffect(()=>{const e=window.visualViewport;if(!e)return;const n=document.documentElement;(matchMedia("(display-mode: standalone)").matches||navigator.standalone)&&n.setAttribute("data-standalone","");let r=0,i;const l=()=>{n.style.removeProperty("--app-height"),n.removeAttribute("data-keyboard")},o=g=>{g&&!i?i=setInterval(u,300):!g&&i&&(clearInterval(i),i=void 0)},u=()=>{const g=document.activeElement,p=g instanceof HTMLElement&&g.matches(p9),y=e.scale>1.01;!p||y?(!y&&window.innerHeight-e.height<120&&(r=e.height),l()):(r||window.innerHeight)-e.height>40?(n.style.setProperty("--app-height",`${Math.round(e.height+e.offsetTop)}px`),n.setAttribute("data-keyboard","")):l(),o(p||n.hasAttribute("data-keyboard")),window.scrollY!==0&&window.scrollTo(0,0)};let d;const f=()=>{u(),clearTimeout(d),d=setTimeout(u,350)},h=()=>{if(document.visibilityState==="hidden"){const g=document.activeElement;g instanceof HTMLElement&&g.matches(p9)&&g.blur(),l(),o(!1)}else f()};return u(),e.addEventListener("resize",u),e.addEventListener("scroll",u),window.addEventListener("pageshow",f),document.addEventListener("visibilitychange",h),document.addEventListener("focusin",f),document.addEventListener("focusout",f),()=>{clearTimeout(d),o(!1),e.removeEventListener("resize",u),e.removeEventListener("scroll",u),window.removeEventListener("pageshow",f),document.removeEventListener("visibilitychange",h),document.removeEventListener("focusin",f),document.removeEventListener("focusout",f),l()}},[])}function ws(){const e=De(r=>r.setOnline),n=De(r=>r.setToken);return D.useCallback((r,i)=>{e(r),i instanceof Dr&&i.status===401&&n(null)},[e,n])}function xg(){const e=ws(),n=De(i=>i.setUpdate),r=gn({queryKey:["state"],queryFn:()=>Ne.state(),refetchInterval:2500});return D.useEffect(()=>{r.isSuccess&&(e(!0),n(r.data.update??null)),r.isError&&e(!1,r.error)},[r.isSuccess,r.isError,r.error,r.data,e,n]),r}function tF(){const e=ws();D.useEffect(()=>{let i=!0,l=!1,o=!1,u=!1,d=null;const f=v=>{const k=_w(v,De.getState().focusedDraft);De.getState().applySyncedPrefs(k.state),k.needsUpload&&g(!1)},h=async(v,k=!1)=>{if(!i)return;if(l){o||=v,u||=k;return}l=!0;const B=c9();try{const _=v?await Ne.patchPrefs(Dw(),k):await Ne.prefs();if(!i)return;e(!0),f(_.prefs),c9()!==B&&g(!1)}catch(_){if(!i)return;_ instanceof Dr&&_.status===404||e(!1,_)}finally{if(l=!1,i&&o){const _=u;o=!1,u=!1,h(!0,_)}}};function g(v,k=!1){d&&clearTimeout(d),d=null,v?h(!0,k):d=setTimeout(()=>{h(!0)},700)}const p=Mw(v=>g(v)),y=setInterval(()=>{h(!1)},15e3),b=()=>{document.visibilityState==="hidden"?g(!0,!0):h(!1)},C=()=>g(!0);return document.addEventListener("visibilitychange",b),window.addEventListener("online",C),h(!0),()=>{i=!1,d&&clearTimeout(d),clearInterval(y),p(),document.removeEventListener("visibilitychange",b),window.removeEventListener("online",C)}},[e])}function dg(){return gn({queryKey:["repos"],queryFn:()=>Ne.repos(),staleTime:6e4})}function nF(e,n){const[r,i]=D.useState(e);return D.useEffect(()=>{const l=setTimeout(()=>i(e),n);return()=>clearTimeout(l)},[e,n]),r}function rF(e,n=[],r=!0){const i=e.trim();return gn({queryKey:["search",i,n,r],queryFn:()=>Ne.search(i,n,r),enabled:i.length>=2,staleTime:3e4,placeholderData:s4})}function aF(e,n){const r=ws(),i=gn({queryKey:["workspace",e],queryFn:()=>Ne.workspace(e),enabled:n&&!!e,staleTime:Number.POSITIVE_INFINITY,retry:(l,o)=>!(o instanceof Dr&&o.status===404)&&l<1});return D.useEffect(()=>{i.isError&&!(i.error instanceof Dr&&i.error.status===404)&&r(!1,i.error)},[i.isError,i.error,r]),i}function fg(e,n=!0){const r=ws(),i=gn({queryKey:["sessions",e],queryFn:()=>Ne.sessions(e),enabled:!!e,refetchInterval:n?2e3:!1});return D.useEffect(()=>{i.isError&&r(!1,i.error)},[i.isError,i.error,r]),i}function iF(e,n,r=!1){return gn({queryKey:["workspaceFiles",e],queryFn:()=>Ne.workspaceFiles(e),enabled:n&&!!e,staleTime:12e4,refetchInterval:r?5e3:!1,retry:!1})}function sF(e){return gn({queryKey:["dev-server",e],queryFn:()=>Ne.devServer(e),enabled:!!e,refetchInterval:2500})}function lF(e,n){const r=ws(),i=gn({queryKey:["diff",e],queryFn:()=>Ne.diff(e),enabled:n&&!!e,refetchInterval:5e3});return D.useEffect(()=>{i.isError&&r(!1,i.error)},[i.isError,i.error,r]),i}function oF(e,n,r){return gn({queryKey:["fileDiff",e,n],queryFn:()=>Ne.fileDiff(e,n),enabled:r&&!!e&&!!n,refetchInterval:5e3,retry:!1})}function cF(e,n){return gn({queryKey:["filePreview",e],queryFn:()=>Ne.filePreview(e),enabled:n&&!!e,refetchInterval:5e3,retry:!1})}function uF(e){return gn({queryKey:["repoIcon",e],queryFn:()=>Ne.repoIcon(e),enabled:!!e,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function xF(e,n){return gn({queryKey:["logs",e],queryFn:()=>Ne.logs(e),enabled:n,refetchInterval:3e3,retry:!1})}function cc(){return gn({queryKey:["model-catalog"],queryFn:Ne.modelCatalog,staleTime:6e4,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function hg(){return gn({queryKey:["model-defaults"],queryFn:Ne.modelDefaults,staleTime:0,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function dF(e){return gn({queryKey:["plan-usage"],queryFn:()=>Ne.planUsage(),enabled:e,staleTime:6e4,gcTime:Number.POSITIVE_INFINITY,retry:!1})}function pg(e,n=!0,r){return gn({queryKey:["context-breakdown",e,r??null],queryFn:()=>Ne.contextBreakdown(e),enabled:n&&!!e,staleTime:0,retry:!1})}function uf(e=!0){return gn({queryKey:["roles"],queryFn:Ne.roles,enabled:e,staleTime:3e4,retry:!1})}function fF(e,n,r){const i=e?.agent_type??"claude",l=xr();return gn({queryKey:["models",i],queryFn:async()=>{const o=await Ne.models(e.id,n);if(!o.ok||!o.models?.length)throw new Error(o.error??"could not read the model list");return await l.invalidateQueries({queryKey:["model-catalog"]}),o},enabled:r&&!!e,staleTime:0,gcTime:Number.POSITIVE_INFINITY,retry:!1})}const hF=(e,n)=>e.length===n.length&&e.every((r,i)=>r.id===n[i].id&&r.text===n[i].text);function pF(e,n=!0){const r=ws(),[i,l]=D.useState({entries:[],queued:[],loading:!0,error:null}),o=D.useRef(0),u=De(h=>h.push.deviceId),d=D.useRef(u);return d.current=u,D.useEffect(()=>{if(!e){l({entries:[],queued:[],loading:!1,error:null});return}o.current=0,l({entries:[],queued:[],loading:!0,error:null});let h=!0,g=!1;const p=async()=>{if(!g){g=!0;try{const b=document.visibilityState==="visible"?d.current:null,{entries:C,queued:v=[],cursor:k}=await Ne.messages(e,o.current,b);if(!h)return;r(!0),o.current=k,l(B=>{const _=C.length?Zw(B.entries,C):B.entries,S=hF(B.queued,v);return _===B.entries&&S&&!B.loading&&!B.error?B:{entries:_,queued:S?B.queued:v,loading:!1,error:null}})}catch(b){if(!h)return;r(!1,b),l(C=>({...C,loading:!1,error:b instanceof Error?b.message:String(b)}))}finally{g=!1}}};p();const y=n?setInterval(p,1e3):void 0;return()=>{h=!1,y&&clearInterval(y)}},[e,n,r]),{entries:D.useMemo(()=>Ww(i.entries,i.queued),[i.entries,i.queued]),loading:i.loading,error:i.error}}function mg(){const e=xr(),n=De(u=>u.addPending),r=De(u=>u.failPending),i=De(u=>u.removePending),l=De(u=>u.markWorking),o=De(u=>u.clearAgentDraft);return D.useCallback(async u=>{const d=u.text.trim();if(!d)return!1;const f=u.id??crypto.randomUUID(),{sessionId:h,workspaceId:g}=u;n({id:f,sessionId:h,workspaceId:g,text:d,queue:u.queue,workflow:u.workflow});try{const p=De.getState().agentDrafts[h],y=!u.workflow&&p&&Object.keys(p).length?p:void 0,b=await Ne.sendPrompt(h,d,g,y,f,u.queue,u.workflow);if(b.ok||b.parked){const C=u.workflow?p:y;return C&&(o(h,C),e.invalidateQueries({queryKey:["sessions",g]})),b.ok&&l(h),e.invalidateQueries({queryKey:["state"]}),setTimeout(()=>i(f),4e3),!0}r(f,b.error||"Send failed")}catch(p){r(f,p instanceof Error?p.message:String(p))}return!1},[n,r,i,l,o,e])}function gg(e){return gn({queryKey:["push"],queryFn:()=>Ne.push(),enabled:e,staleTime:3e4})}function mF(){const[e]=D.useState(sg),n=De(l=>l.setPush),{data:r}=gg(e==="ok"),i=r?.publicKey;D.useEffect(()=>{if(e!=="ok"||!i)return;let l=!0;return Kw(i).then(o=>{l&&n({deviceId:o?.id??null,devices:o?.devices??0})}).catch(()=>{}),()=>{l=!1}},[e,i,n])}function gF(){const[e]=D.useState(sg),[n,r]=D.useState(()=>"Notification"in window?Notification.permission:"unsupported"),[i,l]=D.useState(!1),[o,u]=D.useState(null),{deviceId:d,devices:f}=De(v=>v.push),h=De(v=>v.setPush),g=gg(e==="ok"),p=g.data?.publicKey,y=D.useCallback(async()=>{l(!0),u(null);try{const v=await Notification.requestPermission();if(r(v),v!=="granted"){u(v==="denied"?"Notifications are blocked for this app — allow them in your device settings, then try again.":"Notification permission wasn’t granted.");return}const k=p??(await Ne.push()).publicKey,B=await cg(k),_=await Ne.pushSubscribe(ug(B),lg());h({deviceId:_.id??null,devices:_.devices.length})}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}},[p,h]),b=D.useCallback(async()=>{l(!0),u(null);try{const v=await og();let k=0;v&&(k=(await Ne.pushUnsubscribe(v.endpoint).catch(()=>null))?.devices.length??0,await v.unsubscribe()),h({deviceId:null,devices:k})}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}},[h]),C=D.useCallback(async()=>{if(d){l(!0),u(null);try{const v=await Ne.pushTest(d);v.ok||u(v.error??"The push service rejected it.")}catch(v){u(v instanceof Error?v.message:String(v))}finally{l(!1)}}},[d]);return{support:e,permission:n,enabled:!!d,relayDisabled:g.data?.enabled===!1,busy:i,error:o,devices:f,enable:y,disable:b,test:C}}const EF="push-route",m9="/__push-route",yF=12e4;async function g9(){if(!("caches"in window))return null;try{const e=await caches.open(EF),n=await e.match(m9);if(!n)return null;await e.delete(m9);const{url:r,ts:i}=await n.json();return typeof r!="string"||!r.startsWith("/")||typeof i!="number"||Date.now()-i>yF?null:r}catch{return null}}function bF(){const e=_i();D.useEffect(()=>{let n=!0;const r=()=>{g9().then(o=>{n&&o&&e(o)})},i=o=>{const u=o.data;u?.type==="push-navigate"&&typeof u.url=="string"&&u.url.startsWith("/")&&(g9(),e(u.url))},l=()=>{document.visibilityState==="visible"&&r()};return"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("message",i),document.addEventListener("visibilitychange",l),r(),()=>{n=!1,"serviceWorker"in navigator&&navigator.serviceWorker.removeEventListener("message",i),document.removeEventListener("visibilitychange",l)}},[e])}function CF(e,n){D.useEffect(()=>{if(!e)return;const r=()=>{document.visibilityState==="visible"&&Qw(e)};return r(),document.addEventListener("visibilitychange",r),()=>document.removeEventListener("visibilitychange",r)},[e,n])}function Eg(e){var n,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(n=0;n<l;n++)e[n]&&(r=Eg(e[n]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function vF(){for(var e,n,r=0,i="",l=arguments.length;r<l;r++)(e=arguments[r])&&(n=Eg(e))&&(i&&(i+=" "),i+=n);return i}const AF=(e,n)=>{const r=new Array(e.length+n.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<n.length;i++)r[e.length+i]=n[i];return r},kF=(e,n)=>({classGroupId:e,validator:n}),yg=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),X0="-",E9=[],BF="arbitrary..",DF=e=>{const n=FF(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return wF(u);const d=u.split(X0),f=d[0]===""&&d.length>1?1:0;return bg(d,f,n)},getConflictingClassGroupIds:(u,d)=>{if(d){const f=i[u],h=r[u];return f?h?AF(h,f):f:h||E9}return r[u]||E9}}},bg=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const l=e[n],o=r.nextPart.get(l);if(o){const h=bg(e,n+1,o);if(h)return h}const u=r.validators;if(u===null)return;const d=n===0?e.join(X0):e.slice(n).join(X0),f=u.length;for(let h=0;h<f;h++){const g=u[h];if(g.validator(d))return g.classGroupId}},wF=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),i=n.slice(0,r);return i?BF+i:void 0})(),FF=e=>{const{theme:n,classGroups:r}=e;return SF(r,n)},SF=(e,n)=>{const r=yg();for(const i in e){const l=e[i];xf(l,r,i,n)}return r},xf=(e,n,r,i)=>{const l=e.length;for(let o=0;o<l;o++){const u=e[o];NF(u,n,r,i)}},NF=(e,n,r,i)=>{if(typeof e=="string"){_F(e,n,r);return}if(typeof e=="function"){MF(e,n,r,i);return}jF(e,n,r,i)},_F=(e,n,r)=>{const i=e===""?n:Cg(n,e);i.classGroupId=r},MF=(e,n,r,i)=>{if(TF(e)){xf(e(i),n,r,i);return}n.validators===null&&(n.validators=[]),n.validators.push(kF(r,e))},jF=(e,n,r,i)=>{const l=Object.entries(e),o=l.length;for(let u=0;u<o;u++){const[d,f]=l[u];xf(f,Cg(n,d),r,i)}},Cg=(e,n)=>{let r=e;const i=n.split(X0),l=i.length;for(let o=0;o<l;o++){const u=i[o];let d=r.nextPart.get(u);d||(d=yg(),r.nextPart.set(u,d)),r=d}return r},TF=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,RF=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),i=Object.create(null);const l=(o,u)=>{r[o]=u,n++,n>e&&(n=0,i=r,r=Object.create(null))};return{get(o){let u=r[o];if(u!==void 0)return u;if((u=i[o])!==void 0)return l(o,u),u},set(o,u){o in r?r[o]=u:l(o,u)}}},bd="!",y9=":",OF=[],b9=(e,n,r,i,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:i,isExternal:l}),zF=e=>{const{prefix:n,experimentalParseClassName:r}=e;let i=l=>{const o=[];let u=0,d=0,f=0,h;const g=l.length;for(let v=0;v<g;v++){const k=l[v];if(u===0&&d===0){if(k===y9){o.push(l.slice(f,v)),f=v+1;continue}if(k==="/"){h=v;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const p=o.length===0?l:l.slice(f);let y=p,b=!1;p.endsWith(bd)?(y=p.slice(0,-1),b=!0):p.startsWith(bd)&&(y=p.slice(1),b=!0);const C=h&&h>f?h-f:void 0;return b9(o,b,y,C)};if(n){const l=n+y9,o=i;i=u=>u.startsWith(l)?o(u.slice(l.length)):b9(OF,!1,u,void 0,!0)}if(r){const l=i;i=o=>r({className:o,parseClassName:l})}return i},LF=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{n.set(r,1e6+i)}),r=>{const i=[];let l=[];for(let o=0;o<r.length;o++){const u=r[o],d=u[0]==="[",f=n.has(u);d||f?(l.length>0&&(l.sort(),i.push(...l),l=[]),i.push(u)):l.push(u)}return l.length>0&&(l.sort(),i.push(...l)),i}},PF=e=>({cache:RF(e.cacheSize),parseClassName:zF(e),sortModifiers:LF(e),postfixLookupClassGroupIds:IF(e),...DF(e)}),IF=e=>{const n=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let i=0;i<r.length;i++)n[r[i]]=!0;return n},UF=/\s+/,HF=(e,n)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:l,sortModifiers:o,postfixLookupClassGroupIds:u}=n,d=[],f=e.trim().split(UF);let h="";for(let g=f.length-1;g>=0;g-=1){const p=f[g],{isExternal:y,modifiers:b,hasImportantModifier:C,baseClassName:v,maybePostfixModifierPosition:k}=r(p);if(y){h=p+(h.length>0?" "+h:h);continue}let B=!!k,_;if(B){const R=v.substring(0,k);_=i(R);const L=_&&u[_]?i(v):void 0;L&&L!==_&&(_=L,B=!1)}else _=i(v);if(!_){if(!B){h=p+(h.length>0?" "+h:h);continue}if(_=i(v),!_){h=p+(h.length>0?" "+h:h);continue}B=!1}const S=b.length===0?"":b.length===1?b[0]:o(b).join(":"),M=C?S+bd:S,T=M+_;if(d.indexOf(T)>-1)continue;d.push(T);const w=l(_,B);for(let R=0;R<w.length;++R){const L=w[R];d.push(M+L)}h=p+(h.length>0?" "+h:h)}return h},$F=(...e)=>{let n=0,r,i,l="";for(;n<e.length;)(r=e[n++])&&(i=vg(r))&&(l&&(l+=" "),l+=i);return l},vg=e=>{if(typeof e=="string")return e;let n,r="";for(let i=0;i<e.length;i++)e[i]&&(n=vg(e[i]))&&(r&&(r+=" "),r+=n);return r},qF=(e,...n)=>{let r,i,l,o;const u=f=>{const h=n.reduce((g,p)=>p(g),e());return r=PF(h),i=r.cache.get,l=r.cache.set,o=d,d(f)},d=f=>{const h=i(f);if(h)return h;const g=HF(f,r);return l(f,g),g};return o=u,(...f)=>o($F(...f))},GF=[],bn=e=>{const n=r=>r[e]||GF;return n.isThemeGetter=!0,n},Ag=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VF=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QF=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,KF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ZF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ya=e=>VF.test(e),at=e=>!!e&&!Number.isNaN(Number(e)),Ur=e=>!!e&&Number.isInteger(Number(e)),Nx=e=>e.endsWith("%")&&at(e.slice(0,-1)),fa=e=>QF.test(e),Bg=()=>!0,WF=e=>YF.test(e)&&!KF.test(e),df=()=>!1,JF=e=>XF.test(e),eS=e=>ZF.test(e),tS=e=>!Se(e)&&!Me(e),nS=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),rS=e=>Ja(e,Fg,df),Se=e=>Ag.test(e),bi=e=>Ja(e,Sg,WF),C9=e=>Ja(e,xS,at),aS=e=>Ja(e,_g,Bg),iS=e=>Ja(e,Ng,df),v9=e=>Ja(e,Dg,df),sS=e=>Ja(e,wg,eS),_0=e=>Ja(e,Mg,JF),Me=e=>kg.test(e),wl=e=>Mi(e,Sg),lS=e=>Mi(e,Ng),A9=e=>Mi(e,Dg),oS=e=>Mi(e,Fg),cS=e=>Mi(e,wg),M0=e=>Mi(e,Mg,!0),uS=e=>Mi(e,_g,!0),Ja=(e,n,r)=>{const i=Ag.exec(e);return i?i[1]?n(i[1]):r(i[2]):!1},Mi=(e,n,r=!1)=>{const i=kg.exec(e);return i?i[1]?n(i[1]):r:!1},Dg=e=>e==="position"||e==="percentage",wg=e=>e==="image"||e==="url",Fg=e=>e==="length"||e==="size"||e==="bg-size",Sg=e=>e==="length",xS=e=>e==="number",Ng=e=>e==="family-name",_g=e=>e==="number"||e==="weight",Mg=e=>e==="shadow",dS=()=>{const e=bn("color"),n=bn("font"),r=bn("text"),i=bn("font-weight"),l=bn("tracking"),o=bn("leading"),u=bn("breakpoint"),d=bn("container"),f=bn("spacing"),h=bn("radius"),g=bn("shadow"),p=bn("inset-shadow"),y=bn("text-shadow"),b=bn("drop-shadow"),C=bn("blur"),v=bn("perspective"),k=bn("aspect"),B=bn("ease"),_=bn("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...M(),Me,Se],w=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],L=()=>[Me,Se,f],I=()=>[Ya,"full","auto",...L()],O=()=>[Ur,"none","subgrid",Me,Se],$=()=>["auto",{span:["full",Ur,Me,Se]},Ur,Me,Se],Q=()=>[Ur,"auto",Me,Se],le=()=>["auto","min","max","fr",Me,Se],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...L()],V=()=>[Ya,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],X=()=>[Ya,"screen","full","dvw","lvw","svw","min","max","fit",...L()],fe=()=>[Ya,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],j=()=>[e,Me,Se],z=()=>[...M(),A9,v9,{position:[Me,Se]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",oS,rS,{size:[Me,Se]}],te=()=>[Nx,wl,bi],ae=()=>["","none","full",h,Me,Se],xe=()=>["",at,wl,bi],ve=()=>["solid","dashed","dotted","double"],Ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[at,Nx,A9,v9],nt=()=>["","none",C,Me,Se],ot=()=>["none",at,Me,Se],$t=()=>["none",at,Me,Se],Ct=()=>[at,Me,Se],we=()=>[Ya,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fa],breakpoint:[fa],color:[Bg],container:[fa],"drop-shadow":[fa],ease:["in","out","in-out"],font:[tS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fa],shadow:[fa],spacing:["px",at],text:[fa],"text-shadow":[fa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ya,Se,Me,k]}],container:["container"],"container-type":[{"@container":["","normal","size",Me,Se]}],"container-named":[nS],columns:[{columns:[at,Se,Me,d]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{"inset-s":I(),start:I()}],end:[{"inset-e":I(),end:I()}],"inset-bs":[{"inset-bs":I()}],"inset-be":[{"inset-be":I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Ur,"auto",Me,Se]}],basis:[{basis:[Ya,"full","auto",d,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[at,Ya,"auto","initial","none",Se]}],grow:[{grow:["",at,Me,Se]}],shrink:[{shrink:["",at,Me,Se]}],order:[{order:[Ur,"first","last","none",Me,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":le()}],"auto-rows":[{"auto-rows":le()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...X()]}],"min-inline-size":[{"min-inline":["auto",...X()]}],"max-inline-size":[{"max-inline":["none",...X()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[d,"screen",...V()]}],"min-w":[{"min-w":[d,"screen","none",...V()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",r,wl,bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,uS,aS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nx,Se]}],"font-family":[{font:[lS,iS,n]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,Me,Se]}],"line-clamp":[{"line-clamp":[at,"none",Me,C9]}],leading:[{leading:[o,...L()]}],"list-image":[{"list-image":["none",Me,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[at,"from-font","auto",Me,bi]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[at,"auto",Me,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[Ur,Me,Se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ur,Me,Se],radial:["",Me,Se],conic:[Ur,Me,Se]},cS,sS]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[at,Me,Se]}],"outline-w":[{outline:["",at,wl,bi]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",g,M0,_0]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",p,M0,_0]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[at,bi]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",y,M0,_0]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[at,Me,Se]}],"mix-blend":[{"mix-blend":[...Ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[at]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Me,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":M()}],"mask-image-conic-pos":[{"mask-conic":[at]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Se]}],filter:[{filter:["","none",Me,Se]}],blur:[{blur:nt()}],brightness:[{brightness:[at,Me,Se]}],contrast:[{contrast:[at,Me,Se]}],"drop-shadow":[{"drop-shadow":["","none",b,M0,_0]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",at,Me,Se]}],"hue-rotate":[{"hue-rotate":[at,Me,Se]}],invert:[{invert:["",at,Me,Se]}],saturate:[{saturate:[at,Me,Se]}],sepia:[{sepia:["",at,Me,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Se]}],"backdrop-blur":[{"backdrop-blur":nt()}],"backdrop-brightness":[{"backdrop-brightness":[at,Me,Se]}],"backdrop-contrast":[{"backdrop-contrast":[at,Me,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",at,Me,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[at,Me,Se]}],"backdrop-invert":[{"backdrop-invert":["",at,Me,Se]}],"backdrop-opacity":[{"backdrop-opacity":[at,Me,Se]}],"backdrop-saturate":[{"backdrop-saturate":[at,Me,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",at,Me,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[at,"initial",Me,Se]}],ease:[{ease:["linear","initial",B,Me,Se]}],delay:[{delay:[at,Me,Se]}],animate:[{animate:["none",_,Me,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Me,Se]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:ot()}],"rotate-x":[{"rotate-x":ot()}],"rotate-y":[{"rotate-y":ot()}],"rotate-z":[{"rotate-z":ot()}],scale:[{scale:$t()}],"scale-x":[{"scale-x":$t()}],"scale-y":[{"scale-y":$t()}],"scale-z":[{"scale-z":$t()}],"scale-3d":["scale-3d"],skew:[{skew:Ct()}],"skew-x":[{"skew-x":Ct()}],"skew-y":[{"skew-y":Ct()}],transform:[{transform:[Me,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:we()}],"translate-x":[{"translate-x":we()}],"translate-y":[{"translate-y":we()}],"translate-z":[{"translate-z":we()}],"translate-none":["translate-none"],zoom:[{zoom:[Ur,Me,Se]}],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Me,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":j()}],"scrollbar-track-color":[{"scrollbar-track":j()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,Se]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[at,wl,bi,C9]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fS=qF(dS);function pe(...e){return fS(vF(e))}const hS=200,jg=1e3;function pS(e,n){if(!e||e.length>jg)return null;let r;try{r=decodeURIComponent(e)}catch{return null}if(!X8(r)||r.includes("\0")||/^[a-z][a-z\d+.-]*:/i.test(r)||r.startsWith("//")||r.split("/").includes(".."))return null;if(r.startsWith("/")||r.startsWith("~/"))return r;const i=r.replace(/^(?:\.\/)+/,"");return i?n?`${n}/${i}`:i:null}function mS(e,n){if(!e||e.length>jg||e.includes("\0")||!/^\.context\/attachments\/[A-Za-z0-9]{6}\/[^/]+$/.test(e))return null;const r=X8(e)?"image":sf(e)?"source":null;return r?{reference:n?`${n}/${e}`:e,kind:r}:null}function Tg(e,n){const r=new Map;for(const i of n??[]){const l=i.slice(i.lastIndexOf("/")+1),o=r.get(l);o?o.push(i):r.set(l,[i])}return i=>{const l=gS(i);if(!l)return null;const{path:o,location:u}=l;if(o.startsWith("/")||o.startsWith("~/"))return o+u;if(!e)return null;const d=ES(r,o);return d?`${e}/${d}${u}`:null}}function gS(e){if(!e||e.length>hS||/\s/.test(e)||e.includes("://"))return null;const n=e.match(/:([1-9]\d*)(?::\d+)?$/),r=n?n[0]:"",i=n?e.slice(0,-r.length):e;return i.startsWith("../")||i.includes("/../")?null:sf(i)?{path:i.startsWith("./")?i.slice(2):i,location:r}:null}function ES(e,n){const r=n.slice(n.lastIndexOf("/")+1),i=e.get(r);if(!i)return null;const l=i.filter(o=>o===n||o.endsWith(`/${n}`));return l.length===1?l[0]:null}const uc=D.createContext(null),yS=uc.Provider,bS=Tg(null,void 0);function Rg(e){const n=D.useContext(uc)?.resolveMention??bS;return e===null?null:n(e)}function Og(e){return pS(e,D.useContext(uc)?.worktree??null)}function CS(e){return mS(e,D.useContext(uc)?.worktree??null)}function k9(e){return e.endsWith(".0")?e.slice(0,-2):e}function $0(e){return e>=1e6?`${k9((e/1e6).toFixed(e<1e7?1:0))}M`:e>=1e3?`${k9((e/1e3).toFixed(e<1e5?1:0))}k`:String(e)}function B9(e,n){if(e<=0||n<=0)return"0%";const r=e/n*100;return r<1?"<1%":`${Math.round(r)}%`}function vS(e){const n=[],r=e.split(GD);for(let i=0;i<r.length;i++){const l=r[i];if(i===0){l&&n.push({text:l,hit:!1});continue}const o=l.indexOf(VD);if(o<0){l&&n.push({text:l,hit:!0});continue}const u=l.slice(0,o),d=l.slice(o+1);u&&n.push({text:u,hit:!0}),d&&n.push({text:d,hit:!1})}return n}function zg(e){return e.state==="setting_up"}const AS={merged:"var(--color-pr-merged)",draft:"var(--color-pr-draft)",conflicts:"var(--color-pr-attention)",checks_failed:"var(--color-pr-attention)",checks_pending:"var(--color-working)",mergeable:"var(--color-pr-mergeable)"};function kS(e){return zg(e)?{color:"var(--color-muted)",spinning:!0}:{color:e.pr_status&&AS[e.pr_status]||"var(--color-done)",spinning:e.session_status==="working"||e.pr_status==="checks_pending"}}function BS(e){return e.pr_status==="merged"}function DS(e){return ff(e)==="done"}function ff(e){return zg(e)?"setting-up":e.manual_status||e.derived_status||"in-progress"}const D9=["done","in-review","in-progress","setting-up","backlog","canceled"],wS=["backlog","in-progress","in-review","done","canceled"];function Cd(e){return{done:"Done","in-review":"In review","in-progress":"In progress","setting-up":"Setting up",backlog:"Backlog",canceled:"Canceled"}[e]??e}const FS=["today","yesterday","week","month","older"];function SS(e){return{today:"Today",yesterday:"Yesterday",week:"Past week",month:"Past month",older:"Older"}[e]}function w9(e){const n=new Date(e);return n.setHours(0,0,0,0),n.getTime()}function NS(e,n=new Date){const r=new Date(Xn(e));if(!Number.isFinite(r.getTime()))return"older";const i=Math.round((w9(n)-w9(r))/864e5);return i<=0?"today":i===1?"yesterday":i<7?"week":i<30?"month":"older"}const hf={done:"var(--color-pr-merged)","in-review":"var(--color-pr-mergeable)","in-progress":"var(--color-done)","setting-up":"var(--color-muted)"};function pf(e,n=120){const i=(e.split(`
|
|
14
14
|
`).find(l=>l.trim())??"").replace(/^[\s>#*\-+]+/,"").replace(/`/g,"").replace(/\s+/g," ").trim();return i.length>n?`${i.slice(0,n-1)}…`:i}function mf(e){const n=Math.max(0,Math.floor(e/1e3)),r=n%60,i=Math.floor(n/60)%60,l=Math.floor(n/3600),o=u=>String(u).padStart(2,"0");return l?`${l}h ${o(i)}m ${o(r)}s`:i?`${i}m ${o(r)}s`:`${r}s`}const _S=6e4,MS=60*_S,jS=24*MS,TS=7*jS;function Lg(e){return e.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}function Pg(e,n){return`${e.toLocaleDateString(void 0,{month:"short",day:"numeric",...e.getFullYear()===n.getFullYear()?{}:{year:"numeric"}})}, ${Lg(e)}`}function RS(e){const n=new Date(Xn(e));if(!Number.isFinite(n.getTime()))return"";const r=new Date;return n.toDateString()===r.toDateString()?Lg(n):Pg(n,r)}function OS(e,n=Date.now()){const r=new Date(Xn(e)),i=n-r.getTime();return Number.isFinite(i)?i>=TS?Pg(r,new Date(n)):Ug(e,n):""}function Ig(e){const n=Xn(e);if(!Number.isFinite(n))return"";const r=Math.round((Date.now()-n)/1e3);if(r<45)return"now";if(r<90)return"1m";const i=Math.round(r/60);if(i<60)return`${i}m`;const l=Math.round(i/60);return l<24?`${l}h`:`${Math.round(l/24)}d`}let Ci;function Ug(e,n=Date.now()){const r=Xn(e);if(!Number.isFinite(r))return"";const i=Math.round((n-r)/1e3);if(i<45)return"now";if(Ci??=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),i<90)return Ci.format(-1,"minute");const l=Math.round(i/60);if(l<60)return Ci.format(-l,"minute");const o=Math.round(l/60);if(o<24)return Ci.format(-o,"hour");const u=Math.round(o/24);if(u<30)return Ci.format(-u,"day");const d=Math.round(u/30.4);return d<12?Ci.format(-d,"month"):Ci.format(-Math.round(u/365),"year")}function zS(){const e=location.hostname;return!e||e==="localhost"||e.startsWith("127.")?null:`vnc://${e}`}async function LS(e){if(navigator.clipboard?.writeText)return navigator.clipboard.writeText(e);const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.cssText="position:fixed;opacity:0",document.body.append(n),n.select();const r=document.execCommand("copy");if(n.remove(),!r)throw new Error("Clipboard unavailable")}const PS={activity:L7,anchor:I7,apple:H7,atom:J7,award:tC,banknote:rC,battery:iC,beer:lC,bell:D8,bike:uC,bird:dC,bluetooth:hC,book:EC,"book-open":mC,bookmark:bC,bot:w8,box:AC,brain:BC,briefcase:wC,brush:SC,bug:jC,"bug-play":_C,building:zC,"building-2":RC,cake:PC,calendar:UC,camera:$C,car:GC,carrot:QC,cat:KC,"chart-bar":ZC,"chart-line":JC,"chart-pie":t3,clapperboard:d3,clock:S8,cloud:y3,code:A3,"code-xml":C3,coffee:B3,cog:w3,compass:S3,cpu:M3,"credit-card":T3,crown:O3,database:L3,dna:I3,dog:H3,"dollar-sign":q3,dumbbell:V3,egg:X3,factory:ev,feather:nv,file:_8,"file-code":av,film:ov,fish:uv,flag:dv,flame:hv,"flask-conical":mv,folder:M8,"gamepad-2":Av,gem:wv,gift:Sv,"git-branch":jv,github:zv,glasses:Pv,globe:Uv,"graduation-cap":$v,"grid-3x3":Gv,hammer:Qv,headphones:Kv,heart:Jv,"heart-pulse":Zv,house:nA,image:aA,key:oA,laptop:uA,"layout-grid":hA,layers:dA,leaf:mA,lightbulb:EA,link:bA,lock:kA,mail:FA,map:O8,"map-pin":NA,martini:jA,medal:RA,"message-circle":zA,"message-square":PA,mic:z8,microscope:qA,monitor:YA,moon:XA,music:WA,orbit:ek,package:nk,paintbrush:ak,paperclip:sc,"paw-print":ck,pen:xk,pencil:fk,phone:Ek,pill:bk,pipette:vk,pizza:kk,plane:Dk,plug:Sk,power:Mk,puzzle:Tk,rabbit:zk,radio:Pk,rocket:Hk,ruler:Yk,salad:Vk,satellite:Xk,scissors:eB,server:iB,settings:lB,shell:cB,shield:xB,ship:fB,"shopping-bag":pB,"shopping-cart":gB,smartphone:CB,snail:AB,soup:wB,sparkles:SB,sprout:_B,star:dd,stethoscope:RB,store:zB,sun:U8,tag:HB,tags:qB,target:VB,telescope:YB,terminal:XB,ticket:WB,"train-front":eD,"tree-pine":aD,"trending-up":sD,trophy:cD,turtle:xD,user:fD,users:pD,utensils:gD,video:yD,wallet:CD,"wand-2":Km,"wand-sparkles":Km,warehouse:kD,wheat:FD,wifi:H8,wine:MD,wrench:RD,zap:nf};function Hg({state:e,color:n="var(--color-working)",className:r}){return e==="failed"?x.jsx("span",{className:pe("dot-error",r),role:"img","aria-label":"Send failed","data-prompt-state":"failed",children:x.jsx(vn,{size:8,strokeWidth:3,"aria-hidden":!0})}):x.jsx("span",{className:pe("dot-spinner",r),style:{"--spin-color":n},role:"img","aria-label":"Prompt pending","data-prompt-state":"sending"})}function IS({w:e,promptState:n,className:r}){const{color:i,spinning:l}=kS(e);return n?x.jsx(Hg,{state:n,color:i,className:r}):l?x.jsx("span",{className:pe("dot-spinner",r),style:{"--spin-color":i}}):x.jsx("span",{className:pe("dot",r),style:{background:i}})}function US({className:e}){return x.jsx("span",{className:pe("flex size-3 items-center justify-center rounded-full bg-surface text-add ring-2 ring-surface",e),role:"img","aria-label":"Run active",children:x.jsx(xd,{size:7,strokeWidth:0,fill:"currentColor","aria-hidden":!0})})}function HS(e){const n=Math.max(0,Math.round(e/1e3));if(n<90)return`${n}s`;const r=Math.round(n/60);return r<60?`${r}m`:`${Math.round(r/60)}h`}function $S(){const e=De(u=>u.online),n=De(u=>u.lastSyncAt),r=De(u=>u.update),i=r?.mode==="auto"&&r.available,[l,o]=D.useState(()=>Date.now());return D.useEffect(()=>{if(e)return;const u=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(u)},[e]),i?x.jsxs("div",{className:"fade-in flex items-center gap-1.5 bg-accent/10 px-3 py-1.5 text-xs text-accent",children:[x.jsx(no,{size:13,className:"animate-spin"}),x.jsxs("span",{children:["Updating relay to ",r?.latest??"latest","… reconnecting"]})]}):e?null:x.jsxs("div",{className:"fade-in flex items-center gap-1.5 bg-del/10 px-3 py-1.5 text-xs text-del",children:[x.jsx(tf,{size:13}),x.jsxs("span",{children:["Offline — retrying…",n?` last synced ${HS(l-n)} ago`:""]})]})}function ga({className:e}){const n=zS();return n?x.jsx("a",{href:n,className:pe("font-semibold text-accent underline underline-offset-2",e),children:"Unlock the Mac"}):null}function $g({text:e,label:n,className:r,size:i=14}){const[l,o]=D.useState(!1),u=async()=>{try{await LS(e),o(!0),window.setTimeout(()=>o(!1),1800)}catch{o(!1)}};return x.jsx("button",{type:"button",onClick:()=>{u()},"aria-label":l?`Copied ${n}`:`Copy ${n}`,className:pe("flex items-center justify-center text-muted transition active:bg-surface-2",r),children:l?x.jsx(ma,{size:i,className:"text-accent"}):x.jsx(Wd,{size:i})})}function F9({children:e,className:n}){return x.jsx("span",{className:pe("rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[11px] text-muted",n),children:e})}function qS({children:e}){return x.jsx("span",{className:"grid min-w-5 place-items-center rounded-full bg-accent px-1.5 text-[11px] font-bold text-on-solid",children:e})}function GS({error:e}){const n=typeof navigator<"u"&&navigator.onLine===!1,r=e instanceof Error?e.message:String(e??"request failed"),i=!(e instanceof Dr)||e.status===0;return n?x.jsxs(Zt,{children:[x.jsx(tf,{size:20,className:"mx-auto mb-3 text-muted"}),x.jsx("div",{className:"font-medium text-text",children:"This phone is offline"}),x.jsx("div",{className:"mt-1",children:"Check Wi-Fi or cellular. The list comes back on its own."})]}):x.jsxs(Zt,{children:[x.jsx(p3,{size:20,className:"mx-auto mb-3 text-del"}),x.jsx("div",{className:"font-medium text-text",children:i?"Can’t reach the relay":"The relay answered with an error"}),x.jsx("div",{className:"mt-1 break-words font-mono text-[11px] text-muted",children:r}),i?x.jsxs("ul",{className:"mt-4 space-y-2 text-left",children:[x.jsx("li",{children:"Is the Mac awake and online?"}),x.jsxs("li",{children:["If the relay is tailnet-only: Tailscale connected on this phone, and"," ",x.jsx("span",{className:"text-text",children:"iCloud Private Relay off"}),". Private Relay routes around the VPN, so the app stays stuck even while Tailscale says Connected."]}),x.jsx("li",{children:"Otherwise the Funnel may be stale after a network change — re-deploy on the Mac."})]}):null]})}function Zt({children:e}){return x.jsx("div",{className:"mx-auto max-w-xs px-6 py-16 text-center text-sm text-muted",children:e})}function cr({label:e}){return x.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-muted",children:[x.jsx("span",{className:"size-4 animate-spin rounded-full border-2 border-border border-t-accent"}),e]})}const q0="grid size-8 place-items-center overflow-hidden rounded-lg bg-surface-2 font-semibold text-muted";function Ql({icon:e,name:n,artwork:r}){const i=x.jsx("div",{className:pe(q0,"text-xs"),children:(n.trim()[0]??"?").toUpperCase()});if(!e)return i;if(e.kind==="emoji")return x.jsx("div",{className:pe(q0,"text-lg leading-none"),children:e.value});if(e.kind==="named"){const l=PS[e.value];return l?x.jsx("div",{className:q0,children:x.jsx(l,{size:18,className:"text-muted"})}):i}return e.kind==="github"?x.jsx(qg,{src:`https://github.com/${encodeURIComponent(e.owner)}.png?size=64`,fit:"cover",artwork:r,fallback:i}):x.jsx(VS,{repoName:n,artwork:r,fallback:i})}function qg({src:e,fit:n,artwork:r,fallback:i}){const[l,o]=D.useState(!1);return l?x.jsx(x.Fragment,{children:i}):x.jsx("div",{className:pe(q0,r==="inset"&&"p-1.5"),children:x.jsx("img",{src:e,alt:"",loading:"lazy",className:pe("size-full",r==="full-bleed"?"rounded-[inherit]":"rounded-sm",n==="cover"?"object-cover":"object-contain"),onError:()=>o(!0)})})}function VS({repoName:e,artwork:n,fallback:r}){const{data:i,isError:l}=uF(e);return!e||l||!i?x.jsx(x.Fragment,{children:r}):x.jsx(qg,{src:i,fit:"contain",artwork:n,fallback:r})}function Gg({children:e}){return x.jsxs("header",{className:"pt-safe sticky top-0 z-10 border-b border-border-soft bg-bg/80 backdrop-blur-xl",children:[e,x.jsx($S,{})]})}function vd({title:e,subtitle:n,menu:r,right:i}){const l=De(o=>o.setSidebarOpen);return x.jsx(Gg,{children:x.jsxs("div",{className:"flex items-center gap-2 px-3 pb-2.5",children:[r?x.jsx("button",{type:"button",onClick:()=>l(!0),"aria-label":"Open workspaces",className:"-ml-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 md:hidden",children:x.jsx(sk,{size:20})}):x.jsx("span",{className:"w-1"}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"truncate text-[15px] font-semibold leading-tight",children:e}),n?x.jsx("div",{className:"truncate text-xs leading-tight text-muted",children:n}):null]}),i]})})}function QS(e){const n=e.regex,r={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[r]}]};Object.assign(r,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const l={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),u={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,l]};l.contains.push(d);const f={match:/\\"/},h={className:"string",begin:/'/,end:/'/},g={match:/\\'/},p={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,r]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],b=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),C={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},v=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],B={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],S=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],M=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],T=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:v,literal:k,built_in:[..._,...S,"set","shopt",...M,...T]},contains:[b,e.SHEBANG(),C,p,o,u,B,d,f,h,g,r]}}const YS=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,4}(-[0-9A-Fa-f][0-9A-Fa-f]{0,4})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),KS=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],XS=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],ZS=[...KS,...XS],WS=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),JS=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),eN=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),tN=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function nN(e){const n=e.regex,r=YS(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l="and or not only",o=/@-?\w[\w]*(-\w+)*/,u="[a-zA-Z-][a-zA-Z0-9_-]*",d=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,i,r.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+u,relevance:0},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JS.join("|")+")"},{begin:":(:)?("+eN.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+tN.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,r.UNICODE_RANGE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.FUNCTION_DISPATCH]},{begin:n.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:l,attribute:WS.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+ZS.join("|")+")\\b"}]}}function rN(e){const n=e.regex,r={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},i=e.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const l={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},d={begin:/\[/,end:/\]/,contains:[i,o,l,u,r,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,g=/'[^']*'/,p=n.either(f,h,g),y=n.concat(p,"(\\s*\\.\\s*",p,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[i,d,o,l,u,r]}}]}}const S9="[A-Za-z$_][0-9A-Za-z$_]*",aN=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],iN=["true","false","null","undefined","NaN","Infinity"],Vg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Qg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Yg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],sN=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],lN=[].concat(Yg,Vg,Qg);function oN(e){const n=e.regex,r=(X,{after:fe})=>{const j="</"+X[0].slice(1);return X.input.indexOf(j,fe)!==-1},i=S9,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,fe)=>{const j=X[0].length+X.index,z=X.input[j];if(z==="<"||z===","){fe.ignoreMatch();return}z===">"&&(r(X,{after:j})||fe.ignoreMatch());let Z;const F=X.input.substring(j);if(Z=F.match(/^\s*=/)){fe.ignoreMatch();return}if((Z=F.match(/^\s+extends\s+/))&&Z.index===0){fe.ignoreMatch();return}}},d={$pattern:S9,keyword:aN,literal:iN,built_in:lN,"variable.language":sN},f="[0-9](_?[0-9])*",h=`\\.(${f})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},C={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,C,v,k,{match:/\$\d+/},p];y.contains=S.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(S)});const M=[].concat(_,y.contains),T=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(M)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:T},R={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,n.concat(i,"(",n.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},L={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Vg,...Qg]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(X){return n.concat("(?!",X.join("|"),")")}const le={match:n.concat(/\b/,Q([...Yg,"super","import","await"].map(X=>`${X}\\s*\\(`)),i,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},W={begin:n.concat(/\./,n.lookahead(n.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:L},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,C,v,k,_,{match:/\$\d+/},p,L,{scope:"attr",match:i+n.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},W,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},le,$,R,Y,{match:/\$[(.]/}]}}const cN="([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",uN={scope:"number",match:cN,relevance:0};function xN(e){const n={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],l={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:i},contains:[n,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,l,uN,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function dN(e){const n=e.regex,r={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},l={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},u={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},h={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},g={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},p=e.inherit(h,{contains:[]}),y=e.inherit(g,{contains:[]});h.contains.push(y),g.contains.push(p);let b=[r,f];return[h,g,p,y].forEach(B=>{B.contains=B.contains.concat(b)}),b=b.concat(h,g),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:b},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:b}]}]},r,o,h,g,{className:"quote",begin:"^>\\s+",contains:b,end:"$"},l,i,f,u,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function fN(e){const n=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],d={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},h={className:"subst",begin:/\{/,end:/\}/,keywords:d,illegal:/#/},g={begin:/\{\{/,relevance:0},p={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,g,h]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,g,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,g,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",b=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,C=`\\b|${i.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${b}))[eE][+-]?(${y})[jJ]?(?=${C})`},{begin:`(${b})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${C})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${C})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${C})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${C})`},{begin:`\\b(${y})[jJ](?=${C})`}]},k={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},B={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",f,v,p,e.HASH_COMMENT_MODE]}]};return h.contains=[p,v,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[f,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},p,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[B]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[v,B,p]}]}}function hN(e){const n=e.regex,r=e.COMMENT("--","$"),i={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},l={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],u=["double precision","large object","with timezone","without timezone"],d=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],f=["add","asc","collation","desc","final","first","last","view"],h=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],g=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],p=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],b=g,C=[...h,...f].filter(T=>!g.includes(T)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},B={match:n.concat(/\b/,n.either(...b),/\s*\(/),relevance:0,keywords:{built_in:b}};function _(T){return n.concat(/\b/,n.either(...T.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}const S={scope:"keyword",match:_(y),relevance:0};function M(T,{exceptions:w,when:R}={}){const L=R;return w=w||[],T.map(I=>I.match(/\|\d+$/)||w.includes(I)?I:L(I)?`${I}|0`:I)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:M(C,{when:T=>T.length<3}),literal:o,type:d,built_in:p},contains:[{scope:"type",match:_(u)},S,B,v,i,l,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,r,k]}}const Z0="[A-Za-z$_][0-9A-Za-z$_]*",Kg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Xg=["true","false","null","undefined","NaN","Infinity"],Zg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Wg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Jg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],eE=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],tE=[].concat(Jg,Zg,Wg);function pN(e){const n=e.regex,r=(X,{after:fe})=>{const j="</"+X[0].slice(1);return X.input.indexOf(j,fe)!==-1},i=Z0,l={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,u={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(X,fe)=>{const j=X[0].length+X.index,z=X.input[j];if(z==="<"||z===","){fe.ignoreMatch();return}z===">"&&(r(X,{after:j})||fe.ignoreMatch());let Z;const F=X.input.substring(j);if(Z=F.match(/^\s*=/)){fe.ignoreMatch();return}if((Z=F.match(/^\s+extends\s+/))&&Z.index===0){fe.ignoreMatch();return}}},d={$pattern:Z0,keyword:Kg,literal:Xg,built_in:tE,"variable.language":eE},f="[0-9](_?[0-9])*",h=`\\.(${f})`,g="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",p={className:"number",variants:[{begin:`(\\b(${g})((${h})|\\.)?|(${h}))[eE][+-]?(${f})\\b`},{begin:`\\b(${g})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},y={className:"subst",begin:"\\$\\{",end:"\\}",keywords:d,contains:[]},b={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"xml"}},C={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,y],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,y]},_={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},S=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,C,v,k,{match:/\$\d+/},p];y.contains=S.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(S)});const M=[].concat(_,y.contains),T=M.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(M)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:T},R={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,n.concat(i,"(",n.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},L={relevance:0,match:n.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Zg,...Wg]}},I={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},$={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Q(X){return n.concat("(?!",X.join("|"),")")}const le={match:n.concat(/\b/,Q([...Jg,"super","import","await"].map(X=>`${X}\\s*\\(`)),i,n.lookahead(/\s*\(/)),className:"title.function",relevance:0},W={begin:n.concat(/\./,n.lookahead(n.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},P="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",V={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,n.lookahead(P)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:L},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),I,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,b,C,v,k,_,{match:/\$\d+/},p,L,{scope:"attr",match:i+n.lookahead(":"),relevance:0},V,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[_,e.REGEXP_MODE,{className:"function",begin:P,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:l.begin,end:l.end},{match:o},{begin:u.begin,"on:begin":u.isTrulyOpeningTag,end:u.end}],subLanguage:"xml",contains:[{begin:u.begin,end:u.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},W,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},le,$,R,Y,{match:/\$[(.]/}]}}function mN(e){const n=e.regex,r=pN(e),i=Z0,l=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},u={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:l},contains:[r.exports.CLASS_REFERENCE]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Z0,keyword:Kg.concat(f),literal:Xg,built_in:tE.concat(l),"variable.language":eE},g={className:"meta",begin:"@"+i},p=(v,k,B)=>{const _=v.contains.findIndex(S=>S.label===k);if(_===-1)throw new Error("can not find mode to replace");v.contains.splice(_,1,B)};Object.assign(r.keywords,h),r.exports.PARAMS_CONTAINS.push(g);const y=r.contains.find(v=>v.scope==="attr"),b=Object.assign({},y,{match:n.concat(i,n.lookahead(/\s*\?:/))});r.exports.PARAMS_CONTAINS.push([r.exports.CLASS_REFERENCE,y,b]),r.contains=r.contains.concat([g,o,u,b]),p(r,"shebang",e.SHEBANG()),p(r,"use_strict",d);const C=r.contains.find(v=>v.label==="func.def");return C.relevance=0,Object.assign(r,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),r}function gN(e){const n=e.regex,r=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,l={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},u=e.inherit(o,{begin:/\(/,end:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[l]},{begin:/'/,end:/'/,contains:[l]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,f,d,u,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,u,f,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},l,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(r,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:h}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function EN(e){const n="true false yes no null",r="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},l={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},u={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,l]},d=e.inherit(u,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},b={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},C={begin:/\{/,end:/\}/,contains:[b],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[b],illegal:"\\n",relevance:0},k=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+r},{className:"type",begin:"!<"+r+">"},{className:"type",begin:"!"+r},{className:"type",begin:"!!"+r},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},C,v,o,u],B=[...k];return B.pop(),B.push(d),b.contains=B,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}var _x,N9;function yN(){if(N9)return _x;N9=1;function e(U){return U instanceof Map?U.clear=U.delete=U.set=function(){throw new Error("map is read-only")}:U instanceof Set&&(U.add=U.clear=U.delete=function(){throw new Error("set is read-only")}),Object.freeze(U),Object.getOwnPropertyNames(U).forEach(ce=>{const ge=U[ce],Ue=typeof ge;(Ue==="object"||Ue==="function")&&!Object.isFrozen(ge)&&e(ge)}),U}class n{constructor(ce){ce.data===void 0&&(ce.data={}),this.data=ce.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(U){return U.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(U,...ce){const ge=Object.create(null);for(const Ue in U)ge[Ue]=U[Ue];return ce.forEach(function(Ue){for(const Ot in Ue)ge[Ot]=Ue[Ot]}),ge}const l="</span>",o=U=>!!U.scope,u=(U,{prefix:ce})=>{if(U.startsWith("language:"))return U.replace("language:","language-");if(U.includes(".")){const ge=U.split(".");return[`${ce}${ge.shift()}`,...ge.map((Ue,Ot)=>`${Ue}${"_".repeat(Ot+1)}`)].join(" ")}return`${ce}${U}`};class d{constructor(ce,ge){this.buffer="",this.classPrefix=ge.classPrefix,ce.walk(this)}addText(ce){this.buffer+=r(ce)}openNode(ce){if(!o(ce))return;const ge=u(ce.scope,{prefix:this.classPrefix});this.span(ge)}closeNode(ce){o(ce)&&(this.buffer+=l)}value(){return this.buffer}span(ce){this.buffer+=`<span class="${ce}">`}}const f=(U={})=>{const ce={children:[]};return Object.assign(ce,U),ce};class h{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(ce){this.top.children.push(ce)}openNode(ce){const ge=f({scope:ce});this.add(ge),this.stack.push(ge)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(ce){return this.constructor._walk(ce,this.rootNode)}static _walk(ce,ge){return typeof ge=="string"?ce.addText(ge):ge.children&&(ce.openNode(ge),ge.children.forEach(Ue=>this._walk(ce,Ue)),ce.closeNode(ge)),ce}static _collapse(ce){typeof ce!="string"&&ce.children&&(ce.children.every(ge=>typeof ge=="string")?ce.children=[ce.children.join("")]:ce.children.forEach(ge=>{h._collapse(ge)}))}}class g extends h{constructor(ce){super(),this.options=ce}addText(ce){ce!==""&&this.add(ce)}startScope(ce){this.openNode(ce)}endScope(){this.closeNode()}__addSublanguage(ce,ge){const Ue=ce.root;ge&&(Ue.scope=`language:${ge}`),this.add(Ue)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function p(U){return U?typeof U=="string"?U:U.source:null}function y(U){return v("(?=",U,")")}function b(U){return v("(?:",U,")*")}function C(U){return v("(?:",U,")?")}function v(...U){return U.map(ge=>p(ge)).join("")}function k(U){const ce=U[U.length-1];return typeof ce=="object"&&ce.constructor===Object?(U.splice(U.length-1,1),ce):{}}function B(...U){return"("+(k(U).capture?"":"?:")+U.map(Ue=>p(Ue)).join("|")+")"}function _(U){return new RegExp(U.toString()+"|").exec("").length-1}function S(U,ce){const ge=U&&U.exec(ce);return ge&&ge.index===0}const M=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function T(U,{joinWith:ce}){let ge=0;return U.map(Ue=>{ge+=1;const Ot=ge;let et=p(Ue),je="";for(;et.length>0;){const Fe=M.exec(et);if(!Fe){je+=et;break}je+=et.substring(0,Fe.index),et=et.substring(Fe.index+Fe[0].length),Fe[0][0]==="\\"&&Fe[1]?je+="\\"+String(Number(Fe[1])+Ot):(je+=Fe[0],Fe[0]==="("&&ge++)}return je}).map(Ue=>`(${Ue})`).join(ce)}const w=/\b\B/,R="[a-zA-Z]\\w*",L="[a-zA-Z_]\\w*",I="\\b\\d+(\\.\\d+)?",O="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$="\\b(0b[01]+)",Q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",le=(U={})=>{const ce=/^#![ ]*\//;return U.binary&&(U.begin=v(ce,/.*\b/,U.binary,/\b.*/)),i({scope:"meta",begin:ce,end:/$/,relevance:0,"on:begin":(ge,Ue)=>{ge.index!==0&&Ue.ignoreMatch()}},U)},W={begin:"\\\\[\\s\\S]",relevance:0},Y={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[W]},P={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[W]},V={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},X=function(U,ce,ge={}){const Ue=i({scope:"comment",begin:U,end:ce,contains:[]},ge);Ue.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ot=B("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Ue.contains.push({begin:v(/[ ]+/,"(",Ot,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Ue},fe=X("//","$"),j=X("/\\*","\\*/"),z=X("#","$"),Z={scope:"number",begin:I,relevance:0},F={scope:"number",begin:O,relevance:0},te={scope:"number",begin:$,relevance:0},ae={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[W,{begin:/\[/,end:/\]/,relevance:0,contains:[W]}]},xe={scope:"title",begin:R,relevance:0},ve={scope:"title",begin:L,relevance:0},Ge={begin:"\\.\\s*"+L,relevance:0};var nt=Object.freeze({__proto__:null,APOS_STRING_MODE:Y,BACKSLASH_ESCAPE:W,BINARY_NUMBER_MODE:te,BINARY_NUMBER_RE:$,COMMENT:X,C_BLOCK_COMMENT_MODE:j,C_LINE_COMMENT_MODE:fe,C_NUMBER_MODE:F,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(U){return Object.assign(U,{"on:begin":(ce,ge)=>{ge.data._beginMatch=ce[1]},"on:end":(ce,ge)=>{ge.data._beginMatch!==ce[1]&&ge.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:R,MATCH_NOTHING_RE:w,METHOD_GUARD:Ge,NUMBER_MODE:Z,NUMBER_RE:I,PHRASAL_WORDS_MODE:V,QUOTE_STRING_MODE:P,REGEXP_MODE:ae,RE_STARTERS_RE:Q,SHEBANG:le,TITLE_MODE:xe,UNDERSCORE_IDENT_RE:L,UNDERSCORE_TITLE_MODE:ve});function ot(U,ce){U.input[U.index-1]==="."&&ce.ignoreMatch()}function $t(U,ce){U.className!==void 0&&(U.scope=U.className,delete U.className)}function Ct(U,ce){ce&&U.beginKeywords&&(U.begin="\\b("+U.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",U.__beforeBegin=ot,U.keywords=U.keywords||U.beginKeywords,delete U.beginKeywords,U.relevance===void 0&&(U.relevance=0))}function we(U,ce){Array.isArray(U.illegal)&&(U.illegal=B(...U.illegal))}function ke(U,ce){if(U.match){if(U.begin||U.end)throw new Error("begin & end are not supported with match");U.begin=U.match,delete U.match}}function Je(U,ce){U.relevance===void 0&&(U.relevance=1)}const pt=(U,ce)=>{if(!U.beforeMatch)return;if(U.starts)throw new Error("beforeMatch cannot be used with starts");const ge=Object.assign({},U);Object.keys(U).forEach(Ue=>{delete U[Ue]}),U.keywords=ge.keywords,U.begin=v(ge.beforeMatch,y(ge.begin)),U.starts={relevance:0,contains:[Object.assign(ge,{endsParent:!0})]},U.relevance=0,delete ge.beforeMatch},rt=["of","and","for","in","not","or","if","then","parent","list","value"],vt="keyword";function Ke(U,ce,ge=vt){const Ue=Object.create(null);return typeof U=="string"?Ot(ge,U.split(" ")):Array.isArray(U)?Ot(ge,U):Object.keys(U).forEach(function(et){Object.assign(Ue,Ke(U[et],ce,et))}),Ue;function Ot(et,je){ce&&(je=je.map(Fe=>Fe.toLowerCase())),je.forEach(function(Fe){const qe=Fe.split("|");Ue[qe[0]]=[et,it(qe[0],qe[1])]})}}function it(U,ce){return ce?Number(ce):En(U)?0:1}function En(U){return rt.includes(U.toLowerCase())}const kn={},Ze=U=>{console.error(U)},tn=(U,...ce)=>{console.log(`WARN: ${U}`,...ce)},se=(U,ce)=>{kn[`${U}/${ce}`]||(console.log(`Deprecated as of ${U}. ${ce}`),kn[`${U}/${ce}`]=!0)},Ee=new Error;function _e(U,ce,{key:ge}){let Ue=0;const Ot=U[ge],et={},je={};for(let Fe=1;Fe<=ce.length;Fe++)je[Fe+Ue]=Ot[Fe],et[Fe+Ue]=!0,Ue+=_(ce[Fe-1]);U[ge]=je,U[ge]._emit=et,U[ge]._multi=!0}function Ve(U){if(Array.isArray(U.begin)){if(U.skip||U.excludeBegin||U.returnBegin)throw Ze("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Ee;if(typeof U.beginScope!="object"||U.beginScope===null)throw Ze("beginScope must be object"),Ee;_e(U,U.begin,{key:"beginScope"}),U.begin=T(U.begin,{joinWith:""})}}function st(U){if(Array.isArray(U.end)){if(U.skip||U.excludeEnd||U.returnEnd)throw Ze("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Ee;if(typeof U.endScope!="object"||U.endScope===null)throw Ze("endScope must be object"),Ee;_e(U,U.end,{key:"endScope"}),U.end=T(U.end,{joinWith:""})}}function It(U){U.scope&&typeof U.scope=="object"&&U.scope!==null&&(U.beginScope=U.scope,delete U.scope)}function cn(U){It(U),typeof U.beginScope=="string"&&(U.beginScope={_wrap:U.beginScope}),typeof U.endScope=="string"&&(U.endScope={_wrap:U.endScope}),Ve(U),st(U)}function Qt(U){function ce(je,Fe){return new RegExp(p(je),"m"+(U.case_insensitive?"i":"")+(U.unicodeRegex?"u":"")+(Fe?"g":""))}class ge{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Fe,qe){qe.position=this.position++,this.matchIndexes[this.matchAt]=qe,this.regexes.push([qe,Fe]),this.matchAt+=_(Fe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Fe=this.regexes.map(qe=>qe[1]);this.matcherRe=ce(T(Fe,{joinWith:"|"}),!0),this.lastIndex=0}exec(Fe){this.matcherRe.lastIndex=this.lastIndex;const qe=this.matcherRe.exec(Fe);if(!qe)return null;const rn=qe.findIndex((Vr,Ti)=>Ti>0&&Vr!==void 0),Kt=this.matchIndexes[rn];return qe.splice(0,rn),Object.assign(qe,Kt)}}class Ue{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Fe){if(this.multiRegexes[Fe])return this.multiRegexes[Fe];const qe=new ge;return this.rules.slice(Fe).forEach(([rn,Kt])=>qe.addRule(rn,Kt)),qe.compile(),this.multiRegexes[Fe]=qe,qe}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Fe,qe){this.rules.push([Fe,qe]),qe.type==="begin"&&this.count++}exec(Fe){const qe=this.getMatcher(this.regexIndex);qe.lastIndex=this.lastIndex;let rn=qe.exec(Fe);if(this.resumingScanAtSamePosition()&&!(rn&&rn.index===this.lastIndex)){const Kt=this.getMatcher(0);Kt.lastIndex=this.lastIndex+1,rn=Kt.exec(Fe)}return rn&&(this.regexIndex+=rn.position+1,this.regexIndex===this.count&&this.considerAll()),rn}}function Ot(je){const Fe=new Ue;return je.contains.forEach(qe=>Fe.addRule(qe.begin,{rule:qe,type:"begin"})),je.terminatorEnd&&Fe.addRule(je.terminatorEnd,{type:"end"}),je.illegal&&Fe.addRule(je.illegal,{type:"illegal"}),Fe}function et(je,Fe){const qe=je;if(je.isCompiled)return qe;[$t,ke,cn,pt].forEach(Kt=>Kt(je,Fe)),U.compilerExtensions.forEach(Kt=>Kt(je,Fe)),je.__beforeBegin=null,[Ct,we,Je].forEach(Kt=>Kt(je,Fe)),je.isCompiled=!0;let rn=null;return typeof je.keywords=="object"&&je.keywords.$pattern&&(je.keywords=Object.assign({},je.keywords),rn=je.keywords.$pattern,delete je.keywords.$pattern),rn=rn||/\w+/,je.keywords&&(je.keywords=Ke(je.keywords,U.case_insensitive)),qe.keywordPatternRe=ce(rn,!0),Fe&&(je.begin||(je.begin=/\B|\b/),qe.beginRe=ce(qe.begin),!je.end&&!je.endsWithParent&&(je.end=/\B|\b/),je.end&&(qe.endRe=ce(qe.end)),qe.terminatorEnd=p(qe.end)||"",je.endsWithParent&&Fe.terminatorEnd&&(qe.terminatorEnd+=(je.end?"|":"")+Fe.terminatorEnd)),je.illegal&&(qe.illegalRe=ce(je.illegal)),je.contains||(je.contains=[]),je.contains=[].concat(...je.contains.map(function(Kt){return Yt(Kt==="self"?je:Kt)})),je.contains.forEach(function(Kt){et(Kt,qe)}),je.starts&&et(je.starts,Fe),qe.matcher=Ot(qe),qe}if(U.compilerExtensions||(U.compilerExtensions=[]),U.contains&&U.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return U.classNameAliases=i(U.classNameAliases||{}),et(U)}function Dt(U){return U?U.endsWithParent||Dt(U.starts):!1}function Yt(U){return U.variants&&!U.cachedVariants&&(U.cachedVariants=U.variants.map(function(ce){return i(U,{variants:null},ce)})),U.cachedVariants?U.cachedVariants:Dt(U)?i(U,{starts:U.starts?i(U.starts):null}):Object.isFrozen(U)?i(U):U}var re="11.11.2";class mt extends Error{constructor(ce,ge){super(ce),this.name="HTMLInjectionError",this.html=ge}}const At=r,oe=i,gt=Symbol("nomatch"),wt=7,nn=function(U){const ce=Object.create(null),ge=Object.create(null),Ue=[];let Ot=!0;const et="Could not find the language '{}', did you forget to load/include a language module?",je={disableAutodetect:!0,name:"Plain text",contains:[]};let Fe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:g};function qe(ye){return Fe.noHighlightRe.test(ye)}function rn(ye){let ze=ye.className+" ";ze+=ye.parentNode?ye.parentNode.className:"";const lt=Fe.languageDetectRe.exec(ze);if(lt){const St=zn(lt[1]);return St||(tn(et.replace("{}",lt[1])),tn("Falling back to no-highlight mode for this block.",ye)),St?lt[1]:"no-highlight"}return ze.split(/\s+/).find(St=>qe(St)||zn(St))}function Kt(ye,ze,lt){let St="",sn="";typeof ze=="object"?(St=ye,lt=ze.ignoreIllegals,sn=ze.language):(se("10.7.0","highlight(lang, code, ...args) has been deprecated."),se("10.7.0",`Please use highlight(code, options) instead.
|
|
15
15
|
https://github.com/highlightjs/highlight.js/issues/2277`),sn=ye,St=ze),lt===void 0&&(lt=!0);const Mn={code:St,language:sn};ni("before:highlight",Mn);const Wn=Mn.result?Mn.result:Vr(Mn.language,Mn.code,lt);return Wn.code=Mn.code,ni("after:highlight",Wn),Wn}function Vr(ye,ze,lt,St){const sn=Object.create(null);function Mn(Be,Re){return Be.keywords[Re]}function Wn(){if(!$e.keywords){xn.addText(Nt);return}let Be=0;$e.keywordPatternRe.lastIndex=0;let Re=$e.keywordPatternRe.exec(Nt),Xe="";for(;Re;){Xe+=Nt.substring(Be,Re.index);const dt=Bn.case_insensitive?Re[0].toLowerCase():Re[0],Wt=Mn($e,dt);if(Wt){const[fr,Rs]=Wt;if(xn.addText(Xe),Xe="",sn[dt]=(sn[dt]||0)+1,sn[dt]<=wt&&(Aa+=Rs),fr.startsWith("_"))Xe+=Re[0];else{const po=Bn.classNameAliases[fr]||fr;Jn(Re[0],po)}}else Xe+=Re[0];Be=$e.keywordPatternRe.lastIndex,Re=$e.keywordPatternRe.exec(Nt)}Xe+=Nt.substring(Be),xn.addText(Xe)}function In(){if(Nt==="")return;let Be=null;if(typeof $e.subLanguage=="string"){if(!ce[$e.subLanguage]){xn.addText(Nt);return}Be=Vr($e.subLanguage,Nt,!0,ho[$e.subLanguage]),ho[$e.subLanguage]=Be._top}else Be=Ri(Nt,$e.subLanguage.length?$e.subLanguage:null);$e.relevance>0&&(Aa+=Be.relevance),xn.__addSublanguage(Be._emitter,Be.language)}function Ut(){$e.subLanguage!=null?In():Wn(),Nt=""}function Jn(Be,Re){Be!==""&&(xn.startScope(Re),xn.addText(Be),xn.endScope())}function xo(Be,Re){let Xe=1;const dt=Re.length-1;for(;Xe<=dt;){if(!Be._emit[Xe]){Xe++;continue}const Wt=Bn.classNameAliases[Be[Xe]]||Be[Xe],fr=Re[Xe];Wt?Jn(fr,Wt):(Nt=fr,Wn(),Nt=""),Xe++}}function zi(Be,Re){return Be.scope&&typeof Be.scope=="string"&&xn.openNode(Bn.classNameAliases[Be.scope]||Be.scope),Be.beginScope&&(Be.beginScope._wrap?(Jn(Nt,Bn.classNameAliases[Be.beginScope._wrap]||Be.beginScope._wrap),Nt=""):Be.beginScope._multi&&(xo(Be.beginScope,Re),Nt="")),$e=Object.create(Be,{parent:{value:$e}}),$e}function Ms(Be,Re,Xe){let dt=S(Be.endRe,Xe);if(dt){if(Be["on:end"]){const Wt=new n(Be);Be["on:end"](Re,Wt),Wt.isMatchIgnored&&(dt=!1)}if(dt){for(;Be.endsParent&&Be.parent;)Be=Be.parent;return Be}}if(Be.endsWithParent)return Ms(Be.parent,Re,Xe)}function Li(Be){return $e.matcher.regexIndex===0?(Nt+=Be[0],1):(ka=!0,0)}function mc(Be){const Re=Be[0],Xe=Be.rule,dt=new n(Xe),Wt=[Xe.__beforeBegin,Xe["on:begin"]];for(const fr of Wt)if(fr&&(fr(Be,dt),dt.isMatchIgnored))return Li(Re);return Xe.skip?Nt+=Re:(Xe.excludeBegin&&(Nt+=Re),Ut(),!Xe.returnBegin&&!Xe.excludeBegin&&(Nt=Re)),zi(Xe,Be),Xe.returnBegin?0:Re.length}function Un(Be){const Re=Be[0],Xe=ze.substring(Be.index),dt=Ms($e,Be,Xe);if(!dt)return gt;const Wt=$e;$e.endScope&&$e.endScope._wrap?(Ut(),Jn(Re,$e.endScope._wrap)):$e.endScope&&$e.endScope._multi?(Ut(),xo($e.endScope,Be)):Wt.skip?Nt+=Re:(Wt.returnEnd||Wt.excludeEnd||(Nt+=Re),Ut(),Wt.excludeEnd&&(Nt=Re));do $e.scope&&xn.closeNode(),!$e.skip&&!$e.subLanguage&&(Aa+=$e.relevance),$e=$e.parent;while($e!==dt.parent);return dt.starts&&zi(dt.starts,Be),Wt.returnEnd?0:Re.length}function js(){const Be=[];for(let Re=$e;Re!==Bn;Re=Re.parent)Re.scope&&Be.unshift(Re.scope);Be.forEach(Re=>xn.openNode(Re))}let ri={};function Pi(Be,Re){const Xe=Re&&Re[0];if(Nt+=Be,Xe==null)return Ut(),0;if(ri.type==="begin"&&Re.type==="end"&&ri.index===Re.index&&Xe===""){if(Nt+=ze.slice(Re.index,Re.index+1),!Ot){const dt=new Error(`0 width match regex (${ye})`);throw dt.languageName=ye,dt.badRule=ri.rule,dt}return 1}if(ri=Re,Re.type==="begin")return mc(Re);if(Re.type==="illegal"&&!lt){const dt=new Error('Illegal lexeme "'+Xe+'" for mode "'+($e.scope||"<unnamed>")+'"');throw dt.mode=$e,dt}else if(Re.type==="end"){const dt=Un(Re);if(dt!==gt)return dt}if(Re.type==="illegal"&&Xe==="")return Re.index===ze.length||(Nt+=`
|
|
16
16
|
`),1;if(Ts>1e5&&Ts>Re.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Nt+=Xe,Xe.length}const Bn=zn(ye);if(!Bn)throw Ze(et.replace("{}",ye)),new Error('Unknown language: "'+ye+'"');const fo=Qt(Bn);let Ii="",$e=St||fo;const ho={},xn=new Fe.__emitter(Fe);js();let Nt="",Aa=0,Kr=0,Ts=0,ka=!1;try{if(Bn.__emitTokens)Bn.__emitTokens(ze,xn);else{for($e.matcher.considerAll();;){Ts++,ka?ka=!1:$e.matcher.considerAll(),$e.matcher.lastIndex=Kr;const Be=$e.matcher.exec(ze);if(!Be)break;const Re=ze.substring(Kr,Be.index),Xe=Pi(Re,Be);Kr=Be.index+Xe}Pi(ze.substring(Kr))}return xn.finalize(),Ii=xn.toHTML(),{language:ye,value:Ii,relevance:Aa,illegal:!1,_emitter:xn,_top:$e}}catch(Be){if(Be.message&&Be.message.includes("Illegal"))return{language:ye,value:At(ze),illegal:!0,relevance:0,_illegalBy:{message:Be.message,index:Kr,context:ze.slice(Kr-100,Kr+100),mode:Be.mode,resultSoFar:Ii},_emitter:xn};if(Ot)return{language:ye,value:At(ze),illegal:!1,relevance:0,errorRaised:Be,_emitter:xn,_top:$e};throw Be}}function Ti(ye){const ze={value:At(ye),illegal:!1,relevance:0,_top:je,_emitter:new Fe.__emitter(Fe)};return ze._emitter.addText(ye),ze}function Ri(ye,ze){ze=ze||Fe.languages||Object.keys(ce);const lt=Ti(ye),St=ze.filter(zn).filter(Ca).map(Ut=>Vr(Ut,ye,!1));St.unshift(lt);const sn=St.sort((Ut,Jn)=>{if(Ut.relevance!==Jn.relevance)return Jn.relevance-Ut.relevance;if(Ut.language&&Jn.language){if(zn(Ut.language).supersetOf===Jn.language)return 1;if(zn(Jn.language).supersetOf===Ut.language)return-1}return 0}),[Mn,Wn]=sn,In=Mn;return In.secondBest=Wn,In}function Or(ye,ze,lt){const St=ze&&ge[ze]||lt;ye.classList.add("hljs"),ye.classList.add(`language-${St}`)}function an(ye){let ze=null;const lt=rn(ye);if(qe(lt))return;if(ni("before:highlightElement",{el:ye,language:lt}),ye.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ye);return}if(ye.children.length>0&&(Fe.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ye)),Fe.throwUnescapedHTML))throw new mt("One of your code blocks includes unescaped HTML.",ye.innerHTML);ze=ye;const St=ze.textContent,sn=lt?Kt(St,{language:lt,ignoreIllegals:!0}):Ri(St);ye.innerHTML=sn.value,ye.dataset.highlighted="yes",Or(ye,lt,sn.language),ye.result={language:sn.language,re:sn.relevance,relevance:sn.relevance},sn.secondBest&&(ye.secondBest={language:sn.secondBest.language,relevance:sn.secondBest.relevance}),ni("after:highlightElement",{el:ye,result:sn,text:St})}function _n(ye){Fe=oe(Fe,ye)}const ba=()=>{Oi(),se("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ns(){Oi(),se("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let oo=!1;function Oi(){function ye(){Oi()}if(document.readyState==="loading"){oo||window.addEventListener("DOMContentLoaded",ye,!1),oo=!0;return}document.querySelectorAll(Fe.cssSelector).forEach(an)}function co(ye,ze){let lt=null;try{lt=ze(U)}catch(St){if(Ze("Language definition for '{}' could not be registered.".replace("{}",ye)),Ot)Ze(St);else throw St;lt=je}lt.name||(lt.name=ye),ce[ye]=lt,lt.rawDefinition=ze.bind(null,U),lt.aliases&&Qr(lt.aliases,{languageName:ye})}function ti(ye){delete ce[ye];for(const ze of Object.keys(ge))ge[ze]===ye&&delete ge[ze]}function _s(){return Object.keys(ce)}function zn(ye){return ye=(ye||"").toLowerCase(),ce[ye]||ce[ge[ye]]}function Qr(ye,{languageName:ze}){typeof ye=="string"&&(ye=[ye]),ye.forEach(lt=>{ge[lt.toLowerCase()]=ze})}function Ca(ye){const ze=zn(ye);return ze&&!ze.disableAutodetect}function va(ye){ye["before:highlightBlock"]&&!ye["before:highlightElement"]&&(ye["before:highlightElement"]=ze=>{ye["before:highlightBlock"](Object.assign({block:ze.el},ze))}),ye["after:highlightBlock"]&&!ye["after:highlightElement"]&&(ye["after:highlightElement"]=ze=>{ye["after:highlightBlock"](Object.assign({block:ze.el},ze))})}function un(ye){va(ye),Ue.push(ye)}function uo(ye){const ze=Ue.indexOf(ye);ze!==-1&&Ue.splice(ze,1)}function ni(ye,ze){const lt=ye;Ue.forEach(function(St){St[lt]&&St[lt](ze)})}function Yr(ye){return se("10.7.0","highlightBlock will be removed entirely in v12.0"),se("10.7.0","Please use highlightElement now."),an(ye)}Object.assign(U,{highlight:Kt,highlightAuto:Ri,highlightAll:Oi,highlightElement:an,highlightBlock:Yr,configure:_n,initHighlighting:ba,initHighlightingOnLoad:Ns,registerLanguage:co,unregisterLanguage:ti,listLanguages:_s,getLanguage:zn,registerAliases:Qr,autoDetection:Ca,inherit:oe,addPlugin:un,removePlugin:uo}),U.debugMode=function(){Ot=!1},U.safeMode=function(){Ot=!0},U.versionString=re,U.regex={concat:v,lookahead:y,either:B,optional:C,anyNumberOfTimes:b};for(const ye in nt)typeof nt[ye]=="object"&&e(nt[ye]);return Object.assign(U,nt),U},Ae=nn({});return Ae.newInstance=()=>nn({}),_x=Ae,Ae.HighlightJS=Ae,Ae.default=Ae,_x}var bN=yN();const CN=Wl(bN),_9={},vN="hljs-";function AN(e){const n=CN.newInstance();return e&&o(e),{highlight:r,highlightAuto:i,listLanguages:l,register:o,registerAlias:u,registered:d};function r(f,h,g){const p=g||_9,y=typeof p.prefix=="string"?p.prefix:vN;if(!n.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");n.configure({__emitter:kN,classPrefix:y});const b=n.highlight(h,{ignoreIllegals:!0,language:f});if(b.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:b.errorRaised});const C=b._emitter.root,v=C.data;return v.language=b.language,v.relevance=b.relevance,C}function i(f,h){const p=(h||_9).subset||l();let y=-1,b=0,C;for(;++y<p.length;){const v=p[y];if(!n.getLanguage(v))continue;const k=r(v,f,h);k.data&&k.data.relevance!==void 0&&k.data.relevance>b&&(b=k.data.relevance,C=k)}return C||{type:"root",children:[],data:{language:void 0,relevance:b}}}function l(){return n.listLanguages()}function o(f,h){if(typeof f=="string")n.registerLanguage(f,h);else{let g;for(g in f)Object.hasOwn(f,g)&&n.registerLanguage(g,f[g])}}function u(f,h){if(typeof f=="string")n.registerAliases(typeof h=="string"?h:[...h],{languageName:f});else{let g;for(g in f)if(Object.hasOwn(f,g)){const p=f[g];n.registerAliases(typeof p=="string"?p:[...p],{languageName:g})}}}function d(f){return!!n.getLanguage(f)}}class kN{constructor(n){this.options=n,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(n){if(n==="")return;const r=this.stack[this.stack.length-1],i=r.children[r.children.length-1];i&&i.type==="text"?i.value+=n:r.children.push({type:"text",value:n})}startScope(n){this.openNode(String(n))}endScope(){this.closeNode()}__addSublanguage(n,r){const i=this.stack[this.stack.length-1],l=n.root.children;r?i.children.push({type:"element",tagName:"span",properties:{className:[r]},children:l}):i.children.push(...l)}openNode(n){const r=this,i=n.split(".").map(function(u,d){return d?u+"_".repeat(d):r.options.classPrefix+u}),l=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:i},children:[]};l.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const M9=AN({bash:QS,css:nN,ini:rN,javascript:oN,json:xN,markdown:dN,python:fN,sql:hN,typescript:mN,xml:gN,yaml:EN}),nE={bash:"bash",sh:"bash",zsh:"bash",css:"css",scss:"css",toml:"ini",ini:"ini",js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",json:"json",jsonc:"json",md:"markdown",markdown:"markdown",py:"python",sql:"sql",ts:"typescript",tsx:"typescript",mts:"typescript",cts:"typescript",html:"xml",svg:"xml",xml:"xml",yaml:"yaml",yml:"yaml"},BN={...nE,shell:"bash",console:"bash",javascript:"javascript",typescript:"typescript",python:"python",yaml:"yaml",json:"json",sql:"sql"},DN={Bash:"bash"};function wN(e){return(e&&DN[e])??null}function rE(e){const n=e.slice(e.lastIndexOf("/")+1),r=n.lastIndexOf(".");return r<1?null:nE[n.slice(r+1).toLowerCase()]??null}function FN(e,n){return e==="Read"&&n?rE(n):null}function SN(e){const n=e?.match(/(?:^|\s)language-([\w+-]+)/)?.[1];return n?BN[n.toLowerCase()]??null:null}function aE(e,n){return!n||!M9.registered(n)?null:M9.highlight(n,e).children.filter(NN)}function NN(e){return e.type==="element"||e.type==="text"}function _N(e,n){const r=aE(e,n);return r?iE(r):null}function iE(e){const n=[[]];for(const r of e){const i=MN(r);n[n.length-1].push(...i[0]);for(let l=1;l<i.length;l++)n.push(i[l])}return n}function MN(e){if(e.type==="text")return e.value.split(`
|
|
@@ -43,7 +43,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),sn=ye,St=ze),lt===void
|
|
|
43
43
|
`,...o.current()});return/^[\t ]/.test(h)&&(h=Xl(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,r.options.closeAtx&&(h+=" "+u),f(),d(),h}ZE.peek=sO;function ZE(e){return e.value||""}function sO(){return"<"}WE.peek=lO;function WE(e,n,r,i){const l=Of(r),o=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=r.enter("label");const f=r.createTracker(i);let h=f.move("![");return h+=f.move(r.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(r.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=r.enter("destinationRaw"),h+=f.move(r.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=r.enter(`title${o}`),h+=f.move(" "+l),h+=f.move(r.safe(e.title,{before:h,after:l,...f.current()})),h+=f.move(l),d()),h+=f.move(")"),u(),h}function lO(){return"!"}JE.peek=oO;function JE(e,n,r,i){const l=e.referenceType,o=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("![");const h=r.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=g,o(),l==="full"||!h||h!==p?f+=d.move(p+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function oO(){return"!"}e5.peek=cO;function e5(e,n,r){let i=e.value||"",l="`",o=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<r.unsafe.length;){const u=r.unsafe[o],d=r.compilePattern(u);let f;if(u.atBreak)for(;f=d.exec(i);){let h=f.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(f.index+1)}}return l+i+l}function cO(){return"`"}function t5(e,n){const r=wf(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}n5.peek=uO;function n5(e,n,r,i){const l=Of(r),o=l==='"'?"Quote":"Apostrophe",u=r.createTracker(i);let d,f;if(t5(e,r)){const g=r.stack;r.stack=[],d=r.enter("autolink");let p=u.move("<");return p+=u.move(r.containerPhrasing(e,{before:p,after:">",...u.current()})),p+=u.move(">"),d(),r.stack=g,p}d=r.enter("link"),f=r.enter("label");let h=u.move("[");return h+=u.move(r.containerPhrasing(e,{before:h,after:"](",...u.current()})),h+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(r.safe(e.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(f=r.enter("destinationRaw"),h+=u.move(r.safe(e.url,{before:h,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=r.enter(`title${o}`),h+=u.move(" "+l),h+=u.move(r.safe(e.title,{before:h,after:l,...u.current()})),h+=u.move(l),f()),h+=u.move(")"),d(),h}function uO(e,n,r){return t5(e,r)?"<":"["}r5.peek=xO;function r5(e,n,r,i){const l=e.referenceType,o=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("[");const h=r.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const p=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=g,o(),l==="full"||!h||h!==p?f+=d.move(p+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function xO(){return"["}function zf(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function dO(e){const n=zf(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function fO(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function a5(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function hO(e,n,r,i){const l=r.enter("list"),o=r.bulletCurrent;let u=e.ordered?fO(r):zf(r);const d=e.ordered?u==="."?")":".":dO(r);let f=n&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(f=!0),a5(r)===u&&g){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=d),r.bulletCurrent=u;const h=r.containerFlow(e,i);return r.bulletLastUsed=u,r.bulletCurrent=o,l(),h}function pO(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function mO(e,n,r,i){const l=pO(r);let o=r.bulletCurrent||zf(r);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let u=o.length+1;(l==="tab"||l==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(i);d.move(o+" ".repeat(u-o.length)),d.shift(u);const f=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,d.current()),g);return f(),h;function g(p,y,b){return y?(b?"":" ".repeat(u))+p:(b?o:o+" ".repeat(u-o.length))+p}}function gO(e,n,r,i){const l=r.enter("paragraph"),o=r.enter("phrasing"),u=r.containerPhrasing(e,i);return o(),l(),u}const EO=hc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function yO(e,n,r,i){return(e.children.some(function(u){return EO(u)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function bO(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}i5.peek=CO;function i5(e,n,r,i){const l=bO(r),o=r.enter("strong"),u=r.createTracker(i),d=u.move(l+l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const h=f.charCodeAt(0),g=tc(i.before.charCodeAt(i.before.length-1),h,l);g.inside&&(f=Xl(h)+f.slice(1));const p=f.charCodeAt(f.length-1),y=tc(i.after.charCodeAt(0),p,l);y.inside&&(f=f.slice(0,-1)+Xl(p));const b=u.move(l+l);return o(),r.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},d+f+b}function CO(e,n,r){return r.options.strong||"*"}function vO(e,n,r,i){return r.safe(e.value,i)}function AO(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function kO(e,n,r){const i=(a5(r)+(r.options.ruleSpaces?" ":"")).repeat(AO(r));return r.options.ruleSpaces?i.slice(0,-1):i}const s5={blockquote:QR,break:y2,code:JR,definition:tO,emphasis:XE,hardBreak:y2,heading:iO,html:ZE,image:WE,imageReference:JE,inlineCode:e5,link:n5,linkReference:r5,list:hO,listItem:mO,paragraph:gO,root:yO,strong:i5,text:vO,thematicBreak:kO};function BO(){return{enter:{table:DO,tableData:b2,tableHeader:b2,tableRow:FO},exit:{codeText:SO,table:wO,tableData:Yx,tableHeader:Yx,tableRow:Yx}}}function DO(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function wO(e){this.exit(e),this.data.inTable=void 0}function FO(e){this.enter({type:"tableRow",children:[]},e)}function Yx(e){this.exit(e)}function b2(e){this.enter({type:"tableCell",children:[]},e)}function SO(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,NO));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function NO(e,n){return n==="|"?n:e}function _O(e){const n=e||{},r=n.tableCellPadding,i=n.tablePipeAlign,l=n.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
44
44
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:u,tableCell:f,tableRow:d}};function u(b,C,v,k){return h(g(b,v,k),b.align)}function d(b,C,v,k){const B=p(b,v,k),_=h([B]);return _.slice(0,_.indexOf(`
|
|
45
45
|
`))}function f(b,C,v,k){const B=v.enter("tableCell"),_=v.enter("phrasing"),S=v.containerPhrasing(b,{...k,before:o,after:o});return _(),B(),S}function h(b,C){return GR(b,{align:C,alignDelimiters:i,padding:r,stringLength:l})}function g(b,C,v){const k=b.children;let B=-1;const _=[],S=C.enter("table");for(;++B<k.length;)_[B]=p(k[B],C,v);return S(),_}function p(b,C,v){const k=b.children;let B=-1;const _=[],S=C.enter("tableRow");for(;++B<k.length;)_[B]=f(k[B],b,C,v);return S(),_}function y(b,C,v){let k=s5.inlineCode(b,C,v);return v.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function MO(){return{exit:{taskListCheckValueChecked:C2,taskListCheckValueUnchecked:C2,paragraph:TO}}}function jO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RO}}}function C2(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function TO(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=n.children;let o=-1,u;for(;++o<l.length;){const d=l[o];if(d.type==="paragraph"){u=d;break}}u===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function RO(e,n,r,i){const l=e.children[0],o=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=r.createTracker(i);o&&d.move(u);let f=s5.listItem(e,n,r,{...i,...d.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(g){return g+u}}function OO(){return[hR(),RR(),PR(),BO(),MO()]}function zO(e){return{extensions:[pR(),OR(e),IR(),_O(e),jO()]}}const LO={tokenize:qO,partial:!0},l5={tokenize:GO,partial:!0},o5={tokenize:VO,partial:!0},c5={tokenize:QO,partial:!0},PO={tokenize:YO,partial:!0},u5={name:"wwwAutolink",tokenize:HO,previous:d5},x5={name:"protocolAutolink",tokenize:$O,previous:f5},ya={name:"emailAutolink",tokenize:UO,previous:h5},Gr={};function IO(){return{text:Gr}}let vi=48;for(;vi<123;)Gr[vi]=ya,vi++,vi===58?vi=65:vi===91&&(vi=97);Gr[43]=ya;Gr[45]=ya;Gr[46]=ya;Gr[95]=ya;Gr[72]=[ya,x5];Gr[104]=[ya,x5];Gr[87]=[ya,u5];Gr[119]=[ya,u5];function UO(e,n,r){const i=this;let l,o;return u;function u(p){return!jd(p)||!h5.call(i,i.previous)||Lf(i.events)?r(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(p))}function d(p){return jd(p)?(e.consume(p),d):p===64?(e.consume(p),f):r(p)}function f(p){return p===46?e.check(PO,g,h)(p):p===45||p===95||Tn(p)?(o=!0,e.consume(p),f):g(p)}function h(p){return e.consume(p),l=!0,f}function g(p){return o&&l&&Pn(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(p)):r(p)}}function HO(e,n,r){const i=this;return l;function l(u){return u!==87&&u!==119||!d5.call(i,i.previous)||Lf(i.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(LO,e.attempt(l5,e.attempt(o5,o),r),r)(u))}function o(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function $O(e,n,r){const i=this;let l="",o=!1;return u;function u(p){return(p===72||p===104)&&f5.call(i,i.previous)&&!Lf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(p),e.consume(p),d):r(p)}function d(p){if(Pn(p)&&l.length<5)return l+=String.fromCodePoint(p),e.consume(p),d;if(p===58){const y=l.toLowerCase();if(y==="http"||y==="https")return e.consume(p),f}return r(p)}function f(p){return p===47?(e.consume(p),o?h:(o=!0,f)):r(p)}function h(p){return p===null||W0(p)||Pt(p)||Si(p)||xc(p)?r(p):e.attempt(l5,e.attempt(o5,g),r)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(p)}}function qO(e,n,r){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),o):r(u)}function o(u){return u===null?r(u):n(u)}}function GO(e,n,r){let i,l,o;return u;function u(h){return h===46||h===95?e.check(c5,f,d)(h):h===null||Pt(h)||Si(h)||h!==45&&xc(h)?f(h):(o=!0,e.consume(h),u)}function d(h){return h===95?i=!0:(l=i,i=void 0),e.consume(h),u}function f(h){return l||i||!o?r(h):n(h)}}function VO(e,n){let r=0,i=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&i<r?o(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(c5,n,o)(u):u===null||Pt(u)||Si(u)?n(u):(e.consume(u),l)}function o(u){return u===41&&i++,e.consume(u),l}}function QO(e,n,r){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),o):d===93?(e.consume(d),l):d===60||d===null||Pt(d)||Si(d)?n(d):r(d)}function l(d){return d===null||d===40||d===91||Pt(d)||Si(d)?n(d):i(d)}function o(d){return Pn(d)?u(d):r(d)}function u(d){return d===59?(e.consume(d),i):Pn(d)?(e.consume(d),u):r(d)}}function YO(e,n,r){return i;function i(o){return e.consume(o),l}function l(o){return Tn(o)?r(o):n(o)}}function d5(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pt(e)}function f5(e){return!Pn(e)}function h5(e){return!(e===47||jd(e))}function jd(e){return e===43||e===45||e===46||e===95||Tn(e)}function Lf(e){let n=e.length,r=!1;for(;n--;){const i=e[n][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const KO={tokenize:rz,partial:!0};function XO(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ez,continuation:{tokenize:tz},exit:nz}},text:{91:{name:"gfmFootnoteCall",tokenize:JO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ZO,resolveTo:WO}}}}function ZO(e,n,r){const i=this;let l=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const f=i.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!u||!u._balanced)return r(f);const h=Rr(i.sliceSerialize({start:u.end,end:i.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),n(f))}}function WO(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[r+1],e[r+2],["enter",i,n],e[r+3],e[r+4],["enter",l,n],["exit",l,n],["enter",o,n],["enter",u,n],["exit",u,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",i,n]];return e.splice(r,e.length-r+1,...d),e}function JO(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,u;return d;function d(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(o>999||p===93&&!u||p===null||p===91||Pt(p))return r(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return l.includes(Rr(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(p)}return Pt(p)||(u=!0),o++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function ez(e,n,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,u=0,d;return f;function f(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(C)}function g(C){if(u>999||C===93&&!d||C===null||C===91||Pt(C))return r(C);if(C===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=Rr(i.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Pt(C)||(d=!0),u++,e.consume(C),C===92?p:g}function p(C){return C===91||C===92||C===93?(e.consume(C),u++,g):g(C)}function y(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),l.includes(o)||l.push(o),bt(e,b,"gfmFootnoteDefinitionWhitespace")):r(C)}function b(C){return n(C)}}function tz(e,n,r){return e.check(so,n,e.attempt(KO,n,r))}function nz(e){e.exit("gfmFootnoteDefinition")}function rz(e,n,r){const i=this;return bt(e,l,"gfmFootnoteDefinitionIndent",5);function l(o){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(o):r(o)}}function az(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,d){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let h=f;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[f][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[f][1].end)},p={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[f][1].start)},y=[["enter",g,d],["enter",u[h][1],d],["exit",u[h][1],d],["enter",p,d]],b=d.parser.constructs.insideSpan.null;b&&ur(y,y.length,0,dc(b,u.slice(h+1,f),d)),ur(y,y.length,0,[["exit",p,d],["enter",u[f][1],d],["exit",u[f][1],d],["exit",g,d]]),ur(u,h-1,f-h+3,y),f=h+y.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function o(u,d,f){const h=this.previous,g=this.events;let p=0;return y;function y(C){return h===126&&g[g.length-1][1].type!=="characterEscape"?f(C):(u.enter("strikethroughSequenceTemporary"),b(C))}function b(C){const v=As(h);if(C===126)return p>1?f(C):(u.consume(C),p++,b);if(p<2&&!r)return f(C);const k=u.exit("strikethroughSequenceTemporary"),B=As(C);return k._open=!B||B===2&&!!v,k._close=!v||v===2&&!!B,d(C)}}}class iz{constructor(){this.map=[]}add(n,r,i){sz(this,n,r,i)}consume(n){if(this.map.sort(function(o,u){return o[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];i.push(n.slice()),n.length=0;let l=i.pop();for(;l;){for(const o of l)n.push(o);l=i.pop()}this.map.length=0}}function sz(e,n,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===n){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([n,r,i])}}function lz(e,n){let r=!1;const i=[];for(;n<e.length;){const l=e[n];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return i}function oz(){return{flow:{null:{name:"table",tokenize:cz,resolveAll:uz}}}}function cz(e,n,r){const i=this;let l=0,o=0,u;return d;function d(O){let $=i.events.length-1;for(;$>-1;){const W=i.events[$][1].type;if(W==="lineEnding"||W==="linePrefix")$--;else break}const Q=$>-1?i.events[$][1].type:null,le=Q==="tableHead"||Q==="tableRow"?w:f;return le===w&&i.parser.lazy[i.now().line]?r(O):le(O)}function f(O){return e.enter("tableHead"),e.enter("tableRow"),h(O)}function h(O){return O===124||(u=!0,o+=1),g(O)}function g(O){return O===null?r(O):Ie(O)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),b):r(O):xt(O)?bt(e,g,"whitespace")(O):(o+=1,u&&(u=!1,l+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),p(O)))}function p(O){return O===null||O===124||Pt(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?y:p)}function y(O){return O===92||O===124?(e.consume(O),p):p(O)}function b(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(e.enter("tableDelimiterRow"),u=!1,xt(O)?bt(e,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?k(O):O===124?(u=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),v):T(O)}function v(O){return xt(O)?bt(e,k,"whitespace")(O):k(O)}function k(O){return O===58?(o+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),B):O===45?(o+=1,B(O)):O===null||Ie(O)?M(O):T(O)}function B(O){return O===45?(e.enter("tableDelimiterFiller"),_(O)):T(O)}function _(O){return O===45?(e.consume(O),_):O===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(O))}function S(O){return xt(O)?bt(e,M,"whitespace")(O):M(O)}function M(O){return O===124?C(O):O===null||Ie(O)?!u||l!==o?T(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):T(O)}function T(O){return r(O)}function w(O){return e.enter("tableRow"),R(O)}function R(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),R):O===null||Ie(O)?(e.exit("tableRow"),n(O)):xt(O)?bt(e,R,"whitespace")(O):(e.enter("data"),L(O))}function L(O){return O===null||O===124||Pt(O)?(e.exit("data"),R(O)):(e.consume(O),O===92?I:L)}function I(O){return O===92||O===124?(e.consume(O),L):L(O)}}function uz(e,n){let r=-1,i=!0,l=0,o=[0,0,0,0],u=[0,0,0,0],d=!1,f=0,h,g,p;const y=new iz;for(;++r<e.length;){const b=e[r],C=b[1];b[0]==="enter"?C.type==="tableHead"?(d=!1,f!==0&&(v2(y,n,f,h,g),g=void 0,f=0),h={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(r,0,[["enter",h,n]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,p=void 0,o=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(r,0,[["enter",g,n]])),l=C.type==="tableDelimiterRow"?2:g?3:1):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(o[1]!==0&&(u[0]=u[1],p=O0(y,n,o,l,void 0,p),o=[0,0,0,0]),u[2]=r)):C.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(u[0]=u[1],p=O0(y,n,o,l,void 0,p)),o=u,u=[o[1],r,0,0])):C.type==="tableHead"?(d=!0,f=r):C.type==="tableRow"||C.type==="tableDelimiterRow"?(f=r,o[1]!==0?(u[0]=u[1],p=O0(y,n,o,l,r,p)):u[1]!==0&&(p=O0(y,n,u,l,r,p)),l=0):l&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(u[3]=r)}for(f!==0&&v2(y,n,f,h,g),y.consume(n.events),r=-1;++r<n.events.length;){const b=n.events[r];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=lz(n.events,r))}return e}function O0(e,n,r,i,l,o){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},bs(n.events,r[0])),e.add(r[0],0,[["exit",o,n]]));const f=bs(n.events,r[1]);if(o={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(r[1],0,[["enter",o,n]]),r[2]!==0){const h=bs(n.events,r[2]),g=bs(n.events,r[3]),p={type:d,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",p,n]]),i!==2){const y=n.events[r[2]],b=n.events[r[3]];if(y[1].end=Object.assign({},b[1].end),y[1].type="chunkText",y[1].contentType="text",r[3]>r[2]+1){const C=r[2]+1,v=r[3]-r[2]-1;e.add(C,v,[])}}e.add(r[3]+1,0,[["exit",p,n]])}return l!==void 0&&(o.end=Object.assign({},bs(n.events,l)),e.add(l,0,[["exit",o,n]]),o=void 0),o}function v2(e,n,r,i,l){const o=[],u=bs(n.events,r);l&&(l.end=Object.assign({},u),o.push(["exit",l,n])),i.end=Object.assign({},u),o.push(["exit",i,n]),e.add(r+1,0,o)}function bs(e,n){const r=e[n],i=r[0]==="enter"?"start":"end";return r[1][i]}const xz={name:"tasklistCheck",tokenize:fz};function dz(){return{text:{91:xz}}}function fz(e,n,r){const i=this;return l;function l(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Pt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):r(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(f)}function d(f){return Ie(f)?n(f):xt(f)?e.check({tokenize:hz},n,r)(f):r(f)}}function hz(e,n,r){return bt(e,i,"whitespace");function i(l){return l===null?r(l):n(l)}}function pz(e){return AE([IO(),XO(),az(e),oz(),dz()])}const mz={};function gz(e){const n=this,r=e||mz,i=n.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(pz(r)),o.push(OO()),u.push(zO(r))}function p5({preview:e,lineRef:n}){const r=rE(e.path),{text:i,tokens:l}=D.useMemo(()=>{const o=e.content.split(`
|
|
46
|
-
`),u=_N(e.content,r);return{text:o,tokens:u?.length===o.length?u:null}},[e.content,r]);return x.jsxs(x.Fragment,{children:[x.jsx("pre",{className:"min-w-max p-3 font-mono text-[11.5px] leading-[1.5] text-muted",children:i.map((o,u)=>{const d=e.lineStart+u,f=d===e.line,h=l?.[u];return x.jsxs("div",{ref:f?n:void 0,className:pe("grid grid-cols-[auto_1fr] gap-3 whitespace-pre",f&&"rounded bg-accent-soft text-text"),children:[x.jsx("span",{className:"select-none text-right text-faint",children:d}),x.jsx("code",{children:h?.length?x.jsx(gf,{nodes:h}):o||" "})]},d)})}),x.jsx(m5,{preview:e})]})}function m5({preview:e}){return e.truncated?x.jsxs("p",{className:"border-t border-border-soft px-4 py-2 text-xs text-faint",children:["Showing lines ",e.lineStart,"–",e.lineEnd," of ",e.totalLines,"."]}):null}function Pf({title:e,subtitle:n,actions:r,onClose:i,closeLabel:l}){return x.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b border-border-soft bg-bg px-4 py-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("h2",{className:"text-base font-semibold",children:e}),n?x.jsx("p",{className:"truncate font-mono text-xs text-muted",children:n}):null]}),r,x.jsx("button",{type:"button",onClick:i,"aria-label":l,className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted transition hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent active:bg-surface-2",children:x.jsx(vn,{size:18})})]})}const Ez=[gz,fR],g5="conductor-attachment.invalid";function yz(e){const n=XD(e);if(!n.length)return e;let r="",i=0;for(const l of n){const o=l.name.replace(/[\\`*_[\]<>]/g,"\\$&");r+=`${e.slice(i,l.start)}[${o}](https://${g5}/?path=${encodeURIComponent(l.path)})`,i=l.end}return r+e.slice(i)}function bz(e){if(!e)return null;try{const n=new URL(e);return n.hostname===g5?n.searchParams.get("path"):null}catch{return null}}function E5(e){const[n,r]=D.useState(null),[i,l]=D.useState(null);return D.useEffect(()=>{if(r(null),l(null),!e)return;let o=!1;return Ne.localImage(e).then(u=>{o||r(u)},u=>{o||l(u instanceof Error?u.message:"Image unavailable")}),()=>{o=!0}},[e]),{objectUrl:n,error:i}}function Cz({src:e,alt:n,...r}){const i=Og(typeof e=="string"?e:null),{objectUrl:l,error:o}=E5(i);return i?o?x.jsxs("span",{className:"my-2 block rounded-lg border border-del/30 px-3 py-2 text-xs text-del",children:[n||"Image"," unavailable: ",o]}):l?x.jsx("img",{src:l,alt:n??"",...r}):null:x.jsx("img",{src:e,alt:n??"",...r})}function y5(e){if(!e?.startsWith("/"))return null;const n=e.match(/:([1-9]\d*)(?::\d+)?$/);return sf(n?e.slice(0,-n[0].length):e)?e:null}function Td({href:e,children:n,onClick:r,...i}){const l=bz(e),o=CS(l),u=Og(e??null),d=o?.kind==="image"?o.reference:u,f=Rg(e??null),h=o?.kind==="source"?o.reference:y5(e)??f,g=d??h,[p,y]=D.useState(!1),b=d&&p?x.jsx(vz,{reference:d,onClose:()=>y(!1)}):h&&p?x.jsx(b5,{reference:h,onClose:()=>y(!1)}):null;return e?l?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",title:d?`Open image ${d}`:h?`Open ${h}`:l,disabled:!g,onClick:()=>y(!0),className:"inline-flex max-w-full items-center gap-1 rounded-md bg-surface-2 px-1.5 py-0.5 align-baseline text-[0.9em] font-medium text-muted transition hover:text-text focus-visible:outline-2 focus-visible:outline-accent active:bg-surface disabled:cursor-default",children:[x.jsx(sc,{size:12,className:"shrink-0"}),x.jsx("span",{className:"truncate",children:n})]}),b]}):x.jsxs(x.Fragment,{children:[x.jsx("a",{href:e,...i,title:d?`Open image ${d}`:i.title,onClick:C=>{r?.(C),!(!g||C.defaultPrevented||C.button!==0||C.metaKey||C.ctrlKey||C.shiftKey||C.altKey)&&(C.preventDefault(),y(!0))},children:n}),b]}):x.jsx("span",{title:i.title,children:n})}function vz({reference:e,onClose:n}){const{objectUrl:r,error:i}=E5(e);return D.useEffect(()=>{const l=o=>{o.key==="Escape"&&n()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[n]),qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:n,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Image preview",className:"fade-in pt-safe pb-safe fixed inset-0 z-[60] mx-auto flex flex-col bg-bg md:inset-6 md:rounded-3xl md:border md:border-border-soft",children:[x.jsx(Pf,{title:"Image",subtitle:e,onClose:n,closeLabel:"Close image preview"}),x.jsxs("div",{className:"flex min-h-0 flex-1 items-center justify-center overflow-auto bg-black/15 p-3",children:[!r&&!i?x.jsx(cr,{label:"Loading image…"}):null,i?x.jsxs("p",{className:"max-w-xs text-center text-sm text-muted",children:["Image unavailable: ",i]}):null,r?x.jsx("img",{src:r,alt:"",className:"max-h-full max-w-full rounded-lg object-contain shadow-2xl"}):null]})]})]}),document.body)}function b5({reference:e,onClose:n}){const[r,i]=D.useState(null),[l,o]=D.useState(null),u=D.useRef(null);return D.useEffect(()=>{let d=!1;return i(null),o(null),Ne.filePreview(e).then(f=>{d||i(f)},f=>{d||o(f instanceof Error?f.message:"Could not read source file")}),()=>{d=!0}},[e]),D.useEffect(()=>{r?.line&&u.current?.scrollIntoView({block:"center"})},[r?.line]),D.useEffect(()=>{const d=f=>{f.key==="Escape"&&n()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n]),qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:n,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Source file",className:"fade-in pt-safe pb-safe fixed inset-0 z-[60] mx-auto flex flex-col bg-bg md:inset-6 md:rounded-3xl md:border md:border-border-soft",children:[x.jsx(Pf,{title:"Source",subtitle:r?.path??e,onClose:n,closeLabel:"Close source preview"}),x.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[!r&&!l?x.jsx(cr,{label:"Reading source…"}):null,l?x.jsx("p",{className:"mx-auto max-w-xs px-6 py-16 text-center text-sm text-muted",children:l}):null,r?Az(r.path)?x.jsx(kz,{preview:r}):x.jsx(p5,{preview:r,lineRef:u}):null]})]})]}),document.body)}function Az(e){return e.toLowerCase().endsWith(".md")}function kz({preview:e}){return x.jsxs("div",{className:"p-4 text-sm leading-6 text-text",children:[x.jsx(Wa,{children:e.content}),x.jsx(m5,{preview:e})]})}function Bz({className:e,children:n,node:r,...i}){const l=SN(e),o=wz(n),u=Rg(e?null:o);return u?x.jsx(Dz,{reference:u,...i,children:n}):x.jsx("code",{className:e,...i,children:l&&o!==null?x.jsx(sE,{text:o,language:l}):n})}function Dz({reference:e,children:n,...r}){const[i,l]=D.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",title:`Open ${e}`,onClick:()=>l(!0),className:"max-w-full align-baseline text-left",children:x.jsx("code",{...r,className:"text-accent underline decoration-dotted underline-offset-2",children:n})}),i?x.jsx(b5,{reference:e,onClose:()=>l(!1)}):null]})}function wz(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(n=>typeof n=="string")?e.join(""):null}function Fz({node:e,children:n,...r}){const i=e?Sz(e):"";return x.jsxs("div",{className:"relative",children:[x.jsx("pre",{...r,children:n}),i?x.jsx($g,{text:i,label:"code",size:12,className:"absolute right-1.5 top-1.5 size-6 rounded-md border border-border-soft bg-bg/90"}):null]})}function Sz(e){let n="";const r=i=>{for(const l of i)l.type==="text"?n+=l.value:l.type==="element"&&r(l.children)};return r(e.children),n.replace(/\n$/,"")}const Nz={a:Td,code:Bz,img:Cz,pre:Fz},Wa=D.memo(function({children:n}){return x.jsx("div",{className:"md",children:x.jsx(nR,{remarkPlugins:Ez,components:Nz,children:yz(n)})})});function If({state:e,label:n,meta:r,actions:i=[],align:l="right",children:o,className:u,dataUserMessage:d,dataMessageState:f}){const h=e==="failed";return x.jsxs("div",{className:pe("flex min-w-0 flex-col gap-1",l==="right"&&"items-end",l==="left"&&"items-start",l==="wide"&&"items-stretch"),...d?{"data-user-msg":d}:{},...f?{"data-msg-state":f}:{},children:[x.jsxs("div",{className:pe("min-w-0 rounded-2xl px-3.5 py-2.5 text-[14px] leading-relaxed [overflow-wrap:anywhere]",l==="wide"?"w-full":"max-w-[85%]",l==="right"?"bg-accent-soft text-text":"bg-surface/60 text-text",h?"border border-del/40":"opacity-60",u),children:[n?x.jsx("div",{className:pe("mb-1 text-[10px] font-semibold uppercase tracking-wide",h?"text-del":"text-faint"),children:n}):null,o]}),h?x.jsxs("div",{className:pe("flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-[11px] text-del",l==="right"&&"justify-end"),children:[x.jsx(lc,{size:11,className:"shrink-0"}),r?x.jsx("span",{className:"min-w-0 max-w-[70vw] truncate",children:r}):x.jsx("span",{children:"Didn’t finish"}),i.map(g=>x.jsx("button",{type:"button",onClick:g.onClick,className:pe("underline underline-offset-2",g.primary?"font-semibold text-del":"text-faint"),children:g.label},g.label))]}):x.jsxs("div",{className:pe("flex min-w-0 items-center gap-1 px-1 text-[11px] text-faint",l==="right"&&"justify-end"),children:[x.jsx(Rn,{size:11,className:"shrink-0 animate-spin"}),x.jsx("span",{className:"min-w-0 truncate",children:r??"Queued"}),i.map(g=>x.jsx("button",{type:"button",onClick:g.onClick,className:pe("ml-1 underline underline-offset-2",g.primary&&"font-semibold text-accent"),children:g.label},g.label))]})]})}const C5={queued:"Queued",opening:"Opening",configuring:"Configuring",sending:"Sending",running:"Running",returning:"Returning",returned:"Returned",failed:"Failed"};function _z(e,n,r){const i=n.flatMap(d=>{const f=r[d.id],h=f?.delegationId;return h?[{session:d,assignment:f,delegationId:h}]:[]}),l=new Map(i.map(d=>[d.delegationId,d])),o=new Set(e.map(d=>d.id)),u=e.map(d=>({key:`job:${d.id}`,order:d.createdAt,role:d.role,model:d.resolvedRole.model,agentType:d.resolvedRole.agentType,childSessionId:d.childSessionId??l.get(d.id)?.session.id,status:C5[d.status],state:d.status==="failed"?"failed":"busy"}));for(const{session:d,assignment:f,delegationId:h}of i){if(o.has(h))continue;const g=!!d.background_tasks.length,p=d.status==="working";u.push({key:`session:${d.id}`,order:f.assignedAt,role:f.role,model:d.model,agentType:d.agent_type,childSessionId:d.id,...p?{status:"Running",state:"busy"}:g?{status:"Waiting",state:"waiting"}:{}})}return u.sort((d,f)=>d.order-f.order||d.key.localeCompare(f.key))}function Mz({jobs:e,sessions:n=[],roles:r={},activeSessionId:i,onSelectSession:l}){const o=_z(e,n,r);return o.length?x.jsx("nav",{"aria-label":"Delegated work",className:"flex shrink-0 items-center gap-1.5 overflow-x-auto border-b border-border-soft bg-bg px-3 py-2",children:o.map((u,d)=>{const f=u.state==="failed",h=!!u.childSessionId&&u.childSessionId===i,g=x.jsxs(x.Fragment,{children:[x.jsx(ao,{agentType:u.agentType,model:u.model,className:"size-3.5"}),x.jsx("span",{className:"max-w-24 truncate font-medium",children:u.role}),u.model?x.jsx("span",{className:"max-w-28 truncate text-faint",children:u.model}):null,u.status?x.jsxs("span",{className:pe("flex shrink-0 items-center gap-1",f?"text-del":"text-muted"),children:[u.state==="failed"?x.jsx(lc,{size:10}):u.state==="waiting"?x.jsx(Jd,{size:10}):x.jsx(Rn,{size:10,className:"animate-spin"}),u.status]}):null]}),p=u.childSessionId;return x.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[d?x.jsx(Q7,{size:11,className:"shrink-0 text-faint"}):null,p?x.jsx("button",{type:"button",onClick:()=>l(p),className:pe("flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-border-soft px-2 text-[11px] active:bg-surface-2",h&&"border-accent/50 bg-surface-2",f&&"border-del/40"),children:g}):x.jsx("div",{className:pe("flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-border-soft px-2 text-[11px]",f&&"border-del/40"),children:g})]},u.key)})}):null}function jz(e){return C5[e]}function Tz({jobs:e,sessionId:n,onSelectSession:r,onDismiss:i,onOpenRoles:l}){if(!n)return null;const o=e.filter(u=>u.parentSessionId===n||u.childSessionId===n);return o.length?x.jsx(x.Fragment,{children:o.map(u=>{const d=u.parentSessionId===n,f=u.status==="failed",h=d?u.childSessionId:u.parentSessionId,g=[];return h&&g.push({label:d?"Open worker":"Open parent",onClick:()=>r(h)}),f&&(g.push({label:"Edit roles",onClick:l,primary:!0}),g.push({label:"Dismiss delegation",onClick:()=>i(u.id)})),x.jsx(If,{state:f?"failed":"pending",align:"wide",label:`${d?"Delegated":"Assigned"} · ${u.role} · ${u.resolvedRole.model}${u.resolvedRole.effort?` · ${u.resolvedRole.effort}`:""}`,meta:f?`${u.failure?.code??"failed"}: ${u.failure?.message??"The delegated job failed."}`:`${jz(u.status)}${u.attempts?` · attempt ${u.attempts+1}`:""}`,actions:g,dataMessageState:`delegation-${u.status}`,children:x.jsx(Wa,{children:u.prompt})},u.id)})}):null}const Rz=1500,Oz=400,v5=12,zz=2,Lz=v5+8,Pz=2,Iz=1.1,Uz=200,Hz=420,$z=.6,A5=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,Kx=(e,n,r)=>Math.min(r,Math.max(n,e)),qz=e=>e.scrollHeight-e.clientHeight-e.scrollTop<=Pz?e.scrollTop+e.clientHeight:e.scrollTop+Lz,Gz=(e,n)=>e.length===n.length&&e.every((r,i)=>r.top===n[i].top&&r.preview===n[i].preview);function Vz(e,n,r){const i=Kx(n,0,e.scrollHeight-e.clientHeight);if(A5())return e.scrollTop=i,r(),()=>{};const l=e.clientHeight*Iz;Math.abs(i-e.scrollTop)>l&&(e.scrollTop=Kx(i+Math.sign(e.scrollTop-i)*l,0,e.scrollHeight-e.clientHeight));const o=e.scrollTop,u=i-o;if(!u)return r(),()=>{};const d=Kx(Math.abs(u)*$z,Uz,Hz),f=performance.now();let h=0,g=!1;const p=()=>{g||(g=!0,cancelAnimationFrame(h),e.removeEventListener("touchstart",p),e.removeEventListener("wheel",p))};e.addEventListener("touchstart",p,{passive:!0}),e.addEventListener("wheel",p,{passive:!0});const y=b=>{const C=Math.min(1,(b-f)/d);if(e.scrollTop=o+u*(1-(1-C)**5),C<1){h=requestAnimationFrame(y);return}p(),r()};return h=requestAnimationFrame(y),p}function Qz({scroller:e}){const[n,r]=D.useState([]),[i,l]=D.useState(0),[o,u]=D.useState(!1),[d,f]=D.useState(!1),h=D.useRef([]),g=D.useRef(!1),p=D.useRef(!1),y=D.useRef(0),b=D.useRef(0),C=D.useRef(0),v=D.useRef(()=>{}),k=D.useCallback(()=>{p.current||(clearTimeout(y.current),g.current=!1,u(!1))},[]),B=D.useCallback(()=>{g.current=!0,u(!0),clearTimeout(y.current),y.current=window.setTimeout(k,Rz)},[k]),_=D.useCallback(()=>{const O=e.current;if(!O)return;const $=O.getBoundingClientRect().top-O.scrollTop,Q=Array.from(O.querySelectorAll("[data-user-msg]"),le=>({top:le.getBoundingClientRect().top-$,preview:le.dataset.userMsg??"",ts:le.dataset.msgTs??null,state:le.dataset.msgState??null,node:le}));h.current=Gz(h.current,Q)?h.current:Q,r(h.current),l(qz(O))},[e]),S=D.useCallback(()=>{C.current||(C.current=requestAnimationFrame(()=>{C.current=0,_()}))},[_]);D.useEffect(()=>{const O=e.current;if(!O)return;const $=()=>{b.current=performance.now()},Q=()=>{!g.current&&performance.now()-b.current>Oz||K0()||(B(),S())},le=()=>{K0()&&k()};O.addEventListener("touchmove",$,{passive:!0}),O.addEventListener("wheel",$,{passive:!0}),O.addEventListener("scroll",Q,{passive:!0}),document.addEventListener("selectionchange",le);const W=()=>{g.current&&S()},Y=new ResizeObserver(W);Y.observe(O);const P=new MutationObserver(W);return P.observe(O,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open"]}),()=>{O.removeEventListener("touchmove",$),O.removeEventListener("wheel",$),O.removeEventListener("scroll",Q),document.removeEventListener("selectionchange",le),Y.disconnect(),P.disconnect(),v.current(),C.current&&cancelAnimationFrame(C.current),clearTimeout(y.current)}},[e,B,k,S]);const M=O=>{const $=e.current,Q=h.current[O];$&&Q&&(v.current(),v.current=Vz($,Q.top-v5,()=>{A5()||Q.node.firstElementChild?.animate([{boxShadow:"0 0 0 2px var(--color-accent)"},{boxShadow:"0 0 0 2px transparent"}],{duration:700,easing:"ease-out"})}),B())},T=D.useCallback(()=>{p.current=!1,f(!1),B()},[B]);if(n.length<zz)return null;let w=-1;for(let O=0;O<n.length;O++)n[O].top<=i&&(w=O);const R=w>0?w-1:null,L=w+1<n.length?w+1:null,I=o||d;return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:pe("pointer-events-none absolute inset-x-0 bottom-0 z-20 flex justify-center pb-3 transition duration-200 ease-out motion-reduce:transition-none",I?"translate-y-0 opacity-100":"translate-y-3 opacity-0"),children:x.jsxs("nav",{"aria-label":"Jump to your messages",onFocus:B,className:pe("flex h-12 items-stretch overflow-hidden rounded-full border border-border bg-surface-2 shadow-lg shadow-black/60",I?"pointer-events-auto":"pointer-events-none"),children:[x.jsx(A2,{dir:"up",onClick:()=>R!==null&&M(R),disabled:R===null}),x.jsxs("button",{type:"button",onClick:()=>{_(),p.current=!0,f(!0),B()},"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Your messages — ${n.length} in this chat`,className:"flex items-center gap-1.5 border-border-soft border-x px-3.5 text-muted transition active:bg-surface active:text-text focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:[x.jsx(R8,{size:16,className:"shrink-0"}),x.jsxs("span",{className:"font-mono text-[13px] tabular-nums",children:[x.jsx("span",{className:"text-text",children:w+1||"–"}),x.jsxs("span",{className:"text-muted",children:["/",n.length]})]})]}),x.jsx(A2,{dir:"down",onClick:()=>L!==null&&M(L),disabled:L===null})]})}),d?x.jsx(Kz,{marks:n,current:w,onPick:O=>{T(),M(O)},onClose:T}):null]})}function Yz({mark:e}){if(e.state==="failed")return x.jsx("span",{className:"shrink-0 text-[11px] text-del",children:"didn’t send"});const n=e.state==="sending"?"sending…":e.state==="queued"?"queued":e.ts&&Ig(e.ts);return n?x.jsx("span",{className:"shrink-0 text-[11px] text-muted tabular-nums",children:n}):null}function A2({dir:e,onClick:n,disabled:r}){const i=e==="up"?o3:Ea;return x.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":e==="up"?"Jump to your previous message":"Jump to your next message",className:"flex w-12 items-center justify-center text-muted transition active:bg-surface active:text-text disabled:text-faint/40 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:x.jsx(i,{size:19})})}function Kz({marks:e,current:n,onPick:r,onClose:i}){const l=D.useRef(null),o=D.useRef(null);return D.useEffect(()=>{l.current?.focus({preventScroll:!0}),o.current?.scrollIntoView({block:"center"})},[]),x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:i,"aria-hidden":!0}),x.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":"Your messages",tabIndex:-1,onKeyDown:u=>u.key==="Escape"&&i(),className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[70%] max-w-md flex-col rounded-t-3xl border border-border-soft bg-surface shadow-xl outline-none md:mb-6 md:rounded-3xl",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-4 py-2.5",children:[x.jsx("h2",{className:"flex-1 text-[15px] font-semibold",children:"Your messages"}),x.jsx("span",{className:"font-mono text-[12px] text-faint tabular-nums",children:e.length}),x.jsx("button",{type:"button",onClick:i,"aria-label":"Close",className:"-mr-2 flex size-11 items-center justify-center rounded-full text-muted transition active:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:x.jsx(vn,{size:19})})]}),x.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain py-1",children:e.map((u,d)=>x.jsxs("button",{ref:d===n?o:void 0,type:"button",onClick:()=>r(d),"aria-current":d===n?"true":void 0,className:pe("flex min-h-14 w-full items-center gap-3 px-4 py-2.5 text-left transition active:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",d===n&&"bg-surface-2/60"),children:[x.jsx("span",{className:pe("w-5 shrink-0 text-right font-mono text-[11px] tabular-nums",d===n?"text-accent":"text-muted"),children:d+1}),x.jsx("span",{className:"line-clamp-2 min-w-0 flex-1 text-[13.5px] leading-snug text-text [overflow-wrap:anywhere]",children:u.preview||"Empty message"}),x.jsx(Yz,{mark:u})]},u.top))})]})]})}const Xz=D.lazy(()=>k8(()=>import("./PierrePatch-B1h9-NZX.js"),[]));function k5(e){return e.patch.split(`
|
|
46
|
+
`),u=_N(e.content,r);return{text:o,tokens:u?.length===o.length?u:null}},[e.content,r]);return x.jsxs(x.Fragment,{children:[x.jsx("pre",{className:"min-w-max p-3 font-mono text-[11.5px] leading-[1.5] text-muted",children:i.map((o,u)=>{const d=e.lineStart+u,f=d===e.line,h=l?.[u];return x.jsxs("div",{ref:f?n:void 0,className:pe("grid grid-cols-[auto_1fr] gap-3 whitespace-pre",f&&"rounded bg-accent-soft text-text"),children:[x.jsx("span",{className:"select-none text-right text-faint",children:d}),x.jsx("code",{children:h?.length?x.jsx(gf,{nodes:h}):o||" "})]},d)})}),x.jsx(m5,{preview:e})]})}function m5({preview:e}){return e.truncated?x.jsxs("p",{className:"border-t border-border-soft px-4 py-2 text-xs text-faint",children:["Showing lines ",e.lineStart,"–",e.lineEnd," of ",e.totalLines,"."]}):null}function Pf({title:e,subtitle:n,actions:r,onClose:i,closeLabel:l}){return x.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b border-border-soft bg-bg px-4 py-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("h2",{className:"text-base font-semibold",children:e}),n?x.jsx("p",{className:"truncate font-mono text-xs text-muted",children:n}):null]}),r,x.jsx("button",{type:"button",onClick:i,"aria-label":l,className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted transition hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent active:bg-surface-2",children:x.jsx(vn,{size:18})})]})}const Ez=[gz,fR],g5="conductor-attachment.invalid";function yz(e){const n=XD(e);if(!n.length)return e;let r="",i=0;for(const l of n){const o=l.name.replace(/[\\`*_[\]<>]/g,"\\$&");r+=`${e.slice(i,l.start)}[${o}](https://${g5}/?path=${encodeURIComponent(l.path)})`,i=l.end}return r+e.slice(i)}function bz(e){if(!e)return null;try{const n=new URL(e);return n.hostname===g5?n.searchParams.get("path"):null}catch{return null}}function E5(e){const[n,r]=D.useState(null),[i,l]=D.useState(null);return D.useEffect(()=>{if(r(null),l(null),!e)return;let o=!1;return Ne.localImage(e).then(u=>{o||r(u)},u=>{o||l(u instanceof Error?u.message:"Image unavailable")}),()=>{o=!0}},[e]),{objectUrl:n,error:i}}function Cz({src:e,alt:n,...r}){const i=Og(typeof e=="string"?e:null),{objectUrl:l,error:o}=E5(i);return i?o?x.jsxs("span",{className:"my-2 block rounded-lg border border-del/30 px-3 py-2 text-xs text-del",children:[n||"Image"," unavailable: ",o]}):l?x.jsx("img",{src:l,alt:n??"",...r}):null:x.jsx("img",{src:e,alt:n??"",...r})}function y5(e){if(!e?.startsWith("/"))return null;const n=e.match(/:([1-9]\d*)(?::\d+)?$/);return sf(n?e.slice(0,-n[0].length):e)?e:null}function Td({href:e,children:n,onClick:r,...i}){const l=bz(e),o=CS(l),u=Og(e??null),d=o?.kind==="image"?o.reference:u,f=Rg(e??null),h=o?.kind==="source"?o.reference:y5(e)??f,g=d??h,[p,y]=D.useState(!1),b=d&&p?x.jsx(vz,{reference:d,onClose:()=>y(!1)}):h&&p?x.jsx(b5,{reference:h,onClose:()=>y(!1)}):null;return e?l?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",title:d?`Open image ${d}`:h?`Open ${h}`:l,disabled:!g,onClick:()=>y(!0),className:"inline-flex max-w-full items-center gap-1 rounded-md bg-surface-2 px-1.5 py-0.5 align-baseline text-[0.9em] font-medium text-muted transition hover:text-text focus-visible:outline-2 focus-visible:outline-accent active:bg-surface disabled:cursor-default",children:[x.jsx(sc,{size:12,className:"shrink-0"}),x.jsx("span",{className:"truncate",children:n})]}),b]}):x.jsxs(x.Fragment,{children:[x.jsx("a",{href:e,...i,title:d?`Open image ${d}`:i.title,onClick:C=>{r?.(C),!(!g||C.defaultPrevented||C.button!==0||C.metaKey||C.ctrlKey||C.shiftKey||C.altKey)&&(C.preventDefault(),y(!0))},children:n}),b]}):x.jsx("span",{title:i.title,children:n})}function vz({reference:e,onClose:n}){const{objectUrl:r,error:i}=E5(e);return D.useEffect(()=>{const l=o=>{o.key==="Escape"&&n()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[n]),qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:n,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Image preview",className:"fade-in pt-safe pb-safe fixed inset-0 z-[60] mx-auto flex flex-col bg-bg md:inset-6 md:rounded-3xl md:border md:border-border-soft",children:[x.jsx(Pf,{title:"Image",subtitle:e,onClose:n,closeLabel:"Close image preview"}),x.jsxs("div",{className:"flex min-h-0 flex-1 items-center justify-center overflow-auto bg-black/15 p-3",children:[!r&&!i?x.jsx(cr,{label:"Loading image…"}):null,i?x.jsxs("p",{className:"max-w-xs text-center text-sm text-muted",children:["Image unavailable: ",i]}):null,r?x.jsx("img",{src:r,alt:"",className:"max-h-full max-w-full rounded-lg object-contain shadow-2xl"}):null]})]})]}),document.body)}function b5({reference:e,onClose:n}){const[r,i]=D.useState(null),[l,o]=D.useState(null),u=D.useRef(null);return D.useEffect(()=>{let d=!1;return i(null),o(null),Ne.filePreview(e).then(f=>{d||i(f)},f=>{d||o(f instanceof Error?f.message:"Could not read source file")}),()=>{d=!0}},[e]),D.useEffect(()=>{r?.line&&u.current?.scrollIntoView({block:"center"})},[r?.line]),D.useEffect(()=>{const d=f=>{f.key==="Escape"&&n()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n]),qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/60",onClick:n,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Source file",className:"fade-in pt-safe pb-safe fixed inset-0 z-[60] mx-auto flex flex-col bg-bg md:inset-6 md:rounded-3xl md:border md:border-border-soft",children:[x.jsx(Pf,{title:"Source",subtitle:r?.path??e,onClose:n,closeLabel:"Close source preview"}),x.jsxs("div",{className:"min-h-0 flex-1 overflow-auto",children:[!r&&!l?x.jsx(cr,{label:"Reading source…"}):null,l?x.jsx("p",{className:"mx-auto max-w-xs px-6 py-16 text-center text-sm text-muted",children:l}):null,r?Az(r.path)?x.jsx(kz,{preview:r}):x.jsx(p5,{preview:r,lineRef:u}):null]})]})]}),document.body)}function Az(e){return e.toLowerCase().endsWith(".md")}function kz({preview:e}){return x.jsxs("div",{className:"p-4 text-sm leading-6 text-text",children:[x.jsx(Wa,{children:e.content}),x.jsx(m5,{preview:e})]})}function Bz({className:e,children:n,node:r,...i}){const l=SN(e),o=wz(n),u=Rg(e?null:o);return u?x.jsx(Dz,{reference:u,...i,children:n}):x.jsx("code",{className:e,...i,children:l&&o!==null?x.jsx(sE,{text:o,language:l}):n})}function Dz({reference:e,children:n,...r}){const[i,l]=D.useState(!1);return x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",title:`Open ${e}`,onClick:()=>l(!0),className:"max-w-full align-baseline text-left",children:x.jsx("code",{...r,className:"text-accent underline decoration-dotted underline-offset-2",children:n})}),i?x.jsx(b5,{reference:e,onClose:()=>l(!1)}):null]})}function wz(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(n=>typeof n=="string")?e.join(""):null}function Fz({node:e,children:n,...r}){const i=e?Sz(e):"";return x.jsxs("div",{className:"relative",children:[x.jsx("pre",{...r,children:n}),i?x.jsx($g,{text:i,label:"code",size:12,className:"absolute right-1.5 top-1.5 size-6 rounded-md border border-border-soft bg-bg/90"}):null]})}function Sz(e){let n="";const r=i=>{for(const l of i)l.type==="text"?n+=l.value:l.type==="element"&&r(l.children)};return r(e.children),n.replace(/\n$/,"")}const Nz={a:Td,code:Bz,img:Cz,pre:Fz},Wa=D.memo(function({children:n}){return x.jsx("div",{className:"md",children:x.jsx(nR,{remarkPlugins:Ez,components:Nz,children:yz(n)})})});function If({state:e,label:n,meta:r,actions:i=[],align:l="right",children:o,className:u,dataUserMessage:d,dataMessageState:f}){const h=e==="failed";return x.jsxs("div",{className:pe("flex min-w-0 flex-col gap-1",l==="right"&&"items-end",l==="left"&&"items-start",l==="wide"&&"items-stretch"),...d?{"data-user-msg":d}:{},...f?{"data-msg-state":f}:{},children:[x.jsxs("div",{className:pe("min-w-0 rounded-2xl px-3.5 py-2.5 text-[14px] leading-relaxed [overflow-wrap:anywhere]",l==="wide"?"w-full":"max-w-[85%]",l==="right"?"bg-accent-soft text-text":"bg-surface/60 text-text",h?"border border-del/40":"opacity-60",u),children:[n?x.jsx("div",{className:pe("mb-1 text-[10px] font-semibold uppercase tracking-wide",h?"text-del":"text-faint"),children:n}):null,o]}),h?x.jsxs("div",{className:pe("flex flex-wrap items-center gap-x-2 gap-y-1 px-1 text-[11px] text-del",l==="right"&&"justify-end"),children:[x.jsx(lc,{size:11,className:"shrink-0"}),r?x.jsx("span",{className:"min-w-0 max-w-[70vw] truncate",children:r}):x.jsx("span",{children:"Didn’t finish"}),i.map(g=>x.jsx("button",{type:"button",onClick:g.onClick,className:pe("underline underline-offset-2",g.primary?"font-semibold text-del":"text-faint"),children:g.label},g.label))]}):x.jsxs("div",{className:pe("flex min-w-0 items-center gap-1 px-1 text-[11px] text-faint",l==="right"&&"justify-end"),children:[x.jsx(Rn,{size:11,className:"shrink-0 animate-spin"}),x.jsx("span",{className:"min-w-0 truncate",children:r??"Queued"}),i.map(g=>x.jsx("button",{type:"button",onClick:g.onClick,className:pe("ml-1 underline underline-offset-2",g.primary&&"font-semibold text-accent"),children:g.label},g.label))]})]})}const C5={queued:"Queued",opening:"Opening",configuring:"Configuring",sending:"Sending",running:"Running",returning:"Returning",returned:"Returned",failed:"Failed"};function _z(e,n,r){const i=n.flatMap(d=>{const f=r[d.id],h=f?.delegationId;return h?[{session:d,assignment:f,delegationId:h}]:[]}),l=new Map(i.map(d=>[d.delegationId,d])),o=new Set(e.map(d=>d.id)),u=e.map(d=>({key:`job:${d.id}`,order:d.createdAt,role:d.role,model:d.resolvedRole.model,agentType:d.resolvedRole.agentType,childSessionId:d.childSessionId??l.get(d.id)?.session.id,status:C5[d.status],state:d.status==="failed"?"failed":"busy"}));for(const{session:d,assignment:f,delegationId:h}of i){if(o.has(h))continue;const g=!!d.background_tasks.length,p=d.status==="working";u.push({key:`session:${d.id}`,order:f.assignedAt,role:f.role,model:d.model,agentType:d.agent_type,childSessionId:d.id,...p?{status:"Running",state:"busy"}:g?{status:"Waiting",state:"waiting"}:{}})}return u.sort((d,f)=>d.order-f.order||d.key.localeCompare(f.key))}function Mz({jobs:e,sessions:n=[],roles:r={},activeSessionId:i,onSelectSession:l}){const o=_z(e,n,r);return o.length?x.jsx("nav",{"aria-label":"Delegated work",className:"flex shrink-0 items-center gap-1.5 overflow-x-auto border-b border-border-soft bg-bg px-3 py-2",children:o.map((u,d)=>{const f=u.state==="failed",h=!!u.childSessionId&&u.childSessionId===i,g=x.jsxs(x.Fragment,{children:[x.jsx(ao,{agentType:u.agentType,model:u.model,className:"size-3.5"}),x.jsx("span",{className:"max-w-24 truncate font-medium",children:u.role}),u.model?x.jsx("span",{className:"max-w-28 truncate text-faint",children:u.model}):null,u.status?x.jsxs("span",{className:pe("flex shrink-0 items-center gap-1",f?"text-del":"text-muted"),children:[u.state==="failed"?x.jsx(lc,{size:10}):u.state==="waiting"?x.jsx(Jd,{size:10}):x.jsx(Rn,{size:10,className:"animate-spin"}),u.status]}):null]}),p=u.childSessionId;return x.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[d?x.jsx(Q7,{size:11,className:"shrink-0 text-faint"}):null,p?x.jsx("button",{type:"button",onClick:()=>l(p),className:pe("flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-border-soft px-2 text-[11px] active:bg-surface-2",h&&"border-accent/50 bg-surface-2",f&&"border-del/40"),children:g}):x.jsx("div",{className:pe("flex h-7 shrink-0 items-center gap-1.5 rounded-lg border border-border-soft px-2 text-[11px]",f&&"border-del/40"),children:g})]},u.key)})}):null}function jz(e){return C5[e]}function Tz({jobs:e,sessionId:n,onSelectSession:r,onDismiss:i,onOpenRoles:l}){if(!n)return null;const o=e.filter(u=>u.parentSessionId===n||u.childSessionId===n);return o.length?x.jsx(x.Fragment,{children:o.map(u=>{const d=u.parentSessionId===n,f=u.status==="failed",h=d?u.childSessionId:u.parentSessionId,g=[];return h&&g.push({label:d?"Open worker":"Open parent",onClick:()=>r(h)}),f&&(g.push({label:"Edit roles",onClick:l,primary:!0}),g.push({label:"Dismiss delegation",onClick:()=>i(u.id)})),x.jsx(If,{state:f?"failed":"pending",align:"wide",label:`${d?"Delegated":"Assigned"} · ${u.role} · ${u.resolvedRole.model}${u.resolvedRole.effort?` · ${u.resolvedRole.effort}`:""}`,meta:f?`${u.failure?.code??"failed"}: ${u.failure?.message??"The delegated job failed."}`:`${jz(u.status)}${u.attempts?` · attempt ${u.attempts+1}`:""}`,actions:g,dataMessageState:`delegation-${u.status}`,children:x.jsx(Wa,{children:u.prompt})},u.id)})}):null}const Rz=1500,Oz=400,v5=12,zz=2,Lz=v5+8,Pz=2,Iz=1.1,Uz=200,Hz=420,$z=.6,A5=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,Kx=(e,n,r)=>Math.min(r,Math.max(n,e)),qz=e=>e.scrollHeight-e.clientHeight-e.scrollTop<=Pz?e.scrollTop+e.clientHeight:e.scrollTop+Lz,Gz=(e,n)=>e.length===n.length&&e.every((r,i)=>r.top===n[i].top&&r.preview===n[i].preview);function Vz(e,n,r){const i=Kx(n,0,e.scrollHeight-e.clientHeight);if(A5())return e.scrollTop=i,r(),()=>{};const l=e.clientHeight*Iz;Math.abs(i-e.scrollTop)>l&&(e.scrollTop=Kx(i+Math.sign(e.scrollTop-i)*l,0,e.scrollHeight-e.clientHeight));const o=e.scrollTop,u=i-o;if(!u)return r(),()=>{};const d=Kx(Math.abs(u)*$z,Uz,Hz),f=performance.now();let h=0,g=!1;const p=()=>{g||(g=!0,cancelAnimationFrame(h),e.removeEventListener("touchstart",p),e.removeEventListener("wheel",p))};e.addEventListener("touchstart",p,{passive:!0}),e.addEventListener("wheel",p,{passive:!0});const y=b=>{const C=Math.min(1,(b-f)/d);if(e.scrollTop=o+u*(1-(1-C)**5),C<1){h=requestAnimationFrame(y);return}p(),r()};return h=requestAnimationFrame(y),p}function Qz({scroller:e}){const[n,r]=D.useState([]),[i,l]=D.useState(0),[o,u]=D.useState(!1),[d,f]=D.useState(!1),h=D.useRef([]),g=D.useRef(!1),p=D.useRef(!1),y=D.useRef(0),b=D.useRef(0),C=D.useRef(0),v=D.useRef(()=>{}),k=D.useCallback(()=>{p.current||(clearTimeout(y.current),g.current=!1,u(!1))},[]),B=D.useCallback(()=>{g.current=!0,u(!0),clearTimeout(y.current),y.current=window.setTimeout(k,Rz)},[k]),_=D.useCallback(()=>{const O=e.current;if(!O)return;const $=O.getBoundingClientRect().top-O.scrollTop,Q=Array.from(O.querySelectorAll("[data-user-msg]"),le=>({top:le.getBoundingClientRect().top-$,preview:le.dataset.userMsg??"",ts:le.dataset.msgTs??null,state:le.dataset.msgState??null,node:le}));h.current=Gz(h.current,Q)?h.current:Q,r(h.current),l(qz(O))},[e]),S=D.useCallback(()=>{C.current||(C.current=requestAnimationFrame(()=>{C.current=0,_()}))},[_]);D.useEffect(()=>{const O=e.current;if(!O)return;const $=()=>{b.current=performance.now()},Q=()=>{!g.current&&performance.now()-b.current>Oz||K0()||(B(),S())},le=()=>{K0()&&k()};O.addEventListener("touchmove",$,{passive:!0}),O.addEventListener("wheel",$,{passive:!0}),O.addEventListener("scroll",Q,{passive:!0}),document.addEventListener("selectionchange",le);const W=()=>{g.current&&S()},Y=new ResizeObserver(W);Y.observe(O);const P=new MutationObserver(W);return P.observe(O,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open"]}),()=>{O.removeEventListener("touchmove",$),O.removeEventListener("wheel",$),O.removeEventListener("scroll",Q),document.removeEventListener("selectionchange",le),Y.disconnect(),P.disconnect(),v.current(),C.current&&cancelAnimationFrame(C.current),clearTimeout(y.current)}},[e,B,k,S]);const M=O=>{const $=e.current,Q=h.current[O];$&&Q&&(v.current(),v.current=Vz($,Q.top-v5,()=>{A5()||Q.node.firstElementChild?.animate([{boxShadow:"0 0 0 2px var(--color-accent)"},{boxShadow:"0 0 0 2px transparent"}],{duration:700,easing:"ease-out"})}),B())},T=D.useCallback(()=>{p.current=!1,f(!1),B()},[B]);if(n.length<zz)return null;let w=-1;for(let O=0;O<n.length;O++)n[O].top<=i&&(w=O);const R=w>0?w-1:null,L=w+1<n.length?w+1:null,I=o||d;return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:pe("pointer-events-none absolute inset-x-0 bottom-0 z-20 flex justify-center pb-3 transition duration-200 ease-out motion-reduce:transition-none",I?"translate-y-0 opacity-100":"translate-y-3 opacity-0"),children:x.jsxs("nav",{"aria-label":"Jump to your messages",onFocus:B,className:pe("flex h-12 items-stretch overflow-hidden rounded-full border border-border bg-surface-2 shadow-lg shadow-black/60",I?"pointer-events-auto":"pointer-events-none"),children:[x.jsx(A2,{dir:"up",onClick:()=>R!==null&&M(R),disabled:R===null}),x.jsxs("button",{type:"button",onClick:()=>{_(),p.current=!0,f(!0),B()},"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Your messages — ${n.length} in this chat`,className:"flex items-center gap-1.5 border-border-soft border-x px-3.5 text-muted transition active:bg-surface active:text-text focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:[x.jsx(R8,{size:16,className:"shrink-0"}),x.jsxs("span",{className:"font-mono text-[13px] tabular-nums",children:[x.jsx("span",{className:"text-text",children:w+1||"–"}),x.jsxs("span",{className:"text-muted",children:["/",n.length]})]})]}),x.jsx(A2,{dir:"down",onClick:()=>L!==null&&M(L),disabled:L===null})]})}),d?x.jsx(Kz,{marks:n,current:w,onPick:O=>{T(),M(O)},onClose:T}):null]})}function Yz({mark:e}){if(e.state==="failed")return x.jsx("span",{className:"shrink-0 text-[11px] text-del",children:"didn’t send"});const n=e.state==="sending"?"sending…":e.state==="queued"?"queued":e.ts&&Ig(e.ts);return n?x.jsx("span",{className:"shrink-0 text-[11px] text-muted tabular-nums",children:n}):null}function A2({dir:e,onClick:n,disabled:r}){const i=e==="up"?o3:Ea;return x.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":e==="up"?"Jump to your previous message":"Jump to your next message",className:"flex w-12 items-center justify-center text-muted transition active:bg-surface active:text-text disabled:text-faint/40 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:x.jsx(i,{size:19})})}function Kz({marks:e,current:n,onPick:r,onClose:i}){const l=D.useRef(null),o=D.useRef(null);return D.useEffect(()=>{l.current?.focus({preventScroll:!0}),o.current?.scrollIntoView({block:"center"})},[]),x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:i,"aria-hidden":!0}),x.jsxs("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":"Your messages",tabIndex:-1,onKeyDown:u=>u.key==="Escape"&&i(),className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[70%] max-w-md flex-col rounded-t-3xl border border-border-soft bg-surface shadow-xl outline-none md:mb-6 md:rounded-3xl",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-4 py-2.5",children:[x.jsx("h2",{className:"flex-1 text-[15px] font-semibold",children:"Your messages"}),x.jsx("span",{className:"font-mono text-[12px] text-faint tabular-nums",children:e.length}),x.jsx("button",{type:"button",onClick:i,"aria-label":"Close",className:"-mr-2 flex size-11 items-center justify-center rounded-full text-muted transition active:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",children:x.jsx(vn,{size:19})})]}),x.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain py-1",children:e.map((u,d)=>x.jsxs("button",{ref:d===n?o:void 0,type:"button",onClick:()=>r(d),"aria-current":d===n?"true":void 0,className:pe("flex min-h-14 w-full items-center gap-3 px-4 py-2.5 text-left transition active:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent focus-visible:-outline-offset-2",d===n&&"bg-surface-2/60"),children:[x.jsx("span",{className:pe("w-5 shrink-0 text-right font-mono text-[11px] tabular-nums",d===n?"text-accent":"text-muted"),children:d+1}),x.jsx("span",{className:"line-clamp-2 min-w-0 flex-1 text-[13.5px] leading-snug text-text [overflow-wrap:anywhere]",children:u.preview||"Empty message"}),x.jsx(Yz,{mark:u})]},u.top))})]})]})}const Xz=D.lazy(()=>k8(()=>import("./PierrePatch-CEuLSHL_.js"),[]));function k5(e){return e.patch.split(`
|
|
47
47
|
`).some(n=>n.startsWith("@@ "))?x.jsx(D.Suspense,{fallback:x.jsx(k2,{...e}),children:x.jsx(Xz,{...e})}):x.jsx(k2,{...e})}function k2({patch:e,truncated:n,className:r}){const i=D.useMemo(()=>e.split(`
|
|
48
48
|
`),[e]);return x.jsxs("pre",{className:pe("overflow-x-auto font-mono text-[11.5px] leading-[1.5]",r),children:[i.map((l,o)=>x.jsx("div",{className:pe("whitespace-pre",Zz(l)),children:l||" "},o)),n?x.jsx("div",{className:"mt-2 text-faint",children:"… diff truncated …"}):null]})}function Zz(e){return e.startsWith("+")&&!e.startsWith("+++")?"text-add":e.startsWith("-")&&!e.startsWith("---")?"text-del":e.startsWith("@@")?"text-accent":e.startsWith("diff ")||e.startsWith("index ")||e.startsWith("+++")||e.startsWith("---")?"text-faint":"text-muted"}function B5({sessionId:e,workspaceId:n,working:r,workingSince:i,turnStartedAt:l,queued:o,waiting:u,delegations:d=[],poll:f,onFork:h,onSelectSession:g,onDismissDelegation:p,onOpenRoles:y}){const{entries:b,loading:C,error:v}=pF(e,f??!0),k=De(F=>F.pending),B=De(F=>F.removePending),_=mg(),S=xr(),M=D.useRef(null),T=D.useRef(!0),w=D.useMemo(()=>RN(b),[b]),R=D.useMemo(()=>w.map(F=>F.e),[w]),L=D.useMemo(()=>Jz(w),[w]),I=D.useMemo(()=>jN(R),[R]),O=D.useMemo(()=>{const F=j9(R).filter(te=>te!==I);return new Set(F.map(wi))},[R,I]),$=D.useMemo(()=>new Map(j9(R).map(F=>[F,TN(R,F,l)])),[R,l]),Q=async F=>{await(F.sessionId?Ne.dismissParked(F.sessionId):Ne.dismissPrompt(F.workspaceId)).catch(()=>{}),S.invalidateQueries({queryKey:["state"]})},le=new Set(b.filter(F=>F.role==="user").map(F=>F.text.trim())),W=[...le],Y=k.filter(F=>F.sessionId===e),P=Y.filter(F=>!(a9(F)&&W.some(te=>i9(F,te)))),V=o?.text.trim()||null,X=V&&!le.has(V)&&!Y.some(F=>F.text.trim()===V)?o:null,fe=!!e&&d.some(F=>F.parentSessionId===e||F.childSessionId===e);D.useEffect(()=>{const F=b.filter(te=>te.role==="user").map(te=>te.text.trim());for(const te of k)te.sessionId===e&&a9(te)&&F.some(ae=>i9(te,ae))&&B(te.id)},[b,k,e,B]);const j=()=>{const F=M.current;F&&(T.current=F.scrollHeight-F.scrollTop-F.clientHeight<120)},z=u?.length??0;if(D.useLayoutEffect(()=>{const F=M.current;F&&T.current&&(F.scrollTop=F.scrollHeight)},[b,P.length,r,z]),D.useEffect(()=>{T.current=!0},[e]),D.useEffect(()=>{const F=M.current;if(!F)return;const te=new ResizeObserver(()=>{T.current&&(F.scrollTop=F.scrollHeight)});return te.observe(F),()=>te.disconnect()},[]),!e&&!X)return x.jsx(Zt,{children:"No active session in this workspace."});const Z=b.length===0&&P.length===0&&!X&&!fe;return x.jsxs("div",{className:"relative flex min-h-0 min-w-0 flex-1",children:[x.jsx("div",{ref:M,onScroll:j,className:"min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-3 py-3",children:C&&Z?x.jsx(cr,{label:"Loading transcript…"}):v&&Z?x.jsx(Zt,{children:v}):Z&&!r?x.jsx(Zt,{children:"No messages yet."}):x.jsxs("div",{className:"flex min-w-0 flex-col gap-2.5",children:[L.map(F=>F.kind==="steps"?x.jsx(eL,{nodes:F.nodes},F.key):x.jsxs(D.Fragment,{children:[x.jsx(Uf,{node:F.node}),O.has(wi(F.node.e))?x.jsx(B2,{text:F.node.e.text,at:F.node.e.ts,startedAt:$.get(F.node.e),rowid:F.node.e.rowid,through:F.node.e.rowid,onFork:h}):null]},F.key)),I?x.jsx(B2,{text:I.text,at:I.ts,startedAt:$.get(I),rowid:I.rowid,working:r,onFork:h}):null,d.length&&g&&p&&y?x.jsx(Tz,{jobs:d,sessionId:e,onSelectSession:g,onDismiss:p,onOpenRoles:y}):null,P.map(F=>x.jsx(rL,{p:F,onRetry:()=>_({id:F.id,sessionId:F.sessionId,workspaceId:F.workspaceId,text:F.text,queue:F.queue,workflow:F.workflow}),onDismiss:()=>B(F.id)},F.id)),X?x.jsx(nL,{queued:X,onRetry:e?()=>_({id:`queued:${X.sessionId??X.workspaceId}:${X.createdAt}`,sessionId:e,workspaceId:n,text:X.text}):void 0,onDismiss:()=>Q(X)}):null,u?.map(F=>x.jsx(sL,{task:F},F.taskId)),r?x.jsx(iL,{since:i}):null]})}),x.jsx(Qz,{scroller:M})]})}const wi=e=>`${e.rowid}-${e.id}`,Wz=(e,n)=>e.nodes.length===n.nodes.length&&e.nodes.every((r,i)=>r.e===n.nodes[i]?.e);function Jz(e){const n=[];let r=[];const i=()=>{if(r.length>1)n.push({kind:"steps",key:`steps-${wi(r[0].e)}`,nodes:r});else for(const l of r)n.push({kind:"entry",key:wi(l.e),node:l});r=[]};for(const l of e){if(!l.e.subagentLabel&&(l.e.role==="tool"||l.e.role==="thinking")){r.push(l);continue}i(),n.push({kind:"entry",key:wi(l.e),node:l})}return i(),n}const eL=D.memo(function({nodes:n}){const r=n.filter(o=>o.e.error).length,i=n[n.length-1].e,l=i.role==="thinking"?"Thinking":i.text;return x.jsxs("details",{className:"group/steps min-w-0 overflow-hidden rounded-xl border border-border-soft bg-surface/40",children:[x.jsxs("summary",{className:"flex cursor-pointer select-none list-none items-baseline gap-2 overflow-hidden whitespace-nowrap px-3 py-1.5 [&::-webkit-details-marker]:hidden",children:[x.jsx("span",{className:"shrink-0 font-mono text-[11px] text-faint transition-transform group-open/steps:rotate-90",children:"▸"}),x.jsxs("span",{className:"shrink-0 text-[12.5px] text-muted",children:[n.length," steps"]}),x.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] text-faint group-open/steps:invisible",children:l}),r?x.jsxs("span",{className:"shrink-0 text-[11px] text-del",children:[r," failed"]}):null]}),x.jsx("div",{className:"flex min-w-0 flex-col gap-2.5 border-t border-border-soft px-2 py-2.5",children:n.map(o=>x.jsx(Uf,{node:o},wi(o.e)))})]})},Wz);function Uf({node:e}){return e.e.subagentLabel?x.jsx(tL,{node:e}):x.jsx(aL,{e:e.e})}function tL({node:e}){const{e:n,children:r}=e,i=n.output&&(n.error||n.tool==="Agent"||n.tool==="Task")?n.output:null,l=r.length>0||!!i;return x.jsxs("section",{className:"min-w-0 px-0.5","data-subagent":n.subagentLabel,children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 py-1 text-[12.5px]",children:[x.jsx(DD,{size:14,strokeWidth:1.7,className:"shrink-0 text-faint","aria-hidden":!0}),x.jsx("span",{className:"shrink-0 font-medium text-text",children:"Agent"}),x.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[11.5px] text-muted",children:n.subagentLabel}),n.error?x.jsx("span",{className:"shrink-0 text-[11px] text-del",children:"failed"}):null]}),l?x.jsx("div",{className:"ml-[7px] min-w-0 border-l border-border pl-4 pb-1 pt-1",children:x.jsxs("div",{className:"flex min-w-0 flex-col gap-2.5",children:[r.map(o=>x.jsx(Uf,{node:o},wi(o.e))),i?x.jsx("div",{className:"flex flex-col items-start","data-subagent-result":!0,children:x.jsx(Rd,{className:pe("max-w-[92%] px-0.5",n.error&&"text-del/80"),children:x.jsx(Wa,{children:i})})}):null]})}):null]})}function nL({queued:e,onRetry:n,onDismiss:r}){const i=e.status==="failed",l=!i&&!!e.sessionId;return x.jsx(If,{state:i?"failed":"pending",meta:i?e.error||"Didn’t send":x.jsxs(x.Fragment,{children:[e.reason??"The relay is sending this",l?x.jsx(ga,{className:"ml-1"}):null]}),actions:i?[...n?[{label:"Retry",onClick:n,primary:!0}]:[],{label:"Dismiss prompt",onClick:r}]:[],dataUserMessage:pf(e.text),dataMessageState:"queued",children:x.jsx("div",{children:x.jsx(Wa,{children:e.text})})})}function rL({p:e,onRetry:n,onDismiss:r}){const i=e.status==="error";return x.jsx(If,{state:i?"failed":"pending",meta:i?e.error||"Didn’t send":"Sending…",actions:i?[{label:"Retry",onClick:n,primary:!0},{label:"Dismiss message",onClick:r}]:[],dataUserMessage:pf(e.text),dataMessageState:i?"failed":"sending",children:x.jsx("div",{children:x.jsx(Wa,{children:e.text})})})}const aL=D.memo(function({e:n}){return n.role==="user"?x.jsxs("div",{className:"flex flex-col items-end gap-0.5","data-user-msg":pf(n.text),"data-msg-ts":n.ts,"data-msg-state":n.queued?"queued":void 0,children:[x.jsxs(Rd,{className:pe("max-w-[85%] bg-accent-soft text-text",n.queued&&"opacity-60"),children:[n.queued?x.jsx(Od,{children:"queued"}):null,x.jsx(Wa,{children:n.text})]}),x.jsx("span",{className:"pr-1 text-[11px] text-faint",children:RS(n.ts)})]}):n.role==="tool"?x.jsx(lL,{e:n}):n.role==="thinking"?x.jsxs("details",{className:"group/think px-1",children:[x.jsxs("summary",{className:"cursor-pointer select-none list-none text-[11px] font-semibold uppercase tracking-wide text-faint [&::-webkit-details-marker]:hidden",children:[x.jsx("span",{className:"mr-1 inline-block transition-transform group-open/think:rotate-90",children:"▸"}),"Thinking"]}),x.jsx("div",{className:"mt-1 border-l-2 border-border-soft pl-3 text-[13px] italic leading-relaxed text-muted",children:x.jsx(Wa,{children:n.text})})]}):n.role==="system"?x.jsx("div",{className:"px-2 text-center text-[11px] text-faint",children:n.text}):x.jsx("div",{className:"flex flex-col items-start",children:x.jsx(Rd,{className:"max-w-[92%] px-0.5",children:x.jsx(Wa,{children:n.text})})})});function B2({text:e,at:n,startedAt:r,working:i,rowid:l,through:o,onFork:u}){const[d,f]=D.useState(!1),[h,g]=D.useState(!1),[p,y]=D.useState(null),[b,C]=D.useState("chat"),[v,k]=D.useState(()=>Date.now());D.useEffect(()=>{const M=setInterval(()=>k(Date.now()),6e4);return()=>clearInterval(M)},[]);const B=r?Xn(n)-Xn(r):Number.NaN,_=[B>0?mf(B):null,OS(n,v)].filter(Boolean).join(" · "),S=async M=>{if(!(!u||h)){g(!0),y(null),f(!1);try{await u({thinking:M.thinking,tools:M.tools,destination:b,through:M.only?void 0:o,only:M.only?l:void 0})}catch(T){y(T instanceof Error?T.message:"Could not fork this chat")}finally{g(!1)}}};return x.jsxs("div",{className:"flex max-w-full flex-col items-start gap-1",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[!i&&_?x.jsx("span",{className:"text-[11px] tabular-nums text-faint",children:_}):null,x.jsx($g,{text:e,label:"response",className:"size-7 rounded-lg border border-border-soft bg-surface/70"}),u?x.jsxs("div",{className:"relative",children:[x.jsxs("div",{className:"flex items-center overflow-hidden rounded-lg border border-border-soft bg-surface/70 text-muted",children:[x.jsxs("button",{type:"button",onClick:()=>{S({thinking:!0,tools:!1})},disabled:h,"aria-label":b==="workspace"?"Fork to a new workspace with reasoning":o?"Fork chat from this response":"Fork chat with reasoning",title:b==="workspace"?"New workspace with current code":"New chat, same files",className:"flex h-7 items-center gap-1 whitespace-nowrap px-2 text-[11px] font-medium transition active:bg-surface-2 disabled:opacity-50",children:[h?x.jsx(Rn,{size:13,className:"animate-spin"}):x.jsx(j8,{size:13}),b==="workspace"?"Fork workspace":"Fork"]}),x.jsx("button",{type:"button",onClick:()=>f(M=>!M),disabled:h,"aria-label":"Choose fork options","aria-haspopup":"menu","aria-expanded":d,className:"flex size-7 items-center justify-center border-l border-border-soft transition active:bg-surface-2 disabled:opacity-50",children:x.jsx(Ea,{size:14,className:pe("transition-transform",d&&"rotate-180")})})]}),d?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-20",onClick:()=>f(!1),"aria-hidden":!0}),x.jsxs("div",{role:"menu","aria-label":"Fork options",className:"absolute bottom-full left-0 z-30 mb-1 w-60 overflow-hidden rounded-xl border border-border bg-surface py-1 shadow-xl",children:[x.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":b==="workspace",onClick:()=>C(M=>M==="chat"?"workspace":"chat"),className:"flex w-full items-center gap-3 border-b border-border-soft px-3 py-2 text-left active:bg-surface-2",children:[x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-[12px] font-medium text-text",children:"To new workspace"}),x.jsx("span",{className:"block text-[11px] text-faint",children:"Carry the current code into its own worktree"})]}),x.jsx("span",{"aria-hidden":!0,className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",b==="workspace"?"bg-accent":"border border-border bg-surface-2"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white shadow-sm transition-transform",b==="workspace"?"translate-x-5":"translate-x-0")})})]}),x.jsx(z0,{label:"Last message only",detail:"This response, without history",onClick:()=>{S({thinking:!1,tools:!1,only:!0})}}),x.jsx(z0,{label:"Concise",detail:"Messages only",onClick:()=>{S({thinking:!1,tools:!1})}}),x.jsx(z0,{label:"With reasoning",detail:"Messages and reasoning",onClick:()=>{S({thinking:!0,tools:!1})}}),x.jsx(z0,{label:"Full transcript",detail:"Messages, reasoning, and tools",onClick:()=>{S({thinking:!0,tools:!0})}})]})]}):null]}):null]}),p?x.jsxs("span",{className:"max-w-[85vw] text-[11px] text-del",children:[p,Fi(p)?x.jsx(ga,{className:"ml-1"}):null]}):null]})}function z0({label:e,detail:n,onClick:r}){return x.jsxs("button",{type:"button",role:"menuitem",onClick:r,className:"flex w-full flex-col px-3 py-2 text-left active:bg-surface-2",children:[x.jsx("span",{className:"text-[12px] font-medium text-text",children:e}),x.jsx("span",{className:"text-[11px] text-faint",children:n})]})}function iL({since:e}){const[n,r]=D.useState(()=>Date.now());return D.useEffect(()=>{if(!e)return;r(Date.now());const i=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(i)},[e]),x.jsxs("div",{className:"fade-in flex items-center justify-start gap-2",children:[x.jsxs("div",{className:"flex items-center gap-1 px-0.5 py-3",children:[x.jsx("span",{className:"typing-dot"}),x.jsx("span",{className:"typing-dot"}),x.jsx("span",{className:"typing-dot"})]}),e?x.jsx("span",{className:"text-[11px] tabular-nums text-faint",children:mf(n-e)}):null]})}function sL({task:e}){const n=Xn(e.since),[r,i]=D.useState(()=>Date.now());return D.useEffect(()=>{i(Date.now());const l=setInterval(()=>i(Date.now()),1e3);return()=>clearInterval(l)},[]),x.jsxs("div",{className:"fade-in flex min-w-0 items-center gap-2 px-0.5 py-1.5 text-[12.5px] text-muted",children:[x.jsx(Jd,{size:13,className:"shrink-0 text-faint"}),x.jsx("span",{className:"shrink-0 text-faint",children:"Waiting for task"}),x.jsx("span",{className:"min-w-0 flex-1 truncate",children:e.description}),Number.isNaN(n)?null:x.jsx("span",{className:"shrink-0 text-[11px] tabular-nums text-faint",children:mf(r-n)})]})}const lL=D.memo(function({e:n}){const[r,i]=D.useState(!1);if(n.error&&!n.tool)return x.jsx("div",{className:"overflow-hidden rounded-xl border border-del/30 bg-del/5 px-3 py-2",children:x.jsx(Xx,{text:n.text,className:"line-clamp-4 text-del/80"})});const l=y5(n.detail),o=n.images??[];return!n.detail&&!n.output&&!o.length?x.jsxs("div",{className:"flex min-w-0 items-baseline gap-2 overflow-hidden whitespace-nowrap rounded-xl border border-border-soft bg-surface/60 px-3 py-1.5",children:[x.jsx("span",{className:"shrink-0 font-mono text-[11px] text-faint",children:"·"}),x.jsx("span",{className:"max-w-full truncate text-[12.5px] text-muted",children:n.text})]}):x.jsxs("details",{open:r,onToggle:u=>i(u.currentTarget.open),className:pe("group/tool min-w-0 overflow-hidden rounded-xl border",n.error?"border-del/30 bg-del/5":"border-border-soft bg-surface/60"),children:[x.jsxs("summary",{className:"flex cursor-pointer select-none list-none items-baseline gap-2 overflow-hidden whitespace-nowrap px-3 py-1.5 [&::-webkit-details-marker]:hidden",children:[x.jsx("span",{className:"shrink-0 font-mono text-[11px] text-faint transition-transform group-open/tool:rotate-90",children:"▸"}),x.jsx("span",{className:"max-w-full truncate text-[12.5px] text-muted",children:n.text}),n.detail?l?x.jsx(Td,{href:l,title:`Open ${n.detail}`,onClick:u=>u.stopPropagation(),className:"min-w-0 flex-1 truncate font-mono text-[11px] text-accent underline underline-offset-2 group-open/tool:invisible",children:n.detail}):x.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-faint group-open/tool:invisible",children:n.detail}):null,n.error?x.jsx("span",{className:"ml-auto shrink-0 text-[11px] text-del",children:"failed"}):null]}),x.jsxs("div",{className:"flex min-w-0 flex-col gap-2 border-t border-border-soft px-3 py-2",children:[n.detail?l?x.jsx(Td,{href:l,title:`Open ${n.detail}`,className:"block whitespace-pre-wrap font-mono text-[11.5px] leading-relaxed text-accent underline underline-offset-2 [overflow-wrap:anywhere]",children:n.detail}):x.jsx(Xx,{text:n.detail,className:"text-muted",language:wN(n.tool)}):null,n.output?x.jsxs("div",{className:pe("min-w-0",n.detail&&"border-t border-border-soft pt-2"),children:[x.jsx(Od,{children:n.error?"error":n.diff?"changes":"output"}),n.diff?x.jsx(k5,{patch:n.output,fileName:n.detail}):x.jsx(Xx,{text:n.output,className:n.error?"text-del/80":"text-muted",language:n.error?null:FN(n.tool,n.detail)})]}):null,r&&o.length?x.jsxs("div",{className:pe("flex min-w-0 flex-col gap-2",(n.detail||n.output)&&"border-t border-border-soft pt-2"),children:[x.jsx(Od,{children:uL(o.length,"image")}),o.map(u=>x.jsx(cL,{reference:u},u))]}):null]})]})}),oL="whitespace-pre-wrap font-mono text-[11.5px] leading-relaxed [overflow-wrap:anywhere]";function Xx({text:e,className:n,language:r}){return x.jsx("pre",{className:pe(oL,n),children:r?x.jsx(sE,{text:e,language:r}):e})}function cL({reference:e}){const[n,r]=D.useState(null),[i,l]=D.useState(!1);return D.useEffect(()=>{let o=!1;return Ne.toolImage(e).then(u=>!o&&r(u)).catch(()=>!o&&l(!0)),()=>{o=!0}},[e]),i?x.jsx("span",{className:"text-[11px] text-faint",children:"Image unavailable."}):n?x.jsx("img",{src:n,alt:"Tool output",className:"max-w-full rounded-lg border border-border-soft"}):x.jsx(cr,{label:"Loading image…"})}const uL=(e,n)=>`${e} ${n}${e===1?"":"s"}`;function Rd({children:e,className:n}){return x.jsx("div",{className:pe("min-w-0 rounded-2xl px-3.5 py-2.5 text-[14px] leading-relaxed [overflow-wrap:anywhere]",n),children:e})}function Od({children:e}){return x.jsx("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-faint",children:e})}function xL({workspace:e}){const[n,r]=A8(),i=n.get("session"),{data:l,isLoading:o}=fg(e.id,!1),u=l?.sessions??[],d=(i&&u.some(h=>h.id===i)?i:null)??u[0]?.id??null,f=[e.repo_name,e.branch].filter(Boolean).join(" · ");return x.jsxs("div",{className:"flex h-full min-w-0 flex-col overflow-hidden",children:[x.jsx(vd,{title:$r(e),subtitle:f,menu:!0,right:x.jsxs("span",{className:"flex shrink-0 items-center gap-1 rounded-md bg-surface-2 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-faint",children:[x.jsx(Zd,{size:12}),"Archived"]})}),u.length>1?x.jsx("nav",{className:"flex shrink-0 items-center gap-1 overflow-x-auto border-b border-border-soft bg-bg px-3 py-2",children:u.map(h=>x.jsx("button",{type:"button",onClick:()=>r({session:h.id},{replace:!0}),className:pe("pill shrink-0",h.id===d&&"pill-active"),children:x.jsx("span",{className:"whitespace-nowrap",children:h.title||"Untitled"})},h.id))}):null,!o&&!d?x.jsx(Zt,{children:"This workspace was archived with no chat in it."}):x.jsx(B5,{sessionId:d,workspaceId:e.id,turnStartedAt:u.find(h=>h.id===d)?.turn_started_at,poll:!1}),x.jsx("div",{className:"pb-safe shrink-0 border-t border-border-soft px-4 py-3 text-center text-xs text-faint",children:"Read-only — unarchive it in Conductor to reply."})]})}const D5=[{key:"initial",label:"Initial context",barClass:"bg-context-initial",ringClass:"stroke-context-initial"},{key:"chat",label:"Chat",barClass:"bg-context-chat",ringClass:"stroke-context-chat"},{key:"thinking",label:"Thinking",barClass:"bg-working",ringClass:"stroke-working"},{key:"tools",label:"Tool calls",barClass:"bg-context-tools",ringClass:"stroke-context-tools"}];function dL(e,n){if(!n||n.totalTokens<=0)return[];const r=Math.min(100,Math.max(0,e));let i=0;return D5.flatMap(l=>{const o=Math.max(0,n.categories[l.key]),u=Math.min(100-i,o/n.totalTokens*r);if(u<=0)return[];const d={key:l.key,label:l.label,ringClass:l.ringClass,length:u,offset:i};return i+=u,[d]})}const fL=()=>typeof window<"u"&&window.matchMedia("(pointer: coarse)").matches;function w5(e,n=fL()){return e.key!=="Enter"||e.nativeEvent.isComposing||e.shiftKey?!1:e.metaKey||e.ctrlKey?!0:!n}const jr=6e4,hL=e=>/(?:^|[:/])(claude|fable|haiku|opus|sonnet)|^(claude|fable|haiku|opus|sonnet)/.test(e),D2=e=>/(?:^|[:/])(openai|gpt|o[1-9])|^(openai|gpt|o[1-9]|\d)/.test(e);function pL(e){const n=e.agent_type?.trim().toLowerCase()??"",r=e.model?.trim().toLowerCase()??"";return(n==="claude"||n==="anthropic")&&e.prompt_cache_ttl_ms&&e.prompt_cache_ttl_ms>0?ha(e.prompt_cache_ttl_ms,!0):n==="claude"||n==="anthropic"?ha(60*jr,!1):n==="codex"||n==="openai"?ha(30*jr,!1):n==="cursor"?hL(r)?ha(5*jr,!1):(D2(r),ha(30*jr,!1)):(n==="acp"||n==="opencode")&&D2(r)?ha(30*jr,!1):ha(5*jr,!1)}function mL(e,n=Date.now()){if(!e.last_user_message_at)return null;const r=Xn(e.updated_at);if(!Number.isFinite(r))return null;const i=pL(e);return n-r>=i.ttlMs?i:null}function ha(e,n){return{ttlMs:e,ttlLabel:e>=60*jr?`${e/(60*jr)}h`:`${e/jr}m`,observed:n}}function F5({value:e,models:n,onSelect:r,defaultModel:i,onSetDefault:l,settingDefault:o,open:u,onOpenChange:d,isFetching:f=!1,isError:h=!1,empty:g="No models are cached yet. Open a model picker in a chat first.",placement:p="above",className:y,beforeOptions:b,renderTrigger:C}){const[v,k]=D.useState(!1),B=u??v,_=M=>{const T=typeof M=="function"?M(B):M;u===void 0&&k(T),d?.(T)},S=qD(n);return x.jsxs("div",{className:"relative",children:[C?C({picking:B,toggle:()=>_(M=>!M)}):x.jsxs("button",{type:"button",onClick:()=>_(M=>!M),"aria-haspopup":"menu","aria-expanded":B,className:pe("ctl flex max-w-40 items-center gap-1",e&&"ctl-staged",y),children:[x.jsx("span",{className:"truncate",children:e?fd(e):"Model"}),x.jsx(Ea,{size:13,className:"shrink-0"})]}),B?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button","aria-label":"Close model picker",onClick:()=>_(!1),className:"fixed inset-0 z-30 cursor-default"}),x.jsxs("div",{className:pe("absolute left-0 z-40 max-h-64 w-64 overflow-y-auto rounded-xl border border-border bg-surface-2 py-1 shadow-xl shadow-black/40",p==="below"?"top-full mt-2":"bottom-full mb-2"),children:[b,f?x.jsx(no,{size:10,className:"mx-3 my-1.5 animate-spin text-faint"}):null,S.length?S.map(M=>x.jsxs("fieldset",{className:"m-0 min-w-0 border-0 p-0",children:[x.jsx("legend",{className:"px-3 pb-0.5 pt-1.5 text-[11px] font-medium text-faint",children:M.label}),M.models.map(T=>{const w=i===T;return x.jsxs("div",{className:"flex items-stretch active:bg-surface",children:[x.jsxs("button",{type:"button",onClick:()=>{_(!1),r(T)},className:"flex min-w-0 flex-1 items-center gap-2 py-2 pl-3 pr-1 text-left text-sm",children:[x.jsx("span",{className:"min-w-0 flex-1 truncate",children:fd(T)}),x.jsx(ma,{size:13,className:pe("shrink-0 text-accent",e!==T&&"invisible")})]}),l?x.jsx("button",{type:"button",disabled:w||o!==void 0,onClick:()=>{_(!1),l(T)},"aria-label":w?`${T} is the default model`:`Set ${T} as default and select`,"aria-pressed":w,className:pe("flex w-9 shrink-0 items-center justify-center text-faint disabled:opacity-60",w&&"text-accent"),children:o===T?x.jsx(Rn,{size:14,className:"animate-spin"}):x.jsx(dd,{size:14,fill:w?"currentColor":"none"})}):w?x.jsx(dd,{size:14,fill:"currentColor","aria-label":`${T} is the default model`,className:"mx-3 self-center text-accent"}):null]},T)})]},M.label)):x.jsx("div",{className:"px-3 py-2 text-sm text-muted",children:f?"Reading Conductor’s model list…":g}),h?x.jsx("div",{className:"px-3 py-1.5 text-[11px] text-del",children:n.length?"Couldn’t refresh. Showing saved models.":"Couldn’t read the model list."}):null]})]}):null]})}function S5({model:e,providerModel:n,agentType:r,models:i,modelPickerOpen:l,onModelPickerOpenChange:o,modelsFetching:u=!1,modelsError:d=!1,defaultModel:f,onSetDefaultModel:h,settingDefaultModel:g,fast:p,effort:y,plan:b,showEmptyEffort:C=!1,modelStaged:v=!1,fastStaged:k=!1,effortStaged:B=!1,planStaged:_=!1,onModelChange:S,onFastChange:M,onEffortChange:T,onPlanChange:w,disabled:R=!1,hidePlan:L=!1,beforeModel:I,status:O}){const $=Ef(r,n),Q=yf(r,n),le=bf(r,n);return x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-0.5",children:[I,x.jsx("div",{className:"min-w-0",children:x.jsx(F5,{value:e,models:i,open:l,onOpenChange:o,isFetching:u,isError:d,defaultModel:f,onSetDefault:h,settingDefault:g,onSelect:S,renderTrigger:({picking:W,toggle:Y})=>x.jsxs("button",{type:"button",disabled:R,onClick:Y,"aria-label":`Change model, currently ${e}`,"aria-haspopup":"menu","aria-expanded":W,className:pe("flex h-8 max-w-full min-w-0 items-center gap-1 rounded-md px-1 text-[13px] font-medium text-muted transition active:bg-surface-2 active:text-text disabled:pointer-events-none disabled:opacity-40",v&&"text-accent"),children:[x.jsx(ao,{agentType:r,model:n,className:"size-[15px]"}),x.jsx("span",{className:"truncate",children:fd(e)})]})})}),le?x.jsx("button",{type:"button",disabled:R,onClick:M,"aria-label":`Fast mode ${p===void 0?"default":p?"on":"off"}`,"aria-pressed":p===!0,className:pe("flex size-8 shrink-0 items-center justify-center rounded-md text-muted transition active:bg-surface-2 active:text-text disabled:pointer-events-none disabled:opacity-40",p&&"text-text",k&&"text-accent"),children:x.jsx(nf,{size:17})}):null,Q&&(y||C)?x.jsxs("button",{type:"button",disabled:R,onClick:T,"aria-label":`Reasoning effort: ${y?Yl[y]:"default"}`,className:pe("flex h-8 shrink-0 items-center gap-1 rounded-md px-1 text-[13px] font-medium text-muted transition active:bg-surface-2 active:text-text disabled:pointer-events-none disabled:opacity-40",B&&"text-accent"),children:[x.jsx(oE,{effort:y??""}),x.jsx("span",{className:"max-[340px]:hidden",children:y?Yl[y]:"Effort"})]}):null,$&&!L?x.jsx("button",{type:"button",disabled:R,onClick:w,"aria-label":`Plan mode ${b===void 0?"default":b?"on":"off"}`,"aria-pressed":b===!0,className:pe("flex size-8 shrink-0 items-center justify-center rounded-md text-muted transition active:bg-surface-2 active:text-text disabled:pointer-events-none disabled:opacity-40",b&&"text-text",_&&"text-accent"),children:x.jsx(O8,{size:17})}):null]}),O?x.jsx("div",{className:"px-2 pt-0.5 text-[11px] text-faint",children:O}):null]})}function Hf({className:e}){return x.jsx("span",{className:pe("inline-flex h-4 shrink-0 items-center rounded bg-accent/10 px-1.5 font-mono text-[9px] font-semibold uppercase tracking-wide text-accent",e),children:"Beta"})}function N5({active:e,onChange:n}){return x.jsxs("button",{type:"button",onClick:()=>n(!e),title:"Run this task through your configured delegated roles","aria-label":`Workflow mode ${e?"on":"off"}`,"aria-pressed":e,className:pe("flex h-8 shrink-0 items-center gap-1 rounded-md px-1.5 text-[13px] font-medium text-muted transition active:bg-surface-2 active:text-text",e&&"bg-accent/10 text-accent"),children:[x.jsx(oc,{size:15}),x.jsx("span",{children:"Workflow"}),x.jsx(Hf,{className:"-mr-0.5"})]})}const gL=600*1e3,EL={};function L0(e,n){return e===n?void 0:e}function yL({session:e,workspaceId:n,workflow:r}){const[i,l]=D.useState(!1),[o,u]=D.useState(),[d,f]=D.useState(),h=De(X=>X.agentDrafts[e.id])??EL,g=De(X=>X.stageAgent),p=xr(),y=De(X=>X.pending.some(fe=>fe.sessionId===e.id&&fe.status==="sending")),b=cc(),C=b.data?.groups.find(X=>X.agentType===(e.agent_type??"unknown")),v=!!C?.defaultModel&&Date.now()-C.updatedAt<gL,k=fF(e,n,i&&!r?.active&&!v),B=k.data?.models??C?.models??[],_=k.data?.defaultModel??b.data?.defaultModel??C?.defaultModel,S=X=>g(e.id,X),M=e.claude_effort_level??void 0,T=e.permission_mode==="plan",w=!!e.fast_mode,R=h.effort??M,L=h.plan??T,I=h.fast??w,O=Object.keys(h).length>0,$=h.model??(q8(e.model,B)||"Model"),Q=h.model??e.model,le=Ef(e.agent_type,Q),W=yf(e.agent_type,Q),Y=bf(e.agent_type,Q),P=r?.role?.model??"Planning role";D.useEffect(()=>{!le&&h.plan!==void 0&&g(e.id,{plan:void 0})},[le,e.id,h.plan,g]),D.useEffect(()=>{!W&&h.effort!==void 0&&g(e.id,{effort:void 0}),!Y&&h.fast!==void 0&&g(e.id,{fast:void 0})},[W,Y,e.id,h.effort,h.fast,g]);const V=async X=>{if(!o){u(X),f(void 0);try{const fe=await Ne.setDefaultModel(e.id,X,n);if(!fe.ok)throw new Error(fe.error??"could not set the default model");g(e.id,{model:void 0}),await Promise.all([p.invalidateQueries({queryKey:["model-catalog"]}),p.invalidateQueries({queryKey:["sessions",n]}),p.invalidateQueries({queryKey:["state"]})])}catch(fe){f(fe instanceof Error?fe.message:"could not set the default model")}finally{u(void 0)}}};return x.jsx(S5,{model:r?.active?P:$,providerModel:r?.active?r.role?.model??null:Q,agentType:r?.active&&r.role?Ds(r.role.model)??null:e.agent_type,models:B,modelPickerOpen:i,onModelPickerOpenChange:l,modelsFetching:k.isFetching||b.isFetching,modelsError:k.isError,defaultModel:_,onSetDefaultModel:X=>{V(X)},settingDefaultModel:o,fast:r?.active?r.role?.fast:I,effort:r?.active?r.role?.effort:R,plan:r?.active?void 0:L,showEmptyEffort:r?.active,modelStaged:!r?.active&&h.model!==void 0,fastStaged:!r?.active&&h.fast!==void 0,effortStaged:!r?.active&&h.effort!==void 0,planStaged:!r?.active&&h.plan!==void 0,onModelChange:X=>S({model:L0(X,h.model)}),onFastChange:()=>S({fast:L0(!I,w)}),onEffortChange:()=>S({effort:L0(lE(R),M)}),onPlanChange:()=>S({plan:L0(!L,T)}),disabled:r?.active,hidePlan:r?.active,beforeModel:r?x.jsx(N5,{active:r.active,onChange:X=>{l(!1),r.onChange(X)}}):void 0,status:r?.active?r.problem?x.jsx("span",{className:"text-del",children:r.problem}):r.loading?"Loading the planning role…":"Planning root · starts tracked sibling-chat delegation":d?x.jsxs("span",{className:"text-del",children:[d,Fi(d)?x.jsx(ga,{className:"ml-1"}):null]}):o?"Setting default and selecting…":O?y?"Applying…":"Applies when you send":void 0})}const bL=[];function CL({session:e,sessionId:n,workspaceId:r,working:i,actuator:l,onFork:o,onContext:u,workflowStarted:d=!1,focusDraft:f=!1,onDraftFocused:h}){const g=n??r,p=De(re=>re.drafts[g]??""),y=De(re=>re.draftAttachments[g]??bL),b=De(re=>re.setDraft),C=De(re=>re.addDraftAttachment),v=De(re=>re.removeDraftAttachment),k=De(re=>re.clearDraftContent),B=De(re=>re.moveDraft),_=De(re=>re.setFocusedDraft),S=De(re=>re.online),M=De(re=>re.clearWorking),T=mg(),w=xr(),[R,L]=D.useState(!1),[I,O]=D.useState(null),[$,Q]=D.useState(!1),[le,W]=D.useState(null),[Y,P]=D.useState({sessionId:null,active:!1}),V=Y.sessionId===n&&Y.active,X=re=>P({sessionId:n,active:re}),fe=D.useRef(null),j=D.useRef(null),z=D.useRef(new Set),Z=D.useRef(0),[F,te]=D.useState([]),[ae,xe]=D.useState(!1),ve=F.filter(re=>re.sessionId===n),Ge=[...y.map(re=>({...re,id:re.path,status:"ready"})),...ve],me=ve.some(re=>re.status==="uploading"),nt=[...y.map(re=>re.token),p.trim()].filter(Boolean).join(`
|
|
49
49
|
`),ot=De(re=>re.pending.some(mt=>mt.sessionId===n&&!!mt.workflow)),$t=!!e&&!e.last_user_message_at&&!i&&!d&&!ot,Ct=V||$t,we=uf(Ct),ke=we.data?.roles.planning,Je=we.data?.issues.find(re=>re.role==="planning"),pt=e?.permission_mode==="plan"?"Workflow needs ordinary chat mode. Turn Plan off first.":we.isError?"Could not load delegated roles.":we.data?.warning?we.data.warning:we.data&&!ke?"Workflow mode needs a configured planning role.":Je?.error.message,rt=!!ke&&!pt;D.useEffect(()=>{n&&B(r,n)},[r,n,B]),D.useEffect(()=>(document.activeElement===fe.current&&_(g),()=>{De.getState().focusedDraft===g&&_(null)}),[g,_]);const vt=()=>{const re=fe.current;re&&(re.style.height="auto",re.style.height=`${Math.min(re.scrollHeight,160)}px`)};D.useEffect(vt,[p]),D.useEffect(()=>{if(!f)return;const re=fe.current;re&&(re.focus({preventScroll:!0}),re.setSelectionRange(re.value.length,re.value.length),h?.())},[f,h]);const Ke=(re=!1)=>{if(!nt||me||$||!n||!S||ot||V&&!rt)return;const mt=V;T({sessionId:n,workspaceId:r,text:nt,queue:mt?!1:re,workflow:mt}).then(At=>{At&&mt&&P(oe=>oe.sessionId===n?{...oe,active:!1}:oe)}),k(g),te(At=>At.filter(oe=>oe.sessionId!==n))},it=async()=>{if(!(!(o&&nt)||me||$||!S)){Q(!0),W(null);try{await o(nt),k(g),te(re=>re.filter(mt=>mt.sessionId!==n))}catch(re){W(re instanceof Error?re.message:"Could not fork this chat")}finally{Q(!1)}}},En=re=>{if(y.some(mt=>mt.path===re)){v(g,re);return}z.current.add(re),te(mt=>mt.filter(At=>At.id!==re))},kn=async re=>{if(!(!n||!S))for(const mt of Array.from(re)){const At=crypto.randomUUID();te(oe=>[...oe,{id:At,sessionId:n,name:mt.name||"attachment",status:"uploading"}]);try{const oe=await Ne.uploadAttachment(n,r,mt);if(z.current.delete(At))continue;C(n,oe.attachment),te(gt=>gt.filter(wt=>wt.id!==At))}catch(oe){if(z.current.delete(At))continue;te(gt=>gt.map(wt=>wt.id===At?{...wt,status:"error",error:oe instanceof Error?oe.message:"Upload failed"}:wt))}}},Ze=re=>{re?.length&&kn(re)},tn=re=>Array.from(re.dataTransfer.types).includes("Files"),se=re=>{tn(re)&&(re.preventDefault(),Z.current+=1,xe(!0))},Ee=re=>{tn(re)&&(Z.current-=1,Z.current<=0&&(Z.current=0,xe(!1)))},_e=re=>{tn(re)&&(re.preventDefault(),re.dataTransfer.dropEffect="copy")},Ve=re=>{tn(re)&&(re.preventDefault(),Z.current=0,xe(!1),Ze(re.dataTransfer.files))},st=async()=>{if(!(!n||R||!S)){L(!0),O(null);try{const re=await Ne.stop(n,r);re.ok?(M(n),await w.invalidateQueries({queryKey:["sessions",r]}),w.invalidateQueries({queryKey:["state"]})):O(re.error||"Stop failed")}catch(re){O(re instanceof Error?re.message:"Stop failed")}finally{L(!1)}}},It=!n,cn=l?.precise&&l.available,Qt=i&&!!n,Dt=(!!p.trim()||y.length>0)&&!me&&!ot&&(!V||rt),Yt=!i&&Dt&&e&&o?mL(e):null;return x.jsxs("div",{className:"pb-safe border-t border-border-soft bg-bg px-3 pt-2",children:[S?!cn&&x.jsxs("div",{className:"mb-1.5 flex items-center gap-1.5 px-1 text-[11px] text-faint",children:[x.jsx(sA,{size:12}),l?.caveat||"Sends to the focused session"]}):x.jsxs("div",{className:"mb-2 flex items-center gap-1.5 rounded-lg bg-del/10 px-3 py-1.5 text-xs text-del",children:[x.jsx(tf,{size:12}),"Offline — drafts are saved, sending resumes when the relay is back"]}),I?x.jsxs("div",{className:"mb-2 rounded-lg border border-del/40 bg-del/10 px-3 py-1.5 text-xs text-del",children:[x.jsx("button",{type:"button",onClick:()=>O(null),className:"block w-full text-left",children:I}),Fi(I)?x.jsx(ga,{className:"mt-1 inline-block"}):null]}):null,Yt?x.jsxs("div",{className:"mb-2 flex items-center gap-2 rounded-xl border border-cold-cache/20 bg-cold-cache/8 px-2.5 py-2 text-cold-cache",children:[x.jsx(BB,{size:14,className:"shrink-0"}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("div",{className:"text-xs font-medium",children:"Prompt cache may be cold"}),x.jsxs("div",{className:"text-[11px] text-muted",children:["Idle past its ",Yt.ttlLabel," window"]}),le?x.jsxs("div",{className:"mt-0.5 text-[11px] text-del",role:"alert",children:[le,Fi(le)?x.jsx(ga,{className:"ml-1"}):null]}):null]}),x.jsxs("button",{type:"button",onClick:()=>{it()},disabled:$||!S,title:"Start a fresh chat with this transcript attached and keep the draft",className:"flex h-8 shrink-0 items-center gap-1.5 rounded-lg bg-cold-cache/12 px-2.5 text-xs font-semibold transition active:scale-[0.97] active:bg-cold-cache/20 disabled:opacity-50",children:[$?x.jsx(Rn,{size:13,className:"animate-spin"}):x.jsx(j8,{size:13}),"Fork draft"]})]}):null,x.jsxs("fieldset",{"aria-label":"Message composer",onDragEnter:se,onDragLeave:Ee,onDragOver:_e,onDrop:Ve,className:`m-0 min-w-0 rounded-2xl border border-border bg-surface p-2 has-[textarea:focus]:border-accent/60 ${ae?"border-accent bg-accent-soft":""}`,children:[x.jsx("input",{ref:j,type:"file",multiple:!0,className:"hidden",onChange:re=>{Ze(re.target.files),re.target.value=""}}),Ge.length?x.jsx("div",{className:"flex flex-wrap gap-1 px-2 pb-1",children:Ge.map(re=>x.jsxs("div",{title:re.error??re.name,className:"flex max-w-full items-center gap-1 rounded-lg bg-surface-2 py-1 pl-2 pr-1 text-xs text-muted",children:[re.status==="uploading"?x.jsx(Rn,{size:12,className:"shrink-0 animate-spin"}):null,x.jsx("span",{className:"truncate",children:re.status==="error"?`${re.name}: ${re.error}`:re.name}),x.jsx("button",{type:"button",onClick:()=>En(re.id),"aria-label":`Remove ${re.name}`,className:"flex size-5 shrink-0 items-center justify-center rounded active:bg-surface",children:x.jsx(vn,{size:13})})]},re.id))}):null,ae?x.jsx("div",{className:"pointer-events-none absolute inset-1 z-10 flex items-center justify-center rounded-xl border border-dashed border-accent bg-accent-soft/90 text-sm font-medium text-accent",children:"Drop files to attach"}):null,x.jsx("textarea",{ref:fe,rows:1,value:p,disabled:It||$,placeholder:It?"No active session":V?"What should the workflow accomplish?":"Send a prompt…",className:"block max-h-40 w-full resize-none bg-transparent px-2 py-1 text-base outline-none placeholder:text-faint disabled:opacity-50",onChange:re=>b(g,re.target.value),onFocus:()=>_(g),onBlur:()=>{De.getState().focusedDraft===g&&_(null),gd()},onPaste:re=>{const mt=re.clipboardData.files;mt.length&&(re.preventDefault(),Ze(mt))},onKeyDown:re=>{w5(re)&&(re.preventDefault(),Ke(re.metaKey||re.ctrlKey))}}),x.jsxs("div",{className:"mt-1 flex items-start gap-1",children:[e?x.jsx(yL,{session:e,workspaceId:r,workflow:Ct?{active:V,role:ke,loading:we.isLoading,problem:pt,onChange:X}:void 0}):x.jsx("span",{className:"flex-1"}),e&&u?x.jsx(vL,{session:e,onOpen:u}):null,x.jsx("button",{type:"button",onClick:()=>j.current?.click(),disabled:It||$||!S,"aria-label":"Attach files",className:"flex size-8 shrink-0 items-center justify-center rounded-md text-muted transition active:bg-surface-2 active:text-text disabled:text-faint",children:x.jsx(sc,{size:17})}),Qt?x.jsx("button",{type:"button",onClick:st,disabled:R||!S,"aria-label":"Stop the agent",className:"flex size-8 shrink-0 items-center justify-center rounded-lg border border-border text-text transition active:bg-surface-2 disabled:text-faint",children:R?x.jsx("span",{className:"size-4 animate-spin rounded-full border-2 border-border border-t-text"}):x.jsx(I8,{size:14,fill:"currentColor"})}):null,Qt&&!Dt?null:x.jsx("button",{type:"button",onClick:()=>Ke(),disabled:It||!Dt||$||!S,"aria-label":"Send",className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-accent text-on-solid transition active:scale-95 disabled:bg-surface-2 disabled:text-faint",children:x.jsx(Z7,{size:18})})]})]})]})}function vL({session:e,onOpen:n}){const r=e.context_used_percent,i=pg(e.id,typeof r=="number"&&r>0,e.updated_at);if(typeof r!="number"||r<=0)return null;const l=Math.min(100,Math.max(0,r)),o=Math.round(r),u=dL(l,i.data);return x.jsx("button",{type:"button",onClick:n,"aria-label":`Context for ${e.title||"Untitled"}: ${o}% used`,"aria-haspopup":"dialog",title:`Context: ${o}% used`,className:"flex size-8 shrink-0 items-center justify-center rounded-md transition active:bg-surface-2",children:x.jsxs("svg",{viewBox:"0 0 18 18","aria-hidden":"true",className:"size-[18px] -rotate-90",children:[x.jsx("circle",{cx:"9",cy:"9",r:"6.5",fill:"none",strokeWidth:"3",className:"stroke-border"}),u.length?u.map(d=>x.jsx("circle",{cx:"9",cy:"9",r:"6.5",fill:"none",strokeWidth:"3",pathLength:"100",strokeDasharray:`${d.length} ${100-d.length}`,strokeDashoffset:-d.offset,"data-context-segment":d.key,className:d.ringClass},d.key)):x.jsx("circle",{cx:"9",cy:"9",r:"6.5",fill:"none",strokeWidth:"3",pathLength:"100",strokeDasharray:`${l} ${100-l}`,strokeLinecap:"round",className:r>=80?"stroke-working":"stroke-accent"})]})})}function Zx(e,n,r){let i=e;const l=Math.min(i,n);i-=l;const o=Math.min(i,Math.max(0,r-n));return i-=o,[{key:"chat",tokens:l,color:"bg-context-chat"},{key:"thinking",tokens:o,color:"bg-working"},{key:"tools",tokens:i,color:"bg-context-tools"}]}function AL({label:e,layers:n,scale:r}){return x.jsx("div",{role:"img","aria-label":`${e}: ${$0(n.reduce((i,l)=>i+l.tokens,0))} estimated tokens`,className:"flex h-1.5 overflow-hidden rounded-full bg-surface-2",children:n.map(i=>i.tokens>0?x.jsx("span",{className:i.color,style:{width:`${i.tokens/r*100}%`}},i.key):null)})}function kL({data:e}){const n=typeof e.usedPercent=="number"?`${Math.round(e.usedPercent)}% used`:null,r=D5.map(o=>({...o,color:o.barClass,tokens:e.categories[o.key]})),i=Math.max(e.forkTokens.concise,e.forkTokens.reasoning,e.forkTokens.full,1),l=[{label:"Concise",detail:"Messages only",tokens:e.forkTokens.concise,layers:Zx(e.forkTokens.concise,e.forkTokens.concise,e.forkTokens.reasoning)},{label:"With reasoning",detail:"Messages and reasoning",tokens:e.forkTokens.reasoning,layers:Zx(e.forkTokens.reasoning,e.forkTokens.concise,e.forkTokens.reasoning)},{label:"Full transcript",detail:"Messages, reasoning, and tools",tokens:e.forkTokens.full,layers:Zx(e.forkTokens.full,e.forkTokens.concise,e.forkTokens.reasoning)}];return x.jsxs("div",{className:"space-y-5",children:[x.jsxs("section",{"aria-labelledby":"context-composition-heading",children:[x.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[x.jsx("h3",{id:"context-composition-heading",className:"min-w-0 flex-1 text-sm font-semibold",children:"Inside this context"}),x.jsxs("span",{className:"text-sm font-semibold tabular-nums",children:[$0(e.totalTokens)," tokens"]}),n?x.jsx("span",{className:"text-xs tabular-nums text-muted",children:n}):null]}),x.jsx("div",{role:"img","aria-label":r.map(o=>`${o.label} ${B9(o.tokens,e.totalTokens)}`).join(", "),className:"flex h-2.5 overflow-hidden rounded-full bg-surface-2",children:r.map(o=>o.tokens>0&&e.totalTokens>0?x.jsx("span",{className:o.color,style:{width:`${o.tokens/e.totalTokens*100}%`}},o.key):null)}),x.jsx("div",{className:"mt-3 grid grid-cols-2 gap-x-5 gap-y-2.5",children:r.map(o=>{const u=B9(o.tokens,e.totalTokens);return x.jsxs("div",{className:"min-w-0 text-xs",children:[x.jsxs("div",{className:"flex items-center gap-2 text-muted",children:[x.jsx("span",{className:`size-2 shrink-0 rounded-full ${o.color}`}),x.jsx("span",{children:o.label})]}),x.jsxs("div",{className:"mt-0.5 pl-4 tabular-nums",children:[o.tokens?"≈":"",$0(o.tokens)," · ",u]})]},o.key)})}),x.jsxs("p",{className:"mt-3 text-[11px] leading-relaxed text-faint",children:["Categories are estimated from the last completed turn. Chat is user prompts and visible replies. Initial context is the remainder: system and developer prompts, project instructions, skills, tool definitions, attachments, ",e.compacted?"compacted summaries, ":"","and provider overhead."]})]}),x.jsxs("section",{"aria-labelledby":"fork-size-heading",className:"border-t border-border-soft pt-4",children:[x.jsx("h3",{id:"fork-size-heading",className:"mb-2 text-sm font-semibold",children:"Estimated fork payload"}),x.jsxs("div",{className:"divide-y divide-border-soft overflow-hidden rounded-xl border border-border-soft",children:[x.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-xs font-medium",children:"Last message only"}),x.jsx("span",{className:"block text-[11px] text-faint",children:"This response, without history"})]}),x.jsx("span",{className:"text-[11px] text-faint",children:"Depends on message"})]}),l.map(o=>x.jsxs("div",{className:"space-y-2 px-3 py-2.5",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-xs font-medium",children:o.label}),x.jsx("span",{className:"block text-[11px] text-faint",children:o.detail})]}),x.jsxs("span",{className:"shrink-0 text-xs font-medium tabular-nums",children:["≈",$0(o.tokens)]})]}),x.jsx(AL,{label:o.label,layers:o.layers,scale:i})]},o.label))]}),e.forkTokens.reasoning===e.forkTokens.concise?x.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-muted",children:"No saved reasoning is available to copy, so Concise and With reasoning are the same size."}):null,x.jsxs("p",{className:"mt-2 text-[11px] leading-relaxed text-faint",children:["The bars reuse the context colors; the source's initial context is not copied. Fork sizes use the full saved transcript",e.compacted?", including history before compaction":"","."]})]})]})}function BL({sessionId:e,title:n,revision:r,onClose:i}){const l=pg(e,!0,r);return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:i,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Context breakdown",className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[85dvh] max-w-md flex-col rounded-t-3xl border border-border-soft bg-surface shadow-xl md:inset-0 md:m-auto md:h-fit md:rounded-3xl",children:[x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-4 py-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("h2",{className:"text-base font-semibold",children:"Context"}),x.jsx("p",{className:"truncate text-xs text-muted",children:n||"Untitled"})]}),x.jsx("button",{type:"button",onClick:i,"aria-label":"Close context breakdown",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:18})})]}),x.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain p-4",children:l.data?x.jsx(kL,{data:l.data}):l.isError?x.jsxs("div",{className:"flex flex-col items-center gap-3 py-8 text-center",children:[x.jsx("p",{className:"text-sm text-del",children:l.error instanceof Error?l.error.message:"Could not read this context."}),x.jsx("button",{type:"button",onClick:()=>{l.refetch()},className:"rounded-full border border-border px-3 py-1.5 text-xs font-medium active:bg-surface-2",children:"Try again"})]}):x.jsxs("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted",children:[x.jsx(Rn,{size:16,className:"animate-spin"}),"Reading context…"]})})]})]}),document.body)}function DL(e){document.visibilityState==="visible"&&window.open(e,"_blank","noopener,noreferrer")}const Wx="flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-40";function wL({workspaceId:e}){const n=sF(e),r=xr(),i=De(M=>M.online),[l,o]=D.useState(null),[u,d]=D.useState(null),[f,h]=D.useState(!1),[g,p]=D.useState(!1),y=D.useRef(null),b=D.useRef(null),C=n.data,v=(C?.runConfigs?.length??0)>1,k=C?.forwards?.filter(M=>M.forwarded&&M.url)??(C?.forwarded&&C.url?[{name:C.port?`Port ${C.port}`:"Dev server",port:C.port??0,url:C.url}]:[]);D.useEffect(()=>{if(!f&&!g)return;const M=g?b:y,T=R=>{R.target instanceof Node&&M.current?.contains(R.target)||(h(!1),p(!1))},w=R=>{R.key==="Escape"&&(R.preventDefault(),h(!1),p(!1),M.current?.querySelector("button")?.focus())};return document.addEventListener("pointerdown",T),document.addEventListener("keydown",w),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",w)}},[f,g]);const B=async(M,T)=>{if(!l){o(M?"start":"stop"),d(null);try{const w=M?await Ne.startDevServer(e,T):await Ne.stopDevServer(e);r.setQueryData(["dev-server",e],w),w.ok?M&&w.url&&DL(w.url):d(w.error??`Could not ${M?"start":"stop"} the dev server`)}catch(w){d(w instanceof Error?w.message:`Could not ${M?"start":"stop"} the dev server`)}finally{o(null),r.invalidateQueries({queryKey:["dev-server",e]})}}},_=v?"Choose Run config":C?.running?"Forward dev server to tailnet":"Start and forward dev server",S=C&&!C.available;return x.jsxs(x.Fragment,{children:[k.length&&k[0]?.url?x.jsxs("div",{ref:y,className:"relative flex shrink-0 items-center",children:[x.jsx("a",{href:k[0].url,target:"_blank",rel:"noreferrer","aria-label":`Open ${k[0].name} on port ${k[0].port}`,title:k[0].url,className:Wx,children:x.jsx(W3,{size:18})}),k.length>1?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",onClick:()=>h(M=>!M),"aria-label":"Choose forwarded dev server","aria-haspopup":"menu","aria-expanded":f,className:"flex h-9 w-6 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(Ea,{size:14,className:f?"rotate-180":void 0})}),f?x.jsx("div",{role:"menu","aria-label":"Forwarded dev servers",className:"fade-in absolute right-0 top-full z-30 mt-1 max-h-[calc(100dvh-4rem)] min-w-52 overflow-y-auto rounded-xl border border-border bg-surface py-1 shadow-xl",children:k.map(M=>x.jsxs("a",{href:M.url??void 0,target:"_blank",rel:"noreferrer",onClick:()=>h(!1),role:"menuitem",className:"flex items-center gap-3 px-3 py-2.5 text-left text-sm active:bg-surface-2",children:[x.jsx("span",{className:"min-w-0 flex-1 truncate",children:M.name}),x.jsxs("span",{className:"font-mono text-xs text-faint",children:[":",M.port]})]},`${M.port}:${M.url}`))}):null]}):null]}):x.jsxs("div",{ref:b,className:"relative shrink-0",children:[x.jsx("button",{type:"button",onClick:()=>{v?p(M=>!M):B(!0)},disabled:!i||!!l||!!S||n.isLoading,"aria-label":_,"aria-haspopup":v?"menu":void 0,"aria-expanded":v?g:void 0,title:S?C.error:_,className:Wx,children:l==="start"||n.isLoading?x.jsx(Rn,{size:18,className:"animate-spin"}):C?.running?x.jsx(Y3,{size:18}):x.jsx(xd,{size:18,fill:"currentColor"})}),g&&v?x.jsx("div",{role:"menu","aria-label":"Run configs",className:"fade-in absolute right-0 top-full z-30 mt-1 max-h-[calc(100dvh-4rem)] min-w-44 overflow-y-auto rounded-xl border border-border bg-surface py-1 shadow-xl",children:C?.runConfigs.map(M=>x.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{p(!1),B(!0,M.id)},className:"flex w-full items-center gap-3 px-3 py-2.5 text-left text-sm active:bg-surface-2",children:[x.jsx(xd,{size:14,className:"shrink-0 text-muted"}),x.jsx("span",{className:"min-w-0 flex-1 truncate",children:M.name})]},M.id))}):null]}),C?.running||C?.forwarded?x.jsx("button",{type:"button",onClick:()=>{B(!1)},disabled:!i||!!l,"aria-label":"Stop dev server",className:Wx,children:l==="stop"?x.jsx(Rn,{size:18,className:"animate-spin"}):x.jsx(I8,{size:15,fill:"currentColor"})}):null,u?x.jsx("button",{type:"button",onClick:()=>d(null),className:"absolute right-2 top-full z-30 max-w-72 rounded-lg border border-del/40 bg-surface px-3 py-2 text-left text-xs text-del shadow-xl",children:u}):null]})}const w2=(e,n)=>e.name.localeCompare(n.name,void 0,{numeric:!0,sensitivity:"base"})||e.name.localeCompare(n.name);function _5(e){const n={path:"",folders:new Map,files:[]};for(const i of e){const l=i.path.split("/"),o=l.pop()??i.path;let u=n;for(const d of l){const f=u.path?`${u.path}/${d}`:d;let h=u.folders.get(d);h||(h={name:d,path:f,fileCount:0,added:0,removed:0,folders:new Map,files:[]},u.folders.set(d,h)),h.fileCount+=1,h.added+=i.added,h.removed+=i.removed,u=h}u.files.push({kind:"file",name:o,path:i.path,file:i})}const r=i=>[...[...i.folders.values()].sort(w2).map(l=>({kind:"folder",name:l.name,path:l.path,fileCount:l.fileCount,added:l.added,removed:l.removed,children:r(l)})),...i.files.sort(w2)];return r(n)}function FL(e){const n=[],r=i=>{for(const l of i)l.kind==="folder"?r(l.children):n.push(l.file)};return r(_5(e)),n}function M5(e,n,r){if(e==="changed")return n;const i=new Map(n.map(l=>[l.path,l]));return[...r].sort().map(l=>i.get(l)??{path:l,added:0,removed:0})}function SL(e){if(!e)return[];const n=e.split(`
|
|
@@ -54,5 +54,5 @@ https://github.com/highlightjs/highlight.js/issues/2277`),sn=ye,St=ze),lt===void
|
|
|
54
54
|
`),preamble:d||null}}const o=r.slice(0,i).join(`
|
|
55
55
|
`).trim(),u=(n?.trim()||"change.txt").replace(/[\t\r\n]/g," ");return{patch:[`--- ${u}`,`+++ ${u}`,...r.slice(i)].join(`
|
|
56
56
|
`),preamble:o||null}}function _L(e,n){if(e.pr_status==="merged")return"merged";if(n&&(n.dirty||n.unpushed))return"push";switch(e.pr_status){case"conflicts":return"resolve";case"checks_failed":return"failed";case"checks_pending":return"checks";case"mergeable":return"merge";case"draft":return"draft";default:return null}}const ML={push:{label:"Uncommitted changes",tone:"text-working",icon:x.jsx(g3,{size:14})},resolve:{label:"Merge conflicts",tone:"text-muted",icon:x.jsx(lc,{size:14})},merge:{label:"Ready to merge",tone:"text-add"},checks:{label:"Checks running",tone:"text-working",icon:x.jsx(Rn,{size:14,className:"animate-spin"})},failed:{label:"Checks failed",tone:"text-del",icon:x.jsx(u3,{size:14})},draft:{label:"Draft",tone:"text-muted"},merged:{label:"Merged",tone:"text-pr-merged",icon:x.jsx(T8,{size:14})}},jL={push:"Commit all outstanding changes with a clear message and push the branch to the remote.",resolve:"This branch has merge conflicts with its base branch. Merge the base branch in, resolve the conflicts, then commit and push."};function TL({ws:e,local:n,sessionId:r}){return x.jsx(RL,{ws:e,local:n,sessionId:r},e.id)}function RL({ws:e,local:n,sessionId:r}){const i=xr(),[l,o]=D.useState(!1),[u,d]=D.useState(!1),[f,h]=D.useState(null);if(f?.ok&&(f.continued||e.pr_status!=="merged"))return x.jsxs(F2,{children:[x.jsx(ma,{size:15,className:"shrink-0 text-add"}),x.jsx("span",{className:"truncate font-medium text-add",children:f.msg})]});const g=_L(e,n);if(!g)return null;const{label:p,tone:y,icon:b}=ML[g],C=async()=>{d(!0),h(null);try{const B=await Ne.merge(e.id);B.ok?(h({ok:!0,msg:`Merged${B.method?` (${B.method})`:""}`}),i.invalidateQueries({queryKey:["state"]}),i.invalidateQueries({queryKey:["diff",e.id]})):(h({ok:!1,msg:B.error||"Merge failed"}),o(!1))}catch(B){h({ok:!1,msg:B instanceof Error?B.message:String(B)}),o(!1)}finally{d(!1)}},v=async()=>{d(!0),h(null);try{const B=await Ne.continueWorkspace(e.id,r);B.ok?(h({ok:!0,msg:B.workspace?.branch?`Continued on ${B.workspace.branch}`:"Continued on a new branch",continued:!0}),i.invalidateQueries({queryKey:["state"]}),i.invalidateQueries({queryKey:["diff",e.id]})):h({ok:!1,msg:B.error||"Could not continue this workspace"})}catch(B){h({ok:!1,msg:B instanceof Error?B.message:String(B)})}finally{d(!1)}},k=async B=>{if(!e.active_session_id)return h({ok:!1,msg:"No active session to message"});d(!0),h(null);try{const _=await Ne.sendPrompt(e.active_session_id,jL[B],e.id);h(_.ok?{ok:!0,msg:"Asked the agent"}:{ok:!1,msg:_.error||"Send failed"})}catch(_){h({ok:!1,msg:_ instanceof Error?_.message:String(_)})}finally{d(!1)}};return x.jsxs(F2,{tint:g==="merge"?"add":g==="merged"?"merged":void 0,children:[e.pr_number?x.jsxs("a",{href:e.pr_url??void 0,target:"_blank",rel:"noreferrer",className:pe("flex shrink-0 items-center gap-0.5 rounded-md px-1.5 py-0.5 font-mono text-[11px] active:bg-surface",g==="merged"?"bg-pr-merged/15 text-pr-merged":"bg-surface-2 text-muted"),children:["#",e.pr_number,x.jsx(K7,{size:12})]}):null,x.jsxs("span",{className:pe("flex items-center gap-1 truncate font-medium",y),children:[b,p]}),x.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[f&&!f.ok?x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"max-w-36 truncate text-[11px] text-del",children:f.msg}),Fi(f.msg)?x.jsx(ga,{className:"shrink-0 text-[11px]"}):null]}):null,g==="merge"||g==="checks"?l?x.jsxs(x.Fragment,{children:[x.jsx(OL,{onClick:()=>o(!1)}),x.jsx(Ml,{onClick:C,busy:u,className:g==="merge"?"bg-add text-on-solid":"bg-working text-on-solid",children:"Confirm"})]}):x.jsxs(Ml,{onClick:()=>o(!0),className:g==="merge"?"bg-add text-on-solid":"border border-border bg-surface-2 text-text",children:[x.jsx(T8,{size:13}),"Merge"]}):g==="push"?x.jsx(Ml,{onClick:()=>k("push"),busy:u,className:"bg-working text-on-solid",children:"Commit & push"}):g==="resolve"?x.jsx(Ml,{onClick:()=>k("resolve"),busy:u,className:"border border-border bg-surface-2 text-text",children:"Resolve"}):g==="merged"?x.jsxs(Ml,{onClick:v,busy:u,title:"Continue on a new branch with the same chats",className:"border border-pr-merged/30 bg-surface-2 text-pr-merged",children:[x.jsx(_v,{size:13}),"Continue"]}):null]})]})}function Ml({onClick:e,busy:n,title:r,className:i,children:l}){return x.jsxs("button",{type:"button",onClick:e,disabled:n,title:r,className:pe("flex items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs font-semibold transition active:scale-95 disabled:opacity-60",i),children:[n?x.jsx(Rn,{size:13,className:"animate-spin"}):null,l]})}function OL({onClick:e}){return x.jsx("button",{type:"button",onClick:e,className:"rounded-lg px-2 py-1 text-xs text-muted active:bg-surface-2",children:"Cancel"})}const zL={add:"bg-add/10",merged:"bg-pr-merged/10"};function F2({tint:e,children:n}){return x.jsx("div",{className:pe("sticky top-0 z-10 flex items-center gap-2 border-b border-border-soft px-3 py-2 backdrop-blur",e?zL[e]:"bg-surface/95"),children:n})}function j5({review:e,sessionId:n,scope:r,selectedFile:i,onSelectFile:l}){const{workspace:o,query:u,filesQuery:d}=e,{data:f,isLoading:h,isError:g,error:p}=u,y=f?{dirty:f.dirty,unpushed:f.unpushed}:void 0,b=D.useMemo(()=>M5(r,f?.files??[],d.data?.files??[]),[r,f?.files,d.data?.files]),C=r==="changed"?h:d.isLoading,v=r==="changed"?g:d.isError,k=r==="changed"?p:d.error,B=r==="changed"?!!f:!!d.data;return x.jsxs("div",{className:"min-h-0 flex flex-1 flex-col",children:[x.jsx(TL,{ws:o,local:y,sessionId:n}),C&&!B?x.jsx(cr,{label:r==="changed"?"Computing diff…":"Listing files…"}):null,v&&!B?x.jsx(Zt,{children:k?.message}):null,!C&&!v&&!B?x.jsx(Zt,{children:r==="changed"?"No diff.":"No file list."}):null,r==="changed"&&f?.files.length===0?x.jsxs(Zt,{children:["No changes vs ",x.jsx("span",{className:"font-mono",children:f.base}),"."]}):null,r==="all"&&d.data?.files.length===0?x.jsx(Zt,{children:"No previewable files in this workspace."}):null,B&&b.length>0?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"shrink-0 border-b border-border-soft px-3 py-2 text-xs text-muted",children:r==="changed"&&f?x.jsxs(x.Fragment,{children:["vs ",x.jsx("span",{className:"font-mono text-faint",children:f.base})," · ",b.length," file",b.length===1?"":"s"]}):x.jsxs(x.Fragment,{children:[b.length,d.data?.truncated?"+":""," previewable file",b.length===1?"":"s"]})}),x.jsx(LL,{files:b,scope:r,selectedFile:i,onSelectFile:l})]}):null]})}function LL({files:e,scope:n,selectedFile:r,onSelectFile:i}){const l=D.useMemo(()=>_5(e),[e]),o=D.useMemo(()=>{if(!r)return[];const p=r.split("/");return p.pop(),p.map((y,b)=>p.slice(0,b+1).join("/"))},[r]),[u,d]=D.useState(()=>new Map(o.map(p=>[p,!0])));D.useEffect(()=>{o.length&&d(p=>{const y=new Map(p);let b=!1;for(const C of o)y.get(C)!==!0&&(y.set(C,!0),b=!0);return b?y:p})},[o]);const f=p=>u.get(p)??n==="changed",h=p=>{d(y=>{const b=new Map(y);return b.set(p,!(y.get(p)??n==="changed")),b})},g=(p,y)=>{const b=8+y*16;if(p.kind==="folder"){const v=f(p.path),k=!!r?.startsWith(`${p.path}/`);return x.jsxs("li",{children:[x.jsxs("button",{type:"button",onClick:()=>h(p.path),"aria-expanded":v,"aria-label":`${v?"Collapse":"Expand"} ${p.path}, ${p.fileCount} file${p.fileCount===1?"":"s"}`,className:"grid min-h-8 w-full min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-md pr-2 text-left transition hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent active:bg-surface-2",style:{paddingLeft:b},children:[x.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[x.jsx(F8,{size:14,className:pe("shrink-0 text-faint transition-transform",v&&"rotate-90")}),v?x.jsx(Ev,{size:15,className:pe("shrink-0 text-faint",k&&"text-accent")}):x.jsx(M8,{size:15,className:pe("shrink-0 text-faint",k&&"text-accent")}),x.jsx("span",{className:pe("truncate",k?"text-text":"text-muted"),children:p.name}),x.jsx("span",{className:"shrink-0 text-[10px] tabular-nums text-faint",children:p.fileCount})]}),x.jsx("span",{className:"min-w-8 text-right text-add",children:p.added?`+${p.added}`:null}),x.jsx("span",{className:"min-w-8 text-right text-del",children:p.removed?`−${p.removed}`:null})]}),v?x.jsx("ul",{children:p.children.map(B=>g(B,y+1))}):null]},p.path)}const C=p.path===r;return x.jsx("li",{children:x.jsxs("button",{type:"button",title:p.path,"aria-label":p.path,onClick:()=>i(p.path),"aria-pressed":C,className:pe("grid min-h-8 w-full min-w-0 grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-2 rounded-md pr-2 text-left transition hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent active:bg-surface-2",C&&"bg-accent-soft"),style:{paddingLeft:b},children:[x.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[x.jsx("span",{className:"size-3.5 shrink-0","aria-hidden":"true"}),x.jsx(_8,{size:15,className:pe("shrink-0",C?"text-accent":"text-faint")}),x.jsx("span",{className:pe("truncate",C?"text-text":"text-muted"),children:p.name})]}),x.jsx("span",{className:"min-w-8 text-right text-add",children:p.file.added?`+${p.file.added}`:null}),x.jsx("span",{className:"min-w-8 text-right text-del",children:p.file.removed?`−${p.file.removed}`:null})]})},p.path)};return x.jsx("ul",{"aria-label":`${n==="changed"?"Changed":"All"} files by folder`,className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-2 py-2 font-mono text-[12px]",children:l.map(p=>g(p,0))})}function PL({review:e,filePath:n,scope:r,onSelectFile:i,onShowFiles:l,onClose:o}){const{workspace:u,query:d,filesQuery:f,fileQuery:h}=e,{data:g,isLoading:p,isError:y,error:b}=d,C=D.useMemo(()=>FL(M5(r,g?.files??[],f.data?.files??[])),[r,g?.files,f.data?.files]),v=C.findIndex($=>$.path===n),k=v>=0?C[v]:void 0,B=D.useMemo(()=>r==="changed"&&g&&!g.truncated?NL(g.patch,g.files,n):null,[r,g,n]),_=r==="changed"&&!!g?.truncated,S=_&&h.data?.path===n?h.data:null,M=S?.patch??B,T=v>0?C[v-1]:void 0,w=v>=0&&v<C.length-1?C[v+1]:void 0,R=r==="all"&&u.worktree?`${u.worktree}/${n}`:null,L=cF(R,r==="all"),I=r==="changed"?"changed file":"file",O=r==="changed"?"changed files":"all files";return x.jsxs("section",{className:"min-h-0 flex flex-1 flex-col bg-bg","aria-label":r==="changed"?`Changes in ${n}`:`Source of ${n}`,children:[x.jsx(Pf,{title:x.jsxs("span",{className:"flex items-baseline gap-2",children:[x.jsx("span",{children:r==="changed"?"Changes":"Source"}),r==="changed"&&k?.added?x.jsxs("span",{className:"text-xs font-normal text-add",children:["+",k.added]}):null,r==="changed"&&k?.removed?x.jsxs("span",{className:"text-xs font-normal text-del",children:["−",k.removed]}):null]}),subtitle:k?.path??n,actions:x.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 lg:hidden",children:[x.jsx("button",{type:"button",onClick:()=>T&&i(T.path),disabled:!T,"aria-label":`Previous ${I}`,className:"flex size-8 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-25",children:x.jsx(i3,{size:17})}),x.jsx("span",{className:"min-w-9 text-center text-[11px] tabular-nums text-faint",children:v>=0?`${v+1}/${C.length}`:"—"}),x.jsx("button",{type:"button",onClick:()=>w&&i(w.path),disabled:!w,"aria-label":`Next ${I}`,className:"flex size-8 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-25",children:x.jsx(F8,{size:17})}),x.jsx("button",{type:"button",onClick:l,"aria-label":`Show ${O}`,className:"flex size-8 items-center justify-center rounded-full text-muted transition active:bg-surface-2",children:x.jsx(R8,{size:17})})]}),onClose:o,closeLabel:"Close file viewer"}),x.jsx("div",{className:"min-h-0 flex-1 overflow-auto overscroll-contain",children:r==="changed"?x.jsxs(x.Fragment,{children:[p&&!g?x.jsx(cr,{label:"Loading changes…"}):null,y?x.jsx(Zt,{children:b?.message}):null,g&&v<0?x.jsx(Zt,{children:"This file is no longer changed."}):null,g&&v>=0&&_&&h.isLoading&&!S?x.jsx(cr,{label:"Loading file changes…"}):null,g&&v>=0&&_&&h.isError&&!S?x.jsx(Zt,{children:h.error?.message}):null,g&&v>=0&&!_&&M===null?x.jsx(Zt,{children:"No textual patch is available for this file."}):null,S&&!M?x.jsx(Zt,{children:"No textual patch is available for this file."}):null,M?x.jsx(k5,{patch:M,fileName:n,hideFileHeader:!0,className:"p-4"}):null]}):x.jsxs(x.Fragment,{children:[L.isLoading&&!L.data?x.jsx(cr,{label:"Reading source…"}):null,L.isError&&!L.data?x.jsx(Zt,{children:L.error?.message}):null,!f.isLoading&&!u.worktree?x.jsx(Zt,{children:"Workspace files are unavailable."}):null,L.data?x.jsx(p5,{preview:L.data}):null]})})]})}const IL=/^[a-z][a-z0-9_-]{0,63}$/,S2=["none","low","medium","high","xhigh","max","ultracode"],N2=e=>({version:1,roles:Object.fromEntries(Object.entries(e.roles).map(([n,r])=>[n,{...r}]))}),UL=e=>`You are the ${e} agent for this workspace. End your final answer with a \`## Baton\` section: Decision, Evidence, Files changed, Risks, Suggested next role.`;function HL(e,n){const i=[void 0,...n==="codex"?S2:S2.filter(o=>o!=="none")],l=i.indexOf(e);return i[(l+1)%i.length]}function $L(e,n){const r={...e};return n===void 0?delete r.effort:r.effort=n,r}function qL(e,n){const r={...e,model:n},i=Ds(n);return rf(i)||delete r.effort,af(i)||delete r.fast,r}function GL(e,n){if(!V8(e.model,n))return"Choose an exact model from Conductor’s picker.";const r=Ds(e.model);return r?e.effort!==void 0&&!rf(r)?"Conductor does not expose a reasoning control for this provider. Select its model again to clear Effort.":e.effort==="none"&&r!=="codex"?"None effort is available only for Codex.":e.fast!==void 0&&!af(r)?"Conductor does not expose a Fast control for this provider. Select its model again to clear Fast.":null:"This model label does not identify a supported provider."}function VL(e,n){return V8(e.model,n)?Ds(e.model)??null:null}function _2(e,n,r,i){return e&&!n&&r!==void 0&&i===0}function T5({name:e}){return x.jsx("span",{className:"max-w-20 shrink-0 truncate rounded bg-accent/10 px-1 py-0.5 font-mono text-[9px] uppercase tracking-wide text-accent",children:e})}function QL({name:e,role:n,models:r,agentType:i=null,invalid:l,onChange:o,onRemove:u,canRemove:d}){const f=i??Ds(n.model)??null,h=rf(f),g=af(f);return x.jsxs("section",{className:pe("rounded-2xl border bg-surface p-3",l?"border-del/50":"border-border"),children:[x.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[x.jsx(T5,{name:e}),x.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:e}),x.jsx("button",{type:"button",disabled:!d,onClick:u,"aria-label":`Remove ${e} role`,className:"flex size-7 shrink-0 items-center justify-center rounded-lg text-faint active:bg-surface-2 disabled:invisible",children:x.jsx(nD,{size:14})})]}),x.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[x.jsx(F5,{value:n.model,models:r,placement:"below",empty:"No picker models are cached yet.",onSelect:p=>o(qL(n,p)),renderTrigger:({picking:p,toggle:y})=>x.jsxs("button",{type:"button",onClick:y,"aria-label":`Choose model for ${e}, currently ${n.model}`,"aria-haspopup":"menu","aria-expanded":p,className:pe("flex h-8 max-w-56 min-w-0 items-center gap-1.5 rounded-lg border px-2 text-xs active:bg-surface-2",l?"border-del text-del":"border-border text-muted"),children:[x.jsx(ao,{agentType:i,model:n.model,className:"size-3.5"}),x.jsx("span",{className:"truncate",children:n.model})]})}),h?x.jsxs("button",{type:"button",onClick:()=>o($L(n,HL(n.effort,f))),"aria-label":`Reasoning effort for ${e}: ${n.effort?Yl[n.effort]:"default"}`,className:"flex h-8 items-center gap-1.5 rounded-lg border border-border px-2 text-xs text-muted active:bg-surface-2",children:[x.jsx(oE,{effort:n.effort??""}),n.effort?Yl[n.effort]:"Effort"]}):null,g?x.jsxs("button",{type:"button",onClick:()=>o({...n,fast:!n.fast}),"aria-label":`Fast mode for ${e} ${n.fast?"on":"off"}`,"aria-pressed":n.fast===!0,className:pe("flex h-8 items-center gap-1 rounded-lg border border-border px-2 text-xs text-muted active:bg-surface-2",n.fast&&"bg-surface-2 text-text"),children:[x.jsx(nf,{size:13})," Fast"]}):null]}),l?x.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-del",children:[x.jsx(lc,{size:13,className:"mt-0.5 shrink-0"}),x.jsx("span",{children:l})]}):null,x.jsxs("details",{className:"mt-2",children:[x.jsx("summary",{className:"cursor-pointer select-none text-[11px] text-faint",children:"Role preamble"}),x.jsx("textarea",{value:n.preamble??"",onChange:p=>o({...n,preamble:p.target.value}),rows:4,"aria-label":`${e} role preamble`,className:"mt-1.5 block w-full resize-y rounded-xl border border-border bg-bg px-2.5 py-2 text-base leading-relaxed outline-none focus:border-accent/60"})]})]})}function R5({onClose:e}){const n=xr(),r=uf(),i=cc(),[l,o]=D.useState(null),[u,d]=D.useState(!1),[f,h]=D.useState(!1),[g,p]=D.useState(null),[y,b]=D.useState("");D.useEffect(()=>{r.data&&!u&&o(N2(r.data))},[r.data,u]);const C=i.data?.groups,v=D.useMemo(()=>C?.flatMap(I=>I.models)??[],[C]),k=new Map(r.data?.issues.map(I=>[I.role,I.error.message])??[]),B=l,_=new Map;if(B)for(const[I,O]of Object.entries(B.roles)){const $=C?GL(O,C):k.get(I);$&&_.set(I,$)}const S=(I,O)=>{B&&(o({version:1,roles:{...B.roles,[I]:O}}),d(!0),p(null))},M=I=>{if(!B||Object.keys(B.roles).length<=1)return;const{[I]:O,...$}=B.roles;o({version:1,roles:$}),d(!0)},T=y.trim().toLowerCase().replace(/\s+/g,"-"),w=y&&!IL.test(T)?"Use lowercase letters, numbers, dashes, or underscores.":T&&B?.roles[T]?"That role already exists.":null,R=()=>{!B||!T||w||(o({version:1,roles:{...B.roles,[T]:{model:"Choose a model",fast:!1,preamble:UL(T)}}}),b(""),d(!0))},L=async()=>{if(!(!B||!_2(u,f,C,_.size))){h(!0),p(null);try{const I=await Ne.updateRoles(B);if(!I.ok){p(I.error.message);return}o(N2(I.config)),d(!1),await n.invalidateQueries({queryKey:["roles"]})}catch(I){p(I instanceof Error?I.message:String(I))}finally{h(!1)}}};return qr.createPortal(x.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-bg",role:"dialog","aria-modal":"true","aria-label":"Roles settings",children:[x.jsxs("header",{className:"pt-safe flex items-center gap-2 border-b border-border-soft px-3 pb-2.5",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("h2",{className:"text-[15px] font-semibold",children:"Roles"}),x.jsx(Hf,{})]}),x.jsx("p",{className:"text-[11px] text-faint",children:"Cross-provider delegated chats"})]}),x.jsxs("button",{type:"button",disabled:!_2(u,f,C,_.size),onClick:()=>{L()},className:"flex h-9 items-center gap-1.5 rounded-xl bg-accent px-3 text-sm font-semibold text-white disabled:opacity-35",children:[f?x.jsx(Rn,{size:15,className:"animate-spin"}):x.jsx(Wk,{size:15}),"Save"]}),x.jsx("button",{type:"button",onClick:e,"aria-label":"Close roles settings",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsx("div",{className:"pb-safe min-h-0 flex-1 overflow-y-auto p-3",children:r.isLoading&&!B?x.jsx(cr,{label:"Loading roles…"}):r.isError&&!B?x.jsx("p",{className:"rounded-xl border border-del/40 bg-del/5 p-3 text-sm text-del",children:r.error instanceof Error?r.error.message:"Could not load roles."}):B?x.jsxs("div",{className:"mx-auto flex max-w-xl flex-col gap-2.5",children:[i.isError?x.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-del/40 bg-del/5 p-3 text-xs text-del",children:[x.jsx("span",{className:"min-w-0 flex-1",children:"Could not load the saved Conductor model catalog."}),x.jsx("button",{type:"button",onClick:()=>{i.refetch()},className:"shrink-0 rounded-lg border border-del/40 px-2 py-1 font-semibold",children:"Retry"})]}):null,r.data?.warning?x.jsxs("p",{className:"rounded-xl border border-del/40 bg-del/5 p-3 text-xs text-del",children:[r.data.warning," The file was preserved; saving replaces it only after validation."]}):null,Object.entries(B.roles).map(([I,O])=>x.jsx(QL,{name:I,role:O,models:v,agentType:C?VL(O,C):null,invalid:_.get(I),onChange:$=>S(I,$),onRemove:()=>M(I),canRemove:Object.keys(B.roles).length>1},I)),x.jsxs("div",{className:"rounded-2xl border border-dashed border-border p-2.5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("input",{value:y,onChange:I=>b(I.target.value),onKeyDown:I=>{I.key==="Enter"&&R()},placeholder:"Add a role","aria-label":"New role name",className:"min-w-0 flex-1 bg-transparent px-1 text-base outline-none placeholder:text-faint"}),x.jsxs("button",{type:"button",disabled:!T||!!w,onClick:R,className:"flex h-8 items-center gap-1 rounded-lg border border-border px-2 text-xs text-muted active:bg-surface-2 disabled:opacity-35",children:[x.jsx(ef,{size:14})," Add"]})]}),w?x.jsx("p",{className:"mt-1.5 px-1 text-xs text-del",children:w}):null]}),_.size?x.jsx("p",{className:"text-xs text-del",children:"Choose the missing picker models before saving or delegating."}):null,g?x.jsx("p",{className:"rounded-xl border border-del/40 bg-del/5 p-3 text-xs text-del",children:g}):null,x.jsx("p",{className:"px-1 text-[11px] leading-relaxed text-faint",children:"Roles configure ordinary chats. Changes apply only to future jobs; accepted jobs keep their frozen model and effort."})]}):null})]}),document.body)}function YL({workspace:e,agentsRunning:n}){const[r,i]=D.useState(!1),[l,o]=D.useState(!1),[u,d]=D.useState(null),[f,h]=D.useState(null),g=De(_=>_.online),p=xr(),y=ff(e),b=()=>{i(!1),o(!1)},C=async _=>{if(!u&&(b(),_!==y)){d(_),h(null);try{const S=await Ne.setStatus(e.id,_);S.ok||h(S.error??"status change failed"),await p.invalidateQueries({queryKey:["state"]})}catch(S){h(S instanceof Error?S.message:"status change failed")}finally{d(null)}}},v=async()=>{if(!u){b(),d("archive"),h(null);try{const _=await Ne.archive(e.id,n>0);_.ok||h(_.error??"archiving failed"),await p.invalidateQueries({queryKey:["state"]}),await p.invalidateQueries({queryKey:["workspace",e.id]})}catch(_){h(_ instanceof Error?_.message:"archiving failed")}finally{d(null)}}},B=u==="archive"?y:u??y;return x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",onClick:()=>r?b():i(!0),disabled:!g||u!==null,"aria-label":`Workspace menu: ${Cd(y)}`,"aria-expanded":r,className:pe("flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-40",r&&"bg-surface-2 text-text"),children:u?x.jsx("span",{className:"dot-spinner size-4",style:{"--spin-color":KL(B)}}):x.jsx(M2,{status:B})}),r?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button","aria-label":"Close workspace menu",className:"fixed inset-0 z-20 cursor-default",onClick:b}),x.jsx("div",{className:"fade-in absolute right-2 top-full z-30 w-60 overflow-hidden rounded-xl border border-border bg-surface shadow-xl",children:l?x.jsxs("div",{className:"p-3",children:[x.jsx("div",{className:"text-sm font-semibold",children:"Archive workspace?"}),x.jsx("p",{className:"mt-1 text-xs leading-snug text-muted",children:n>0?"Agents are still running in this workspace. Archiving will stop them and end any in-progress work.":"Its worktree is deleted. The chat stays readable and searchable."}),x.jsxs("div",{className:"mt-3 flex justify-end gap-2",children:[x.jsx("button",{type:"button",onClick:()=>o(!1),className:"rounded-lg border border-border px-2.5 py-1 text-xs font-semibold active:bg-surface-2",children:"Cancel"}),x.jsx("button",{type:"button",onClick:v,className:"rounded-lg bg-del px-2.5 py-1 text-xs font-semibold text-on-solid active:scale-95",children:n>0?"Stop agents and archive":"Archive"})]})]}):x.jsxs(x.Fragment,{children:[wS.map(_=>x.jsxs("button",{type:"button",onClick:()=>C(_),className:"flex w-full items-center gap-2 px-3 py-2.5 text-left text-sm active:bg-surface-2",children:[x.jsx(M2,{status:_}),x.jsx("span",{className:"flex-1",children:Cd(_)}),_===y?x.jsx(ma,{size:15,className:"text-accent"}):null]},_)),x.jsxs("button",{type:"button",onClick:()=>o(!0),className:"flex w-full items-center gap-2 border-t border-border px-3 py-2.5 text-left text-sm text-del active:bg-surface-2",children:[x.jsx(Zd,{size:15}),x.jsx("span",{className:"flex-1",children:"Archive workspace"})]})]})})]}):null,f?x.jsx("button",{type:"button",onClick:()=>h(null),className:"absolute right-2 top-full z-30 max-w-64 rounded-lg border border-del/40 bg-surface px-3 py-2 text-left text-xs text-del shadow-xl",children:f}):null]})}function KL(e){return hf[e]??"var(--color-faint)"}function M2({status:e}){const n=hf[e];return n?x.jsx("span",{className:"dot size-2.5",style:{background:n}}):x.jsx("span",{className:"dot size-2.5 border border-faint bg-transparent"})}function XL(){const{workspaceId:e}=Nb(),[n,r]=A8(),i=n.get("session"),l=Ae=>r({session:Ae},{replace:!0}),[o,u]=D.useState(!1),[d,f]=D.useState("changed"),[h,g]=D.useState(null),[p,y]=D.useState(!1),b=h&&h.workspaceId===e?h.path:null,[C,v]=D.useState(!1),[k,B]=D.useState(null),[_,S]=D.useState(!1),[M,T]=D.useState(null),[w,R]=D.useState(null),[L,I]=D.useState(null),[O,$]=D.useState(null),[Q,le]=D.useState(null),W=xr(),Y=_i(),{data:P,isLoading:V}=xg(),X=P?.workspaces.find(Ae=>Ae.id===e),fe=lF(e,o&&!!X),j=oF(e,b,o&&d==="changed"&&!!X&&!!fe.data?.truncated),z=!!P&&!X,{data:Z}=fg(e,!z),F=De(Ae=>Ae.workingHints),te=De(Ae=>Ae.pending),ae=De(Ae=>Ae.readMarks),xe=De(Ae=>Ae.markRead),ve=De(Ae=>Ae.setDraft),Ge=De(Ae=>Ae.online),me=X,nt=P?.actuator,{data:ot,isLoading:$t}=aF(e,z),Ct=iF(e,!!X?.worktree,o&&d==="all"),{data:we}=Ct,ke=X?.worktree??null,Je=we?.files,pt=D.useMemo(()=>({resolveMention:Tg(ke,Je),worktree:ke}),[ke,Je]),rt=Z?.sessions??[],vt=me?.active_session_id&&rt.some(Ae=>Ae.id===me.active_session_id)?me.active_session_id:null,Ke=(i&&rt.some(Ae=>Ae.id===i)?i:null)??vt??rt[0]?.id??null,it=rt.find(Ae=>Ae.id===Ke),En={...Z?.session_roles??{},...me?.session_roles??{}},kn=me?.delegations??[],Ze=D.useMemo(()=>new Set(kn.flatMap(Ae=>Ae.childSessionId?[Ae.childSessionId]:[])),[kn]),tn=it?.updated_at;if(D.useEffect(()=>{me&&Ke&&tn&&document.visibilityState==="visible"&&xe(Ke,tn)},[me,Ke,tn,xe]),CF(Ke,tn),!me)return ot?x.jsx(xL,{workspace:ot.workspace}):x.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[x.jsx(vd,{title:"Session",menu:!0}),V||z&&$t?x.jsx(cr,{}):x.jsx("div",{className:"p-6 text-center text-sm text-muted",children:"Workspace not found."})]});const se=Ke?F[Ke]:void 0,Ee=it?.status==="working"||se!==void 0&&Date.now()-se<yd,_e=it?.turn_started_at?Xn(it.turn_started_at):null,Ve=(it?.status==="working"?_e??se:se??_e)??null,st=Date.now(),It=Object.fromEntries(rt.map(Ae=>{const U=F[Ae.id],ce=[...Ae.id===Ke&&me.pending_prompt?[me.pending_prompt]:[],...(me.parked_prompts??[]).filter(ge=>ge.sessionId===Ae.id)];return[Ae.id,J8(te.filter(ge=>ge.sessionId===Ae.id),ce,U!==void 0&&st-U<yd)]})),cn=[me.repo_name,me.branch,$8(me.model)].filter(Boolean).join(" · "),Qt=async()=>{if(!_){S(!0);try{const Ae=await Ne.newChat(me.id);Ae.ok&&(await W.invalidateQueries({queryKey:["sessions",me.id]}),Ae.sessionId&&l(Ae.sessionId))}finally{S(!1)}}},Dt=async(Ae,U=!1)=>{if(M||!Ge)return;const ce=rt.find(ge=>ge.id===Ae);if((ce?.status==="working"||ce?.background_tasks.length)&&!U){R(Ae),I(null);return}T(Ae),R(null),I(null);try{const ge=await Ne.closeChat(Ae,me.id,U);if(!ge.ok)throw new Error(ge.error??"Could not close this chat");Ke===Ae&&(ge.activeSessionId?l(ge.activeSessionId):r({},{replace:!0})),await Promise.all([W.invalidateQueries({queryKey:["sessions",me.id]}),W.invalidateQueries({queryKey:["state"]})])}catch(ge){ge instanceof Dr&&ge.status===409&&/still working/i.test(ge.message)?R(Ae):I(ge instanceof Error?ge.message:"Could not close this chat")}finally{T(null)}},Yt=async({thinking:Ae,tools:U,through:ce,only:ge,destination:Ue="chat"},Ot)=>{if(!Ke)return;const et=await Ne.splitChat(Ke,me.id,Ae,U,ce,ge,Ue);if(!et.ok)throw new Error(et.error??"Could not fork this chat");const je=et.sessionId??(Ue==="workspace"?et.workspaceId:null);if(!je)throw new Error("The new chat opened, but its id was not available");if(ve(je,[et.text,Ot?.trim()].filter(Boolean).join(`
|
|
57
|
-
`)),et.sessionId&&$(et.sessionId),Ue==="workspace"){await W.invalidateQueries({queryKey:["state"]}),Y(et.sessionId?`/w/${et.workspaceId}?session=${encodeURIComponent(et.sessionId)}`:`/w/${et.workspaceId}`);return}await W.invalidateQueries({queryKey:["sessions",me.id]}),et.sessionId&&l(et.sessionId)},re=()=>{u(!1),g(null),y(!1)},mt=()=>{g(null),y(!0)},At=()=>{o?re():(u(!0),y(!0))},oe=Ae=>{g({workspaceId:me.id,path:Ae}),y(!1)},gt=Ae=>{f(Ae),Ae==="all"&&me.worktree&&Ct.refetch()},wt={workspace:me,query:fe,filesQuery:Ct,fileQuery:j},nn=async Ae=>{B(null);try{const U=await Ne.dismissDelegation(Ae);if(!U.ok)throw new Error(U.error.message);await W.invalidateQueries({queryKey:["state"]})}catch(U){B(U instanceof Error?U.message:String(U))}};return x.jsx(yS,{value:pt,children:x.jsxs("div",{className:"flex h-full min-w-0 overflow-hidden",children:[x.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[x.jsx(vd,{title:$r(me),subtitle:cn,menu:!0,right:x.jsxs(x.Fragment,{children:[x.jsx(wL,{workspaceId:me.id}),x.jsx("button",{type:"button",onClick:()=>v(!0),"aria-label":"Open delegated roles",className:"flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2",children:x.jsx(oc,{size:18})}),x.jsx(YL,{workspace:me,agentsRunning:rt.filter(Ae=>Ae.status==="working").length}),x.jsx(ZL,{stats:me.change_stats,open:o,onToggle:At})]})}),rt.length>0||me.state==="ready"?x.jsx(WL,{sessions:rt,activeId:Ke,readMarks:ae,promptStates:It,roles:En,subtabSessionIds:Ze,onSelect:l,onContext:Ae=>le({workspaceId:me.id,id:Ae.id,title:Ae.title}),onNewChat:Qt,onClose:Ae=>{Dt(Ae)},creating:_,closingId:M,online:Ge}):null,w?x.jsx(JL,{title:rt.find(Ae=>Ae.id===w)?.title??"Untitled",busy:M===w,onCancel:()=>R(null),onConfirm:()=>{Dt(w,!0)}}):L?x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-del/30 bg-del/5 px-3 py-2 text-xs text-del",children:[x.jsx("span",{className:"min-w-0 flex-1",children:L}),Fi(L)?x.jsx(ga,{}):null,x.jsx("button",{type:"button",onClick:()=>I(null),"aria-label":"Dismiss close error",className:"p-1",children:x.jsx(vn,{size:14})})]}):null,x.jsx(Mz,{jobs:kn,sessions:rt,roles:En,activeSessionId:Ke,onSelectSession:l}),me.delegation_warning||k?x.jsx("div",{className:"shrink-0 border-b border-del/30 bg-del/5 px-3 py-1.5 text-xs text-del",children:k??me.delegation_warning}):null,x.jsxs("div",{className:"relative min-h-0 flex flex-1 flex-col",children:[b?x.jsx(PL,{review:wt,filePath:b,scope:d,onSelectFile:oe,onShowFiles:()=>y(!0),onClose:mt},b):x.jsx(B5,{sessionId:Ke,workspaceId:me.id,working:Ee,workingSince:Ve,turnStartedAt:it?.turn_started_at,waiting:it?.background_tasks,delegations:kn,queued:me.parked_prompts?.find(Ae=>Ae.sessionId===Ke)??me.pending_prompt,onFork:Yt,onSelectSession:l,onDismissDelegation:Ae=>{nn(Ae)},onOpenRoles:()=>v(!0)}),o&&(p||!b)?x.jsx(nP,{review:wt,sessionId:Ke,scope:d,onScopeChange:gt,selectedFile:b,onSelectFile:oe,onClose:re}):null]}),x.jsx(CL,{session:it,sessionId:Ke,workspaceId:me.id,working:Ee,actuator:nt,onFork:Ae=>Yt({thinking:!0,tools:!1},Ae),onContext:it?()=>le({workspaceId:me.id,id:it.id,title:it.title}):void 0,workflowStarted:!!(Ke&&En[Ke])||!!(me.pending_prompt&&Ke===me.active_session_id),focusDraft:Ke===O,onDraftFocused:()=>$(null)},me.id)]}),o?x.jsx(tP,{review:wt,sessionId:Ke,scope:d,onScopeChange:gt,selectedFile:b,onSelectFile:oe,onClose:re}):null,C?x.jsx(R5,{onClose:()=>v(!1)}):null,Q&&Q.workspaceId===e?x.jsx(BL,{sessionId:Q.id,title:Q.title,revision:rt.find(Ae=>Ae.id===Q.id)?.updated_at,onClose:()=>le(null)}):null]})})}function ZL({stats:e,open:n,onToggle:r}){const i=!!e&&(e.added>0||e.removed>0);return x.jsxs("button",{type:"button",onClick:r,"aria-label":i?"Toggle diff panel, changes available":"Toggle diff panel","aria-pressed":n,className:pe("relative flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2",n&&"bg-surface-2 text-text"),children:[x.jsx(N8,{size:19}),i?x.jsx("span",{className:"absolute right-1.5 top-1.5 size-1.5 rounded-full bg-accent","aria-hidden":"true"}):null]})}function WL({sessions:e,activeId:n,readMarks:r,promptStates:i,roles:l={},subtabSessionIds:o,onSelect:u,onContext:d,onNewChat:f,onClose:h,creating:g,closingId:p,online:y}){const b=D.useRef(null),C=e.filter(k=>!l[k.id]?.delegationId&&!o?.has(k.id)),v=C.some(k=>k.id===n);return D.useLayoutEffect(()=>{n&&v&&b.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[n,v]),x.jsxs("nav",{className:"flex shrink-0 items-center gap-1 border-b border-border-soft bg-bg px-3 py-2",children:[x.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:C.map(k=>{const B=i[k.id],_=typeof k.context_used_percent=="number"&&k.context_used_percent>0;return x.jsxs("div",{ref:k.id===n?b:void 0,className:pe("flex shrink-0 items-center rounded-full text-sm font-medium text-muted transition",k.id===n&&"bg-surface-2 text-text"),children:[x.jsxs("button",{type:"button",onClick:()=>u(k.id),className:pe("flex min-w-0 items-center gap-1.5 py-1.5 pl-3.5",e.length>1||_?"pr-1":"pr-3.5"),children:[B?x.jsx(Hg,{state:B,className:"size-3"}):k.status==="working"?x.jsx("span",{className:"dot-spinner size-3"}):k.background_tasks?.length?x.jsx(Jd,{size:11,className:"shrink-0 text-faint","aria-label":"Waiting for a background task"}):null,x.jsx("span",{className:"whitespace-nowrap",children:k.title||"Untitled"}),l[k.id]?x.jsx(T5,{name:l[k.id].role}):null,Cw(k,r)?x.jsx("span",{className:"dot size-1.5 bg-accent"}):null]}),x.jsx(eP,{session:k,onOpen:()=>d(k)}),e.length>1?x.jsx("button",{type:"button",onClick:()=>h(k.id),disabled:!y||p!==null,"aria-label":`Close ${k.title||"Untitled"} chat`,className:"mr-1 flex size-6 shrink-0 items-center justify-center rounded-full text-faint transition active:bg-bg/70 active:text-text disabled:opacity-40",children:p===k.id?x.jsx(Rn,{size:12,className:"animate-spin"}):x.jsx(vn,{size:12})}):null]},k.id)})}),x.jsx("button",{type:"button",onClick:f,disabled:g,"aria-label":"New chat, same files",className:"flex size-7 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-40",children:x.jsx(ef,{size:18})})]})}function JL({title:e,busy:n,onCancel:r,onConfirm:i}){return x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-working/30 bg-working/5 px-3 py-2 text-xs",children:[x.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[x.jsx("span",{className:"font-semibold",children:e})," is still working. Close the tab anyway?"]}),x.jsx("button",{type:"button",onClick:r,disabled:n,className:"rounded-lg px-2 py-1 text-muted active:bg-surface-2",children:"Cancel"}),x.jsxs("button",{type:"button",onClick:i,disabled:n,className:"flex items-center gap-1 rounded-lg bg-del px-2 py-1 font-semibold text-black active:scale-95 disabled:opacity-50",children:[n?x.jsx(Rn,{size:12,className:"animate-spin"}):null,"Close anyway"]})]})}function eP({session:e,onOpen:n}){const r=e.context_used_percent;return typeof r!="number"||r<=0?null:x.jsxs("button",{type:"button",onClick:n,"aria-label":`Context for ${e.title||"Untitled"}: ${Math.round(r)}% used`,"aria-haspopup":"dialog",className:pe("mr-1 flex h-7 min-w-10 shrink-0 items-center justify-center rounded-full px-2 text-[11px] tabular-nums transition active:bg-bg/70",r>=80?"text-working":"text-faint"),children:[Math.round(r),"%"]})}function O5({scope:e,onChange:n}){return x.jsx("fieldset",{"aria-label":"Files shown",className:"flex shrink-0 rounded-full bg-surface-2 p-0.5 text-xs",children:["changed","all"].map(r=>x.jsx("button",{type:"button",onClick:()=>n(r),"aria-label":r==="changed"?"Changed files":"All files","aria-pressed":e===r,className:pe("rounded-full px-2.5 py-1 font-medium text-muted transition",e===r&&"bg-bg text-text shadow-sm"),children:r==="changed"?"Changed":"All"},r))})}function tP({review:e,sessionId:n,scope:r,onScopeChange:i,selectedFile:l,onSelectFile:o,onClose:u}){return x.jsxs("aside",{className:"hidden flex-col bg-bg lg:flex lg:w-[380px] lg:shrink-0 lg:border-l lg:border-border-soft xl:w-[460px]",children:[x.jsxs("header",{className:"flex items-center gap-2 border-b border-border-soft px-3 py-2.5",children:[x.jsx("span",{className:"flex-1 text-[15px] font-semibold",children:"Files"}),x.jsx(O5,{scope:r,onChange:i}),x.jsx("button",{type:"button",onClick:u,"aria-label":"Close diff panel",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsx(j5,{review:e,sessionId:n,scope:r,selectedFile:l,onSelectFile:o})]})}function nP({review:e,sessionId:n,scope:r,onScopeChange:i,selectedFile:l,onSelectFile:o,onClose:u}){return x.jsxs("section",{className:"absolute inset-0 z-20 flex flex-col bg-bg lg:hidden","aria-label":"Workspace files",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-3 py-2.5",children:[x.jsx("span",{className:"flex-1 text-[15px] font-semibold",children:"Files"}),x.jsx(O5,{scope:r,onChange:i}),x.jsx("button",{type:"button",onClick:u,"aria-label":"Close diff panel",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsx(j5,{review:e,sessionId:n,scope:r,selectedFile:l,onSelectFile:o})]})}var V0={exports:{}},rP=V0.exports,j2;function aP(){return j2||(j2=1,(function(e,n){(function(i,l){e.exports=l()})(typeof self<"u"?self:rP,function(){return(function(r){var i={};function l(o){if(i[o])return i[o].exports;var u=i[o]={i:o,l:!1,exports:{}};return r[o].call(u.exports,u,u.exports,l),u.l=!0,u.exports}return l.m=r,l.c=i,l.d=function(o,u,d){l.o(o,u)||Object.defineProperty(o,u,{configurable:!1,enumerable:!0,get:d})},l.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return l.d(u,"a",u),u},l.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},l.p="",l(l.s=3)})([(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=(function(){function u(d,f){this.width=f,this.height=d.length/f,this.data=d}return u.createEmpty=function(d,f){return new u(new Uint8ClampedArray(d*f),d)},u.prototype.get=function(d,f){return d<0||d>=this.width||f<0||f>=this.height?!1:!!this.data[f*this.width+d]},u.prototype.set=function(d,f,h){this.data[f*this.width+d]=h?1:0},u.prototype.setRegion=function(d,f,h,g,p){for(var y=f;y<f+g;y++)for(var b=d;b<d+h;b++)this.set(b,y,!!p)},u})();i.BitMatrix=o}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(2);function u(f,h){return f^h}i.addOrSubtractGF=u;var d=(function(){function f(h,g,p){this.primitive=h,this.size=g,this.generatorBase=p,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var y=1,b=0;b<this.size;b++)this.expTable[b]=y,y=y*2,y>=this.size&&(y=(y^this.primitive)&this.size-1);for(var b=0;b<this.size-1;b++)this.logTable[this.expTable[b]]=b;this.zero=new o.default(this,Uint8ClampedArray.from([0])),this.one=new o.default(this,Uint8ClampedArray.from([1]))}return f.prototype.multiply=function(h,g){return h===0||g===0?0:this.expTable[(this.logTable[h]+this.logTable[g])%(this.size-1)]},f.prototype.inverse=function(h){if(h===0)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[h]-1]},f.prototype.buildMonomial=function(h,g){if(h<0)throw new Error("Invalid monomial degree less than 0");if(g===0)return this.zero;var p=new Uint8ClampedArray(h+1);return p[0]=g,new o.default(this,p)},f.prototype.log=function(h){if(h===0)throw new Error("Can't take log(0)");return this.logTable[h]},f.prototype.exp=function(h){return this.expTable[h]},f})();i.default=d}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(1),u=(function(){function d(f,h){if(h.length===0)throw new Error("No coefficients.");this.field=f;var g=h.length;if(g>1&&h[0]===0){for(var p=1;p<g&&h[p]===0;)p++;if(p===g)this.coefficients=f.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(g-p);for(var y=0;y<this.coefficients.length;y++)this.coefficients[y]=h[p+y]}}else this.coefficients=h}return d.prototype.degree=function(){return this.coefficients.length-1},d.prototype.isZero=function(){return this.coefficients[0]===0},d.prototype.getCoefficient=function(f){return this.coefficients[this.coefficients.length-1-f]},d.prototype.addOrSubtract=function(f){var h;if(this.isZero())return f;if(f.isZero())return this;var g=this.coefficients,p=f.coefficients;g.length>p.length&&(h=[p,g],g=h[0],p=h[1]);for(var y=new Uint8ClampedArray(p.length),b=p.length-g.length,C=0;C<b;C++)y[C]=p[C];for(var C=b;C<p.length;C++)y[C]=o.addOrSubtractGF(g[C-b],p[C]);return new d(this.field,y)},d.prototype.multiply=function(f){if(f===0)return this.field.zero;if(f===1)return this;for(var h=this.coefficients.length,g=new Uint8ClampedArray(h),p=0;p<h;p++)g[p]=this.field.multiply(this.coefficients[p],f);return new d(this.field,g)},d.prototype.multiplyPoly=function(f){if(this.isZero()||f.isZero())return this.field.zero;for(var h=this.coefficients,g=h.length,p=f.coefficients,y=p.length,b=new Uint8ClampedArray(g+y-1),C=0;C<g;C++)for(var v=h[C],k=0;k<y;k++)b[C+k]=o.addOrSubtractGF(b[C+k],this.field.multiply(v,p[k]));return new d(this.field,b)},d.prototype.multiplyByMonomial=function(f,h){if(f<0)throw new Error("Invalid degree less than 0");if(h===0)return this.field.zero;for(var g=this.coefficients.length,p=new Uint8ClampedArray(g+f),y=0;y<g;y++)p[y]=this.field.multiply(this.coefficients[y],h);return new d(this.field,p)},d.prototype.evaluateAt=function(f){var h=0;if(f===0)return this.getCoefficient(0);var g=this.coefficients.length;if(f===1)return this.coefficients.forEach(function(y){h=o.addOrSubtractGF(h,y)}),h;h=this.coefficients[0];for(var p=1;p<g;p++)h=o.addOrSubtractGF(this.field.multiply(f,h),this.coefficients[p]);return h},d})();i.default=u}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(4),u=l(5),d=l(11),f=l(12);function h(y){var b=f.locate(y);if(!b)return null;for(var C=0,v=b;C<v.length;C++){var k=v[C],B=d.extract(y,k),_=u.decode(B.matrix);if(_)return{binaryData:_.bytes,data:_.text,chunks:_.chunks,version:_.version,location:{topRightCorner:B.mappingFunction(k.dimension,0),topLeftCorner:B.mappingFunction(0,0),bottomRightCorner:B.mappingFunction(k.dimension,k.dimension),bottomLeftCorner:B.mappingFunction(0,k.dimension),topRightFinderPattern:k.topRight,topLeftFinderPattern:k.topLeft,bottomLeftFinderPattern:k.bottomLeft,bottomRightAlignmentPattern:k.alignmentPattern}}}return null}var g={inversionAttempts:"attemptBoth"};function p(y,b,C,v){v===void 0&&(v={});var k=g;Object.keys(k||{}).forEach(function(R){k[R]=v[R]||k[R]});var B=k.inversionAttempts==="attemptBoth"||k.inversionAttempts==="invertFirst",_=k.inversionAttempts==="onlyInvert"||k.inversionAttempts==="invertFirst",S=o.binarize(y,b,C,B),M=S.binarized,T=S.inverted,w=h(_?T:M);return!w&&(k.inversionAttempts==="attemptBoth"||k.inversionAttempts==="invertFirst")&&(w=h(_?M:T)),w}p.default=p,i.default=p}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0),u=8,d=24;function f(p,y,b){return p<y?y:p>b?b:p}var h=(function(){function p(y,b){this.width=y,this.data=new Uint8ClampedArray(y*b)}return p.prototype.get=function(y,b){return this.data[b*this.width+y]},p.prototype.set=function(y,b,C){this.data[b*this.width+y]=C},p})();function g(p,y,b,C){if(p.length!==y*b*4)throw new Error("Malformed data passed to binarizer.");for(var v=new h(y,b),k=0;k<y;k++)for(var B=0;B<b;B++){var _=p[(B*y+k)*4+0],S=p[(B*y+k)*4+1],M=p[(B*y+k)*4+2];v.set(k,B,.2126*_+.7152*S+.0722*M)}for(var T=Math.ceil(y/u),w=Math.ceil(b/u),R=new h(T,w),L=0;L<w;L++)for(var I=0;I<T;I++){for(var O=0,$=1/0,Q=0,B=0;B<u;B++)for(var k=0;k<u;k++){var le=v.get(I*u+k,L*u+B);O+=le,$=Math.min($,le),Q=Math.max(Q,le)}var W=O/Math.pow(u,2);if(Q-$<=d&&(W=$/2,L>0&&I>0)){var Y=(R.get(I,L-1)+2*R.get(I-1,L)+R.get(I-1,L-1))/4;$<Y&&(W=Y)}R.set(I,L,W)}var P=o.BitMatrix.createEmpty(y,b),V=null;C&&(V=o.BitMatrix.createEmpty(y,b));for(var L=0;L<w;L++)for(var I=0;I<T;I++){for(var X=f(I,2,T-3),fe=f(L,2,w-3),O=0,j=-2;j<=2;j++)for(var z=-2;z<=2;z++)O+=R.get(X+j,fe+z);for(var Z=O/25,j=0;j<u;j++)for(var z=0;z<u;z++){var k=I*u+j,B=L*u+z,F=v.get(k,B);P.set(k,B,F<=Z),C&&V.set(k,B,!(F<=Z))}}return C?{binarized:P,inverted:V}:{binarized:P}}i.binarize=g}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0),u=l(6),d=l(9),f=l(10);function h(M,T){for(var w=M^T,R=0;w;)R++,w&=w-1;return R}function g(M,T){return T<<1|M}var p=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],y=[function(M){return(M.y+M.x)%2===0},function(M){return M.y%2===0},function(M){return M.x%3===0},function(M){return(M.y+M.x)%3===0},function(M){return(Math.floor(M.y/2)+Math.floor(M.x/3))%2===0},function(M){return M.x*M.y%2+M.x*M.y%3===0},function(M){return(M.y*M.x%2+M.y*M.x%3)%2===0},function(M){return((M.y+M.x)%2+M.y*M.x%3)%2===0}];function b(M){var T=17+4*M.versionNumber,w=o.BitMatrix.createEmpty(T,T);w.setRegion(0,0,9,9,!0),w.setRegion(T-8,0,8,9,!0),w.setRegion(0,T-8,9,8,!0);for(var R=0,L=M.alignmentPatternCenters;R<L.length;R++)for(var I=L[R],O=0,$=M.alignmentPatternCenters;O<$.length;O++){var Q=$[O];I===6&&Q===6||I===6&&Q===T-7||I===T-7&&Q===6||w.setRegion(I-2,Q-2,5,5,!0)}return w.setRegion(6,9,1,T-17,!0),w.setRegion(9,6,T-17,1,!0),M.versionNumber>6&&(w.setRegion(T-11,0,3,6,!0),w.setRegion(0,T-11,6,3,!0)),w}function C(M,T,w){for(var R=y[w.dataMask],L=M.height,I=b(T),O=[],$=0,Q=0,le=!0,W=L-1;W>0;W-=2){W===6&&W--;for(var Y=0;Y<L;Y++)for(var P=le?L-1-Y:Y,V=0;V<2;V++){var X=W-V;if(!I.get(X,P)){Q++;var fe=M.get(X,P);R({y:P,x:X})&&(fe=!fe),$=g(fe,$),Q===8&&(O.push($),Q=0,$=0)}}le=!le}return O}function v(M){var T=M.height,w=Math.floor((T-17)/4);if(w<=6)return f.VERSIONS[w-1];for(var R=0,L=5;L>=0;L--)for(var I=T-9;I>=T-11;I--)R=g(M.get(I,L),R);for(var O=0,I=5;I>=0;I--)for(var L=T-9;L>=T-11;L--)O=g(M.get(I,L),O);for(var $=1/0,Q,le=0,W=f.VERSIONS;le<W.length;le++){var Y=W[le];if(Y.infoBits===R||Y.infoBits===O)return Y;var P=h(R,Y.infoBits);P<$&&(Q=Y,$=P),P=h(O,Y.infoBits),P<$&&(Q=Y,$=P)}if($<=3)return Q}function k(M){for(var T=0,w=0;w<=8;w++)w!==6&&(T=g(M.get(w,8),T));for(var R=7;R>=0;R--)R!==6&&(T=g(M.get(8,R),T));for(var L=M.height,I=0,R=L-1;R>=L-7;R--)I=g(M.get(8,R),I);for(var w=L-8;w<L;w++)I=g(M.get(w,8),I);for(var O=1/0,$=null,Q=0,le=p;Q<le.length;Q++){var W=le[Q],Y=W.bits,P=W.formatInfo;if(Y===T||Y===I)return P;var V=h(T,Y);V<O&&($=P,O=V),T!==I&&(V=h(I,Y),V<O&&($=P,O=V))}return O<=3?$:null}function B(M,T,w){var R=T.errorCorrectionLevels[w],L=[],I=0;if(R.ecBlocks.forEach(function(fe){for(var j=0;j<fe.numBlocks;j++)L.push({numDataCodewords:fe.dataCodewordsPerBlock,codewords:[]}),I+=fe.dataCodewordsPerBlock+R.ecCodewordsPerBlock}),M.length<I)return null;M=M.slice(0,I);for(var O=R.ecBlocks[0].dataCodewordsPerBlock,$=0;$<O;$++)for(var Q=0,le=L;Q<le.length;Q++){var W=le[Q];W.codewords.push(M.shift())}if(R.ecBlocks.length>1)for(var Y=R.ecBlocks[0].numBlocks,P=R.ecBlocks[1].numBlocks,$=0;$<P;$++)L[Y+$].codewords.push(M.shift());for(;M.length>0;)for(var V=0,X=L;V<X.length;V++){var W=X[V];W.codewords.push(M.shift())}return L}function _(M){var T=v(M);if(!T)return null;var w=k(M);if(!w)return null;var R=C(M,T,w),L=B(R,T,w.errorCorrectionLevel);if(!L)return null;for(var I=L.reduce(function(V,X){return V+X.numDataCodewords},0),O=new Uint8ClampedArray(I),$=0,Q=0,le=L;Q<le.length;Q++){var W=le[Q],Y=d.decode(W.codewords,W.codewords.length-W.numDataCodewords);if(!Y)return null;for(var P=0;P<W.numDataCodewords;P++)O[$++]=Y[P]}try{return u.decode(O,T.versionNumber)}catch{return null}}function S(M){if(M==null)return null;var T=_(M);if(T)return T;for(var w=0;w<M.width;w++)for(var R=w+1;R<M.height;R++)M.get(w,R)!==M.get(R,w)&&(M.set(w,R,!M.get(w,R)),M.set(R,w,!M.get(R,w)));return _(M)}i.decode=S}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(7),u=l(8),d;(function(v){v.Numeric="numeric",v.Alphanumeric="alphanumeric",v.Byte="byte",v.Kanji="kanji",v.ECI="eci"})(d=i.Mode||(i.Mode={}));var f;(function(v){v[v.Terminator=0]="Terminator",v[v.Numeric=1]="Numeric",v[v.Alphanumeric=2]="Alphanumeric",v[v.Byte=4]="Byte",v[v.Kanji=8]="Kanji",v[v.ECI=7]="ECI"})(f||(f={}));function h(v,k){for(var B=[],_="",S=[10,12,14][k],M=v.readBits(S);M>=3;){var T=v.readBits(10);if(T>=1e3)throw new Error("Invalid numeric value above 999");var w=Math.floor(T/100),R=Math.floor(T/10)%10,L=T%10;B.push(48+w,48+R,48+L),_+=w.toString()+R.toString()+L.toString(),M-=3}if(M===2){var T=v.readBits(7);if(T>=100)throw new Error("Invalid numeric value above 99");var w=Math.floor(T/10),R=T%10;B.push(48+w,48+R),_+=w.toString()+R.toString()}else if(M===1){var T=v.readBits(4);if(T>=10)throw new Error("Invalid numeric value above 9");B.push(48+T),_+=T.toString()}return{bytes:B,text:_}}var g=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function p(v,k){for(var B=[],_="",S=[9,11,13][k],M=v.readBits(S);M>=2;){var T=v.readBits(11),w=Math.floor(T/45),R=T%45;B.push(g[w].charCodeAt(0),g[R].charCodeAt(0)),_+=g[w]+g[R],M-=2}if(M===1){var w=v.readBits(6);B.push(g[w].charCodeAt(0)),_+=g[w]}return{bytes:B,text:_}}function y(v,k){for(var B=[],_="",S=[8,16,16][k],M=v.readBits(S),T=0;T<M;T++){var w=v.readBits(8);B.push(w)}try{_+=decodeURIComponent(B.map(function(R){return"%"+("0"+R.toString(16)).substr(-2)}).join(""))}catch{}return{bytes:B,text:_}}function b(v,k){for(var B=[],_="",S=[8,10,12][k],M=v.readBits(S),T=0;T<M;T++){var w=v.readBits(13),R=Math.floor(w/192)<<8|w%192;R<7936?R+=33088:R+=49472,B.push(R>>8,R&255),_+=String.fromCharCode(u.shiftJISTable[R])}return{bytes:B,text:_}}function C(v,k){for(var B,_,S,M,T=new o.BitStream(v),w=k<=9?0:k<=26?1:2,R={text:"",bytes:[],chunks:[],version:k};T.available()>=4;){var L=T.readBits(4);if(L===f.Terminator)return R;if(L===f.ECI)T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(7)}):T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(14)}):T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(21)}):R.chunks.push({type:d.ECI,assignmentNumber:-1});else if(L===f.Numeric){var I=h(T,w);R.text+=I.text,(B=R.bytes).push.apply(B,I.bytes),R.chunks.push({type:d.Numeric,text:I.text})}else if(L===f.Alphanumeric){var O=p(T,w);R.text+=O.text,(_=R.bytes).push.apply(_,O.bytes),R.chunks.push({type:d.Alphanumeric,text:O.text})}else if(L===f.Byte){var $=y(T,w);R.text+=$.text,(S=R.bytes).push.apply(S,$.bytes),R.chunks.push({type:d.Byte,bytes:$.bytes,text:$.text})}else if(L===f.Kanji){var Q=b(T,w);R.text+=Q.text,(M=R.bytes).push.apply(M,Q.bytes),R.chunks.push({type:d.Kanji,bytes:Q.bytes,text:Q.text})}}if(T.available()===0||T.readBits(T.available())===0)return R}i.decode=C}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=(function(){function u(d){this.byteOffset=0,this.bitOffset=0,this.bytes=d}return u.prototype.readBits=function(d){if(d<1||d>32||d>this.available())throw new Error("Cannot read "+d.toString()+" bits");var f=0;if(this.bitOffset>0){var h=8-this.bitOffset,g=d<h?d:h,p=h-g,y=255>>8-g<<p;f=(this.bytes[this.byteOffset]&y)>>p,d-=g,this.bitOffset+=g,this.bitOffset===8&&(this.bitOffset=0,this.byteOffset++)}if(d>0){for(;d>=8;)f=f<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,d-=8;if(d>0){var p=8-d,y=255>>p<<p;f=f<<d|(this.bytes[this.byteOffset]&y)>>p,this.bitOffset+=d}}return f},u.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},u})();i.BitStream=o}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0}),i.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(1),u=l(2);function d(p,y,b,C){var v;y.degree()<b.degree()&&(v=[b,y],y=v[0],b=v[1]);for(var k=y,B=b,_=p.zero,S=p.one;B.degree()>=C/2;){var M=k,T=_;if(k=B,_=S,k.isZero())return null;B=M;for(var w=p.zero,R=k.getCoefficient(k.degree()),L=p.inverse(R);B.degree()>=k.degree()&&!B.isZero();){var I=B.degree()-k.degree(),O=p.multiply(B.getCoefficient(B.degree()),L);w=w.addOrSubtract(p.buildMonomial(I,O)),B=B.addOrSubtract(k.multiplyByMonomial(I,O))}if(S=w.multiplyPoly(_).addOrSubtract(T),B.degree()>=k.degree())return null}var $=S.getCoefficient(0);if($===0)return null;var Q=p.inverse($);return[S.multiply(Q),B.multiply(Q)]}function f(p,y){var b=y.degree();if(b===1)return[y.getCoefficient(1)];for(var C=new Array(b),v=0,k=1;k<p.size&&v<b;k++)y.evaluateAt(k)===0&&(C[v]=p.inverse(k),v++);return v!==b?null:C}function h(p,y,b){for(var C=b.length,v=new Array(C),k=0;k<C;k++){for(var B=p.inverse(b[k]),_=1,S=0;S<C;S++)k!==S&&(_=p.multiply(_,o.addOrSubtractGF(1,p.multiply(b[S],B))));v[k]=p.multiply(y.evaluateAt(B),p.inverse(_)),p.generatorBase!==0&&(v[k]=p.multiply(v[k],B))}return v}function g(p,y){var b=new Uint8ClampedArray(p.length);b.set(p);for(var C=new o.default(285,256,0),v=new u.default(C,b),k=new Uint8ClampedArray(y),B=!1,_=0;_<y;_++){var S=v.evaluateAt(C.exp(_+C.generatorBase));k[k.length-1-_]=S,S!==0&&(B=!0)}if(!B)return b;var M=new u.default(C,k),T=d(C,C.buildMonomial(y,1),M,y);if(T===null)return null;var w=f(C,T[0]);if(w==null)return null;for(var R=h(C,T[1],w),L=0;L<w.length;L++){var I=b.length-1-C.log(w[L]);if(I<0)return null;b[I]=o.addOrSubtractGF(b[I],R[L])}return b}i.decode=g}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0}),i.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0);function u(g,p,y,b){var C=g.x-p.x+y.x-b.x,v=g.y-p.y+y.y-b.y;if(C===0&&v===0)return{a11:p.x-g.x,a12:p.y-g.y,a13:0,a21:y.x-p.x,a22:y.y-p.y,a23:0,a31:g.x,a32:g.y,a33:1};var k=p.x-y.x,B=b.x-y.x,_=p.y-y.y,S=b.y-y.y,M=k*S-B*_,T=(C*S-B*v)/M,w=(k*v-C*_)/M;return{a11:p.x-g.x+T*p.x,a12:p.y-g.y+T*p.y,a13:T,a21:b.x-g.x+w*b.x,a22:b.y-g.y+w*b.y,a23:w,a31:g.x,a32:g.y,a33:1}}function d(g,p,y,b){var C=u(g,p,y,b);return{a11:C.a22*C.a33-C.a23*C.a32,a12:C.a13*C.a32-C.a12*C.a33,a13:C.a12*C.a23-C.a13*C.a22,a21:C.a23*C.a31-C.a21*C.a33,a22:C.a11*C.a33-C.a13*C.a31,a23:C.a13*C.a21-C.a11*C.a23,a31:C.a21*C.a32-C.a22*C.a31,a32:C.a12*C.a31-C.a11*C.a32,a33:C.a11*C.a22-C.a12*C.a21}}function f(g,p){return{a11:g.a11*p.a11+g.a21*p.a12+g.a31*p.a13,a12:g.a12*p.a11+g.a22*p.a12+g.a32*p.a13,a13:g.a13*p.a11+g.a23*p.a12+g.a33*p.a13,a21:g.a11*p.a21+g.a21*p.a22+g.a31*p.a23,a22:g.a12*p.a21+g.a22*p.a22+g.a32*p.a23,a23:g.a13*p.a21+g.a23*p.a22+g.a33*p.a23,a31:g.a11*p.a31+g.a21*p.a32+g.a31*p.a33,a32:g.a12*p.a31+g.a22*p.a32+g.a32*p.a33,a33:g.a13*p.a31+g.a23*p.a32+g.a33*p.a33}}function h(g,p){for(var y=d({x:3.5,y:3.5},{x:p.dimension-3.5,y:3.5},{x:p.dimension-6.5,y:p.dimension-6.5},{x:3.5,y:p.dimension-3.5}),b=u(p.topLeft,p.topRight,p.alignmentPattern,p.bottomLeft),C=f(b,y),v=o.BitMatrix.createEmpty(p.dimension,p.dimension),k=function(w,R){var L=C.a13*w+C.a23*R+C.a33;return{x:(C.a11*w+C.a21*R+C.a31)/L,y:(C.a12*w+C.a22*R+C.a32)/L}},B=0;B<p.dimension;B++)for(var _=0;_<p.dimension;_++){var S=_+.5,M=B+.5,T=k(S,M);v.set(_,B,g.get(Math.floor(T.x),Math.floor(T.y)))}return{matrix:v,mappingFunction:k}}i.extract=h}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=4,u=.5,d=1.5,f=function(S,M){return Math.sqrt(Math.pow(M.x-S.x,2)+Math.pow(M.y-S.y,2))};function h(S){return S.reduce(function(M,T){return M+T})}function g(S,M,T){var w,R,L,I,O=f(S,M),$=f(M,T),Q=f(S,T),le,W,Y;return $>=O&&$>=Q?(w=[M,S,T],le=w[0],W=w[1],Y=w[2]):Q>=$&&Q>=O?(R=[S,M,T],le=R[0],W=R[1],Y=R[2]):(L=[S,T,M],le=L[0],W=L[1],Y=L[2]),(Y.x-W.x)*(le.y-W.y)-(Y.y-W.y)*(le.x-W.x)<0&&(I=[Y,le],le=I[0],Y=I[1]),{bottomLeft:le,topLeft:W,topRight:Y}}function p(S,M,T,w){var R=(h(b(S,T,w,5))/7+h(b(S,M,w,5))/7+h(b(T,S,w,5))/7+h(b(M,S,w,5))/7)/4;if(R<1)throw new Error("Invalid module size");var L=Math.round(f(S,M)/R),I=Math.round(f(S,T)/R),O=Math.floor((L+I)/2)+7;switch(O%4){case 0:O++;break;case 2:O--;break}return{dimension:O,moduleSize:R}}function y(S,M,T,w){var R=[{x:Math.floor(S.x),y:Math.floor(S.y)}],L=Math.abs(M.y-S.y)>Math.abs(M.x-S.x),I,O,$,Q;L?(I=Math.floor(S.y),O=Math.floor(S.x),$=Math.floor(M.y),Q=Math.floor(M.x)):(I=Math.floor(S.x),O=Math.floor(S.y),$=Math.floor(M.x),Q=Math.floor(M.y));for(var le=Math.abs($-I),W=Math.abs(Q-O),Y=Math.floor(-le/2),P=I<$?1:-1,V=O<Q?1:-1,X=!0,fe=I,j=O;fe!==$+P;fe+=P){var z=L?j:fe,Z=L?fe:j;if(T.get(z,Z)!==X&&(X=!X,R.push({x:z,y:Z}),R.length===w+1))break;if(Y+=W,Y>0){if(j===Q)break;j+=V,Y-=le}}for(var F=[],te=0;te<w;te++)R[te]&&R[te+1]?F.push(f(R[te],R[te+1])):F.push(0);return F}function b(S,M,T,w){var R,L=M.y-S.y,I=M.x-S.x,O=y(S,M,T,Math.ceil(w/2)),$=y(S,{x:S.x-I,y:S.y-L},T,Math.ceil(w/2)),Q=O.shift()+$.shift()-1;return(R=$.concat(Q)).concat.apply(R,O)}function C(S,M){var T=h(S)/h(M),w=0;return M.forEach(function(R,L){w+=Math.pow(S[L]-R*T,2)}),{averageSize:T,error:w}}function v(S,M,T){try{var w=b(S,{x:-1,y:S.y},T,M.length),R=b(S,{x:S.x,y:-1},T,M.length),L={x:Math.max(0,S.x-S.y)-1,y:Math.max(0,S.y-S.x)-1},I=b(S,L,T,M.length),O={x:Math.min(T.width,S.x+S.y)+1,y:Math.min(T.height,S.y+S.x)+1},$=b(S,O,T,M.length),Q=C(w,M),le=C(R,M),W=C(I,M),Y=C($,M),P=Math.sqrt(Q.error*Q.error+le.error*le.error+W.error*W.error+Y.error*Y.error),V=(Q.averageSize+le.averageSize+W.averageSize+Y.averageSize)/4,X=(Math.pow(Q.averageSize-V,2)+Math.pow(le.averageSize-V,2)+Math.pow(W.averageSize-V,2)+Math.pow(Y.averageSize-V,2))/V;return P+X}catch{return 1/0}}function k(S,M){for(var T=Math.round(M.x);S.get(T,Math.round(M.y));)T--;for(var w=Math.round(M.x);S.get(w,Math.round(M.y));)w++;for(var R=(T+w)/2,L=Math.round(M.y);S.get(Math.round(R),L);)L--;for(var I=Math.round(M.y);S.get(Math.round(R),I);)I++;var O=(L+I)/2;return{x:R,y:O}}function B(S){for(var M=[],T=[],w=[],R=[],L=function(z){for(var Z=0,F=!1,te=[0,0,0,0,0],ae=function(ve){var Ge=S.get(ve,z);if(Ge===F)Z++;else{te=[te[1],te[2],te[3],te[4],Z],Z=1,F=Ge;var me=h(te)/7,nt=Math.abs(te[0]-me)<me&&Math.abs(te[1]-me)<me&&Math.abs(te[2]-3*me)<3*me&&Math.abs(te[3]-me)<me&&Math.abs(te[4]-me)<me&&!Ge,ot=h(te.slice(-3))/3,$t=Math.abs(te[2]-ot)<ot&&Math.abs(te[3]-ot)<ot&&Math.abs(te[4]-ot)<ot&&Ge;if(nt){var Ct=ve-te[3]-te[4],we=Ct-te[2],ke={startX:we,endX:Ct,y:z},Je=T.filter(function(vt){return we>=vt.bottom.startX&&we<=vt.bottom.endX||Ct>=vt.bottom.startX&&we<=vt.bottom.endX||we<=vt.bottom.startX&&Ct>=vt.bottom.endX&&te[2]/(vt.bottom.endX-vt.bottom.startX)<d&&te[2]/(vt.bottom.endX-vt.bottom.startX)>u});Je.length>0?Je[0].bottom=ke:T.push({top:ke,bottom:ke})}if($t){var pt=ve-te[4],rt=pt-te[3],ke={startX:rt,y:z,endX:pt},Je=R.filter(function(it){return rt>=it.bottom.startX&&rt<=it.bottom.endX||pt>=it.bottom.startX&&rt<=it.bottom.endX||rt<=it.bottom.startX&&pt>=it.bottom.endX&&te[2]/(it.bottom.endX-it.bottom.startX)<d&&te[2]/(it.bottom.endX-it.bottom.startX)>u});Je.length>0?Je[0].bottom=ke:R.push({top:ke,bottom:ke})}}},xe=-1;xe<=S.width;xe++)ae(xe);M.push.apply(M,T.filter(function(ve){return ve.bottom.y!==z&&ve.bottom.y-ve.top.y>=2})),T=T.filter(function(ve){return ve.bottom.y===z}),w.push.apply(w,R.filter(function(ve){return ve.bottom.y!==z})),R=R.filter(function(ve){return ve.bottom.y===z})},I=0;I<=S.height;I++)L(I);M.push.apply(M,T.filter(function(z){return z.bottom.y-z.top.y>=2})),w.push.apply(w,R);var O=M.filter(function(z){return z.bottom.y-z.top.y>=2}).map(function(z){var Z=(z.top.startX+z.top.endX+z.bottom.startX+z.bottom.endX)/4,F=(z.top.y+z.bottom.y+1)/2;if(S.get(Math.round(Z),Math.round(F))){var te=[z.top.endX-z.top.startX,z.bottom.endX-z.bottom.startX,z.bottom.y-z.top.y+1],ae=h(te)/te.length,xe=v({x:Math.round(Z),y:Math.round(F)},[1,1,3,1,1],S);return{score:xe,x:Z,y:F,size:ae}}}).filter(function(z){return!!z}).sort(function(z,Z){return z.score-Z.score}).map(function(z,Z,F){if(Z>o)return null;var te=F.filter(function(xe,ve){return Z!==ve}).map(function(xe){return{x:xe.x,y:xe.y,score:xe.score+Math.pow(xe.size-z.size,2)/z.size,size:xe.size}}).sort(function(xe,ve){return xe.score-ve.score});if(te.length<2)return null;var ae=z.score+te[0].score+te[1].score;return{points:[z].concat(te.slice(0,2)),score:ae}}).filter(function(z){return!!z}).sort(function(z,Z){return z.score-Z.score});if(O.length===0)return null;var $=g(O[0].points[0],O[0].points[1],O[0].points[2]),Q=$.topRight,le=$.topLeft,W=$.bottomLeft,Y=_(S,w,Q,le,W),P=[];Y&&P.push({alignmentPattern:{x:Y.alignmentPattern.x,y:Y.alignmentPattern.y},bottomLeft:{x:W.x,y:W.y},dimension:Y.dimension,topLeft:{x:le.x,y:le.y},topRight:{x:Q.x,y:Q.y}});var V=k(S,Q),X=k(S,le),fe=k(S,W),j=_(S,w,V,X,fe);return j&&P.push({alignmentPattern:{x:j.alignmentPattern.x,y:j.alignmentPattern.y},bottomLeft:{x:fe.x,y:fe.y},topLeft:{x:X.x,y:X.y},topRight:{x:V.x,y:V.y},dimension:j.dimension}),P.length===0?null:P}i.locate=B;function _(S,M,T,w,R){var L,I,O;try{L=p(w,T,R,S),I=L.dimension,O=L.moduleSize}catch{return null}var $={x:T.x-w.x+R.x,y:T.y-w.y+R.y},Q=(f(w,R)+f(w,T))/2/O,le=1-3/Q,W={x:w.x+le*($.x-w.x),y:w.y+le*($.y-w.y)},Y=M.map(function(V){var X=(V.top.startX+V.top.endX+V.bottom.startX+V.bottom.endX)/4,fe=(V.top.y+V.bottom.y+1)/2;if(S.get(Math.floor(X),Math.floor(fe))){var j=[V.top.endX-V.top.startX,V.bottom.endX-V.bottom.startX,V.bottom.y-V.top.y+1];h(j)/j.length;var z=v({x:Math.floor(X),y:Math.floor(fe)},[1,1,1],S),Z=z+f({x:X,y:fe},W);return{x:X,y:fe,score:Z}}}).filter(function(V){return!!V}).sort(function(V,X){return V.score-X.score}),P=Q>=15&&Y.length?Y[0]:W;return{alignmentPattern:P,dimension:I}}})]).default})})(V0)),V0.exports}var iP=aP();const sP=Wl(iP);function lP({onResult:e,onClose:n}){const r=D.useRef(null),[i,l]=D.useState(null);return D.useEffect(()=>{let o=null,u=0,d=!1;const f=document.createElement("canvas"),h=f.getContext("2d",{willReadFrequently:!0}),g=()=>{const p=r.current;if(!(d||!p||!h)){if(p.readyState>=p.HAVE_ENOUGH_DATA&&p.videoWidth){f.width=p.videoWidth,f.height=p.videoHeight,h.drawImage(p,0,0,f.width,f.height);const{data:y,width:b,height:C}=h.getImageData(0,0,f.width,f.height),v=sP(y,b,C,{inversionAttempts:"dontInvert"});if(v?.data){d=!0,e(v.data);return}}u=requestAnimationFrame(g)}};return navigator.mediaDevices?.getUserMedia({video:{facingMode:"environment"}}).then(p=>{if(d){for(const b of p.getTracks())b.stop();return}o=p;const y=r.current;y&&(y.srcObject=p,y.play(),u=requestAnimationFrame(g))}).catch(p=>l(oP(p))),()=>{if(d=!0,cancelAnimationFrame(u),o)for(const p of o.getTracks())p.stop()}},[e]),x.jsxs("div",{className:"fixed inset-0 z-[60] bg-black",children:[x.jsx("video",{ref:r,muted:!0,playsInline:!0,className:"h-full w-full object-cover"}),x.jsx("div",{className:"pointer-events-none absolute inset-0 grid place-items-center",children:x.jsx("div",{className:"size-60 max-w-[70vw] rounded-3xl border-2 border-white/80 shadow-[0_0_0_100vmax_rgba(0,0,0,0.5)]"})}),x.jsxs("div",{className:"pt-safe absolute inset-x-0 top-0 flex items-center justify-between p-4",children:[x.jsx("span",{className:"rounded-full bg-black/50 px-3 py-1 text-sm text-white",children:"Point at the relay QR"}),x.jsx("button",{type:"button",onClick:n,"aria-label":"Cancel scan",className:"flex size-9 items-center justify-center rounded-full bg-black/50 text-white active:bg-black/70",children:x.jsx(vn,{size:20})})]}),i?x.jsx("div",{className:"pb-safe absolute inset-x-0 bottom-0 bg-black/75 p-4 text-center text-sm leading-relaxed text-white",children:i}):null]})}function oP(e){const n=e instanceof DOMException?e.name:"";return n==="NotAllowedError"?"Camera permission denied. Allow camera access, or paste the token instead.":n==="NotFoundError"||n==="OverconstrainedError"?"No camera found — paste the token instead.":window.isSecureContext?`Camera unavailable (${e instanceof Error?e.message:String(e)}). Paste the token instead.`:"The camera needs HTTPS. Open the relay’s https:// URL, or paste the token."}function cP(){const e=De(h=>h.setToken),[n,r]=D.useState(""),[i,l]=D.useState(!1),[o,u]=D.useState(!1),d=h=>{const g=aw(h);u(!1),g?e(g):l(!0)},f=h=>{h.preventDefault(),d(n)};return o?x.jsx(lP,{onResult:d,onClose:()=>u(!1)}):x.jsxs("div",{className:"pt-safe pb-safe flex h-full flex-col items-center justify-center gap-5 overflow-y-auto px-8 text-center",children:[x.jsx("img",{src:"/icon.svg",alt:"",className:"size-20 rounded-3xl"}),x.jsxs("div",{children:[x.jsx("h1",{className:"text-xl font-semibold",children:"Conductor Remote"}),x.jsx("p",{className:"mt-1 text-sm text-muted",children:"Phone control panel for your local agents"})]}),x.jsxs("p",{className:"max-w-xs text-sm leading-relaxed text-muted",children:["Open the URL the relay printed on startup — it carries your access token (",x.jsx("span",{className:"font-mono text-faint",children:"/#token=…"}),"). Then use"," ",x.jsx("b",{className:"text-text",children:"Add to Home Screen"})," to install it."]}),x.jsxs("form",{onSubmit:f,className:"flex w-full max-w-xs flex-col gap-2",children:[x.jsx("input",{type:"text",inputMode:"text",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:n,onChange:h=>{r(h.target.value),l(!1)},placeholder:"Paste token or URL","aria-label":"Access token or URL",className:"rounded-xl border border-border bg-surface-2 px-3 py-2.5 text-center font-mono text-base text-text placeholder:font-sans placeholder:text-faint"}),x.jsx("button",{type:"submit",className:"pill pill-active justify-center py-2.5",children:"Connect"}),x.jsxs("button",{type:"button",onClick:()=>{l(!1),u(!0)},className:"pill justify-center gap-2 py-2.5",children:[x.jsx(L8,{size:16}),"Scan QR"]}),i?x.jsx("p",{className:"text-xs",style:{color:"var(--color-del)"},children:"Couldn’t find a token in that — paste the token or the full URL, or scan the QR."}):null]}),x.jsxs("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:["Lost it? Run ",x.jsx("span",{className:"font-mono",children:"yarn service status"})," on your Mac to reprint the QR, then scan it above — no need to retype anything."]})]})}const Jx={voice:"marin",language:"auto"},z5="conductor-remote-voice";function uP(e=localStorage){try{const n=JSON.parse(e.getItem(z5)??"{}");return{voice:YD(n.voice)?n.voice:Jx.voice,language:KD(n.language)?n.language:Jx.language}}catch{return Jx}}function xP(e,n=localStorage){try{n.setItem(z5,JSON.stringify(e))}catch{}}function vr(e,n){return typeof e[n]=="string"?e[n]:null}function dP(e){let n=e;if(typeof n=="string")try{n=JSON.parse(n)}catch{return null}if(!n||typeof n!="object")return null;const r=n,i=vr(r,"type"),l=vr(r,"item_id")??vr(r,"call_id")??"voice-item";if(i==="conversation.item.input_audio_transcription.delta"){const o=vr(r,"delta");return o===null?null:{kind:"input-delta",itemId:l,text:o}}if(i==="conversation.item.input_audio_transcription.completed"){const o=vr(r,"transcript");return o===null?null:{kind:"input-done",itemId:l,text:o}}if(i==="response.output_audio_transcript.delta"||i==="response.audio_transcript.delta"){const o=vr(r,"delta");return o===null?null:{kind:"output-delta",itemId:l,text:o}}if(i==="response.output_audio_transcript.done"||i==="response.audio_transcript.done"){const o=vr(r,"transcript");return o===null?null:{kind:"output-done",itemId:l,text:o}}if(i==="response.output_text.delta"){const o=vr(r,"delta");return o===null?null:{kind:"output-delta",itemId:l,text:o}}if(i==="response.output_text.done"){const o=vr(r,"text");return o===null?null:{kind:"output-done",itemId:l,text:o}}if(i==="response.function_call_arguments.done"){const o=vr(r,"name");return o===null?null:{kind:"tool",itemId:l,name:o}}if(i==="input_audio_buffer.speech_started")return{kind:"speech-started"};if(i==="response.created")return{kind:"response-started"};if(i==="response.done"){const o=r.response&&typeof r.response=="object"?r.response:null,u=o?.error&&typeof o.error=="object"?o.error:null,d=u?vr(u,"message"):null;return d?{kind:"response-done",error:d}:{kind:"response-done"}}if(i==="error"){const o=r.error&&typeof r.error=="object"?r.error:null;return{kind:"error",text:o&&vr(o,"message")||"Voice call failed"}}return null}function fP(e){switch(e){case"voice_roll_call":return"Checking the fleet";case"voice_workspace_overview":return"Refreshing workspace overview";case"voice_next_decision":return"Opening the next decision";case"voice_send_preview":return"Preparing a guarded send";case"voice_send":return"Queueing the approved prompt";default:return"Working with the relay"}}const L5=D.createContext(null);function P0(e){return[...e.values()].join(" ").trimStart()}function hP(e){return e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="SecurityError")}function pP({children:e}){const[n,r]=D.useState(!1),[i,l]=D.useState("idle"),[o,u]=D.useState(!1),[d,f]=D.useState(null),[h,g]=D.useState([]),[p,y]=D.useState(""),[b,C]=D.useState(""),[v,k]=D.useState(uP),B=D.useRef("idle"),_=D.useRef(v),S=D.useRef(0),M=D.useRef(null),T=D.useRef(null),w=D.useRef(null),R=D.useRef(null),L=D.useRef(null),I=D.useRef(null),O=D.useRef(new Map),$=D.useRef(new Map),Q=D.useRef(new Set),le=D.useRef(new Set),W=D.useRef(new Set),Y=D.useRef(null);_.current=v;const P=D.useCallback(we=>{B.current=we,l(we)},[]),V=D.useCallback(we=>{g(ke=>ke.some(Je=>Je.id===we.id)?ke:[...ke,we])},[]),X=D.useCallback(()=>{O.current.clear(),$.current.clear(),y(""),C("")},[]),fe=D.useCallback(()=>{S.current+=1,Y.current&&clearTimeout(Y.current),Y.current=null;try{T.current?.close()}catch{}try{M.current?.close()}catch{}for(const we of w.current?.getTracks()??[])we.stop();L.current&&(L.current.srcObject=null),M.current=null,T.current=null,w.current=null,R.current=null,L.current=null,I.current=null,X()},[X]),j=D.useCallback(we=>{const ke=I.current;fe(),u(!1),P("idle"),f(we),ke&&Ne.voiceCallEnd(ke).catch(()=>{})},[fe,P]),z=D.useCallback(we=>{const ke=dP(we);if(ke)switch(ke.kind){case"input-delta":O.current.set(ke.itemId,(O.current.get(ke.itemId)??"")+ke.text),y(P0(O.current));return;case"input-done":{O.current.delete(ke.itemId),y(P0(O.current)),!Q.current.has(ke.itemId)&&ke.text.trim()&&(Q.current.add(ke.itemId),V({id:`user:${ke.itemId}`,role:"user",text:ke.text.trim()})),B.current!=="speaking"&&P("thinking");return}case"output-delta":$.current.set(ke.itemId,($.current.get(ke.itemId)??"")+ke.text),C(P0($.current)),P("speaking");return;case"output-done":{const Je=(ke.text||$.current.get(ke.itemId)||"").trim();$.current.delete(ke.itemId),C(P0($.current)),!le.current.has(ke.itemId)&&Je&&(le.current.add(ke.itemId),V({id:`assistant:${ke.itemId}`,role:"assistant",text:Je}));return}case"tool":W.current.has(ke.itemId)||(W.current.add(ke.itemId),V({id:`tool:${ke.itemId}`,role:"activity",text:fP(ke.name)})),P("thinking");return;case"speech-started":P("listening");return;case"response-started":P("thinking");return;case"response-done":ke.error&&f(ke.error),P("connected");return;case"error":f(ke.text),B.current!=="idle"&&P("connected")}},[V,P]),Z=D.useCallback(async()=>{if(B.current!=="idle")return;if(typeof RTCPeerConnection>"u"||!navigator.mediaDevices?.getUserMedia){f("This browser does not support WebRTC calling");return}r(!0),f(null),g([]),X(),Q.current.clear(),le.current.clear(),W.current.clear(),u(!1),P("connecting");const we=++S.current;try{const ke=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(we!==S.current){for(const Ze of ke.getTracks())Ze.stop();return}const Je=ke.getAudioTracks()[0];if(!Je)throw new Error("No microphone was available");Je.enabled=!1,w.current=ke,R.current=Je;const pt=new RTCPeerConnection,rt=pt.createDataChannel("oai-events"),vt=document.createElement("audio");vt.autoplay=!0,vt.setAttribute("playsinline",""),M.current=pt,T.current=rt,L.current=vt,pt.addTrack(Je,ke),pt.addEventListener("track",Ze=>{we===S.current&&(vt.srcObject=Ze.streams[0]??new MediaStream([Ze.track]),vt.play().catch(()=>f("Tap the audio notice to hear this call")))}),rt.addEventListener("message",Ze=>{we===S.current&&z(Ze.data)}),rt.addEventListener("close",()=>{we===S.current&&B.current!=="idle"&&j("The control-room call closed")}),pt.addEventListener("connectionstatechange",()=>{if(we===S.current){if(pt.connectionState==="connected"&&Y.current&&(clearTimeout(Y.current),Y.current=null),pt.connectionState==="failed"||pt.connectionState==="closed")return j("The control-room connection failed");pt.connectionState==="disconnected"&&!Y.current&&(Y.current=setTimeout(()=>{Y.current=null,we===S.current&&pt.connectionState==="disconnected"&&j("The control-room connection was lost")},4e3))}});const Ke=await pt.createOffer();await pt.setLocalDescription(Ke);const it=pt.localDescription?.sdp;if(!it)throw new Error("The browser did not create a WebRTC offer");const En=await Ne.voiceCall(it,_.current.voice,_.current.language);if(we!==S.current){Ne.voiceCallEnd(En.callId).catch(()=>{});return}if(I.current=En.callId,await pt.setRemoteDescription({type:"answer",sdp:En.sdp}),await new Promise((Ze,tn)=>{if(rt.readyState==="open")return Ze();const se=setTimeout(()=>tn(new Error("Voice event channel did not open")),8e3);rt.addEventListener("open",()=>{clearTimeout(se),Ze()},{once:!0})}),await Ne.voiceCallReady(En.callId),we!==S.current)return;Je.enabled=!0,B.current==="connecting"&&P("connected")}catch(ke){if(we!==S.current)return;j(hP(ke)?"Microphone access was denied — allow it in this site’s settings and try again":ke instanceof Error?ke.message:String(ke))}},[X,j,z,P]),F=D.useCallback(()=>{const we=I.current;fe(),u(!1),P("idle"),f(null),we&&Ne.voiceCallEnd(we).catch(()=>{})},[fe,P]),te=D.useCallback(()=>{B.current==="idle"||B.current==="connecting"||u(we=>{const ke=!we;return R.current&&(R.current.enabled=!ke),ke})},[]),ae=D.useCallback(we=>{const ke=we.trim(),Je=T.current;if(!ke||Je?.readyState!=="open"||B.current!=="connected")return!1;const pt=crypto.randomUUID();return V({id:`typed:${pt}`,role:"user",text:ke}),Je.send(JSON.stringify({type:"conversation.item.create",item:{type:"message",role:"user",content:[{type:"input_text",text:ke}]}})),Je.send(JSON.stringify({type:"response.create"})),P("thinking"),!0},[V,P]),xe=D.useCallback(we=>{B.current==="idle"&&k(ke=>{const Je={...ke,...we};return _.current=Je,xP(Je),Je})},[]),ve=D.useCallback(()=>{L.current?.play().then(()=>f(null)).catch(()=>f("This browser is still blocking call audio"))},[]),Ge=D.useCallback(()=>r(!0),[]),me=D.useCallback(()=>r(!1),[]),nt=D.useCallback(()=>f(null),[]),ot=D.useCallback(we=>xe({voice:we}),[xe]),$t=D.useCallback(we=>xe({language:we}),[xe]);D.useEffect(()=>()=>{const we=I.current;fe(),we&&Ne.voiceCallEnd(we).catch(()=>{})},[fe]);const Ct=D.useMemo(()=>({panelOpen:n,status:i,muted:o,error:d,entries:h,inputPartial:p,outputPartial:b,preferences:v,openPanel:Ge,closePanel:me,startCall:Z,endCall:F,toggleMute:te,sendText:ae,dismissError:nt,enableAudio:ve,setVoice:ot,setLanguage:$t}),[n,i,o,d,h,p,b,v,Ge,me,Z,F,te,ae,nt,ve,ot,$t]);return x.jsx(L5.Provider,{value:Ct,children:e})}function P5(){const e=D.useContext(L5);if(!e)throw new Error("useVoiceCall must be used inside VoiceCallProvider");return e}const mP=[["auto","Auto detect"],["no","Norsk"],["en","English"]];function gP(e){return e[0].toUpperCase()+e.slice(1)}function T2(e,n){return e==="idle"?"Not connected":e==="connecting"?"Connecting…":e==="listening"?n?"Microphone muted":"Listening":e==="thinking"?"Checking the fleet…":e==="speaking"?"Orchestrator speaking":n?"Microphone muted":"Connected"}function EP(){const e=P5(),n=De(g=>g.online),[r,i]=D.useState(""),l=D.useRef(null),o=e.status!=="idle",u=e.status==="connected",d=`${e.entries.length}:${e.inputPartial}:${e.outputPartial}`;if(D.useEffect(()=>{if(!e.panelOpen)return;const g=p=>{p.key==="Escape"&&e.closePanel()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e.panelOpen,e.closePanel]),D.useEffect(()=>{if(!e.panelOpen||!d)return;const g=l.current;g&&(g.scrollTop=g.scrollHeight)},[e.panelOpen,d]),!e.panelOpen)return null;const f=g=>{g.preventDefault(),e.sendText(r)&&i("")},h=e.error?.toLowerCase().includes("audio")??!1;return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/65 md:block",onClick:e.closePanel,"aria-hidden":!0}),x.jsxs("section",{role:"dialog","aria-modal":"true","aria-label":"Control room call",className:"app-height fade-in pt-safe pb-safe fixed inset-0 z-[60] flex flex-col bg-bg md:inset-x-auto md:inset-y-8 md:left-1/2 md:w-[32rem] md:-translate-x-1/2 md:rounded-3xl md:border md:border-border-soft md:shadow-2xl",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b border-border-soft px-4 py-3",children:[x.jsx("div",{className:pe("grid size-9 shrink-0 place-items-center rounded-full bg-surface-2 text-muted",o&&"bg-voice-soft text-voice"),children:x.jsx(H0,{size:18})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("h2",{className:"text-[15px] font-semibold",children:"Control room"}),x.jsx(Hf,{})]}),x.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted",children:[o?x.jsx("span",{className:pe("size-1.5 rounded-full bg-voice",(e.status==="listening"||e.status==="speaking")&&"animate-pulse")}):null,x.jsxs("span",{className:"truncate",children:["All workspaces · ",T2(e.status,e.muted)]})]})]}),x.jsx("button",{type:"button",onClick:e.closePanel,"aria-label":o?"Hide call controls":"Close",className:"grid size-9 shrink-0 place-items-center rounded-full text-muted active:bg-surface-2 active:text-text",children:x.jsx(vn,{size:19})})]}),o?x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:l,className:"min-h-0 flex-1 overflow-y-auto px-4 py-5",children:x.jsxs("div",{className:"mx-auto flex max-w-xl flex-col gap-3",children:[e.entries.length===0&&!e.inputPartial&&!e.outputPartial?x.jsx("div",{className:"grid min-h-48 place-items-center text-center",children:x.jsxs("div",{children:[x.jsx(Rn,{size:22,className:"mx-auto mb-3 animate-spin text-voice"}),x.jsx("p",{className:"text-sm text-muted",children:"Opening the fleet channel…"})]})}):null,e.entries.map(g=>g.role==="activity"?x.jsxs("div",{className:"flex items-center justify-center gap-2 py-1 text-xs text-voice",children:[x.jsx("span",{className:"size-1.5 rounded-full bg-voice"}),g.text]},g.id):x.jsx("div",{className:pe("max-w-[88%] rounded-2xl px-3.5 py-2.5 text-sm leading-relaxed",g.role==="user"?"ml-auto rounded-br-md bg-voice-soft text-text":"mr-auto rounded-bl-md bg-surface-2 text-text"),children:g.text},g.id)),e.inputPartial?x.jsx("div",{className:"ml-auto max-w-[88%] rounded-2xl rounded-br-md border border-voice/25 bg-voice-soft/60 px-3.5 py-2.5 text-sm leading-relaxed text-muted",children:e.inputPartial}):null,e.outputPartial?x.jsxs("div",{className:"mr-auto max-w-[88%] rounded-2xl rounded-bl-md bg-surface-2 px-3.5 py-2.5 text-sm leading-relaxed text-text",children:[e.outputPartial,x.jsx("span",{className:"ml-1 inline-block size-1.5 animate-pulse rounded-full bg-voice align-middle"})]}):null]})}),x.jsxs("div",{className:"shrink-0 border-t border-border-soft bg-surface/80 px-4 pb-3 pt-3 backdrop-blur-xl",children:[e.error?x.jsx("button",{type:"button",onClick:h?e.enableAudio:e.dismissError,className:"mb-2 block w-full rounded-xl bg-del/10 px-3 py-2 text-left text-xs leading-snug text-del",children:e.error}):null,x.jsxs("form",{onSubmit:f,className:"flex items-center gap-2",children:[x.jsx("input",{value:r,onChange:g=>i(g.target.value),disabled:!u,placeholder:u?"Type to the orchestrator…":T2(e.status,e.muted),"aria-label":"Message the orchestrator",className:"h-11 min-w-0 flex-1 rounded-xl border border-border bg-bg px-3 text-sm text-text outline-none placeholder:text-faint focus:border-voice/60 disabled:opacity-60"}),x.jsx("button",{type:"submit",disabled:!u||!r.trim(),"aria-label":"Send to orchestrator",className:"grid size-11 shrink-0 place-items-center rounded-xl bg-voice text-white active:opacity-80 disabled:bg-surface-2 disabled:text-faint",children:x.jsx(rB,{size:18})})]}),x.jsxs("div",{className:"mt-3 flex items-center justify-center gap-5",children:[x.jsx("button",{type:"button",onClick:e.toggleMute,disabled:e.status==="connecting","aria-label":e.muted?"Unmute microphone":"Mute microphone","aria-pressed":e.muted,className:pe("grid size-12 place-items-center rounded-full bg-surface-2 text-text active:opacity-75 disabled:text-faint",e.muted&&"bg-voice-soft text-voice"),children:e.muted?x.jsx(UA,{size:20}):x.jsx(z8,{size:20})}),x.jsx("button",{type:"button",onClick:e.endCall,"aria-label":"End call",className:"grid size-12 place-items-center rounded-full bg-del text-white active:opacity-75",children:x.jsx(mk,{size:20})})]})]})]}):x.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-7",children:x.jsxs("div",{className:"mx-auto flex max-w-sm flex-col items-center text-center",children:[x.jsx("div",{className:"mb-5 grid size-16 place-items-center rounded-full bg-voice-soft text-voice",children:x.jsx(H0,{size:27})}),x.jsx("h3",{className:"text-xl font-semibold tracking-tight",children:"Call your fleet"}),x.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted",children:"One orchestrator checks every workspace, brings you one decision at a time, and can queue an exact prompt only after reading it back for confirmation."}),x.jsxs("div",{className:"mt-7 grid w-full grid-cols-2 gap-3 text-left",children:[x.jsxs("label",{className:"text-xs font-medium text-muted",children:["Voice",x.jsx("select",{value:e.preferences.voice,onChange:g=>e.setVoice(g.target.value),className:"mt-1.5 block h-11 w-full rounded-xl border border-border bg-surface-2 px-3 text-sm text-text [color-scheme:dark]",children:Y8.map(g=>x.jsx("option",{value:g,children:gP(g)},g))})]}),x.jsxs("label",{className:"text-xs font-medium text-muted",children:["Language",x.jsx("select",{value:e.preferences.language,onChange:g=>e.setLanguage(g.target.value),className:"mt-1.5 block h-11 w-full rounded-xl border border-border bg-surface-2 px-3 text-sm text-text [color-scheme:dark]",children:mP.map(([g,p])=>x.jsx("option",{value:g,children:p},g))})]})]}),e.error?x.jsx("button",{type:"button",onClick:e.dismissError,className:"mt-4 block w-full rounded-xl bg-del/10 px-3 py-2 text-left text-xs leading-snug text-del",children:e.error}):null,x.jsxs("button",{type:"button",onClick:()=>{e.startCall()},disabled:!n,className:"mt-6 flex h-12 w-full items-center justify-center gap-2 rounded-xl bg-voice px-4 text-sm font-semibold text-white active:opacity-80 disabled:bg-surface-2 disabled:text-faint",children:[x.jsx(H0,{size:18}),n?"Start fleet call":"Relay offline"]}),x.jsx("p",{className:"mt-3 text-[11px] leading-snug text-faint",children:"AI-generated voice. Microphone audio is sent to OpenAI for this live call."})]})})]})]}),document.body)}const yP=new Intl.NumberFormat("en",{notation:"compact"});function R2(e){return yP.format(Math.max(0,e)).toLowerCase()}function O2(e,n){return`${e.toLocaleString("en")} ${e===1?"line":"lines"} ${n}`}function bP({stats:e,className:n}){if(!e||e.added<=0&&e.removed<=0)return null;const r=[e.added>0?O2(e.added,"added"):null,e.removed>0?O2(e.removed,"removed"):null].filter(Boolean).join(", ");return x.jsxs("span",{className:pe("flex shrink-0 items-center gap-1 font-mono text-[10px] font-medium leading-none tabular-nums",n),title:r,children:[x.jsx("span",{className:"sr-only",children:r}),e.added>0?x.jsxs("span",{className:"text-add","aria-hidden":"true",children:["+",R2(e.added)]}):null,e.removed>0?x.jsxs("span",{className:"text-del","aria-hidden":"true",children:["-",R2(e.removed)]}):null]})}const I5="conductor-remote-theme",CP={light:"#f5f6f8",dark:"#0a0b0e"};function vP(e){return e==="light"||e==="dark"||e==="system"?e:"system"}function U5(e){try{return vP((e??localStorage).getItem(I5))}catch{return"system"}}function AP(e,n){return e==="system"?n?"dark":"light":e}function kP(){return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches}function H5(e,n=kP()){if(typeof document>"u")return;e==="system"?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e;const r=AP(e,n);document.querySelector('meta[name="theme-color"]')?.setAttribute("content",CP[r])}function BP(e,n){try{(n??localStorage).setItem(I5,e)}catch{}H5(e)}function DP(){if(typeof window>"u")return()=>{};const e=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>H5(U5(),e.matches);return e.addEventListener("change",n),n(),()=>e.removeEventListener("change",n)}const Zl=new Uint8Array(512),zd=new Uint8Array(256);let jl=1;for(let e=0;e<255;e++)Zl[e]=jl,zd[jl]=e,jl<<=1,jl&256&&(jl^=285);for(let e=255;e<512;e++)Zl[e]=Zl[e-255];function $5(e,n){return e===0||n===0?0:Zl[zd[e]+zd[n]]}function wP(e){let n=[1];for(let r=0;r<e;r++){const i=new Array(n.length+1).fill(0);for(let l=0;l<n.length;l++)i[l]^=n[l],i[l+1]^=$5(n[l],Zl[r]);n=i}return n}function FP(e,n){const r=wP(n),i=new Array(n).fill(0);for(const l of e){const o=l^i[0];if(i.shift(),i.push(0),o!==0)for(let u=0;u<n;u++)i[u]^=$5(r[u+1],o)}return i}const $f={1:{align:[],ec:10,groups:[[1,16]]},2:{align:[6,18],ec:16,groups:[[1,28]]},3:{align:[6,22],ec:26,groups:[[1,44]]},4:{align:[6,26],ec:18,groups:[[2,32]]},5:{align:[6,30],ec:24,groups:[[2,43]]},6:{align:[6,34],ec:16,groups:[[4,27]]},7:{align:[6,22,38],ec:18,groups:[[4,31]]},8:{align:[6,24,42],ec:22,groups:[[2,38],[2,39]]},9:{align:[6,26,46],ec:22,groups:[[3,36],[2,37]]},10:{align:[6,28,50],ec:26,groups:[[4,43],[1,44]]}};function z2(e){return $f[e].groups.reduce((n,[r,i])=>n+r*i,0)}function L2(e){return e<=9?8:16}function Tl(e,n,r){for(let i=r-1;i>=0;i--)e.push(n>>i&1)}function SP(e){const n=Array.from(new TextEncoder().encode(e));let r=0;for(let C=1;C<=10;C++)if(4+L2(C)+8*n.length<=z2(C)*8){r=C;break}if(r===0)throw new Error(`data too long for a v1–10 QR (${n.length} bytes)`);const i=z2(r)*8,l=[];Tl(l,4,4),Tl(l,n.length,L2(r));for(const C of n)Tl(l,C,8);for(let C=0,v=Math.min(4,i-l.length);C<v;C++)l.push(0);for(;l.length%8!==0;)l.push(0);const o=[236,17];for(let C=0;l.length<i;C++)Tl(l,o[C%2],8);const u=[];for(let C=0;C<l.length;C+=8){let v=0;for(let k=0;k<8;k++)v=v<<1|l[C+k];u.push(v)}const{ec:d,groups:f}=$f[r],h=[];let g=0;for(const[C,v]of f)for(let k=0;k<C;k++){const B=u.slice(g,g+v);g+=v,h.push({data:B,ec:FP(B,d)})}const p=[],y=Math.max(...h.map(C=>C.data.length));for(let C=0;C<y;C++)for(const v of h)C<v.data.length&&p.push(v.data[C]);for(let C=0;C<d;C++)for(const v of h)p.push(v.ec[C]);const b=[];for(const C of p)Tl(b,C,8);return{version:r,bits:b}}function NP(e,n){const r=e*4+17,i=Array.from({length:r},()=>new Array(r).fill(!1)),l=Array.from({length:r},()=>new Array(r).fill(!1)),o=(p,y)=>{for(let b=-1;b<=7;b++)for(let C=-1;C<=7;C++){const v=p+b,k=y+C;if(v<0||v>=r||k<0||k>=r)continue;const B=b>=0&&b<=6&&(C===0||C===6)||C>=0&&C<=6&&(b===0||b===6),_=b>=2&&b<=4&&C>=2&&C<=4;i[v][k]=B||_,l[v][k]=!0}};o(0,0),o(0,r-7),o(r-7,0);for(let p=8;p<r-8;p++){const y=p%2===0;l[6][p]||(i[6][p]=y,l[6][p]=!0),l[p][6]||(i[p][6]=y,l[p][6]=!0)}const u=$f[e].align;for(let p=0;p<u.length;p++)for(let y=0;y<u.length;y++){if(p===0&&y===0||p===0&&y===u.length-1||p===u.length-1&&y===0)continue;const C=u[p],v=u[y];for(let k=-2;k<=2;k++)for(let B=-2;B<=2;B++)i[C+k][v+B]=Math.max(Math.abs(k),Math.abs(B))!==1,l[C+k][v+B]=!0}for(let p=0;p<=8;p++)p!==6&&(l[8][p]=!0,l[p][8]=!0);for(let p=0;p<8;p++)l[8][r-1-p]=!0,l[r-1-p][8]=!0;if(l[r-8][8]=!0,e>=7)for(let p=0;p<18;p++){const y=r-11+p%3,b=Math.floor(p/3);l[b][y]=!0,l[y][b]=!0}let d=0,f=!0;for(let p=r-1;p>0;p-=2){p===6&&p--;for(let y=0;y<r;y++){const b=f?r-1-y:y;for(let C=0;C<2;C++){const v=p-C;l[b][v]||(i[b][v]=d<n.length?n[d]===1:!1,d++)}}f=!f}e>=7&&jP(i,e,r);let h=null,g=Number.POSITIVE_INFINITY;for(let p=0;p<8;p++){const y=i.map(C=>C.slice());for(let C=0;C<r;C++)for(let v=0;v<r;v++)!l[C][v]&&_P(p,C,v)&&(y[C][v]=!y[C][v]);MP(y,p,r);const b=TP(y);b<g&&(g=b,h=y)}return h}function _P(e,n,r){switch(e){case 0:return(n+r)%2===0;case 1:return n%2===0;case 2:return r%3===0;case 3:return(n+r)%3===0;case 4:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case 5:return n*r%2+n*r%3===0;case 6:return(n*r%2+n*r%3)%2===0;default:return((n+r)%2+n*r%3)%2===0}}function MP(e,n,r){const i=0|n;let l=i;for(let d=0;d<10;d++)l=l<<1^(l>>9&1?1335:0);const o=((i<<10|l&1023)^21522)&32767,u=d=>(o>>d&1)===1;for(let d=0;d<=5;d++)e[d][8]=u(d);e[7][8]=u(6),e[8][8]=u(7),e[8][7]=u(8);for(let d=9;d<15;d++)e[8][14-d]=u(d);for(let d=0;d<8;d++)e[8][r-1-d]=u(d);for(let d=8;d<15;d++)e[r-15+d][8]=u(d);e[r-8][8]=!0}function jP(e,n,r){let i=n;for(let o=0;o<12;o++)i=i<<1^(i>>11&1?7973:0);const l=n<<12|i&4095;for(let o=0;o<18;o++){const u=(l>>o&1)===1,d=r-11+o%3,f=Math.floor(o/3);e[f][d]=u,e[d][f]=u}}function TP(e){const n=e.length;let r=0;const i=f=>{let h=f(0),g=1;for(let p=1;p<n;p++)f(p)===h?g++:(g>=5&&(r+=g-2),h=f(p),g=1);g>=5&&(r+=g-2)};for(let f=0;f<n;f++)i(h=>e[f][h]);for(let f=0;f<n;f++)i(h=>e[h][f]);for(let f=0;f<n-1;f++)for(let h=0;h<n-1;h++){const g=e[f][h];g===e[f][h+1]&&g===e[f+1][h]&&g===e[f+1][h+1]&&(r+=3)}const l=[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],o=[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0],u=(f,h,g)=>{for(let p=0;p<11;p++)if(f(h+p)!==g[p])return!1;return!0};for(let f=0;f<n;f++)for(let h=0;h<=n-11;h++)(u(g=>e[f][g],h,l)||u(g=>e[f][g],h,o))&&(r+=40);for(let f=0;f<n;f++)for(let h=0;h<=n-11;h++)(u(g=>e[g][f],h,l)||u(g=>e[g][f],h,o))&&(r+=40);let d=0;for(let f=0;f<n;f++)for(let h=0;h<n;h++)e[f][h]&&d++;return r+=Math.floor(Math.abs(d/(n*n)*100-50)/5)*10,r}function RP(e){const{version:n,bits:r}=SP(e);return NP(n,r)}function OP({text:e,size:n=220,className:r}){const i=RP(e),l=i.length,o=4,u=l+o*2;let d="";for(let f=0;f<l;f++)for(let h=0;h<l;h++)i[f][h]&&(d+=`M${h+o} ${f+o}h1v1h-1z`);return x.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${u} ${u}`,shapeRendering:"crispEdges",className:r,role:"img","aria-label":"QR code",children:[x.jsx("title",{children:"QR code"}),x.jsx("rect",{width:u,height:u,fill:"#fff"}),x.jsx("path",{d,fill:"#000"})]})}function zP({version:e,onLogs:n,onClose:r}){const i=De(y=>y.token),l=De(y=>y.setToken),[o,u]=D.useState(!1),[d,f]=D.useState(!1),h=i?`${location.origin}/#token=${i}`:location.origin,g=!!e&&e!=="1.106.2",p=async()=>{try{await navigator.clipboard.writeText(h),u(!0),setTimeout(()=>u(!1),1500)}catch{}};return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:r,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Connect a device",className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[85dvh] max-w-sm flex-col items-center gap-4 rounded-t-3xl border border-border-soft bg-surface p-5 shadow-xl md:inset-0 md:m-auto md:h-fit md:rounded-3xl",children:[x.jsxs("div",{className:"flex w-full shrink-0 items-center justify-between",children:[x.jsx("h2",{className:"text-base font-semibold",children:"Connect a device"}),x.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[x.jsx("button",{type:"button",onClick:()=>f(y=>!y),"aria-label":"Disconnect","aria-expanded":d,title:"Disconnect",className:pe("flex size-8 items-center justify-center rounded-full active:bg-surface-2",d?"bg-del/15 text-del":"text-del/80"),children:x.jsx(DA,{size:17})}),x.jsx("button",{type:"button",onClick:r,"aria-label":"Close",className:"flex size-8 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:18})})]})]}),d?x.jsxs("div",{className:"fade-in w-full shrink-0 rounded-xl border border-del/40 bg-del/10 px-3 py-2.5 text-left",children:[x.jsx("p",{className:"text-sm font-medium",children:"Disconnect this device?"}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:"This forgets your access token. To get back in you’ll need the link or QR from the Mac running the relay — this screen can’t show it to you again."}),x.jsxs("div",{className:"mt-2.5 flex gap-2",children:[x.jsx("button",{type:"button",onClick:()=>f(!1),className:"flex-1 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm active:bg-surface",children:"Cancel"}),x.jsx("button",{type:"button",onClick:()=>l(null),className:"flex-1 rounded-lg bg-del px-3 py-2 text-sm font-semibold text-on-solid active:opacity-80",children:"Disconnect"})]})]}):null,x.jsxs("div",{className:"flex w-full min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto overscroll-contain",children:[x.jsx("p",{className:"text-center text-sm text-muted",children:"Scan on another phone, or re-add this to your home screen. The link carries your access token."}),x.jsx("div",{className:"shrink-0 rounded-2xl bg-white p-3",children:x.jsx(OP,{text:h,size:216})}),x.jsxs("button",{type:"button",onClick:p,className:"flex w-full shrink-0 items-center justify-center gap-2 rounded-xl border border-border bg-surface-2 px-3 py-2.5 text-sm active:bg-surface",children:[o?x.jsx(ma,{size:16}):x.jsx(Wd,{size:16}),o?"Copied":"Copy link"]}),x.jsx(PP,{}),x.jsx(IP,{}),x.jsx(HP,{}),x.jsxs("div",{className:"flex w-full items-center justify-between text-xs text-faint",children:[x.jsxs("span",{className:"font-mono",children:[e?`relay v${e}`:"relay v?"," · ",x.jsxs("span",{className:g?"text-working":void 0,children:["app v","1.106.2"]}),g?" · update pending":""]}),x.jsx("button",{type:"button",onClick:n,className:"shrink-0 text-muted underline-offset-2 hover:underline",children:"Logs"})]})]})]})]}),document.body)}const LP=[["system","System"],["light","Light"],["dark","Dark"]];function PP(){const[e,n]=D.useState(U5),r=De(o=>o.view.showDiffs),i=De(o=>o.setView),l=o=>{n(o),BP(o)};return x.jsxs("div",{className:"w-full shrink-0 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("fieldset",{className:"flex w-full items-center justify-between gap-3 border-0 p-0",children:[x.jsx("legend",{className:"sr-only",children:"Theme"}),x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(PB,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Theme"})]}),x.jsx("div",{className:"flex shrink-0 rounded-lg border border-border bg-surface p-0.5",children:LP.map(([o,u])=>x.jsx("button",{type:"button","aria-pressed":e===o,onClick:()=>l(o),className:pe("rounded-md px-2 py-1 text-xs transition focus-visible:outline-2 focus-visible:outline-accent",e===o?"bg-accent-soft text-accent":"text-muted active:bg-surface-2"),children:u},o))})]}),x.jsxs("div",{className:"mt-2.5 flex items-center justify-between gap-3 border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(N8,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Sidebar diffs"})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":r,"aria-label":"Show line changes in workspace rows",onClick:()=>i({showDiffs:!r}),className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",r?"bg-accent":"border border-border bg-surface"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",r?"translate-x-5":"translate-x-0")})})]}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:"Show line additions and deletions in workspace rows."})]})}function IP(){const e=gF(),n=e.permission==="denied",r=e.support!=="ok"||e.relayDisabled,i=e.relayDisabled?"Turned off on the relay (PUSH_NOTIFY=off).":e.support==="needs-install"?"Add this to your Home Screen first — iOS only allows notifications for installed apps.":e.support==="insecure"?"Needs a secure connection — open the app on its https:// Tailscale URL.":e.support==="unsupported"?"This browser can’t receive push notifications.":n?"Blocked for this app — allow notifications in your device settings, then come back.":e.enabled?`On for this device${e.devices>1?` · ${e.devices} devices subscribed`:""}.`:"Get a ping when an agent finishes its turn or hits an error.";return x.jsxs("div",{className:"w-full shrink-0 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(D8,{size:16,className:pe("shrink-0",e.enabled?"text-accent":"text-muted")}),x.jsx("span",{children:"Notifications"})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":"Notifications on this device",disabled:r||n||e.busy,onClick:()=>{e.enabled?e.disable():e.enable()},className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",e.enabled?"bg-accent":"border border-border bg-surface",(r||n||e.busy)&&"opacity-40"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",e.enabled?"translate-x-5":"translate-x-0")})})]}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:i}),e.error?x.jsx("p",{className:"mt-1 text-xs text-del",children:e.error}):null,e.enabled?x.jsx("button",{type:"button",onClick:()=>{e.test()},disabled:e.busy,className:"mt-1.5 text-xs text-muted underline-offset-2 hover:underline disabled:opacity-50",children:"Send a test notification"}):null]})}const UP=[{label:"1h",seconds:3600},{label:"4h",seconds:4*3600,className:"hidden min-[400px]:block"},{label:"10h",seconds:10*3600}];function ed(e){if(!e)return"until you turn it off";const n=new Date(e),r=n.toDateString()===new Date().toDateString(),i=n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return r?`until ${i}`:`until ${n.toLocaleDateString([],{weekday:"short"})} ${i}`}function HP(){const[e,n]=D.useState(null),[r,i]=D.useState(!1),[l,o]=D.useState(null),[u,d]=D.useState(!1),[f,h]=D.useState(!1),[g,p]=D.useState(""),[y,b]=D.useState(null),[C,v]=D.useState("idle"),[k,B]=D.useState(null),_=D.useCallback(async()=>{try{n(await Ne.settings()),o(null)}catch(O){o(O instanceof Error?O.message:String(O))}},[]);D.useEffect(()=>{_()},[_]);const S=async O=>{i(!0),o(null);try{return await O(),await _(),!0}catch($){return o($ instanceof Error?$.message:String($)),!1}finally{i(!1)}},M=async O=>{i(!0),o(null);try{const $=await Ne.restartConductor(O);B($.ms??0),v("idle"),await _()}catch($){$ instanceof Dr&&$.status===409&&v("agents"),o($ instanceof Error?$.message:String($))}finally{i(!1)}},T=async O=>{O.preventDefault();const $=PD(g);if($===null){b("Use a duration like 80h, 90m, or a number of seconds.");return}if($<1){b("Choose a duration longer than zero.");return}const Q=e?.nosleep.maxSeconds??168*3600;if($>Q){b(`Choose a duration up to ${Math.round(Q/3600)}h.`);return}b(null),d(!1),await S(()=>Ne.armNoSleep($))&&h(!1)},w=e?.nosleep,R=e?.screenLocked===!0,L=e?.wifi.known??[],I=e?.settings.fallbackSsids[0]??"";return x.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-2.5 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(U8,{size:16,className:pe("shrink-0",w?.armed?"text-accent":"text-muted")}),x.jsx("span",{children:"Keep the Mac awake"})]}),w?.armed?x.jsx("button",{type:"button",disabled:r,onClick:()=>{S(async()=>{const O=await Ne.disarmNoSleep();d(O.willSleep===!0)})},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Let it sleep"}):x.jsxs("div",{className:"flex shrink-0 gap-1",children:[UP.map(O=>x.jsx("button",{type:"button",disabled:r||!w?.available,onClick:()=>{S(()=>(h(!1),b(null),d(!1),Ne.armNoSleep(O.seconds)))},className:pe("rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-40",O.className),children:O.label},O.seconds)),x.jsx("button",{type:"button",disabled:r||!w?.available,"aria-label":"Choose a custom keep-awake duration","aria-expanded":f,onClick:()=>{b(null),h(O=>!O)},className:pe("grid size-[30px] place-items-center rounded-lg border border-border active:bg-surface disabled:opacity-40",f&&"bg-surface text-accent"),children:x.jsx(S8,{size:14})})]})]}),!w?.armed&&f?x.jsxs("form",{onSubmit:T,className:"fade-in flex items-center justify-end gap-1.5",children:[x.jsx("label",{htmlFor:"awake-duration",className:"text-xs text-muted",children:"Keep awake for"}),x.jsx("input",{id:"awake-duration",type:"text",required:!0,value:g,disabled:r,placeholder:"e.g. 80h",autoCapitalize:"none",autoCorrect:"off",onChange:O=>{p(O.target.value),b(null)},className:"h-[30px] w-[6.5rem] rounded-lg border border-border bg-surface px-2 text-xs text-text disabled:opacity-40"}),x.jsx("button",{type:"submit",disabled:r||!g.trim(),className:"h-[30px] rounded-lg bg-accent px-2.5 text-xs font-medium text-on-solid active:opacity-80 disabled:opacity-40",children:r?"Setting…":"Set"})]}):null,y?x.jsx("p",{className:"text-right text-xs text-del",children:y}):null,x.jsx("p",{className:"text-xs text-muted",children:e?w?.available?w.armed?w.preventsScreenLock?R?`Awake ${ed(w.until)}, lid closed. It blocks the idle screen lock from starting; it can’t lift one already up.`:`Awake ${ed(w.until)}, lid closed. The idle screen lock is off; anyone at the Mac can use it.`:`Awake ${ed(w.until)}, lid closed. Sends park if macOS locks.`:u?"The lid is shut, so the Mac is going to sleep now — this app will be unreachable until you wake it.":"Stops system sleep. Screen-lock behavior follows the Mac CLI configuration.":"Run `conductor-remote nosleep setup` on the Mac to install or refresh the helper.":"Checking…"}),R?x.jsxs("p",{className:"text-xs text-del",children:["The Mac is locked right now, so writes park until it’s unlocked. ",x.jsx(ga,{})]}):null,x.jsxs("div",{className:"border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(H8,{size:16,className:pe("shrink-0",e?.settings.autoRejoin?"text-accent":"text-muted")}),x.jsx("span",{children:"Fallback network"})]}),I?x.jsx("button",{type:"button",disabled:r,onClick:()=>{S(()=>Ne.patchSettings({fallbackSsids:[],autoRejoin:!1}))},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Turn off"}):null]}),I?x.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Auto-joins ",x.jsx("span",{className:"text-fg",children:I})," when the primary network drops."]}):x.jsx($P,{known:L,hotspots:e?.wifi.likelyHotspots??[],busy:r,onPick:O=>{S(()=>Ne.patchSettings({fallbackSsids:[O],autoRejoin:!0}))}}),e?.wifi.autoJoinHotspot==="Never"?x.jsx("p",{className:"mt-1 text-xs text-faint",children:"Auto-join Hotspot is off on this Mac (System Settings ▸ Wi-Fi). Your hotspot has to be on and broadcasting before the Mac can join it."}):null]}),x.jsxs("div",{className:"border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(qk,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Restart Conductor"})]}),C==="idle"?x.jsx("button",{type:"button",disabled:r,onClick:()=>{B(null),o(null),v("confirm")},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Restart"}):null]}),k!==null?x.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Quit and reopened in ",(k/1e3).toFixed(1),"s. Send a prompt to check an agent answers."]}):null,C!=="idle"?x.jsxs("div",{className:"fade-in mt-2 rounded-xl border border-del/40 bg-del/10 px-3 py-2.5 text-left",children:[x.jsx("p",{className:"text-sm font-medium",children:C==="agents"?"Agents are still working":"Restart Conductor?"}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:C==="agents"?"Restarting ends their turns. Everything they have already written stays in the chat.":"The app closes and opens again, which takes about ten seconds. Anything mid-turn stops."}),x.jsxs("div",{className:"mt-2.5 flex gap-2",children:[x.jsx("button",{type:"button",onClick:()=>{v("idle"),o(null)},className:"flex-1 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm active:bg-surface",children:"Cancel"}),x.jsx("button",{type:"button",disabled:r,onClick:()=>{M(C==="agents")},className:"flex-1 rounded-lg bg-del px-3 py-2 text-sm font-semibold text-on-solid active:opacity-80 disabled:opacity-50",children:r?"Restarting…":C==="agents"?"Stop agents and restart":"Restart"})]})]}):null]}),l?x.jsxs("p",{className:"text-xs text-del",children:[l," ",Fi(l)?x.jsx(ga,{}):null]}):null]})}function $P({known:e,hotspots:n,busy:r,onPick:i}){const[l,o]=D.useState("");if(e.length===0)return x.jsx("p",{className:"mt-1 text-xs text-muted",children:"No saved Wi-Fi networks to offer."});const u=new Set(n),d=l.trim().toLowerCase(),f=e.filter(p=>!d||p.toLowerCase().includes(d)),h=f.find(p=>u.has(p)),g=(h?[h,...f.filter(p=>p!==h)]:f).slice(0,6);return x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"mt-1 text-xs text-muted",children:"Turn your hotspot on before you leave, and the Mac can move to it if the office Wi-Fi drops."}),x.jsx("input",{type:"search",value:l,disabled:r,onChange:p=>o(p.target.value),placeholder:`Search ${e.length} saved networks`,className:"mt-2 w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-xs disabled:opacity-40"}),x.jsxs("div",{className:"mt-1.5 flex flex-col gap-1",children:[g.map(p=>x.jsxs("button",{type:"button",disabled:r,onClick:()=>i(p),className:"flex items-center justify-between gap-2 rounded-lg border border-border px-2.5 py-1.5 text-left text-xs active:bg-surface disabled:opacity-50",children:[x.jsx("span",{className:"truncate",children:p}),u.has(p)?x.jsx("span",{className:"shrink-0 text-faint",children:"likely hotspot"}):null]},p)),g.length===0?x.jsxs("p",{className:"text-xs text-faint",children:["Nothing matches “",l,"”."]}):null]}),!d&&e.length>g.length?x.jsxs("p",{className:"mt-1 text-xs text-faint",children:["Most recently joined. Search to reach the other ",e.length-g.length,"."]}):null]})}const qP={info:"text-muted",warn:"text-working",error:"text-del"};function Xa(e){return String(e).padStart(2,"0")}function GP(e){if(e==null)return"·";const n=new Date(e);return`${Xa(n.getHours())}:${Xa(n.getMinutes())}:${Xa(n.getSeconds())}`}function P2(e){if(e==null)return" ";const n=new Date(e);return`${n.getFullYear()}-${Xa(n.getMonth()+1)}-${Xa(n.getDate())} ${Xa(n.getHours())}:${Xa(n.getMinutes())}:${Xa(n.getSeconds())}`}function VP(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function I2(e){const n=Math.max(0,Math.round(e/1e3));if(n<90)return`${n}s ago`;const r=Math.round(n/60);if(r<60)return`${r}m ago`;const i=Math.round(r/60);return i<48?`${i}h ago`:`${Math.round(i/24)}d ago`}function QP({onClose:e}){const[n,r]=D.useState(null),[i,l]=D.useState(!1),[o,u]=D.useState(null),{data:d,isLoading:f,isError:h,error:g}=xF(n,!0),p=D.useRef(null),y=D.useRef(!0),b=D.useMemo(()=>(d?.entries??[]).filter(k=>!i||k.level!=="info"),[d,i]);D.useEffect(()=>{const k=p.current;k&&y.current&&b.length&&(k.scrollTop=k.scrollHeight)},[b]);const C=async()=>{const k=`# conductor-remote ${n??"live"} log · app v1.106.2 · copied ${P2(Date.now())}`,B=b.map(_=>`${P2(_.t)} ${_.level==="info"?"":_.level.toUpperCase()} ${_.text}`);try{await navigator.clipboard.writeText([k,...B].join(`
|
|
57
|
+
`)),et.sessionId&&$(et.sessionId),Ue==="workspace"){await W.invalidateQueries({queryKey:["state"]}),Y(et.sessionId?`/w/${et.workspaceId}?session=${encodeURIComponent(et.sessionId)}`:`/w/${et.workspaceId}`);return}await W.invalidateQueries({queryKey:["sessions",me.id]}),et.sessionId&&l(et.sessionId)},re=()=>{u(!1),g(null),y(!1)},mt=()=>{g(null),y(!0)},At=()=>{o?re():(u(!0),y(!0))},oe=Ae=>{g({workspaceId:me.id,path:Ae}),y(!1)},gt=Ae=>{f(Ae),Ae==="all"&&me.worktree&&Ct.refetch()},wt={workspace:me,query:fe,filesQuery:Ct,fileQuery:j},nn=async Ae=>{B(null);try{const U=await Ne.dismissDelegation(Ae);if(!U.ok)throw new Error(U.error.message);await W.invalidateQueries({queryKey:["state"]})}catch(U){B(U instanceof Error?U.message:String(U))}};return x.jsx(yS,{value:pt,children:x.jsxs("div",{className:"flex h-full min-w-0 overflow-hidden",children:[x.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[x.jsx(vd,{title:$r(me),subtitle:cn,menu:!0,right:x.jsxs(x.Fragment,{children:[x.jsx(wL,{workspaceId:me.id}),x.jsx("button",{type:"button",onClick:()=>v(!0),"aria-label":"Open delegated roles",className:"flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2",children:x.jsx(oc,{size:18})}),x.jsx(YL,{workspace:me,agentsRunning:rt.filter(Ae=>Ae.status==="working").length}),x.jsx(ZL,{stats:me.change_stats,open:o,onToggle:At})]})}),rt.length>0||me.state==="ready"?x.jsx(WL,{sessions:rt,activeId:Ke,readMarks:ae,promptStates:It,roles:En,subtabSessionIds:Ze,onSelect:l,onContext:Ae=>le({workspaceId:me.id,id:Ae.id,title:Ae.title}),onNewChat:Qt,onClose:Ae=>{Dt(Ae)},creating:_,closingId:M,online:Ge}):null,w?x.jsx(JL,{title:rt.find(Ae=>Ae.id===w)?.title??"Untitled",busy:M===w,onCancel:()=>R(null),onConfirm:()=>{Dt(w,!0)}}):L?x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-del/30 bg-del/5 px-3 py-2 text-xs text-del",children:[x.jsx("span",{className:"min-w-0 flex-1",children:L}),Fi(L)?x.jsx(ga,{}):null,x.jsx("button",{type:"button",onClick:()=>I(null),"aria-label":"Dismiss close error",className:"p-1",children:x.jsx(vn,{size:14})})]}):null,x.jsx(Mz,{jobs:kn,sessions:rt,roles:En,activeSessionId:Ke,onSelectSession:l}),me.delegation_warning||k?x.jsx("div",{className:"shrink-0 border-b border-del/30 bg-del/5 px-3 py-1.5 text-xs text-del",children:k??me.delegation_warning}):null,x.jsxs("div",{className:"relative min-h-0 flex flex-1 flex-col",children:[b?x.jsx(PL,{review:wt,filePath:b,scope:d,onSelectFile:oe,onShowFiles:()=>y(!0),onClose:mt},b):x.jsx(B5,{sessionId:Ke,workspaceId:me.id,working:Ee,workingSince:Ve,turnStartedAt:it?.turn_started_at,waiting:it?.background_tasks,delegations:kn,queued:me.parked_prompts?.find(Ae=>Ae.sessionId===Ke)??me.pending_prompt,onFork:Yt,onSelectSession:l,onDismissDelegation:Ae=>{nn(Ae)},onOpenRoles:()=>v(!0)}),o&&(p||!b)?x.jsx(nP,{review:wt,sessionId:Ke,scope:d,onScopeChange:gt,selectedFile:b,onSelectFile:oe,onClose:re}):null]}),x.jsx(CL,{session:it,sessionId:Ke,workspaceId:me.id,working:Ee,actuator:nt,onFork:Ae=>Yt({thinking:!0,tools:!1},Ae),onContext:it?()=>le({workspaceId:me.id,id:it.id,title:it.title}):void 0,workflowStarted:!!(Ke&&En[Ke])||!!(me.pending_prompt&&Ke===me.active_session_id),focusDraft:Ke===O,onDraftFocused:()=>$(null)},me.id)]}),o?x.jsx(tP,{review:wt,sessionId:Ke,scope:d,onScopeChange:gt,selectedFile:b,onSelectFile:oe,onClose:re}):null,C?x.jsx(R5,{onClose:()=>v(!1)}):null,Q&&Q.workspaceId===e?x.jsx(BL,{sessionId:Q.id,title:Q.title,revision:rt.find(Ae=>Ae.id===Q.id)?.updated_at,onClose:()=>le(null)}):null]})})}function ZL({stats:e,open:n,onToggle:r}){const i=!!e&&(e.added>0||e.removed>0);return x.jsxs("button",{type:"button",onClick:r,"aria-label":i?"Toggle diff panel, changes available":"Toggle diff panel","aria-pressed":n,className:pe("relative flex size-9 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2",n&&"bg-surface-2 text-text"),children:[x.jsx(N8,{size:19}),i?x.jsx("span",{className:"absolute right-1.5 top-1.5 size-1.5 rounded-full bg-accent","aria-hidden":"true"}):null]})}function WL({sessions:e,activeId:n,readMarks:r,promptStates:i,roles:l={},subtabSessionIds:o,onSelect:u,onContext:d,onNewChat:f,onClose:h,creating:g,closingId:p,online:y}){const b=D.useRef(null),C=e.filter(k=>!l[k.id]?.delegationId&&!o?.has(k.id)),v=C.some(k=>k.id===n);return D.useLayoutEffect(()=>{n&&v&&b.current?.scrollIntoView({block:"nearest",inline:"nearest"})},[n,v]),x.jsxs("nav",{className:"flex shrink-0 items-center gap-1 border-b border-border-soft bg-bg px-3 py-2",children:[x.jsx("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:C.map(k=>{const B=i[k.id],_=typeof k.context_used_percent=="number"&&k.context_used_percent>0;return x.jsxs("div",{ref:k.id===n?b:void 0,className:pe("flex shrink-0 items-center rounded-full text-sm font-medium text-muted transition",k.id===n&&"bg-surface-2 text-text"),children:[x.jsxs("button",{type:"button",onClick:()=>u(k.id),className:pe("flex min-w-0 items-center gap-1.5 py-1.5 pl-3.5",e.length>1||_?"pr-1":"pr-3.5"),children:[B?x.jsx(Hg,{state:B,className:"size-3"}):k.status==="working"?x.jsx("span",{className:"dot-spinner size-3"}):k.background_tasks?.length?x.jsx(Jd,{size:11,className:"shrink-0 text-faint","aria-label":"Waiting for a background task"}):null,x.jsx("span",{className:"whitespace-nowrap",children:k.title||"Untitled"}),l[k.id]?x.jsx(T5,{name:l[k.id].role}):null,Cw(k,r)?x.jsx("span",{className:"dot size-1.5 bg-accent"}):null]}),x.jsx(eP,{session:k,onOpen:()=>d(k)}),e.length>1?x.jsx("button",{type:"button",onClick:()=>h(k.id),disabled:!y||p!==null,"aria-label":`Close ${k.title||"Untitled"} chat`,className:"mr-1 flex size-6 shrink-0 items-center justify-center rounded-full text-faint transition active:bg-bg/70 active:text-text disabled:opacity-40",children:p===k.id?x.jsx(Rn,{size:12,className:"animate-spin"}):x.jsx(vn,{size:12})}):null]},k.id)})}),x.jsx("button",{type:"button",onClick:f,disabled:g,"aria-label":"New chat, same files",className:"flex size-7 shrink-0 items-center justify-center rounded-full text-muted transition active:bg-surface-2 disabled:opacity-40",children:x.jsx(ef,{size:18})})]})}function JL({title:e,busy:n,onCancel:r,onConfirm:i}){return x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-working/30 bg-working/5 px-3 py-2 text-xs",children:[x.jsxs("span",{className:"min-w-0 flex-1 truncate",children:[x.jsx("span",{className:"font-semibold",children:e})," is still working. Close the tab anyway?"]}),x.jsx("button",{type:"button",onClick:r,disabled:n,className:"rounded-lg px-2 py-1 text-muted active:bg-surface-2",children:"Cancel"}),x.jsxs("button",{type:"button",onClick:i,disabled:n,className:"flex items-center gap-1 rounded-lg bg-del px-2 py-1 font-semibold text-black active:scale-95 disabled:opacity-50",children:[n?x.jsx(Rn,{size:12,className:"animate-spin"}):null,"Close anyway"]})]})}function eP({session:e,onOpen:n}){const r=e.context_used_percent;return typeof r!="number"||r<=0?null:x.jsxs("button",{type:"button",onClick:n,"aria-label":`Context for ${e.title||"Untitled"}: ${Math.round(r)}% used`,"aria-haspopup":"dialog",className:pe("flex h-7 min-w-10 shrink-0 items-center justify-center rounded-full px-2 text-[11px] tabular-nums transition active:bg-bg/70",r>=80?"text-working":"text-faint"),children:[Math.round(r),"%"]})}function O5({scope:e,onChange:n}){return x.jsx("fieldset",{"aria-label":"Files shown",className:"flex shrink-0 rounded-full bg-surface-2 p-0.5 text-xs",children:["changed","all"].map(r=>x.jsx("button",{type:"button",onClick:()=>n(r),"aria-label":r==="changed"?"Changed files":"All files","aria-pressed":e===r,className:pe("rounded-full px-2.5 py-1 font-medium text-muted transition",e===r&&"bg-bg text-text shadow-sm"),children:r==="changed"?"Changed":"All"},r))})}function tP({review:e,sessionId:n,scope:r,onScopeChange:i,selectedFile:l,onSelectFile:o,onClose:u}){return x.jsxs("aside",{className:"hidden flex-col bg-bg lg:flex lg:w-[380px] lg:shrink-0 lg:border-l lg:border-border-soft xl:w-[460px]",children:[x.jsxs("header",{className:"flex items-center gap-2 border-b border-border-soft px-3 py-2.5",children:[x.jsx("span",{className:"flex-1 text-[15px] font-semibold",children:"Files"}),x.jsx(O5,{scope:r,onChange:i}),x.jsx("button",{type:"button",onClick:u,"aria-label":"Close diff panel",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsx(j5,{review:e,sessionId:n,scope:r,selectedFile:l,onSelectFile:o})]})}function nP({review:e,sessionId:n,scope:r,onScopeChange:i,selectedFile:l,onSelectFile:o,onClose:u}){return x.jsxs("section",{className:"absolute inset-0 z-20 flex flex-col bg-bg lg:hidden","aria-label":"Workspace files",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-3 py-2.5",children:[x.jsx("span",{className:"flex-1 text-[15px] font-semibold",children:"Files"}),x.jsx(O5,{scope:r,onChange:i}),x.jsx("button",{type:"button",onClick:u,"aria-label":"Close diff panel",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsx(j5,{review:e,sessionId:n,scope:r,selectedFile:l,onSelectFile:o})]})}var V0={exports:{}},rP=V0.exports,j2;function aP(){return j2||(j2=1,(function(e,n){(function(i,l){e.exports=l()})(typeof self<"u"?self:rP,function(){return(function(r){var i={};function l(o){if(i[o])return i[o].exports;var u=i[o]={i:o,l:!1,exports:{}};return r[o].call(u.exports,u,u.exports,l),u.l=!0,u.exports}return l.m=r,l.c=i,l.d=function(o,u,d){l.o(o,u)||Object.defineProperty(o,u,{configurable:!1,enumerable:!0,get:d})},l.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return l.d(u,"a",u),u},l.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},l.p="",l(l.s=3)})([(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=(function(){function u(d,f){this.width=f,this.height=d.length/f,this.data=d}return u.createEmpty=function(d,f){return new u(new Uint8ClampedArray(d*f),d)},u.prototype.get=function(d,f){return d<0||d>=this.width||f<0||f>=this.height?!1:!!this.data[f*this.width+d]},u.prototype.set=function(d,f,h){this.data[f*this.width+d]=h?1:0},u.prototype.setRegion=function(d,f,h,g,p){for(var y=f;y<f+g;y++)for(var b=d;b<d+h;b++)this.set(b,y,!!p)},u})();i.BitMatrix=o}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(2);function u(f,h){return f^h}i.addOrSubtractGF=u;var d=(function(){function f(h,g,p){this.primitive=h,this.size=g,this.generatorBase=p,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var y=1,b=0;b<this.size;b++)this.expTable[b]=y,y=y*2,y>=this.size&&(y=(y^this.primitive)&this.size-1);for(var b=0;b<this.size-1;b++)this.logTable[this.expTable[b]]=b;this.zero=new o.default(this,Uint8ClampedArray.from([0])),this.one=new o.default(this,Uint8ClampedArray.from([1]))}return f.prototype.multiply=function(h,g){return h===0||g===0?0:this.expTable[(this.logTable[h]+this.logTable[g])%(this.size-1)]},f.prototype.inverse=function(h){if(h===0)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[h]-1]},f.prototype.buildMonomial=function(h,g){if(h<0)throw new Error("Invalid monomial degree less than 0");if(g===0)return this.zero;var p=new Uint8ClampedArray(h+1);return p[0]=g,new o.default(this,p)},f.prototype.log=function(h){if(h===0)throw new Error("Can't take log(0)");return this.logTable[h]},f.prototype.exp=function(h){return this.expTable[h]},f})();i.default=d}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(1),u=(function(){function d(f,h){if(h.length===0)throw new Error("No coefficients.");this.field=f;var g=h.length;if(g>1&&h[0]===0){for(var p=1;p<g&&h[p]===0;)p++;if(p===g)this.coefficients=f.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(g-p);for(var y=0;y<this.coefficients.length;y++)this.coefficients[y]=h[p+y]}}else this.coefficients=h}return d.prototype.degree=function(){return this.coefficients.length-1},d.prototype.isZero=function(){return this.coefficients[0]===0},d.prototype.getCoefficient=function(f){return this.coefficients[this.coefficients.length-1-f]},d.prototype.addOrSubtract=function(f){var h;if(this.isZero())return f;if(f.isZero())return this;var g=this.coefficients,p=f.coefficients;g.length>p.length&&(h=[p,g],g=h[0],p=h[1]);for(var y=new Uint8ClampedArray(p.length),b=p.length-g.length,C=0;C<b;C++)y[C]=p[C];for(var C=b;C<p.length;C++)y[C]=o.addOrSubtractGF(g[C-b],p[C]);return new d(this.field,y)},d.prototype.multiply=function(f){if(f===0)return this.field.zero;if(f===1)return this;for(var h=this.coefficients.length,g=new Uint8ClampedArray(h),p=0;p<h;p++)g[p]=this.field.multiply(this.coefficients[p],f);return new d(this.field,g)},d.prototype.multiplyPoly=function(f){if(this.isZero()||f.isZero())return this.field.zero;for(var h=this.coefficients,g=h.length,p=f.coefficients,y=p.length,b=new Uint8ClampedArray(g+y-1),C=0;C<g;C++)for(var v=h[C],k=0;k<y;k++)b[C+k]=o.addOrSubtractGF(b[C+k],this.field.multiply(v,p[k]));return new d(this.field,b)},d.prototype.multiplyByMonomial=function(f,h){if(f<0)throw new Error("Invalid degree less than 0");if(h===0)return this.field.zero;for(var g=this.coefficients.length,p=new Uint8ClampedArray(g+f),y=0;y<g;y++)p[y]=this.field.multiply(this.coefficients[y],h);return new d(this.field,p)},d.prototype.evaluateAt=function(f){var h=0;if(f===0)return this.getCoefficient(0);var g=this.coefficients.length;if(f===1)return this.coefficients.forEach(function(y){h=o.addOrSubtractGF(h,y)}),h;h=this.coefficients[0];for(var p=1;p<g;p++)h=o.addOrSubtractGF(this.field.multiply(f,h),this.coefficients[p]);return h},d})();i.default=u}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(4),u=l(5),d=l(11),f=l(12);function h(y){var b=f.locate(y);if(!b)return null;for(var C=0,v=b;C<v.length;C++){var k=v[C],B=d.extract(y,k),_=u.decode(B.matrix);if(_)return{binaryData:_.bytes,data:_.text,chunks:_.chunks,version:_.version,location:{topRightCorner:B.mappingFunction(k.dimension,0),topLeftCorner:B.mappingFunction(0,0),bottomRightCorner:B.mappingFunction(k.dimension,k.dimension),bottomLeftCorner:B.mappingFunction(0,k.dimension),topRightFinderPattern:k.topRight,topLeftFinderPattern:k.topLeft,bottomLeftFinderPattern:k.bottomLeft,bottomRightAlignmentPattern:k.alignmentPattern}}}return null}var g={inversionAttempts:"attemptBoth"};function p(y,b,C,v){v===void 0&&(v={});var k=g;Object.keys(k||{}).forEach(function(R){k[R]=v[R]||k[R]});var B=k.inversionAttempts==="attemptBoth"||k.inversionAttempts==="invertFirst",_=k.inversionAttempts==="onlyInvert"||k.inversionAttempts==="invertFirst",S=o.binarize(y,b,C,B),M=S.binarized,T=S.inverted,w=h(_?T:M);return!w&&(k.inversionAttempts==="attemptBoth"||k.inversionAttempts==="invertFirst")&&(w=h(_?M:T)),w}p.default=p,i.default=p}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0),u=8,d=24;function f(p,y,b){return p<y?y:p>b?b:p}var h=(function(){function p(y,b){this.width=y,this.data=new Uint8ClampedArray(y*b)}return p.prototype.get=function(y,b){return this.data[b*this.width+y]},p.prototype.set=function(y,b,C){this.data[b*this.width+y]=C},p})();function g(p,y,b,C){if(p.length!==y*b*4)throw new Error("Malformed data passed to binarizer.");for(var v=new h(y,b),k=0;k<y;k++)for(var B=0;B<b;B++){var _=p[(B*y+k)*4+0],S=p[(B*y+k)*4+1],M=p[(B*y+k)*4+2];v.set(k,B,.2126*_+.7152*S+.0722*M)}for(var T=Math.ceil(y/u),w=Math.ceil(b/u),R=new h(T,w),L=0;L<w;L++)for(var I=0;I<T;I++){for(var O=0,$=1/0,Q=0,B=0;B<u;B++)for(var k=0;k<u;k++){var le=v.get(I*u+k,L*u+B);O+=le,$=Math.min($,le),Q=Math.max(Q,le)}var W=O/Math.pow(u,2);if(Q-$<=d&&(W=$/2,L>0&&I>0)){var Y=(R.get(I,L-1)+2*R.get(I-1,L)+R.get(I-1,L-1))/4;$<Y&&(W=Y)}R.set(I,L,W)}var P=o.BitMatrix.createEmpty(y,b),V=null;C&&(V=o.BitMatrix.createEmpty(y,b));for(var L=0;L<w;L++)for(var I=0;I<T;I++){for(var X=f(I,2,T-3),fe=f(L,2,w-3),O=0,j=-2;j<=2;j++)for(var z=-2;z<=2;z++)O+=R.get(X+j,fe+z);for(var Z=O/25,j=0;j<u;j++)for(var z=0;z<u;z++){var k=I*u+j,B=L*u+z,F=v.get(k,B);P.set(k,B,F<=Z),C&&V.set(k,B,!(F<=Z))}}return C?{binarized:P,inverted:V}:{binarized:P}}i.binarize=g}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0),u=l(6),d=l(9),f=l(10);function h(M,T){for(var w=M^T,R=0;w;)R++,w&=w-1;return R}function g(M,T){return T<<1|M}var p=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],y=[function(M){return(M.y+M.x)%2===0},function(M){return M.y%2===0},function(M){return M.x%3===0},function(M){return(M.y+M.x)%3===0},function(M){return(Math.floor(M.y/2)+Math.floor(M.x/3))%2===0},function(M){return M.x*M.y%2+M.x*M.y%3===0},function(M){return(M.y*M.x%2+M.y*M.x%3)%2===0},function(M){return((M.y+M.x)%2+M.y*M.x%3)%2===0}];function b(M){var T=17+4*M.versionNumber,w=o.BitMatrix.createEmpty(T,T);w.setRegion(0,0,9,9,!0),w.setRegion(T-8,0,8,9,!0),w.setRegion(0,T-8,9,8,!0);for(var R=0,L=M.alignmentPatternCenters;R<L.length;R++)for(var I=L[R],O=0,$=M.alignmentPatternCenters;O<$.length;O++){var Q=$[O];I===6&&Q===6||I===6&&Q===T-7||I===T-7&&Q===6||w.setRegion(I-2,Q-2,5,5,!0)}return w.setRegion(6,9,1,T-17,!0),w.setRegion(9,6,T-17,1,!0),M.versionNumber>6&&(w.setRegion(T-11,0,3,6,!0),w.setRegion(0,T-11,6,3,!0)),w}function C(M,T,w){for(var R=y[w.dataMask],L=M.height,I=b(T),O=[],$=0,Q=0,le=!0,W=L-1;W>0;W-=2){W===6&&W--;for(var Y=0;Y<L;Y++)for(var P=le?L-1-Y:Y,V=0;V<2;V++){var X=W-V;if(!I.get(X,P)){Q++;var fe=M.get(X,P);R({y:P,x:X})&&(fe=!fe),$=g(fe,$),Q===8&&(O.push($),Q=0,$=0)}}le=!le}return O}function v(M){var T=M.height,w=Math.floor((T-17)/4);if(w<=6)return f.VERSIONS[w-1];for(var R=0,L=5;L>=0;L--)for(var I=T-9;I>=T-11;I--)R=g(M.get(I,L),R);for(var O=0,I=5;I>=0;I--)for(var L=T-9;L>=T-11;L--)O=g(M.get(I,L),O);for(var $=1/0,Q,le=0,W=f.VERSIONS;le<W.length;le++){var Y=W[le];if(Y.infoBits===R||Y.infoBits===O)return Y;var P=h(R,Y.infoBits);P<$&&(Q=Y,$=P),P=h(O,Y.infoBits),P<$&&(Q=Y,$=P)}if($<=3)return Q}function k(M){for(var T=0,w=0;w<=8;w++)w!==6&&(T=g(M.get(w,8),T));for(var R=7;R>=0;R--)R!==6&&(T=g(M.get(8,R),T));for(var L=M.height,I=0,R=L-1;R>=L-7;R--)I=g(M.get(8,R),I);for(var w=L-8;w<L;w++)I=g(M.get(w,8),I);for(var O=1/0,$=null,Q=0,le=p;Q<le.length;Q++){var W=le[Q],Y=W.bits,P=W.formatInfo;if(Y===T||Y===I)return P;var V=h(T,Y);V<O&&($=P,O=V),T!==I&&(V=h(I,Y),V<O&&($=P,O=V))}return O<=3?$:null}function B(M,T,w){var R=T.errorCorrectionLevels[w],L=[],I=0;if(R.ecBlocks.forEach(function(fe){for(var j=0;j<fe.numBlocks;j++)L.push({numDataCodewords:fe.dataCodewordsPerBlock,codewords:[]}),I+=fe.dataCodewordsPerBlock+R.ecCodewordsPerBlock}),M.length<I)return null;M=M.slice(0,I);for(var O=R.ecBlocks[0].dataCodewordsPerBlock,$=0;$<O;$++)for(var Q=0,le=L;Q<le.length;Q++){var W=le[Q];W.codewords.push(M.shift())}if(R.ecBlocks.length>1)for(var Y=R.ecBlocks[0].numBlocks,P=R.ecBlocks[1].numBlocks,$=0;$<P;$++)L[Y+$].codewords.push(M.shift());for(;M.length>0;)for(var V=0,X=L;V<X.length;V++){var W=X[V];W.codewords.push(M.shift())}return L}function _(M){var T=v(M);if(!T)return null;var w=k(M);if(!w)return null;var R=C(M,T,w),L=B(R,T,w.errorCorrectionLevel);if(!L)return null;for(var I=L.reduce(function(V,X){return V+X.numDataCodewords},0),O=new Uint8ClampedArray(I),$=0,Q=0,le=L;Q<le.length;Q++){var W=le[Q],Y=d.decode(W.codewords,W.codewords.length-W.numDataCodewords);if(!Y)return null;for(var P=0;P<W.numDataCodewords;P++)O[$++]=Y[P]}try{return u.decode(O,T.versionNumber)}catch{return null}}function S(M){if(M==null)return null;var T=_(M);if(T)return T;for(var w=0;w<M.width;w++)for(var R=w+1;R<M.height;R++)M.get(w,R)!==M.get(R,w)&&(M.set(w,R,!M.get(w,R)),M.set(R,w,!M.get(R,w)));return _(M)}i.decode=S}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(7),u=l(8),d;(function(v){v.Numeric="numeric",v.Alphanumeric="alphanumeric",v.Byte="byte",v.Kanji="kanji",v.ECI="eci"})(d=i.Mode||(i.Mode={}));var f;(function(v){v[v.Terminator=0]="Terminator",v[v.Numeric=1]="Numeric",v[v.Alphanumeric=2]="Alphanumeric",v[v.Byte=4]="Byte",v[v.Kanji=8]="Kanji",v[v.ECI=7]="ECI"})(f||(f={}));function h(v,k){for(var B=[],_="",S=[10,12,14][k],M=v.readBits(S);M>=3;){var T=v.readBits(10);if(T>=1e3)throw new Error("Invalid numeric value above 999");var w=Math.floor(T/100),R=Math.floor(T/10)%10,L=T%10;B.push(48+w,48+R,48+L),_+=w.toString()+R.toString()+L.toString(),M-=3}if(M===2){var T=v.readBits(7);if(T>=100)throw new Error("Invalid numeric value above 99");var w=Math.floor(T/10),R=T%10;B.push(48+w,48+R),_+=w.toString()+R.toString()}else if(M===1){var T=v.readBits(4);if(T>=10)throw new Error("Invalid numeric value above 9");B.push(48+T),_+=T.toString()}return{bytes:B,text:_}}var g=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function p(v,k){for(var B=[],_="",S=[9,11,13][k],M=v.readBits(S);M>=2;){var T=v.readBits(11),w=Math.floor(T/45),R=T%45;B.push(g[w].charCodeAt(0),g[R].charCodeAt(0)),_+=g[w]+g[R],M-=2}if(M===1){var w=v.readBits(6);B.push(g[w].charCodeAt(0)),_+=g[w]}return{bytes:B,text:_}}function y(v,k){for(var B=[],_="",S=[8,16,16][k],M=v.readBits(S),T=0;T<M;T++){var w=v.readBits(8);B.push(w)}try{_+=decodeURIComponent(B.map(function(R){return"%"+("0"+R.toString(16)).substr(-2)}).join(""))}catch{}return{bytes:B,text:_}}function b(v,k){for(var B=[],_="",S=[8,10,12][k],M=v.readBits(S),T=0;T<M;T++){var w=v.readBits(13),R=Math.floor(w/192)<<8|w%192;R<7936?R+=33088:R+=49472,B.push(R>>8,R&255),_+=String.fromCharCode(u.shiftJISTable[R])}return{bytes:B,text:_}}function C(v,k){for(var B,_,S,M,T=new o.BitStream(v),w=k<=9?0:k<=26?1:2,R={text:"",bytes:[],chunks:[],version:k};T.available()>=4;){var L=T.readBits(4);if(L===f.Terminator)return R;if(L===f.ECI)T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(7)}):T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(14)}):T.readBits(1)===0?R.chunks.push({type:d.ECI,assignmentNumber:T.readBits(21)}):R.chunks.push({type:d.ECI,assignmentNumber:-1});else if(L===f.Numeric){var I=h(T,w);R.text+=I.text,(B=R.bytes).push.apply(B,I.bytes),R.chunks.push({type:d.Numeric,text:I.text})}else if(L===f.Alphanumeric){var O=p(T,w);R.text+=O.text,(_=R.bytes).push.apply(_,O.bytes),R.chunks.push({type:d.Alphanumeric,text:O.text})}else if(L===f.Byte){var $=y(T,w);R.text+=$.text,(S=R.bytes).push.apply(S,$.bytes),R.chunks.push({type:d.Byte,bytes:$.bytes,text:$.text})}else if(L===f.Kanji){var Q=b(T,w);R.text+=Q.text,(M=R.bytes).push.apply(M,Q.bytes),R.chunks.push({type:d.Kanji,bytes:Q.bytes,text:Q.text})}}if(T.available()===0||T.readBits(T.available())===0)return R}i.decode=C}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=(function(){function u(d){this.byteOffset=0,this.bitOffset=0,this.bytes=d}return u.prototype.readBits=function(d){if(d<1||d>32||d>this.available())throw new Error("Cannot read "+d.toString()+" bits");var f=0;if(this.bitOffset>0){var h=8-this.bitOffset,g=d<h?d:h,p=h-g,y=255>>8-g<<p;f=(this.bytes[this.byteOffset]&y)>>p,d-=g,this.bitOffset+=g,this.bitOffset===8&&(this.bitOffset=0,this.byteOffset++)}if(d>0){for(;d>=8;)f=f<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,d-=8;if(d>0){var p=8-d,y=255>>p<<p;f=f<<d|(this.bytes[this.byteOffset]&y)>>p,this.bitOffset+=d}}return f},u.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},u})();i.BitStream=o}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0}),i.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(1),u=l(2);function d(p,y,b,C){var v;y.degree()<b.degree()&&(v=[b,y],y=v[0],b=v[1]);for(var k=y,B=b,_=p.zero,S=p.one;B.degree()>=C/2;){var M=k,T=_;if(k=B,_=S,k.isZero())return null;B=M;for(var w=p.zero,R=k.getCoefficient(k.degree()),L=p.inverse(R);B.degree()>=k.degree()&&!B.isZero();){var I=B.degree()-k.degree(),O=p.multiply(B.getCoefficient(B.degree()),L);w=w.addOrSubtract(p.buildMonomial(I,O)),B=B.addOrSubtract(k.multiplyByMonomial(I,O))}if(S=w.multiplyPoly(_).addOrSubtract(T),B.degree()>=k.degree())return null}var $=S.getCoefficient(0);if($===0)return null;var Q=p.inverse($);return[S.multiply(Q),B.multiply(Q)]}function f(p,y){var b=y.degree();if(b===1)return[y.getCoefficient(1)];for(var C=new Array(b),v=0,k=1;k<p.size&&v<b;k++)y.evaluateAt(k)===0&&(C[v]=p.inverse(k),v++);return v!==b?null:C}function h(p,y,b){for(var C=b.length,v=new Array(C),k=0;k<C;k++){for(var B=p.inverse(b[k]),_=1,S=0;S<C;S++)k!==S&&(_=p.multiply(_,o.addOrSubtractGF(1,p.multiply(b[S],B))));v[k]=p.multiply(y.evaluateAt(B),p.inverse(_)),p.generatorBase!==0&&(v[k]=p.multiply(v[k],B))}return v}function g(p,y){var b=new Uint8ClampedArray(p.length);b.set(p);for(var C=new o.default(285,256,0),v=new u.default(C,b),k=new Uint8ClampedArray(y),B=!1,_=0;_<y;_++){var S=v.evaluateAt(C.exp(_+C.generatorBase));k[k.length-1-_]=S,S!==0&&(B=!0)}if(!B)return b;var M=new u.default(C,k),T=d(C,C.buildMonomial(y,1),M,y);if(T===null)return null;var w=f(C,T[0]);if(w==null)return null;for(var R=h(C,T[1],w),L=0;L<w.length;L++){var I=b.length-1-C.log(w[L]);if(I<0)return null;b[I]=o.addOrSubtractGF(b[I],R[L])}return b}i.decode=g}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0}),i.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=l(0);function u(g,p,y,b){var C=g.x-p.x+y.x-b.x,v=g.y-p.y+y.y-b.y;if(C===0&&v===0)return{a11:p.x-g.x,a12:p.y-g.y,a13:0,a21:y.x-p.x,a22:y.y-p.y,a23:0,a31:g.x,a32:g.y,a33:1};var k=p.x-y.x,B=b.x-y.x,_=p.y-y.y,S=b.y-y.y,M=k*S-B*_,T=(C*S-B*v)/M,w=(k*v-C*_)/M;return{a11:p.x-g.x+T*p.x,a12:p.y-g.y+T*p.y,a13:T,a21:b.x-g.x+w*b.x,a22:b.y-g.y+w*b.y,a23:w,a31:g.x,a32:g.y,a33:1}}function d(g,p,y,b){var C=u(g,p,y,b);return{a11:C.a22*C.a33-C.a23*C.a32,a12:C.a13*C.a32-C.a12*C.a33,a13:C.a12*C.a23-C.a13*C.a22,a21:C.a23*C.a31-C.a21*C.a33,a22:C.a11*C.a33-C.a13*C.a31,a23:C.a13*C.a21-C.a11*C.a23,a31:C.a21*C.a32-C.a22*C.a31,a32:C.a12*C.a31-C.a11*C.a32,a33:C.a11*C.a22-C.a12*C.a21}}function f(g,p){return{a11:g.a11*p.a11+g.a21*p.a12+g.a31*p.a13,a12:g.a12*p.a11+g.a22*p.a12+g.a32*p.a13,a13:g.a13*p.a11+g.a23*p.a12+g.a33*p.a13,a21:g.a11*p.a21+g.a21*p.a22+g.a31*p.a23,a22:g.a12*p.a21+g.a22*p.a22+g.a32*p.a23,a23:g.a13*p.a21+g.a23*p.a22+g.a33*p.a23,a31:g.a11*p.a31+g.a21*p.a32+g.a31*p.a33,a32:g.a12*p.a31+g.a22*p.a32+g.a32*p.a33,a33:g.a13*p.a31+g.a23*p.a32+g.a33*p.a33}}function h(g,p){for(var y=d({x:3.5,y:3.5},{x:p.dimension-3.5,y:3.5},{x:p.dimension-6.5,y:p.dimension-6.5},{x:3.5,y:p.dimension-3.5}),b=u(p.topLeft,p.topRight,p.alignmentPattern,p.bottomLeft),C=f(b,y),v=o.BitMatrix.createEmpty(p.dimension,p.dimension),k=function(w,R){var L=C.a13*w+C.a23*R+C.a33;return{x:(C.a11*w+C.a21*R+C.a31)/L,y:(C.a12*w+C.a22*R+C.a32)/L}},B=0;B<p.dimension;B++)for(var _=0;_<p.dimension;_++){var S=_+.5,M=B+.5,T=k(S,M);v.set(_,B,g.get(Math.floor(T.x),Math.floor(T.y)))}return{matrix:v,mappingFunction:k}}i.extract=h}),(function(r,i,l){Object.defineProperty(i,"__esModule",{value:!0});var o=4,u=.5,d=1.5,f=function(S,M){return Math.sqrt(Math.pow(M.x-S.x,2)+Math.pow(M.y-S.y,2))};function h(S){return S.reduce(function(M,T){return M+T})}function g(S,M,T){var w,R,L,I,O=f(S,M),$=f(M,T),Q=f(S,T),le,W,Y;return $>=O&&$>=Q?(w=[M,S,T],le=w[0],W=w[1],Y=w[2]):Q>=$&&Q>=O?(R=[S,M,T],le=R[0],W=R[1],Y=R[2]):(L=[S,T,M],le=L[0],W=L[1],Y=L[2]),(Y.x-W.x)*(le.y-W.y)-(Y.y-W.y)*(le.x-W.x)<0&&(I=[Y,le],le=I[0],Y=I[1]),{bottomLeft:le,topLeft:W,topRight:Y}}function p(S,M,T,w){var R=(h(b(S,T,w,5))/7+h(b(S,M,w,5))/7+h(b(T,S,w,5))/7+h(b(M,S,w,5))/7)/4;if(R<1)throw new Error("Invalid module size");var L=Math.round(f(S,M)/R),I=Math.round(f(S,T)/R),O=Math.floor((L+I)/2)+7;switch(O%4){case 0:O++;break;case 2:O--;break}return{dimension:O,moduleSize:R}}function y(S,M,T,w){var R=[{x:Math.floor(S.x),y:Math.floor(S.y)}],L=Math.abs(M.y-S.y)>Math.abs(M.x-S.x),I,O,$,Q;L?(I=Math.floor(S.y),O=Math.floor(S.x),$=Math.floor(M.y),Q=Math.floor(M.x)):(I=Math.floor(S.x),O=Math.floor(S.y),$=Math.floor(M.x),Q=Math.floor(M.y));for(var le=Math.abs($-I),W=Math.abs(Q-O),Y=Math.floor(-le/2),P=I<$?1:-1,V=O<Q?1:-1,X=!0,fe=I,j=O;fe!==$+P;fe+=P){var z=L?j:fe,Z=L?fe:j;if(T.get(z,Z)!==X&&(X=!X,R.push({x:z,y:Z}),R.length===w+1))break;if(Y+=W,Y>0){if(j===Q)break;j+=V,Y-=le}}for(var F=[],te=0;te<w;te++)R[te]&&R[te+1]?F.push(f(R[te],R[te+1])):F.push(0);return F}function b(S,M,T,w){var R,L=M.y-S.y,I=M.x-S.x,O=y(S,M,T,Math.ceil(w/2)),$=y(S,{x:S.x-I,y:S.y-L},T,Math.ceil(w/2)),Q=O.shift()+$.shift()-1;return(R=$.concat(Q)).concat.apply(R,O)}function C(S,M){var T=h(S)/h(M),w=0;return M.forEach(function(R,L){w+=Math.pow(S[L]-R*T,2)}),{averageSize:T,error:w}}function v(S,M,T){try{var w=b(S,{x:-1,y:S.y},T,M.length),R=b(S,{x:S.x,y:-1},T,M.length),L={x:Math.max(0,S.x-S.y)-1,y:Math.max(0,S.y-S.x)-1},I=b(S,L,T,M.length),O={x:Math.min(T.width,S.x+S.y)+1,y:Math.min(T.height,S.y+S.x)+1},$=b(S,O,T,M.length),Q=C(w,M),le=C(R,M),W=C(I,M),Y=C($,M),P=Math.sqrt(Q.error*Q.error+le.error*le.error+W.error*W.error+Y.error*Y.error),V=(Q.averageSize+le.averageSize+W.averageSize+Y.averageSize)/4,X=(Math.pow(Q.averageSize-V,2)+Math.pow(le.averageSize-V,2)+Math.pow(W.averageSize-V,2)+Math.pow(Y.averageSize-V,2))/V;return P+X}catch{return 1/0}}function k(S,M){for(var T=Math.round(M.x);S.get(T,Math.round(M.y));)T--;for(var w=Math.round(M.x);S.get(w,Math.round(M.y));)w++;for(var R=(T+w)/2,L=Math.round(M.y);S.get(Math.round(R),L);)L--;for(var I=Math.round(M.y);S.get(Math.round(R),I);)I++;var O=(L+I)/2;return{x:R,y:O}}function B(S){for(var M=[],T=[],w=[],R=[],L=function(z){for(var Z=0,F=!1,te=[0,0,0,0,0],ae=function(ve){var Ge=S.get(ve,z);if(Ge===F)Z++;else{te=[te[1],te[2],te[3],te[4],Z],Z=1,F=Ge;var me=h(te)/7,nt=Math.abs(te[0]-me)<me&&Math.abs(te[1]-me)<me&&Math.abs(te[2]-3*me)<3*me&&Math.abs(te[3]-me)<me&&Math.abs(te[4]-me)<me&&!Ge,ot=h(te.slice(-3))/3,$t=Math.abs(te[2]-ot)<ot&&Math.abs(te[3]-ot)<ot&&Math.abs(te[4]-ot)<ot&&Ge;if(nt){var Ct=ve-te[3]-te[4],we=Ct-te[2],ke={startX:we,endX:Ct,y:z},Je=T.filter(function(vt){return we>=vt.bottom.startX&&we<=vt.bottom.endX||Ct>=vt.bottom.startX&&we<=vt.bottom.endX||we<=vt.bottom.startX&&Ct>=vt.bottom.endX&&te[2]/(vt.bottom.endX-vt.bottom.startX)<d&&te[2]/(vt.bottom.endX-vt.bottom.startX)>u});Je.length>0?Je[0].bottom=ke:T.push({top:ke,bottom:ke})}if($t){var pt=ve-te[4],rt=pt-te[3],ke={startX:rt,y:z,endX:pt},Je=R.filter(function(it){return rt>=it.bottom.startX&&rt<=it.bottom.endX||pt>=it.bottom.startX&&rt<=it.bottom.endX||rt<=it.bottom.startX&&pt>=it.bottom.endX&&te[2]/(it.bottom.endX-it.bottom.startX)<d&&te[2]/(it.bottom.endX-it.bottom.startX)>u});Je.length>0?Je[0].bottom=ke:R.push({top:ke,bottom:ke})}}},xe=-1;xe<=S.width;xe++)ae(xe);M.push.apply(M,T.filter(function(ve){return ve.bottom.y!==z&&ve.bottom.y-ve.top.y>=2})),T=T.filter(function(ve){return ve.bottom.y===z}),w.push.apply(w,R.filter(function(ve){return ve.bottom.y!==z})),R=R.filter(function(ve){return ve.bottom.y===z})},I=0;I<=S.height;I++)L(I);M.push.apply(M,T.filter(function(z){return z.bottom.y-z.top.y>=2})),w.push.apply(w,R);var O=M.filter(function(z){return z.bottom.y-z.top.y>=2}).map(function(z){var Z=(z.top.startX+z.top.endX+z.bottom.startX+z.bottom.endX)/4,F=(z.top.y+z.bottom.y+1)/2;if(S.get(Math.round(Z),Math.round(F))){var te=[z.top.endX-z.top.startX,z.bottom.endX-z.bottom.startX,z.bottom.y-z.top.y+1],ae=h(te)/te.length,xe=v({x:Math.round(Z),y:Math.round(F)},[1,1,3,1,1],S);return{score:xe,x:Z,y:F,size:ae}}}).filter(function(z){return!!z}).sort(function(z,Z){return z.score-Z.score}).map(function(z,Z,F){if(Z>o)return null;var te=F.filter(function(xe,ve){return Z!==ve}).map(function(xe){return{x:xe.x,y:xe.y,score:xe.score+Math.pow(xe.size-z.size,2)/z.size,size:xe.size}}).sort(function(xe,ve){return xe.score-ve.score});if(te.length<2)return null;var ae=z.score+te[0].score+te[1].score;return{points:[z].concat(te.slice(0,2)),score:ae}}).filter(function(z){return!!z}).sort(function(z,Z){return z.score-Z.score});if(O.length===0)return null;var $=g(O[0].points[0],O[0].points[1],O[0].points[2]),Q=$.topRight,le=$.topLeft,W=$.bottomLeft,Y=_(S,w,Q,le,W),P=[];Y&&P.push({alignmentPattern:{x:Y.alignmentPattern.x,y:Y.alignmentPattern.y},bottomLeft:{x:W.x,y:W.y},dimension:Y.dimension,topLeft:{x:le.x,y:le.y},topRight:{x:Q.x,y:Q.y}});var V=k(S,Q),X=k(S,le),fe=k(S,W),j=_(S,w,V,X,fe);return j&&P.push({alignmentPattern:{x:j.alignmentPattern.x,y:j.alignmentPattern.y},bottomLeft:{x:fe.x,y:fe.y},topLeft:{x:X.x,y:X.y},topRight:{x:V.x,y:V.y},dimension:j.dimension}),P.length===0?null:P}i.locate=B;function _(S,M,T,w,R){var L,I,O;try{L=p(w,T,R,S),I=L.dimension,O=L.moduleSize}catch{return null}var $={x:T.x-w.x+R.x,y:T.y-w.y+R.y},Q=(f(w,R)+f(w,T))/2/O,le=1-3/Q,W={x:w.x+le*($.x-w.x),y:w.y+le*($.y-w.y)},Y=M.map(function(V){var X=(V.top.startX+V.top.endX+V.bottom.startX+V.bottom.endX)/4,fe=(V.top.y+V.bottom.y+1)/2;if(S.get(Math.floor(X),Math.floor(fe))){var j=[V.top.endX-V.top.startX,V.bottom.endX-V.bottom.startX,V.bottom.y-V.top.y+1];h(j)/j.length;var z=v({x:Math.floor(X),y:Math.floor(fe)},[1,1,1],S),Z=z+f({x:X,y:fe},W);return{x:X,y:fe,score:Z}}}).filter(function(V){return!!V}).sort(function(V,X){return V.score-X.score}),P=Q>=15&&Y.length?Y[0]:W;return{alignmentPattern:P,dimension:I}}})]).default})})(V0)),V0.exports}var iP=aP();const sP=Wl(iP);function lP({onResult:e,onClose:n}){const r=D.useRef(null),[i,l]=D.useState(null);return D.useEffect(()=>{let o=null,u=0,d=!1;const f=document.createElement("canvas"),h=f.getContext("2d",{willReadFrequently:!0}),g=()=>{const p=r.current;if(!(d||!p||!h)){if(p.readyState>=p.HAVE_ENOUGH_DATA&&p.videoWidth){f.width=p.videoWidth,f.height=p.videoHeight,h.drawImage(p,0,0,f.width,f.height);const{data:y,width:b,height:C}=h.getImageData(0,0,f.width,f.height),v=sP(y,b,C,{inversionAttempts:"dontInvert"});if(v?.data){d=!0,e(v.data);return}}u=requestAnimationFrame(g)}};return navigator.mediaDevices?.getUserMedia({video:{facingMode:"environment"}}).then(p=>{if(d){for(const b of p.getTracks())b.stop();return}o=p;const y=r.current;y&&(y.srcObject=p,y.play(),u=requestAnimationFrame(g))}).catch(p=>l(oP(p))),()=>{if(d=!0,cancelAnimationFrame(u),o)for(const p of o.getTracks())p.stop()}},[e]),x.jsxs("div",{className:"fixed inset-0 z-[60] bg-black",children:[x.jsx("video",{ref:r,muted:!0,playsInline:!0,className:"h-full w-full object-cover"}),x.jsx("div",{className:"pointer-events-none absolute inset-0 grid place-items-center",children:x.jsx("div",{className:"size-60 max-w-[70vw] rounded-3xl border-2 border-white/80 shadow-[0_0_0_100vmax_rgba(0,0,0,0.5)]"})}),x.jsxs("div",{className:"pt-safe absolute inset-x-0 top-0 flex items-center justify-between p-4",children:[x.jsx("span",{className:"rounded-full bg-black/50 px-3 py-1 text-sm text-white",children:"Point at the relay QR"}),x.jsx("button",{type:"button",onClick:n,"aria-label":"Cancel scan",className:"flex size-9 items-center justify-center rounded-full bg-black/50 text-white active:bg-black/70",children:x.jsx(vn,{size:20})})]}),i?x.jsx("div",{className:"pb-safe absolute inset-x-0 bottom-0 bg-black/75 p-4 text-center text-sm leading-relaxed text-white",children:i}):null]})}function oP(e){const n=e instanceof DOMException?e.name:"";return n==="NotAllowedError"?"Camera permission denied. Allow camera access, or paste the token instead.":n==="NotFoundError"||n==="OverconstrainedError"?"No camera found — paste the token instead.":window.isSecureContext?`Camera unavailable (${e instanceof Error?e.message:String(e)}). Paste the token instead.`:"The camera needs HTTPS. Open the relay’s https:// URL, or paste the token."}function cP(){const e=De(h=>h.setToken),[n,r]=D.useState(""),[i,l]=D.useState(!1),[o,u]=D.useState(!1),d=h=>{const g=aw(h);u(!1),g?e(g):l(!0)},f=h=>{h.preventDefault(),d(n)};return o?x.jsx(lP,{onResult:d,onClose:()=>u(!1)}):x.jsxs("div",{className:"pt-safe pb-safe flex h-full flex-col items-center justify-center gap-5 overflow-y-auto px-8 text-center",children:[x.jsx("img",{src:"/icon.svg",alt:"",className:"size-20 rounded-3xl"}),x.jsxs("div",{children:[x.jsx("h1",{className:"text-xl font-semibold",children:"Conductor Remote"}),x.jsx("p",{className:"mt-1 text-sm text-muted",children:"Phone control panel for your local agents"})]}),x.jsxs("p",{className:"max-w-xs text-sm leading-relaxed text-muted",children:["Open the URL the relay printed on startup — it carries your access token (",x.jsx("span",{className:"font-mono text-faint",children:"/#token=…"}),"). Then use"," ",x.jsx("b",{className:"text-text",children:"Add to Home Screen"})," to install it."]}),x.jsxs("form",{onSubmit:f,className:"flex w-full max-w-xs flex-col gap-2",children:[x.jsx("input",{type:"text",inputMode:"text",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:n,onChange:h=>{r(h.target.value),l(!1)},placeholder:"Paste token or URL","aria-label":"Access token or URL",className:"rounded-xl border border-border bg-surface-2 px-3 py-2.5 text-center font-mono text-base text-text placeholder:font-sans placeholder:text-faint"}),x.jsx("button",{type:"submit",className:"pill pill-active justify-center py-2.5",children:"Connect"}),x.jsxs("button",{type:"button",onClick:()=>{l(!1),u(!0)},className:"pill justify-center gap-2 py-2.5",children:[x.jsx(L8,{size:16}),"Scan QR"]}),i?x.jsx("p",{className:"text-xs",style:{color:"var(--color-del)"},children:"Couldn’t find a token in that — paste the token or the full URL, or scan the QR."}):null]}),x.jsxs("p",{className:"max-w-xs text-xs leading-relaxed text-faint",children:["Lost it? Run ",x.jsx("span",{className:"font-mono",children:"yarn service status"})," on your Mac to reprint the QR, then scan it above — no need to retype anything."]})]})}const Jx={voice:"marin",language:"auto"},z5="conductor-remote-voice";function uP(e=localStorage){try{const n=JSON.parse(e.getItem(z5)??"{}");return{voice:YD(n.voice)?n.voice:Jx.voice,language:KD(n.language)?n.language:Jx.language}}catch{return Jx}}function xP(e,n=localStorage){try{n.setItem(z5,JSON.stringify(e))}catch{}}function vr(e,n){return typeof e[n]=="string"?e[n]:null}function dP(e){let n=e;if(typeof n=="string")try{n=JSON.parse(n)}catch{return null}if(!n||typeof n!="object")return null;const r=n,i=vr(r,"type"),l=vr(r,"item_id")??vr(r,"call_id")??"voice-item";if(i==="conversation.item.input_audio_transcription.delta"){const o=vr(r,"delta");return o===null?null:{kind:"input-delta",itemId:l,text:o}}if(i==="conversation.item.input_audio_transcription.completed"){const o=vr(r,"transcript");return o===null?null:{kind:"input-done",itemId:l,text:o}}if(i==="response.output_audio_transcript.delta"||i==="response.audio_transcript.delta"){const o=vr(r,"delta");return o===null?null:{kind:"output-delta",itemId:l,text:o}}if(i==="response.output_audio_transcript.done"||i==="response.audio_transcript.done"){const o=vr(r,"transcript");return o===null?null:{kind:"output-done",itemId:l,text:o}}if(i==="response.output_text.delta"){const o=vr(r,"delta");return o===null?null:{kind:"output-delta",itemId:l,text:o}}if(i==="response.output_text.done"){const o=vr(r,"text");return o===null?null:{kind:"output-done",itemId:l,text:o}}if(i==="response.function_call_arguments.done"){const o=vr(r,"name");return o===null?null:{kind:"tool",itemId:l,name:o}}if(i==="input_audio_buffer.speech_started")return{kind:"speech-started"};if(i==="response.created")return{kind:"response-started"};if(i==="response.done"){const o=r.response&&typeof r.response=="object"?r.response:null,u=o?.error&&typeof o.error=="object"?o.error:null,d=u?vr(u,"message"):null;return d?{kind:"response-done",error:d}:{kind:"response-done"}}if(i==="error"){const o=r.error&&typeof r.error=="object"?r.error:null;return{kind:"error",text:o&&vr(o,"message")||"Voice call failed"}}return null}function fP(e){switch(e){case"voice_roll_call":return"Checking the fleet";case"voice_workspace_overview":return"Refreshing workspace overview";case"voice_next_decision":return"Opening the next decision";case"voice_send_preview":return"Preparing a guarded send";case"voice_send":return"Queueing the approved prompt";default:return"Working with the relay"}}const L5=D.createContext(null);function P0(e){return[...e.values()].join(" ").trimStart()}function hP(e){return e instanceof DOMException&&(e.name==="NotAllowedError"||e.name==="SecurityError")}function pP({children:e}){const[n,r]=D.useState(!1),[i,l]=D.useState("idle"),[o,u]=D.useState(!1),[d,f]=D.useState(null),[h,g]=D.useState([]),[p,y]=D.useState(""),[b,C]=D.useState(""),[v,k]=D.useState(uP),B=D.useRef("idle"),_=D.useRef(v),S=D.useRef(0),M=D.useRef(null),T=D.useRef(null),w=D.useRef(null),R=D.useRef(null),L=D.useRef(null),I=D.useRef(null),O=D.useRef(new Map),$=D.useRef(new Map),Q=D.useRef(new Set),le=D.useRef(new Set),W=D.useRef(new Set),Y=D.useRef(null);_.current=v;const P=D.useCallback(we=>{B.current=we,l(we)},[]),V=D.useCallback(we=>{g(ke=>ke.some(Je=>Je.id===we.id)?ke:[...ke,we])},[]),X=D.useCallback(()=>{O.current.clear(),$.current.clear(),y(""),C("")},[]),fe=D.useCallback(()=>{S.current+=1,Y.current&&clearTimeout(Y.current),Y.current=null;try{T.current?.close()}catch{}try{M.current?.close()}catch{}for(const we of w.current?.getTracks()??[])we.stop();L.current&&(L.current.srcObject=null),M.current=null,T.current=null,w.current=null,R.current=null,L.current=null,I.current=null,X()},[X]),j=D.useCallback(we=>{const ke=I.current;fe(),u(!1),P("idle"),f(we),ke&&Ne.voiceCallEnd(ke).catch(()=>{})},[fe,P]),z=D.useCallback(we=>{const ke=dP(we);if(ke)switch(ke.kind){case"input-delta":O.current.set(ke.itemId,(O.current.get(ke.itemId)??"")+ke.text),y(P0(O.current));return;case"input-done":{O.current.delete(ke.itemId),y(P0(O.current)),!Q.current.has(ke.itemId)&&ke.text.trim()&&(Q.current.add(ke.itemId),V({id:`user:${ke.itemId}`,role:"user",text:ke.text.trim()})),B.current!=="speaking"&&P("thinking");return}case"output-delta":$.current.set(ke.itemId,($.current.get(ke.itemId)??"")+ke.text),C(P0($.current)),P("speaking");return;case"output-done":{const Je=(ke.text||$.current.get(ke.itemId)||"").trim();$.current.delete(ke.itemId),C(P0($.current)),!le.current.has(ke.itemId)&&Je&&(le.current.add(ke.itemId),V({id:`assistant:${ke.itemId}`,role:"assistant",text:Je}));return}case"tool":W.current.has(ke.itemId)||(W.current.add(ke.itemId),V({id:`tool:${ke.itemId}`,role:"activity",text:fP(ke.name)})),P("thinking");return;case"speech-started":P("listening");return;case"response-started":P("thinking");return;case"response-done":ke.error&&f(ke.error),P("connected");return;case"error":f(ke.text),B.current!=="idle"&&P("connected")}},[V,P]),Z=D.useCallback(async()=>{if(B.current!=="idle")return;if(typeof RTCPeerConnection>"u"||!navigator.mediaDevices?.getUserMedia){f("This browser does not support WebRTC calling");return}r(!0),f(null),g([]),X(),Q.current.clear(),le.current.clear(),W.current.clear(),u(!1),P("connecting");const we=++S.current;try{const ke=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(we!==S.current){for(const Ze of ke.getTracks())Ze.stop();return}const Je=ke.getAudioTracks()[0];if(!Je)throw new Error("No microphone was available");Je.enabled=!1,w.current=ke,R.current=Je;const pt=new RTCPeerConnection,rt=pt.createDataChannel("oai-events"),vt=document.createElement("audio");vt.autoplay=!0,vt.setAttribute("playsinline",""),M.current=pt,T.current=rt,L.current=vt,pt.addTrack(Je,ke),pt.addEventListener("track",Ze=>{we===S.current&&(vt.srcObject=Ze.streams[0]??new MediaStream([Ze.track]),vt.play().catch(()=>f("Tap the audio notice to hear this call")))}),rt.addEventListener("message",Ze=>{we===S.current&&z(Ze.data)}),rt.addEventListener("close",()=>{we===S.current&&B.current!=="idle"&&j("The control-room call closed")}),pt.addEventListener("connectionstatechange",()=>{if(we===S.current){if(pt.connectionState==="connected"&&Y.current&&(clearTimeout(Y.current),Y.current=null),pt.connectionState==="failed"||pt.connectionState==="closed")return j("The control-room connection failed");pt.connectionState==="disconnected"&&!Y.current&&(Y.current=setTimeout(()=>{Y.current=null,we===S.current&&pt.connectionState==="disconnected"&&j("The control-room connection was lost")},4e3))}});const Ke=await pt.createOffer();await pt.setLocalDescription(Ke);const it=pt.localDescription?.sdp;if(!it)throw new Error("The browser did not create a WebRTC offer");const En=await Ne.voiceCall(it,_.current.voice,_.current.language);if(we!==S.current){Ne.voiceCallEnd(En.callId).catch(()=>{});return}if(I.current=En.callId,await pt.setRemoteDescription({type:"answer",sdp:En.sdp}),await new Promise((Ze,tn)=>{if(rt.readyState==="open")return Ze();const se=setTimeout(()=>tn(new Error("Voice event channel did not open")),8e3);rt.addEventListener("open",()=>{clearTimeout(se),Ze()},{once:!0})}),await Ne.voiceCallReady(En.callId),we!==S.current)return;Je.enabled=!0,B.current==="connecting"&&P("connected")}catch(ke){if(we!==S.current)return;j(hP(ke)?"Microphone access was denied — allow it in this site’s settings and try again":ke instanceof Error?ke.message:String(ke))}},[X,j,z,P]),F=D.useCallback(()=>{const we=I.current;fe(),u(!1),P("idle"),f(null),we&&Ne.voiceCallEnd(we).catch(()=>{})},[fe,P]),te=D.useCallback(()=>{B.current==="idle"||B.current==="connecting"||u(we=>{const ke=!we;return R.current&&(R.current.enabled=!ke),ke})},[]),ae=D.useCallback(we=>{const ke=we.trim(),Je=T.current;if(!ke||Je?.readyState!=="open"||B.current!=="connected")return!1;const pt=crypto.randomUUID();return V({id:`typed:${pt}`,role:"user",text:ke}),Je.send(JSON.stringify({type:"conversation.item.create",item:{type:"message",role:"user",content:[{type:"input_text",text:ke}]}})),Je.send(JSON.stringify({type:"response.create"})),P("thinking"),!0},[V,P]),xe=D.useCallback(we=>{B.current==="idle"&&k(ke=>{const Je={...ke,...we};return _.current=Je,xP(Je),Je})},[]),ve=D.useCallback(()=>{L.current?.play().then(()=>f(null)).catch(()=>f("This browser is still blocking call audio"))},[]),Ge=D.useCallback(()=>r(!0),[]),me=D.useCallback(()=>r(!1),[]),nt=D.useCallback(()=>f(null),[]),ot=D.useCallback(we=>xe({voice:we}),[xe]),$t=D.useCallback(we=>xe({language:we}),[xe]);D.useEffect(()=>()=>{const we=I.current;fe(),we&&Ne.voiceCallEnd(we).catch(()=>{})},[fe]);const Ct=D.useMemo(()=>({panelOpen:n,status:i,muted:o,error:d,entries:h,inputPartial:p,outputPartial:b,preferences:v,openPanel:Ge,closePanel:me,startCall:Z,endCall:F,toggleMute:te,sendText:ae,dismissError:nt,enableAudio:ve,setVoice:ot,setLanguage:$t}),[n,i,o,d,h,p,b,v,Ge,me,Z,F,te,ae,nt,ve,ot,$t]);return x.jsx(L5.Provider,{value:Ct,children:e})}function P5(){const e=D.useContext(L5);if(!e)throw new Error("useVoiceCall must be used inside VoiceCallProvider");return e}const mP=[["auto","Auto detect"],["no","Norsk"],["en","English"]];function gP(e){return e[0].toUpperCase()+e.slice(1)}function T2(e,n){return e==="idle"?"Not connected":e==="connecting"?"Connecting…":e==="listening"?n?"Microphone muted":"Listening":e==="thinking"?"Checking the fleet…":e==="speaking"?"Orchestrator speaking":n?"Microphone muted":"Connected"}function EP(){const e=P5(),n=De(g=>g.online),[r,i]=D.useState(""),l=D.useRef(null),o=e.status!=="idle",u=e.status==="connected",d=`${e.entries.length}:${e.inputPartial}:${e.outputPartial}`;if(D.useEffect(()=>{if(!e.panelOpen)return;const g=p=>{p.key==="Escape"&&e.closePanel()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e.panelOpen,e.closePanel]),D.useEffect(()=>{if(!e.panelOpen||!d)return;const g=l.current;g&&(g.scrollTop=g.scrollHeight)},[e.panelOpen,d]),!e.panelOpen)return null;const f=g=>{g.preventDefault(),e.sendText(r)&&i("")},h=e.error?.toLowerCase().includes("audio")??!1;return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-[60] bg-black/65 md:block",onClick:e.closePanel,"aria-hidden":!0}),x.jsxs("section",{role:"dialog","aria-modal":"true","aria-label":"Control room call",className:"app-height fade-in pt-safe pb-safe fixed inset-0 z-[60] flex flex-col bg-bg md:inset-x-auto md:inset-y-8 md:left-1/2 md:w-[32rem] md:-translate-x-1/2 md:rounded-3xl md:border md:border-border-soft md:shadow-2xl",children:[x.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b border-border-soft px-4 py-3",children:[x.jsx("div",{className:pe("grid size-9 shrink-0 place-items-center rounded-full bg-surface-2 text-muted",o&&"bg-voice-soft text-voice"),children:x.jsx(H0,{size:18})}),x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("h2",{className:"text-[15px] font-semibold",children:"Control room"}),x.jsx(Hf,{})]}),x.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-muted",children:[o?x.jsx("span",{className:pe("size-1.5 rounded-full bg-voice",(e.status==="listening"||e.status==="speaking")&&"animate-pulse")}):null,x.jsxs("span",{className:"truncate",children:["All workspaces · ",T2(e.status,e.muted)]})]})]}),x.jsx("button",{type:"button",onClick:e.closePanel,"aria-label":o?"Hide call controls":"Close",className:"grid size-9 shrink-0 place-items-center rounded-full text-muted active:bg-surface-2 active:text-text",children:x.jsx(vn,{size:19})})]}),o?x.jsxs(x.Fragment,{children:[x.jsx("div",{ref:l,className:"min-h-0 flex-1 overflow-y-auto px-4 py-5",children:x.jsxs("div",{className:"mx-auto flex max-w-xl flex-col gap-3",children:[e.entries.length===0&&!e.inputPartial&&!e.outputPartial?x.jsx("div",{className:"grid min-h-48 place-items-center text-center",children:x.jsxs("div",{children:[x.jsx(Rn,{size:22,className:"mx-auto mb-3 animate-spin text-voice"}),x.jsx("p",{className:"text-sm text-muted",children:"Opening the fleet channel…"})]})}):null,e.entries.map(g=>g.role==="activity"?x.jsxs("div",{className:"flex items-center justify-center gap-2 py-1 text-xs text-voice",children:[x.jsx("span",{className:"size-1.5 rounded-full bg-voice"}),g.text]},g.id):x.jsx("div",{className:pe("max-w-[88%] rounded-2xl px-3.5 py-2.5 text-sm leading-relaxed",g.role==="user"?"ml-auto rounded-br-md bg-voice-soft text-text":"mr-auto rounded-bl-md bg-surface-2 text-text"),children:g.text},g.id)),e.inputPartial?x.jsx("div",{className:"ml-auto max-w-[88%] rounded-2xl rounded-br-md border border-voice/25 bg-voice-soft/60 px-3.5 py-2.5 text-sm leading-relaxed text-muted",children:e.inputPartial}):null,e.outputPartial?x.jsxs("div",{className:"mr-auto max-w-[88%] rounded-2xl rounded-bl-md bg-surface-2 px-3.5 py-2.5 text-sm leading-relaxed text-text",children:[e.outputPartial,x.jsx("span",{className:"ml-1 inline-block size-1.5 animate-pulse rounded-full bg-voice align-middle"})]}):null]})}),x.jsxs("div",{className:"shrink-0 border-t border-border-soft bg-surface/80 px-4 pb-3 pt-3 backdrop-blur-xl",children:[e.error?x.jsx("button",{type:"button",onClick:h?e.enableAudio:e.dismissError,className:"mb-2 block w-full rounded-xl bg-del/10 px-3 py-2 text-left text-xs leading-snug text-del",children:e.error}):null,x.jsxs("form",{onSubmit:f,className:"flex items-center gap-2",children:[x.jsx("input",{value:r,onChange:g=>i(g.target.value),disabled:!u,placeholder:u?"Type to the orchestrator…":T2(e.status,e.muted),"aria-label":"Message the orchestrator",className:"h-11 min-w-0 flex-1 rounded-xl border border-border bg-bg px-3 text-sm text-text outline-none placeholder:text-faint focus:border-voice/60 disabled:opacity-60"}),x.jsx("button",{type:"submit",disabled:!u||!r.trim(),"aria-label":"Send to orchestrator",className:"grid size-11 shrink-0 place-items-center rounded-xl bg-voice text-white active:opacity-80 disabled:bg-surface-2 disabled:text-faint",children:x.jsx(rB,{size:18})})]}),x.jsxs("div",{className:"mt-3 flex items-center justify-center gap-5",children:[x.jsx("button",{type:"button",onClick:e.toggleMute,disabled:e.status==="connecting","aria-label":e.muted?"Unmute microphone":"Mute microphone","aria-pressed":e.muted,className:pe("grid size-12 place-items-center rounded-full bg-surface-2 text-text active:opacity-75 disabled:text-faint",e.muted&&"bg-voice-soft text-voice"),children:e.muted?x.jsx(UA,{size:20}):x.jsx(z8,{size:20})}),x.jsx("button",{type:"button",onClick:e.endCall,"aria-label":"End call",className:"grid size-12 place-items-center rounded-full bg-del text-white active:opacity-75",children:x.jsx(mk,{size:20})})]})]})]}):x.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-7",children:x.jsxs("div",{className:"mx-auto flex max-w-sm flex-col items-center text-center",children:[x.jsx("div",{className:"mb-5 grid size-16 place-items-center rounded-full bg-voice-soft text-voice",children:x.jsx(H0,{size:27})}),x.jsx("h3",{className:"text-xl font-semibold tracking-tight",children:"Call your fleet"}),x.jsx("p",{className:"mt-2 text-sm leading-relaxed text-muted",children:"One orchestrator checks every workspace, brings you one decision at a time, and can queue an exact prompt only after reading it back for confirmation."}),x.jsxs("div",{className:"mt-7 grid w-full grid-cols-2 gap-3 text-left",children:[x.jsxs("label",{className:"text-xs font-medium text-muted",children:["Voice",x.jsx("select",{value:e.preferences.voice,onChange:g=>e.setVoice(g.target.value),className:"mt-1.5 block h-11 w-full rounded-xl border border-border bg-surface-2 px-3 text-sm text-text [color-scheme:dark]",children:Y8.map(g=>x.jsx("option",{value:g,children:gP(g)},g))})]}),x.jsxs("label",{className:"text-xs font-medium text-muted",children:["Language",x.jsx("select",{value:e.preferences.language,onChange:g=>e.setLanguage(g.target.value),className:"mt-1.5 block h-11 w-full rounded-xl border border-border bg-surface-2 px-3 text-sm text-text [color-scheme:dark]",children:mP.map(([g,p])=>x.jsx("option",{value:g,children:p},g))})]})]}),e.error?x.jsx("button",{type:"button",onClick:e.dismissError,className:"mt-4 block w-full rounded-xl bg-del/10 px-3 py-2 text-left text-xs leading-snug text-del",children:e.error}):null,x.jsxs("button",{type:"button",onClick:()=>{e.startCall()},disabled:!n,className:"mt-6 flex h-12 w-full items-center justify-center gap-2 rounded-xl bg-voice px-4 text-sm font-semibold text-white active:opacity-80 disabled:bg-surface-2 disabled:text-faint",children:[x.jsx(H0,{size:18}),n?"Start fleet call":"Relay offline"]}),x.jsx("p",{className:"mt-3 text-[11px] leading-snug text-faint",children:"AI-generated voice. Microphone audio is sent to OpenAI for this live call."})]})})]})]}),document.body)}const yP=new Intl.NumberFormat("en",{notation:"compact"});function R2(e){return yP.format(Math.max(0,e)).toLowerCase()}function O2(e,n){return`${e.toLocaleString("en")} ${e===1?"line":"lines"} ${n}`}function bP({stats:e,className:n}){if(!e||e.added<=0&&e.removed<=0)return null;const r=[e.added>0?O2(e.added,"added"):null,e.removed>0?O2(e.removed,"removed"):null].filter(Boolean).join(", ");return x.jsxs("span",{className:pe("flex shrink-0 items-center gap-1 font-mono text-[10px] font-medium leading-none tabular-nums",n),title:r,children:[x.jsx("span",{className:"sr-only",children:r}),e.added>0?x.jsxs("span",{className:"text-add","aria-hidden":"true",children:["+",R2(e.added)]}):null,e.removed>0?x.jsxs("span",{className:"text-del","aria-hidden":"true",children:["-",R2(e.removed)]}):null]})}const I5="conductor-remote-theme",CP={light:"#f5f6f8",dark:"#0a0b0e"};function vP(e){return e==="light"||e==="dark"||e==="system"?e:"system"}function U5(e){try{return vP((e??localStorage).getItem(I5))}catch{return"system"}}function AP(e,n){return e==="system"?n?"dark":"light":e}function kP(){return typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches}function H5(e,n=kP()){if(typeof document>"u")return;e==="system"?delete document.documentElement.dataset.theme:document.documentElement.dataset.theme=e;const r=AP(e,n);document.querySelector('meta[name="theme-color"]')?.setAttribute("content",CP[r])}function BP(e,n){try{(n??localStorage).setItem(I5,e)}catch{}H5(e)}function DP(){if(typeof window>"u")return()=>{};const e=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>H5(U5(),e.matches);return e.addEventListener("change",n),n(),()=>e.removeEventListener("change",n)}const Zl=new Uint8Array(512),zd=new Uint8Array(256);let jl=1;for(let e=0;e<255;e++)Zl[e]=jl,zd[jl]=e,jl<<=1,jl&256&&(jl^=285);for(let e=255;e<512;e++)Zl[e]=Zl[e-255];function $5(e,n){return e===0||n===0?0:Zl[zd[e]+zd[n]]}function wP(e){let n=[1];for(let r=0;r<e;r++){const i=new Array(n.length+1).fill(0);for(let l=0;l<n.length;l++)i[l]^=n[l],i[l+1]^=$5(n[l],Zl[r]);n=i}return n}function FP(e,n){const r=wP(n),i=new Array(n).fill(0);for(const l of e){const o=l^i[0];if(i.shift(),i.push(0),o!==0)for(let u=0;u<n;u++)i[u]^=$5(r[u+1],o)}return i}const $f={1:{align:[],ec:10,groups:[[1,16]]},2:{align:[6,18],ec:16,groups:[[1,28]]},3:{align:[6,22],ec:26,groups:[[1,44]]},4:{align:[6,26],ec:18,groups:[[2,32]]},5:{align:[6,30],ec:24,groups:[[2,43]]},6:{align:[6,34],ec:16,groups:[[4,27]]},7:{align:[6,22,38],ec:18,groups:[[4,31]]},8:{align:[6,24,42],ec:22,groups:[[2,38],[2,39]]},9:{align:[6,26,46],ec:22,groups:[[3,36],[2,37]]},10:{align:[6,28,50],ec:26,groups:[[4,43],[1,44]]}};function z2(e){return $f[e].groups.reduce((n,[r,i])=>n+r*i,0)}function L2(e){return e<=9?8:16}function Tl(e,n,r){for(let i=r-1;i>=0;i--)e.push(n>>i&1)}function SP(e){const n=Array.from(new TextEncoder().encode(e));let r=0;for(let C=1;C<=10;C++)if(4+L2(C)+8*n.length<=z2(C)*8){r=C;break}if(r===0)throw new Error(`data too long for a v1–10 QR (${n.length} bytes)`);const i=z2(r)*8,l=[];Tl(l,4,4),Tl(l,n.length,L2(r));for(const C of n)Tl(l,C,8);for(let C=0,v=Math.min(4,i-l.length);C<v;C++)l.push(0);for(;l.length%8!==0;)l.push(0);const o=[236,17];for(let C=0;l.length<i;C++)Tl(l,o[C%2],8);const u=[];for(let C=0;C<l.length;C+=8){let v=0;for(let k=0;k<8;k++)v=v<<1|l[C+k];u.push(v)}const{ec:d,groups:f}=$f[r],h=[];let g=0;for(const[C,v]of f)for(let k=0;k<C;k++){const B=u.slice(g,g+v);g+=v,h.push({data:B,ec:FP(B,d)})}const p=[],y=Math.max(...h.map(C=>C.data.length));for(let C=0;C<y;C++)for(const v of h)C<v.data.length&&p.push(v.data[C]);for(let C=0;C<d;C++)for(const v of h)p.push(v.ec[C]);const b=[];for(const C of p)Tl(b,C,8);return{version:r,bits:b}}function NP(e,n){const r=e*4+17,i=Array.from({length:r},()=>new Array(r).fill(!1)),l=Array.from({length:r},()=>new Array(r).fill(!1)),o=(p,y)=>{for(let b=-1;b<=7;b++)for(let C=-1;C<=7;C++){const v=p+b,k=y+C;if(v<0||v>=r||k<0||k>=r)continue;const B=b>=0&&b<=6&&(C===0||C===6)||C>=0&&C<=6&&(b===0||b===6),_=b>=2&&b<=4&&C>=2&&C<=4;i[v][k]=B||_,l[v][k]=!0}};o(0,0),o(0,r-7),o(r-7,0);for(let p=8;p<r-8;p++){const y=p%2===0;l[6][p]||(i[6][p]=y,l[6][p]=!0),l[p][6]||(i[p][6]=y,l[p][6]=!0)}const u=$f[e].align;for(let p=0;p<u.length;p++)for(let y=0;y<u.length;y++){if(p===0&&y===0||p===0&&y===u.length-1||p===u.length-1&&y===0)continue;const C=u[p],v=u[y];for(let k=-2;k<=2;k++)for(let B=-2;B<=2;B++)i[C+k][v+B]=Math.max(Math.abs(k),Math.abs(B))!==1,l[C+k][v+B]=!0}for(let p=0;p<=8;p++)p!==6&&(l[8][p]=!0,l[p][8]=!0);for(let p=0;p<8;p++)l[8][r-1-p]=!0,l[r-1-p][8]=!0;if(l[r-8][8]=!0,e>=7)for(let p=0;p<18;p++){const y=r-11+p%3,b=Math.floor(p/3);l[b][y]=!0,l[y][b]=!0}let d=0,f=!0;for(let p=r-1;p>0;p-=2){p===6&&p--;for(let y=0;y<r;y++){const b=f?r-1-y:y;for(let C=0;C<2;C++){const v=p-C;l[b][v]||(i[b][v]=d<n.length?n[d]===1:!1,d++)}}f=!f}e>=7&&jP(i,e,r);let h=null,g=Number.POSITIVE_INFINITY;for(let p=0;p<8;p++){const y=i.map(C=>C.slice());for(let C=0;C<r;C++)for(let v=0;v<r;v++)!l[C][v]&&_P(p,C,v)&&(y[C][v]=!y[C][v]);MP(y,p,r);const b=TP(y);b<g&&(g=b,h=y)}return h}function _P(e,n,r){switch(e){case 0:return(n+r)%2===0;case 1:return n%2===0;case 2:return r%3===0;case 3:return(n+r)%3===0;case 4:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case 5:return n*r%2+n*r%3===0;case 6:return(n*r%2+n*r%3)%2===0;default:return((n+r)%2+n*r%3)%2===0}}function MP(e,n,r){const i=0|n;let l=i;for(let d=0;d<10;d++)l=l<<1^(l>>9&1?1335:0);const o=((i<<10|l&1023)^21522)&32767,u=d=>(o>>d&1)===1;for(let d=0;d<=5;d++)e[d][8]=u(d);e[7][8]=u(6),e[8][8]=u(7),e[8][7]=u(8);for(let d=9;d<15;d++)e[8][14-d]=u(d);for(let d=0;d<8;d++)e[8][r-1-d]=u(d);for(let d=8;d<15;d++)e[r-15+d][8]=u(d);e[r-8][8]=!0}function jP(e,n,r){let i=n;for(let o=0;o<12;o++)i=i<<1^(i>>11&1?7973:0);const l=n<<12|i&4095;for(let o=0;o<18;o++){const u=(l>>o&1)===1,d=r-11+o%3,f=Math.floor(o/3);e[f][d]=u,e[d][f]=u}}function TP(e){const n=e.length;let r=0;const i=f=>{let h=f(0),g=1;for(let p=1;p<n;p++)f(p)===h?g++:(g>=5&&(r+=g-2),h=f(p),g=1);g>=5&&(r+=g-2)};for(let f=0;f<n;f++)i(h=>e[f][h]);for(let f=0;f<n;f++)i(h=>e[h][f]);for(let f=0;f<n-1;f++)for(let h=0;h<n-1;h++){const g=e[f][h];g===e[f][h+1]&&g===e[f+1][h]&&g===e[f+1][h+1]&&(r+=3)}const l=[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],o=[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0],u=(f,h,g)=>{for(let p=0;p<11;p++)if(f(h+p)!==g[p])return!1;return!0};for(let f=0;f<n;f++)for(let h=0;h<=n-11;h++)(u(g=>e[f][g],h,l)||u(g=>e[f][g],h,o))&&(r+=40);for(let f=0;f<n;f++)for(let h=0;h<=n-11;h++)(u(g=>e[g][f],h,l)||u(g=>e[g][f],h,o))&&(r+=40);let d=0;for(let f=0;f<n;f++)for(let h=0;h<n;h++)e[f][h]&&d++;return r+=Math.floor(Math.abs(d/(n*n)*100-50)/5)*10,r}function RP(e){const{version:n,bits:r}=SP(e);return NP(n,r)}function OP({text:e,size:n=220,className:r}){const i=RP(e),l=i.length,o=4,u=l+o*2;let d="";for(let f=0;f<l;f++)for(let h=0;h<l;h++)i[f][h]&&(d+=`M${h+o} ${f+o}h1v1h-1z`);return x.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${u} ${u}`,shapeRendering:"crispEdges",className:r,role:"img","aria-label":"QR code",children:[x.jsx("title",{children:"QR code"}),x.jsx("rect",{width:u,height:u,fill:"#fff"}),x.jsx("path",{d,fill:"#000"})]})}function zP({version:e,onLogs:n,onClose:r}){const i=De(y=>y.token),l=De(y=>y.setToken),[o,u]=D.useState(!1),[d,f]=D.useState(!1),h=i?`${location.origin}/#token=${i}`:location.origin,g=!!e&&e!=="1.106.3",p=async()=>{try{await navigator.clipboard.writeText(h),u(!0),setTimeout(()=>u(!1),1500)}catch{}};return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:r,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Connect a device",className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[85dvh] max-w-sm flex-col items-center gap-4 rounded-t-3xl border border-border-soft bg-surface p-5 shadow-xl md:inset-0 md:m-auto md:h-fit md:rounded-3xl",children:[x.jsxs("div",{className:"flex w-full shrink-0 items-center justify-between",children:[x.jsx("h2",{className:"text-base font-semibold",children:"Connect a device"}),x.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[x.jsx("button",{type:"button",onClick:()=>f(y=>!y),"aria-label":"Disconnect","aria-expanded":d,title:"Disconnect",className:pe("flex size-8 items-center justify-center rounded-full active:bg-surface-2",d?"bg-del/15 text-del":"text-del/80"),children:x.jsx(DA,{size:17})}),x.jsx("button",{type:"button",onClick:r,"aria-label":"Close",className:"flex size-8 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:18})})]})]}),d?x.jsxs("div",{className:"fade-in w-full shrink-0 rounded-xl border border-del/40 bg-del/10 px-3 py-2.5 text-left",children:[x.jsx("p",{className:"text-sm font-medium",children:"Disconnect this device?"}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:"This forgets your access token. To get back in you’ll need the link or QR from the Mac running the relay — this screen can’t show it to you again."}),x.jsxs("div",{className:"mt-2.5 flex gap-2",children:[x.jsx("button",{type:"button",onClick:()=>f(!1),className:"flex-1 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm active:bg-surface",children:"Cancel"}),x.jsx("button",{type:"button",onClick:()=>l(null),className:"flex-1 rounded-lg bg-del px-3 py-2 text-sm font-semibold text-on-solid active:opacity-80",children:"Disconnect"})]})]}):null,x.jsxs("div",{className:"flex w-full min-h-0 flex-1 flex-col items-center gap-4 overflow-y-auto overscroll-contain",children:[x.jsx("p",{className:"text-center text-sm text-muted",children:"Scan on another phone, or re-add this to your home screen. The link carries your access token."}),x.jsx("div",{className:"shrink-0 rounded-2xl bg-white p-3",children:x.jsx(OP,{text:h,size:216})}),x.jsxs("button",{type:"button",onClick:p,className:"flex w-full shrink-0 items-center justify-center gap-2 rounded-xl border border-border bg-surface-2 px-3 py-2.5 text-sm active:bg-surface",children:[o?x.jsx(ma,{size:16}):x.jsx(Wd,{size:16}),o?"Copied":"Copy link"]}),x.jsx(PP,{}),x.jsx(IP,{}),x.jsx(HP,{}),x.jsxs("div",{className:"flex w-full items-center justify-between text-xs text-faint",children:[x.jsxs("span",{className:"font-mono",children:[e?`relay v${e}`:"relay v?"," · ",x.jsxs("span",{className:g?"text-working":void 0,children:["app v","1.106.3"]}),g?" · update pending":""]}),x.jsx("button",{type:"button",onClick:n,className:"shrink-0 text-muted underline-offset-2 hover:underline",children:"Logs"})]})]})]})]}),document.body)}const LP=[["system","System"],["light","Light"],["dark","Dark"]];function PP(){const[e,n]=D.useState(U5),r=De(o=>o.view.showDiffs),i=De(o=>o.setView),l=o=>{n(o),BP(o)};return x.jsxs("div",{className:"w-full shrink-0 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("fieldset",{className:"flex w-full items-center justify-between gap-3 border-0 p-0",children:[x.jsx("legend",{className:"sr-only",children:"Theme"}),x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(PB,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Theme"})]}),x.jsx("div",{className:"flex shrink-0 rounded-lg border border-border bg-surface p-0.5",children:LP.map(([o,u])=>x.jsx("button",{type:"button","aria-pressed":e===o,onClick:()=>l(o),className:pe("rounded-md px-2 py-1 text-xs transition focus-visible:outline-2 focus-visible:outline-accent",e===o?"bg-accent-soft text-accent":"text-muted active:bg-surface-2"),children:u},o))})]}),x.jsxs("div",{className:"mt-2.5 flex items-center justify-between gap-3 border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(N8,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Sidebar diffs"})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":r,"aria-label":"Show line changes in workspace rows",onClick:()=>i({showDiffs:!r}),className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",r?"bg-accent":"border border-border bg-surface"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",r?"translate-x-5":"translate-x-0")})})]}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:"Show line additions and deletions in workspace rows."})]})}function IP(){const e=gF(),n=e.permission==="denied",r=e.support!=="ok"||e.relayDisabled,i=e.relayDisabled?"Turned off on the relay (PUSH_NOTIFY=off).":e.support==="needs-install"?"Add this to your Home Screen first — iOS only allows notifications for installed apps.":e.support==="insecure"?"Needs a secure connection — open the app on its https:// Tailscale URL.":e.support==="unsupported"?"This browser can’t receive push notifications.":n?"Blocked for this app — allow notifications in your device settings, then come back.":e.enabled?`On for this device${e.devices>1?` · ${e.devices} devices subscribed`:""}.`:"Get a ping when an agent finishes its turn or hits an error.";return x.jsxs("div",{className:"w-full shrink-0 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(D8,{size:16,className:pe("shrink-0",e.enabled?"text-accent":"text-muted")}),x.jsx("span",{children:"Notifications"})]}),x.jsx("button",{type:"button",role:"switch","aria-checked":e.enabled,"aria-label":"Notifications on this device",disabled:r||n||e.busy,onClick:()=>{e.enabled?e.disable():e.enable()},className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",e.enabled?"bg-accent":"border border-border bg-surface",(r||n||e.busy)&&"opacity-40"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",e.enabled?"translate-x-5":"translate-x-0")})})]}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:i}),e.error?x.jsx("p",{className:"mt-1 text-xs text-del",children:e.error}):null,e.enabled?x.jsx("button",{type:"button",onClick:()=>{e.test()},disabled:e.busy,className:"mt-1.5 text-xs text-muted underline-offset-2 hover:underline disabled:opacity-50",children:"Send a test notification"}):null]})}const UP=[{label:"1h",seconds:3600},{label:"4h",seconds:4*3600,className:"hidden min-[400px]:block"},{label:"10h",seconds:10*3600}];function ed(e){if(!e)return"until you turn it off";const n=new Date(e),r=n.toDateString()===new Date().toDateString(),i=n.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return r?`until ${i}`:`until ${n.toLocaleDateString([],{weekday:"short"})} ${i}`}function HP(){const[e,n]=D.useState(null),[r,i]=D.useState(!1),[l,o]=D.useState(null),[u,d]=D.useState(!1),[f,h]=D.useState(!1),[g,p]=D.useState(""),[y,b]=D.useState(null),[C,v]=D.useState("idle"),[k,B]=D.useState(null),_=D.useCallback(async()=>{try{n(await Ne.settings()),o(null)}catch(O){o(O instanceof Error?O.message:String(O))}},[]);D.useEffect(()=>{_()},[_]);const S=async O=>{i(!0),o(null);try{return await O(),await _(),!0}catch($){return o($ instanceof Error?$.message:String($)),!1}finally{i(!1)}},M=async O=>{i(!0),o(null);try{const $=await Ne.restartConductor(O);B($.ms??0),v("idle"),await _()}catch($){$ instanceof Dr&&$.status===409&&v("agents"),o($ instanceof Error?$.message:String($))}finally{i(!1)}},T=async O=>{O.preventDefault();const $=PD(g);if($===null){b("Use a duration like 80h, 90m, or a number of seconds.");return}if($<1){b("Choose a duration longer than zero.");return}const Q=e?.nosleep.maxSeconds??168*3600;if($>Q){b(`Choose a duration up to ${Math.round(Q/3600)}h.`);return}b(null),d(!1),await S(()=>Ne.armNoSleep($))&&h(!1)},w=e?.nosleep,R=e?.screenLocked===!0,L=e?.wifi.known??[],I=e?.settings.fallbackSsids[0]??"";return x.jsxs("div",{className:"flex w-full shrink-0 flex-col gap-2.5 rounded-xl border border-border bg-surface-2 px-3 py-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(U8,{size:16,className:pe("shrink-0",w?.armed?"text-accent":"text-muted")}),x.jsx("span",{children:"Keep the Mac awake"})]}),w?.armed?x.jsx("button",{type:"button",disabled:r,onClick:()=>{S(async()=>{const O=await Ne.disarmNoSleep();d(O.willSleep===!0)})},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Let it sleep"}):x.jsxs("div",{className:"flex shrink-0 gap-1",children:[UP.map(O=>x.jsx("button",{type:"button",disabled:r||!w?.available,onClick:()=>{S(()=>(h(!1),b(null),d(!1),Ne.armNoSleep(O.seconds)))},className:pe("rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-40",O.className),children:O.label},O.seconds)),x.jsx("button",{type:"button",disabled:r||!w?.available,"aria-label":"Choose a custom keep-awake duration","aria-expanded":f,onClick:()=>{b(null),h(O=>!O)},className:pe("grid size-[30px] place-items-center rounded-lg border border-border active:bg-surface disabled:opacity-40",f&&"bg-surface text-accent"),children:x.jsx(S8,{size:14})})]})]}),!w?.armed&&f?x.jsxs("form",{onSubmit:T,className:"fade-in flex items-center justify-end gap-1.5",children:[x.jsx("label",{htmlFor:"awake-duration",className:"text-xs text-muted",children:"Keep awake for"}),x.jsx("input",{id:"awake-duration",type:"text",required:!0,value:g,disabled:r,placeholder:"e.g. 80h",autoCapitalize:"none",autoCorrect:"off",onChange:O=>{p(O.target.value),b(null)},className:"h-[30px] w-[6.5rem] rounded-lg border border-border bg-surface px-2 text-xs text-text disabled:opacity-40"}),x.jsx("button",{type:"submit",disabled:r||!g.trim(),className:"h-[30px] rounded-lg bg-accent px-2.5 text-xs font-medium text-on-solid active:opacity-80 disabled:opacity-40",children:r?"Setting…":"Set"})]}):null,y?x.jsx("p",{className:"text-right text-xs text-del",children:y}):null,x.jsx("p",{className:"text-xs text-muted",children:e?w?.available?w.armed?w.preventsScreenLock?R?`Awake ${ed(w.until)}, lid closed. It blocks the idle screen lock from starting; it can’t lift one already up.`:`Awake ${ed(w.until)}, lid closed. The idle screen lock is off; anyone at the Mac can use it.`:`Awake ${ed(w.until)}, lid closed. Sends park if macOS locks.`:u?"The lid is shut, so the Mac is going to sleep now — this app will be unreachable until you wake it.":"Stops system sleep. Screen-lock behavior follows the Mac CLI configuration.":"Run `conductor-remote nosleep setup` on the Mac to install or refresh the helper.":"Checking…"}),R?x.jsxs("p",{className:"text-xs text-del",children:["The Mac is locked right now, so writes park until it’s unlocked. ",x.jsx(ga,{})]}):null,x.jsxs("div",{className:"border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(H8,{size:16,className:pe("shrink-0",e?.settings.autoRejoin?"text-accent":"text-muted")}),x.jsx("span",{children:"Fallback network"})]}),I?x.jsx("button",{type:"button",disabled:r,onClick:()=>{S(()=>Ne.patchSettings({fallbackSsids:[],autoRejoin:!1}))},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Turn off"}):null]}),I?x.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Auto-joins ",x.jsx("span",{className:"text-fg",children:I})," when the primary network drops."]}):x.jsx($P,{known:L,hotspots:e?.wifi.likelyHotspots??[],busy:r,onPick:O=>{S(()=>Ne.patchSettings({fallbackSsids:[O],autoRejoin:!0}))}}),e?.wifi.autoJoinHotspot==="Never"?x.jsx("p",{className:"mt-1 text-xs text-faint",children:"Auto-join Hotspot is off on this Mac (System Settings ▸ Wi-Fi). Your hotspot has to be on and broadcasting before the Mac can join it."}):null]}),x.jsxs("div",{className:"border-t border-border pt-2.5",children:[x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-sm",children:[x.jsx(qk,{size:16,className:"shrink-0 text-muted"}),x.jsx("span",{children:"Restart Conductor"})]}),C==="idle"?x.jsx("button",{type:"button",disabled:r,onClick:()=>{B(null),o(null),v("confirm")},className:"shrink-0 rounded-lg border border-border px-2.5 py-1 text-xs active:bg-surface disabled:opacity-50",children:"Restart"}):null]}),k!==null?x.jsxs("p",{className:"mt-1 text-xs text-muted",children:["Quit and reopened in ",(k/1e3).toFixed(1),"s. Send a prompt to check an agent answers."]}):null,C!=="idle"?x.jsxs("div",{className:"fade-in mt-2 rounded-xl border border-del/40 bg-del/10 px-3 py-2.5 text-left",children:[x.jsx("p",{className:"text-sm font-medium",children:C==="agents"?"Agents are still working":"Restart Conductor?"}),x.jsx("p",{className:"mt-1 text-xs text-muted",children:C==="agents"?"Restarting ends their turns. Everything they have already written stays in the chat.":"The app closes and opens again, which takes about ten seconds. Anything mid-turn stops."}),x.jsxs("div",{className:"mt-2.5 flex gap-2",children:[x.jsx("button",{type:"button",onClick:()=>{v("idle"),o(null)},className:"flex-1 rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm active:bg-surface",children:"Cancel"}),x.jsx("button",{type:"button",disabled:r,onClick:()=>{M(C==="agents")},className:"flex-1 rounded-lg bg-del px-3 py-2 text-sm font-semibold text-on-solid active:opacity-80 disabled:opacity-50",children:r?"Restarting…":C==="agents"?"Stop agents and restart":"Restart"})]})]}):null]}),l?x.jsxs("p",{className:"text-xs text-del",children:[l," ",Fi(l)?x.jsx(ga,{}):null]}):null]})}function $P({known:e,hotspots:n,busy:r,onPick:i}){const[l,o]=D.useState("");if(e.length===0)return x.jsx("p",{className:"mt-1 text-xs text-muted",children:"No saved Wi-Fi networks to offer."});const u=new Set(n),d=l.trim().toLowerCase(),f=e.filter(p=>!d||p.toLowerCase().includes(d)),h=f.find(p=>u.has(p)),g=(h?[h,...f.filter(p=>p!==h)]:f).slice(0,6);return x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"mt-1 text-xs text-muted",children:"Turn your hotspot on before you leave, and the Mac can move to it if the office Wi-Fi drops."}),x.jsx("input",{type:"search",value:l,disabled:r,onChange:p=>o(p.target.value),placeholder:`Search ${e.length} saved networks`,className:"mt-2 w-full rounded-lg border border-border bg-surface px-2 py-1.5 text-xs disabled:opacity-40"}),x.jsxs("div",{className:"mt-1.5 flex flex-col gap-1",children:[g.map(p=>x.jsxs("button",{type:"button",disabled:r,onClick:()=>i(p),className:"flex items-center justify-between gap-2 rounded-lg border border-border px-2.5 py-1.5 text-left text-xs active:bg-surface disabled:opacity-50",children:[x.jsx("span",{className:"truncate",children:p}),u.has(p)?x.jsx("span",{className:"shrink-0 text-faint",children:"likely hotspot"}):null]},p)),g.length===0?x.jsxs("p",{className:"text-xs text-faint",children:["Nothing matches “",l,"”."]}):null]}),!d&&e.length>g.length?x.jsxs("p",{className:"mt-1 text-xs text-faint",children:["Most recently joined. Search to reach the other ",e.length-g.length,"."]}):null]})}const qP={info:"text-muted",warn:"text-working",error:"text-del"};function Xa(e){return String(e).padStart(2,"0")}function GP(e){if(e==null)return"·";const n=new Date(e);return`${Xa(n.getHours())}:${Xa(n.getMinutes())}:${Xa(n.getSeconds())}`}function P2(e){if(e==null)return" ";const n=new Date(e);return`${n.getFullYear()}-${Xa(n.getMonth()+1)}-${Xa(n.getDate())} ${Xa(n.getHours())}:${Xa(n.getMinutes())}:${Xa(n.getSeconds())}`}function VP(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function I2(e){const n=Math.max(0,Math.round(e/1e3));if(n<90)return`${n}s ago`;const r=Math.round(n/60);if(r<60)return`${r}m ago`;const i=Math.round(r/60);return i<48?`${i}h ago`:`${Math.round(i/24)}d ago`}function QP({onClose:e}){const[n,r]=D.useState(null),[i,l]=D.useState(!1),[o,u]=D.useState(null),{data:d,isLoading:f,isError:h,error:g}=xF(n,!0),p=D.useRef(null),y=D.useRef(!0),b=D.useMemo(()=>(d?.entries??[]).filter(k=>!i||k.level!=="info"),[d,i]);D.useEffect(()=>{const k=p.current;k&&y.current&&b.length&&(k.scrollTop=k.scrollHeight)},[b]);const C=async()=>{const k=`# conductor-remote ${n??"live"} log · app v1.106.3 · copied ${P2(Date.now())}`,B=b.map(_=>`${P2(_.t)} ${_.level==="info"?"":_.level.toUpperCase()} ${_.text}`);try{await navigator.clipboard.writeText([k,...B].join(`
|
|
58
58
|
`)),u("ok")}catch{u("failed")}setTimeout(()=>u(null),2e3)},v=[{key:null,label:"Live",hint:d?`since ${I2(d.now-d.startedAt)}`:void 0},...(d?.files??[]).map(k=>({key:k.name,label:k.name,hint:VP(k.size)}))];return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:e,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Relay logs",className:"fade-in pt-safe pb-safe fixed inset-0 z-50 mx-auto flex flex-col bg-bg md:inset-6 md:rounded-3xl md:border md:border-border-soft",children:[x.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border-soft px-4 py-3",children:[x.jsxs("div",{className:"min-w-0",children:[x.jsx("h2",{className:"text-base font-semibold",children:"Relay logs"}),x.jsx("p",{className:"truncate text-xs text-muted",children:d?`${b.length} line${b.length===1?"":"s"} · relay started ${I2(d.now-d.startedAt)}`:"Loading…"})]}),x.jsx("button",{type:"button",onClick:e,"aria-label":"Close",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:18})})]}),x.jsx("div",{className:"flex gap-1.5 overflow-x-auto border-b border-border-soft px-3 py-2",children:v.map(k=>x.jsxs("button",{type:"button",onClick:()=>{y.current=!0,r(k.key)},className:pe("pill shrink-0 whitespace-nowrap",k.key===n&&"pill-active"),children:[k.label,k.hint?x.jsx("span",{className:"ml-1.5 text-[11px] text-faint",children:k.hint}):null]},k.key??"live"))}),n&&d&&!d.managed?x.jsx("p",{className:"border-b border-border-soft bg-working/10 px-4 py-2 text-xs text-working",children:"This file belongs to the installed daemon — this relay isn’t the one writing it. Its own output is under Live."}):null,x.jsx("div",{ref:p,onScroll:k=>{const B=k.currentTarget;y.current=B.scrollHeight-B.scrollTop-B.clientHeight<40},className:"min-h-0 flex-1 overflow-y-auto px-3 py-2 font-mono text-[11px] leading-relaxed",children:f&&!d?x.jsx(cr,{label:"Reading logs…"}):h?x.jsx(Zt,{children:g?.message}):b.length===0?x.jsx(Zt,{children:i?"No warnings or errors logged.":"Nothing logged yet — the relay has been quiet."}):b.map((k,B)=>x.jsxs("div",{className:"flex gap-2 whitespace-pre-wrap break-words py-px",children:[x.jsx("span",{className:"shrink-0 text-faint",children:GP(k.t)}),x.jsx("span",{className:pe("min-w-0 flex-1",qP[k.level]),children:k.text})]},B))}),x.jsxs("div",{className:"flex items-center gap-2 border-t border-border-soft px-3 py-2.5",children:[x.jsx("button",{type:"button",onClick:()=>l(k=>!k),className:pe("pill shrink-0",i&&"pill-active"),children:"Problems only"}),x.jsxs("button",{type:"button",onClick:C,className:"ml-auto flex items-center justify-center gap-2 rounded-xl border border-border bg-surface-2 px-4 py-2.5 text-sm active:bg-surface",children:[o==="ok"?x.jsx(ma,{size:16}):x.jsx(Wd,{size:16}),o==="ok"?"Copied":o==="failed"?"Copy blocked — select by hand":"Copy"]})]})]})]}),document.body)}function YP(e){return e.online?e.repoStatus==="loading"?"Loading repositories…":e.repoStatus==="error"?"Couldn’t load repositories.":e.repoStatus==="empty"?"No Conductor repositories are available.":e.repoStatus==="required"?"Choose a repository to continue.":e.uploading?"Wait for attachments to finish uploading.":e.attachmentError?"Remove failed attachments to continue.":e.workflowMode?e.hasInitialPrompt?e.workflowLoading?"Loading the planning role…":e.workflowReady?null:e.workflowProblem??"The planning role is unavailable.":"Describe what the workflow should accomplish.":null:"Reconnect to the relay to continue."}const q5="conductor-remote-send-immediately",KP=[];function XP(){try{return localStorage.getItem(q5)!=="off"}catch{return!0}}function ZP(e){try{localStorage.setItem(q5,e?"on":"off")}catch{}}function WP(e){e&&Ne.discardStagedAttachment(e).catch(()=>{})}function JP({onClose:e}){const n=dg(),{data:r}=n,i=cc(),l=hg(),o=uf(),u=De(oe=>oe.lastNewWorkspaceRepo),d=De(oe=>oe.setLastNewWorkspaceRepo),[f,h]=D.useState(u),g=De(oe=>oe.drafts[da]??""),p=De(oe=>oe.draftAttachments[da]??KP),y=D.useMemo(()=>p.filter(oe=>!!oe.stageId),[p]),b=De(oe=>oe.setDraft),C=De(oe=>oe.addDraftAttachment),v=De(oe=>oe.removeDraftAttachment),k=De(oe=>oe.clearDraftContent),B=De(oe=>oe.setFocusedDraft),_=oe=>b(da,oe),[S,M]=D.useState({}),[T,w]=D.useState(!1),[R,L]=D.useState(!1),[I,O]=D.useState(XP),[$,Q]=D.useState(!1),[le,W]=D.useState(null),Y=D.useRef(null),P=D.useRef(new Set),V=D.useRef(0),[X,fe]=D.useState([]),[j,z]=D.useState(!1),Z=_i(),F=xr(),te=De(oe=>oe.online);D.useEffect(()=>()=>{De.getState().focusedDraft===da&&B(null),gd()},[B]);const ae=r?.repos??[],xe=ae.find(oe=>oe.name===f);D.useEffect(()=>{ae.length&&!ae.some(oe=>oe.name===f)&&h(ae[0].name)},[f,ae]);const ve=[...y.map(oe=>({...oe,id:oe.path,status:"ready"})),...X],Ge=X.some(oe=>oe.status==="uploading"),me=X.some(oe=>oe.status==="error"),nt=!!g.trim()||y.length>0,ot=i.data?.groups.flatMap(oe=>oe.models)??[],$t=i.data?.defaultModel,Ct=o.data?.roles.planning,we=o.data?.issues.find(oe=>oe.role==="planning"),ke=o.isError?"Could not load delegated roles.":o.data?.warning?o.data.warning:o.data&&!Ct?"Workflow mode needs a configured planning role.":we?.error.message,Je=!!Ct&&!ke,pt=xe?"selected":n.isLoading?"loading":n.isError?"error":ae.length===0?"empty":"required",rt=YP({online:te,repoStatus:pt,uploading:Ge,attachmentError:me,workflowMode:T,hasInitialPrompt:nt,workflowReady:Je,workflowLoading:o.isLoading,workflowProblem:ke}),vt=$||rt!==null,Ke=S.model??$t??null,it=T?Ct?.model??"Planning role":Ke,En=Ef(null,Ke),kn=yf(null,Ke),Ze=bf(null,Ke),tn=IN(Ke,l.data?.defaultEfforts),se=T?Ct?.effort:S.effort??tn,Ee=Object.keys(S).length>0,_e=D.useCallback(oe=>M(gt=>{const wt={...gt,...oe};return Object.fromEntries(Object.entries(wt).filter(([,nn])=>nn!==void 0))}),[]);D.useEffect(()=>{!En&&S.plan!==void 0&&_e({plan:void 0})},[En,S.plan,_e]),D.useEffect(()=>{!kn&&S.effort!==void 0&&_e({effort:void 0}),!Ze&&S.fast!==void 0&&_e({fast:void 0})},[S.effort,S.fast,kn,Ze,_e]);const Ve=oe=>{const gt=y.find(wt=>wt.path===oe);if(gt){v(da,gt.path);return}P.current.add(oe),fe(wt=>wt.filter(nn=>nn.id!==oe))},st=async oe=>{if(te)for(const gt of Array.from(oe)){const wt=crypto.randomUUID();fe(nn=>[...nn,{id:wt,name:gt.name||"attachment",status:"uploading"}]);try{const nn=await Ne.stageAttachment(gt);if(P.current.delete(wt)){WP(nn.attachment.stageId);continue}C(da,nn.attachment),fe(Ae=>Ae.filter(U=>U.id!==wt))}catch(nn){if(P.current.delete(wt))continue;fe(Ae=>Ae.map(U=>U.id===wt?{...U,status:"error",error:nn instanceof Error?nn.message:"Upload failed"}:U))}}},It=oe=>{oe?.length&&st(oe)},cn=oe=>Array.from(oe.dataTransfer.types).includes("Files"),Qt=oe=>{cn(oe)&&(oe.preventDefault(),V.current+=1,z(!0))},Dt=oe=>{cn(oe)&&(V.current-=1,V.current<=0&&(V.current=0,z(!1)))},Yt=oe=>{cn(oe)&&(oe.preventDefault(),oe.dataTransfer.dropEffect="copy")},re=oe=>{cn(oe)&&(oe.preventDefault(),V.current=0,z(!1),It(oe.dataTransfer.files))},mt=D.useCallback(()=>{for(const oe of X)P.current.add(oe.id);e()},[X,e]),At=async()=>{const oe=g.trim();if(!vt){Q(!0),W(null);try{const gt=await Ne.createWorkspace({repo:f,prompt:oe,sendImmediately:I,attachmentIds:y.flatMap(wt=>wt.stageId?[wt.stageId]:[]),...T?{workflow:!0}:S});if(!gt.ok||!gt.workspaceId){W(gt.error??"could not create the workspace");return}await F.invalidateQueries({queryKey:["state"]}),k(da),e(),Z(`/w/${gt.workspaceId}`)}catch(gt){W(gt instanceof Error?gt.message:"could not create the workspace")}finally{Q(!1)}}};return D.useEffect(()=>{const oe=gt=>{gt.key==="Escape"&&(R?L(!1):mt())};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[mt,R]),qr.createPortal(x.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-bg",children:[x.jsxs("header",{className:"pt-safe flex items-center gap-2 border-b border-border-soft px-3 pb-2.5",children:[x.jsx("span",{className:"flex-1 text-[15px] font-semibold",children:"New workspace"}),x.jsx("button",{type:"button",onClick:mt,"aria-label":"Close",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})})]}),x.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-3",children:[x.jsxs("div",{className:"relative",children:[x.jsxs("button",{type:"button",onClick:()=>L(oe=>!oe),"aria-haspopup":"menu","aria-expanded":R,className:"flex w-full items-center gap-3 rounded-2xl border border-border bg-surface px-3 py-2.5 text-left transition active:bg-surface-2",children:[xe?x.jsx(Ql,{icon:xe.icon,name:xe.name,artwork:"inset"}):null,x.jsx("span",{className:"min-w-0 flex-1 truncate text-[15px] font-medium",children:xe?.name??"Choose a repo"}),x.jsx(Ea,{size:18,className:pe("shrink-0 text-muted transition",R&&"rotate-180")})]}),R?x.jsx("ul",{className:"absolute inset-x-0 top-full z-10 mt-1 max-h-72 overflow-y-auto rounded-2xl border border-border bg-surface py-1 shadow-xl",children:ae.map(oe=>x.jsx("li",{children:x.jsxs("button",{type:"button",onClick:()=>{h(oe.name),d(oe.name),L(!1)},className:"flex w-full items-center gap-3 px-3 py-2 text-left active:bg-surface-2",children:[x.jsx(Ql,{icon:oe.icon,name:oe.name,artwork:"inset"}),x.jsx("span",{className:"min-w-0 flex-1 truncate text-[15px]",children:oe.name}),oe.name===f?x.jsx(ma,{size:16,className:"shrink-0 text-accent"}):null]})},oe.name))}):null]}),x.jsxs("fieldset",{"aria-label":"First message",onDragEnter:Qt,onDragLeave:Dt,onDragOver:Yt,onDrop:re,className:pe("relative m-0 min-w-0 rounded-2xl border border-border bg-surface p-2 has-[textarea:focus]:border-accent/60",j&&"border-accent bg-accent-soft"),children:[x.jsx("input",{ref:Y,type:"file",multiple:!0,className:"hidden",onChange:oe=>{It(oe.target.files),oe.target.value=""}}),ve.length?x.jsx("div",{className:"flex flex-wrap gap-1 px-2 pb-1",children:ve.map(oe=>x.jsxs("div",{title:oe.error??oe.name,className:"flex max-w-full items-center gap-1 rounded-lg bg-surface-2 py-1 pl-2 pr-1 text-xs text-muted",children:[oe.status==="uploading"?x.jsx(Rn,{size:12,className:"shrink-0 animate-spin"}):null,x.jsx("span",{className:"truncate",children:oe.status==="error"?`${oe.name}: ${oe.error}`:oe.name}),x.jsx("button",{type:"button",onClick:()=>Ve(oe.id),"aria-label":`Remove ${oe.name}`,className:"flex size-5 shrink-0 items-center justify-center rounded active:bg-surface",children:x.jsx(vn,{size:13})})]},oe.id))}):null,x.jsx("textarea",{value:g,onChange:oe=>_(oe.target.value),onFocus:()=>B(da),onBlur:()=>{De.getState().focusedDraft===da&&B(null),gd()},placeholder:T?"What should the workflow accomplish?":"What should the agent do? (optional)",rows:6,autoFocus:!0,className:"block w-full resize-none bg-transparent px-2 py-1 text-base outline-none placeholder:text-faint",onPaste:oe=>{const gt=oe.clipboardData.files;gt.length&&(oe.preventDefault(),It(gt))},onKeyDown:oe=>{w5(oe)&&(oe.preventDefault(),At())}}),x.jsxs("div",{className:"mt-1 flex items-start gap-1 px-1",children:[x.jsx(S5,{model:it??"Model",providerModel:T?Ct?.model??null:it,agentType:T&&Ct?Ds(Ct.model)??null:null,models:ot,modelsFetching:i.isFetching,modelsError:i.isError,defaultModel:$t,fast:T?Ct?.fast:S.fast,effort:se,plan:T?void 0:S.plan,showEmptyEffort:!0,modelStaged:!T&&S.model!==void 0,fastStaged:!T&&S.fast!==void 0,effortStaged:!T&&S.effort!==void 0,planStaged:!T&&S.plan!==void 0,onModelChange:oe=>_e({model:oe===(S.model??$t)?void 0:oe}),onFastChange:()=>_e({fast:S.fast===void 0?!0:S.fast?!1:void 0}),onEffortChange:()=>_e({effort:UN(se,tn)}),onPlanChange:()=>_e({plan:S.plan===void 0?!0:S.plan?!1:void 0}),disabled:T,hidePlan:T,beforeModel:x.jsx(N5,{active:T,onChange:oe=>{w(oe),W(null)}}),status:T?Je?"Planning root · delegates configured roles into sibling chats":o.isLoading?"Loading the planning role…":void 0:Ee?"Applies when the workspace opens":void 0}),x.jsx("button",{type:"button",onClick:()=>Y.current?.click(),disabled:!te,"aria-label":"Attach files",className:"flex size-8 shrink-0 items-center justify-center rounded-md text-muted transition active:bg-surface-2 active:text-text disabled:text-faint",children:x.jsx(sc,{size:17})})]}),T&&ke?x.jsx("div",{className:"px-2 pb-1 text-xs text-del",children:ke}):null,j?x.jsx("div",{className:"pointer-events-none absolute inset-1 z-10 flex items-center justify-center rounded-xl border border-dashed border-accent bg-accent-soft/90 text-sm font-medium text-accent",children:"Drop files to attach"}):null]}),x.jsxs("label",{className:pe("flex items-start gap-3 rounded-2xl border border-border bg-surface px-3 py-2.5 transition active:bg-surface-2",!nt&&"opacity-40"),children:[x.jsx("input",{type:"checkbox",checked:I,disabled:!nt,onChange:oe=>{O(oe.target.checked),ZP(oe.target.checked)},className:"sr-only"}),x.jsx("span",{className:pe("mt-0.5 flex size-[18px] shrink-0 items-center justify-center rounded-md border transition",I?"border-accent bg-accent text-bg":"border-border"),children:I?x.jsx(ma,{size:13,strokeWidth:3}):null}),x.jsxs("span",{className:"min-w-0 flex-1",children:[x.jsx("span",{className:"block text-[15px] font-medium",children:"Send immediately"}),x.jsx("span",{className:"block text-xs text-muted",children:I?"The prompt goes as soon as the chat and attached files are ready, without waiting for setup.":"The prompt waits until the worktree has finished setting up."})]})]}),le?x.jsx("div",{className:"text-xs text-del",children:le}):null]}),x.jsxs("div",{className:"pb-safe border-t border-border-soft p-3",children:[x.jsx("div",{className:"mb-2 min-h-4 text-center text-xs leading-4 text-muted","aria-live":"polite",children:rt?x.jsx("span",{id:"new-workspace-create-reason",children:rt}):null}),x.jsx("button",{type:"button",onClick:At,disabled:vt,"aria-describedby":rt?"new-workspace-create-reason":void 0,className:"w-full rounded-2xl bg-accent px-4 py-3 text-[15px] font-semibold text-bg transition active:scale-[0.985] disabled:opacity-40",children:$?T?"Starting workflow…":"Creating…":T?"Start workflow":nt?"Create & start":"Create empty workspace"})]})]}),document.body)}function eI(e){return e.replaceAll("_"," ").replace(/\b\w/g,n=>n.toUpperCase())}function tI(e){return{free:"Free",go:"Go",plus:"Plus",pro:"Pro",prolite:"Pro Lite",max:"Max",team:"Team",business:"Business",enterprise:"Enterprise",edu:"Education",self_serve_business_usage_based:"Business",enterprise_cbp_usage_based:"Enterprise"}[e]??eI(e)}function nI(e,n=Date.now()){if(e===null)return"Reset time unavailable";const r=e-n;return r>0&&r<3600*1e3?`Resets in ${Math.max(1,Math.round(r/6e4))}m`:r>0&&r<1440*60*1e3?`Resets in ${Math.max(1,Math.round(r/36e5))}h`:`Resets ${new Date(e).toLocaleString([],{weekday:"short",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`}function rI({window:e}){const n=Math.round(e.usedPercent);return x.jsxs("div",{children:[x.jsxs("div",{className:"mb-1 flex items-baseline gap-2 text-xs",children:[x.jsxs("span",{className:"min-w-0 flex-1 truncate text-muted",children:[e.active?x.jsx("span",{className:"mr-1.5 inline-block size-1.5 rounded-full bg-working"}):null,e.label]}),x.jsxs("span",{className:"font-medium tabular-nums text-text",children:[n,"%"]})]}),x.jsx("div",{role:"progressbar","aria-label":`${e.label}: ${n}% used`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":n,className:"h-1.5 overflow-hidden rounded-full bg-surface",children:x.jsx("div",{className:pe("h-full rounded-full transition-[width]",n>=95?"bg-del":n>=80?"bg-working":"bg-accent"),style:{width:`${e.usedPercent}%`}})}),x.jsx("div",{className:"mt-1 text-[11px] text-faint",children:nI(e.resetsAt)})]})}const aI=[{provider:"claude",label:"Claude Code"},{provider:"codex",label:"Codex"},{provider:"cursor",label:"Cursor Agent"},{provider:"opencode",label:"OpenCode"}];function G5(e){return e==="claude"||e==="codex"?e:null}function iI({usage:e,defaultEffort:n,defaultsLoading:r=!1,savingDefault:i=!1,onDefaultEffortChange:l}){const o=G5(e.provider),u=n&&!Bi.includes(n)?n:null,d=e.buckets.filter(f=>f.label!=="GPT-5.3-Codex-Spark"||f.windows.some(h=>h.usedPercent!==0));return x.jsxs("section",{className:"rounded-2xl border border-border bg-surface-2 p-3.5",children:[x.jsxs("div",{className:pe("flex items-center gap-2",(o||d.length)&&"mb-3"),children:[x.jsx(ao,{agentType:e.provider,model:null,className:"size-5"}),x.jsx("h3",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:e.label}),e.plan?x.jsx("span",{className:"pill shrink-0 text-[11px]",children:tI(e.plan)}):null]}),o?x.jsxs("label",{className:"mb-3 flex items-center justify-between gap-3 rounded-xl border border-border-soft bg-surface px-3 py-2",children:[x.jsxs("span",{className:"min-w-0",children:[x.jsx("span",{className:"block text-xs font-medium",children:"Default effort"}),x.jsx("span",{className:"block text-[11px] text-faint",children:"New chats"})]}),x.jsxs("span",{className:"relative shrink-0",children:[x.jsxs("select",{"aria-label":`${e.label} default effort`,value:n??"",disabled:r||i||!l,onChange:f=>l?.(f.target.value),className:"h-8 min-w-28 appearance-none rounded-lg border border-border bg-surface-2 py-1 pl-2.5 pr-7 text-xs text-text outline-none disabled:opacity-50",children:[x.jsx("option",{value:"",disabled:!0,children:r?"Reading…":"Choose effort"}),u?x.jsx("option",{value:u,children:u}):null,Bi.map(f=>x.jsx("option",{value:f,children:Yl[f]},f))]}),x.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-2 flex items-center text-faint",children:i?x.jsx(no,{size:12,className:"animate-spin"}):x.jsx(Ea,{size:12})})]})]}):null,d.length?x.jsx("div",{className:"space-y-4",children:d.map(f=>x.jsxs("div",{className:"space-y-3",children:[d.length>1||f.label!==e.label?x.jsx("div",{className:"text-xs font-medium text-muted",children:f.label}):null,f.windows.map(h=>x.jsx(rI,{window:h},h.id))]},f.id))}):e.status==="error"&&o?x.jsx("p",{className:"text-xs text-del",children:e.message??"Could not read plan usage."}):null]})}function sI(e){return new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function lI({onClose:e}){const n=dF(!0),r=hg(),i=xr(),[l,o]=D.useState(!1),[u,d]=D.useState(),[f,h]=D.useState(),[g,p]=D.useState(),y=aI.map(v=>n.data?.providers.find(k=>k.provider===v.provider)??{...v,status:"unavailable",plan:null,buckets:[]}),b=async()=>{if(!l){o(!0),d(void 0);try{const v=await Ne.planUsage(!0);i.setQueryData(["plan-usage"],v)}catch(v){d(v instanceof Error?v.message:"Could not refresh plan usage.")}finally{o(!1)}}},C=async(v,k)=>{if(f)return;h(v),p(void 0);const B=r.data;B&&i.setQueryData(["model-defaults"],{defaultEfforts:{...B.defaultEfforts,[v]:k}});try{const _=await Ne.patchModelDefaults({[v]:k});i.setQueryData(["model-defaults"],_)}catch(_){B&&i.setQueryData(["model-defaults"],B),p(_ instanceof Error?_.message:"Could not save the default effort.")}finally{h(void 0)}};return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/60",onClick:e,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Models",className:"fade-in pb-safe fixed inset-x-0 bottom-0 z-50 mx-auto flex max-h-[85dvh] max-w-md flex-col rounded-t-3xl border border-border-soft bg-surface shadow-xl md:inset-0 md:m-auto md:h-fit md:rounded-3xl",children:[x.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b border-border-soft px-4 py-3",children:[x.jsxs("div",{className:"min-w-0 flex-1",children:[x.jsx("h2",{className:"text-base font-semibold",children:"Models"}),x.jsx("p",{className:"truncate text-xs text-muted",children:"Defaults and plan usage"})]}),x.jsx("button",{type:"button",onClick:()=>{b()},disabled:l||!n.data&&n.isLoading,"aria-label":"Refresh plan usage",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 disabled:opacity-40",children:x.jsx(no,{size:17,className:l?"animate-spin":void 0})}),x.jsx("button",{type:"button",onClick:e,"aria-label":"Close",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:18})})]}),x.jsxs("div",{className:"min-h-0 flex-1 space-y-3 overflow-y-auto overscroll-contain p-4",children:[y.map(v=>{const k=G5(v.provider);return x.jsx(iI,{usage:v,defaultEffort:k?r.data?.defaultEfforts[k]:void 0,defaultsLoading:r.isLoading||f!==void 0,savingDefault:f===k,onDefaultEffortChange:k?B=>{C(k,B)}:void 0},v.provider)}),n.isLoading&&!n.data?x.jsx("p",{className:"text-center text-xs text-faint",children:"Reading plan usage…"}):n.isError&&!n.data?x.jsx(Zt,{children:n.error?.message??"Could not read plan usage."}):null,u?x.jsx("p",{className:"text-xs text-del",children:u}):null,g?x.jsx("p",{className:"text-xs text-del",children:g}):null,r.isError?x.jsx("p",{className:"text-xs text-del",children:r.error?.message??"Could not read model defaults."}):null]}),n.data?x.jsxs("div",{className:"shrink-0 border-t border-border-soft px-4 py-2.5 text-[11px] text-faint",children:["Updated ",sI(n.data.fetchedAt)," · cached for one minute"]}):null]})]}),document.body)}function Cs(e){return e.mode==="all"?"All repos":e.repos.length?e.repos.length===1?e.repos[0]:`${e.repos.length} repos`:"No repos"}function V5({repos:e,selected:n,onChange:r}){const i=e.filter(d=>Ed(n,d.name)).length,l=n.mode==="all"||e.length>0&&i===e.length,o=!l&&i>0,u=d=>{r(Ow(e.map(f=>f.name),n,d))};return x.jsxs(x.Fragment,{children:[x.jsx(U2,{checked:l,indeterminate:o,disabled:e.length===0,label:"All repos",className:"sticky top-0 z-[1] mb-0.5 border-b border-border-soft bg-inherit",onChange:()=>r(l?Rw():vs)}),e.map(d=>x.jsx(U2,{checked:Ed(n,d.name),label:d.name,icon:x.jsx(Ql,{icon:d.icon,name:d.name,artwork:"inset"}),onChange:()=>u(d.name)},d.name))]})}function U2({checked:e,indeterminate:n=!1,disabled:r=!1,label:i,icon:l,className:o,onChange:u}){const d=D.useRef(null);return D.useEffect(()=>{d.current&&(d.current.indeterminate=n)},[n]),x.jsxs("label",{className:pe("flex min-w-0 items-center gap-2 px-2 py-0.5 text-left text-sm text-text",r?"cursor-default opacity-50":"cursor-pointer active:bg-surface",o),children:[x.jsx("input",{ref:d,type:"checkbox",checked:e,disabled:r,"aria-checked":n?"mixed":e,onChange:u,className:"peer sr-only"}),l??x.jsx("span",{className:"size-8 shrink-0"}),x.jsx("span",{className:"min-w-0 flex-1 truncate",children:i}),x.jsx("span",{className:pe("flex size-4 shrink-0 items-center justify-center rounded border peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-accent",e||n?"border-accent bg-accent text-on-solid":"border-faint bg-surface"),children:n?x.jsx(VA,{size:12,strokeWidth:3,"aria-hidden":!0}):e?x.jsx(ma,{size:12,strokeWidth:3,"aria-hidden":!0}):null})]})}function oI({query:e,repoSelection:n,includeArchived:r,live:i,selectedId:l,onOpen:o}){const u=nF(e.trim(),250),d=of(n),f=n.mode==="selected"&&d.length===0,{data:h,isError:g,error:p,isFetching:y}=rF(f?"":u,d,r),b=D.useMemo(()=>UD(e),[e]),C=D.useMemo(()=>{const k=new Map;if(b.length)for(const B of i){if(n.mode==="selected"&&!(B.repo_name&&Ed(n,B.repo_name)))continue;const _=[$r(B),B.branch,B.repo_name,B.directory_name,B.session_title].filter(Boolean).join(" ").toLowerCase();b.every(S=>_.includes(S))&&k.set(B.id,{workspace:B,archived:!1,sessionId:null,snippets:[],hits:0})}for(const B of f?[]:h?.results??[]){if(!r&&B.workspace.archived)continue;const _=k.get(B.workspace.id);if(_){_.sessionId=B.sessionId,_.snippets=B.snippets,_.hits=B.hits;continue}k.set(B.workspace.id,{workspace:B.workspace,archived:B.workspace.archived,sessionId:B.sessionId,snippets:B.snippets,hits:B.hits})}return[...k.values()]},[i,h,b,n,f,r]),v=h?.index;return x.jsxs(x.Fragment,{children:[v&&!v.ready?x.jsxs("p",{className:"px-1 pb-2 text-xs text-faint",children:["Indexing chats… ",Math.round(v.progress*100),"% — older conversations aren’t searchable yet."]}):null,v?.error?x.jsxs("p",{className:"px-1 pb-2 text-xs text-del",children:["Chat index unavailable (",v.error,") — searching names only."]}):null,g?x.jsxs("p",{className:"px-1 pb-2 text-xs text-del",children:["Chat search unavailable (",p?.message,") — showing name matches only."]}):null,C.length===0?y||u!==e.trim()?x.jsx(cr,{}):g?null:x.jsx(Zt,{children:f?"No repos selected.":`Nothing matches “${e.trim()}”${d.length?` in ${Cs(n)}`:""}.`}):x.jsx("ul",{className:"flex flex-col gap-2 pb-2",children:C.map(k=>x.jsx("li",{className:"fade-in",children:x.jsx(uI,{row:k,tokens:b,selected:k.workspace.id===l,onOpen:o})},k.workspace.id))})]})}const cI="card w-full flex-col items-stretch gap-0";function uI({row:e,tokens:n,selected:r,onOpen:i}){const l=e.workspace,o=l.directory_name?.toLowerCase(),u=`${$r(l)} ${l.branch??""} ${l.repo_name??""}`.toLowerCase(),d=!!o&&n.some(h=>o.includes(h)&&!u.includes(h)),f=x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-start gap-3",children:[x.jsx(Ql,{icon:l.icon,name:l.repo_name||$r(l),artwork:"inset"}),x.jsxs("div",{className:"min-w-0 flex-1 overflow-hidden",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-text",children:$r(l)}),e.archived?x.jsx("span",{className:"shrink-0 rounded-md bg-surface-2 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-faint",children:"Archived"}):null]}),x.jsxs("div",{className:"mt-1 flex min-w-0 items-center gap-2 text-xs text-muted",children:[l.repo_name?x.jsx("span",{className:"shrink-0 font-mono text-faint",children:l.repo_name}):null,l.branch?x.jsx(F9,{className:"min-w-0 flex-1 truncate",children:l.branch}):null,d?x.jsxs(F9,{className:"shrink-0 text-faint",children:["dir ",l.directory_name]}):null,x.jsx("span",{className:"ml-auto shrink-0 pl-2 text-[11px] text-faint",children:Ig(l.updated_at)})]})]})]}),e.snippets.length?x.jsxs("div",{className:"mt-2 flex flex-col gap-1.5 border-l-2 border-border-soft pl-2.5",children:[e.snippets.map(h=>x.jsx(dI,{snippet:h},`${h.sessionId}:${h.at}:${h.text.slice(0,24)}`)),e.hits>e.snippets.length?x.jsxs("span",{className:"text-[11px] text-faint",children:["+",e.hits-e.snippets.length," more messages"]}):null]}):null]});return x.jsx("button",{type:"button",className:pe(cI,r&&"border-accent/50 bg-surface-2"),onClick:()=>i(l.id,e.sessionId),children:f})}const xI={user:"you",assistant:"agent",thinking:"thought"};function dI({snippet:e}){return x.jsxs("p",{className:"line-clamp-2 text-left text-xs leading-snug text-muted",children:[x.jsx("span",{className:`mr-1.5 text-[10px] uppercase tracking-wide ${e.role==="thinking"?"text-faint italic":"text-faint"}`,children:xI[e.role]}),vS(e.text).map((n,r)=>n.hit?x.jsx("mark",{className:"rounded bg-accent/25 px-0.5 text-text",children:n.text},r):x.jsx("span",{children:n.text},r))]})}function fI({live:e,selectedId:n,onOpen:r,onClose:i}){const[l,o]=D.useState(""),[u,d]=D.useState(vs),[f,h]=D.useState(!0),[g,p]=D.useState(!1),y=D.useRef(null),C=(dg().data?.repos??[]).map(B=>({name:B.name,icon:B.icon}));for(const B of e)B.repo_name&&!C.some(_=>_.name===B.repo_name)&&C.push({name:B.repo_name,icon:B.icon});D.useEffect(()=>y.current?.focus(),[]),D.useEffect(()=>{const B=_=>{_.key==="Escape"&&(g?p(!1):i())};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[i,g]);const v=of(u),k=u.mode==="selected";return qr.createPortal(x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-50 bg-black/50",onClick:i,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Search workspaces and chats",className:"app-height fade-in pt-safe fixed inset-x-0 top-0 z-50 flex flex-col bg-bg md:inset-x-auto md:left-1/2 md:top-16 md:max-h-[70vh] md:w-[36rem] md:max-w-[92vw] md:-translate-x-1/2 md:rounded-2xl md:border md:border-border md:shadow-2xl",children:[x.jsxs("div",{className:"relative flex items-center gap-2 border-b border-border-soft px-3 py-2.5",children:[x.jsxs("div",{className:"relative min-w-0 flex-1",children:[x.jsx(P8,{size:15,className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-faint"}),x.jsx("input",{ref:y,type:"text",inputMode:"search",enterKeyHint:"search",autoCapitalize:"none",autoCorrect:"off",spellCheck:!1,value:l,onChange:B=>o(B.target.value),placeholder:"Search workspaces and chats","aria-label":"Search workspaces and chats",className:"w-full rounded-xl border border-border bg-surface py-2 pl-8 pr-9 text-sm text-text placeholder:text-faint focus:border-accent/50 focus:outline-none"}),l?x.jsx("button",{type:"button",onClick:()=>{o(""),y.current?.focus()},"aria-label":"Clear search",className:"absolute right-1 top-1/2 flex size-7 -translate-y-1/2 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:15})}):null]}),x.jsx("button",{type:"button",onClick:()=>h(B=>!B),"aria-label":"Include archived workspaces","aria-pressed":f,title:f?"Search archived workspaces":"Archived workspaces excluded",className:pe("flex size-9 shrink-0 items-center justify-center rounded-full active:bg-surface-2",f?"border border-accent/50 bg-accent/10 text-text":"text-muted"),children:f?x.jsx(Zd,{size:18}):x.jsx(q7,{size:18})}),x.jsxs("button",{type:"button",onClick:()=>p(B=>!B),"aria-label":k?`Repo filter: ${Cs(u)}`:"Filter by repo","aria-haspopup":"menu","aria-expanded":g,className:pe("flex h-9 shrink-0 items-center justify-center gap-1 rounded-full text-sm active:bg-surface-2",k?"max-w-36 border border-accent/50 bg-accent/10 px-2.5 text-text":"size-9 text-muted"),children:[x.jsx(Cv,{size:k?14:18,className:"shrink-0"}),k?x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"min-w-0 truncate",children:Cs(u)}),x.jsx(Ea,{size:14,className:pe("shrink-0 text-faint transition-transform",g&&"rotate-180")})]}):null]}),x.jsx("button",{type:"button",onClick:i,"aria-label":"Close search",className:"-mr-1 flex size-9 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2",children:x.jsx(vn,{size:20})}),g?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>p(!1),"aria-hidden":!0}),x.jsx("div",{role:"menu","aria-label":"Repos to search",className:"fade-in absolute right-3 top-full z-20 mt-1 flex max-h-72 w-64 flex-col overflow-y-auto rounded-2xl border border-border bg-surface py-1 shadow-xl",children:x.jsx(V5,{repos:C,selected:u,onChange:d})})]}):null]}),x.jsx("div",{className:"pb-safe min-h-0 flex-1 overflow-y-auto overflow-x-hidden px-3 py-3",children:l.trim()?x.jsx(oI,{query:l,repoSelection:u,includeArchived:f,live:e,selectedId:n,onOpen:r}):x.jsxs(Zt,{children:[k?v.length?`Workspaces and chats in ${Cs(u)}`:"No repos selected":"Every workspace on this Mac",f?", archived included":", excluding archived"," — by name, or by something said in the chat. Quote a “phrase” to require it word for word."]})})]})]}),document.body)}function hI(e){return!!(e.pending_prompt?.sessionRole||e.delegations?.length||Object.keys(e.session_roles??{}).length)}function pI(e,n){return e?.length?e.find(i=>i.agentType===(n??"unknown"))?.models??[...new Set(e.flatMap(i=>i.models))]:[]}function mI({workspace:e,modelGroups:n}){if(hI(e))return x.jsxs("span",{title:"Delegated workflow",className:"ml-auto flex min-w-0 items-center gap-1 text-[11px] text-accent",children:[x.jsx(oc,{size:13,"aria-hidden":"true"}),x.jsx("span",{className:"truncate",children:"Workflow"})]});const r=q8(e.model,pI(n,e.agent_type));return r?x.jsxs("span",{className:"ml-auto flex min-w-0 items-center gap-1 text-[11px]",children:[x.jsx(ao,{agentType:e.agent_type,model:e.model,className:"size-3"}),x.jsx("span",{className:"truncate",children:r})]}):null}function gI(e,n){return[...e].sort((r,i)=>{const l=+!!i.pinned_at-+!!r.pinned_at;if(l)return l;if(n==="name")return $r(r).localeCompare($r(i));const o=n==="created"?r.created_at:r.updated_at,u=n==="created"?i.created_at:i.updated_at,d=Xn(u)-Xn(o);return Number.isFinite(d)?d:u.localeCompare(o)})}function EI(e,n){return n==="status"?ff(e):n==="recent"?NS(e.updated_at):e.repo_name??""}function yI(e,n){if(n==="none")return[{key:"all",label:"",items:e}];const r=new Map;for(const i of e){const l=EI(i,n),o=r.get(l);o?o.push(i):r.set(l,[i])}return n==="status"?[...D9,...[...r.keys()].filter(l=>!D9.includes(l))].filter(l=>r.has(l)).map(l=>({key:`status:${l}`,label:Cd(l),status:l,items:r.get(l)??[]})):n==="recent"?FS.filter(i=>r.has(i)).map(i=>({key:`recent:${i}`,label:SS(i),items:r.get(i)??[]})):[...r.keys()].sort((i,l)=>i.localeCompare(l)).map(i=>({key:`repo:${i}`,label:i||"No repo",items:r.get(i)??[]}))}function bI({selectedId:e}){const n=_i(),r=P5(),i=De(ae=>ae.setSidebarOpen),l=De(ae=>ae.view),o=De(ae=>ae.readMarks),u=De(ae=>ae.pending),d=De(ae=>ae.workingHints),f=De(ae=>ae.toggleGroup),[h,g]=D.useState(!1),[p,y]=D.useState(!1),[b,C]=D.useState(!1),[v,k]=D.useState(!1),[B,_]=D.useState(!1),[S,M]=D.useState(!1),[T,w]=D.useState(!1),{data:R,isLoading:L,isError:I,error:O}=xg(),$=R?.workspaces??[],Q=cc().data?.groups;D.useEffect(()=>{const ae=xe=>{(xe.metaKey||xe.ctrlKey)&&!xe.shiftKey&&!xe.altKey&&xe.key.toLowerCase()==="k"&&(xe.preventDefault(),w(ve=>!ve))};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[]);const le=new Map($.map(ae=>[ae.repo_name,ae.icon])),W=of(l.repoSelection),Y=[...new Set([...$.map(ae=>ae.repo_name).filter(ae=>!!ae),...W])].sort().map(ae=>({name:ae,icon:le.get(ae)??null})),P=l.repoSelection.mode==="all"?$:$.filter(ae=>!!ae.repo_name&&W.includes(ae.repo_name)),V=P.filter(ae=>ae.id===e||!(l.hideMerged&&BS(ae)||l.hideDone&&DS(ae))),X=P.length-V.length,fe=yI(gI(V,l.sortBy),l.groupBy),j=(ae,xe=null)=>{n(xe?`/w/${ae}?session=${encodeURIComponent(xe)}`:`/w/${ae}`),i(!1)},z=l.repoSelection.mode==="selected",Z=z||l.hideMerged||l.hideDone,F=Cs(l.repoSelection),te=jw({total:$.length,shown:V.length,hidden:X,repoFiltered:z});return x.jsxs("div",{className:"flex h-full min-w-0 flex-col overflow-hidden",children:[x.jsxs("div",{className:"relative",children:[x.jsx(Gg,{children:x.jsxs("div",{role:"toolbar","aria-label":"Workspace controls",className:"flex w-full items-center justify-between px-3 pb-2.5",children:[x.jsx("button",{type:"button",onClick:()=>w(!0),"aria-label":"Search workspaces and chats",title:"Search (⌘K)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",children:x.jsx(P8,{size:18})}),x.jsx("button",{type:"button",onClick:()=>_(!0),"aria-label":"Models",title:"Models",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",children:x.jsx(Bv,{size:18})}),x.jsxs("button",{type:"button",onClick:()=>g(ae=>!ae),"aria-label":"View options",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",children:[x.jsx(yB,{size:18}),Z?x.jsx("span",{className:"absolute right-1.5 top-1.5 size-1.5 rounded-full bg-accent"}):null]}),x.jsx("button",{type:"button",onClick:()=>y(!0),"aria-label":"Connect a device",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",children:x.jsx(L8,{size:18})}),x.jsx("button",{type:"button",onClick:()=>M(!0),"aria-label":"Open delegated roles",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",children:x.jsx(oc,{size:18})}),x.jsxs("button",{type:"button",onClick:r.openPanel,"aria-label":r.status==="idle"?"Call fleet orchestrator":"Open active call",title:"Control room",className:pe("relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted active:bg-surface-2 min-[360px]:size-9",r.status!=="idle"&&"bg-voice-soft text-voice"),children:[x.jsx(H0,{size:18}),r.status!=="idle"?x.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-voice"}):null]}),x.jsx("button",{type:"button",onClick:()=>C(!0),"aria-label":"New workspace",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-text active:bg-surface-2 min-[360px]:size-9",children:x.jsx(ef,{size:20})})]})}),h?x.jsx(vI,{repos:Y,view:l,summary:te,onClose:()=>g(!1)}):null]}),x.jsx("nav",{className:"pb-safe min-w-0 flex-1 overflow-y-auto overflow-x-hidden px-3 py-3",children:L&&!R?x.jsx(cr,{label:"Loading workspaces…"}):I?x.jsx(GS,{error:O}):$.length===0?x.jsx(Zt,{children:"No active workspaces. Start one in Conductor and it’ll appear here."}):V.length===0?x.jsxs(Zt,{children:[z?W.length?`No workspaces in ${F}`:"No repos selected":"No workspaces",X?` — ${X} ${X===1?"one is":"ones are"} hidden.`:"."]}):fe.map(ae=>{const xe=!!ae.label&&l.collapsed.includes(ae.key);return x.jsxs("section",{children:[ae.label?x.jsxs("button",{type:"button",onClick:()=>f(ae.key),className:"flex w-full items-center gap-2 px-1 py-2 text-sm font-semibold",children:[x.jsx(CI,{status:ae.status}),x.jsx("span",{className:"truncate",children:ae.label}),xe?x.jsx("span",{className:"font-normal text-muted text-xs",children:ae.items.length}):null,x.jsx(Ea,{size:14,className:pe("ml-auto shrink-0 text-faint transition-transform",xe&&"-rotate-90")})]}):null,xe?null:x.jsx("ul",{className:"flex flex-col gap-2 pb-2",children:ae.items.map(ve=>{const Ge=bw(ve,o),me=ve.active_session_id?d[ve.active_session_id]:void 0,nt=J8(u.filter(ot=>ot.workspaceId===ve.id),[...ve.pending_prompt?[ve.pending_prompt]:[],...ve.parked_prompts??[]],me!==void 0&&Date.now()-me<yd);return x.jsx("li",{className:"fade-in",children:x.jsx("button",{type:"button",className:pe("card w-full px-3 py-2.5",ve.id===e?"border-accent/50 bg-surface-2":Ge&&"border-l-accent"),onClick:()=>j(ve.id),children:x.jsx(kI,{w:ve,unread:Ge,selected:ve.id===e,modelGroups:Q,promptState:nt,showDiffs:l.showDiffs})})},ve.id)})})]},ae.key)})}),p?x.jsx(zP,{version:R?.version,onLogs:()=>{y(!1),k(!0)},onClose:()=>y(!1)}):null,b?x.jsx(JP,{onClose:()=>C(!1)}):null,T?x.jsx(fI,{live:$,selectedId:e,onOpen:(ae,xe)=>{w(!1),j(ae,xe)},onClose:()=>w(!1)}):null,v?x.jsx(QP,{onClose:()=>k(!1)}):null,B?x.jsx(lI,{onClose:()=>_(!1)}):null,S?x.jsx(R5,{onClose:()=>M(!1)}):null]})}function CI({status:e}){if(!e)return null;const n=hf[e];return n?x.jsx("span",{className:"dot size-2",style:{background:n}}):x.jsx("span",{className:"dot size-2 border border-faint bg-transparent"})}function vI({repos:e,view:n,summary:r,onClose:i}){const l=De(o=>o.setView);return x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"fixed inset-0 z-20",onClick:i,"aria-hidden":!0}),x.jsxs("div",{role:"dialog","aria-labelledby":"workspace-filters-title","aria-describedby":r?"workspace-filters-summary":void 0,className:"fade-in absolute right-2 top-full z-30 mt-1 flex w-64 flex-col gap-2.5 rounded-2xl border border-border bg-surface p-3 shadow-xl",children:[x.jsxs("div",{className:"border-b border-border-soft pb-2",children:[x.jsx("h2",{id:"workspace-filters-title",className:"text-sm font-semibold text-text",children:"Workspace filters"}),r?x.jsx("p",{id:"workspace-filters-summary",className:"mt-0.5 text-xs text-muted",children:r}):null]}),x.jsx(Ol,{id:"view-group",label:"Group by",children:x.jsx($2,{id:"view-group",value:n.groupBy,onChange:o=>l({groupBy:o}),options:[["status","Status"],["recent","Recent"],["repo","Repo"],["none","None"]]})}),x.jsx(AI,{repos:e,selected:n.repoSelection,onChange:o=>l({repoSelection:o})}),x.jsx(Ol,{id:"view-sort",label:"Sort by",children:x.jsx($2,{id:"view-sort",value:n.sortBy,onChange:o=>l({sortBy:o}),options:[["updated","Updated"],["created","Created"],["name","Name"]]})}),x.jsx(Ol,{id:"view-hide-merged",label:"Hide merged",children:x.jsx(H2,{id:"view-hide-merged",checked:n.hideMerged,label:"Hide workspaces whose PR has merged",onChange:o=>l({hideMerged:o})})}),x.jsx(Ol,{id:"view-hide-done",label:"Hide done",children:x.jsx(H2,{id:"view-hide-done",checked:n.hideDone,label:"Hide workspaces marked Done",onChange:o=>l({hideDone:o})})})]})]})}function AI({repos:e,selected:n,onChange:r}){const[i,l]=D.useState(!1);return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsx(Ol,{id:"view-repo",label:"Repo",children:x.jsxs("button",{id:"view-repo",type:"button",onClick:()=>l(o=>!o),"aria-expanded":i,"aria-controls":"view-repo-options",className:"flex max-w-36 items-center gap-1 rounded-lg border border-border bg-surface-2 px-2 py-1.5 text-sm text-text",children:[x.jsx("span",{className:"truncate",children:Cs(n)}),x.jsx(Ea,{size:14,className:pe("shrink-0 text-faint transition-transform",i&&"rotate-180")})]})}),i?x.jsx("div",{id:"view-repo-options",className:"flex max-h-48 flex-col overflow-y-auto rounded-lg border border-border bg-surface-2 py-0.5",children:x.jsx(V5,{repos:e,selected:n,onChange:r})}):null]})}function H2({id:e,checked:n,label:r,onChange:i}){return x.jsx("button",{id:e,type:"button",role:"switch","aria-checked":n,"aria-label":r,onClick:()=>i(!n),className:pe("relative h-6 w-11 shrink-0 rounded-full transition-colors",n?"bg-accent":"border border-border bg-surface-2"),children:x.jsx("span",{className:pe("absolute left-0.5 top-0.5 size-5 rounded-full bg-white transition-transform",n?"translate-x-5":"translate-x-0")})})}function Ol({id:e,label:n,children:r}){return x.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm text-muted",children:[x.jsx("label",{htmlFor:e,children:n}),r]})}function $2({id:e,value:n,options:r,onChange:i}){return x.jsx("select",{id:e,value:n,onChange:l=>i(l.target.value),className:"max-w-36 truncate rounded-lg border border-border bg-surface-2 px-2 py-1.5 text-sm text-text",children:r.map(([l,o])=>x.jsx("option",{value:l,children:o},l))})}function kI({w:e,unread:n,selected:r,modelGroups:i,promptState:l,showDiffs:o}){return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"relative shrink-0",children:[x.jsx(Ql,{icon:e.icon,name:e.repo_name||$r(e),artwork:"full-bleed"}),x.jsx(IS,{w:e,promptState:l,className:"absolute -right-0.5 -bottom-0.5 bg-surface ring-2 ring-surface"}),e.run_active?x.jsx(US,{className:"absolute -top-0.5 -left-0.5"}):null]}),x.jsxs("div",{className:"min-w-0 flex-1 space-y-1.25 overflow-hidden",children:[x.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[x.jsx("span",{className:pe("min-w-0 truncate text-sm leading-none",n?"font-bold":"font-medium",n||r?"text-text":"text-muted"),children:$r(e)}),e.pinned_at?x.jsx("span",{className:"shrink-0 text-xs text-faint",children:"📌"}):null,n>1?x.jsx(qS,{children:n}):n?x.jsx("span",{className:"dot size-2 bg-accent"}):null]}),o?x.jsx(bP,{stats:e.change_stats}):null]}),x.jsxs("div",{className:"flex min-w-0 items-end gap-2 text-xs text-muted",children:[x.jsx("span",{className:"shrink-0 text-[11px] text-faint",children:Ug(e.updated_at)}),x.jsx(mI,{workspace:e,modelGroups:i})]})]})]})}function BI(){eF();const e=De(n=>n.token);return x.jsxs(x.Fragment,{children:[x.jsx($w,{}),e?x.jsxs(Qb,{children:[x.jsxs(Rl,{element:x.jsx(DI,{}),children:[x.jsx(Rl,{index:!0,element:x.jsx(wI,{})}),x.jsx(Rl,{path:"/w/:workspaceId",element:x.jsx(XL,{})})]}),x.jsx(Rl,{path:"*",element:x.jsx(qb,{to:"/",replace:!0})})]}):x.jsx(cP,{})]})}function DI(){const e=Db("/w/:workspaceId"),n=De(l=>l.sidebarOpen),r=De(l=>l.setSidebarOpen),i=D.useRef(null);return Jw(i),bF(),mF(),tF(),x.jsxs(pP,{children:[x.jsxs("div",{className:"flex h-full overflow-hidden",children:[n?x.jsx("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>r(!1),"aria-hidden":!0}):null,x.jsx("aside",{ref:i,className:pe("fixed inset-y-0 left-0 z-50 flex w-[85%] max-w-80 flex-col border-r border-border-soft bg-bg transition-transform duration-200 ease-out","md:static md:z-auto md:w-72 md:max-w-none md:shrink-0 md:translate-x-0 md:transition-none lg:w-80",n?"translate-x-0":"-translate-x-full"),children:x.jsx(bI,{selectedId:e?.params.workspaceId})}),x.jsx("main",{className:"flex min-w-0 flex-1 flex-col",children:x.jsx(Gb,{})})]}),x.jsx(EP,{})]})}function wI(){const e=De(n=>n.setSidebarOpen);return x.jsxs("div",{className:"grid h-full place-items-center",children:[x.jsx("button",{type:"button",onClick:()=>e(!0),className:"pill pill-active md:hidden",children:"Browse workspaces"}),x.jsx("span",{className:"hidden text-sm text-muted md:block",children:"Select a workspace"})]})}navigator.storage?.persist&&navigator.storage.persist().catch(()=>{});DP();const FI=new k4({defaultOptions:{queries:{staleTime:1e3,retry:1,refetchOnWindowFocus:!0}}}),Q5=document.getElementById("root");if(!Q5)throw new Error("#root missing");$4.createRoot(Q5).render(x.jsx(D.StrictMode,{children:x.jsx(D4,{client:FI,children:x.jsx(E7,{children:x.jsx(BI,{})})})}));export{k8 as _,VN as a,o_ as b,m2 as c,pe as d,a_ as f,l_ as h,x as j,SI as p,D as r,vf as s,ZN as w};
|