@herdctl/web 0.3.1 → 0.3.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.
- package/dist/client/assets/{index-Dboziciv.js → index-B_lzF96w.js} +77 -77
- package/dist/client/index.html +1 -1
- package/dist/server/__tests__/routes.test.js +9 -4
- package/dist/server/__tests__/routes.test.js.map +1 -1
- package/dist/server/__tests__/ws-handler.test.js +2 -2
- package/dist/server/__tests__/ws-handler.test.js.map +1 -1
- package/dist/server/chat/index.d.ts +1 -1
- package/dist/server/chat/index.d.ts.map +1 -1
- package/dist/server/chat/index.js.map +1 -1
- package/dist/server/chat/web-chat-manager.d.ts.map +1 -1
- package/dist/server/chat/web-chat-manager.js +17 -7
- package/dist/server/chat/web-chat-manager.js.map +1 -1
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +11 -13
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/agents.d.ts +1 -1
- package/dist/server/routes/agents.d.ts.map +1 -1
- package/dist/server/routes/agents.js.map +1 -1
- package/dist/server/routes/chat.d.ts +1 -1
- package/dist/server/routes/chat.d.ts.map +1 -1
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/fleet.d.ts +1 -1
- package/dist/server/routes/fleet.d.ts.map +1 -1
- package/dist/server/routes/fleet.js.map +1 -1
- package/dist/server/routes/jobs.d.ts +1 -1
- package/dist/server/routes/jobs.d.ts.map +1 -1
- package/dist/server/routes/jobs.js.map +1 -1
- package/dist/server/routes/schedules.d.ts +1 -1
- package/dist/server/routes/schedules.d.ts.map +1 -1
- package/dist/server/routes/schedules.js.map +1 -1
- package/dist/server/ws/fleet-bridge.d.ts.map +1 -1
- package/dist/server/ws/fleet-bridge.js.map +1 -1
- package/dist/server/ws/handler.d.ts +2 -2
- package/dist/server/ws/handler.d.ts.map +1 -1
- package/dist/server/ws/handler.js.map +1 -1
- package/dist/server/ws/index.d.ts +2 -2
- package/dist/server/ws/index.d.ts.map +1 -1
- package/dist/server/ws/index.js +2 -2
- package/dist/server/ws/index.js.map +1 -1
- package/dist/server/ws/types.d.ts +1 -1
- package/dist/server/ws/types.d.ts.map +1 -1
- package/package.json +8 -7
|
@@ -57,260 +57,263 @@ Error generating stack: `+u.message+`
|
|
|
57
57
|
* @license MIT
|
|
58
58
|
*/var D0="popstate";function Q5(t={}){function l(i,s){let{pathname:o,search:c,hash:d}=i.location;return Cf("",{pathname:o,search:c,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(i,s){return typeof s=="string"?s:xi(s)}return P5(l,r,null,t)}function tt(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function zn(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function K5(){return Math.random().toString(36).substring(2,10)}function O0(t,l){return{usr:t.state,key:t.key,idx:l}}function Cf(t,l,r=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?ua(l):l,state:r,key:l&&l.key||i||K5()}}function xi({pathname:t="/",search:l="",hash:r=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ua(t){let l={};if(t){let r=t.indexOf("#");r>=0&&(l.hash=t.substring(r),t=t.substring(0,r));let i=t.indexOf("?");i>=0&&(l.search=t.substring(i),t=t.substring(0,i)),t&&(l.pathname=t)}return l}function P5(t,l,r,i={}){let{window:s=document.defaultView,v5Compat:o=!1}=i,c=s.history,d="POP",m=null,p=x();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function x(){return(c.state||{idx:null}).idx}function y(){d="POP";let z=x(),M=z==null?null:z-p;p=z,m&&m({action:d,location:T.location,delta:M})}function v(z,M){d="PUSH";let U=Cf(T.location,z,M);p=x()+1;let N=O0(U,p),V=T.createHref(U);try{c.pushState(N,"",V)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(V)}o&&m&&m({action:d,location:T.location,delta:1})}function S(z,M){d="REPLACE";let U=Cf(T.location,z,M);p=x();let N=O0(U,p),V=T.createHref(U);c.replaceState(N,"",V),o&&m&&m({action:d,location:T.location,delta:0})}function C(z){return W5(z)}let T={get action(){return d},get location(){return t(s,c)},listen(z){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(D0,y),m=z,()=>{s.removeEventListener(D0,y),m=null}},createHref(z){return l(s,z)},createURL:C,encodeLocation(z){let M=C(z);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:v,replace:S,go(z){return c.go(z)}};return T}function W5(t,l=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),tt(r,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:xi(t);return i=i.replace(/ $/,"%20"),!l&&i.startsWith("//")&&(i=r+i),new URL(i,r)}function sp(t,l,r="/"){return ey(t,l,r,!1)}function ey(t,l,r,i){let s=typeof l=="string"?ua(l):l,o=tl(s.pathname||"/",r);if(o==null)return null;let c=op(t);ty(c);let d=null;for(let m=0;d==null&&m<c.length;++m){let p=dy(o);d=cy(c[m],p,i)}return d}function op(t,l=[],r=[],i="",s=!1){let o=(c,d,m=s,p)=>{let x={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(i)&&m)return;tt(x.relativePath.startsWith(i),`Absolute route path "${x.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(i.length)}let y=el([i,x.relativePath]),v=r.concat(x);c.children&&c.children.length>0&&(tt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),op(c.children,l,v,y,m)),!(c.path==null&&!c.index)&&l.push({path:y,score:sy(y,c.index),routesMeta:v})};return t.forEach((c,d)=>{var m;if(c.path===""||!((m=c.path)!=null&&m.includes("?")))o(c,d);else for(let p of cp(c.path))o(c,d,!0,p)}),l}function cp(t){let l=t.split("/");if(l.length===0)return[];let[r,...i]=l,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(i.length===0)return s?[o,""]:[o];let c=cp(i.join("/")),d=[];return d.push(...c.map(m=>m===""?o:[o,m].join("/"))),s&&d.push(...c),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function ty(t){t.sort((l,r)=>l.score!==r.score?r.score-l.score:oy(l.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var ny=/^:[\w-]+$/,ly=3,ry=2,ay=1,iy=10,uy=-2,L0=t=>t==="*";function sy(t,l){let r=t.split("/"),i=r.length;return r.some(L0)&&(i+=uy),l&&(i+=ry),r.filter(s=>!L0(s)).reduce((s,o)=>s+(ny.test(o)?ly:o===""?ay:iy),i)}function oy(t,l){return t.length===l.length&&t.slice(0,-1).every((i,s)=>i===l[s])?t[t.length-1]-l[l.length-1]:0}function cy(t,l,r=!1){let{routesMeta:i}=t,s={},o="/",c=[];for(let d=0;d<i.length;++d){let m=i[d],p=d===i.length-1,x=o==="/"?l:l.slice(o.length)||"/",y=as({path:m.relativePath,caseSensitive:m.caseSensitive,end:p},x),v=m.route;if(!y&&p&&r&&!i[i.length-1].route.index&&(y=as({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},x)),!y)return null;Object.assign(s,y.params),c.push({params:s,pathname:el([o,y.pathname]),pathnameBase:gy(el([o,y.pathnameBase])),route:v}),y.pathnameBase!=="/"&&(o=el([o,y.pathnameBase]))}return c}function as(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,i]=fy(t.path,t.caseSensitive,t.end),s=l.match(r);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:i.reduce((p,{paramName:x,isOptional:y},v)=>{if(x==="*"){let C=d[v]||"";c=o.slice(0,o.length-C.length).replace(/(.)\/+$/,"$1")}const S=d[v];return y&&!S?p[x]=void 0:p[x]=(S||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:t}}function fy(t,l=!1,r=!0){zn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,m)=>(i.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,l?void 0:"i"),i]}function dy(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return zn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function tl(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let r=l.endsWith("/")?l.length-1:l.length,i=t.charAt(r);return i&&i!=="/"?null:t.slice(r)||"/"}var hy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function my(t,l="/"){let{pathname:r,search:i="",hash:s=""}=typeof t=="string"?ua(t):t,o;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?o=U0(r.substring(1),"/"):o=U0(r,l)):o=l,{pathname:o,search:yy(i),hash:xy(s)}}function U0(t,l){let r=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Xc(t,l,r,i){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function py(t){return t.filter((l,r)=>r===0||l.route.path&&l.route.path.length>0)}function fp(t){let l=py(t);return l.map((r,i)=>i===l.length-1?r.pathname:r.pathnameBase)}function dp(t,l,r,i=!1){let s;typeof t=="string"?s=ua(t):(s={...t},tt(!s.pathname||!s.pathname.includes("?"),Xc("?","pathname","search",s)),tt(!s.pathname||!s.pathname.includes("#"),Xc("#","pathname","hash",s)),tt(!s.search||!s.search.includes("#"),Xc("#","search","hash",s)));let o=t===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=r;else{let y=l.length-1;if(!i&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),y-=1;s.pathname=v.join("/")}d=y>=0?l[y]:"/"}let m=my(s,d),p=c&&c!=="/"&&c.endsWith("/"),x=(o||c===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(p||x)&&(m.pathname+="/"),m}var el=t=>t.join("/").replace(/\/\/+/g,"/"),gy=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),yy=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,xy=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,by=class{constructor(t,l,r,i=!1){this.status=t,this.statusText=l||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function vy(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Sy(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var hp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mp(t,l){let r=t;if(typeof r!="string"||!hy.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let i=r,s=!1;if(hp)try{let o=new URL(window.location.href),c=r.startsWith("//")?new URL(o.protocol+r):new URL(r),d=tl(c.pathname,l);c.origin===o.origin&&d!=null?r=d+c.search+c.hash:s=!0}catch{zn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:s,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var pp=["POST","PUT","PATCH","DELETE"];new Set(pp);var wy=["GET",...pp];new Set(wy);var sa=E.createContext(null);sa.displayName="DataRouter";var ps=E.createContext(null);ps.displayName="DataRouterState";var ky=E.createContext(!1),gp=E.createContext({isTransitioning:!1});gp.displayName="ViewTransition";var Cy=E.createContext(new Map);Cy.displayName="Fetchers";var Ey=E.createContext(null);Ey.displayName="Await";var pn=E.createContext(null);pn.displayName="Navigation";var Ei=E.createContext(null);Ei.displayName="Location";var Tn=E.createContext({outlet:null,matches:[],isDataRoute:!1});Tn.displayName="Route";var Vf=E.createContext(null);Vf.displayName="RouteError";var yp="REACT_ROUTER_ERROR",My="REDIRECT",Ny="ROUTE_ERROR_RESPONSE";function jy(t){if(t.startsWith(`${yp}:${My}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function Ay(t){if(t.startsWith(`${yp}:${Ny}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new by(l.status,l.statusText,l.data)}catch{}}function zy(t,{relative:l}={}){tt(Mi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=E.useContext(pn),{hash:s,pathname:o,search:c}=Ni(t,{relative:l}),d=o;return r!=="/"&&(d=o==="/"?r:el([r,o])),i.createHref({pathname:d,search:c,hash:s})}function Mi(){return E.useContext(Ei)!=null}function ll(){return tt(Mi(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Ei).location}var xp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function bp(t){E.useContext(pn).static||E.useLayoutEffect(t)}function If(){let{isDataRoute:t}=E.useContext(Tn);return t?Vy():Ty()}function Ty(){tt(Mi(),"useNavigate() may be used only in the context of a <Router> component.");let t=E.useContext(sa),{basename:l,navigator:r}=E.useContext(pn),{matches:i}=E.useContext(Tn),{pathname:s}=ll(),o=JSON.stringify(fp(i)),c=E.useRef(!1);return bp(()=>{c.current=!0}),E.useCallback((m,p={})=>{if(zn(c.current,xp),!c.current)return;if(typeof m=="number"){r.go(m);return}let x=dp(m,JSON.parse(o),s,p.relative==="path");t==null&&l!=="/"&&(x.pathname=x.pathname==="/"?l:el([l,x.pathname])),(p.replace?r.replace:r.push)(x,p.state,p)},[l,r,o,s,t])}E.createContext(null);function Jf(){let{matches:t}=E.useContext(Tn),l=t[t.length-1];return l?l.params:{}}function Ni(t,{relative:l}={}){let{matches:r}=E.useContext(Tn),{pathname:i}=ll(),s=JSON.stringify(fp(r));return E.useMemo(()=>dp(t,JSON.parse(s),i,l==="path"),[t,s,i,l])}function _y(t,l){return vp(t,l)}function vp(t,l,r,i,s){var U;tt(Mi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=E.useContext(pn),{matches:c}=E.useContext(Tn),d=c[c.length-1],m=d?d.params:{},p=d?d.pathname:"/",x=d?d.pathnameBase:"/",y=d&&d.route;{let N=y&&y.path||"";wp(p,!y||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
59
|
|
|
60
|
-
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let v=ll(),S;if(l){let N=typeof l=="string"?ua(l):l;tt(x==="/"||((U=N.pathname)==null?void 0:U.startsWith(x)),`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 "${x}" but pathname "${N.pathname}" was given in the \`location\` prop.`),S=N}else S=v;let C=S.pathname||"/",T=C;if(x!=="/"){let N=x.replace(/^\//,"").split("/");T="/"+C.replace(/^\//,"").split("/").slice(N.length).join("/")}let z=sp(t,{pathname:T});zn(y||z!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),zn(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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 M=Uy(z&&z.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:el([x,o.encodeLocation?o.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?x:el([x,o.encodeLocation?o.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,r,i,s);return l&&M?E.createElement(Ei.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},M):M}function Ry(){let t=$y(),l=vy(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},l),r?E.createElement("pre",{style:s},r):null,c)}var Dy=E.createElement(Ry,null),Sp=class extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=Ay(t.digest);r&&(t=r)}let l=t!==void 0?E.createElement(Tn.Provider,{value:this.props.routeContext},E.createElement(Vf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?E.createElement(Oy,{error:t},l):l}};Sp.contextType=ky;var Qc=new WeakMap;function Oy({children:t,error:l}){let{basename:r}=E.useContext(pn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let i=jy(l.digest);if(i){let s=Qc.get(l);if(s)throw s;let o=mp(i.location,r);if(hp&&!Qc.get(l))if(o.isExternal||i.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:i.replace}));throw Qc.set(l,c),c}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return t}function Ly({routeContext:t,match:l,children:r}){let i=E.useContext(sa);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),E.createElement(Tn.Provider,{value:t},r)}function Uy(t,l=[],r=null,i=null,s=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,c=r==null?void 0:r.errors;if(c!=null){let x=o.findIndex(y=>y.route.id&&(c==null?void 0:c[y.route.id])!==void 0);tt(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,x+1))}let d=!1,m=-1;if(r)for(let x=0;x<o.length;x++){let y=o[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(m=x),y.route.id){let{loaderData:v,errors:S}=r,C=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!S||S[y.route.id]===void 0);if(y.route.lazy||C){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}let p=r&&i?(x,y)=>{var v,S;i(x,{location:r.location,params:((S=(v=r.matches)==null?void 0:v[0])==null?void 0:S.params)??{},unstable_pattern:Sy(r.matches),errorInfo:y})}:void 0;return o.reduceRight((x,y,v)=>{let S,C=!1,T=null,z=null;r&&(S=c&&y.route.id?c[y.route.id]:void 0,T=y.route.errorElement||Dy,d&&(m<0&&v===0?(wp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,z=null):m===v&&(C=!0,z=y.route.hydrateFallbackElement||null)));let M=l.concat(o.slice(0,v+1)),U=()=>{let N;return S?N=T:C?N=z:y.route.Component?N=E.createElement(y.route.Component,null):y.route.element?N=y.route.element:N=x,E.createElement(Ly,{match:y,routeContext:{outlet:x,matches:M,isDataRoute:r!=null},children:N})};return r&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?E.createElement(Sp,{location:r.location,revalidation:r.revalidation,component:T,error:S,children:U(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:p}):U()},null)}function Ff(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hy(t){let l=E.useContext(sa);return tt(l,Ff(t)),l}function By(t){let l=E.useContext(ps);return tt(l,Ff(t)),l}function Zy(t){let l=E.useContext(Tn);return tt(l,Ff(t)),l}function Yf(t){let l=Zy(t),r=l.matches[l.matches.length-1];return tt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function qy(){return Yf("useRouteId")}function $y(){var i;let t=E.useContext(Vf),l=By("useRouteError"),r=Yf("useRouteError");return t!==void 0?t:(i=l.errors)==null?void 0:i[r]}function Vy(){let{router:t}=Hy("useNavigate"),l=Yf("useNavigate"),r=E.useRef(!1);return bp(()=>{r.current=!0}),E.useCallback(async(s,o={})=>{zn(r.current,xp),r.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:l,...o}))},[t,l])}var H0={};function wp(t,l,r){!l&&!H0[t]&&(H0[t]=!0,zn(!1,r))}E.memo(Iy);function Iy({routes:t,future:l,state:r,onError:i}){return vp(t,void 0,r,i,l)}function Dl(t){tt(!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 Jy({basename:t="/",children:l=null,location:r,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){tt(!Mi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),m=E.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof r=="string"&&(r=ua(r));let{pathname:p="/",search:x="",hash:y="",state:v=null,key:S="default"}=r,C=E.useMemo(()=>{let T=tl(p,d);return T==null?null:{location:{pathname:T,search:x,hash:y,state:v,key:S},navigationType:i}},[d,p,x,y,v,S,i]);return zn(C!=null,`<Router basename="${d}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:E.createElement(pn.Provider,{value:m},E.createElement(Ei.Provider,{children:l,value:C}))}function Fy({children:t,location:l}){return _y(Ef(t),l)}function Ef(t,l=[]){let r=[];return E.Children.forEach(t,(i,s)=>{if(!E.isValidElement(i))return;let o=[...l,s];if(i.type===E.Fragment){r.push.apply(r,Ef(i.props.children,o));return}tt(i.type===Dl,`[${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>`),tt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={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&&(c.children=Ef(i.props.children,o)),r.push(c)}),r}var es="get",ts="application/x-www-form-urlencoded";function gs(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Yy(t){return gs(t)&&t.tagName.toLowerCase()==="button"}function Gy(t){return gs(t)&&t.tagName.toLowerCase()==="form"}function Xy(t){return gs(t)&&t.tagName.toLowerCase()==="input"}function Qy(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ky(t,l){return t.button===0&&(!l||l==="_self")&&!Qy(t)}var Yu=null;function Py(){if(Yu===null)try{new FormData(document.createElement("form"),0),Yu=!1}catch{Yu=!0}return Yu}var Wy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kc(t){return t!=null&&!Wy.has(t)?(zn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ts}"`),null):t}function ex(t,l){let r,i,s,o,c;if(Gy(t)){let d=t.getAttribute("action");i=d?tl(d,l):null,r=t.getAttribute("method")||es,s=Kc(t.getAttribute("enctype"))||ts,o=new FormData(t)}else if(Yy(t)||Xy(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(i=m?tl(m,l):null,r=t.getAttribute("formmethod")||d.getAttribute("method")||es,s=Kc(t.getAttribute("formenctype"))||Kc(d.getAttribute("enctype"))||ts,o=new FormData(d,t),!Py()){let{name:p,type:x,value:y}=t;if(x==="image"){let v=p?`${p}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else p&&o.append(p,y)}}else{if(gs(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=es,i=null,s=ts,c=t}return o&&s==="text/plain"&&(c=o,o=void 0),{action:i,method:r.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gf(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function tx(t,l,r,i){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:l&&tl(s.pathname,l)==="/"?s.pathname=`${l.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function nx(t,l){if(t.id in l)return l[t.id];try{let r=await import(t.module);return l[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lx(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function rx(t,l,r){let i=await Promise.all(t.map(async s=>{let o=l.routes[s.route.id];if(o){let c=await nx(o,r);return c.links?c.links():[]}return[]}));return sx(i.flat(1).filter(lx).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function B0(t,l,r,i,s,o){let c=(m,p)=>r[p]?m.route.id!==r[p].route.id:!0,d=(m,p)=>{var x;return r[p].pathname!==m.pathname||((x=r[p].route.path)==null?void 0:x.endsWith("*"))&&r[p].params["*"]!==m.params["*"]};return o==="assets"?l.filter((m,p)=>c(m,p)||d(m,p)):o==="data"?l.filter((m,p)=>{var y;let x=i.routes[m.route.id];if(!x||!x.hasLoader)return!1;if(c(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((y=r[0])==null?void 0:y.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function ax(t,l,{includeHydrateFallback:r}={}){return ix(t.map(i=>{let s=l.routes[i.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function ix(t){return[...new Set(t)]}function ux(t){let l={},r=Object.keys(t).sort();for(let i of r)l[i]=t[i];return l}function sx(t,l){let r=new Set;return new Set(l),t.reduce((i,s)=>{let o=JSON.stringify(ux(s));return r.has(o)||(r.add(o),i.push({key:o,link:s})),i},[])}function kp(){let t=E.useContext(sa);return Gf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function ox(){let t=E.useContext(ps);return Gf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Xf=E.createContext(void 0);Xf.displayName="FrameworkContext";function Cp(){let t=E.useContext(Xf);return Gf(t,"You must render this element inside a <HydratedRouter> element"),t}function cx(t,l){let r=E.useContext(Xf),[i,s]=E.useState(!1),[o,c]=E.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=l,v=E.useRef(null);E.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let T=M=>{M.forEach(U=>{c(U.isIntersecting)})},z=new IntersectionObserver(T,{threshold:.5});return v.current&&z.observe(v.current),()=>{z.disconnect()}}},[t]),E.useEffect(()=>{if(i){let T=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(T)}}},[i]);let S=()=>{s(!0)},C=()=>{s(!1),c(!1)};return r?t!=="intent"?[o,v,{}]:[o,v,{onFocus:si(d,S),onBlur:si(m,C),onMouseEnter:si(p,S),onMouseLeave:si(x,C),onTouchStart:si(y,S)}]:[!1,v,{}]}function si(t,l){return r=>{t&&t(r),r.defaultPrevented||l(r)}}function fx({page:t,...l}){let{router:r}=kp(),i=E.useMemo(()=>sp(r.routes,t,r.basename),[r.routes,t,r.basename]);return i?E.createElement(hx,{page:t,matches:i,...l}):null}function dx(t){let{manifest:l,routeModules:r}=Cp(),[i,s]=E.useState([]);return E.useEffect(()=>{let o=!1;return rx(t,l,r).then(c=>{o||s(c)}),()=>{o=!0}},[t,l,r]),i}function hx({page:t,matches:l,...r}){let i=ll(),{future:s,manifest:o,routeModules:c}=Cp(),{basename:d}=kp(),{loaderData:m,matches:p}=ox(),x=E.useMemo(()=>B0(t,l,p,o,i,"data"),[t,l,p,o,i]),y=E.useMemo(()=>B0(t,l,p,o,i,"assets"),[t,l,p,o,i]),v=E.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let T=new Set,z=!1;if(l.forEach(U=>{var V;let N=o.routes[U.route.id];!N||!N.hasLoader||(!x.some(F=>F.route.id===U.route.id)&&U.route.id in m&&((V=c[U.route.id])!=null&&V.shouldRevalidate)||N.hasClientLoader?z=!0:T.add(U.route.id))}),T.size===0)return[];let M=tx(t,d,s.unstable_trailingSlashAwareDataRequests,"data");return z&&T.size>0&&M.searchParams.set("_routes",l.filter(U=>T.has(U.route.id)).map(U=>U.route.id).join(",")),[M.pathname+M.search]},[d,s.unstable_trailingSlashAwareDataRequests,m,i,o,x,l,t,c]),S=E.useMemo(()=>ax(y,o),[y,o]),C=dx(y);return E.createElement(E.Fragment,null,v.map(T=>E.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...r})),S.map(T=>E.createElement("link",{key:T,rel:"modulepreload",href:T,...r})),C.map(({key:T,link:z})=>E.createElement("link",{key:T,nonce:r.nonce,...z,crossOrigin:z.crossOrigin??r.crossOrigin})))}function mx(...t){return l=>{t.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{px&&(window.__reactRouterVersion="7.13.0")}catch{}function gx({basename:t,children:l,unstable_useTransitions:r,window:i}){let s=E.useRef();s.current==null&&(s.current=Q5({window:i,v5Compat:!0}));let o=s.current,[c,d]=E.useState({action:o.action,location:o.location}),m=E.useCallback(p=>{r===!1?d(p):E.startTransition(()=>d(p))},[r]);return E.useLayoutEffect(()=>o.listen(m),[o,m]),E.createElement(Jy,{basename:t,children:l,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:r})}var Ep=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yt=E.forwardRef(function({onClick:l,discover:r="render",prefetch:i="none",relative:s,reloadDocument:o,replace:c,state:d,target:m,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...S},C){let{basename:T,unstable_useTransitions:z}=E.useContext(pn),M=typeof p=="string"&&Ep.test(p),U=mp(p,T);p=U.to;let N=zy(p,{relative:s}),[V,F,_]=cx(i,S),I=vx(p,{replace:c,state:d,target:m,preventScrollReset:x,relative:s,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:z});function se(O){l&&l(O),O.defaultPrevented||I(O)}let oe=E.createElement("a",{...S,..._,href:U.absoluteURL||N,onClick:U.isExternal||o?l:se,ref:mx(C,F),target:m,"data-discover":!M&&r==="render"?"true":void 0});return V&&!M?E.createElement(E.Fragment,null,oe,E.createElement(fx,{page:N})):oe});yt.displayName="Link";var yx=E.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:i="",end:s=!1,style:o,to:c,viewTransition:d,children:m,...p},x){let y=Ni(c,{relative:p.relative}),v=ll(),S=E.useContext(ps),{navigator:C,basename:T}=E.useContext(pn),z=S!=null&&Ex(y)&&d===!0,M=C.encodeLocation?C.encodeLocation(y).pathname:y.pathname,U=v.pathname,N=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;r||(U=U.toLowerCase(),N=N?N.toLowerCase():null,M=M.toLowerCase()),N&&T&&(N=tl(N,T)||N);const V=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let F=U===M||!s&&U.startsWith(M)&&U.charAt(V)==="/",_=N!=null&&(N===M||!s&&N.startsWith(M)&&N.charAt(M.length)==="/"),I={isActive:F,isPending:_,isTransitioning:z},se=F?l:void 0,oe;typeof i=="function"?oe=i(I):oe=[i,F?"active":null,_?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(I):o;return E.createElement(yt,{...p,"aria-current":se,className:oe,ref:x,style:O,to:c,viewTransition:d},typeof m=="function"?m(I):m)});yx.displayName="NavLink";var xx=E.forwardRef(({discover:t="render",fetcherKey:l,navigate:r,reloadDocument:i,replace:s,state:o,method:c=es,action:d,onSubmit:m,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...S},C)=>{let{unstable_useTransitions:T}=E.useContext(pn),z=kx(),M=Cx(d,{relative:p}),U=c.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&Ep.test(d),V=F=>{if(m&&m(F),F.defaultPrevented)return;F.preventDefault();let _=F.nativeEvent.submitter,I=(_==null?void 0:_.getAttribute("formmethod"))||c,se=()=>z(_||F.currentTarget,{fetcherKey:l,method:I,navigate:r,replace:s,state:o,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v});T&&r!==!1?E.startTransition(()=>se()):se()};return E.createElement("form",{ref:C,method:U,action:M,onSubmit:i?m:V,...S,"data-discover":!N&&t==="render"?"true":void 0})});xx.displayName="Form";function bx(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mp(t){let l=E.useContext(sa);return tt(l,bx(t)),l}function vx(t,{target:l,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:m}={}){let p=If(),x=ll(),y=Ni(t,{relative:o});return E.useCallback(v=>{if(Ky(v,l)){v.preventDefault();let S=r!==void 0?r:xi(x)===xi(y),C=()=>p(t,{replace:S,state:i,preventScrollReset:s,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:d});m?E.startTransition(()=>C()):C()}},[x,p,y,r,i,l,t,s,o,c,d,m])}var Sx=0,wx=()=>`__${String(++Sx)}__`;function kx(){let{router:t}=Mp("useSubmit"),{basename:l}=E.useContext(pn),r=qy(),i=t.fetch,s=t.navigate;return E.useCallback(async(o,c={})=>{let{action:d,method:m,encType:p,formData:x,body:y}=ex(o,l);if(c.navigate===!1){let v=c.fetcherKey||wx();await i(v,r,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||m,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||m,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,s,l,r])}function Cx(t,{relative:l}={}){let{basename:r}=E.useContext(pn),i=E.useContext(Tn);tt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),o={...Ni(t||".",{relative:l})},c=ll();if(t==null){o.search=c.search;let d=new URLSearchParams(o.search),m=d.getAll("index");if(m.some(x=>x==="")){d.delete("index"),m.filter(y=>y).forEach(y=>d.append("index",y));let x=d.toString();o.search=x?`?${x}`:""}}return(!t||t===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:el([r,o.pathname])),xi(o)}function Ex(t,{relative:l}={}){let r=E.useContext(gp);tt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Mp("useViewTransitionState"),s=Ni(t,{relative:l});if(!r.isTransitioning)return!1;let o=tl(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=tl(r.nextLocation.pathname,i)||r.nextLocation.pathname;return as(s.pathname,c)!=null||as(s.pathname,o)!=null}function Mx(t={}){const{url:l=Nx(),onMessage:r,onStatusChange:i,initialReconnectDelay:s=1e3,maxReconnectDelay:o=3e4,pingInterval:c=3e4}=t;let d=null,m="disconnected",p=0,x=null,y=null,v=!0;function S(O){m!==O&&(m=O,i==null||i(m))}function C(){const O=s*Math.pow(2,p);return Math.min(O,o)}function T(){z(),y=setInterval(()=>{(d==null?void 0:d.readyState)===WebSocket.OPEN&&V({type:"ping"})},c)}function z(){y!==null&&(clearInterval(y),y=null)}function M(){if(!v)return;const O=C();p++,S("reconnecting"),x=setTimeout(()=>{x=null,N()},O)}function U(){x!==null&&(clearTimeout(x),x=null)}function N(){d&&(d.onopen=null,d.onclose=null,d.onerror=null,d.onmessage=null,(d.readyState===WebSocket.OPEN||d.readyState===WebSocket.CONNECTING)&&d.close());try{d=new WebSocket(l),d.onopen=()=>{p=0,S("connected"),T()},d.onclose=()=>{z(),S("disconnected"),v&&M()},d.onerror=()=>{},d.onmessage=O=>{try{const ae=JSON.parse(O.data);r==null||r(ae)}catch{}}}catch{S("disconnected"),v&&M()}}function V(O){(d==null?void 0:d.readyState)===WebSocket.OPEN&&d.send(JSON.stringify(O))}function F(O){V({type:"subscribe",payload:{agentName:O}})}function _(O){V({type:"unsubscribe",payload:{agentName:O}})}function I(){return m}function se(){v=!1,U(),z(),d&&(d.onopen=null,d.onclose=null,d.onerror=null,d.onmessage=null,(d.readyState===WebSocket.OPEN||d.readyState===WebSocket.CONNECTING)&&d.close(),d=null),S("disconnected")}function oe(){v=!0,U(),p=0,N()}return N(),{send:V,subscribe:F,unsubscribe:_,getStatus:I,disconnect:se,reconnect:oe}}function Nx(){return typeof window>"u"?"ws://localhost:3000/ws":`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}const Z0=t=>{let l;const r=new Set,i=(p,x)=>{const y=typeof p=="function"?p(l):p;if(!Object.is(y,l)){const v=l;l=x??(typeof y!="object"||y===null)?y:Object.assign({},l,y),r.forEach(S=>S(l,v))}},s=()=>l,d={setState:i,getState:s,getInitialState:()=>m,subscribe:p=>(r.add(p),()=>r.delete(p))},m=l=t(i,s,d);return d},jx=(t=>t?Z0(t):Z0),Ax=t=>t;function zx(t,l=Ax){const r=na.useSyncExternalStore(t.subscribe,na.useCallback(()=>l(t.getState()),[t,l]),na.useCallback(()=>l(t.getInitialState()),[t,l]));return na.useDebugValue(r),r}const Tx=t=>{const l=jx(t),r=i=>zx(l,i);return Object.assign(r,l),r},_x=(t=>Tx),q0=t=>Symbol.iterator in t,$0=t=>"entries"in t,V0=(t,l)=>{const r=t instanceof Map?t:new Map(t.entries()),i=l instanceof Map?l:new Map(l.entries());if(r.size!==i.size)return!1;for(const[s,o]of r)if(!i.has(s)||!Object.is(o,i.get(s)))return!1;return!0},Rx=(t,l)=>{const r=t[Symbol.iterator](),i=l[Symbol.iterator]();let s=r.next(),o=i.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=r.next(),o=i.next()}return!!s.done&&!!o.done};function Dx(t,l){return Object.is(t,l)?!0:typeof t!="object"||t===null||typeof l!="object"||l===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(l)?!1:q0(t)&&q0(l)?$0(t)&&$0(l)?V0(t,l):Rx(t,l):V0({entries:()=>Object.entries(t)},{entries:()=>Object.entries(l)})}function Vt(t){const l=na.useRef(void 0);return r=>{const i=t(r);return Dx(l.current,i)?l.current:l.current=i}}function Ox(t){return"agent"in t}const I0=50,Lx={fleetStatus:null,agents:[],recentJobs:[],connectionStatus:"disconnected",lastUpdated:null},Ux=t=>({...Lx,setFleetStatus:l=>t({fleetStatus:l,lastUpdated:new Date().toISOString()}),setAgents:l=>t({agents:l,lastUpdated:new Date().toISOString()}),setRecentJobs:l=>t(r=>{const i=new Map;for(const o of l)i.set(o.jobId,o);for(const o of r.recentJobs)i.set(o.jobId,o);const s=Array.from(i.values());return s.sort((o,c)=>new Date(c.createdAt).getTime()-new Date(o.createdAt).getTime()),{recentJobs:s.slice(0,I0),lastUpdated:new Date().toISOString()}}),updateAgent:l=>t(r=>{if(Ox(l)){const i=r.agents.findIndex(s=>s.qualifiedName===l.agent.qualifiedName);if(i>=0){const s=[...r.agents];return s[i]=l.agent,{agents:s,lastUpdated:new Date().toISOString()}}else return{agents:[...r.agents,l.agent],lastUpdated:new Date().toISOString()}}else{const i=r.agents.findIndex(s=>s.qualifiedName===l.agentName);if(i>=0){const s=[...r.agents];return s[i]={...s[i],status:"idle",currentJobId:null},{agents:s,lastUpdated:new Date().toISOString()}}return r}}),addJob:l=>t(r=>({recentJobs:[{jobId:l.jobId,agentName:l.agentName,prompt:l.prompt,status:"running",createdAt:new Date().toISOString(),startedAt:new Date().toISOString()},...r.recentJobs].slice(0,I0),lastUpdated:new Date().toISOString()})),completeJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"completed",exitCode:l.exitCode,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),failJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"failed",error:l.error,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),cancelJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"cancelled",error:l.reason,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),setConnectionStatus:l=>t({connectionStatus:l,lastUpdated:new Date().toISOString()})}),Np="herd-theme";function is(){if(typeof window>"u")return"system";const t=localStorage.getItem(Np);return t==="light"||t==="dark"||t==="system"?t:"system"}function Hx(t){const l=t??is();return l==="system"?typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":l}function jp(t){if(typeof window>"u")return;const l=Hx(t);document.documentElement.classList.toggle("dark",l==="dark")}function Bx(t){typeof window>"u"||(localStorage.setItem(Np,t),jp(t))}function Zx(){const t=is();jp(t);const l=window.matchMedia("(prefers-color-scheme: dark)");function r(i){is()==="system"&&document.documentElement.classList.toggle("dark",i.matches)}return l.addEventListener("change",r),()=>{l.removeEventListener("change",r)}}const qx={sidebarCollapsed:!1,sidebarMobileOpen:!1,selectedAgent:null,activeView:"dashboard",theme:is(),rightPanelOpen:!1},$x=t=>({...qx,toggleSidebar:()=>t(l=>({sidebarCollapsed:!l.sidebarCollapsed})),setSidebarCollapsed:l=>t({sidebarCollapsed:l}),toggleSidebarMobile:()=>t(l=>({sidebarMobileOpen:!l.sidebarMobileOpen})),setSidebarMobileOpen:l=>t({sidebarMobileOpen:l}),selectAgent:l=>t({selectedAgent:l,rightPanelOpen:l!==null}),setActiveView:l=>t({activeView:l}),setTheme:l=>(Bx(l),t({theme:l})),toggleRightPanel:()=>t(l=>({rightPanelOpen:!l.rightPanelOpen})),setRightPanelOpen:l=>t({rightPanelOpen:l})}),J0=1e3,Vx={outputsByJob:{},activeJobViews:new Set,_messageCounter:0},Ix=t=>({...Vx,appendOutput:(l,r,i,s)=>t(o=>{const c=o._messageCounter+1,d={id:`msg-${c}`,jobId:l,agentName:r,data:i,stream:s,timestamp:Date.now()};let p=[...o.outputsByJob[l]??[],d];return p.length>J0&&(p=p.slice(p.length-J0)),{outputsByJob:{...o.outputsByJob,[l]:p},_messageCounter:c}}),clearJobOutput:l=>t(r=>{const{[l]:i,...s}=r.outputsByJob;return{outputsByJob:s}}),setActiveJobView:(l,r)=>t(i=>{const s=new Set(i.activeJobViews);return r?s.add(l):s.delete(l),{activeJobViews:s}}),clearAllOutput:()=>t({outputsByJob:{},activeJobViews:new Set,_messageCounter:0})});let Qf=typeof window<"u"?window.location.origin:"";class Jx extends Error{constructor(l,r,i,s){super(l),this.status=r,this.statusText=i,this.url=s,this.name="ApiError"}}async function Kf(t){if(!t.ok){let l=`HTTP ${t.status}: ${t.statusText}`;try{const r=await t.json();r.error?l=r.error:r.message&&(l=r.message)}catch{}throw new Jx(l,t.status,t.statusText,t.url)}return t.json()}async function Ll(t,l){const r=new URL(`${Qf}${t}`);if(l)for(const[s,o]of Object.entries(l))o!==void 0&&r.searchParams.set(s,String(o));const i=await fetch(r.toString(),{method:"GET",headers:{Accept:"application/json"}});return Kf(i)}async function oa(t,l){const r=await fetch(`${Qf}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(l)});return Kf(r)}async function Fx(t){const l=await fetch(`${Qf}${t}`,{method:"DELETE",headers:{Accept:"application/json"}});return Kf(l)}async function Ap(){return Ll("/api/fleet/status")}async function zp(){return Ll("/api/agents")}async function Yx(t){return Ll(`/api/agents/${encodeURIComponent(t)}`)}async function Tp(t){return Ll("/api/jobs",t)}async function Gx(t){return Ll(`/api/jobs/${encodeURIComponent(t)}`)}async function Xx(t){return oa(`/api/jobs/${encodeURIComponent(t)}/cancel`,{})}async function Qx(t,l){return oa(`/api/jobs/${encodeURIComponent(t)}/fork`,l??{})}async function Kx(){return Ll("/api/schedules")}async function _p(t,l){return oa(`/api/agents/${encodeURIComponent(t)}/trigger`,l??{})}async function Px(t,l){return oa(`/api/schedules/${encodeURIComponent(t)}/${encodeURIComponent(l)}/enable`,{})}async function Wx(t,l){return oa(`/api/schedules/${encodeURIComponent(t)}/${encodeURIComponent(l)}/disable`,{})}async function e6(t){return oa(`/api/chat/${encodeURIComponent(t)}/sessions`,{})}async function F0(t){return Ll(`/api/chat/${encodeURIComponent(t)}/sessions`)}async function t6(t,l){return Ll(`/api/chat/${encodeURIComponent(t)}/sessions/${encodeURIComponent(l)}`)}async function n6(t,l){await Fx(`/api/chat/${encodeURIComponent(t)}/sessions/${encodeURIComponent(l)}`)}const l6=20,Y0={jobs:[],totalJobs:0,jobsLoading:!1,jobsError:null,jobsFilter:{},jobsOffset:0,jobsLimit:l6,selectedJobId:null,selectedJob:null,selectedJobLoading:!1},r6=(t,l)=>({...Y0,fetchJobs:async()=>{const{jobsFilter:r,jobsOffset:i,jobsLimit:s}=l();t({jobsLoading:!0,jobsError:null});try{const o=await Tp({limit:s,offset:i,agentName:r.agentName,status:r.status});t({jobs:o.jobs,totalJobs:o.total,jobsLoading:!1})}catch(o){const c=o instanceof Error?o.message:"Failed to fetch jobs";t({jobsLoading:!1,jobsError:c})}},fetchJobDetail:async r=>{t({selectedJobLoading:!0});try{const i=await Gx(r);t({selectedJob:i,selectedJobId:r,selectedJobLoading:!1})}catch{t({selectedJob:null,selectedJobId:r,selectedJobLoading:!1})}},setJobsFilter:r=>{const i=l().jobsFilter;t({jobsFilter:{...i,...r},jobsOffset:0})},setJobsOffset:r=>{t({jobsOffset:r})},selectJob:r=>{r===null?t({selectedJobId:null,selectedJob:null,selectedJobLoading:!1}):(t({selectedJobId:r}),l().fetchJobDetail(r).catch(()=>{}))},clearJobsState:()=>{t(Y0)}}),G0=5,X0={chatSessions:[],chatSessionsLoading:!1,chatMessages:[],chatMessagesLoading:!1,activeChatSessionId:null,chatStreaming:!1,chatStreamingContent:"",chatError:null,sidebarSessions:{},sidebarSessionsLoading:!1},a6=(t,l)=>({...X0,fetchChatSessions:async r=>{t({chatSessionsLoading:!0,chatError:null});try{const i=await F0(r);t({chatSessions:i.sessions,chatSessionsLoading:!1})}catch(i){const s=i instanceof Error?i.message:"Failed to fetch chat sessions";t({chatSessionsLoading:!1,chatError:s})}},fetchChatMessages:async(r,i)=>{t({chatMessagesLoading:!0,chatError:null});try{const s=await t6(r,i);t({chatMessages:s.messages,chatMessagesLoading:!1,activeChatSessionId:i})}catch(s){const o=s instanceof Error?s.message:"Failed to fetch chat messages";t({chatMessagesLoading:!1,chatError:o})}},createChatSession:async r=>{t({chatError:null});try{const i=await e6(r),s={sessionId:i.sessionId,createdAt:i.createdAt,lastMessageAt:i.createdAt,messageCount:0,preview:""};return t(o=>{const c=[s,...o.chatSessions],d=o.sidebarSessions[r]??[],m=[s,...d].slice(0,G0);return{chatSessions:c,activeChatSessionId:i.sessionId,chatMessages:[],sidebarSessions:{...o.sidebarSessions,[r]:m}}}),i.sessionId}catch(i){const s=i instanceof Error?i.message:"Failed to create chat session";return t({chatError:s}),null}},deleteChatSession:async(r,i)=>{t({chatError:null});try{await n6(r,i);const{activeChatSessionId:s}=l();t(o=>{const c=o.sidebarSessions[r],d=c?{...o.sidebarSessions,[r]:c.filter(m=>m.sessionId!==i)}:o.sidebarSessions;return{chatSessions:o.chatSessions.filter(m=>m.sessionId!==i),activeChatSessionId:s===i?null:s,chatMessages:s===i?[]:o.chatMessages,sidebarSessions:d}})}catch(s){const o=s instanceof Error?s.message:"Failed to delete chat session";t({chatError:o})}},setActiveChatSession:r=>{t({activeChatSessionId:r,chatMessages:r===null?[]:l().chatMessages,chatStreaming:!1,chatStreamingContent:""})},appendStreamingChunk:r=>{t(i=>({chatStreaming:!0,chatStreamingContent:i.chatStreamingContent+r}))},completeStreaming:()=>{const{chatStreamingContent:r}=l();if(r){const i={role:"assistant",content:r,timestamp:new Date().toISOString()};t(s=>({chatMessages:[...s.chatMessages,i],chatStreaming:!1,chatStreamingContent:""}))}else t({chatStreaming:!1,chatStreamingContent:""})},addUserMessage:r=>{const i={role:"user",content:r,timestamp:new Date().toISOString()};t(s=>({chatMessages:[...s.chatMessages,i],chatStreaming:!0,chatStreamingContent:""}))},addToolCallMessage:r=>{const{chatStreamingContent:i}=l(),s=[];i&&s.push({role:"assistant",content:i,timestamp:new Date().toISOString()}),s.push({role:"tool",content:r.output,timestamp:new Date().toISOString(),toolCall:r}),t(o=>({chatMessages:[...o.chatMessages,...s],chatStreamingContent:""}))},setChatError:r=>{t({chatError:r,chatStreaming:!1,chatStreamingContent:""})},fetchSidebarSessions:async r=>{t({sidebarSessionsLoading:!0});try{const i=await Promise.all(r.map(o=>F0(o).then(c=>({name:o,sessions:c.sessions.slice(0,G0)})).catch(()=>({name:o,sessions:[]})))),s={};for(const{name:o,sessions:c}of i)s[o]=c;t({sidebarSessions:s,sidebarSessionsLoading:!1})}catch{t({sidebarSessionsLoading:!1})}},clearChatState:()=>{t(X0)}}),Q0={schedules:[],schedulesLoading:!1,schedulesError:null},i6=(t,l)=>({...Q0,fetchSchedules:async()=>{t({schedulesLoading:!0,schedulesError:null});try{const r=await Kx();t({schedules:r,schedulesLoading:!1})}catch(r){const i=r instanceof Error?r.message:"Failed to fetch schedules";t({schedulesLoading:!1,schedulesError:i})}},triggerSchedule:async(r,i)=>{t({schedulesError:null});try{await _p(r,{scheduleName:i}),await l().fetchSchedules()}catch(s){const o=s instanceof Error?s.message:"Failed to trigger schedule";t({schedulesError:o})}},enableSchedule:async(r,i)=>{t({schedulesError:null});try{const s=await Px(r,i);t(o=>({schedules:o.schedules.map(c=>c.agentName===r&&c.name===i?s:c)}))}catch(s){const o=s instanceof Error?s.message:"Failed to enable schedule";t({schedulesError:o})}},disableSchedule:async(r,i)=>{t({schedulesError:null});try{const s=await Wx(r,i);t(o=>({schedules:o.schedules.map(c=>c.agentName===r&&c.name===i?s:c)}))}catch(s){const o=s instanceof Error?s.message:"Failed to disable schedule";t({schedulesError:o})}},updateScheduleFromWS:()=>{l().fetchSchedules().catch(()=>{})},clearSchedulesState:()=>{t(Q0)}});let K0=0;function u6(){return K0+=1,`toast-${K0}-${Date.now()}`}const s6={toasts:[]},o6=t=>({...s6,addToast:l=>{const r=u6(),i=l.duration??3e3;t(s=>({toasts:[...s.toasts,{...l,id:r,duration:i}]})),i>0&&setTimeout(()=>{t(s=>({toasts:s.toasts.filter(o=>o.id!==r)}))},i)},removeToast:l=>t(r=>({toasts:r.toasts.filter(i=>i.id!==l)}))}),Ne=_x()((...t)=>({...Ux(...t),...$x(...t),...Ix(...t),...r6(...t),...a6(...t),...i6(...t),...o6(...t)}));function ys(){return Ne(Vt(t=>({fleetStatus:t.fleetStatus,agents:t.agents,recentJobs:t.recentJobs,connectionStatus:t.connectionStatus,lastUpdated:t.lastUpdated})))}function c6(t){return Ne(l=>t?l.agents.find(r=>r.qualifiedName===t)??null:null)}function Rp(){return Ne(Vt(t=>({sidebarCollapsed:t.sidebarCollapsed,sidebarMobileOpen:t.sidebarMobileOpen,selectedAgent:t.selectedAgent,activeView:t.activeView,theme:t.theme,rightPanelOpen:t.rightPanelOpen})))}function Dp(){return Ne(Vt(t=>({toggleSidebar:t.toggleSidebar,setSidebarCollapsed:t.setSidebarCollapsed,toggleSidebarMobile:t.toggleSidebarMobile,setSidebarMobileOpen:t.setSidebarMobileOpen,selectAgent:t.selectAgent,setActiveView:t.setActiveView,setTheme:t.setTheme,toggleRightPanel:t.toggleRightPanel,setRightPanelOpen:t.setRightPanelOpen})))}function f6(){return Ne(Vt(t=>({setFleetStatus:t.setFleetStatus,setAgents:t.setAgents,updateAgent:t.updateAgent,setRecentJobs:t.setRecentJobs,addJob:t.addJob,completeJob:t.completeJob,failJob:t.failJob,cancelJob:t.cancelJob,setConnectionStatus:t.setConnectionStatus})))}const P0=[];function d6(t){return Ne(l=>t?l.outputsByJob[t]??P0:P0)}function h6(){return Ne(Vt(t=>({jobs:t.jobs,totalJobs:t.totalJobs,jobsLoading:t.jobsLoading,jobsError:t.jobsError,jobsFilter:t.jobsFilter,jobsOffset:t.jobsOffset,jobsLimit:t.jobsLimit})))}function Op(){return Ne(Vt(t=>({fetchJobs:t.fetchJobs,fetchJobDetail:t.fetchJobDetail,setJobsFilter:t.setJobsFilter,setJobsOffset:t.setJobsOffset,selectJob:t.selectJob,clearJobsState:t.clearJobsState})))}function m6(){return Ne(Vt(t=>({selectedJobId:t.selectedJobId,selectedJob:t.selectedJob,selectedJobLoading:t.selectedJobLoading})))}function p6(){return Ne(Vt(t=>({chatSessions:t.chatSessions,chatSessionsLoading:t.chatSessionsLoading,chatError:t.chatError})))}function Pf(){return Ne(Vt(t=>({chatMessages:t.chatMessages,chatMessagesLoading:t.chatMessagesLoading,activeChatSessionId:t.activeChatSessionId,chatStreaming:t.chatStreaming,chatStreamingContent:t.chatStreamingContent,chatError:t.chatError})))}function Wf(){return Ne(Vt(t=>({fetchChatSessions:t.fetchChatSessions,fetchChatMessages:t.fetchChatMessages,createChatSession:t.createChatSession,deleteChatSession:t.deleteChatSession,setActiveChatSession:t.setActiveChatSession,appendStreamingChunk:t.appendStreamingChunk,completeStreaming:t.completeStreaming,addUserMessage:t.addUserMessage,setChatError:t.setChatError,fetchSidebarSessions:t.fetchSidebarSessions,clearChatState:t.clearChatState})))}function g6(){return Ne(Vt(t=>({sidebarSessions:t.sidebarSessions,sidebarSessionsLoading:t.sidebarSessionsLoading})))}function y6(){return Ne(Vt(t=>({schedules:t.schedules,schedulesLoading:t.schedulesLoading,schedulesError:t.schedulesError})))}function x6(){return Ne(Vt(t=>({fetchSchedules:t.fetchSchedules,triggerSchedule:t.triggerSchedule,enableSchedule:t.enableSchedule,disableSchedule:t.disableSchedule,updateScheduleFromWS:t.updateScheduleFromWS,clearSchedulesState:t.clearSchedulesState})))}function b6(){return Ne(t=>t.toasts)}function v6(){return Ne(Vt(t=>({addToast:t.addToast,removeToast:t.removeToast})))}function S6(){const t=E.useRef(null),l=E.useRef("disconnected"),r=E.useRef(!1),i=Ne(N=>N.setFleetStatus),s=Ne(N=>N.setAgents),o=Ne(N=>N.updateAgent),c=Ne(N=>N.addJob),d=Ne(N=>N.completeJob),m=Ne(N=>N.failJob),p=Ne(N=>N.cancelJob),x=Ne(N=>N.setConnectionStatus),y=Ne(N=>N.connectionStatus),v=Ne(N=>N.appendOutput),S=Ne(N=>N.appendStreamingChunk),C=Ne(N=>N.completeStreaming),T=Ne(N=>N.addToolCallMessage),z=Ne(N=>N.setChatError),M=Ne(N=>N.updateScheduleFromWS),U=Ne(N=>N.addToast);return E.useEffect(()=>{const N=F=>{switch(F.type){case"fleet:status":i(F.payload);break;case"agent:updated":o(F.payload);break;case"job:created":c(F.payload);break;case"job:completed":d(F.payload),U({message:`Job completed for ${F.payload.agentName}`,type:"success"});break;case"job:failed":m(F.payload),U({message:`Job failed for ${F.payload.agentName}`,type:"error",duration:5e3});break;case"job:cancelled":p(F.payload);break;case"schedule:triggered":M(),U({message:`Schedule triggered for ${F.payload.agentName}`,type:"info"});break;case"job:output":{const{jobId:_,agentName:I,data:se,stream:oe}=F.payload;v(_,I,se,oe);break}case"pong":break;case"chat:response":{const{chunk:_}=F.payload;S(_);break}case"chat:complete":{C();break}case"chat:tool_call":{T({toolName:F.payload.toolName,inputSummary:F.payload.inputSummary,output:F.payload.output,isError:F.payload.isError,durationMs:F.payload.durationMs});break}case"chat:error":{z(F.payload.error);break}}},V=F=>{const _=l.current;l.current=F,x(F),F==="connected"&&(_==="disconnected"||_==="reconnecting")&&r.current&&(async()=>{try{const[I,se]=await Promise.all([Ap(),zp()]);i(I),s(se)}catch{}})(),F==="connected"&&(r.current=!0)};return t.current=Mx({onMessage:N,onStatusChange:V}),window.__herdWsClient=t.current,()=>{var F;(F=t.current)==null||F.disconnect(),t.current=null,delete window.__herdWsClient}},[]),{connectionStatus:y,subscribe:N=>{var V;return(V=t.current)==null?void 0:V.subscribe(N)},unsubscribe:N=>{var V;return(V=t.current)==null?void 0:V.unsubscribe(N)},reconnect:()=>{var N;return(N=t.current)==null?void 0:N.reconnect()}}}function Lp(){const[t,l]=E.useState(!0),[r,i]=E.useState(null),[s,o]=E.useState(0),c=Ne(p=>p.setFleetStatus),d=Ne(p=>p.setAgents);return E.useEffect(()=>{let p=!1;async function x(){l(!0),i(null);try{const[y,v]=await Promise.all([Ap(),zp()]);if(p)return;c(y),d(v),l(!1)}catch(y){if(p)return;const v=y instanceof Error?y.message:"Failed to fetch fleet data";i(v),l(!1)}}return x(),()=>{p=!0}},[s]),{loading:t,error:r,retry:()=>{o(p=>p+1)}}}const xs=E.createContext(null);xs.displayName="PanelGroupContext";const rt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},e1=10,ar=E.useLayoutEffect,W0=$5.useId,w6=typeof W0=="function"?W0:()=>null;let k6=0;function t1(t=null){const l=w6(),r=E.useRef(t||l||null);return r.current===null&&(r.current=""+k6++),t??r.current}function Up({children:t,className:l="",collapsedSize:r,collapsible:i,defaultSize:s,forwardedRef:o,id:c,maxSize:d,minSize:m,onCollapse:p,onExpand:x,onResize:y,order:v,style:S,tagName:C="div",...T}){const z=E.useContext(xs);if(z===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:M,expandPanel:U,getPanelSize:N,getPanelStyle:V,groupId:F,isPanelCollapsed:_,reevaluatePanelConstraints:I,registerPanel:se,resizePanel:oe,unregisterPanel:O}=z,ae=t1(c),te=E.useRef({callbacks:{onCollapse:p,onExpand:x,onResize:y},constraints:{collapsedSize:r,collapsible:i,defaultSize:s,maxSize:d,minSize:m},id:ae,idIsFromProps:c!==void 0,order:v});E.useRef({didLogMissingDefaultSizeWarning:!1}),ar(()=>{const{callbacks:ue,constraints:P}=te.current,H={...P};te.current.id=ae,te.current.idIsFromProps=c!==void 0,te.current.order=v,ue.onCollapse=p,ue.onExpand=x,ue.onResize=y,P.collapsedSize=r,P.collapsible=i,P.defaultSize=s,P.maxSize=d,P.minSize=m,(H.collapsedSize!==P.collapsedSize||H.collapsible!==P.collapsible||H.maxSize!==P.maxSize||H.minSize!==P.minSize)&&I(te.current,H)}),ar(()=>{const ue=te.current;return se(ue),()=>{O(ue)}},[v,ae,se,O]),E.useImperativeHandle(o,()=>({collapse:()=>{M(te.current)},expand:ue=>{U(te.current,ue)},getId(){return ae},getSize(){return N(te.current)},isCollapsed(){return _(te.current)},isExpanded(){return!_(te.current)},resize:ue=>{oe(te.current,ue)}}),[M,U,N,_,ae,oe]);const be=V(te.current,s);return E.createElement(C,{...T,children:t,className:l,id:ae,style:{...be,...S},[rt.groupId]:F,[rt.panel]:"",[rt.panelCollapsible]:i||void 0,[rt.panelId]:ae,[rt.panelSize]:parseFloat(""+be.flexGrow).toFixed(1)})}const ns=E.forwardRef((t,l)=>E.createElement(Up,{...t,forwardedRef:l}));Up.displayName="Panel";ns.displayName="forwardRef(Panel)";let Mf=null,ls=-1,Ol=null;function C6(t,l){if(l){const r=(l&$p)!==0,i=(l&Vp)!==0,s=(l&Ip)!==0,o=(l&Jp)!==0;if(r)return s?"se-resize":o?"ne-resize":"e-resize";if(i)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function E6(){Ol!==null&&(document.head.removeChild(Ol),Mf=null,Ol=null,ls=-1)}function Pc(t,l){var r,i;const s=C6(t,l);if(Mf!==s){if(Mf=s,Ol===null&&(Ol=document.createElement("style"),document.head.appendChild(Ol)),ls>=0){var o;(o=Ol.sheet)===null||o===void 0||o.removeRule(ls)}ls=(r=(i=Ol.sheet)===null||i===void 0?void 0:i.insertRule(`*{cursor: ${s} !important;}`))!==null&&r!==void 0?r:-1}}function Hp(t){return t.type==="keydown"}function Bp(t){return t.type.startsWith("pointer")}function Zp(t){return t.type.startsWith("mouse")}function bs(t){if(Bp(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(Zp(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function M6(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function N6(t,l,r){return t.x<l.x+l.width&&t.x+t.width>l.x&&t.y<l.y+l.height&&t.y+t.height>l.y}function j6(t,l){if(t===l)throw new Error("Cannot compare node with itself");const r={a:nm(t),b:nm(l)};let i;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),l=r.b.pop(),i=t;Me(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:tm(em(r.a)),b:tm(em(r.b))};if(s.a===s.b){const o=i.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let d=o.length;for(;d--;){const m=o[d];if(m===c.a)return 1;if(m===c.b)return-1}}return Math.sign(s.a-s.b)}const A6=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function z6(t){var l;const r=getComputedStyle((l=qp(t))!==null&&l!==void 0?l:t).display;return r==="flex"||r==="inline-flex"}function T6(t){const l=getComputedStyle(t);return!!(l.position==="fixed"||l.zIndex!=="auto"&&(l.position!=="static"||z6(t))||+l.opacity<1||"transform"in l&&l.transform!=="none"||"webkitTransform"in l&&l.webkitTransform!=="none"||"mixBlendMode"in l&&l.mixBlendMode!=="normal"||"filter"in l&&l.filter!=="none"||"webkitFilter"in l&&l.webkitFilter!=="none"||"isolation"in l&&l.isolation==="isolate"||A6.test(l.willChange)||l.webkitOverflowScrolling==="touch")}function em(t){let l=t.length;for(;l--;){const r=t[l];if(Me(r,"Missing node"),T6(r))return r}return null}function tm(t){return t&&Number(getComputedStyle(t).zIndex)||0}function nm(t){const l=[];for(;t;)l.push(t),t=qp(t);return l}function qp(t){const{parentNode:l}=t;return l&&l instanceof ShadowRoot?l.host:l}const $p=1,Vp=2,Ip=4,Jp=8,_6=M6()==="coarse";let kn=[],ra=!1,rr=new Map,vs=new Map;const bi=new Set;function R6(t,l,r,i,s){var o;const{ownerDocument:c}=l,d={direction:r,element:l,hitAreaMargins:i,setResizeHandlerState:s},m=(o=rr.get(c))!==null&&o!==void 0?o:0;return rr.set(c,m+1),bi.add(d),us(),function(){var x;vs.delete(t),bi.delete(d);const y=(x=rr.get(c))!==null&&x!==void 0?x:1;if(rr.set(c,y-1),us(),y===1&&rr.delete(c),kn.includes(d)){const v=kn.indexOf(d);v>=0&&kn.splice(v,1),l1(),s("up",!0,null)}}}function D6(t){const{target:l}=t,{x:r,y:i}=bs(t);ra=!0,n1({target:l,x:r,y:i}),us(),kn.length>0&&(ss("down",t),t.preventDefault(),Fp(l)||t.stopImmediatePropagation())}function Wc(t){const{x:l,y:r}=bs(t);if(ra&&t.buttons===0&&(ra=!1,ss("up",t)),!ra){const{target:i}=t;n1({target:i,x:l,y:r})}ss("move",t),l1(),kn.length>0&&t.preventDefault()}function ef(t){const{target:l}=t,{x:r,y:i}=bs(t);vs.clear(),ra=!1,kn.length>0&&(t.preventDefault(),Fp(l)||t.stopImmediatePropagation()),ss("up",t),n1({target:l,x:r,y:i}),l1(),us()}function Fp(t){let l=t;for(;l;){if(l.hasAttribute(rt.resizeHandle))return!0;l=l.parentElement}return!1}function n1({target:t,x:l,y:r}){kn.splice(0);let i=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(i=t),bi.forEach(s=>{const{element:o,hitAreaMargins:c}=s,d=o.getBoundingClientRect(),{bottom:m,left:p,right:x,top:y}=d,v=_6?c.coarse:c.fine;if(l>=p-v&&l<=x+v&&r>=y-v&&r<=m+v){if(i!==null&&document.contains(i)&&o!==i&&!o.contains(i)&&!i.contains(o)&&j6(i,o)>0){let C=i,T=!1;for(;C&&!C.contains(o);){if(N6(C.getBoundingClientRect(),d)){T=!0;break}C=C.parentElement}if(T)return}kn.push(s)}})}function tf(t,l){vs.set(t,l)}function l1(){let t=!1,l=!1;kn.forEach(i=>{const{direction:s}=i;s==="horizontal"?t=!0:l=!0});let r=0;vs.forEach(i=>{r|=i}),t&&l?Pc("intersection",r):t?Pc("horizontal",r):l?Pc("vertical",r):E6()}let nf=new AbortController;function us(){nf.abort(),nf=new AbortController;const t={capture:!0,signal:nf.signal};bi.size&&(ra?(kn.length>0&&rr.forEach((l,r)=>{const{body:i}=r;l>0&&(i.addEventListener("contextmenu",ef,t),i.addEventListener("pointerleave",Wc,t),i.addEventListener("pointermove",Wc,t))}),window.addEventListener("pointerup",ef,t),window.addEventListener("pointercancel",ef,t)):rr.forEach((l,r)=>{const{body:i}=r;l>0&&(i.addEventListener("pointerdown",D6,t),i.addEventListener("pointermove",Wc,t))}))}function ss(t,l){bi.forEach(r=>{const{setResizeHandlerState:i}=r,s=kn.includes(r);i(t,s,l)})}function O6(){const[t,l]=E.useState(0);return E.useCallback(()=>l(r=>r+1),[])}function Me(t,l){if(!t)throw console.error(l),Error(l)}function ir(t,l,r=e1){return t.toFixed(r)===l.toFixed(r)?0:t>l?1:-1}function Wn(t,l,r=e1){return ir(t,l,r)===0}function en(t,l,r){return ir(t,l,r)===0}function L6(t,l,r){if(t.length!==l.length)return!1;for(let i=0;i<t.length;i++){const s=t[i],o=l[i];if(!en(s,o,r))return!1}return!0}function la({panelConstraints:t,panelIndex:l,size:r}){const i=t[l];Me(i!=null,`Panel constraints not found for index ${l}`);let{collapsedSize:s=0,collapsible:o,maxSize:c=100,minSize:d=0}=i;if(ir(r,d)<0)if(o){const m=(s+d)/2;ir(r,m)<0?r=s:r=d}else r=d;return r=Math.min(c,r),r=parseFloat(r.toFixed(e1)),r}function hi({delta:t,initialLayout:l,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:o}){if(en(t,0))return l;const c=[...l],[d,m]=i;Me(d!=null,"Invalid first pivot index"),Me(m!=null,"Invalid second pivot index");let p=0;if(o==="keyboard"){{const y=t<0?m:d,v=r[y];Me(v,`Panel constraints not found for index ${y}`);const{collapsedSize:S=0,collapsible:C,minSize:T=0}=v;if(C){const z=l[y];if(Me(z!=null,`Previous layout not found for panel index ${y}`),en(z,S)){const M=T-z;ir(M,Math.abs(t))>0&&(t=t<0?0-M:M)}}}{const y=t<0?d:m,v=r[y];Me(v,`No panel constraints found for index ${y}`);const{collapsedSize:S=0,collapsible:C,minSize:T=0}=v;if(C){const z=l[y];if(Me(z!=null,`Previous layout not found for panel index ${y}`),en(z,T)){const M=z-S;ir(M,Math.abs(t))>0&&(t=t<0?0-M:M)}}}}{const y=t<0?1:-1;let v=t<0?m:d,S=0;for(;;){const T=l[v];Me(T!=null,`Previous layout not found for panel index ${v}`);const M=la({panelConstraints:r,panelIndex:v,size:100})-T;if(S+=M,v+=y,v<0||v>=r.length)break}const C=Math.min(Math.abs(t),Math.abs(S));t=t<0?0-C:C}{let v=t<0?d:m;for(;v>=0&&v<r.length;){const S=Math.abs(t)-Math.abs(p),C=l[v];Me(C!=null,`Previous layout not found for panel index ${v}`);const T=C-S,z=la({panelConstraints:r,panelIndex:v,size:T});if(!en(C,z)&&(p+=C-z,c[v]=z,p.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(L6(s,c))return s;{const y=t<0?m:d,v=l[y];Me(v!=null,`Previous layout not found for panel index ${y}`);const S=v+p,C=la({panelConstraints:r,panelIndex:y,size:S});if(c[y]=C,!en(C,S)){let T=S-C,M=t<0?m:d;for(;M>=0&&M<r.length;){const U=c[M];Me(U!=null,`Previous layout not found for panel index ${M}`);const N=U+T,V=la({panelConstraints:r,panelIndex:M,size:N});if(en(U,V)||(T-=V-U,c[M]=V),en(T,0))break;t>0?M--:M++}}}const x=c.reduce((y,v)=>v+y,0);return en(x,100)?c:s}function U6({layout:t,panelsArray:l,pivotIndices:r}){let i=0,s=100,o=0,c=0;const d=r[0];Me(d!=null,"No pivot index found"),l.forEach((y,v)=>{const{constraints:S}=y,{maxSize:C=100,minSize:T=0}=S;v===d?(i=T,s=C):(o+=T,c+=C)});const m=Math.min(s,100-o),p=Math.max(i,100-c),x=t[d];return{valueMax:m,valueMin:p,valueNow:x}}function vi(t,l=document){return Array.from(l.querySelectorAll(`[${rt.resizeHandleId}][data-panel-group-id="${t}"]`))}function Yp(t,l,r=document){const s=vi(t,r).findIndex(o=>o.getAttribute(rt.resizeHandleId)===l);return s??null}function Gp(t,l,r){const i=Yp(t,l,r);return i!=null?[i,i+1]:[-1,-1]}function Xp(t,l=document){var r;if(l instanceof HTMLElement&&(l==null||(r=l.dataset)===null||r===void 0?void 0:r.panelGroupId)==t)return l;const i=l.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return i||null}function Ss(t,l=document){const r=l.querySelector(`[${rt.resizeHandleId}="${t}"]`);return r||null}function H6(t,l,r,i=document){var s,o,c,d;const m=Ss(l,i),p=vi(t,i),x=m?p.indexOf(m):-1,y=(s=(o=r[x])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,v=(c=(d=r[x+1])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null;return[y,v]}function B6({committedValuesRef:t,eagerValuesRef:l,groupId:r,layout:i,panelDataArray:s,panelGroupElement:o,setLayout:c}){E.useRef({didWarnAboutMissingResizeHandle:!1}),ar(()=>{if(!o)return;const d=vi(r,o);for(let m=0;m<s.length-1;m++){const{valueMax:p,valueMin:x,valueNow:y}=U6({layout:i,panelsArray:s,pivotIndices:[m,m+1]}),v=d[m];if(v!=null){const S=s[m];Me(S,`No panel data found for index "${m}"`),v.setAttribute("aria-controls",S.id),v.setAttribute("aria-valuemax",""+Math.round(p)),v.setAttribute("aria-valuemin",""+Math.round(x)),v.setAttribute("aria-valuenow",y!=null?""+Math.round(y):"")}}return()=>{d.forEach((m,p)=>{m.removeAttribute("aria-controls"),m.removeAttribute("aria-valuemax"),m.removeAttribute("aria-valuemin"),m.removeAttribute("aria-valuenow")})}},[r,i,s,o]),E.useEffect(()=>{if(!o)return;const d=l.current;Me(d,"Eager values not found");const{panelDataArray:m}=d,p=Xp(r,o);Me(p!=null,`No group found for id "${r}"`);const x=vi(r,o);Me(x,`No resize handles found for group id "${r}"`);const y=x.map(v=>{const S=v.getAttribute(rt.resizeHandleId);Me(S,"Resize handle element has no handle id attribute");const[C,T]=H6(r,S,m,o);if(C==null||T==null)return()=>{};const z=M=>{if(!M.defaultPrevented)switch(M.key){case"Enter":{M.preventDefault();const U=m.findIndex(N=>N.id===C);if(U>=0){const N=m[U];Me(N,`No panel data found for index ${U}`);const V=i[U],{collapsedSize:F=0,collapsible:_,minSize:I=0}=N.constraints;if(V!=null&&_){const se=hi({delta:en(V,F)?I-F:F-V,initialLayout:i,panelConstraints:m.map(oe=>oe.constraints),pivotIndices:Gp(r,S,o),prevLayout:i,trigger:"keyboard"});i!==se&&c(se)}}break}}};return v.addEventListener("keydown",z),()=>{v.removeEventListener("keydown",z)}});return()=>{y.forEach(v=>v())}},[o,t,l,r,i,s,c])}function lm(t,l){if(t.length!==l.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==l[r])return!1;return!0}function Qp(t,l){const r=t==="horizontal",{x:i,y:s}=bs(l);return r?i:s}function Z6(t,l,r,i,s){const o=r==="horizontal",c=Ss(l,s);Me(c,`No resize handle element found for id "${l}"`);const d=c.getAttribute(rt.groupId);Me(d,"Resize handle element has no group id attribute");let{initialCursorPosition:m}=i;const p=Qp(r,t),x=Xp(d,s);Me(x,`No group element found for id "${d}"`);const y=x.getBoundingClientRect(),v=o?y.width:y.height;return(p-m)/v*100}function q6(t,l,r,i,s,o){if(Hp(t)){const c=r==="horizontal";let d=0;t.shiftKey?d=100:s!=null?d=s:d=10;let m=0;switch(t.key){case"ArrowDown":m=c?0:d;break;case"ArrowLeft":m=c?-d:0;break;case"ArrowRight":m=c?d:0;break;case"ArrowUp":m=c?0:-d;break;case"End":m=100;break;case"Home":m=-100;break}return m}else return i==null?0:Z6(t,l,r,i,o)}function $6({panelDataArray:t}){const l=Array(t.length),r=t.map(o=>o.constraints);let i=0,s=100;for(let o=0;o<t.length;o++){const c=r[o];Me(c,`Panel constraints not found for index ${o}`);const{defaultSize:d}=c;d!=null&&(i++,l[o]=d,s-=d)}for(let o=0;o<t.length;o++){const c=r[o];Me(c,`Panel constraints not found for index ${o}`);const{defaultSize:d}=c;if(d!=null)continue;const m=t.length-i,p=s/m;i++,l[o]=p,s-=p}return l}function Xr(t,l,r){l.forEach((i,s)=>{const o=t[s];Me(o,`Panel data not found for index ${s}`);const{callbacks:c,constraints:d,id:m}=o,{collapsedSize:p=0,collapsible:x}=d,y=r[m];if(y==null||i!==y){r[m]=i;const{onCollapse:v,onExpand:S,onResize:C}=c;C&&C(i,y),x&&(v||S)&&(S&&(y==null||Wn(y,p))&&!Wn(i,p)&&S(),v&&(y==null||!Wn(y,p))&&Wn(i,p)&&v())}})}function Gu(t,l){if(t.length!==l.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=l[r])return!1;return!0}function V6({defaultSize:t,dragState:l,layout:r,panelData:i,panelIndex:s,precision:o=3}){const c=r[s];let d;return c==null?d=t!=null?t.toPrecision(o):"1":i.length===1?d="1":d=c.toPrecision(o),{flexBasis:0,flexGrow:d,flexShrink:1,overflow:"hidden",pointerEvents:l!==null?"none":void 0}}function I6(t,l=10){let r=null;return(...s)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...s)},l)}}function rm(t){try{if(typeof localStorage<"u")t.getItem=l=>localStorage.getItem(l),t.setItem=(l,r)=>{localStorage.setItem(l,r)};else throw new Error("localStorage not supported in this environment")}catch(l){console.error(l),t.getItem=()=>null,t.setItem=()=>{}}}function Kp(t){return`react-resizable-panels:${t}`}function Pp(t){return t.map(l=>{const{constraints:r,id:i,idIsFromProps:s,order:o}=l;return s?i:o?`${o}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((l,r)=>l.localeCompare(r)).join(",")}function Wp(t,l){try{const r=Kp(t),i=l.getItem(r);if(i){const s=JSON.parse(i);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function J6(t,l,r){var i,s;const o=(i=Wp(t,r))!==null&&i!==void 0?i:{},c=Pp(l);return(s=o[c])!==null&&s!==void 0?s:null}function F6(t,l,r,i,s){var o;const c=Kp(t),d=Pp(l),m=(o=Wp(t,s))!==null&&o!==void 0?o:{};m[d]={expandToSizes:Object.fromEntries(r.entries()),layout:i};try{s.setItem(c,JSON.stringify(m))}catch(p){console.error(p)}}function am({layout:t,panelConstraints:l}){const r=[...t],i=r.reduce((o,c)=>o+c,0);if(r.length!==l.length)throw Error(`Invalid ${l.length} panel layout: ${r.map(o=>`${o}%`).join(", ")}`);if(!en(i,100)&&r.length>0)for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=100/i*c;r[o]=d}let s=0;for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=la({panelConstraints:l,panelIndex:o,size:c});c!=d&&(s+=c-d,r[o]=d)}if(!en(s,0))for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=c+s,m=la({panelConstraints:l,panelIndex:o,size:d});if(c!==m&&(s-=m-c,r[o]=m,en(s,0)))break}return r}const Y6=100,mi={getItem:t=>(rm(mi),mi.getItem(t)),setItem:(t,l)=>{rm(mi),mi.setItem(t,l)}},im={};function e3({autoSaveId:t=null,children:l,className:r="",direction:i,forwardedRef:s,id:o=null,onLayout:c=null,keyboardResizeBy:d=null,storage:m=mi,style:p,tagName:x="div",...y}){const v=t1(o),S=E.useRef(null),[C,T]=E.useState(null),[z,M]=E.useState([]),U=O6(),N=E.useRef({}),V=E.useRef(new Map),F=E.useRef(0),_=E.useRef({autoSaveId:t,direction:i,dragState:C,id:v,keyboardResizeBy:d,onLayout:c,storage:m}),I=E.useRef({layout:z,panelDataArray:[],panelDataArrayChanged:!1});E.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),E.useImperativeHandle(s,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:k}=I.current;return k},setLayout:k=>{const{onLayout:Q}=_.current,{layout:re,panelDataArray:ee}=I.current,ne=am({layout:k,panelConstraints:ee.map(fe=>fe.constraints)});lm(re,ne)||(M(ne),I.current.layout=ne,Q&&Q(ne),Xr(ee,ne,N.current))}}),[]),ar(()=>{_.current.autoSaveId=t,_.current.direction=i,_.current.dragState=C,_.current.id=v,_.current.onLayout=c,_.current.storage=m}),B6({committedValuesRef:_,eagerValuesRef:I,groupId:v,layout:z,panelDataArray:I.current.panelDataArray,setLayout:M,panelGroupElement:S.current}),E.useEffect(()=>{const{panelDataArray:k}=I.current;if(t){if(z.length===0||z.length!==k.length)return;let Q=im[t];Q==null&&(Q=I6(F6,Y6),im[t]=Q);const re=[...k],ee=new Map(V.current);Q(t,re,ee,z,m)}},[t,z,m]),E.useEffect(()=>{});const se=E.useCallback(k=>{const{onLayout:Q}=_.current,{layout:re,panelDataArray:ee}=I.current;if(k.constraints.collapsible){const ne=ee.map(st=>st.constraints),{collapsedSize:fe=0,panelSize:me,pivotIndices:Le}=nr(ee,k,re);if(Me(me!=null,`Panel size not found for panel "${k.id}"`),!Wn(me,fe)){V.current.set(k.id,me);const Mt=ea(ee,k)===ee.length-1?me-fe:fe-me,Fe=hi({delta:Mt,initialLayout:re,panelConstraints:ne,pivotIndices:Le,prevLayout:re,trigger:"imperative-api"});Gu(re,Fe)||(M(Fe),I.current.layout=Fe,Q&&Q(Fe),Xr(ee,Fe,N.current))}}},[]),oe=E.useCallback((k,Q)=>{const{onLayout:re}=_.current,{layout:ee,panelDataArray:ne}=I.current;if(k.constraints.collapsible){const fe=ne.map(at=>at.constraints),{collapsedSize:me=0,panelSize:Le=0,minSize:st=0,pivotIndices:Mt}=nr(ne,k,ee),Fe=Q??st;if(Wn(Le,me)){const at=V.current.get(k.id),nn=at!=null&&at>=Fe?at:Fe,al=ea(ne,k)===ne.length-1?Le-nn:nn-Le,mt=hi({delta:al,initialLayout:ee,panelConstraints:fe,pivotIndices:Mt,prevLayout:ee,trigger:"imperative-api"});Gu(ee,mt)||(M(mt),I.current.layout=mt,re&&re(mt),Xr(ne,mt,N.current))}}},[]),O=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{panelSize:ee}=nr(re,k,Q);return Me(ee!=null,`Panel size not found for panel "${k.id}"`),ee},[]),ae=E.useCallback((k,Q)=>{const{panelDataArray:re}=I.current,ee=ea(re,k);return V6({defaultSize:Q,dragState:C,layout:z,panelData:re,panelIndex:ee})},[C,z]),te=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{collapsedSize:ee=0,collapsible:ne,panelSize:fe}=nr(re,k,Q);return Me(fe!=null,`Panel size not found for panel "${k.id}"`),ne===!0&&Wn(fe,ee)},[]),be=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{collapsedSize:ee=0,collapsible:ne,panelSize:fe}=nr(re,k,Q);return Me(fe!=null,`Panel size not found for panel "${k.id}"`),!ne||ir(fe,ee)>0},[]),ue=E.useCallback(k=>{const{panelDataArray:Q}=I.current;Q.push(k),Q.sort((re,ee)=>{const ne=re.order,fe=ee.order;return ne==null&&fe==null?0:ne==null?-1:fe==null?1:ne-fe}),I.current.panelDataArrayChanged=!0,U()},[U]);ar(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:k,onLayout:Q,storage:re}=_.current,{layout:ee,panelDataArray:ne}=I.current;let fe=null;if(k){const Le=J6(k,ne,re);Le&&(V.current=new Map(Object.entries(Le.expandToSizes)),fe=Le.layout)}fe==null&&(fe=$6({panelDataArray:ne}));const me=am({layout:fe,panelConstraints:ne.map(Le=>Le.constraints)});lm(ee,me)||(M(me),I.current.layout=me,Q&&Q(me),Xr(ne,me,N.current))}}),ar(()=>{const k=I.current;return()=>{k.layout=[]}},[]);const P=E.useCallback(k=>{let Q=!1;const re=S.current;return re&&window.getComputedStyle(re,null).getPropertyValue("direction")==="rtl"&&(Q=!0),function(ne){ne.preventDefault();const fe=S.current;if(!fe)return()=>null;const{direction:me,dragState:Le,id:st,keyboardResizeBy:Mt,onLayout:Fe}=_.current,{layout:at,panelDataArray:nn}=I.current,{initialLayout:gn}=Le??{},al=Gp(st,k,fe);let mt=q6(ne,k,me,Le,Mt,fe);const Rn=me==="horizontal";Rn&&Q&&(mt=-mt);const il=nn.map(ma=>ma.constraints),yn=hi({delta:mt,initialLayout:gn??at,panelConstraints:il,pivotIndices:al,prevLayout:at,trigger:Hp(ne)?"keyboard":"mouse-or-touch"}),cr=!Gu(at,yn);(Bp(ne)||Zp(ne))&&F.current!=mt&&(F.current=mt,!cr&&mt!==0?Rn?tf(k,mt<0?$p:Vp):tf(k,mt<0?Ip:Jp):tf(k,0)),cr&&(M(yn),I.current.layout=yn,Fe&&Fe(yn),Xr(nn,yn,N.current))}},[]),H=E.useCallback((k,Q)=>{const{onLayout:re}=_.current,{layout:ee,panelDataArray:ne}=I.current,fe=ne.map(at=>at.constraints),{panelSize:me,pivotIndices:Le}=nr(ne,k,ee);Me(me!=null,`Panel size not found for panel "${k.id}"`);const Mt=ea(ne,k)===ne.length-1?me-Q:Q-me,Fe=hi({delta:Mt,initialLayout:ee,panelConstraints:fe,pivotIndices:Le,prevLayout:ee,trigger:"imperative-api"});Gu(ee,Fe)||(M(Fe),I.current.layout=Fe,re&&re(Fe),Xr(ne,Fe,N.current))},[]),W=E.useCallback((k,Q)=>{const{layout:re,panelDataArray:ee}=I.current,{collapsedSize:ne=0,collapsible:fe}=Q,{collapsedSize:me=0,collapsible:Le,maxSize:st=100,minSize:Mt=0}=k.constraints,{panelSize:Fe}=nr(ee,k,re);Fe!=null&&(fe&&Le&&Wn(Fe,ne)?Wn(ne,me)||H(k,me):Fe<Mt?H(k,Mt):Fe>st&&H(k,st))},[H]),ce=E.useCallback((k,Q)=>{const{direction:re}=_.current,{layout:ee}=I.current;if(!S.current)return;const ne=Ss(k,S.current);Me(ne,`Drag handle element not found for id "${k}"`);const fe=Qp(re,Q);T({dragHandleId:k,dragHandleRect:ne.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ee})},[]),Se=E.useCallback(()=>{T(null)},[]),j=E.useCallback(k=>{const{panelDataArray:Q}=I.current,re=ea(Q,k);re>=0&&(Q.splice(re,1),delete N.current[k.id],I.current.panelDataArrayChanged=!0,U())},[U]),R=E.useMemo(()=>({collapsePanel:se,direction:i,dragState:C,expandPanel:oe,getPanelSize:O,getPanelStyle:ae,groupId:v,isPanelCollapsed:te,isPanelExpanded:be,reevaluatePanelConstraints:W,registerPanel:ue,registerResizeHandle:P,resizePanel:H,startDragging:ce,stopDragging:Se,unregisterPanel:j,panelGroupElement:S.current}),[se,C,i,oe,O,ae,v,te,be,W,ue,P,H,ce,Se,j]),J={display:"flex",flexDirection:i==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return E.createElement(xs.Provider,{value:R},E.createElement(x,{...y,children:l,className:r,id:o,ref:S,style:{...J,...p},[rt.group]:"",[rt.groupDirection]:i,[rt.groupId]:v}))}const t3=E.forwardRef((t,l)=>E.createElement(e3,{...t,forwardedRef:l}));e3.displayName="PanelGroup";t3.displayName="forwardRef(PanelGroup)";function ea(t,l){return t.findIndex(r=>r===l||r.id===l.id)}function nr(t,l,r){const i=ea(t,l),o=i===t.length-1?[i-1,i]:[i,i+1],c=r[i];return{...l.constraints,panelSize:c,pivotIndices:o}}function G6({disabled:t,handleId:l,resizeHandler:r,panelGroupElement:i}){E.useEffect(()=>{if(t||r==null||i==null)return;const s=Ss(l,i);if(s==null)return;const o=c=>{if(!c.defaultPrevented)switch(c.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{c.preventDefault(),r(c);break}case"F6":{c.preventDefault();const d=s.getAttribute(rt.groupId);Me(d,`No group element found for id "${d}"`);const m=vi(d,i),p=Yp(d,l,i);Me(p!==null,`No resize element found for id "${l}"`);const x=c.shiftKey?p>0?p-1:m.length-1:p+1<m.length?p+1:0;m[x].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[i,t,l,r])}function Nf({children:t=null,className:l="",disabled:r=!1,hitAreaMargins:i,id:s,onBlur:o,onClick:c,onDragging:d,onFocus:m,onPointerDown:p,onPointerUp:x,style:y={},tabIndex:v=0,tagName:S="div",...C}){var T,z;const M=E.useRef(null),U=E.useRef({onClick:c,onDragging:d,onPointerDown:p,onPointerUp:x});E.useEffect(()=>{U.current.onClick=c,U.current.onDragging=d,U.current.onPointerDown=p,U.current.onPointerUp=x});const N=E.useContext(xs);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:V,groupId:F,registerResizeHandle:_,startDragging:I,stopDragging:se,panelGroupElement:oe}=N,O=t1(s),[ae,te]=E.useState("inactive"),[be,ue]=E.useState(!1),[P,H]=E.useState(null),W=E.useRef({state:ae});ar(()=>{W.current.state=ae}),E.useEffect(()=>{if(r)H(null);else{const R=_(O);H(()=>R)}},[r,O,_]);const ce=(T=i==null?void 0:i.coarse)!==null&&T!==void 0?T:15,Se=(z=i==null?void 0:i.fine)!==null&&z!==void 0?z:5;E.useEffect(()=>{if(r||P==null)return;const R=M.current;Me(R,"Element ref not attached");let J=!1;return R6(O,R,V,{coarse:ce,fine:Se},(Q,re,ee)=>{if(!re){te("inactive");return}switch(Q){case"down":{te("drag"),J=!1,Me(ee,'Expected event to be defined for "down" action'),I(O,ee);const{onDragging:ne,onPointerDown:fe}=U.current;ne==null||ne(!0),fe==null||fe();break}case"move":{const{state:ne}=W.current;J=!0,ne!=="drag"&&te("hover"),Me(ee,'Expected event to be defined for "move" action'),P(ee);break}case"up":{te("hover"),se();const{onClick:ne,onDragging:fe,onPointerUp:me}=U.current;fe==null||fe(!1),me==null||me(),J||ne==null||ne();break}}})},[ce,V,r,Se,_,O,P,I,se]),G6({disabled:r,handleId:O,resizeHandler:P,panelGroupElement:oe});const j={touchAction:"none",userSelect:"none"};return E.createElement(S,{...C,children:t,className:l,id:s,onBlur:()=>{ue(!1),o==null||o()},onFocus:()=>{ue(!0),m==null||m()},ref:M,role:"separator",style:{...j,...y},tabIndex:v,[rt.groupDirection]:V,[rt.groupId]:F,[rt.resizeHandle]:"",[rt.resizeHandleActive]:ae==="drag"?"pointer":be?"keyboard":void 0,[rt.resizeHandleEnabled]:!r,[rt.resizeHandleId]:O,[rt.resizeHandleState]:ae})}Nf.displayName="PanelResizeHandle";/**
|
|
60
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let v=ll(),S;if(l){let N=typeof l=="string"?ua(l):l;tt(x==="/"||((U=N.pathname)==null?void 0:U.startsWith(x)),`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 "${x}" but pathname "${N.pathname}" was given in the \`location\` prop.`),S=N}else S=v;let C=S.pathname||"/",T=C;if(x!=="/"){let N=x.replace(/^\//,"").split("/");T="/"+C.replace(/^\//,"").split("/").slice(N.length).join("/")}let z=sp(t,{pathname:T});zn(y||z!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),zn(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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 M=Uy(z&&z.map(N=>Object.assign({},N,{params:Object.assign({},m,N.params),pathname:el([x,o.encodeLocation?o.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?x:el([x,o.encodeLocation?o.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,r,i,s);return l&&M?E.createElement(Ei.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...S},navigationType:"POP"}},M):M}function Ry(){let t=$y(),l=vy(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:i},o={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:o},"ErrorBoundary")," or"," ",E.createElement("code",{style:o},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},l),r?E.createElement("pre",{style:s},r):null,c)}var Dy=E.createElement(Ry,null),Sp=class extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const r=Ay(t.digest);r&&(t=r)}let l=t!==void 0?E.createElement(Tn.Provider,{value:this.props.routeContext},E.createElement(Vf.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?E.createElement(Oy,{error:t},l):l}};Sp.contextType=ky;var Qc=new WeakMap;function Oy({children:t,error:l}){let{basename:r}=E.useContext(pn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let i=jy(l.digest);if(i){let s=Qc.get(l);if(s)throw s;let o=mp(i.location,r);if(hp&&!Qc.get(l))if(o.isExternal||i.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:i.replace}));throw Qc.set(l,c),c}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return t}function Ly({routeContext:t,match:l,children:r}){let i=E.useContext(sa);return i&&i.static&&i.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=l.route.id),E.createElement(Tn.Provider,{value:t},r)}function Uy(t,l=[],r=null,i=null,s=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(l.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,c=r==null?void 0:r.errors;if(c!=null){let x=o.findIndex(y=>y.route.id&&(c==null?void 0:c[y.route.id])!==void 0);tt(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,x+1))}let d=!1,m=-1;if(r)for(let x=0;x<o.length;x++){let y=o[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(m=x),y.route.id){let{loaderData:v,errors:S}=r,C=y.route.loader&&!v.hasOwnProperty(y.route.id)&&(!S||S[y.route.id]===void 0);if(y.route.lazy||C){d=!0,m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}let p=r&&i?(x,y)=>{var v,S;i(x,{location:r.location,params:((S=(v=r.matches)==null?void 0:v[0])==null?void 0:S.params)??{},unstable_pattern:Sy(r.matches),errorInfo:y})}:void 0;return o.reduceRight((x,y,v)=>{let S,C=!1,T=null,z=null;r&&(S=c&&y.route.id?c[y.route.id]:void 0,T=y.route.errorElement||Dy,d&&(m<0&&v===0?(wp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,z=null):m===v&&(C=!0,z=y.route.hydrateFallbackElement||null)));let M=l.concat(o.slice(0,v+1)),U=()=>{let N;return S?N=T:C?N=z:y.route.Component?N=E.createElement(y.route.Component,null):y.route.element?N=y.route.element:N=x,E.createElement(Ly,{match:y,routeContext:{outlet:x,matches:M,isDataRoute:r!=null},children:N})};return r&&(y.route.ErrorBoundary||y.route.errorElement||v===0)?E.createElement(Sp,{location:r.location,revalidation:r.revalidation,component:T,error:S,children:U(),routeContext:{outlet:null,matches:M,isDataRoute:!0},onError:p}):U()},null)}function Ff(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hy(t){let l=E.useContext(sa);return tt(l,Ff(t)),l}function By(t){let l=E.useContext(ps);return tt(l,Ff(t)),l}function Zy(t){let l=E.useContext(Tn);return tt(l,Ff(t)),l}function Yf(t){let l=Zy(t),r=l.matches[l.matches.length-1];return tt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function qy(){return Yf("useRouteId")}function $y(){var i;let t=E.useContext(Vf),l=By("useRouteError"),r=Yf("useRouteError");return t!==void 0?t:(i=l.errors)==null?void 0:i[r]}function Vy(){let{router:t}=Hy("useNavigate"),l=Yf("useNavigate"),r=E.useRef(!1);return bp(()=>{r.current=!0}),E.useCallback(async(s,o={})=>{zn(r.current,xp),r.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:l,...o}))},[t,l])}var H0={};function wp(t,l,r){!l&&!H0[t]&&(H0[t]=!0,zn(!1,r))}E.memo(Iy);function Iy({routes:t,future:l,state:r,onError:i}){return vp(t,void 0,r,i,l)}function Dl(t){tt(!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 Jy({basename:t="/",children:l=null,location:r,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){tt(!Mi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),m=E.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof r=="string"&&(r=ua(r));let{pathname:p="/",search:x="",hash:y="",state:v=null,key:S="default"}=r,C=E.useMemo(()=>{let T=tl(p,d);return T==null?null:{location:{pathname:T,search:x,hash:y,state:v,key:S},navigationType:i}},[d,p,x,y,v,S,i]);return zn(C!=null,`<Router basename="${d}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:E.createElement(pn.Provider,{value:m},E.createElement(Ei.Provider,{children:l,value:C}))}function Fy({children:t,location:l}){return _y(Ef(t),l)}function Ef(t,l=[]){let r=[];return E.Children.forEach(t,(i,s)=>{if(!E.isValidElement(i))return;let o=[...l,s];if(i.type===E.Fragment){r.push.apply(r,Ef(i.props.children,o));return}tt(i.type===Dl,`[${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>`),tt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={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&&(c.children=Ef(i.props.children,o)),r.push(c)}),r}var es="get",ts="application/x-www-form-urlencoded";function gs(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function Yy(t){return gs(t)&&t.tagName.toLowerCase()==="button"}function Gy(t){return gs(t)&&t.tagName.toLowerCase()==="form"}function Xy(t){return gs(t)&&t.tagName.toLowerCase()==="input"}function Qy(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Ky(t,l){return t.button===0&&(!l||l==="_self")&&!Qy(t)}var Yu=null;function Py(){if(Yu===null)try{new FormData(document.createElement("form"),0),Yu=!1}catch{Yu=!0}return Yu}var Wy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kc(t){return t!=null&&!Wy.has(t)?(zn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ts}"`),null):t}function ex(t,l){let r,i,s,o,c;if(Gy(t)){let d=t.getAttribute("action");i=d?tl(d,l):null,r=t.getAttribute("method")||es,s=Kc(t.getAttribute("enctype"))||ts,o=new FormData(t)}else if(Yy(t)||Xy(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=t.getAttribute("formaction")||d.getAttribute("action");if(i=m?tl(m,l):null,r=t.getAttribute("formmethod")||d.getAttribute("method")||es,s=Kc(t.getAttribute("formenctype"))||Kc(d.getAttribute("enctype"))||ts,o=new FormData(d,t),!Py()){let{name:p,type:x,value:y}=t;if(x==="image"){let v=p?`${p}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else p&&o.append(p,y)}}else{if(gs(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=es,i=null,s=ts,c=t}return o&&s==="text/plain"&&(c=o,o=void 0),{action:i,method:r.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gf(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function tx(t,l,r,i){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${i}`:s.pathname=`${s.pathname}.${i}`:s.pathname==="/"?s.pathname=`_root.${i}`:l&&tl(s.pathname,l)==="/"?s.pathname=`${l.replace(/\/$/,"")}/_root.${i}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${i}`,s}async function nx(t,l){if(t.id in l)return l[t.id];try{let r=await import(t.module);return l[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lx(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function rx(t,l,r){let i=await Promise.all(t.map(async s=>{let o=l.routes[s.route.id];if(o){let c=await nx(o,r);return c.links?c.links():[]}return[]}));return sx(i.flat(1).filter(lx).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function B0(t,l,r,i,s,o){let c=(m,p)=>r[p]?m.route.id!==r[p].route.id:!0,d=(m,p)=>{var x;return r[p].pathname!==m.pathname||((x=r[p].route.path)==null?void 0:x.endsWith("*"))&&r[p].params["*"]!==m.params["*"]};return o==="assets"?l.filter((m,p)=>c(m,p)||d(m,p)):o==="data"?l.filter((m,p)=>{var y;let x=i.routes[m.route.id];if(!x||!x.hasLoader)return!1;if(c(m,p)||d(m,p))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((y=r[0])==null?void 0:y.params)||{},nextUrl:new URL(t,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function ax(t,l,{includeHydrateFallback:r}={}){return ix(t.map(i=>{let s=l.routes[i.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),r&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function ix(t){return[...new Set(t)]}function ux(t){let l={},r=Object.keys(t).sort();for(let i of r)l[i]=t[i];return l}function sx(t,l){let r=new Set;return new Set(l),t.reduce((i,s)=>{let o=JSON.stringify(ux(s));return r.has(o)||(r.add(o),i.push({key:o,link:s})),i},[])}function kp(){let t=E.useContext(sa);return Gf(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function ox(){let t=E.useContext(ps);return Gf(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Xf=E.createContext(void 0);Xf.displayName="FrameworkContext";function Cp(){let t=E.useContext(Xf);return Gf(t,"You must render this element inside a <HydratedRouter> element"),t}function cx(t,l){let r=E.useContext(Xf),[i,s]=E.useState(!1),[o,c]=E.useState(!1),{onFocus:d,onBlur:m,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=l,v=E.useRef(null);E.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let T=M=>{M.forEach(U=>{c(U.isIntersecting)})},z=new IntersectionObserver(T,{threshold:.5});return v.current&&z.observe(v.current),()=>{z.disconnect()}}},[t]),E.useEffect(()=>{if(i){let T=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(T)}}},[i]);let S=()=>{s(!0)},C=()=>{s(!1),c(!1)};return r?t!=="intent"?[o,v,{}]:[o,v,{onFocus:si(d,S),onBlur:si(m,C),onMouseEnter:si(p,S),onMouseLeave:si(x,C),onTouchStart:si(y,S)}]:[!1,v,{}]}function si(t,l){return r=>{t&&t(r),r.defaultPrevented||l(r)}}function fx({page:t,...l}){let{router:r}=kp(),i=E.useMemo(()=>sp(r.routes,t,r.basename),[r.routes,t,r.basename]);return i?E.createElement(hx,{page:t,matches:i,...l}):null}function dx(t){let{manifest:l,routeModules:r}=Cp(),[i,s]=E.useState([]);return E.useEffect(()=>{let o=!1;return rx(t,l,r).then(c=>{o||s(c)}),()=>{o=!0}},[t,l,r]),i}function hx({page:t,matches:l,...r}){let i=ll(),{future:s,manifest:o,routeModules:c}=Cp(),{basename:d}=kp(),{loaderData:m,matches:p}=ox(),x=E.useMemo(()=>B0(t,l,p,o,i,"data"),[t,l,p,o,i]),y=E.useMemo(()=>B0(t,l,p,o,i,"assets"),[t,l,p,o,i]),v=E.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let T=new Set,z=!1;if(l.forEach(U=>{var V;let N=o.routes[U.route.id];!N||!N.hasLoader||(!x.some(F=>F.route.id===U.route.id)&&U.route.id in m&&((V=c[U.route.id])!=null&&V.shouldRevalidate)||N.hasClientLoader?z=!0:T.add(U.route.id))}),T.size===0)return[];let M=tx(t,d,s.unstable_trailingSlashAwareDataRequests,"data");return z&&T.size>0&&M.searchParams.set("_routes",l.filter(U=>T.has(U.route.id)).map(U=>U.route.id).join(",")),[M.pathname+M.search]},[d,s.unstable_trailingSlashAwareDataRequests,m,i,o,x,l,t,c]),S=E.useMemo(()=>ax(y,o),[y,o]),C=dx(y);return E.createElement(E.Fragment,null,v.map(T=>E.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...r})),S.map(T=>E.createElement("link",{key:T,rel:"modulepreload",href:T,...r})),C.map(({key:T,link:z})=>E.createElement("link",{key:T,nonce:r.nonce,...z,crossOrigin:z.crossOrigin??r.crossOrigin})))}function mx(...t){return l=>{t.forEach(r=>{typeof r=="function"?r(l):r!=null&&(r.current=l)})}}var px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{px&&(window.__reactRouterVersion="7.13.0")}catch{}function gx({basename:t,children:l,unstable_useTransitions:r,window:i}){let s=E.useRef();s.current==null&&(s.current=Q5({window:i,v5Compat:!0}));let o=s.current,[c,d]=E.useState({action:o.action,location:o.location}),m=E.useCallback(p=>{r===!1?d(p):E.startTransition(()=>d(p))},[r]);return E.useLayoutEffect(()=>o.listen(m),[o,m]),E.createElement(Jy,{basename:t,children:l,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:r})}var Ep=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yt=E.forwardRef(function({onClick:l,discover:r="render",prefetch:i="none",relative:s,reloadDocument:o,replace:c,state:d,target:m,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...S},C){let{basename:T,unstable_useTransitions:z}=E.useContext(pn),M=typeof p=="string"&&Ep.test(p),U=mp(p,T);p=U.to;let N=zy(p,{relative:s}),[V,F,_]=cx(i,S),I=vx(p,{replace:c,state:d,target:m,preventScrollReset:x,relative:s,viewTransition:y,unstable_defaultShouldRevalidate:v,unstable_useTransitions:z});function se(O){l&&l(O),O.defaultPrevented||I(O)}let oe=E.createElement("a",{...S,..._,href:U.absoluteURL||N,onClick:U.isExternal||o?l:se,ref:mx(C,F),target:m,"data-discover":!M&&r==="render"?"true":void 0});return V&&!M?E.createElement(E.Fragment,null,oe,E.createElement(fx,{page:N})):oe});yt.displayName="Link";var yx=E.forwardRef(function({"aria-current":l="page",caseSensitive:r=!1,className:i="",end:s=!1,style:o,to:c,viewTransition:d,children:m,...p},x){let y=Ni(c,{relative:p.relative}),v=ll(),S=E.useContext(ps),{navigator:C,basename:T}=E.useContext(pn),z=S!=null&&Ex(y)&&d===!0,M=C.encodeLocation?C.encodeLocation(y).pathname:y.pathname,U=v.pathname,N=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;r||(U=U.toLowerCase(),N=N?N.toLowerCase():null,M=M.toLowerCase()),N&&T&&(N=tl(N,T)||N);const V=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let F=U===M||!s&&U.startsWith(M)&&U.charAt(V)==="/",_=N!=null&&(N===M||!s&&N.startsWith(M)&&N.charAt(M.length)==="/"),I={isActive:F,isPending:_,isTransitioning:z},se=F?l:void 0,oe;typeof i=="function"?oe=i(I):oe=[i,F?"active":null,_?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(I):o;return E.createElement(yt,{...p,"aria-current":se,className:oe,ref:x,style:O,to:c,viewTransition:d},typeof m=="function"?m(I):m)});yx.displayName="NavLink";var xx=E.forwardRef(({discover:t="render",fetcherKey:l,navigate:r,reloadDocument:i,replace:s,state:o,method:c=es,action:d,onSubmit:m,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v,...S},C)=>{let{unstable_useTransitions:T}=E.useContext(pn),z=kx(),M=Cx(d,{relative:p}),U=c.toLowerCase()==="get"?"get":"post",N=typeof d=="string"&&Ep.test(d),V=F=>{if(m&&m(F),F.defaultPrevented)return;F.preventDefault();let _=F.nativeEvent.submitter,I=(_==null?void 0:_.getAttribute("formmethod"))||c,se=()=>z(_||F.currentTarget,{fetcherKey:l,method:I,navigate:r,replace:s,state:o,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:v});T&&r!==!1?E.startTransition(()=>se()):se()};return E.createElement("form",{ref:C,method:U,action:M,onSubmit:i?m:V,...S,"data-discover":!N&&t==="render"?"true":void 0})});xx.displayName="Form";function bx(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mp(t){let l=E.useContext(sa);return tt(l,bx(t)),l}function vx(t,{target:l,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:m}={}){let p=If(),x=ll(),y=Ni(t,{relative:o});return E.useCallback(v=>{if(Ky(v,l)){v.preventDefault();let S=r!==void 0?r:xi(x)===xi(y),C=()=>p(t,{replace:S,state:i,preventScrollReset:s,relative:o,viewTransition:c,unstable_defaultShouldRevalidate:d});m?E.startTransition(()=>C()):C()}},[x,p,y,r,i,l,t,s,o,c,d,m])}var Sx=0,wx=()=>`__${String(++Sx)}__`;function kx(){let{router:t}=Mp("useSubmit"),{basename:l}=E.useContext(pn),r=qy(),i=t.fetch,s=t.navigate;return E.useCallback(async(o,c={})=>{let{action:d,method:m,encType:p,formData:x,body:y}=ex(o,l);if(c.navigate===!1){let v=c.fetcherKey||wx();await i(v,r,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||m,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:x,body:y,formMethod:c.method||m,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,s,l,r])}function Cx(t,{relative:l}={}){let{basename:r}=E.useContext(pn),i=E.useContext(Tn);tt(i,"useFormAction must be used inside a RouteContext");let[s]=i.matches.slice(-1),o={...Ni(t||".",{relative:l})},c=ll();if(t==null){o.search=c.search;let d=new URLSearchParams(o.search),m=d.getAll("index");if(m.some(x=>x==="")){d.delete("index"),m.filter(y=>y).forEach(y=>d.append("index",y));let x=d.toString();o.search=x?`?${x}`:""}}return(!t||t===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:el([r,o.pathname])),xi(o)}function Ex(t,{relative:l}={}){let r=E.useContext(gp);tt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Mp("useViewTransitionState"),s=Ni(t,{relative:l});if(!r.isTransitioning)return!1;let o=tl(r.currentLocation.pathname,i)||r.currentLocation.pathname,c=tl(r.nextLocation.pathname,i)||r.nextLocation.pathname;return as(s.pathname,c)!=null||as(s.pathname,o)!=null}/**
|
|
61
61
|
* @license lucide-react v0.475.0 - ISC
|
|
62
62
|
*
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const
|
|
65
|
+
*/const Mx=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Np=(...t)=>t.filter((l,r,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===r).join(" ").trim();/**
|
|
66
66
|
* @license lucide-react v0.475.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/var
|
|
70
|
+
*/var Nx={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"};/**
|
|
71
71
|
* @license lucide-react v0.475.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
74
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const
|
|
75
|
+
*/const jx=E.forwardRef(({color:t="currentColor",size:l=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:c,...d},m)=>E.createElement("svg",{ref:m,...Nx,width:l,height:l,stroke:t,strokeWidth:i?Number(r)*24/Number(l):r,className:Np("lucide",s),...d},[...c.map(([p,x])=>E.createElement(p,x)),...Array.isArray(o)?o:[o]]));/**
|
|
76
76
|
* @license lucide-react v0.475.0 - ISC
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const ve=(t,l)=>{const r=E.forwardRef(({className:i,...s},o)=>E.createElement(
|
|
80
|
+
*/const ve=(t,l)=>{const r=E.forwardRef(({className:i,...s},o)=>E.createElement(jx,{ref:o,iconNode:l,className:Np(`lucide-${Mx(t)}`,i),...s}));return r.displayName=`${t}`,r};/**
|
|
81
81
|
* @license lucide-react v0.475.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const
|
|
85
|
+
*/const Ax=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zx=ve("ArrowDown",Ax);/**
|
|
86
86
|
* @license lucide-react v0.475.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
89
89
|
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const
|
|
90
|
+
*/const Tx=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Qf=ve("ArrowLeft",Tx);/**
|
|
91
91
|
* @license lucide-react v0.475.0 - ISC
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const
|
|
95
|
+
*/const _x=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rx=ve("ArrowUp",_x);/**
|
|
96
96
|
* @license lucide-react v0.475.0 - ISC
|
|
97
97
|
*
|
|
98
98
|
* This source code is licensed under the ISC license.
|
|
99
99
|
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const
|
|
100
|
+
*/const Dx=[["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"}]],Ox=ve("Briefcase",Dx);/**
|
|
101
101
|
* @license lucide-react v0.475.0 - ISC
|
|
102
102
|
*
|
|
103
103
|
* This source code is licensed under the ISC license.
|
|
104
104
|
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const
|
|
105
|
+
*/const Lx=[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],jp=ve("CalendarClock",Lx);/**
|
|
106
106
|
* @license lucide-react v0.475.0 - ISC
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
110
|
+
*/const Ux=[["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"}]],Kf=ve("Calendar",Ux);/**
|
|
111
111
|
* @license lucide-react v0.475.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
114
114
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const
|
|
115
|
+
*/const Hx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ap=ve("Check",Hx);/**
|
|
116
116
|
* @license lucide-react v0.475.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
120
|
+
*/const Bx=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zp=ve("ChevronLeft",Bx);/**
|
|
121
121
|
* @license lucide-react v0.475.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
124
124
|
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const
|
|
125
|
+
*/const Zx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pf=ve("ChevronRight",Zx);/**
|
|
126
126
|
* @license lucide-react v0.475.0 - ISC
|
|
127
127
|
*
|
|
128
128
|
* This source code is licensed under the ISC license.
|
|
129
129
|
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const
|
|
130
|
+
*/const qx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Tp=ve("CircleAlert",qx);/**
|
|
131
131
|
* @license lucide-react v0.475.0 - ISC
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const
|
|
135
|
+
*/const $x=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],_p=ve("CircleCheckBig",$x);/**
|
|
136
136
|
* @license lucide-react v0.475.0 - ISC
|
|
137
137
|
*
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const
|
|
140
|
+
*/const Vx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],Ix=ve("CircleStop",Vx);/**
|
|
141
141
|
* @license lucide-react v0.475.0 - ISC
|
|
142
142
|
*
|
|
143
143
|
* This source code is licensed under the ISC license.
|
|
144
144
|
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const
|
|
145
|
+
*/const Jx=[["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"}]],Fx=ve("CircleX",Jx);/**
|
|
146
146
|
* @license lucide-react v0.475.0 - ISC
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const
|
|
150
|
+
*/const Yx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Mf=ve("Clock",Yx);/**
|
|
151
151
|
* @license lucide-react v0.475.0 - ISC
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const
|
|
155
|
+
*/const Gx=[["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"}]],Rp=ve("Copy",Gx);/**
|
|
156
156
|
* @license lucide-react v0.475.0 - ISC
|
|
157
157
|
*
|
|
158
158
|
* This source code is licensed under the ISC license.
|
|
159
159
|
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const
|
|
160
|
+
*/const Xx=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Qx=ve("Cpu",Xx);/**
|
|
161
161
|
* @license lucide-react v0.475.0 - ISC
|
|
162
162
|
*
|
|
163
163
|
* This source code is licensed under the ISC license.
|
|
164
164
|
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const
|
|
165
|
+
*/const Kx=[["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"}]],Px=ve("ExternalLink",Kx);/**
|
|
166
166
|
* @license lucide-react v0.475.0 - ISC
|
|
167
167
|
*
|
|
168
168
|
* This source code is licensed under the ISC license.
|
|
169
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const
|
|
170
|
+
*/const Wx=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],e6=ve("Eye",Wx);/**
|
|
171
171
|
* @license lucide-react v0.475.0 - ISC
|
|
172
172
|
*
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const
|
|
175
|
+
*/const t6=[["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"}]],n6=ve("FolderOpen",t6);/**
|
|
176
176
|
* @license lucide-react v0.475.0 - ISC
|
|
177
177
|
*
|
|
178
178
|
* This source code is licensed under the ISC license.
|
|
179
179
|
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const
|
|
180
|
+
*/const l6=[["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"}]],is=ve("GitFork",l6);/**
|
|
181
181
|
* @license lucide-react v0.475.0 - ISC
|
|
182
182
|
*
|
|
183
183
|
* This source code is licensed under the ISC license.
|
|
184
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const
|
|
185
|
+
*/const r6=[["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"}]],Dp=ve("Globe",r6);/**
|
|
186
186
|
* @license lucide-react v0.475.0 - ISC
|
|
187
187
|
*
|
|
188
188
|
* This source code is licensed under the ISC license.
|
|
189
189
|
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const
|
|
190
|
+
*/const a6=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],i6=ve("Hash",a6);/**
|
|
191
191
|
* @license lucide-react v0.475.0 - ISC
|
|
192
192
|
*
|
|
193
193
|
* This source code is licensed under the ISC license.
|
|
194
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const
|
|
195
|
+
*/const u6=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],ys=ve("History",u6);/**
|
|
196
196
|
* @license lucide-react v0.475.0 - ISC
|
|
197
197
|
*
|
|
198
198
|
* This source code is licensed under the ISC license.
|
|
199
199
|
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const
|
|
200
|
+
*/const s6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],o6=ve("Info",s6);/**
|
|
201
201
|
* @license lucide-react v0.475.0 - ISC
|
|
202
202
|
*
|
|
203
203
|
* This source code is licensed under the ISC license.
|
|
204
204
|
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const
|
|
205
|
+
*/const c6=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Op=ve("LayoutDashboard",c6);/**
|
|
206
206
|
* @license lucide-react v0.475.0 - ISC
|
|
207
207
|
*
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const
|
|
210
|
+
*/const f6=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],d6=ve("Menu",f6);/**
|
|
211
211
|
* @license lucide-react v0.475.0 - ISC
|
|
212
212
|
*
|
|
213
213
|
* This source code is licensed under the ISC license.
|
|
214
214
|
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const
|
|
215
|
+
*/const h6=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],Wf=ve("MessageCircle",h6);/**
|
|
216
216
|
* @license lucide-react v0.475.0 - ISC
|
|
217
217
|
*
|
|
218
218
|
* This source code is licensed under the ISC license.
|
|
219
219
|
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const
|
|
220
|
+
*/const m6=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],bi=ve("MessageSquare",m6);/**
|
|
221
221
|
* @license lucide-react v0.475.0 - ISC
|
|
222
222
|
*
|
|
223
223
|
* This source code is licensed under the ISC license.
|
|
224
224
|
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const
|
|
225
|
+
*/const p6=[["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"}]],g6=ve("Monitor",p6);/**
|
|
226
226
|
* @license lucide-react v0.475.0 - ISC
|
|
227
227
|
*
|
|
228
228
|
* This source code is licensed under the ISC license.
|
|
229
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const
|
|
230
|
+
*/const y6=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],x6=ve("Moon",y6);/**
|
|
231
231
|
* @license lucide-react v0.475.0 - ISC
|
|
232
232
|
*
|
|
233
233
|
* This source code is licensed under the ISC license.
|
|
234
234
|
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const
|
|
235
|
+
*/const b6=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],vi=ve("Play",b6);/**
|
|
236
236
|
* @license lucide-react v0.475.0 - ISC
|
|
237
237
|
*
|
|
238
238
|
* This source code is licensed under the ISC license.
|
|
239
239
|
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const
|
|
240
|
+
*/const v6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],S6=ve("Plus",v6);/**
|
|
241
241
|
* @license lucide-react v0.475.0 - ISC
|
|
242
242
|
*
|
|
243
243
|
* This source code is licensed under the ISC license.
|
|
244
244
|
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const
|
|
245
|
+
*/const w6=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],k6=ve("PowerOff",w6);/**
|
|
246
246
|
* @license lucide-react v0.475.0 - ISC
|
|
247
247
|
*
|
|
248
248
|
* This source code is licensed under the ISC license.
|
|
249
249
|
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const
|
|
250
|
+
*/const C6=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],E6=ve("Power",C6);/**
|
|
251
251
|
* @license lucide-react v0.475.0 - ISC
|
|
252
252
|
*
|
|
253
253
|
* This source code is licensed under the ISC license.
|
|
254
254
|
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const
|
|
255
|
+
*/const M6=[["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"}]],N6=ve("RefreshCw",M6);/**
|
|
256
256
|
* @license lucide-react v0.475.0 - ISC
|
|
257
257
|
*
|
|
258
258
|
* This source code is licensed under the ISC license.
|
|
259
259
|
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const
|
|
260
|
+
*/const j6=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],A6=ve("Search",j6);/**
|
|
261
261
|
* @license lucide-react v0.475.0 - ISC
|
|
262
262
|
*
|
|
263
263
|
* This source code is licensed under the ISC license.
|
|
264
264
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const
|
|
265
|
+
*/const z6=[["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"}]],T6=ve("Server",z6);/**
|
|
266
266
|
* @license lucide-react v0.475.0 - ISC
|
|
267
267
|
*
|
|
268
268
|
* This source code is licensed under the ISC license.
|
|
269
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const
|
|
270
|
+
*/const _6=[["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"}]],R6=ve("Shield",_6);/**
|
|
271
271
|
* @license lucide-react v0.475.0 - ISC
|
|
272
272
|
*
|
|
273
273
|
* This source code is licensed under the ISC license.
|
|
274
274
|
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const
|
|
275
|
+
*/const D6=[["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"}]],O6=ve("Sun",D6);/**
|
|
276
276
|
* @license lucide-react v0.475.0 - ISC
|
|
277
277
|
*
|
|
278
278
|
* This source code is licensed under the ISC license.
|
|
279
279
|
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const
|
|
280
|
+
*/const L6=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],oa=ve("Terminal",L6);/**
|
|
281
281
|
* @license lucide-react v0.475.0 - ISC
|
|
282
282
|
*
|
|
283
283
|
* This source code is licensed under the ISC license.
|
|
284
284
|
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const
|
|
285
|
+
*/const U6=[["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"}]],H6=ve("TriangleAlert",U6);/**
|
|
286
286
|
* @license lucide-react v0.475.0 - ISC
|
|
287
287
|
*
|
|
288
288
|
* This source code is licensed under the ISC license.
|
|
289
289
|
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const
|
|
290
|
+
*/const B6=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],e1=ve("Webhook",B6);/**
|
|
291
291
|
* @license lucide-react v0.475.0 - ISC
|
|
292
292
|
*
|
|
293
293
|
* This source code is licensed under the ISC license.
|
|
294
294
|
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const
|
|
295
|
+
*/const Z6=[["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"}]],q6=ve("WifiOff",Z6);/**
|
|
296
296
|
* @license lucide-react v0.475.0 - ISC
|
|
297
297
|
*
|
|
298
298
|
* This source code is licensed under the ISC license.
|
|
299
299
|
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const
|
|
300
|
+
*/const $6=[["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"}]],V6=ve("Wifi",$6);/**
|
|
301
301
|
* @license lucide-react v0.475.0 - ISC
|
|
302
302
|
*
|
|
303
303
|
* This source code is licensed under the ISC license.
|
|
304
304
|
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const h7=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ks=ve("X",h7);function m7(t){const l=new Date(t),i=new Date().getTime()-l.getTime(),s=Math.floor(i/6e4),o=Math.floor(i/36e5),c=Math.floor(i/864e5);return s<1?"just now":s<60?`${s}m`:o<24?`${o}h`:c<7?`${c}d`:l.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ke(t){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function p7(t){var l,r,i,s,o,c,d;const m=(l=t.meta)===null||l===void 0?void 0:l.title,p=(r=t.meta)===null||r===void 0?void 0:r.creator,x=(i=t.meta)===null||i===void 0?void 0:i.source,y=(o=(s=t.meta)===null||s===void 0?void 0:s.license)===null||o===void 0?void 0:o.url,v=g7(t);return!m&&!p&&!x&&!y&&!v?"":'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(m?`<dc:title>${Ke(m)}</dc:title>`:"")+(p?`<dc:creator>${Ke(p)}</dc:creator>`:"")+(x?`<dc:source xsi:type="dcterms:URI">${Ke((d=(c=t.meta)===null||c===void 0?void 0:c.source)!==null&&d!==void 0?d:"")}</dc:source>`:"")+(y?`<dcterms:license xsi:type="dcterms:URI">${Ke(y)}</dcterms:license>`:"")+(v?`<dc:rights>${Ke(v)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>"}function g7(t){var l,r,i,s,o,c,d,m,p,x,y,v,S,C,T;let z=!((l=t.meta)===null||l===void 0)&&l.title?`„${(r=t.meta)===null||r===void 0?void 0:r.title}”`:"Design",M=`„${(s=(i=t.meta)===null||i===void 0?void 0:i.creator)!==null&&s!==void 0?s:"Unknown"}”`;!((o=t.meta)===null||o===void 0)&&o.source&&(z+=` (${t.meta.source})`);let U="";return((d=(c=t.meta)===null||c===void 0?void 0:c.license)===null||d===void 0?void 0:d.name)!=="MIT"&&((m=t.meta)===null||m===void 0?void 0:m.creator)!=="DiceBear"&&(!((p=t.meta)===null||p===void 0)&&p.title)&&(U+="Remix of "),U+=`${z} by ${M}`,!((y=(x=t.meta)===null||x===void 0?void 0:x.license)===null||y===void 0)&&y.name&&(U+=`, licensed under „${(S=(v=t.meta)===null||v===void 0?void 0:v.license)===null||S===void 0?void 0:S.name}”`,!((T=(C=t.meta)===null||C===void 0?void 0:C.license)===null||T===void 0)&&T.url&&(U+=` (${t.meta.license.url})`)),U}const um=-2147483648,y7=2147483647;function f3(t){return t^=t<<13,t^=t>>17,t^=t<<5,t}function x7(t){let l=0;for(let r=0;r<t.length;r++)l=(l<<5)-l+t.charCodeAt(r)|0,l=f3(l);return l}function cs(t=""){t=t.toString();let l=x7(t)||1;const r=()=>l=f3(l),i=(s,o)=>Math.floor((r()-um)/(y7-um)*(o+1-s)+s);return{seed:t,next:r,bool(s=50){return i(1,100)<=s},integer(s,o){return i(s,o)},pick(s,o){var c;return s.length===0?(r(),o):(c=s[i(0,s.length-1)])!==null&&c!==void 0?c:o},shuffle(s){const o=cs(r().toString()),c=[...s];for(let d=c.length-1;d>0;d--){const m=o.integer(0,d);[c[d],c[m]]=[c[m],c[d]]}return c},string(s,o="abcdefghijklmnopqrstuvwxyz1234567890"){const c=cs(r().toString());let d="";for(let m=0;m<s;m++)d+=o[c.integer(0,o.length-1)];return d}}}function fa(t){let l=t.attributes.viewBox.split(" "),r=parseInt(l[0]),i=parseInt(l[1]),s=parseInt(l[2]),o=parseInt(l[3]);return{x:r,y:i,width:s,height:o}}function b7(t,l,r,i,s){let{width:o,height:c,x:d,y:m}=fa(t);const p=`<rect fill="${l}" width="${o}" height="${c}" x="${d}" y="${m}" />`;switch(i){case"solid":return p+t.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${o}" height="${c}" x="${d}" y="${m}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${s} 0.5 0.5)"><stop stop-color="${l}"/><stop offset="1" stop-color="${r}"/></linearGradient></defs>`+t.body}}function v7(t,l){let{width:r,height:i,x:s,y:o}=fa(t),c=l?(l-100)/100:0,d=(r/2+s)*c*-1,m=(i/2+o)*c*-1;return`<g transform="translate(${d} ${m}) scale(${l/100})">${t.body}</g>`}function S7(t,l,r){let i=fa(t),s=(i.width+i.x*2)*((l??0)/100),o=(i.height+i.y*2)*((r??0)/100);return`<g transform="translate(${s} ${o})">${t.body}</g>`}function w7(t,l){let{width:r,height:i,x:s,y:o}=fa(t);return`<g transform="rotate(${l}, ${r/2+s}, ${i/2+o})">${t.body}</g>`}function k7(t){let{width:l,x:r}=fa(t);return`<g transform="scale(-1 1) translate(${l*-1-r*2} 0)">${t.body}</g>`}function C7(t,l){let{width:r,height:i,x:s,y:o}=fa(t),c=l?r*l/100:0,d=l?i*l/100:0;return`<mask id="viewboxMask"><rect width="${r}" height="${i}" rx="${c}" ry="${d}" x="${s}" y="${o}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${t.body}</g>`}function E7(t){const l={xmlns:"http://www.w3.org/2000/svg",...t.attributes};return Object.keys(l).map(r=>`${Ke(r)}="${Ke(l[r])}"`).join(" ")}function M7(t){const l=cs(Math.random().toString()),r={};return t.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(i,s,o,c)=>(r[o]=r[o]||l.string(8),`${s}${r[o]}${c}`))}const N7={properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function sm(t){var l;let r={},i=(l=t.properties)!==null&&l!==void 0?l:{};return Object.keys(i).forEach(s=>{let o=i[s];typeof o=="object"&&o.default!==void 0&&(Array.isArray(o.default)?r[s]=[...o.default]:typeof o.default=="object"?r[s]={...o.default}:r[s]=o.default)}),r}function j7(t,l){var r;let i={...sm(N7),...sm((r=t.schema)!==null&&r!==void 0?r:{}),...l};return JSON.parse(JSON.stringify(i))}function om(t){return t==="transparent"?t:`#${t}`}function A7(t,l,r){var i;let s=t.shuffle(l);s.length<=1||l.length==2&&r=="gradientLinear"?(s=l,t.next()):s=t.shuffle(l),s.length===0&&(s=["transparent"]);const o=s[0],c=(i=s[1])!==null&&i!==void 0?i:s[0];return{primary:om(o),secondary:om(c)}}function z7(t,l={}){var r,i,s,o,c;l=j7(t,l);const d=cs(l.seed),m=t.create({prng:d,options:l}),p=d.pick((r=l.backgroundType)!==null&&r!==void 0?r:[],"solid"),{primary:x,secondary:y}=A7(d,(i=l.backgroundColor)!==null&&i!==void 0?i:[],p),v=d.integer(!((s=l.backgroundRotation)===null||s===void 0)&&s.length?Math.min(...l.backgroundRotation):0,!((o=l.backgroundRotation)===null||o===void 0)&&o.length?Math.max(...l.backgroundRotation):0);l.size&&(m.attributes.width=l.size.toString(),m.attributes.height=l.size.toString()),l.scale!==void 0&&l.scale!==100&&(m.body=v7(m,l.scale)),l.flip&&(m.body=k7(m)),l.rotate&&(m.body=w7(m,l.rotate)),(l.translateX||l.translateY)&&(m.body=S7(m,l.translateX,l.translateY)),x!=="transparent"&&y!=="transparent"&&(m.body=b7(m,x,y,p,v)),(l.radius||l.clip)&&(m.body=C7(m,(c=l.radius)!==null&&c!==void 0?c:0)),l.randomizeIds&&(m.body=M7(m));const S=E7(m),C=p7(t),T=`<svg ${S}>${C}${m.body}</svg>`;return{toString:()=>T,toJson:()=>{var z;return{svg:T,extra:{primaryBackgroundColor:x,secondaryBackgroundColor:y,backgroundType:p,backgroundRotation:v,...(z=m.extra)===null||z===void 0?void 0:z.call(m)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(T)}`}}const T7={antenna01:(t,l)=>`<mask id="sidesAntenna01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="11" width="156" height="51"><g fill="#fff"><rect x="6" y="31" width="36" height="14" rx="4"/><rect x="18" y="14" width="36" height="48" rx="4"/><rect x="126" y="28" width="36" height="24" rx="4"/><path d="M11 11h2v20h-2z"/></g></mask><g mask="url(#sidesAntenna01-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path fill="#fff" fill-opacity=".3" d="M0 0h180v76H0z"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M11 11h2v20h-2z"/><circle cx="12" cy="8" r="4" fill="#FFEA8F"/><circle cx="13" cy="7" r="2" fill="#fff"/>`,antenna02:(t,l)=>`<mask id="sidesAntenna02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="9" width="160" height="51"><g fill="#fff"><rect x="10" y="28" width="36" height="32" rx="4"/><path d="M160 9h2v20h-2z"/><rect x="134" y="28" width="36" height="32" rx="4"/></g></mask><g mask="url(#sidesAntenna02-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M160 8h2v20h-2z"/><circle cx="161" cy="5" r="4" fill="#E1E6E8"/><circle cx="162" cy="4" r="2" fill="#fff"/>`,cables01:(t,l)=>`<path d="M38 12c-2.95 11.7-19.9 6.67-23.37 18-3.46 11.35 8.03 20 17.53 20" stroke="#2A3544" stroke-width="6" opacity=".9"/><path d="M150 55c8.4 3.49 20.1-7.6 16-16.5-4.1-8.9-16-6.7-16-19.3" stroke="#2A3544" stroke-width="4" opacity=".9"/><mask id="sidesCables01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="21" y="6" width="138" height="58"><g fill="#fff"><rect x="21" y="35" width="16" height="22" rx="2"/><rect x="136" y="42" width="23" height="22" rx="2"/><rect x="136" y="6" width="23" height="18" rx="2"/></g></mask><g mask="url(#sidesCables01-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,cables02:(t,l)=>`<g opacity=".9" stroke="#2A3544"><ellipse cx="32.5" cy="23" rx="16.5" ry="18" stroke-width="6"/><path d="M29.51 36.76c-7.4 4.29-17 1.55-21.42-6.1" stroke-width="4"/><ellipse cx="28.5" cy="52.5" rx="16.5" ry="14.5" stroke-width="4"/></g><g opacity=".9" stroke="#2A3544"><path d="M168.6 60.42c-4.27-7.41-13.95-9.84-21.6-5.42" stroke-width="4"/><ellipse cx="148.5" cy="22.5" rx="16.5" ry="15.5" stroke-width="6"/></g><mask id="sidesCables02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="21" y="0" width="138" height="72"><g fill="#fff"><rect x="21" y="27" width="16" height="22" rx="2"/><rect x="22" y="60" width="16" height="12" rx="2"/><rect x="143" y="42" width="16" height="22" rx="2"/><rect x="143" width="16" height="22" rx="2"/></g></mask><g mask="url(#sidesCables02-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,round:(t,l)=>`<mask id="sidesRound-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="12" y="16" width="156" height="45"><g fill="#fff"><ellipse cx="150" cy="38.5" rx="18" ry="22.5"/><ellipse cx="18" cy="22.5" rx="18" ry="22.5" transform="matrix(-1 0 0 1 48 16)"/></g></mask><g mask="url(#sidesRound-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".2" d="M20 0h140v76H20z"/></g>`,square:(t,l)=>`<mask id="sidesSquare-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="14" y="16" width="152" height="44"><g fill="#fff"><rect x="14" y="16" width="36" height="44" rx="9"/><rect x="130" y="16" width="36" height="44" rx="9"/></g></mask><g mask="url(#sidesSquare-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g>`,squareAssymetric:(t,l)=>`<mask id="sidesSquareAssymetric-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="8" width="165" height="60"><g fill="#fff"><rect x="10" y="31" width="36" height="30" rx="4"/><rect x="20" y="15" width="26" height="30" rx="4"/><rect x="139" y="23" width="36" height="30" rx="4"/><rect x="134" y="8" width="36" height="60" rx="4"/></g></mask><g mask="url(#sidesSquareAssymetric-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 47h180v29H0z"/><circle cx="161" cy="20" r="5" fill="#fff" fill-opacity=".6"/><circle cx="161" cy="36" r="5" fill="#fff" fill-opacity=".6"/></g>`},_7={antenna:(t,l)=>`<mask id="topAntenna-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="38" y="5" width="24" height="47"><path d="M38 38c0-1.1.9-2 2-2h20a2 2 0 0 1 2 2v14H38V38ZM48 5h4v31h-4z" fill="#fff"/></mask><g mask="url(#topAntenna-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 3h100v52H0V3Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 36h24v16H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,antennaCrooked:(t,l)=>`<mask id="topAntennaCrooked-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="38" y="12" width="24" height="40"><g fill="#fff"><path d="M55.54 34.39 51 45h-3.74l4.92-10.44-6.05-10.43 3.22-11.84 2.9.8-2.9 10.62 6.2 10.68Z"/><path d="M38 39h24v13H38z"/></g></mask><g mask="url(#topAntennaCrooked-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 6h100v52H0V6Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 39h24v13H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,bulb01:(t,l)=>`<mask id="topBulb01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="22" y="0" width="56" height="52"><g fill="#fff"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 16A16 16 0 0 1 48 0h4a16 16 0 0 1 16 16v16a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8V16Z"/><rect x="22" y="40" width="56" height="12" rx="1"/></g></mask><g mask="url(#topBulb01-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".4" d="M20-3h60v43H20z"/><path d="M49 3.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 26-9-9L38 19.83l10 10V40h4V29.97l10.14-10.14L59.31 17l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/></g>`,glowingBulb01:(t,l)=>'<g filter="url(#topGlowingBulb01-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 24A16 16 0 0 1 48 8h4a16 16 0 0 1 16 16v8a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-8Z" fill="#fff" fill-opacity=".3"/></g><path d="M49 11.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 29-9-9L38 22.83l10 10V40h4v-7.03l10.14-10.14L59.31 20l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/><rect x="22" y="40" width="56" height="12" rx="1" fill="#48494B"/><defs><filter id="topGlowingBulb01-a" x="24" y="0" width="52" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_617_621"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_617_621" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_617_621"/></filter></defs>',glowingBulb02:(t,l)=>'<g filter="url(#topGlowingBulb02-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M30 33a20 20 0 1 1 40 0v11H30V33Z" fill="#fff" fill-opacity=".3"/></g><ellipse cx="50" cy="30" rx="4" ry="6" fill="#fff" fill-opacity=".6"/><path d="M50 15.5c4.93 0 9.37 2.13 12.44 5.52m2.43 3.5c.7 1.3 1.21 2.73 1.53 4.23" stroke="#fff" stroke-width="2" stroke-linecap="round"/><rect x="20" y="36" width="60" height="16" rx="1" fill="#48494B"/><defs><filter id="topGlowingBulb02-a" x="22" y="5" width="56" height="47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_617_633"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_617_633" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_617_633"/></filter></defs>',horns:(t,l)=>`<mask id="topHorns-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="8" y="12" width="84" height="40"><g fill="#fff"><path d="M8 40h26v12H8z"/><path transform="matrix(-1 0 0 1 92 40)" d="M0 0h26v12H0z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.52 13.74c0 7.84 5.39 20.71 13.72 27.04H11.36S7.84 22.66 13.43 14.1c.9-1.38 3.1-1.42 3.1-.36ZM84 14c.66 7.04-5.77 20.62-14 27h19s3.14-18.26-2-27c-1-1.7-3.14-1.45-3 0Z"/></g></mask><g mask="url(#topHorns-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".4" d="M0 40h100v12H0z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.46 13h16.1v27H20.83c-7.45-7.85-5.36-27-5.36-27ZM84.82 13h7.75v27H81.82c5.75-7.8 3-27 3-27Z" fill="#fff" fill-opacity=".4"/></g>`,lights:(t,l)=>`<mask id="topLights-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="22" width="80" height="30"><g fill="#fff"><path d="M10 42c0-1.1.9-2 2-2h76a2 2 0 0 1 2 2v10H10V42Z"/><path d="M18 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H18V27ZM42 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H42V27ZM66 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H66V27Z"/></g></mask><g mask="url(#topLights-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".6" d="M0 0h100v40H0z"/><rect x="24" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="48" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="72" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/></g>`,pyramid:(t,l)=>`<mask id="topPyramid-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="64" height="44"><path fill-rule="evenodd" clip-rule="evenodd" d="m50 8 32 44H18L50 8Z" fill="#fff"/></mask><g mask="url(#topPyramid-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".8" d="M50 4h30v48H50z"/></g>`,radar:(t,l)=>'<mask id="topRadar-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="37" y="0" width="36" height="53"><g fill="#fff"><path fill-rule="evenodd" clip-rule="evenodd" d="M43.8.11A20 20 0 1 0 72.08 28.4"/><circle cx="67.13" cy="5.06" r="4" transform="rotate(45 67.13 5.06)"/><path transform="rotate(45 64.3 6.48)" d="M64.31 6.48h2v26h-2z"/><path d="M47.94 28.11h4v24h-4z"/></g></mask><g mask="url(#topRadar-a)"><path d="M0 0h100v52H0V0Z" fill="#90A4AE"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill-rule="evenodd" clip-rule="evenodd" d="M43.8.11A20 20 0 1 0 72.08 28.4" fill="#fff" fill-opacity=".2"/><circle cx="67.13" cy="7.41" r="5.66" transform="rotate(45 67.13 7.4)" fill="#fff" fill-opacity=".8"/></g>'},R7={round01:(t,l)=>{var r,i;return`<mask id="faceRound01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M66 0c58.35 0 64 40.69 64 78 0 33.31-25.47 42-64 42-37.46 0-66-8.69-66-42C0 40.69 7.65 0 66 0Z" fill="#fff"/></mask><g mask="url(#faceRound01-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},round02:(t,l)=>{var r,i;return`<mask id="faceRound02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 31v-1c.18-.48.4-1.5 1-3 .83-3.06 2.78-6.56 6-10C16.7 6.6 35.17 0 65 0s48.3 6.6 58 17c3.22 3.44 5.17 6.94 6 10 .6 1.5.82 2.52 1 3v40c0-.1-.03.5 0 1a53.93 53.93 0 0 1-1 6c-1.19 6-3.4 11.91-7 17-9.72 16.34-27.74 26-57 26s-47.28-9.66-57-26C4.4 88.91 2.2 83 1 77a53.95 53.95 0 0 1-1-6c.03-.45 0-1.32 0-1V31Z" fill="#fff"/></mask><g mask="url(#faceRound02-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square01:(t,l)=>{var r,i;return`<mask id="faceSquare01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><rect width="130" height="120" rx="18" fill="#fff"/></mask><g mask="url(#faceSquare01-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square02:(t,l)=>{var r,i;return`<mask id="faceSquare02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path d="M0 12A12 12 0 0 1 12 0h106a12 12 0 0 1 12 12v70a38 38 0 0 1-38 38H38A38 38 0 0 1 0 82V12Z" fill="#fff"/></mask><g mask="url(#faceSquare02-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square03:(t,l)=>{var r,i;return`<mask id="faceSquare03-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 18A18 18 0 0 1 18 0h94a18 18 0 0 1 18 18v27.15a40 40 0 0 1-2.28 13.31L110.24 108a18 18 0 0 1-16.98 12H36.74a18 18 0 0 1-16.98-12L2.28 58.45A40 40 0 0 1 0 45.15V18Z" fill="#fff"/></mask><g mask="url(#faceSquare03-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square04:(t,l)=>{var r,i;return`<mask id="faceSquare04-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 102V68.85a40 40 0 0 1 2.28-13.31L19.76 12A18 18 0 0 1 36.74 0h56.52a18 18 0 0 1 16.98 12l17.48 43.54A40 40 0 0 1 130 68.85V102a18 18 0 0 1-18 18H18a18 18 0 0 1-18-18Z" fill="#fff"/></mask><g mask="url(#faceSquare04-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`}},D7={bite:(t,l)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#000" fill-opacity=".6"/><path fill-rule="evenodd" clip-rule="evenodd" d="m20 17 6-8H14l6 8ZM32 17l6-8H26l6 8ZM44 17l6-8H38l6 8ZM56 17l6-8H50l6 8Z" fill="#E1E6E8"/>',diagram:(t,l)=>'<rect x="4" y="4" width="68" height="24" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="8" width="60" height="16" rx="2" fill="#000" fill-opacity=".8"/><path d="M9 17h11l2-4 3 7 4-8 2 9 3-11 3 10 3-3h15l3-4 2 7 3-3h4" stroke="#4EFAC9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',grill01:(t,l)=>'<g fill="#000" fill-opacity=".6"><rect x="12" y="12" width="4" height="8" rx="2"/><rect x="36" y="12" width="4" height="8" rx="2"/><rect x="24" y="12" width="4" height="8" rx="2"/><rect x="48" y="12" width="4" height="8" rx="2"/><rect x="60" y="12" width="4" height="8" rx="2"/></g>',grill02:(t,l)=>'<g fill="#000" fill-opacity=".6"><rect x="28" y="10" width="6" height="14" rx="2"/><rect x="14" y="10" width="6" height="14" rx="2"/><rect x="42" y="10" width="6" height="14" rx="2"/><rect x="56" y="10" width="6" height="14" rx="2"/></g>',grill03:(t,l)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#fff"/><path fill="#000" fill-opacity=".1" d="M18 9h4v14h-4zM42 9h4v14h-4zM30 9h4v14h-4zM54 9h4v14h-4z"/>',smile01:(t,l)=>'<path d="M27.05 8.44a2 2 0 1 1 3.9-.88C31.72 10.96 34.4 13 38 13c3.6 0 6.28-2.04 7.05-5.44a2 2 0 1 1 3.9.88C47.75 13.7 43.43 17 38 17s-9.76-3.3-10.95-8.56Z" fill="#000" fill-opacity=".6"/>',smile02:(t,l)=>'<path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#000" fill-opacity=".8"/><mask id="mouthSmile02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="40" height="20"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#fff"/></mask><g mask="url(#mouthSmile02-a)"><rect x="30" y="2" width="16" height="14" rx="2" fill="#fff"/></g>',square01:(t,l)=>'<rect x="24" y="6" width="27" height="8" rx="4" fill="#000" fill-opacity=".8"/>',square02:(t,l)=>'<rect x="16" y="8" width="44" height="4" rx="2" fill="#000" fill-opacity=".8"/>'},O7={bulging:(t,l)=>'<circle cx="28" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="74" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="28" cy="24" r="15" fill="#F1EEDA"/><circle cx="74" cy="24" r="15" fill="#F1EEDA"/><rect x="26" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="74" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',dizzy:(t,l)=>'<path d="m25 27.2 5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L28.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L25 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5ZM79 27.2l5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L82.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L79 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5Z" fill="#000" fill-opacity=".8"/>',eva:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd"><path d="M53 0c34.75 0 49 17.47 49 31 0 13.53-19.59 17-49 17-29.05 0-51-3.47-51-17S17.11 0 53 0Z" fill="#000" fill-opacity=".8"/><path d="M28.82 34.65c-6.53-1.35-11.24-6.34-10.52-11.14.72-4.79 6.6-7.58 13.12-6.23 6.53 1.36 11.24 6.35 10.52 11.15-.72 4.8-6.6 7.59-13.12 6.23ZM75.42 34.65c-6.52 1.36-12.4-1.43-13.12-6.23-.72-4.8 4-9.8 10.52-11.15 6.52-1.35 12.4 1.44 13.12 6.24.72 4.81-4 9.8-10.52 11.15Z" fill="#25A6F5"/></g>',frame1:(t,l)=>'<rect y="4" width="104" height="42" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><rect x="66" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21 4h8L12 46H4L21 4Z" fill="#fff" fill-opacity=".4"/>',frame2:(t,l)=>'<rect x="8" y="10" width="88" height="36" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><rect x="66" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><path fill-rule="evenodd" clip-rule="evenodd" d="M83 10h5L76 46h-5l12-36Z" fill="#fff" fill-opacity=".4"/>',glow:(t,l)=>'<g fill="#fff"><circle cx="21" cy="30" r="15" fill-opacity=".1"/><circle cx="83" cy="30" r="15" fill-opacity=".1"/><circle cx="21" cy="30" r="12" fill-opacity=".1"/><circle cx="83" cy="30" r="12" fill-opacity=".1"/><circle cx="21" cy="30" r="6" fill-opacity=".8"/><circle cx="83" cy="30" r="6" fill-opacity=".8"/><circle cx="21" cy="30" r="3" fill-opacity=".8"/><circle cx="83" cy="30" r="3" fill-opacity=".8"/></g>',happy:(t,l)=>'<path d="m18 19 12-2M20 31c0-3.31 2.9-6 7-6 3.1 0 6 2.69 6 6M86 20l-12-3M84 31c0-3.31-2.9-6-6-6-4.1 0-7 2.69-7 6" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>',hearts:(t,l)=>'<path d="M29.27 9.68c-2.55.13-4.96 2.24-6.25 4.15-1.48-1.76-4.1-3.6-6.65-3.47-5.48.28-8.85 3.8-8.63 8.1.3 5.72 4.88 8.89 9.7 12.24 1.71 1.15 5 4.15 5.42 4.82.42.67 2.14.6 2.58-.13a37.8 37.8 0 0 1 4.9-5.36c4.43-3.84 8.66-7.47 8.36-13.2-.23-4.3-3.95-7.44-9.43-7.15ZM87.63 10.36c-2.55-.14-5.17 1.7-6.65 3.47-1.3-1.9-3.7-4.02-6.25-4.15-5.48-.29-9.2 2.86-9.43 7.16-.3 5.72 3.93 9.35 8.36 13.19 1.6 1.32 4.55 4.64 4.9 5.36.35.7 2.06.82 2.58.13.51-.7 3.7-3.67 5.42-4.82 4.81-3.35 9.4-6.52 9.7-12.24.22-4.3-3.15-7.82-8.63-8.1Z" fill="#FF5353" fill-opacity=".8"/>',robocop:(t,l)=>'<rect x="7" y="16" width="91" height="16" rx="4" fill="#000" fill-opacity=".8"/><mask id="eyesRobocop-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="16" width="91" height="16"><rect x="7" y="16" width="91" height="16" rx="4" fill="#fff"/></mask><g mask="url(#eyesRobocop-a)" fill-rule="evenodd" clip-rule="evenodd" fill="#fff" fill-opacity=".8"><path d="M76 7h18L82 37H64L76 7ZM52 7h9L49 37h-9L52 7Z"/></g>',round:(t,l)=>'<g fill="#fff"><circle cx="24" cy="30" r="6"/><circle cx="80" cy="30" r="6"/></g>',roundFrame01:(t,l)=>'<rect y="12" width="104" height="32" rx="16" fill="#000" fill-opacity=".8"/><rect x="24" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/><rect x="70" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/>',roundFrame02:(t,l)=>'<rect y="11" width="104" height="34" rx="17" fill="#000" fill-opacity=".8"/><circle cx="29" cy="28" r="13" fill="#F1EEDA"/><circle cx="75" cy="28" r="13" fill="#F1EEDA"/><rect x="24" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="70" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',sensor:(t,l)=>'<path d="M28 44a20 20 0 0 0 19.9-18h41.52a5 5 0 1 0 0-4H47.9A20 20 0 1 0 28 44Z" fill="#000" fill-opacity=".2"/><circle cx="94" cy="24" r="2" fill="#fff"/><circle cx="28" cy="24" r="16" fill="#000" fill-opacity=".6"/><circle cx="34" cy="16" r="3" fill="#fff"/>',shade01:(t,l)=>'<path d="M96 2H8c-4.5 0-8 3.5-8 8.03V28c0 4.5 3.5 8 8 8h13c8 0 11 8 18 8h27c7 0 9-8 17-8h13c4.5 0 8-3.5 8-8V10c0-4.5-3.5-8-8-8Z" fill="#000" fill-opacity=".8"/><path d="M87 14H17c-3.5 0-5 3-5 5v2c0 2 1.5 5 5 5h12c6 0 11.62 8 17 8h14c5.38 0 9-8 15-8h12c3.5 0 5-3 5-5v-2c0-2-1.5-5-5-5Z" fill="#FF3D3D"/><path d="M22.44 36.09 37.26 2h11L31.4 40.78l-.76-.58c-2.38-1.82-4.83-3.69-8.2-4.11ZM11.48 36 26.26 2h4L15.48 36h-4Z" fill="#fff" fill-opacity=".2"/>'},L7={camo01:(t,l)=>'<g fill="#000" fill-opacity=".2"><path d="M117.94-4a6.08 6.08 0 0 0 2.52-.99l.77-.12c2.72-.42 9.94-1.53 11.25-.4.85.75.47 3.39.2 5.28-.11.72-.2 1.34-.2 1.7-1.33.06-2.34-1.4-3.32-2.83-1.46-2.12-2.88-4.17-5.2-1.06-1.1 1.46-.85 3.3-.6 5.18.28 1.98.55 3.99-.74 5.62-1.54 1.93-4 2.2-6.42 2.47-2.56.28-5.1.56-6.48 2.8-.4.66-.5 1.8-.62 3.05-.2 2.15-.43 4.58-2.25 5.14-3.12.97-3.32-1.69-3.5-4-.09-1.25-.18-2.4-.7-2.84-5.7-4.7-6.23 4.37-6.35 6.43v.03c-.03.43.05.78.12 1.1.13.57.23 1.05-.33 1.73-.3.36-.7.3-1.12.23-.43-.06-.89-.13-1.27.23-1.5 1.4-1.54 1.54-1.88 3.11l-.09.37c-.11.53-.19.99-.25 1.4-.14.94-.26 1.67-.84 2.64-.27.45-.63.89-1 1.33-1.2 1.46-2.39 2.9-.14 4.69-.61 0-6 1.46-6.35 1.64-.52.27-1.12.98-1.66 1.61a4.5 4.5 0 0 1-1.18 1.15c-3.2 1.1-2.97-1.28-2.74-3.74.14-1.48.28-2.98-.32-3.77 8.28-.27 13.26-8.21 13.75-14.38a5 5 0 0 0-.65-2.5c-.28-.62-.54-1.2-.55-1.8-.02-.83.25-1.4.52-1.97.22-.47.44-.93.5-1.54.23-2.64-.85-3.61-2.27-4.89-.7-.64-1.5-1.35-2.26-2.4-2.5-3.45-1.2-3.99 2.6-3.36 2.17.36 4.26 1 6.36 1.63 2.56.78 5.12 1.56 7.84 1.83 3.48.34 6.71.18 8.36-2.66.95-1.63 1.37-6.13-1.8-6.48.8-.13 1.44-.38 2.1-.64a9.32 9.32 0 0 1 3.02-.77c1 .4 2.06.64 3.16.74ZM123.7 79.87v.01ZM32.38 86.47c.1.04.21.04.34 0-.18.13-.46.02-.37 0h.03ZM32.37 86.46h-.02.02ZM131.44 126.49c-.34-.03-.33-.04 0-.06.07-.28.16-.57.26-.85.21-.67.4-1.26.03-1.4 1.13-.21.92 1.8.8 2.96-.03.28-.05.5-.05.64-1.06 0-1.18-.59-1.04-1.3Z"/><path d="M131.52 125.78v-.04c-.44.03-.44.04 0 .07v-.02ZM41.65-5.5c.39.07 1.5.18 1.87 0h-1.87ZM39.01 51.48c-1.06-.25-1.44-.92-1.73-1.42-.16-.28-.3-.5-.5-.58-2.83-1.05-3.29.92-3.77 3.98-.1.56-.11 1.03-.13 1.47-.05 1.08-.08 1.9-1.09 2.94-.58.6-1.52.91-2.45 1.22a8.8 8.8 0 0 0-1.87.78c-1.47.93-2.12 1.78-2.92 2.83-.32.4-.66.85-1.08 1.34-.96 1.11-2.36 2.19-3.82 3.3-3.9 2.98-8.2 6.25-5.32 11.4 3.1 5.55 4.32.87 5.27-2.75.36-1.39.68-2.62 1.05-3.05 4.67-5.47 5.68-.12 6.29 3.08.1.52.18.99.27 1.34 1.31 5.03 3.1 1.4 4.58-1.58.44-.9.86-1.74 1.22-2.28.44-.63.99-1.1 1.52-1.55a5.7 5.7 0 0 0 1.68-1.92c.24-.52.12-1.17 0-1.84-.2-1.1-.4-2.25.97-2.95 1.45-.73 3.12.16 4.6.96 1.13.6 2.15 1.16 2.9.9 2.33-.83.23-3.6-1.45-5.82-.78-1.02-1.46-1.93-1.59-2.47-.36-1.58.28-2.95.91-4.32.64-1.38 1.28-2.77.9-4.37-.66.1-1.23.4-1.8.72-.8.44-1.61.88-2.65.64ZM80.6 88.07ZM95.89 72.7c.38-2.66-1.73-4.02-3.9-5.43-.7-.45-1.39-.9-2.02-1.4-1.43-1.13-2.4-2.07-3.12-3.66a3.83 3.83 0 0 1-.17-1.2c-.04-.69-.08-1.4-.42-1.65-1.85-1.27-2.88-.4-4.13.66-.6.5-1.24 1.05-2.04 1.42-2.72 1.24-2.75 1.22-4.38.26-.33-.2-.72-.43-1.22-.7l-.71-.4c-1.5-.9-2.56-1.53-4.4 1.07-.73 1.04-.7 2.87-.66 4.77.07 3.18.14 6.57-3.42 6.77 1.57.69.86 2.74.14 4.83-.74 2.15-1.49 4.34.23 5.1 4.18 1.83 5.4-6.86 6.09-11.83.23-1.64.4-2.88.6-3.2 1.67-2.62 7.63-4.86 9.34-.98.31.7.08 1.44-.15 2.2-.22.73-.45 1.47-.2 2.2.37 1.03.97 1.41 1.67 1.86.38.23.78.49 1.19.87 2.9 2.71 2.79 2.88 1.34 5.18l-.86 1.4c-.3.54-.56 1.38-.83 2.31-.61 2.1-1.35 4.63-3.25 4.92 1.04-.01 2.13.24 3.2.5 2.06.47 4.08.94 5.61-.45 1.07-.97.89-2.72.71-4.4-.11-1.09-.22-2.15.03-2.93.44-1.42 1.63-2.6 2.81-3.77 1.34-1.34 2.68-2.66 2.92-4.32ZM18.9 104.45c.03.48.07 1.03.18 1.7.4 2.48 1.51 3.9 2.95 5.7v.01l.95 1.2c-4.37.08-7.8 4.62-3.04 7.18-1.93-1.03-3.39.12-4.58 1.07-1.49 1.19-2.55 2.03-3.57-2.27l-.28-1.1c-.23-.86-.48-1.84-.58-2.5-.21-1.44-.18-1.61-.01-2.4l.1-.47c.08-.47.26-.79.43-1.09.35-.63.63-1.15-.13-2.67-.4-.79-.88-1.4-1.34-1.99-.85-1.06-1.6-2.02-1.58-3.73 0-.48.21-.86.43-1.27.37-.68.78-1.45.38-2.92a12.4 12.4 0 0 0-1.08-2.46c-.5-.97-1.01-1.94-1.2-2.99 1.81.08 2.96 1.45 3.98 2.68.36.44.71.85 1.07 1.19.8.75 1.75 1.28 2.69 1.8.8.45 1.6.9 2.24 1.45 1.8 1.58 1.86 2.4 1.98 3.9ZM24.68 91.3c1.49.12 5.48-3.14 5.74-4.07-1.29.24-2.6-.36-3.88-.94-1.44-.66-2.84-1.3-4.14-.73-2.3 1 .15 5.56 2.28 5.74ZM83.04 92.92c-1.63.3-3.49.64-4.58 0-1.06-.62-3.16-3.28-.1-3.13.78.3 1.67.5 2.56.68 1.87.4 3.7.8 4.21 2.16-.57.02-1.3.15-2.09.3ZM62.6 68.99c-.84-.05-1.62-.2-2.34-.34-2.16-.41-3.75-.72-4.43 2.13 1.12-.05 2.23.25 3.23.5 2.11.56 3.68.97 3.53-2.3ZM91.57 105.44c-.72-.36-1.4-.7-1.93-.74.68-.1.8-.77.92-1.4.1-.52.2-1.02.61-1.16.17.05.36.1.58.14 1.76.41 4.88 1.14 4.11 2.82-.93 2.04-2.71 1.14-4.3.34Z"/><path d="M23.02 113.15c-.74.04-.24.2.07.24l-.07-.24ZM64.47 65.13c.83-.57.8-3.2-.45-3.31-1.75.39-.86 4.2.45 3.3ZM129.6 34.45c.03.59 2.6 3.1 2.88 3.08 0-.07.02-.26.06-.51.17-1.29.59-4.32-.85-3.64a5 5 0 0 0-.71.44c-.42.3-.85.6-1.38.63ZM21.62 127.86c-5.14 0-3.31-2.39-1.94-1.65.3.16.55.44.81.71.3.32.6.64.96.78.09.04.11.07.14.1 0 .03.02.04.03.06ZM-.7-.88c.01-.43-2.42-1.19-1-.21-.14-.1-.03-.05.17.03.3.13.83.34.83.18ZM123.37 43.75c-1.53-.42 2.62-.23 2.1.93-.42-.05-.79-.27-1.16-.49-.3-.17-.6-.35-.94-.44Z"/></g><path d="M38.12 26.75c.24-.76-.15-1.6-.53-2.44-.32-.7-.64-1.4-.61-2.05.02-.62.47-1.75.9-2.82a18.15 18.15 0 0 0 .84-2.47c.8-3.23 2.3-9.38 7.7-6.52-4.33-2.3-2.55-4.12-.56-6.15a12.3 12.3 0 0 0 2.06-2.51c.4-.74.72-1.08.91-1.27.11-.12.18-.19.19-.26 0-.1-.1-.22-.34-.5l-.4-.45c-.59-.7-4.78-1.65-5.78-1.63-3.82.09-7.98 3.7-9.9 6.62-1.03 1.56-.67 2.43-.33 3.26.2.5.4.98.3 1.6-.05.25-.02.5 0 .74.09.73.16 1.35-2.01 1.47-2.7.15-7.77-4.33-7.8-6.53 0-.73.78-1.56 1.57-2.4 1.4-1.46 2.79-2.94-.21-3.87-2.24-.7-9.03 3.8-9.45 5.5-.26 1.06.5 2.2 1.15 3.2 1.06 1.6 1.88 2.84-2.02 2.81 0-.02 3.63 2.29 4 2.77.85 1.09 1.17 1.88 1.45 2.56.47 1.17.81 2 3.44 3.44 1.1.6 2.28 1.12 3.45 1.64 1.58.69 3.16 1.39 4.56 2.28.76.49 1.4 1.07 2.03 1.63 1.48 1.32 2.86 2.57 5.4 2.34ZM127.37 3.5c-1.41.74-.6 1.4.37 2.18.98.79 2.12 1.7 1.37 2.97-.47.81-1.6.99-2.76 1.16-1.17.18-2.37.37-2.95 1.22-.84 1.23-.5 2.1-.18 2.94.39.98.76 1.93-.78 3.38-1.08 1.01-2.1 1.34-2.98 1.62-1.31.42-2.33.75-2.8 3.09-.74 3.58 1.1 5.97 2.84 8.24 1.97 2.58 3.85 5.02 1.78 8.9l-.34.62c-1.09 1.9-3 5.22.62 6.34 2.63.81 2.48-.12 2.31-1.08-.12-.73-.25-1.48.8-1.52-.21-.6 2.98.1 2.58.98.84.09 1.25.54 1.65.98.57.63 1.12 1.24 2.9.7 1.76-.55 2.05-2.2 2.28-3.55l.02-.1c.35-2.04-.6-3.8-1.5-5.5-.75-1.41-1.47-2.78-1.42-4.22v-.54c-.01-.36-.02-.65.16-1.13a2.74 2.74 0 0 1 2-.48c1.16.24 1.48-.2.97-1.3 1-1.93.62-5.18.29-8.05-.15-1.3-.3-2.51-.3-3.5 0-.67.13-1.8.27-3.13.36-3.47.87-8.26-.26-9.68-.66-.83-5.81-2.13-6.94-1.54ZM129.58 52.35c-2.97-.76-2.61 1.57-2.33 3.35.08.52.15 1 .13 1.33-.14 2.96-.48 3.68-4.15 4.16-.88.12-1.72-.1-2.55-.3-1.4-.36-2.76-.7-4.23.55-.83.7-.8 1.57-.76 2.44.02.43.04.85-.04 1.26-.14.7-.68 1.78-1.25 2.93-1.05 2.11-2.22 4.48-1.26 5.11.65.44 2.53-.06 4.66-.62 3.68-.96 8.12-2.13 8.4.86.18 1.78-2.15 2.05-4.37 2.3-1.44.17-2.83.34-3.45.9-.19.17-.55 1.43-.91 2.68-.4 1.4-.81 2.8-.96 2.67.65.54 1.69-.2 2.91-1.07 1.8-1.28 4.02-2.86 6.04-1.12-2.49-4.76 4.86-4.08 7.99-3.8.34.04.63.07.86.08V60.21c-3.56.93-3.33-1.08-3.07-3.31.22-1.92.45-4-1.66-4.55ZM131.51 120.55c.9.05 1.81.1 2.8.1 0 .8-.74 1.17-1.48 1.53-.64.31-1.29.63-1.46 1.24-.48 1.73.58 2.33 1.56 2.88.71.4 1.38.77 1.38 1.52-.84 0-1.78.04-2.76.09-2.07.09-4.3.18-6.04-.09h-2.93l-.25-1.14-.43-.2c-1.22-.57-3.28-1.53-4.19-2.16-4.51-3.15-.46-6.42 3.78-7.72-2.92.9 1.1 3.79 2.51 4.18 1.1.3 1.74.15 2.5-.03.44-.1.94-.22 1.58-.26 1.2-.06 2.31 0 3.43.06ZM13.29 31.85c-.62-.31-1.29-.12-1.96.08-.78.22-1.56.45-2.29-.09-.39-.29-.26-.87-.13-1.41.1-.44.2-.85 0-1.05-2-1.94-2.12-1.47-2.46-.15-.15.59-.34 1.35-.77 2.14-.86 1.58-1.96 1.95-3.06 2.31-1.3.44-2.6.86-3.45 3.34-1.84 5.28-5.2 3.61-6.4-1-.2-.72-.77-1.78-1.4-2.98-1.6-2.98-3.62-6.77-1.23-7.9-1.66.79-3.61 1.13-5.57 1.48-2.27.4-4.54.8-6.34 1.9-1.92 1.15-1.91 1.41-1.88 2.74a131.99 131.99 0 0 0 .07 5.55l.04 1.51c.04 1.5.67 2.78 1.33 4.1.38.76.77 1.55 1.05 2.4.58 1.78.82 3.66 1.05 5.53.16 1.24.32 2.48.57 3.68l.17.75c.51 2.35 1 4.58-.37 6.85-.19.3-.65.66-1.14 1.04-.88.67-1.87 1.42-1.64 2.14.34 1.05 2.04-.49 2.92-1.28l.43-.38c.79-.6.83-1.17.86-1.64.04-.57.07-.97 1.4-1.01 1.8-.06 3.65 1.93 4.74 3.1l.32.35c.6.64 1.17 1.43 1.76 2.25 1.52 2.14 3.2 4.48 6.06 4.83 8.88 1.1 10.66-9.15 7.36-13.8a21.83 21.83 0 0 0-2.63-2.84c-1.67-1.6-3.39-3.25-3.85-5.15-.76-3.13 1.93-5.67 5.62-3.87 1.76.86 2.32 2.35 2.9 3.85.48 1.28.96 2.57 2.2 3.48 2.6 1.93 2.84 1.38 3.27.4.23-.52.52-1.16 1.25-1.6 2.1-1.29 5.75-2.35 6.25.86.18 1.13-.76 2.09-1.71 3.07-1.14 1.16-2.3 2.35-1.63 3.88 1.29 2.95 2.46 1.35 3.46-.01.2-.3.41-.57.61-.8 2.79-3.15 5.56-6.44 4.73-10.59-.53-2.65-2.38-4.54-4.27-6.47a32.36 32.36 0 0 1-2.47-2.72c-.45-.58-.88-1.64-1.33-2.77-.7-1.73-1.45-3.61-2.44-4.1ZM62.98 102.48c-.03 1.26-.05 2.5.5 3.73 1.29 2.79 2 4.45.22 7.05-.48.7-.98 1.22-1.46 1.72a7.8 7.8 0 0 0-2.1 3.14c-.15.47-.27.9-.38 1.3-.39 1.46-.68 2.53-2.7 3.5-4.64 2.25-8.11.2-11.17-2.37l-.69-.58c-1.54-1.28-2.59-2.15-3.53-3.9a2.45 2.45 0 0 1-.22-1.54c.07-.74.13-1.36-1.28-2.02-1.37-.64-2.7-.4-4.05-.15-1.68.3-3.38.61-5.15-.8-4.02-3.22-3-9.5.72-12.22 1.04-.77 2-1.22 2.8-1.6 1.85-.87 2.81-1.33 1.96-4.33a4.63 4.63 0 0 1-1.56-2.2 3.8 3.8 0 0 1 .5-2.08c-.1-.46.05-.9.19-1.3.28-.83.49-1.45-1.73-1.46.62-.45.8-1.45.97-2.48.27-1.52.55-3.13 2.25-3.3 2.92-.28 3.24 2.71 3.49 4.96.08.73.15 1.39.3 1.82 1.18 3.4 2.57 4.57 6.35 3.22.98-.35 5.57-2.81 5.93-3.35-1.65 2.5 1.72 4.87 4.24 6.64.62.43 1.2.83 1.62 1.19l.53.42a10.7 10.7 0 0 1 2.71 2.8c.8 1.4.77 2.8.74 4.2ZM104.42 120.99c-1.44-.16-6.73-2.2-6.09-3.91 1.63-4.33 10.12.56 13.06 2.25l.53.3c-1.12.06-2.2.38-3.27.7-1.4.4-2.78.82-4.23.66Z" fill="#000" fill-opacity=".4"/><g fill="#fff" fill-opacity=".2"><path d="M19.25-3.59c.2 1.51 3.16 3.8 5.07 2.44 1.22.44-.59-2.79-.89-3.09-1.59-1.58-4.59-2.32-4.18.65ZM52.27-1.64c-.74-.18-1.44-.34-2.03-.55-.54-.19-.57-2.24-.35-2.65.44-.8 1.95-.7 3.33-.63.4.03.8.05 1.15.05h13.3c-1.86.74.15 1.5 1.1 1.7.78-.22 6.37 3.92 6.21 5.65-.08.94-.75 1.63-1.43 2.33-.8.85-1.65 1.72-1.54 3.08.08.82.88 2.18 1.78 3.7 2.25 3.8 5.1 8.61-1.44 8.74-3.05.06-2.98-1.38-2.89-3.06.06-1.11.13-2.34-.72-3.3a6.06 6.06 0 0 0-2.07-1.28c-1.01-.46-2.03-.92-2.44-1.8-.2-.44-.05-1.37.12-2.38.41-2.5.9-5.45-3.81-2.21-.48.33-.77.97-1.07 1.61-.57 1.24-1.14 2.48-3.01 1.5-1.63-.84-.73-2.5.17-4.18.69-1.27 1.38-2.54.96-3.46-.8-1.8-3.2-2.37-5.31-2.86ZM132.7 85.8c-2.76.72-4.35-1.84-5.62-3.89-.87-1.4-1.59-2.56-2.43-2.3-2.23-1.92-4.4-.16-6.18 1.3-.67.55-1.3 1.06-1.84 1.3.1.08-4.98-1.12-3.95-1.32-6.82-2.32-6.9 2.9-6.97 7.43-.03 1.96-.06 3.8-.63 4.85-1.02 1.9-2.46 2.63-4.81 3.45-.83.3-1.74.46-2.65.63-1.9.35-3.79.7-4.86 2.17-.2.27-.39 1.13-.52 1.74-.08.35-.14.62-.17.62.6.16 4.88 1.51 5.32 1.88.4.33.5.92.6 1.46.08.46.16.88.4 1.08.7.59 1.38 1 2.04 1.38 1.12.66 2.15 1.26 2.96 2.6.35.57.53 1.24.7 1.9.43 1.59.85 3.14 3.64 3.2 2.27.04 3.61-1.72 4.31-3.23.32-.68.23-2.56.14-4.68-.23-5.18-.52-11.76 4.75-5.66.52.6.72 1 .88 1.34.28.57.46.95 1.87 1.74.58.32 1.16.34 1.72.35.81.02 1.58.04 2.27 1 .7 1 .36 1.94.15 2.5-.24.64-.3.8 1.55-.04 4.29-1.93 4.45-6.24 4.6-9.86.02-.72.05-1.4.1-2.05.21-2.25.7-3.59 1.64-5.58l.42-.7c1.03-1.65 3.32-5.32.58-4.6ZM48.2 122.55c-.78-1.1-1.78-1.81-2.83-2.58-.48-.35-.97-.7-1.46-1.1-.28-.24-.6-.44-.91-.64-.63-.4-1.26-.8-1.59-1.42-.27-.5-.17-1.18-.07-1.85.1-.78.22-1.55-.23-2.05-1.27-1.42-2.98-1.08-4.79-.73-2.4.48-4.96.99-6.8-2.63-1.32-2.59-1.96-6.32-.25-8.84.73-1.06 2.32-1.8 3.89-2.5 1.94-.9 3.85-1.78 3.98-3.24.07-.85-.57-1.46-1.23-2.1-.58-.55-1.18-1.12-1.34-1.9-.13-.64.21-1.41.54-2.15.64-1.43 1.22-2.72-1.91-2.65.05.02 0 .04-.04.06a.67.67 0 0 0-.04.02c-.04-.02-.4.12-.81.3-.54.23-1.2.5-1.45.52 0 0-.14.12-.35.34-.96.97-3.65 3.7-5.01 3.57-2.7-.24-3.74-5.44-2.3-5.71a3.69 3.69 0 0 1-1.55-.77c-.85-.6-1.74-1.23-3.58-.68-1.44.43-1.8 1.05-2.27 1.86-.16.26-.33.55-.55.86-.69.97-1.08 1.62-1.33 2.03-.26.43-.36.61-.5.64-.11.03-.24-.03-.45-.14-.4-.19-1.12-.53-2.61-.78l-.06.3c-.2 1.16-.28 1.62-.13 1.97.1.22.3.4.63.7.25.24.6.55 1.02 1 .55.6 1.18 1.13 1.81 1.67.45.39.9.77 1.32 1.17.52.5 5.35 5.5 4.35 5.73.97.18 1.07 2.48 1.16 4.7.07 1.54.13 3.04.5 3.73.35.7.93 1.28 1.5 1.88.47.47.93.95 1.28 1.48.94 1.42 1.09 3.08 1.23 4.77.15 1.61.29 3.25 1.14 4.72.22.38.58.7.94 1.01.35.3.69.6.9.95.14.24.39.45.63.66l.39.36c.74.8.82 1.22.88 1.48.01.08.03.14.06.2.12.21.5.28 2.28.62h.03c3.28.62 12.62.33 15.2-1.77.36-.3.74-1.11 1.03-1.73.2-.4.34-.73.42-.74a1.4 1.4 0 0 1-.64-.55c0-.02-.02-.03-.03-.05ZM79.18 120.45c-.9-.1-1.55-.38-2.19-.66a5.57 5.57 0 0 0-3.16-.62c-1.2.12-2.12.7-3.04 1.26-.53.33-1.07.66-1.67.9-1.45.6-3.96.86-6.7 1.14-5.5.57-11.92 1.23-12.49 4.92.93 0 2.35.1 4 .2 5.07.3 12.3.75 13.99-.83.86-.81.74-1.5.64-2.07-.14-.83-.25-1.44 2.63-1.9.94-.15 1.63.1 2.32.33 1.05.37 2.1.73 4.02-.31.27-.15 3.76-2.13 1.64-2.37ZM77.4 100.15c4.94-5.13 6.28 2.22 6.28 5.26 0 3.48-6 6.05-7.87 2.3-.62-1.24.37-6.3 1.59-7.56ZM133 1.74a9.56 9.56 0 0 1-1.94-2.4c-1-1.52-2.09-3.15-3.48-3.32-3.76-.47-3.33 3.97-2.97 7.59.19 1.88.35 3.55-.12 4.17.06 0 .28.14.61.34 1.59.99 5.53 3.43 3.55-1.06-.18-.4-.88-.72-1.58-1.05-1.28-.6-2.56-1.2-.54-2.26 1.29-.67 2.72 0 4.1.66.98.46 1.94.9 2.8.87l.03-.76c.07-1.02.15-2.35-.46-2.78ZM131.77 44.91c.4-.53.76-1.04 1.08-1.22.19-.12.83 16.67.15 16.46-3.3 1.97-2.89-2.4-2.63-5.1.1-.98.16-1.73.03-1.9-.47-.64-1.46-.88-2.45-1.11-1.36-.33-2.73-.66-2.77-2.05-.02-.59 2.1-2.22 2.63-2.58.2-.13.21-.35.22-.58.02-.24.03-.5.27-.65.14-.1.48 0 .87.1.5.14 1.07.3 1.35.08.42-.32.85-.9 1.25-1.45Z"/><path d="M95.36 58c-.5-.86-1-1.72-2.15-2.23-3.03-1.34-3.09-1.96-3.19-3.02-.06-.63-.13-1.4-.84-2.57-1.72-2.82-6.06-2.63-9.5-2.47-.7.03-1.36.06-1.95.06-.77 0-1.32-.03-1.75-.06-1.36-.08-1.5-.1-3.27 1.42-.71.62-1.42 1.34-2.14 2.09-.82.83-1.65 1.69-2.55 2.44-1.94 1.62-6.42 5.7-3.14 7.97-1.6.35-1.1 3.07.01 3.67-.13.05-1.51 3.29-1.44 3.47-.73-.05-1.42-.23-2.08-.4-1.48-.38-2.83-.73-4.14.54-1.11 1.08-.75 2.66-.39 4.24.31 1.33.62 2.66.04 3.7-1.61 2.93-6.9 3.21-9.69 1.46-1.9-1.2-6.26-5.08-7.47-6.87-2.06-3.06-1.24-5.8 3.08-5.68 1.06.02 1.8.47 2.36.8.82.48 1.18.69 1.38-1.18.08-.82-.8-1.87-1.51-2.72-.27-.32-.52-.62-.68-.86l-.33-.5c-1.85-2.74-2.6-3.85-1.2-7.19l.2-.48c1-2.38 1.34-3.2.4-5.92-1.1-3.13-1.4-4.45-1.14-7.76 0-.15.03-.32.05-.51.17-1.38.45-3.65-1.94-4 .36-.53 1.73-4.44 1.4-4.8 2.04.23 2.36-.14 2.97-.84.38-.43.88-1 1.99-1.62.77-.43 1.75-.54 2.75-.64 1.38-.15 2.8-.3 3.68-1.35.81-.95.85-2.49.88-4 .02-1.11.05-2.21.38-3.05.61-1.55 1.43-3.46 3.5-4.15 5-1.67 4.6 2.62 4.33 5.63-.05.51-.1 1-.1 1.4-.17 5.12-.25 10.56.75 15.5 1.02 5.02 1.87 3.1 3.02.5.22-.5.45-1.03.7-1.53a7.55 7.55 0 0 1 1.87-2.2c.66-.6 1.32-1.2 1.75-1.99.32-.6.3-1.21.27-1.8-.04-.84-.08-1.62.82-2.26.67-.48 1.47-.32 2.2-.17.6.12 1.15.23 1.55-.04.77-.51.88-1.96 1-3.46.17-2.13.35-4.36 2.45-4.1 2.06.23 2.25 2.33 2.41 4.09.11 1.24.21 2.32.95 2.46l-1.38.33c-3.21.74-7.77 1.8-1.48 3.92-1.93.18-1.37 2.48-1.1 3.54 0 .08.03.15.04.21.06.3.42.56.8.8.37.27.76.54.81.87.13.73-.07 1.1-.27 1.46-.14.26-.29.52-.3.93-.02.53-.08 1.04-.13 1.5-.2 2-.32 3.04 3 1.42.92-.46 1.14-1.1 1.3-1.58.24-.69.39-1.11 2.26-.44.07.19.23.3.5.34.28-.08.73.23 1.26.59.82.55 1.82 1.22 2.69.86 1.72-.71 1.07-1.93.48-3.03a5 5 0 0 1-.5-1.14c-.58-2.61-.2-2.79.63-3.18a4.8 4.8 0 0 0 2.33-2.14c.74-1.2.26-2.42-.18-3.55-.6-1.49-1.14-2.85 1.26-3.91 6.1-2.7 7.06 3.57 6.3 6.56l-.1.35c-.83 3.24-1.46 5.65.13 9 1.08 2.29 2.86 3.64 4.77 5.1.96.72 1.95 1.48 2.9 2.4 3.59 3.42 3.88 7.5-.21 10.8-3.28 2.62-7.68 3.4-11.1.65-.57-.46-.92-1.06-1.27-1.66ZM89.12 88.84c-4.72-.62-6.35-.74-9.92.14.23.23.24.4.04.5.6.23 1.51.39 2.5.55 1.75.3 3.7.64 4.43 1.5.18.2.03 1.03-.1 1.78-.12.66-.23 1.26-.1 1.34-.1-.06 4.21-5.26 4.88-5.76-.58.02-1.15 0-1.73-.05ZM7.23 102.28l.36.2c.5.18 1.02.26 1.58.24-.26 1.4-2.3 4-4.55 3.57-2.66-.5-1.64-1.68-.56-2.92.59-.68 1.2-1.37 1.24-2 0-.16 1.28.55 1.92.9ZM6.12 95.63c.4.56 1.08.99 1.74 1.4.3.18.59.36.84.55.37-.54.01-1.6-.34-2.66-.3-.87-.58-1.73-.44-2.27-1.71-.06-2.55 1.94-1.8 2.98ZM37.15-5.3c-1.63.91-7.34 4.14-7.66.8l-.07-.92h7.93l-.2.11Z"/></g>',camo02:(t,l)=>'<g fill="#fff" fill-opacity=".2"><path d="M-29.7 126.12c-2.62.41-9.54 1.51-10.8.4-.82-.74-.45-3.34-.18-5.2.1-.72.18-1.32.18-1.68 1.28-.06 2.24 1.38 3.19 2.8 1.4 2.08 2.75 4.1 5 1.03 1.04-1.44.8-3.25.55-5.1-.26-1.95-.52-3.93.72-5.53 1.48-1.9 3.83-2.17 6.16-2.44 2.47-.27 4.9-.55 6.23-2.77.38-.64.48-1.77.6-3 .19-2.11.4-4.5 2.15-5.06 3-.95 3.19 1.67 3.35 3.95.1 1.23.18 2.36.68 2.8 5.46 4.63 5.98-4.3 6.1-6.34v-.03c.02-.42-.05-.76-.12-1.08-.12-.57-.22-1.04.32-1.71.28-.35.67-.3 1.08-.23.4.07.84.14 1.21-.22 1.45-1.39 1.48-1.52 1.8-3.06l.04-.17.05-.2c.11-.52.18-.97.24-1.38A6.4 6.4 0 0 1 .61 88c1.15-1.44 2.3-2.87.14-4.63.6 0 5.76-1.43 6.1-1.62.5-.27 1.07-.96 1.59-1.58.45-.55.85-1.04 1.12-1.14 3.07-1.09 2.85 1.27 2.63 3.69-.14 1.45-.27 2.94.3 3.71-7.95.27-12.73 8.1-13.2 14.16-.07.93.29 1.73.62 2.48.27.6.53 1.17.54 1.76a4.1 4.1 0 0 1-.5 1.95c-.21.46-.42.91-.48 1.52-.23 2.6.81 3.55 2.17 4.8.69.64 1.45 1.34 2.17 2.37 2.4 3.4 1.15 3.93-2.49 3.32-2.09-.36-4.1-.98-6.1-1.61a38.06 38.06 0 0 0-7.53-1.8c-3.34-.34-6.44-.18-8.02 2.61-.92 1.62-1.32 6.05 1.72 6.4-.76.11-1.38.37-2.02.62-.83.34-1.69.68-2.9.76-.96-.39-1.97-.63-3.03-.73-.9.14-1.7.47-2.42.96l-.74.12ZM150.24 57.01c.47.27 1.37.22 2.35.17 1.06-.06 2.2-.12 2.96.21.4.18.8.64 1.2 1.1.37.42.74.85 1.12 1.06.86.5 1.78.67 2.7.84.71.13 1.42.26 2.1.53 2.8 1.14 4.88 3.6 3.26 6.47-.44.8-1.47 1.33-2.5 1.87-1.3.7-2.6 1.38-2.6 2.59 0 4.48 7.78-2.91 8.48-4.5.2-.44.27-.95.34-1.47.1-.72.2-1.46.64-2.03a6.98 6.98 0 0 1 1.96-1.3c.48-.25.87-.46.94-.58 1.3-2.1.75-7.26.32-11.22-.17-1.6-.32-3-.32-3.94-2.2.01-3.19 2.7-4.19 5.38-1.44 3.9-2.89 7.8-8.04 3.5-1.37-1.15-5.3-8.12-5.3-9.42 0-1.18.6-1.84 1.25-2.55.31-.34.63-.68.9-1.1l.75-1.14c.82-1.22 1.01-1.5 1.23-3.82.17-1.88.38-2.17.93-2.91.22-.3.5-.7.87-1.3.17-.3.5-.56.8-.82.7-.6 1.4-1.18.36-2.07-2.6-2.23-8.24 3.55-9.22 4.7-2.78 3.29-6.55 7.77-6.22 11.93.08.94 2.09 9.32 2.92 9.81ZM116.75 116.14c-.33.4-.66.78-.62 1.29.12 1.79.13 1.78.35 1.67.17-.08.46-.22 1.02.3.16.15.63.36 1.2.62 1.33.6 3.16 1.42 2.6 2.12-.28.36-1.04.4-1.85.42-.8.04-1.65.08-2.1.44-.35.28-.56.83-.76 1.32-.16.4-.3.78-.5.92-1.56 1.17-2.17 1.27-5.48 1.27 2.2-.62-3.45-4.51-4.02-3.27.53-1.16-.17-2.38-.85-3.54-.4-.68-.78-1.34-.89-1.96-.14-.8-.11-1.59-.09-2.36.06-1.75.1-3.41-1.76-4.88.63-.08.99-.53 1.34-.97.38-.47.75-.94 1.45-.96.87 2.37 2.9 2.54 5.03 2.71.98.08 1.99.17 2.92.46.3.1.57.17.84.24 1.05.28 1.9.5 2.52 1.58.74 1.28.18 1.95-.35 2.58ZM173.2-4.11c0-1.08-1.99-.92-3.45-.8-.4.02-.76.05-1.03.05.63.25 1 .42 1.24.54.2.1.32.15.45.2.26.06.53.06 1.34.04l1.44-.03ZM-39.75-2.61c-.2.65-.4 1.23-.03 1.36-1.09.22-.88-1.77-.77-2.9.03-.28.05-.5.05-.63 1.44 0 1.07 1.16.75 2.17ZM117.76-4.86h-3.58c.3.14.62.32.94.5 1.33.74 2.63 1.46 2.64-.5ZM172.3 4.14c.43-.08.7-.05.85-.03.09.02.14.03.16 0 .04-.03.03-.1 0-.3-.04-.3-.12-.85-.12-1.87-1.02.02-2.63 2.18-.9 2.2h.01ZM44.89 126.51h1.79c-.37-.08-1.44-.18-1.8 0ZM44.95 71.71c.63-.08 1.17-.4 1.72-.7.78-.43 1.55-.86 2.54-.62 1.02.25 1.4.9 1.67 1.4.15.27.28.5.47.57 2.72 1.03 3.16-.9 3.63-3.93.08-.54.1-1.01.12-1.44.04-1.06.08-1.87 1.04-2.9.55-.59 1.45-.9 2.34-1.2.65-.22 1.3-.45 1.8-.77a9.8 9.8 0 0 0 2.8-2.78c.3-.4.63-.85 1.04-1.33.92-1.1 2.27-2.15 3.66-3.24 3.76-2.94 7.88-6.16 5.11-11.24-2.97-5.46-4.15-.85-5.06 2.71-.34 1.37-.65 2.58-1 3-4.48 5.4-5.45.13-6.04-3.03-.1-.51-.18-.97-.26-1.32-1.26-4.95-2.98-1.38-4.4 1.56-.42.89-.82 1.72-1.17 2.24a7.8 7.8 0 0 1-1.46 1.53 5.57 5.57 0 0 0-1.6 1.9c-.24.5-.12 1.15 0 1.8.18 1.1.38 2.23-.94 2.9-1.4.75-3-.14-4.42-.92-1.08-.6-2.06-1.14-2.77-.88-2.25.8-.23 3.54 1.39 5.73.74 1 1.4 1.9 1.52 2.43.34 1.55-.27 2.9-.88 4.25-.61 1.36-1.23 2.73-.85 4.3ZM9.52 34.33H9.3h.23ZM.12 41.5c-.43 1.4-1.57 2.56-2.7 3.72-1.29 1.32-2.57 2.62-2.8 4.25-.36 2.63 1.66 3.97 3.75 5.35.66.44 1.33.89 1.93 1.38a9.29 9.29 0 0 1 3 3.61c.12.27.14.72.16 1.18.04.68.07 1.39.4 1.62 1.78 1.26 2.77.4 3.96-.64a8.62 8.62 0 0 1 1.96-1.4c2.61-1.23 2.65-1.2 4.21-.26.32.2.7.42 1.17.68l.68.41c1.44.88 2.46 1.5 4.22-1.06.7-1.02.67-2.83.63-4.7-.06-3.14-.13-6.47 3.3-6.66-1.52-.68-.85-2.7-.16-4.77.71-2.1 1.43-4.26-.22-5-4-1.81-5.17 6.75-5.84 11.65-.22 1.61-.38 2.83-.58 3.14-1.6 2.6-7.32 4.8-8.96.97-.3-.68-.08-1.41.14-2.16.22-.72.43-1.46.2-2.16-.36-1.03-.94-1.4-1.61-1.84a7.11 7.11 0 0 1-1.14-.86c-2.78-2.67-2.68-2.84-1.29-5.1l.83-1.38c.3-.53.53-1.37.8-2.28.58-2.08 1.29-4.56 3.12-4.84-1 0-2.04-.24-3.08-.5-1.97-.46-3.9-.93-5.37.44-1.03.96-.85 2.69-.68 4.33.1 1.08.2 2.13-.03 2.9ZM65.5 10.9l-.9-1.2c4.2-.06 7.5-4.53 2.91-7.06 1.87 1.02 3.27-.12 4.4-1.04 1.44-1.17 2.46-2 3.44 2.24l.27 1.07c.22.86.46 1.82.56 2.48.2 1.4.16 1.57 0 2.35l-.09.46c-.08.46-.25.78-.4 1.07-.35.63-.62 1.14.1 2.63.39.78.85 1.38 1.3 1.96.8 1.05 1.54 2 1.51 3.68 0 .47-.2.84-.4 1.25a3.46 3.46 0 0 0-.38 2.87c.23.84.63 1.63 1.04 2.43.49.95.98 1.9 1.15 2.94-1.73-.07-2.83-1.43-3.82-2.64-.35-.43-.68-.84-1.02-1.17-.76-.74-1.69-1.26-2.58-1.77-.78-.45-1.54-.88-2.16-1.43-1.72-1.56-1.78-2.36-1.9-3.84-.03-.47-.07-1-.17-1.67-.38-2.44-1.46-3.83-2.84-5.62ZM65.15 36.8c2.2-.98-.14-5.47-2.18-5.64-1.43-.13-5.26 3.09-5.5 4 1.22-.23 2.48.36 3.71.93 1.38.65 2.73 1.27 3.97.72ZM11.35 29.55c1.01.62 3.03 3.24.1 3.1-.75-.3-1.61-.5-2.46-.68-1.8-.4-3.54-.79-4.05-2.13.56-.01 1.26-.15 2.01-.29 1.57-.3 3.35-.63 4.4 0ZM33.07 51.36c-1.07.05-2.14-.24-3.1-.5-2.03-.54-3.54-.95-3.39 2.27.8.05 1.55.2 2.24.33 2.07.41 3.6.71 4.25-2.1ZM-.27 19.32c-.1.52-.18 1.02-.58 1.15a30.5 30.5 0 0 0-.56-.14c-1.69-.4-4.68-1.12-3.95-2.77.9-2 2.61-1.12 4.13-.34.69.36 1.33.7 1.85.73-.66.1-.78.76-.89 1.37ZM91.3 46.57a6.25 6.25 0 0 1 .02-3.58c-2.2.01-2.03 3.55-.02 3.58Z"/><path d="m64.5 9.39.06.24c.71-.04.23-.2-.07-.24ZM100.06 44.32c.47.67.52 1.66.58 2.66.09 1.51.17 3.07 1.68 3.62 1.52.56 2.3-.7 3.12-2.06.7-1.15 1.44-2.36 2.7-2.6.84-.18 1.7.24 2.58.66.82.4 1.66.8 2.53.74 2.5-.16 6.46-2.7 6.26-4.97a6.74 6.74 0 0 1-2.82-.24c-.74-.17-1.46-.35-2.3-.3-.86.05-1.7.3-2.52.55-.77.23-1.53.46-2.24.5-3.26.17-3.24-.2-3.16-1.36.03-.52.08-1.2-.15-2.06a12.3 12.3 0 0 1-.18-.78c-.12-.56-.16-.8-.75-1.63-.26-.37-.74-.65-1.24-.94-.6-.35-1.22-.71-1.47-1.25-.1-.21 0-.92.12-1.74.2-1.42.43-3.19-.18-3.31-.8 1.18-2.06 2.1-3.31 3.01-1.56 1.14-3.12 2.29-3.82 3.94-1.22 2.86.3 3.98 2.07 5.28.87.64 1.8 1.33 2.49 2.28ZM25.21 60.2c1.68-.4.82-4.15-.44-3.26-.8.56-.77 3.14.44 3.25ZM55.6 35.91ZM-39.74 88.2c.24-.1.46-.27.68-.43.4-.29.82-.59 1.32-.62-.02-.57-2.5-3.04-2.76-3.03l-.06.5c-.16 1.27-.56 4.26.82 3.59ZM66.99-3.94c-.29-.31-.57-.63-.92-.76-.09-.04-.1-.08-.13-.11a.26.26 0 0 0-.04-.05c4.93 0 3.18 2.35 1.87 1.62-.29-.15-.54-.43-.78-.7ZM88.29 122.17c.14.1.03.05-.16-.03-.3-.13-.8-.34-.8-.19-.01.43 2.33 1.18.96.22ZM-32.66 77.55c.3.18.58.35.9.44 1.47.41-2.51.23-2.02-.92.41.06.77.27 1.12.48Z"/></g><path d="M146.72 95.46c-.16.3-.3.57-.35.7 2.15.2 2.73 13.63-4.7 10.83-.65-.25-1-1.85-1.4-3.64-.8-3.58-1.76-7.9-5.6-3.63-1.26 1.4-.54 3.23.18 5.05.83 2.1 1.65 4.18-.53 5.6-3.24 2.1-4.6-.3-5.97-2.75-1.03-1.81-2.06-3.65-3.9-3.67 3.2 2.08 3.08 8.06 2.99 12.56-.03 1.64-.06 3.09.08 4.08a3.87 3.87 0 0 0 1.87-.63 3.42 3.42 0 0 1 1.93-.6c1.2.08 2 .62 2.82 1.17.37.25.73.5 1.13.7.31.16.68.43 1.08.71 1.2.86 2.73 1.95 4.1 1.34.42-.2.5-.97.57-1.83.1-1.05.2-2.22.97-2.6 1.55-.73 1.53.95 1.51 2.6-.01 1.05-.03 2.09.35 2.51 1.36 1.54 7.6 1.89 9.7 1.9.05-.89-.06-1.55-.14-2.06-.18-1.09-.25-1.56 1.41-2.24 2.63-1.06 7.26 1.84 8.77 3.05.32.26.4.77.48 1.23.06.4.12.76.3.88.65.41 6.09.27 6.46.2 2.22-.47 3.63-1.9 3.03-4.86-.48-2.38-2.85-3.47-5.25-4.57-2.57-1.2-5.18-2.39-5.54-5.2-.09-.66.27-1.47.61-2.27.27-.62.54-1.24.58-1.76.07-.8-.1-1.63-.27-2.45-.22-1.07-.44-2.13-.15-3.15.18-.62 3.65-4.84 4.01-4.96h.03-.03c-.6-.01-1.13-.23-1.65-.45a4.27 4.27 0 0 0-1.77-.45c-.1-.02-.42.6-.77 1.31-.46.91-1 1.99-1.28 2.07-3.05.9-2.28-1.25-1.72-2.8.16-.46.3-.86.33-1.12.1-1.1-.09-2.15-.28-3.2-.14-.73-.28-1.47-.31-2.22-.03-.56.1-1.07.23-1.58.17-.7.35-1.39.1-2.2-.05-.16-.68-.01-1.28.12-.53.13-1.03.25-1.04.12-.11-.71.15-1.83.41-2.95.65-2.73 1.3-5.48-3.47-2.33-2.43 1.61-3.42 3.92-4.43 6.27-.86 2.02-1.74 4.07-3.56 5.72.09.02-.32.8-.64 1.44ZM-35.67 117.64c1.35-.73.57-1.37-.36-2.15-.94-.77-2.03-1.67-1.31-2.92.46-.8 1.54-.97 2.65-1.15 1.14-.17 2.3-.36 2.85-1.2.8-1.2.48-2.06.17-2.9-.37-.96-.73-1.9.75-3.32 1.04-1 2.01-1.32 2.86-1.6 1.26-.41 2.23-.73 2.7-3.04.7-3.53-1.06-5.88-2.74-8.12-1.9-2.54-3.7-4.94-1.71-8.77l.32-.6c1.05-1.87 2.87-5.15-.6-6.25-2.52-.8-2.37.12-2.21 1.07.11.71.24 1.45-.78 1.49.21.58-2.85-.1-2.47-.96-.8-.1-1.2-.54-1.58-.97-.55-.63-1.08-1.22-2.78-.68-1.7.53-1.97 2.16-2.2 3.49l-.01.1c-.34 2 .56 3.74 1.43 5.41.72 1.4 1.42 2.74 1.37 4.16v.53c.01.36.02.64-.16 1.12-.56.4-1.2.56-1.92.46-1.1-.23-1.41.2-.92 1.3-.97 1.89-.6 5.1-.29 7.92.15 1.27.29 2.47.29 3.44 0 .67-.12 1.78-.25 3.09-.35 3.41-.84 8.14.25 9.54.63.81 5.57 2.1 6.66 1.5ZM-35.55 66.22c.26 1.76.6 4.05-2.25 3.3-2.03-.53-1.8-2.59-1.59-4.48.25-2.2.47-4.18-2.94-3.26V46.16l.81.08c3.02.28 10.07.94 7.68-3.74 1.94 1.71 4.07.16 5.8-1.1 1.17-.86 2.17-1.59 2.8-1.05-.15-.13-.54 1.24-.92 2.62-.35 1.23-.7 2.47-.88 2.64-.6.56-1.93.72-3.32.88-2.13.26-4.37.53-4.2 2.27.28 2.95 4.55 1.8 8.07.85 2.06-.55 3.86-1.04 4.49-.61.9.63-.22 2.95-1.22 5.04-.55 1.13-1.07 2.2-1.2 2.88-.08.4-.06.82-.04 1.24.03.86.07 1.71-.73 2.4-1.41 1.24-2.72.9-4.06.55-.8-.2-1.6-.41-2.45-.3-3.52.48-3.85 1.19-3.99 4.1-.01.33.06.8.14 1.3ZM-39.65 2.34c1.08.06 2.14.12 3.3.05.61-.03 1.08-.15 1.52-.25.72-.18 1.34-.33 2.4-.03 1.35.39 5.2 3.24 2.4 4.12 4.07-1.28 7.96-4.5 3.63-7.6a35.47 35.47 0 0 0-4.02-2.13l-.41-.2-.25-1.13h-2.81c-1.67-.26-3.81-.17-5.8-.08-.94.04-1.84.08-2.64.08 0 .75.63 1.11 1.31 1.5.94.54 1.97 1.13 1.5 2.84-.16.62-.78.93-1.4 1.23-.7.36-1.41.71-1.41 1.52.94-.01 1.81.04 2.68.09ZM75.74 89.64c-.64.2-1.28.38-1.88.08-.95-.49-1.67-2.34-2.34-4.05-.44-1.1-.84-2.15-1.28-2.72a31.61 31.61 0 0 0-2.37-2.68c-1.8-1.9-3.6-3.76-4.1-6.38-.8-4.08 1.87-7.33 4.54-10.44.2-.21.39-.49.6-.77.95-1.35 2.07-2.92 3.32-.01.64 1.5-.47 2.67-1.56 3.82-.92.96-1.82 1.91-1.65 3.02.49 3.17 3.98 2.13 6 .86.7-.44.98-1.07 1.2-1.58.42-.96.65-1.5 3.15.4 1.18.9 1.65 2.16 2.12 3.42.53 1.48 1.08 2.95 2.76 3.8 3.54 1.77 6.12-.73 5.4-3.82-.45-1.86-2.1-3.5-3.7-5.07a21.31 21.31 0 0 1-2.52-2.78c-3.18-4.59-1.47-14.68 7.06-13.6 2.76.35 4.36 2.65 5.82 4.76.57.8 1.1 1.59 1.69 2.21l.31.34c1.06 1.16 2.83 3.12 4.57 3.06 1.26-.04 1.3-.43 1.33-1 .03-.45.08-1.03.83-1.61l.41-.37c.85-.78 2.48-2.3 2.8-1.27.23.71-.72 1.46-1.56 2.12-.48.37-.92.72-1.1 1.02-1.32 2.24-.85 4.43-.35 6.75l.15.73c.25 1.2.4 2.4.55 3.63.23 1.84.45 3.7 1.01 5.45.27.84.64 1.61 1.01 2.37.63 1.29 1.24 2.55 1.27 4.03l.04 1.49c.03 1.55.08 3.21.06 4.59v.88c.04 1.3.05 1.57-1.79 2.7-1.73 1.07-3.91 1.47-6.1 1.87-1.87.34-3.75.68-5.34 1.45 2.3-1.11.35-4.84-1.18-7.78a17.3 17.3 0 0 1-1.34-2.93c-1.16-4.55-4.38-6.19-6.15-.98-.82 2.43-2.06 2.85-3.31 3.28-1.06.36-2.11.72-2.94 2.28-.4.78-.6 1.53-.74 2.11-.32 1.3-.44 1.76-2.36-.15-.2-.2-.1-.6 0-1.03.1-.54.24-1.11-.14-1.4-.7-.53-1.45-.3-2.2-.08ZM25.66 16.46c.54 1.21.52 2.44.5 3.67-.03 1.38-.06 2.76.7 4.13.61 1.1 1.61 1.93 2.6 2.76l.51.42c.41.35.96.74 1.55 1.17 2.42 1.75 5.66 4.08 4.08 6.54.34-.53 4.75-2.96 5.7-3.3 3.63-1.33 4.96-.18 6.09 3.17.14.43.21 1.07.29 1.8.23 2.2.55 5.15 3.35 4.88 1.63-.16 1.9-1.75 2.16-3.24.17-1.03.34-2 .93-2.45-2.13-.01-1.93-.62-1.66-1.43.13-.4.28-.84.18-1.29.36-.65.52-1.33.48-2.05a4.56 4.56 0 0 0-1.5-2.17c-.82-2.95.11-3.4 1.89-4.26.76-.37 1.68-.82 2.69-1.58 3.57-2.68 4.55-8.87.69-12.03-1.7-1.4-3.33-1.1-4.95-.8-1.3.25-2.58.49-3.89-.14-1.35-.65-1.3-1.27-1.23-1.99.05-.45.1-.95-.2-1.51-.91-1.73-1.92-2.59-3.4-3.85l-.66-.56C39.63-.19 36.29-2.2 31.83 0c-1.94.96-2.21 2.02-2.59 3.45-.1.4-.21.82-.37 1.28-.5 1.5-1.24 2.28-2 3.1-.47.49-.95 1-1.41 1.69-1.7 2.56-1.03 4.2.2 6.94ZM50.53 97.14c-.37-.83-.74-1.65-.51-2.4 2.43-.23 3.76 1 5.17 2.3.6.56 1.22 1.13 1.95 1.6 1.34.89 2.86 1.58 4.37 2.26 1.13.52 2.26 1.03 3.32 1.62 2.52 1.41 2.85 2.23 3.3 3.39.27.67.58 1.45 1.39 2.52.36.47 3.83 2.75 3.85 2.73-3.75-.03-2.96 1.2-1.95 2.76.63.99 1.36 2.11 1.1 3.15-.4 1.69-6.91 6.12-9.06 5.43-2.88-.92-1.54-2.37-.2-3.82.75-.82 1.5-1.64 1.5-2.36-.02-2.16-4.89-6.58-7.49-6.43-2.08.11-2.01.72-1.93 1.45.02.23.05.48 0 .73-.1.6.1 1.08.29 1.57.33.82.67 1.68-.32 3.22-1.85 2.87-5.83 6.43-9.5 6.52-.96.02-5-.91-5.56-1.6-.15-.2-.27-.34-.37-.45-.24-.28-.34-.4-.33-.5 0-.07.07-.14.18-.25.18-.2.49-.52.87-1.25.47-.88 1.24-1.7 1.98-2.47 1.9-2 3.62-3.8-.54-6.07 5.2 2.82 6.64-3.24 7.4-6.42l.1-.47c.13-.5.4-1.22.7-1.96.41-1.05.84-2.16.87-2.78.03-.65-.28-1.33-.59-2.02ZM-7.8 5.76c.62-1.68-4.45-3.7-5.84-3.85-1.4-.15-2.72.25-4.06.66-1.03.31-2.07.62-3.13.68l.5.3C-17.51 5.2-9.36 10.02-7.8 5.76ZM127.24 37.29c-2.09-1.27-10.33-4.32-11.54-1.56-.16.37-1.55-1.53-1.65-1.74-.7-1.55 0-3 .7-4.43a24 24 0 0 0 .44-.93c.2-.48.44-.93.68-1.38.58-1.11 1.15-2.2 1.22-3.49.04-.87-.33-1.75-.69-2.61-.38-.92-.75-1.82-.62-2.68.29-1.82 1.1-2.1 2.2-2.5.57-.19 1.21-.42 1.9-.9 1.67-1.13 1.8-1.67 2.09-2.77.09-.36.2-.78.38-1.3.29-.83.47-1.95.66-3.11.3-1.8.62-3.71 1.36-4.86.92-1.4 1.49-1.38 2.45-1.32a7.1 7.1 0 0 0 1.86-.08 10 10 0 0 0 1.94-.7c1.15-.51 2.38-1.05 3.28-.86.37.07.84.67 1.4 1.38.73.9 1.6 2 2.55 2.38.82.34 1.82.26 2.8.2.9-.07 1.8-.14 2.45.15 1.26.56 1.52 1.27 1.83 2.1.2.53.42 1.12.96 1.77.44.53.94.91 1.42 1.29a5.74 5.74 0 0 1 1.95 2.16c.3.65.28 1.25.26 1.8-.05.98-.08 1.78 1.85 2.37l-.19.19c-1.9 1.94-8.68 8.87-11.31 8.51-2-.27-1.93-1.88-1.85-3.4l.02-.85c0-.67.04-1.34.08-2.02.15-2.15.28-4.29-1.12-6.25-1.96-2.73-4.45-3.42-6.23-.42a5.04 5.04 0 0 0-.56 2.08c-.1.9-.2 1.8-.91 2.6-.63.72-1.36 1.01-2.1 1.32-.47.19-.96.38-1.42.7-3.4 2.22-6.44 5.64-5.11 9.76.94 2.93 2.6 2.98 4.49 3.05 1.36.04 2.84.09 4.27 1.2.73.57.94 1.13 1.16 1.68.28.72.54 1.4 1.95 2 1.2.5 2.63.45 4.05.4 1.09-.04 2.17-.08 3.15.13-.91.52-3.35 4.7-2.85 4.36-3.56 2.98-5.53.76-7.4-1.35-.73-.83-1.44-1.63-2.23-2.1Z" fill="#000" fill-opacity=".2"/><g fill="#000" fill-opacity=".1"><path d="M109.88 125c-.42-1.6-4.19-2.3-5.67-1.5-4.74 2.55 6.75 5.59 5.67 1.5ZM68.14 124.62c-.2-1.48-3.03-3.74-4.87-2.4-1.17-.44.56 2.75.85 3.04 1.53 1.56 4.41 2.3 4.02-.64ZM38.4 123.25c-.57-.2-1.24-.37-1.95-.54-2.03-.49-4.33-1.05-5.1-2.82-.4-.9.26-2.16.92-3.41.86-1.65 1.73-3.29.17-4.12-1.8-.96-2.35.26-2.9 1.48-.28.63-.56 1.26-1.02 1.59-4.52 3.19-4.05.28-3.66-2.18.16-1 .3-1.92.11-2.34-.39-.88-1.36-1.33-2.34-1.78-.76-.35-1.51-.7-1.98-1.26-.82-.95-.75-2.15-.7-3.26.09-1.65.16-3.06-2.77-3-6.28.12-3.54 4.87-1.38 8.61.86 1.5 1.63 2.83 1.7 3.64.1 1.34-.7 2.2-1.48 3.03-.65.7-1.3 1.37-1.37 2.3-.15 1.7 5.21 5.78 5.96 5.56.91.2 2.84.95 1.06 1.68h12.76c.33 0 .71.02 1.1.04 1.33.09 2.78.17 3.2-.61.21-.4.18-2.43-.34-2.61ZM128.02 117.12c-.42 2.86-.83 5.6 3.2 7.24 2.48 1.01-2.12 2.56-3.9 2.07-2.48-.69-3.08-1.86-3.46-4.18-.08-.5 0-1.05.08-1.61.22-1.52.44-3.04-2.53-3.18-2.4-.12-2.53.8-2.24 2.62 0 .05-3.92-.42-3.95-.44-.98-1.12-.4-1.58.2-2.04.33-.26.66-.52.71-.9.23-1.6.34-4.56-2.51-5.45-1.19-.37-2.27-.1-3.33.18-1.36.35-2.69.69-4.15-.4-.52-.39-.81-2.33-1.01-3.68-.12-.75-.2-1.32-.28-1.34.36-.54-1-1.2-2.34-1.85-.97-.48-1.92-.94-2.16-1.34-1.48-2.46 1.52-2.95 4.24-3.4.98-.16 1.94-.31 2.61-.55 1.05-.38 1.8-.71 2.4-.98 1.82-.81 2.1-.93 4.79.65.76.45 1.58 1.07 2.4 1.68.63.47 1.26.94 1.84 1.32-.73.15 3.81 1.89 3.44 1.7.82.4 1.34.6 1.7.73.31.1.5.17.65.3.25.18.39.5.76 1.36l.3.67.25.58c.74 1.65 1.8 4.03 2.31 5.68.46 1.45.22 3.03 0 4.57ZM-40.75 36.57c2.64-.71 4.17 1.8 5.4 3.83.82 1.38 1.52 2.52 2.33 2.26 2.14 1.9 4.2.16 5.92-1.27a9.27 9.27 0 0 1 1.78-1.3c-.11-.06 4.77 1.12 3.78 1.32 6.55 2.28 6.63-2.85 6.7-7.32.02-1.93.05-3.74.6-4.78.98-1.87 2.36-2.59 4.62-3.4.8-.29 1.67-.45 2.54-.62 1.82-.34 3.63-.68 4.66-2.13.19-.27.38-1.12.5-1.72.08-.35.14-.61.17-.62-.58-.15-4.68-1.48-5.1-1.84-.4-.33-.5-.91-.59-1.44-.08-.45-.15-.86-.38-1.07a13.4 13.4 0 0 0-1.96-1.35c-1.07-.65-2.06-1.25-2.84-2.57-.34-.56-.5-1.22-.67-1.86-.41-1.58-.81-3.11-3.5-3.17-2.17-.04-3.46 1.7-4.14 3.18-.3.67-.22 2.52-.13 4.61.22 5.1.5 11.58-4.56 5.58a5.4 5.4 0 0 1-.84-1.33c-.27-.55-.45-.93-1.8-1.7a3.27 3.27 0 0 0-1.65-.35c-.78-.02-1.52-.04-2.18-.99-.68-.98-.34-1.91-.14-2.47.23-.62.28-.77-1.49.05-4.11 1.9-4.27 6.15-4.4 9.71-.03.7-.06 1.39-.12 2.02a14.87 14.87 0 0 1-1.96 6.18c-.99 1.63-3.19 5.25-.55 4.55ZM40.36.37c.74 1.07 1.7 1.79 2.7 2.54.47.34.94.7 1.4 1.1.28.22.58.42.89.62.6.39 1.2.78 1.52 1.4.26.49.16 1.15.07 1.82-.1.76-.21 1.52.22 2.02 1.21 1.4 2.86 1.06 4.6.71 2.3-.47 4.76-.97 6.52 2.6 1.27 2.55 1.89 6.22.24 8.7-.7 1.05-2.23 1.77-3.73 2.47-1.88.89-3.7 1.75-3.83 3.19-.07.83.55 1.44 1.18 2.06.56.55 1.13 1.11 1.28 1.87.13.64-.2 1.4-.52 2.12-.6 1.42-1.16 2.69 1.84 2.61-.05-.02 0-.04.04-.05l.03-.02a4 4 0 0 0 .79-.3c.52-.22 1.16-.5 1.4-.5l.33-.34c.92-.96 3.5-3.65 4.81-3.52 2.58.23 3.58 5.36 2.2 5.62.58.1 1.03.43 1.49.76.81.59 1.67 1.21 3.43.67 1.39-.43 1.73-1.03 2.18-1.83.15-.27.31-.56.53-.86.66-.95 1.03-1.6 1.27-2 .25-.42.36-.6.5-.63.1-.03.21.03.42.14a8.2 8.2 0 0 0 2.5.77l.06-.3c.2-1.15.27-1.6.12-1.94-.1-.22-.29-.4-.6-.69-.24-.23-.57-.54-.98-1-.53-.57-1.14-1.1-1.74-1.63-.43-.38-.86-.76-1.27-1.15-.5-.5-5.13-5.41-4.17-5.65-.93-.17-1.02-2.44-1.11-4.62-.07-1.52-.13-3-.47-3.68-.35-.68-.9-1.27-1.45-1.85-.45-.47-.9-.94-1.23-1.46-.9-1.4-1.04-3.03-1.18-4.7-.14-1.59-.28-3.2-1.1-4.65-.2-.37-.55-.69-.9-1-.33-.3-.66-.59-.86-.93-.13-.23-.37-.45-.6-.65a5.04 5.04 0 0 1-.38-.36c-.7-.78-.78-1.2-.83-1.45a.7.7 0 0 0-.06-.2c-.12-.2-.48-.28-2.2-.6v-.01c-3.15-.61-12.12-.32-14.6 1.74-.35.3-.71 1.1-.99 1.7-.18.4-.32.72-.4.74.37.18.49.36.61.54l.04.05ZM168.56 110.33c-.52 2.23 1.1 4.08 3.18 5.07 1.07.51.98 1.45.87 2.57-.04.37-.08.75-.08 1.15-2.47-.01-7.4-2.84-8.96-4.83-1.63-2.09-1.13-3.1-.36-4.64.24-.46.49-.97.71-1.57.44-1.16.6-2.33.76-3.41.4-2.81.7-4.97 5.53-4.54 0 .55-.33.87-.67 1.22-.45.46-.93.95-.72 2.06.13.7.62 1.09 1.11 1.47.7.55 1.38 1.09 1.02 2.51-.14.55-.64.97-1.16 1.4-.53.46-1.08.92-1.22 1.54ZM10.62 2.44c.85.1 1.48.38 2.1.65.85.38 1.67.75 3.02.6 1.15-.11 2.03-.67 2.92-1.23.51-.33 1.03-.66 1.6-.9 1.4-.58 3.8-.84 6.43-1.12C31.97-.1 38.13-.76 38.68-4.4c-.9 0-2.25-.09-3.83-.19-4.88-.3-11.82-.74-13.43.82-.83.8-.72 1.47-.62 2.04.14.8.24 1.4-2.53 1.86-.9.15-1.56-.09-2.22-.32-1-.37-2-.72-3.86.3-.27.15-3.62 2.1-1.58 2.34ZM162.37 32.42c.58-1.44 1.49-3.74 2.94-3.83.52.44 1.18 1.41 1.77 2.28.5.74.96 1.4 1.22 1.6 1.21.88 1.55.84 2.5.73.42-.04.96-.1 1.73-.1 0 2.23-.61 3.37-1.32 4.68-.46.86-.97 1.8-1.36 3.18-.04.14-.08.41-.12.76-.2 1.7-.63 5.14-3.16 3.16-.62-.49-.64-1.98-.66-3.73-.04-3.23-.1-7.36-3.93-7.81.11-.2.24-.53.4-.92ZM102.33-.92c0 3 1.28 10.24 6.03 5.19 1.17-1.24 2.12-6.23 1.52-7.46-1.78-3.67-7.55-1.14-7.55 2.28ZM-39.18 121.74c-.62-.97-1.22-1.9-1.86-2.36-.59-.43-.5-1.74-.45-2.75.02-.27.04-.53.04-.74.82-.04 1.74.4 2.68.86 1.33.64 2.7 1.31 3.94.64 1.94-1.04.71-1.63-.52-2.22-.67-.32-1.34-.64-1.51-1.04-1.9-4.42 1.88-2.01 3.4-1.04.32.2.54.34.59.34-.46.6-.3 2.25-.12 4.1.34 3.57.76 7.94-2.85 7.48-1.33-.17-2.37-1.77-3.34-3.27ZM-39.86 76.85c.39-.54.8-1.12 1.2-1.43.27-.2.82-.06 1.3.07.37.1.7.2.83.1.23-.15.24-.4.26-.63 0-.23.02-.45.2-.58.52-.35 2.56-1.95 2.54-2.53-.04-1.38-1.35-1.7-2.67-2.02-.95-.23-1.9-.46-2.35-1.1-.12-.16-.05-.9.04-1.86.24-2.67.64-6.97-2.53-5.03-.65-.21-.04 16.33.15 16.21.3-.18.65-.68 1.03-1.2ZM140.32 121.53c.32-2.06.62-4 3.36-3.26.21.05-.09.84-.45 1.8-.55 1.43-1.23 3.23-.5 3.4-.34.06-.38.48-.41.88-.02.2-.03.39-.09.52-.7 1.7-.86 1.7-2.44 1.61-.45-.02-1.01-.05-1.73-.05.1-.05-.5-.82-.65-.94 2.3-.06 2.61-2.07 2.9-3.97ZM137.39 125.49h.02c-.02-.02-.03-.03-.02 0ZM126.5-1.19a7.7 7.7 0 0 0-.07-2.35 11 11 0 0 0-.45-.86h.36c2-.02 7.66-.07 4.51 2.37-.97.76-3.05.86-4.34.84ZM139.1-3.8s3.3 1.83 3.43 1.4c.65-2.3-1.46-2.17-3.33-2.05-.4.02-.8.05-1.14.05.42.09.76.29 1.03.6Z"/><path d="M-4.91 63.96c.48.84.96 1.69 2.06 2.19C.05 67.47.1 68.09.2 69.13c.07.62.14 1.38.82 2.52 1.65 2.79 5.81 2.6 9.11 2.44.68-.03 1.31-.06 1.88-.06.74 0 1.26.03 1.68.06 1.3.08 1.44.1 3.13-1.4.7-.6 1.37-1.32 2.06-2.05.78-.83 1.59-1.67 2.45-2.41 1.86-1.6 6.16-5.62 3.02-7.85 1.53-.35 1.06-3.02-.02-3.61.13-.05 1.46-3.25 1.39-3.42.7.04 1.36.22 2 .39 1.41.37 2.71.72 3.96-.53 1.08-1.07.73-2.62.38-4.18-.3-1.3-.6-2.62-.04-3.64 1.55-2.89 6.63-3.17 9.3-1.44 1.82 1.19 6 5 7.16 6.77 1.98 3.02 1.2 5.71-2.95 5.6-1-.02-1.73-.46-2.26-.78-.79-.48-1.13-.69-1.32 1.15-.08.8.76 1.85 1.45 2.69a11.22 11.22 0 0 1 .97 1.33c1.77 2.7 2.49 3.8 1.15 7.08-.06.17-.13.33-.2.48-.95 2.34-1.28 3.15-.37 5.83 1.05 3.08 1.34 4.39 1.09 7.64l-.06.51c-.16 1.36-.42 3.6 1.87 3.93-.35.53-1.66 4.38-1.34 4.75-1.96-.24-2.27.13-2.85.8-.37.44-.85 1-1.91 1.61-.75.42-1.69.53-2.64.63-1.33.15-2.68.3-3.54 1.33-.78.93-.8 2.45-.84 3.94a9.36 9.36 0 0 1-.37 3c-.58 1.53-1.37 3.41-3.36 4.1-4.8 1.64-4.42-2.59-4.15-5.55.04-.5.09-.98.1-1.38.16-5.04.23-10.4-.73-15.26-.98-4.94-1.8-3.05-2.9-.5-.2.5-.43 1.02-.67 1.51a7.4 7.4 0 0 1-1.79 2.16 7.71 7.71 0 0 0-1.68 1.97c-.31.59-.28 1.2-.26 1.78.04.82.08 1.6-.78 2.22-.65.48-1.41.32-2.11.17-.58-.12-1.11-.23-1.5.03-.73.51-.84 1.94-.96 3.41-.16 2.1-.33 4.3-2.35 4.05-1.98-.24-2.16-2.3-2.31-4.03-.11-1.23-.2-2.29-.9-2.42.37-.1.82-.22 1.3-.33 3.1-.74 7.47-1.78 1.43-3.86 1.85-.18 1.31-2.45 1.07-3.5l-.05-.2c-.07-.3-.42-.55-.77-.8-.36-.25-.73-.52-.79-.84-.12-.72.07-1.08.26-1.44.14-.26.28-.52.3-.91.01-.53.07-1.03.11-1.48.2-1.98.3-3-2.86-1.4-.9.45-1.1 1.07-1.27 1.56-.22.67-.36 1.09-2.16.43-.06-.2-.22-.3-.48-.34-.27.08-.7-.22-1.21-.58-.78-.54-1.74-1.2-2.58-.85-1.66.7-1.03 1.9-.47 2.98.21.4.42.8.49 1.13.55 2.58.2 2.75-.6 3.13-.58.28-1.38.66-2.24 2.1-.71 1.2-.26 2.4.17 3.5.57 1.48 1.09 2.83-1.21 3.87-5.86 2.66-6.78-3.52-6.04-6.46l.08-.34c.8-3.2 1.4-5.58-.11-8.87-1.04-2.26-2.75-3.59-4.58-5.02a31.58 31.58 0 0 1-2.8-2.36c-3.43-3.38-3.7-7.4.22-10.64 3.14-2.6 7.36-3.36 10.65-.65.54.45.88 1.04 1.22 1.63ZM86.86 16.93c.45.21 1.04 1 1.64 1.81.56.75 1.14 1.52 1.63 1.89.6.45 1.26.79 1.9 1.12 1.04.56 2.06 1.1 2.8 2.08 3.04 4.1.8 6.84-1.88 10.1l-.1.11c-2.9 3.54-4.47 14.02-1.33 17.42.5.54 1.28.95 2.1 1.38.9.47 1.85.97 2.5 1.68.39.42.63.92.88 1.42.23.46.46.93.8 1.33 1.22 1.44 4.02 4.31 6.14 4.43.44-2.45 1.27-3.31 3.72-4.66 3.3 1.12 4.88-6.03 4.72-6.91-.32-1.77-1.37-4.19-3.9-4.25-2.3-.06-2.76 1.15-3.21 2.36-.3.78-.58 1.56-1.37 2-2.46 1.36-2.85.26-3.46-1.48a29 29 0 0 0-.32-.88c-.24-.6-.33-1.11-.42-1.58a3.98 3.98 0 0 0-1.1-2.37 5.33 5.33 0 0 0-1.8-1.06c-.85-.36-1.7-.73-2.14-1.46-2.07-3.5 1.1-6 3.99-8.28 1.3-1.02 2.53-2 3.22-3-.17-.06 6.45-2 7.03-2.1.38-.07.87-.13 1.39-.19 2.34-.27 5.48-.63 3.8-2.41-.62-.68-1.64-.9-2.7-1.11-1.22-.26-2.5-.53-3.3-1.53-1.03-1.27-.77-2.71-.5-4.13.2-1.14.4-2.26-.08-3.27-1.42.03-2.77.55-4.1 1.06-2.34.9-4.62 1.79-7.15-.15-1.72-1.33-1.57-3.06-1.41-4.78.12-1.39.25-2.77-.6-3.93-.39-.54-.53-.8-.6-.92-.02-.06-.03-.08-.05-.09l-.03.02c-.08.05-.3.2-1.34-.01-3.03-.65-3.15-.21-3.45.88-.1.35-.2.78-.44 1.25-.47.93-2.52 7.7-1.48 8.2ZM10.6 33.44c-3.42.87-5 .75-9.52.13-.56-.05-1.1-.07-1.66-.05.64-.48 4.78-5.6 4.68-5.67.13.08.02.67-.1 1.32-.12.74-.26 1.56-.1 1.77.7.84 2.58 1.16 4.26 1.46.95.16 1.83.32 2.4.55-.2.1-.18.27.04.5ZM79.33 20.15c.03 0 .16.08.35.19.61.35 1.83 1.05 1.84.89.04-.62.63-1.3 1.19-1.97 1.04-1.22 2.02-2.37-.54-2.88-2.15-.42-4.12 2.14-4.37 3.53.54-.03 1.05.05 1.53.24ZM118.27 70.9a24.6 24.6 0 0 0-2.77-2.67c-2.59-1.07 2.46-6.6 4.3-8.62l.51-.57c.58-.67 1.67-2.92 2.66-4.95.92-1.92 1.76-3.64 1.98-3.66.62-.06 2.05 9.72 2.81 14.88.22 1.49.38 2.6.45 2.97l.1.51c.44 2.3.93 4.86-.84 6.78-1.56 1.69-5.46 3.05-7.56 1.36-1.1-.88-1.12-2.12-1.13-3.35a5.16 5.16 0 0 0-.5-2.67ZM159.65 16.33c.22.93 1.78 3.29 2.94 3.32.06-.43.78-1.77 1.51-3.12.8-1.5 1.61-3 1.5-3.22-1.15-2.31-6.57.33-5.95 3.02ZM79.07 25.5c.63.42 1.3.84 1.67 1.38.72 1.03-.08 3-1.72 2.95.13-.54-.15-1.39-.43-2.25-.34-1.03-.68-2.08-.33-2.61l.8.54ZM136.95 74.33c.54 1.43 1.05 2.8 1.32 3.25.4.66.87 1.3 1.34 1.96.74 1.03 1.5 2.06 1.98 3.16 1.2 2.68.71 4.72.2 6.84-.36 1.54-.73 3.11-.47 5 .68 4.82 4.12 2.8 5.67-.43-1.37-.18 1.95-6.67 3.6-8.01.3-.26.76-.7 1.3-1.23 2.12-2.07 5.63-5.5 7.4-4.22 1.62 1.17.7 2.52-.2 3.86-.63.94-1.26 1.87-1 2.72.04.18.62.01 1.06-.12.3-.09.53-.16.55-.11.01.03.11.05.26.07.32.06.86.15 1 .62.1.32-.07.7-.23 1.06-.14.3-.27.6-.22.84.36 1.7.13 3.27-.1 4.9-.13.93-.27 1.88-.3 2.89-.2 5.7 1.44 2.6 2.6.4.44-.83.8-1.53 1-1.6-2.04-1.62-1.4-7.4 1.75-8.04 1.3-.26 2.33.32 3.29.87 1.22.7 2.33 1.33 3.77.05.56-.49.1-7.65-.2-7.9-.47-.4-1.5-.53-2.45-.66a9.14 9.14 0 0 1-1.5-.27c-1.31-.44-6.6-2.23-2.77-3 .9-.18 1.86.33 2.81.84 1.09.57 2.17 1.14 3.17.73 1.94-.8 1.43-8.67 1.11-13.53-.1-1.35-.17-2.47-.17-3.14-2 .05-3.64 2.87-4.19 4.25-1.56 3.92-2.2 5.05-7.02 7.43a57.6 57.6 0 0 0-3.55 1.73l-.02.01c-.3.18-.76.17-1.2.16-.47 0-.9-.02-1.1.2-.25.28-.1.92.08 1.63.24.96.5 2.06-.09 2.7-2.03 2.16-3.39.77-4.94-.83l-.62-.62-.8-.76c-1.02-.95-2.35-2.2-2.83-3.06-1.66-2.96.06-3.47 2.02-4.05 1.55-.46 3.26-.96 3.52-2.78.18-1.32-1.54-2.18-3.3-3.05-.94-.48-1.9-.96-2.56-1.51-.45-.38-.77-.85-1.09-1.32-.56-.81-1.12-1.63-2.37-1.98-4.87-1.36-11.02 8.46-7.25 10.07.28.12 1.02 2.09 1.72 3.96ZM58.31 125.53c-.3-3.3-5.79-.12-7.35.79l-.2.1h7.62l-.07-.9ZM117.73 125.89c.52-.17 2.31-2.67 2.55-3.2a2.8 2.8 0 0 0-.15.73c-.12 1-.3 2.42-2.4 2.47Z"/></g>',circuits:(t,l)=>'<path d="M15 0h-4v18h4V0ZM23 0h-4v34h53.42a5 5 0 1 0 0-4H23V0Z" fill="#000" fill-opacity=".1"/><path d="M122 34.58a5 5 0 1 0-4 0V64h23v-4h-19V34.58Z" fill="#fff" fill-opacity=".2"/><path d="M114 46h-4v26h31v-4h-27V46ZM27 103.58a5 5 0 1 1 4 0V133H8v-4h19v-25.42Z" fill="#000" fill-opacity=".2"/>',dirty01:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd" fill="#000"><path d="M-9.12 122.1c4.36-30.7 13.06-4.57 33.99-9.98 9.24-2.39 1.77-12.82 8.67-17.35 5.82-3.82 13.76-.74 20.43-3.21 9.63-3.57 9.5-10.82 18.48-11.9 8.48-1.03 17.37 2.34 25.93 1.08 16.15-2.4 9.53-34.03 21.64-39.61 12.1-5.6 32.05 4.06 34.66 19.87 2.54 15.42-14.46 72.78-14.46 72.78H-9.12" fill-opacity=".2"/><path d="M35.93 122c37.67 0 41.6-14.75 60.14-21.5 18.53-6.76 34.78 10.71 41-6.27 6.24-16.98 6.2 35.95 6.2 35.95H35.94V122Z" fill-opacity=".1"/><path d="M-2 4.87C9.73 3.75 5.96 16.8 10.6 16.8c1.85 0 4.03-8.46 7.38-8.46 2.46 0 2 5.5 7.32 4.91 5-.54 4.08-4 6.6-4 5.45 0 3.39 20.2 7.74 20.2 4.36 0 5.73-14.8 7.65-20.64 2.43-7.4 16.97-11.56 6.6-14.5H-2.29" fill-opacity=".4"/></g>',dirty02:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd" fill="#000"><path d="M100 124.65c-3.19-17.34-9.55-2.58-24.85-5.63-6.76-1.35-1.3-7.25-6.34-9.8-4.26-2.17-10.06-.43-14.94-1.82-7.04-2.02-6.95-6.12-13.5-6.73-6.2-.58-12.7 1.33-18.97.61C9.6 99.93 14.44 82.06 5.58 78.9c-8.85-3.15-23.43 2.3-25.34 11.23-1.86 8.71 10.57 41.12 10.57 41.12h109.2" fill-opacity=".2"/><path d="M136 116.77c-51.24 0-56.58-25.8-81.8-37.61C29 67.34 6.9 97.9-1.56 68.2c-8.48-29.7-8.43 62.86-8.43 62.86h146v-14.3Z" fill-opacity=".1"/><path d="M141.57 3.18c-11.93-.98-5.03 10.8-9.74 10.8-6.97 0-2.1-7.97-10.58-7.78-2.22.06-4.95 1.94-5.11 4.5-.37 5.52 3.71 15.03-1.84 15.3-5.18.25-1.1-9.64-1.65-16.24-.3-3.77-4.18-6.75-6.97-6.75-7.57 0-1.68 15.7-7.13 15.7s-1.2-9.05-5.08-13.84C88.97-.7 74.17-3.44 84.72-6h57.15" fill-opacity=".4"/></g>',dots:(t,l)=>'<g fill="#000"><path d="M27.3 65.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM35.7 69.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM35.7 82.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM35.7 94.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM34.1 109.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM49.2 107.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM27.3 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM29.2 101.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM51.1 103.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM42 88.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM39.9 103.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM29.4 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM39.9 77.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM10.5 94.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 84.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM10.5 107.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM2.1 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 100.97a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM16.8 100.97a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 71.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 65.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM16.8 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 96.76a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM23.1 82.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 109.38a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM35.7 119.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM27.3 115.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM42 113.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 122a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 113.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 115.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM23.1 119.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 71.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2Z" fill-opacity=".2"/><path d="M117.3 4.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM125.7 8.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM125.7 21.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM125.7 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM123.6 48.38a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM119.4 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM117.3 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM132 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM129.9 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM119.4 14.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM129.9 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM98.4 23.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 46.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM92.1 29.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM106.8 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 8.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM92.1 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM106.8 2.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM111 23.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 46.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM123.6 61a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM132 52.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 54.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 58.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM111 10.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2Z" fill-opacity=".1"/></g>',grunge01:(t,l)=>'<path d="M69.1 77c-.08.01-.09.02-.1.11.09-.01.1-.02.1-.1ZM81.25 107.1l.13-.1c1.9 0-1.25.19-.13.1ZM86 85.11c.09-.01.1-.02.1-.1-.08 0-.09.01-.1.1ZM15 92c.01.09.02.1.1.11 0-.09-.01-.1-.1-.1Z" fill="#000" fill-opacity=".4"/>',grunge02:(t,l)=>'<path d="M29.47 34.03c-.1 0-.19-.06-.26-.12-.08-.07-.14-.12-.13.14.01.5.67-.05.4-.02ZM9.33 48.92s.2-.56.03-.74c-.17.17-.18.42-.03.74ZM7.5 52c.06 0 .57-.28.48-.43-.12-.18-.49.34-.49.42ZM22.9 59.14c-.13-.11-.53-.45-.28-.5.14-.03.5.36.32.54v-.01h-.01l-.03-.03ZM26.33 108.46c.13-.02.66-.36.34-.45-.21-.04-.6.5-.34.46ZM52.63 96.34c-.05.05-.2.09-.34.12-.15.04-.26.07-.16.1.19.06.84.16.5-.22ZM4.76 43.63ZM5.1 71.63l.06-.1c1.02 0-.68.19-.07.1ZM80.53 109.92c.09-.02.1-.02.1-.11-.07.01-.08.02-.1.1ZM29.17 117.78c.08-.02.09-.03.1-.11-.08.01-.09.02-.1.1ZM9.01 49.75c.08-.02.09-.03.1-.12-.08.02-.09.03-.1.12ZM65.84 48.74c.02.09.03.1.1.1 0-.08-.01-.09-.1-.1ZM107.28 76.91c-.08.02-.09.03-.1.12.08-.02.09-.03.1-.12Z" fill="#000" fill-opacity=".2"/>'},U7=Object.freeze(Object.defineProperty({__proto__:null,eyes:O7,face:R7,mouth:D7,sides:T7,texture:L7,top:_7},Symbol.toStringTag,{value:"Module"}));function Qr({prng:t,group:l,values:r=[]}){const i=U7,s=t.pick(r);if(s&&i[l][s])return{name:s,value:i[l][s]}}function H7({prng:t,options:l}){const r=Qr({prng:t,group:"sides",values:l.sides}),i=Qr({prng:t,group:"top",values:l.top}),s=Qr({prng:t,group:"face",values:l.face}),o=Qr({prng:t,group:"mouth",values:l.mouth}),c=Qr({prng:t,group:"eyes",values:l.eyes}),d=Qr({prng:t,group:"texture",values:l.texture});return{sides:t.bool(l.sidesProbability)?r:void 0,top:t.bool(l.topProbability)?i:void 0,face:s,mouth:t.bool(l.mouthProbability)?o:void 0,eyes:c,texture:t.bool(l.textureProbability)?d:void 0}}function B7(t){return t==="transparent"?t:`#${t}`}function Z7({prng:t,options:l}){var r;return{base:B7(t.pick((r=l.baseColor)!==null&&r!==void 0?r:[],"transparent"))}}const q7={$schema:"http://json-schema.org/draft-07/schema#",properties:{baseColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["ffb300","1e88e5","546e7a","6d4c41","00acc1","f4511e","5e35b1","43a047","757575","3949ab","039be5","7cb342","c0ca33","fb8c00","d81b60","8e24aa","e53935","00897b","fdd835"]},eyes:{type:"array",items:{type:"string",enum:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},default:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},face:{type:"array",items:{type:"string",enum:["round01","round02","square01","square02","square03","square04"]},default:["round01","round02","square01","square02","square03","square04"]},mouth:{type:"array",items:{type:"string",enum:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},default:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},mouthProbability:{type:"integer",minimum:0,maximum:100,default:100},sides:{type:"array",items:{type:"string",enum:["antenna01","antenna02","cables01","cables02","round","square","squareAssymetric"]},default:["antenna01","antenna02","cables01","cables02","round","square","squareAssymetric"]},sidesProbability:{type:"integer",minimum:0,maximum:100,default:100},texture:{type:"array",items:{type:"string",enum:["camo01","camo02","circuits","dirty01","dirty02","dots","grunge01","grunge02"]},default:["camo01","camo02","circuits","dirty01","dirty02","dots","grunge01","grunge02"]},textureProbability:{type:"integer",minimum:0,maximum:100,default:50},top:{type:"array",items:{type:"string",enum:["antenna","antennaCrooked","bulb01","glowingBulb01","glowingBulb02","horns","lights","pyramid","radar"]},default:["antenna","antennaCrooked","bulb01","glowingBulb01","glowingBulb02","horns","lights","pyramid","radar"]},topProbability:{type:"integer",minimum:0,maximum:100,default:100}}},$7={title:"Bottts",creator:"Pablo Stanley",source:"https://bottts.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://bottts.com/"}},V7=({prng:t,options:l})=>{var r,i,s,o,c,d,m,p,x,y;const v=H7({prng:t,options:l}),S=Z7({prng:t,options:l});return{attributes:{viewBox:"0 0 180 180",fill:"none","shape-rendering":"auto"},body:`<g transform="translate(0 66)">${(i=(r=v.sides)===null||r===void 0?void 0:r.value(v,S))!==null&&i!==void 0?i:""}</g><g transform="translate(41)">${(o=(s=v.top)===null||s===void 0?void 0:s.value(v,S))!==null&&o!==void 0?o:""}</g><g transform="translate(25 44)">${(d=(c=v.face)===null||c===void 0?void 0:c.value(v,S))!==null&&d!==void 0?d:""}</g><g transform="translate(52 124)">${(p=(m=v.mouth)===null||m===void 0?void 0:m.value(v,S))!==null&&p!==void 0?p:""}</g><g transform="translate(38 76)">${(y=(x=v.eyes)===null||x===void 0?void 0:x.value(v,S))!==null&&y!==void 0?y:""}</g>`,extra:()=>({...Object.entries(v).reduce((C,[T,z])=>(C[T]=z==null?void 0:z.name,C),{}),...Object.entries(S).reduce((C,[T,z])=>(C[`${T}Color`]=z,C),{})})}},I7=Object.freeze(Object.defineProperty({__proto__:null,create:V7,meta:$7,schema:q7},Symbol.toStringTag,{value:"Module"})),cm=new Map;function d3(t){let l=cm.get(t);return l||(l=z7(I7,{seed:t}).toDataUri(),cm.set(t,l)),l}function J7(t){const l=[],r=new Map;for(const s of t){if(s.fleetPath.length===0){l.push(s);continue}for(let c=0;c<s.fleetPath.length;c++){const d=s.fleetPath.slice(0,c+1).join(".");if(r.has(d)||r.set(d,{name:s.fleetPath[c],agents:[],children:[]}),c>0){const m=s.fleetPath.slice(0,c).join("."),p=r.get(m),x=r.get(d);p.children.includes(x)||p.children.push(x)}}const o=s.fleetPath.join(".");r.get(o).agents.push(s)}const i=[];for(const[s,o]of r.entries())s.includes(".")||i.push(o);return{rootAgents:l,fleetNodes:i}}function Af(t,l){return t.agents.some(r=>r.status===l)?!0:t.children.some(r=>Af(r,l))}function h3(t){let l=t.agents.length;for(const r of t.children)l+=h3(r);return l}function F7(t){switch(t){case"connected":return"bg-herd-status-running";case"reconnecting":return"bg-herd-status-pending animate-pulse";case"disconnected":return"bg-herd-status-idle"}}function Y7(t){return Af(t,"error")?"bg-herd-status-error":Af(t,"running")?"bg-herd-status-running animate-pulse":"bg-herd-status-idle"}function m3({agent:t,sessions:l,isActive:r,activeSessionId:i,onNavigate:s,onNewChat:o,indent:c=0}){const d=c>0?`${c*16+2}px`:void 0;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center border-b border-herd-sidebar-border bg-herd-sidebar-hover",children:[g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}`,onClick:s,className:`flex-1 flex items-center gap-2 py-2.5 rounded-lg text-sm font-semibold tracking-wide transition-colors min-w-0 ${r?"text-herd-sidebar-fg":"text-herd-sidebar-fg/80 hover:text-herd-sidebar-fg"}`,style:d?{paddingLeft:d}:{paddingLeft:"12px"},children:[g.jsx("img",{src:d3(t.name),alt:"",className:"w-5 h-5 rounded flex-shrink-0"}),g.jsx("span",{className:"truncate",children:t.name})]}),g.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),o(t.qualifiedName)},className:"flex-shrink-0 p-1.5 mr-1 rounded bg-herd-primary/80 text-white hover:bg-herd-primary transition-colors",title:"New chat",children:g.jsx(I8,{className:"w-3.5 h-3.5"})})]}),l.length===0?g.jsx("p",{className:"text-[11px] text-herd-sidebar-muted/50 text-center py-3",children:"No chats yet"}):g.jsx("div",{className:"mr-1 mt-0.5 space-y-1",children:l.map(m=>{const p=m.sessionId===i;return g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}/chat/${m.sessionId}`,onClick:s,className:`flex items-center justify-between gap-2 px-3 py-2 rounded text-sm transition-colors ${p?"text-herd-sidebar-fg bg-herd-sidebar-active":"text-herd-sidebar-muted hover:bg-herd-sidebar-hover hover:text-herd-sidebar-fg"}`,children:[g.jsx("span",{className:"truncate",children:m.preview||"New conversation"}),g.jsx("span",{className:"flex-shrink-0 text-herd-sidebar-muted/60 text-[10px]",children:m7(m.lastMessageAt)})]},m.sessionId)})})]})}function p3({node:t,sidebarSessions:l,currentAgentQualifiedName:r,activeSessionId:i,onNavigate:s,onNewChat:o,depth:c=0,expandedFleets:d,toggleFleet:m,fleetKeyPrefix:p=""}){const x=p?`${p}.${t.name}`:t.name,y=d.has(x),v=h3(t);return Y7(t),g.jsxs("div",{children:[g.jsxs("button",{type:"button",onClick:()=>m(x),className:"w-full flex items-center gap-2 py-2 rounded-lg text-xs font-medium text-herd-sidebar-muted hover:text-herd-sidebar-fg hover:bg-herd-sidebar-hover transition-colors",style:{paddingLeft:`${c*16+8}px`},children:[g.jsx(i1,{className:`w-3 h-3 transition-transform flex-shrink-0 ${y?"rotate-90":""}`}),g.jsx("span",{className:"truncate font-semibold uppercase tracking-wide",children:t.name}),g.jsx("span",{className:"text-[11px] text-herd-sidebar-muted/60 ml-auto mr-2",children:v})]}),y&&g.jsxs("div",{className:"ml-2 border-l-2 border-herd-sidebar-border/60",children:[t.agents.map(S=>g.jsx(m3,{agent:S,sessions:l[S.qualifiedName]??[],isActive:r===S.qualifiedName,activeSessionId:i,onNavigate:s,onNewChat:o,indent:c+1},S.qualifiedName)),t.children.map(S=>g.jsx(p3,{node:S,sidebarSessions:l,currentAgentQualifiedName:r,activeSessionId:i,onNavigate:s,onNewChat:o,depth:c+1,expandedFleets:d,toggleFleet:m,fleetKeyPrefix:x},S.name))]})]})}function lf({to:t,icon:l,label:r,isActive:i,onNavigate:s}){return g.jsxs(yt,{to:t,onClick:s,className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-colors ${i?"text-herd-sidebar-fg bg-herd-sidebar-active font-medium":"text-herd-sidebar-muted hover:bg-herd-sidebar-hover hover:text-herd-sidebar-fg"}`,children:[l,r]})}function fm({onNavigate:t}={}){const{agents:l,connectionStatus:r,fleetStatus:i}=ys(),{sidebarSessions:s}=g6(),{createChatSession:o,fetchSidebarSessions:c}=Wf(),d=ll(),m=If(),[p,x]=E.useState(new Set),{rootAgents:y,fleetNodes:v}=E.useMemo(()=>J7(l),[l]),S=v.length>0;E.useEffect(()=>{if(S&&p.size===0){let V=function(_,I){for(const se of _){const oe=I?`${I}.${se.name}`:se.name;F.add(oe),V(se.children,oe)}};const F=new Set;V(v,""),x(F)}},[S,v]);const C=E.useCallback(V=>{x(F=>{const _=new Set(F);return _.has(V)?_.delete(V):_.add(V),_})},[]),T=E.useMemo(()=>l.map(V=>V.qualifiedName),[l]);E.useEffect(()=>{T.length>0&&c(T)},[T.join(","),c]);const z=E.useMemo(()=>{if(!d.pathname.startsWith("/agents/"))return null;const V=d.pathname.slice(8),F=V.indexOf("/"),_=F>=0?V.slice(0,F):V;return decodeURIComponent(_)},[d.pathname]),M=E.useMemo(()=>{const V=d.pathname.match(/\/chat\/(.+)$/);return V?V[1]:null},[d.pathname]),U=E.useCallback(async V=>{const F=await o(V);F&&(m(`/agents/${encodeURIComponent(V)}/chat/${F}`),t==null||t())},[o,m,t]),N=(i==null?void 0:i.counts)??{runningAgents:0,idleAgents:0,errorAgents:0};return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"p-4 border-b border-herd-sidebar-border",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("img",{src:"/herdctl-logo.svg",alt:"herdctl logo",className:"w-7 h-7"}),g.jsx("h1",{className:"text-lg font-semibold text-herd-sidebar-fg",children:"herdctl"})]}),g.jsx("div",{className:"flex items-center gap-1.5",children:g.jsx("span",{className:`w-2 h-2 rounded-full ${F7(r)}`})})]})}),g.jsxs("div",{className:"flex-1 overflow-auto p-2",children:[v.length>0&&g.jsx("div",{className:"divide-y divide-herd-sidebar-border",children:v.map(V=>g.jsx("div",{className:"py-3 first:pt-0 last:pb-0",children:g.jsx(p3,{node:V,sidebarSessions:s,currentAgentQualifiedName:z,activeSessionId:M,onNavigate:t,onNewChat:U,expandedFleets:p,toggleFleet:C})},V.name))}),y.length>0&&g.jsx("div",{className:"space-y-0.5",children:y.map(V=>g.jsx(m3,{agent:V,sessions:s[V.qualifiedName]??[],isActive:z===V.qualifiedName,activeSessionId:M,onNavigate:t,onNewChat:U},V.qualifiedName))}),l.length===0&&g.jsx("p",{className:"text-xs text-herd-sidebar-muted px-3 py-2",children:"No agents configured"})]}),g.jsx("nav",{className:"p-2 border-t border-herd-sidebar-border",children:g.jsxs("div",{className:"space-y-1",children:[g.jsx(lf,{to:"/",icon:g.jsx(c3,{className:"w-4 h-4"}),label:"Dashboard",isActive:d.pathname==="/",onNavigate:t}),g.jsx(lf,{to:"/jobs",icon:g.jsx(r8,{className:"w-4 h-4"}),label:"Jobs",isActive:d.pathname==="/jobs",onNavigate:t}),g.jsx(lf,{to:"/schedules",icon:g.jsx(a1,{className:"w-4 h-4"}),label:"Schedules",isActive:d.pathname==="/schedules",onNavigate:t})]})}),g.jsx("div",{className:"px-4 py-2 border-t border-herd-sidebar-border",children:g.jsxs("p",{className:"text-xs text-herd-sidebar-muted",children:[N.runningAgents," running"," ",g.jsx("span",{className:"text-herd-sidebar-muted/50",children:"·"})," ",N.idleAgents," idle"," ",g.jsx("span",{className:"text-herd-sidebar-muted/50",children:"·"})," ",N.errorAgents," errors"]})})]})}function G7(t){switch(t){case"connected":return"bg-herd-status-running";case"reconnecting":return"bg-herd-status-pending animate-pulse";case"disconnected":return"bg-herd-status-error"}}function X7(t){switch(t){case"connected":return"Connected";case"reconnecting":return"Reconnecting";case"disconnected":return"Disconnected"}}function Q7(t,l){if(t==="/")return{title:"Fleet Dashboard"};if(t==="/jobs")return{title:"Jobs"};if(t==="/schedules")return{title:"Schedules"};if(t.startsWith("/agents/")&&l){const r=t.match(/^\/agents\/[^/]+\/chat\/(.+)$/);return r?{title:`Chat with ${l}`,backTo:`/agents/${encodeURIComponent(l)}`,sessionId:r[1]}:t.endsWith("/chat")?{title:`Chat with ${l}`,backTo:`/agents/${encodeURIComponent(l)}`}:{title:l}}return{title:"herdctl"}}const K7=[{value:"light",icon:r7,label:"Light mode"},{value:"dark",icon:q8,label:"Dark mode"},{value:"system",icon:B8,label:"System theme"}];function P7(){const{connectionStatus:t}=ys(),{theme:l}=Rp(),{toggleSidebarMobile:r,setTheme:i}=Dp(),s=ll(),o=Jf(),c=Q7(s.pathname,o.name);return g.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b border-herd-border bg-herd-card",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:r,className:"md:hidden hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg p-1.5 transition-colors","aria-label":"Toggle sidebar",children:g.jsx(O8,{className:"w-4 h-4"})}),c.backTo&&g.jsx(yt,{to:c.backTo,className:"text-herd-muted hover:text-herd-fg transition-colors",title:"Back to agent",children:g.jsx(r1,{className:"w-4 h-4"})}),g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:c.title}),c.sessionId&&g.jsx("span",{className:"text-xs text-herd-muted font-mono",children:c.sessionId.slice(0,8)})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex items-center bg-herd-hover rounded-lg p-0.5",children:K7.map(({value:d,icon:m,label:p})=>g.jsx("button",{type:"button",onClick:()=>i(d),className:`p-1.5 rounded-md transition-colors ${l===d?"bg-herd-card text-herd-fg shadow-sm":"text-herd-muted hover:text-herd-fg"}`,title:p,"aria-label":p,children:g.jsx(m,{className:"w-3.5 h-3.5"})},d))}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:`w-2 h-2 rounded-full ${G7(t)}`}),g.jsx("span",{className:"text-xs text-herd-muted",children:X7(t)})]})]})]})}function W7(t){switch(t){case"running":return"bg-herd-status-running animate-pulse";case"idle":return"bg-herd-status-idle";case"error":return"bg-herd-status-error";case"completed":return"bg-herd-status-running";case"failed":return"bg-herd-status-error";case"cancelled":return"bg-herd-status-idle";case"pending":return"bg-herd-status-pending";case"disabled":return"bg-herd-status-idle"}}function eb(t){switch(t){case"running":return"text-herd-status-running";case"idle":return"text-herd-status-idle";case"error":return"text-herd-status-error";case"completed":return"text-herd-status-running";case"failed":return"text-herd-status-error";case"cancelled":return"text-herd-status-idle";case"pending":return"text-herd-status-pending";case"disabled":return"text-herd-status-idle"}}function tb(t){return t.charAt(0).toUpperCase()+t.slice(1)}function sr({status:t,size:l="sm",className:r=""}){const i=l==="sm"?"w-1.5 h-1.5":"w-2 h-2",s=l==="sm"?"text-xs":"text-sm";return g.jsxs("span",{className:`inline-flex items-center gap-1.5 font-medium ${eb(t)} ${r}`,children:[g.jsx("span",{className:`${i} rounded-full ${W7(t)}`}),g.jsx("span",{className:s,children:tb(t)})]})}function xt({children:t,className:l="",onClick:r,as:i,...s}){const o=i??"div",c="bg-herd-card border border-herd-border rounded-[10px]",d=r?"cursor-pointer hover:border-herd-primary/30 transition-colors":"";return g.jsx(o,{className:`${c} ${d} ${l}`,onClick:r,...s,children:t})}function nl({size:t="md",className:l=""}){const r={sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-[3px]"};return g.jsx("span",{className:`inline-block rounded-full border-herd-primary border-t-transparent animate-spin ${r[t]} ${l}`,role:"status","aria-label":"Loading"})}function nb({status:t}){const[l,r]=E.useState("hidden"),i=E.useRef(t),s=E.useRef(null);if(E.useEffect(()=>{const d=i.current;return i.current=t,s.current&&(clearTimeout(s.current),s.current=null),t==="connected"?d==="disconnected"||d==="reconnecting"?(r("reconnected"),s.current=setTimeout(()=>{r("hidden")},2e3)):r("hidden"):t==="reconnecting"?r("connecting"):t==="disconnected"&&r("disconnected"),()=>{s.current&&clearTimeout(s.current)}},[t]),l==="hidden")return null;const c={connecting:{bg:"bg-herd-status-pending/15",text:"text-herd-status-pending",border:"border-b border-herd-status-pending/20",icon:g.jsx(Q8,{className:"w-3.5 h-3.5 animate-spin"}),message:"Connecting to server..."},disconnected:{bg:"bg-herd-status-error/15",text:"text-herd-status-error",border:"border-b border-herd-status-error/20",icon:g.jsx(c7,{className:"w-3.5 h-3.5"}),message:"Disconnected from server. Retrying..."},reconnected:{bg:"bg-herd-status-running/15",text:"text-herd-status-running",border:"border-b border-herd-status-running/20",icon:g.jsx(d7,{className:"w-3.5 h-3.5"}),message:"Reconnected"}}[l];return g.jsxs("div",{className:`
|
|
305
|
+
*/const I6=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xs=ve("X",I6);function xt({children:t,className:l="",onClick:r,as:i,...s}){const o=i??"div",c="bg-herd-card border border-herd-border rounded-[10px]",d=r?"cursor-pointer hover:border-herd-primary/30 transition-colors":"";return g.jsx(o,{className:`${c} ${d} ${l}`,onClick:r,...s,children:t})}function J6({status:t}){const[l,r]=E.useState("hidden"),i=E.useRef(t),s=E.useRef(null);if(E.useEffect(()=>{const d=i.current;return i.current=t,s.current&&(clearTimeout(s.current),s.current=null),t==="connected"?d==="disconnected"||d==="reconnecting"?(r("reconnected"),s.current=setTimeout(()=>{r("hidden")},2e3)):r("hidden"):t==="reconnecting"?r("connecting"):t==="disconnected"&&r("disconnected"),()=>{s.current&&clearTimeout(s.current)}},[t]),l==="hidden")return null;const c={connecting:{bg:"bg-herd-status-pending/15",text:"text-herd-status-pending",border:"border-b border-herd-status-pending/20",icon:g.jsx(N6,{className:"w-3.5 h-3.5 animate-spin"}),message:"Connecting to server..."},disconnected:{bg:"bg-herd-status-error/15",text:"text-herd-status-error",border:"border-b border-herd-status-error/20",icon:g.jsx(q6,{className:"w-3.5 h-3.5"}),message:"Disconnected from server. Retrying..."},reconnected:{bg:"bg-herd-status-running/15",text:"text-herd-status-running",border:"border-b border-herd-status-running/20",icon:g.jsx(V6,{className:"w-3.5 h-3.5"}),message:"Reconnected"}}[l];return g.jsxs("div",{className:`
|
|
306
306
|
flex items-center justify-center gap-2 h-8 px-3 text-xs font-medium
|
|
307
307
|
animate-fade-slide-in
|
|
308
308
|
${c.bg} ${c.text} ${c.border}
|
|
309
|
-
`,children:[c.icon,g.jsx("span",{children:c.message})]})}function lb(t){if(!t)return"never";const l=Date.now(),r=new Date(t).getTime(),i=l-r;if(i<0||i<5e3)return"just now";const s=Math.floor(i/1e3),o=Math.floor(s/60),c=Math.floor(o/60),d=Math.floor(c/24);return s<60?`${s}s ago`:o<60?`${o}m ago`:c<24?`${c}h ago`:`${d}d ago`}function rb({timestamp:t,prefix:l="Updated",refreshInterval:r=3e4,className:i=""}){const[,s]=E.useState(0);E.useEffect(()=>{const c=setInterval(()=>{s(d=>d+1)},r);return()=>clearInterval(c)},[r]);const o=lb(t);return g.jsxs("span",{className:`text-xs text-herd-muted ${i}`,children:[l," ",o]})}class _l extends E.Component{constructor(r){super(r);k0(this,"handleReset",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,i){console.error("[ErrorBoundary] Caught error:",r,i)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:g.jsx("div",{className:"flex items-center justify-center p-6",children:g.jsxs("div",{className:"bg-herd-card border border-herd-border rounded-[10px] p-6 max-w-md w-full text-center",children:[g.jsx(u7,{className:"w-12 h-12 text-herd-status-error mx-auto mb-3"}),g.jsx("h2",{className:"text-sm font-medium text-herd-fg mb-2",children:"Something went wrong"}),this.state.error&&g.jsx("div",{className:"bg-herd-code-bg text-herd-code-fg rounded-lg px-3 py-2 text-xs font-mono text-left mb-4 overflow-x-auto",children:this.state.error.message}),g.jsx("button",{onClick:this.handleReset,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Try Again"})]})}):this.props.children}}function ab({children:t}){const{rightPanelOpen:l,sidebarCollapsed:r,sidebarMobileOpen:i}=Rp(),{setSidebarMobileOpen:s}=Dp(),o=Ne(c=>c.connectionStatus);return g.jsxs("div",{className:"h-dvh bg-herd-bg overflow-hidden",children:[i&&g.jsxs("div",{className:"md:hidden fixed inset-0 z-40",children:[g.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:()=>s(!1)}),g.jsx("div",{className:"absolute inset-y-0 left-0 w-[260px] bg-herd-sidebar border-r border-herd-sidebar-border animate-fade-slide-in",children:g.jsx(fm,{onNavigate:()=>s(!1)})})]}),g.jsxs(t3,{direction:"horizontal",className:"h-full",children:[!r&&g.jsxs(g.Fragment,{children:[g.jsx(ns,{id:"sidebar",order:1,defaultSize:20,minSize:15,maxSize:30,className:"bg-herd-sidebar hidden md:block",children:g.jsx(fm,{})}),g.jsx(Nf,{className:"w-px bg-herd-border hover:bg-herd-primary/30 transition-colors hidden md:block"})]}),g.jsxs(ns,{id:"main",order:2,minSize:40,className:"flex flex-col min-w-0",children:[g.jsx(P7,{}),g.jsx(nb,{status:o}),g.jsx("main",{className:"flex-1 overflow-auto",children:t})]}),l&&g.jsxs(g.Fragment,{children:[g.jsx(Nf,{className:"w-px bg-herd-border hover:bg-herd-primary/30 transition-colors"}),g.jsx(ns,{id:"detail",order:3,defaultSize:22,minSize:18,maxSize:35,className:"bg-herd-card border-l border-herd-border",children:g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-xs text-herd-muted",children:"Detail panel — Coming in Phase 3"})})})]})]})]})}function ib({className:t}){return g.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.947 2.418-2.157 2.418z"})})}function ub({className:t}){return g.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.527 2.527 0 0 1 2.52-2.52h6.315A2.528 2.528 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"})})}function dm(t,l){return t.length<=l?t:t.slice(0,l-1)+"…"}function sb(t){if(t.schedules.length===0)return null;const l=t.schedules.filter(m=>m.nextRunAt).map(m=>new Date(m.nextRunAt).getTime());if(l.length===0)return null;const r=Math.min(...l),i=Date.now(),s=r-i;if(s<0)return"Due";const o=Math.floor(s/6e4);if(o<1)return"< 1m";if(o<60)return`${o}m`;const c=Math.floor(o/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function ob(t){return t.chat?Object.keys(t.chat):[]}function cb(t){switch(t){case"discord":return{label:"Discord",icon:g.jsx(ib,{className:"w-3 h-3"}),bgClass:"bg-herd-discord/10",textClass:"text-herd-discord"};case"slack":return{label:"Slack",icon:g.jsx(ub,{className:"w-3 h-3"}),bgClass:"bg-herd-slack/10",textClass:"text-herd-slack"};default:return{label:t.charAt(0).toUpperCase()+t.slice(1),icon:null,bgClass:"bg-herd-hover",textClass:"text-herd-muted"}}}function fb({agent:t}){const l=ob(t),r=t.status==="idle"?sb(t):null;return g.jsxs(xt,{as:"article",className:"p-4 flex flex-col gap-3 transition-colors duration-150",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[t.fleetPath.length>0&&g.jsx("p",{className:"text-[10px] text-herd-muted font-medium uppercase tracking-wide mb-0.5",children:t.fleetPath.join(" / ")}),g.jsx("h3",{className:"text-sm font-medium text-herd-fg truncate",children:t.name}),t.description&&g.jsx("p",{className:"text-xs text-herd-muted mt-0.5 line-clamp-2",children:dm(t.description,80)})]}),g.jsx(sr,{status:t.status,size:"sm"})]}),g.jsxs("div",{className:"min-h-[32px]",children:[t.status==="running"&&t.currentJobId&&g.jsx("div",{className:"bg-herd-hover rounded-lg px-2 py-1.5",children:g.jsx("p",{className:"text-xs text-herd-muted font-mono truncate",children:"Job active"})}),t.status==="idle"&&g.jsx("div",{className:"text-xs text-herd-muted",children:r?g.jsx("span",{children:r==="Due"?"Next run due":`Next run in ${r}`}):g.jsx("span",{children:"No scheduled runs"})}),t.status==="error"&&t.errorMessage&&g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5",children:g.jsx("p",{className:"text-xs truncate",children:dm(t.errorMessage,60)})})]}),l.length>0&&g.jsx("div",{className:"flex gap-1.5 flex-wrap",children:l.map(i=>{const s=cb(i);return g.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] font-medium ${s.textClass} ${s.bgClass} px-2 py-0.5 rounded`,children:[s.icon,s.label]},i)})}),g.jsxs("div",{className:"flex gap-2 pt-1 border-t border-herd-border mt-auto",children:[g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}`,className:"flex items-center gap-1.5 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[g.jsx(k8,{className:"w-3.5 h-3.5"}),"View"]}),g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}/chat`,className:"flex items-center gap-1.5 bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[g.jsx(Si,{className:"w-3.5 h-3.5"}),"Chat"]})]})]})}function db(t,l){return t.length<=l?t:t.slice(0,l-1)+"…"}function hb(t){const l=new Date(t).getTime(),i=Date.now()-l;if(i<0)return"Just now";const s=Math.floor(i/1e3);if(s<60)return"Just now";const o=Math.floor(s/60);if(o<60)return`${o}m ago`;const c=Math.floor(o/60);if(c<24)return`${c}h ago`;const d=Math.floor(c/24);return d<7?`${d}d ago`:`${Math.floor(d/7)}w ago`}function mb({jobs:t,pageSize:l=10}){const[r,i]=E.useState(0),s=Math.ceil(t.length/l),o=r*l,c=t.slice(o,o+l);return g.jsxs("div",{children:[g.jsx("div",{className:"flex items-center justify-between mb-3",children:g.jsxs("h2",{className:"text-sm font-semibold text-herd-fg",children:["Recent Jobs",g.jsxs("span",{className:"text-herd-muted font-normal ml-1.5",children:["(",t.length,")"]})]})}),c.length===0?g.jsx("p",{className:"text-xs text-herd-muted py-4",children:"No recent jobs"}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-xs text-herd-muted font-medium uppercase tracking-wide",children:[g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Prompt"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Time"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:c.map(d=>g.jsxs("tr",{className:"hover:bg-herd-hover transition-colors",children:[g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(d.agentName)}`,className:"hover:text-herd-primary transition-colors",children:d.agentName})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted font-mono text-xs max-w-[200px]",children:g.jsx("span",{className:"block truncate",children:db(d.prompt,50)})}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:d.status,size:"sm"})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs whitespace-nowrap",children:hb(d.createdAt)})]},d.jobId))})]})}),s>1&&g.jsxs("div",{className:"flex items-center justify-between pt-3 mt-3 border-t border-herd-border",children:[g.jsxs("span",{className:"text-[11px] text-herd-muted",children:[o+1,"–",Math.min(o+l,t.length)," of ",t.length]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{onClick:()=>i(d=>Math.max(0,d-1)),disabled:r===0,className:"p-1 rounded hover:bg-herd-hover text-herd-muted hover:text-herd-fg transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Previous page",children:g.jsx(a3,{className:"w-4 h-4"})}),g.jsxs("span",{className:"text-[11px] text-herd-muted px-1",children:[r+1," / ",s]}),g.jsx("button",{onClick:()=>i(d=>Math.min(s-1,d+1)),disabled:r>=s-1,className:"p-1 rounded hover:bg-herd-hover text-herd-muted hover:text-herd-fg transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Next page",children:g.jsx(i1,{className:"w-4 h-4"})})]})]})]})]})}function pb(t){if(t===null||t<0)return"--";const l=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),s=Math.floor(t%60);return l>0?`${l}d ${r}h ${i}m`:r>0?`${r}h ${i}m ${s}s`:i>0?`${i}m ${s}s`:`${s}s`}function rf({label:t,value:l,variant:r="default"}){const i={default:"text-herd-fg",success:"text-herd-status-running",muted:"text-herd-muted"};return g.jsxs("div",{className:"bg-herd-hover rounded-lg px-3 py-1.5 flex items-center gap-1.5",children:[g.jsx("span",{className:`text-sm font-medium ${i[r]}`,children:l}),g.jsx("span",{className:"text-xs text-herd-muted",children:t})]})}function gb(){return g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(t=>g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-herd-hover opacity-50 animate-pulse"}),g.jsx("div",{className:"h-4 w-24 bg-herd-hover opacity-50 animate-pulse rounded"})]}),g.jsx("div",{className:"h-3 w-32 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-20 bg-herd-hover opacity-50 animate-pulse rounded"})]})},t))})}function yb(){return g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"h-5 w-36 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-24 bg-herd-hover opacity-50 animate-pulse rounded"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"h-8 w-20 bg-herd-hover opacity-50 animate-pulse rounded-lg"}),g.jsx("div",{className:"h-8 w-20 bg-herd-hover opacity-50 animate-pulse rounded-lg"})]})]})})}function xb(){return g.jsxs(xt,{className:"p-4",children:[g.jsx("div",{className:"h-4 w-24 bg-herd-hover opacity-50 animate-pulse rounded mb-4"}),g.jsx("div",{className:"space-y-3",children:[1,2,3].map(t=>g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("div",{className:"h-3 w-20 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-40 bg-herd-hover opacity-50 animate-pulse rounded flex-1"}),g.jsx("div",{className:"h-3 w-16 bg-herd-hover opacity-50 animate-pulse rounded"})]},t))})]})}function bb(){return g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-6 text-center",children:[g.jsx(e7,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No agents configured"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Add agents to your herdctl.yaml to get started"})]})]})})}function vb(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[g.jsx(ws,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No jobs yet"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Jobs will appear here when agents run"})]})]})}const Sb=24;function wb(){const{fleetStatus:t,agents:l,recentJobs:r,lastUpdated:i}=ys(),{setRecentJobs:s}=f6(),{loading:o}=Lp();E.useEffect(()=>{Tp({limit:100}).then(x=>{s(x.jobs)}).catch(()=>{})},[s]);const c=Date.now()-Sb*60*60*1e3,d=r.filter(x=>new Date(x.createdAt).getTime()>=c),m=(t==null?void 0:t.counts)??{totalAgents:0,runningJobs:0},p=r.filter(x=>x.status==="completed").length;return o&&!t?g.jsxs("div",{className:"p-4 space-y-6 overflow-auto h-full",children:[g.jsx(yb,{}),g.jsxs("section",{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Agents"}),g.jsx(gb,{})]}),g.jsx("section",{children:g.jsx(xb,{})})]}):g.jsxs("div",{className:"p-4 space-y-6 overflow-auto h-full",children:[g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:"Fleet Overview"}),g.jsx(rb,{timestamp:i,prefix:"Updated"})]}),t&&g.jsxs("p",{className:"text-xs text-herd-muted mt-0.5",children:["Uptime: ",pb(t.uptimeSeconds)]})]}),t&&g.jsx(sr,{status:t.state==="running"?"running":t.state==="error"?"error":"idle",size:"md"})]}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx(rf,{label:"agents",value:m.totalAgents,variant:"default"}),g.jsx(rf,{label:"running",value:m.runningJobs,variant:m.runningJobs>0?"success":"muted"}),g.jsx(rf,{label:"completed",value:p,variant:"muted"})]})]})}),g.jsxs("section",{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Agents"}),l.length===0?g.jsx(bb,{}):g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(x=>g.jsx(fb,{agent:x},x.qualifiedName))})]}),g.jsx("section",{children:g.jsx(xt,{className:"p-4",children:d.length===0?g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Recent Jobs"}),g.jsx(vb,{})]}):g.jsx(mb,{jobs:d,pageSize:10})})})]})}function kb(t){const[l,r]=E.useState(!0),[i,s]=E.useState(null),[o,c]=E.useState(0),d=c6(t),m=Ne(x=>x.updateAgent);E.useEffect(()=>{if(!t){r(!1),s(null);return}let x=!1;async function y(){r(!0),s(null);try{const v=await Yx(t);if(x)return;m({agent:v}),r(!1)}catch(v){if(x)return;const S=v instanceof Error?v.message:"Failed to fetch agent";s(S),r(!1)}}return y(),()=>{x=!0}},[t,o]);const p=E.useCallback(()=>{c(x=>x+1)},[]);return{agent:d,loading:l,error:i,retry:p}}function Cb({agent:t}){const l=encodeURIComponent(t.qualifiedName);return g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("img",{src:d3(t.name),alt:"",className:"w-14 h-14 rounded-full shrink-0 sm:w-16 sm:h-16"}),g.jsxs("div",{className:"flex flex-col gap-3 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[t.fleetPath.length>0&&g.jsx("p",{className:"text-[11px] text-herd-muted font-medium uppercase tracking-wide mb-0.5",children:t.fleetPath.join(" / ")}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:t.name}),g.jsx(sr,{status:t.status,size:"md"})]}),t.description&&g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:t.description})]}),g.jsxs("div",{className:"hidden sm:flex gap-2 shrink-0",children:[g.jsxs("button",{disabled:!0,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Job (coming soon)",children:[g.jsx(wi,{className:"w-3.5 h-3.5"}),"Trigger Job"]}),g.jsxs(yt,{to:`/agents/${l}/chat`,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(Si,{className:"w-3.5 h-3.5"}),"Chat"]})]})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs text-herd-muted",children:[t.model&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(b8,{className:"w-3.5 h-3.5"}),g.jsx("span",{className:"font-mono",children:t.model})]}),t.permission_mode&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(n7,{className:"w-3.5 h-3.5"}),g.jsx("span",{children:t.permission_mode})]}),t.working_directory&&g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 max-w-[300px]",title:t.working_directory,children:[g.jsx(E8,{className:"w-3.5 h-3.5 shrink-0"}),g.jsx("span",{className:"font-mono truncate",children:t.working_directory})]})]}),g.jsxs("div",{className:"flex sm:hidden gap-2",children:[g.jsxs("button",{disabled:!0,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Job (coming soon)",children:[g.jsx(wi,{className:"w-3.5 h-3.5"}),"Trigger Job"]}),g.jsxs(yt,{to:`/agents/${l}/chat`,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(Si,{className:"w-3.5 h-3.5"}),"Chat"]})]})]})]})}function Eb({agentName:t,jobId:l}){const r=E.useRef(null),i=d6(l),s=Ne(o=>o.setActiveJobView);return E.useEffect(()=>{const o=window.__herdWsClient;return t&&o&&(r.current&&r.current!==t&&o.unsubscribe(r.current),o.subscribe(t),r.current=t),()=>{r.current&&o&&(o.unsubscribe(r.current),r.current=null)}},[t]),E.useEffect(()=>(l&&s(l,!0),()=>{l&&s(l,!1)}),[l]),{messages:i,isSubscribed:r.current===t&&t!==null}}function Mb({message:t}){const l=t.stream==="stderr";return g.jsx("div",{className:`
|
|
309
|
+
`,children:[c.icon,g.jsx("span",{children:c.message})]})}class _l extends E.Component{constructor(r){super(r);k0(this,"handleReset",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,i){console.error("[ErrorBoundary] Caught error:",r,i)}render(){return this.state.hasError?this.props.fallback?this.props.fallback:g.jsx("div",{className:"flex items-center justify-center p-6",children:g.jsxs("div",{className:"bg-herd-card border border-herd-border rounded-[10px] p-6 max-w-md w-full text-center",children:[g.jsx(H6,{className:"w-12 h-12 text-herd-status-error mx-auto mb-3"}),g.jsx("h2",{className:"text-sm font-medium text-herd-fg mb-2",children:"Something went wrong"}),this.state.error&&g.jsx("div",{className:"bg-herd-code-bg text-herd-code-fg rounded-lg px-3 py-2 text-xs font-mono text-left mb-4 overflow-x-auto",children:this.state.error.message}),g.jsx("button",{type:"button",onClick:this.handleReset,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Try Again"})]})}):this.props.children}}function nl({size:t="md",className:l=""}){const r={sm:"w-4 h-4 border-2",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-[3px]"};return g.jsx("output",{className:`inline-block rounded-full border-herd-primary border-t-transparent animate-spin ${r[t]} ${l}`,"aria-label":"Loading"})}function F6(t){switch(t){case"running":return"bg-herd-status-running animate-pulse";case"idle":return"bg-herd-status-idle";case"error":return"bg-herd-status-error";case"completed":return"bg-herd-status-running";case"failed":return"bg-herd-status-error";case"cancelled":return"bg-herd-status-idle";case"pending":return"bg-herd-status-pending";case"disabled":return"bg-herd-status-idle"}}function Y6(t){switch(t){case"running":return"text-herd-status-running";case"idle":return"text-herd-status-idle";case"error":return"text-herd-status-error";case"completed":return"text-herd-status-running";case"failed":return"text-herd-status-error";case"cancelled":return"text-herd-status-idle";case"pending":return"text-herd-status-pending";case"disabled":return"text-herd-status-idle"}}function G6(t){return t.charAt(0).toUpperCase()+t.slice(1)}function sr({status:t,size:l="sm",className:r=""}){const i=l==="sm"?"w-1.5 h-1.5":"w-2 h-2",s=l==="sm"?"text-xs":"text-sm";return g.jsxs("span",{className:`inline-flex items-center gap-1.5 font-medium ${Y6(t)} ${r}`,children:[g.jsx("span",{className:`${i} rounded-full ${F6(t)}`}),g.jsx("span",{className:s,children:G6(t)})]})}function X6(t){if(!t)return"never";const l=Date.now(),r=new Date(t).getTime(),i=l-r;if(i<0||i<5e3)return"just now";const s=Math.floor(i/1e3),o=Math.floor(s/60),c=Math.floor(o/60),d=Math.floor(c/24);return s<60?`${s}s ago`:o<60?`${o}m ago`:c<24?`${c}h ago`:`${d}d ago`}function Q6({timestamp:t,prefix:l="Updated",refreshInterval:r=3e4,className:i=""}){const[,s]=E.useState(0);E.useEffect(()=>{const c=setInterval(()=>{s(d=>d+1)},r);return()=>clearInterval(c)},[r]);const o=X6(t);return g.jsxs("span",{className:`text-xs text-herd-muted ${i}`,children:[l," ",o]})}function K6(t){switch(t){case"interval":return Mf;case"cron":return Kf;case"webhook":return e1;case"chat":return Wf;default:return Mf}}function P6(t){return t.interval?t.interval:t.expression?t.expression:t.type}function W6(t){return t==="connected"||t==="ready"?"text-herd-status-running":t==="error"||t==="failed"?"text-herd-status-error":"text-herd-status-idle"}function Gu({title:t,children:l}){return g.jsxs(xt,{className:"p-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg mb-3",children:t}),l]})}function Xr({label:t,value:l,mono:r=!1}){const i=l??"--";return g.jsxs("div",{className:"flex justify-between items-baseline gap-4 py-1.5",children:[g.jsx("dt",{className:"text-xs text-herd-muted shrink-0",children:t}),g.jsx("dd",{className:`text-xs text-herd-fg text-right truncate ${r?"font-mono":""}`,title:typeof i=="string"?i:void 0,children:i})]})}function e8({schedule:t}){const l=K6(t.type),r=t.status==="running"?"text-herd-status-running":t.status==="disabled"?"text-herd-status-error":"text-herd-status-idle";return g.jsxs("tr",{className:"border-b border-herd-border last:border-b-0",children:[g.jsx("td",{className:"py-2 pr-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(l,{className:"w-3.5 h-3.5 text-herd-muted"}),g.jsx("span",{className:"text-xs text-herd-fg",children:t.name})]})}),g.jsx("td",{className:"py-2 px-3 text-xs text-herd-muted capitalize",children:t.type}),g.jsx("td",{className:"py-2 px-3 text-xs text-herd-fg font-mono",children:P6(t)}),g.jsx("td",{className:`py-2 pl-3 text-xs capitalize ${r}`,children:t.status})]})}function t8({name:t,connector:l}){const r=l.connectionStatus??(l.configured?"configured":"inactive");return g.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[g.jsx("span",{className:"text-xs text-herd-fg capitalize",children:t}),g.jsx("span",{className:`text-xs ${W6(r)}`,children:r})]})}function n8({agent:t}){return g.jsxs("div",{className:"space-y-4",children:[g.jsx(Gu,{title:"General",children:g.jsxs("dl",{className:"divide-y divide-herd-border",children:[g.jsx(Xr,{label:"Name",value:t.name}),g.jsx(Xr,{label:"Description",value:t.description}),g.jsx(Xr,{label:"Model",value:t.model,mono:!0}),g.jsx(Xr,{label:"Permission Mode",value:t.permission_mode}),g.jsx(Xr,{label:"Max Concurrent",value:t.maxConcurrent})]})}),g.jsx(Gu,{title:"Schedules",children:t.schedules.length===0?g.jsx("p",{className:"text-xs text-herd-muted",children:"No schedules configured"}):g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide border-b border-herd-border",children:[g.jsx("th",{className:"text-left py-2 pr-3",children:"Name"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Type"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Value"}),g.jsx("th",{className:"text-left py-2 pl-3",children:"Status"})]})}),g.jsx("tbody",{children:t.schedules.map(l=>g.jsx(e8,{schedule:l},l.name))})]})}),g.jsx(Gu,{title:"Chat Connectors",children:!t.chat||Object.keys(t.chat).length===0?g.jsx("p",{className:"text-xs text-herd-muted",children:"No chat connectors configured"}):g.jsx("div",{className:"divide-y divide-herd-border",children:Object.entries(t.chat).map(([l,r])=>g.jsx(t8,{name:l,connector:r},l))})}),t.working_directory&&g.jsx(Gu,{title:"Environment",children:g.jsx("dl",{children:g.jsx(Xr,{label:"Working Directory",value:t.working_directory,mono:!0})})})]})}let t1=typeof window<"u"?window.location.origin:"";class l8 extends Error{constructor(l,r,i,s){super(l),this.status=r,this.statusText=i,this.url=s,this.name="ApiError"}}async function n1(t){if(!t.ok){let l=`HTTP ${t.status}: ${t.statusText}`;try{const r=await t.json();r.error?l=r.error:r.message&&(l=r.message)}catch{}throw new l8(l,t.status,t.statusText,t.url)}return t.json()}async function Ll(t,l){const r=new URL(`${t1}${t}`);if(l)for(const[s,o]of Object.entries(l))o!==void 0&&r.searchParams.set(s,String(o));const i=await fetch(r.toString(),{method:"GET",headers:{Accept:"application/json"}});return n1(i)}async function ca(t,l){const r=await fetch(`${t1}${t}`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(l)});return n1(r)}async function r8(t){const l=await fetch(`${t1}${t}`,{method:"DELETE",headers:{Accept:"application/json"}});return n1(l)}async function Lp(){return Ll("/api/fleet/status")}async function Up(){return Ll("/api/agents")}async function a8(t){return Ll(`/api/agents/${encodeURIComponent(t)}`)}async function Hp(t){return Ll("/api/jobs",t)}async function i8(t){return Ll(`/api/jobs/${encodeURIComponent(t)}`)}async function u8(t){return ca(`/api/jobs/${encodeURIComponent(t)}/cancel`,{})}async function s8(t,l){return ca(`/api/jobs/${encodeURIComponent(t)}/fork`,l??{})}async function o8(){return Ll("/api/schedules")}async function Bp(t,l){return ca(`/api/agents/${encodeURIComponent(t)}/trigger`,l??{})}async function c8(t,l){return ca(`/api/schedules/${encodeURIComponent(t)}/${encodeURIComponent(l)}/enable`,{})}async function f8(t,l){return ca(`/api/schedules/${encodeURIComponent(t)}/${encodeURIComponent(l)}/disable`,{})}async function d8(t){return ca(`/api/chat/${encodeURIComponent(t)}/sessions`,{})}async function Z0(t){return Ll(`/api/chat/${encodeURIComponent(t)}/sessions`)}async function h8(t,l){return Ll(`/api/chat/${encodeURIComponent(t)}/sessions/${encodeURIComponent(l)}`)}async function m8(t,l){await r8(`/api/chat/${encodeURIComponent(t)}/sessions/${encodeURIComponent(l)}`)}const q0=t=>{let l;const r=new Set,i=(p,x)=>{const y=typeof p=="function"?p(l):p;if(!Object.is(y,l)){const v=l;l=x??(typeof y!="object"||y===null)?y:Object.assign({},l,y),r.forEach(S=>S(l,v))}},s=()=>l,d={setState:i,getState:s,getInitialState:()=>m,subscribe:p=>(r.add(p),()=>r.delete(p))},m=l=t(i,s,d);return d},p8=(t=>t?q0(t):q0),g8=t=>t;function y8(t,l=g8){const r=na.useSyncExternalStore(t.subscribe,na.useCallback(()=>l(t.getState()),[t,l]),na.useCallback(()=>l(t.getInitialState()),[t,l]));return na.useDebugValue(r),r}const x8=t=>{const l=p8(t),r=i=>y8(l,i);return Object.assign(r,l),r},b8=(t=>x8),$0=t=>Symbol.iterator in t,V0=t=>"entries"in t,I0=(t,l)=>{const r=t instanceof Map?t:new Map(t.entries()),i=l instanceof Map?l:new Map(l.entries());if(r.size!==i.size)return!1;for(const[s,o]of r)if(!i.has(s)||!Object.is(o,i.get(s)))return!1;return!0},v8=(t,l)=>{const r=t[Symbol.iterator](),i=l[Symbol.iterator]();let s=r.next(),o=i.next();for(;!s.done&&!o.done;){if(!Object.is(s.value,o.value))return!1;s=r.next(),o=i.next()}return!!s.done&&!!o.done};function S8(t,l){return Object.is(t,l)?!0:typeof t!="object"||t===null||typeof l!="object"||l===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(l)?!1:$0(t)&&$0(l)?V0(t)&&V0(l)?I0(t,l):v8(t,l):I0({entries:()=>Object.entries(t)},{entries:()=>Object.entries(l)})}function Vt(t){const l=na.useRef(void 0);return r=>{const i=t(r);return S8(l.current,i)?l.current:l.current=i}}const J0=5,F0={chatSessions:[],chatSessionsLoading:!1,chatMessages:[],chatMessagesLoading:!1,activeChatSessionId:null,chatStreaming:!1,chatStreamingContent:"",chatError:null,sidebarSessions:{},sidebarSessionsLoading:!1},w8=(t,l)=>({...F0,fetchChatSessions:async r=>{t({chatSessionsLoading:!0,chatError:null});try{const i=await Z0(r);t({chatSessions:i.sessions,chatSessionsLoading:!1})}catch(i){const s=i instanceof Error?i.message:"Failed to fetch chat sessions";t({chatSessionsLoading:!1,chatError:s})}},fetchChatMessages:async(r,i)=>{t({chatMessagesLoading:!0,chatError:null});try{const s=await h8(r,i);t({chatMessages:s.messages,chatMessagesLoading:!1,activeChatSessionId:i})}catch(s){const o=s instanceof Error?s.message:"Failed to fetch chat messages";t({chatMessagesLoading:!1,chatError:o})}},createChatSession:async r=>{t({chatError:null});try{const i=await d8(r),s={sessionId:i.sessionId,createdAt:i.createdAt,lastMessageAt:i.createdAt,messageCount:0,preview:""};return t(o=>{const c=[s,...o.chatSessions],d=o.sidebarSessions[r]??[],m=[s,...d].slice(0,J0);return{chatSessions:c,activeChatSessionId:i.sessionId,chatMessages:[],sidebarSessions:{...o.sidebarSessions,[r]:m}}}),i.sessionId}catch(i){const s=i instanceof Error?i.message:"Failed to create chat session";return t({chatError:s}),null}},deleteChatSession:async(r,i)=>{t({chatError:null});try{await m8(r,i);const{activeChatSessionId:s}=l();t(o=>{const c=o.sidebarSessions[r],d=c?{...o.sidebarSessions,[r]:c.filter(m=>m.sessionId!==i)}:o.sidebarSessions;return{chatSessions:o.chatSessions.filter(m=>m.sessionId!==i),activeChatSessionId:s===i?null:s,chatMessages:s===i?[]:o.chatMessages,sidebarSessions:d}})}catch(s){const o=s instanceof Error?s.message:"Failed to delete chat session";t({chatError:o})}},setActiveChatSession:r=>{t({activeChatSessionId:r,chatMessages:r===null?[]:l().chatMessages,chatStreaming:!1,chatStreamingContent:""})},appendStreamingChunk:r=>{t(i=>({chatStreaming:!0,chatStreamingContent:i.chatStreamingContent+r}))},completeStreaming:()=>{const{chatStreamingContent:r}=l();if(r){const i={role:"assistant",content:r,timestamp:new Date().toISOString()};t(s=>({chatMessages:[...s.chatMessages,i],chatStreaming:!1,chatStreamingContent:""}))}else t({chatStreaming:!1,chatStreamingContent:""})},addUserMessage:r=>{const i={role:"user",content:r,timestamp:new Date().toISOString()};t(s=>({chatMessages:[...s.chatMessages,i],chatStreaming:!0,chatStreamingContent:""}))},addToolCallMessage:r=>{const{chatStreamingContent:i}=l(),s=[];i&&s.push({role:"assistant",content:i,timestamp:new Date().toISOString()}),s.push({role:"tool",content:r.output,timestamp:new Date().toISOString(),toolCall:r}),t(o=>({chatMessages:[...o.chatMessages,...s],chatStreamingContent:""}))},setChatError:r=>{t({chatError:r,chatStreaming:!1,chatStreamingContent:""})},fetchSidebarSessions:async r=>{t({sidebarSessionsLoading:!0});try{const i=await Promise.all(r.map(o=>Z0(o).then(c=>({name:o,sessions:c.sessions.slice(0,J0)})).catch(()=>({name:o,sessions:[]})))),s={};for(const{name:o,sessions:c}of i)s[o]=c;t({sidebarSessions:s,sidebarSessionsLoading:!1})}catch{t({sidebarSessionsLoading:!1})}},clearActiveChatState:()=>{t({chatSessions:[],chatSessionsLoading:!1,chatMessages:[],chatMessagesLoading:!1,activeChatSessionId:null,chatStreaming:!1,chatStreamingContent:"",chatError:null})},clearChatState:()=>{t(F0)}});function k8(t){return"agent"in t}const Y0=50,C8={fleetStatus:null,agents:[],recentJobs:[],connectionStatus:"disconnected",lastUpdated:null},E8=t=>({...C8,setFleetStatus:l=>t({fleetStatus:l,lastUpdated:new Date().toISOString()}),setAgents:l=>t({agents:l,lastUpdated:new Date().toISOString()}),setRecentJobs:l=>t(r=>{const i=new Map;for(const o of l)i.set(o.jobId,o);for(const o of r.recentJobs)i.set(o.jobId,o);const s=Array.from(i.values());return s.sort((o,c)=>new Date(c.createdAt).getTime()-new Date(o.createdAt).getTime()),{recentJobs:s.slice(0,Y0),lastUpdated:new Date().toISOString()}}),updateAgent:l=>t(r=>{if(k8(l)){const i=r.agents.findIndex(s=>s.qualifiedName===l.agent.qualifiedName);if(i>=0){const s=[...r.agents];return s[i]=l.agent,{agents:s,lastUpdated:new Date().toISOString()}}else return{agents:[...r.agents,l.agent],lastUpdated:new Date().toISOString()}}else{const i=r.agents.findIndex(s=>s.qualifiedName===l.agentName);if(i>=0){const s=[...r.agents];return s[i]={...s[i],status:"idle",currentJobId:null},{agents:s,lastUpdated:new Date().toISOString()}}return r}}),addJob:l=>t(r=>({recentJobs:[{jobId:l.jobId,agentName:l.agentName,prompt:l.prompt,status:"running",createdAt:new Date().toISOString(),startedAt:new Date().toISOString()},...r.recentJobs].slice(0,Y0),lastUpdated:new Date().toISOString()})),completeJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"completed",exitCode:l.exitCode,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),failJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"failed",error:l.error,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),cancelJob:l=>t(r=>{const i=r.recentJobs.findIndex(s=>s.jobId===l.jobId);if(i>=0){const s=[...r.recentJobs];return s[i]={...s[i],status:"cancelled",error:l.reason,completedAt:new Date().toISOString()},{recentJobs:s,lastUpdated:new Date().toISOString()}}return r}),setConnectionStatus:l=>t({connectionStatus:l,lastUpdated:new Date().toISOString()})}),M8=20,G0={jobs:[],totalJobs:0,jobsLoading:!1,jobsError:null,jobsFilter:{},jobsOffset:0,jobsLimit:M8,selectedJobId:null,selectedJob:null,selectedJobLoading:!1},N8=(t,l)=>({...G0,fetchJobs:async()=>{const{jobsFilter:r,jobsOffset:i,jobsLimit:s}=l();t({jobsLoading:!0,jobsError:null});try{const o=await Hp({limit:s,offset:i,agentName:r.agentName,status:r.status});t({jobs:o.jobs,totalJobs:o.total,jobsLoading:!1})}catch(o){const c=o instanceof Error?o.message:"Failed to fetch jobs";t({jobsLoading:!1,jobsError:c})}},fetchJobDetail:async r=>{t({selectedJobLoading:!0});try{const i=await i8(r);t({selectedJob:i,selectedJobId:r,selectedJobLoading:!1})}catch{t({selectedJob:null,selectedJobId:r,selectedJobLoading:!1})}},setJobsFilter:r=>{const i=l().jobsFilter;t({jobsFilter:{...i,...r},jobsOffset:0})},setJobsOffset:r=>{t({jobsOffset:r})},selectJob:r=>{r===null?t({selectedJobId:null,selectedJob:null,selectedJobLoading:!1}):(t({selectedJobId:r}),l().fetchJobDetail(r).catch(()=>{}))},clearJobsState:()=>{t(G0)}}),X0=1e3,j8={outputsByJob:{},activeJobViews:new Set,_messageCounter:0},A8=t=>({...j8,appendOutput:(l,r,i,s)=>t(o=>{const c=o._messageCounter+1,d={id:`msg-${c}`,jobId:l,agentName:r,data:i,stream:s,timestamp:Date.now()};let p=[...o.outputsByJob[l]??[],d];return p.length>X0&&(p=p.slice(p.length-X0)),{outputsByJob:{...o.outputsByJob,[l]:p},_messageCounter:c}}),clearJobOutput:l=>t(r=>{const{[l]:i,...s}=r.outputsByJob;return{outputsByJob:s}}),setActiveJobView:(l,r)=>t(i=>{const s=new Set(i.activeJobViews);return r?s.add(l):s.delete(l),{activeJobViews:s}}),clearAllOutput:()=>t({outputsByJob:{},activeJobViews:new Set,_messageCounter:0})}),Q0={schedules:[],schedulesLoading:!1,schedulesError:null},z8=(t,l)=>({...Q0,fetchSchedules:async()=>{t({schedulesLoading:!0,schedulesError:null});try{const r=await o8();t({schedules:r,schedulesLoading:!1})}catch(r){const i=r instanceof Error?r.message:"Failed to fetch schedules";t({schedulesLoading:!1,schedulesError:i})}},triggerSchedule:async(r,i)=>{t({schedulesError:null});try{await Bp(r,{scheduleName:i}),await l().fetchSchedules()}catch(s){const o=s instanceof Error?s.message:"Failed to trigger schedule";t({schedulesError:o})}},enableSchedule:async(r,i)=>{t({schedulesError:null});try{const s=await c8(r,i);t(o=>({schedules:o.schedules.map(c=>c.agentName===r&&c.name===i?s:c)}))}catch(s){const o=s instanceof Error?s.message:"Failed to enable schedule";t({schedulesError:o})}},disableSchedule:async(r,i)=>{t({schedulesError:null});try{const s=await f8(r,i);t(o=>({schedules:o.schedules.map(c=>c.agentName===r&&c.name===i?s:c)}))}catch(s){const o=s instanceof Error?s.message:"Failed to disable schedule";t({schedulesError:o})}},updateScheduleFromWS:()=>{l().fetchSchedules().catch(()=>{})},clearSchedulesState:()=>{t(Q0)}});let K0=0;function T8(){return K0+=1,`toast-${K0}-${Date.now()}`}const _8={toasts:[]},R8=t=>({..._8,addToast:l=>{const r=T8(),i=l.duration??3e3;t(s=>({toasts:[...s.toasts,{...l,id:r,duration:i}]})),i>0&&setTimeout(()=>{t(s=>({toasts:s.toasts.filter(o=>o.id!==r)}))},i)},removeToast:l=>t(r=>({toasts:r.toasts.filter(i=>i.id!==l)}))}),Zp="herd-theme";function us(){if(typeof window>"u")return"system";const t=localStorage.getItem(Zp);return t==="light"||t==="dark"||t==="system"?t:"system"}function D8(t){const l=t??us();return l==="system"?typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":l}function qp(t){if(typeof window>"u")return;const l=D8(t);document.documentElement.classList.toggle("dark",l==="dark")}function O8(t){typeof window>"u"||(localStorage.setItem(Zp,t),qp(t))}function L8(){const t=us();qp(t);const l=window.matchMedia("(prefers-color-scheme: dark)");function r(i){us()==="system"&&document.documentElement.classList.toggle("dark",i.matches)}return l.addEventListener("change",r),()=>{l.removeEventListener("change",r)}}const U8={sidebarCollapsed:!1,sidebarMobileOpen:!1,selectedAgent:null,activeView:"dashboard",theme:us(),rightPanelOpen:!1},H8=t=>({...U8,toggleSidebar:()=>t(l=>({sidebarCollapsed:!l.sidebarCollapsed})),setSidebarCollapsed:l=>t({sidebarCollapsed:l}),toggleSidebarMobile:()=>t(l=>({sidebarMobileOpen:!l.sidebarMobileOpen})),setSidebarMobileOpen:l=>t({sidebarMobileOpen:l}),selectAgent:l=>t({selectedAgent:l,rightPanelOpen:l!==null}),setActiveView:l=>t({activeView:l}),setTheme:l=>(O8(l),t({theme:l})),toggleRightPanel:()=>t(l=>({rightPanelOpen:!l.rightPanelOpen})),setRightPanelOpen:l=>t({rightPanelOpen:l})}),Ne=b8()((...t)=>({...E8(...t),...H8(...t),...A8(...t),...N8(...t),...w8(...t),...z8(...t),...R8(...t)}));function bs(){return Ne(Vt(t=>({fleetStatus:t.fleetStatus,agents:t.agents,recentJobs:t.recentJobs,connectionStatus:t.connectionStatus,lastUpdated:t.lastUpdated})))}function B8(t){return Ne(l=>t?l.agents.find(r=>r.qualifiedName===t)??null:null)}function $p(){return Ne(Vt(t=>({sidebarCollapsed:t.sidebarCollapsed,sidebarMobileOpen:t.sidebarMobileOpen,selectedAgent:t.selectedAgent,activeView:t.activeView,theme:t.theme,rightPanelOpen:t.rightPanelOpen})))}function Vp(){return Ne(Vt(t=>({toggleSidebar:t.toggleSidebar,setSidebarCollapsed:t.setSidebarCollapsed,toggleSidebarMobile:t.toggleSidebarMobile,setSidebarMobileOpen:t.setSidebarMobileOpen,selectAgent:t.selectAgent,setActiveView:t.setActiveView,setTheme:t.setTheme,toggleRightPanel:t.toggleRightPanel,setRightPanelOpen:t.setRightPanelOpen})))}function Z8(){return Ne(Vt(t=>({setFleetStatus:t.setFleetStatus,setAgents:t.setAgents,updateAgent:t.updateAgent,setRecentJobs:t.setRecentJobs,addJob:t.addJob,completeJob:t.completeJob,failJob:t.failJob,cancelJob:t.cancelJob,setConnectionStatus:t.setConnectionStatus})))}const P0=[];function q8(t){return Ne(l=>t?l.outputsByJob[t]??P0:P0)}function $8(){return Ne(Vt(t=>({jobs:t.jobs,totalJobs:t.totalJobs,jobsLoading:t.jobsLoading,jobsError:t.jobsError,jobsFilter:t.jobsFilter,jobsOffset:t.jobsOffset,jobsLimit:t.jobsLimit})))}function Ip(){return Ne(Vt(t=>({fetchJobs:t.fetchJobs,fetchJobDetail:t.fetchJobDetail,setJobsFilter:t.setJobsFilter,setJobsOffset:t.setJobsOffset,selectJob:t.selectJob,clearJobsState:t.clearJobsState})))}function V8(){return Ne(Vt(t=>({selectedJobId:t.selectedJobId,selectedJob:t.selectedJob,selectedJobLoading:t.selectedJobLoading})))}function I8(){return Ne(Vt(t=>({chatSessions:t.chatSessions,chatSessionsLoading:t.chatSessionsLoading,chatError:t.chatError})))}function l1(){return Ne(Vt(t=>({chatMessages:t.chatMessages,chatMessagesLoading:t.chatMessagesLoading,activeChatSessionId:t.activeChatSessionId,chatStreaming:t.chatStreaming,chatStreamingContent:t.chatStreamingContent,chatError:t.chatError})))}function r1(){return Ne(Vt(t=>({fetchChatSessions:t.fetchChatSessions,fetchChatMessages:t.fetchChatMessages,createChatSession:t.createChatSession,deleteChatSession:t.deleteChatSession,setActiveChatSession:t.setActiveChatSession,appendStreamingChunk:t.appendStreamingChunk,completeStreaming:t.completeStreaming,addUserMessage:t.addUserMessage,setChatError:t.setChatError,fetchSidebarSessions:t.fetchSidebarSessions,clearActiveChatState:t.clearActiveChatState,clearChatState:t.clearChatState})))}function J8(){return Ne(Vt(t=>({sidebarSessions:t.sidebarSessions,sidebarSessionsLoading:t.sidebarSessionsLoading})))}function F8(){return Ne(Vt(t=>({schedules:t.schedules,schedulesLoading:t.schedulesLoading,schedulesError:t.schedulesError})))}function Y8(){return Ne(Vt(t=>({fetchSchedules:t.fetchSchedules,triggerSchedule:t.triggerSchedule,enableSchedule:t.enableSchedule,disableSchedule:t.disableSchedule,updateScheduleFromWS:t.updateScheduleFromWS,clearSchedulesState:t.clearSchedulesState})))}function G8(){return Ne(t=>t.toasts)}function X8(){return Ne(Vt(t=>({addToast:t.addToast,removeToast:t.removeToast})))}function Q8(t){const[l,r]=E.useState(!0),[i,s]=E.useState(null),[o,c]=E.useState(0),d=B8(t),m=Ne(x=>x.updateAgent);E.useEffect(()=>{if(!t){r(!1),s(null);return}let x=!1;async function y(){r(!0),s(null);try{const v=await a8(t);if(x)return;m({agent:v}),r(!1)}catch(v){if(x)return;const S=v instanceof Error?v.message:"Failed to fetch agent";s(S),r(!1)}}return y(),()=>{x=!0}},[t,m]);const p=E.useCallback(()=>{c(x=>x+1)},[]);return{agent:d,loading:l,error:i,retry:p}}function Ke(t){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function K8(t){var l,r,i,s,o,c,d;const m=(l=t.meta)===null||l===void 0?void 0:l.title,p=(r=t.meta)===null||r===void 0?void 0:r.creator,x=(i=t.meta)===null||i===void 0?void 0:i.source,y=(o=(s=t.meta)===null||s===void 0?void 0:s.license)===null||o===void 0?void 0:o.url,v=P8(t);return!m&&!p&&!x&&!y&&!v?"":'<metadata xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"><rdf:RDF><rdf:Description>'+(m?`<dc:title>${Ke(m)}</dc:title>`:"")+(p?`<dc:creator>${Ke(p)}</dc:creator>`:"")+(x?`<dc:source xsi:type="dcterms:URI">${Ke((d=(c=t.meta)===null||c===void 0?void 0:c.source)!==null&&d!==void 0?d:"")}</dc:source>`:"")+(y?`<dcterms:license xsi:type="dcterms:URI">${Ke(y)}</dcterms:license>`:"")+(v?`<dc:rights>${Ke(v)}</dc:rights>`:"")+"</rdf:Description></rdf:RDF></metadata>"}function P8(t){var l,r,i,s,o,c,d,m,p,x,y,v,S,C,T;let z=!((l=t.meta)===null||l===void 0)&&l.title?`„${(r=t.meta)===null||r===void 0?void 0:r.title}”`:"Design",M=`„${(s=(i=t.meta)===null||i===void 0?void 0:i.creator)!==null&&s!==void 0?s:"Unknown"}”`;!((o=t.meta)===null||o===void 0)&&o.source&&(z+=` (${t.meta.source})`);let U="";return((d=(c=t.meta)===null||c===void 0?void 0:c.license)===null||d===void 0?void 0:d.name)!=="MIT"&&((m=t.meta)===null||m===void 0?void 0:m.creator)!=="DiceBear"&&(!((p=t.meta)===null||p===void 0)&&p.title)&&(U+="Remix of "),U+=`${z} by ${M}`,!((y=(x=t.meta)===null||x===void 0?void 0:x.license)===null||y===void 0)&&y.name&&(U+=`, licensed under „${(S=(v=t.meta)===null||v===void 0?void 0:v.license)===null||S===void 0?void 0:S.name}”`,!((T=(C=t.meta)===null||C===void 0?void 0:C.license)===null||T===void 0)&&T.url&&(U+=` (${t.meta.license.url})`)),U}const W0=-2147483648,W8=2147483647;function Jp(t){return t^=t<<13,t^=t>>17,t^=t<<5,t}function e7(t){let l=0;for(let r=0;r<t.length;r++)l=(l<<5)-l+t.charCodeAt(r)|0,l=Jp(l);return l}function ss(t=""){t=t.toString();let l=e7(t)||1;const r=()=>l=Jp(l),i=(s,o)=>Math.floor((r()-W0)/(W8-W0)*(o+1-s)+s);return{seed:t,next:r,bool(s=50){return i(1,100)<=s},integer(s,o){return i(s,o)},pick(s,o){var c;return s.length===0?(r(),o):(c=s[i(0,s.length-1)])!==null&&c!==void 0?c:o},shuffle(s){const o=ss(r().toString()),c=[...s];for(let d=c.length-1;d>0;d--){const m=o.integer(0,d);[c[d],c[m]]=[c[m],c[d]]}return c},string(s,o="abcdefghijklmnopqrstuvwxyz1234567890"){const c=ss(r().toString());let d="";for(let m=0;m<s;m++)d+=o[c.integer(0,o.length-1)];return d}}}function fa(t){let l=t.attributes.viewBox.split(" "),r=parseInt(l[0]),i=parseInt(l[1]),s=parseInt(l[2]),o=parseInt(l[3]);return{x:r,y:i,width:s,height:o}}function t7(t,l,r,i,s){let{width:o,height:c,x:d,y:m}=fa(t);const p=`<rect fill="${l}" width="${o}" height="${c}" x="${d}" y="${m}" />`;switch(i){case"solid":return p+t.body;case"gradientLinear":return`<rect fill="url(#backgroundLinear)" width="${o}" height="${c}" x="${d}" y="${m}" /><defs><linearGradient id="backgroundLinear" gradientTransform="rotate(${s} 0.5 0.5)"><stop stop-color="${l}"/><stop offset="1" stop-color="${r}"/></linearGradient></defs>`+t.body}}function n7(t,l){let{width:r,height:i,x:s,y:o}=fa(t),c=l?(l-100)/100:0,d=(r/2+s)*c*-1,m=(i/2+o)*c*-1;return`<g transform="translate(${d} ${m}) scale(${l/100})">${t.body}</g>`}function l7(t,l,r){let i=fa(t),s=(i.width+i.x*2)*((l??0)/100),o=(i.height+i.y*2)*((r??0)/100);return`<g transform="translate(${s} ${o})">${t.body}</g>`}function r7(t,l){let{width:r,height:i,x:s,y:o}=fa(t);return`<g transform="rotate(${l}, ${r/2+s}, ${i/2+o})">${t.body}</g>`}function a7(t){let{width:l,x:r}=fa(t);return`<g transform="scale(-1 1) translate(${l*-1-r*2} 0)">${t.body}</g>`}function i7(t,l){let{width:r,height:i,x:s,y:o}=fa(t),c=l?r*l/100:0,d=l?i*l/100:0;return`<mask id="viewboxMask"><rect width="${r}" height="${i}" rx="${c}" ry="${d}" x="${s}" y="${o}" fill="#fff" /></mask><g mask="url(#viewboxMask)">${t.body}</g>`}function u7(t){const l={xmlns:"http://www.w3.org/2000/svg",...t.attributes};return Object.keys(l).map(r=>`${Ke(r)}="${Ke(l[r])}"`).join(" ")}function s7(t){const l=ss(Math.random().toString()),r={};return t.body.replace(/(id="|url\(#)([a-z0-9-_]+)([")])/gi,(i,s,o,c)=>(r[o]=r[o]||l.string(8),`${s}${r[o]}${c}`))}const o7={properties:{seed:{type:"string"},flip:{type:"boolean",default:!1},rotate:{type:"integer",minimum:0,maximum:360,default:0},scale:{type:"integer",minimum:0,maximum:200,default:100},radius:{type:"integer",minimum:0,maximum:50,default:0},size:{type:"integer",minimum:1},backgroundColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"}},backgroundType:{type:"array",items:{type:"string",enum:["solid","gradientLinear"]},default:["solid"]},backgroundRotation:{type:"array",items:{type:"integer",minimum:-360,maximum:360},default:[0,360]},translateX:{type:"integer",minimum:-100,maximum:100,default:0},translateY:{type:"integer",minimum:-100,maximum:100,default:0},clip:{type:"boolean",default:!0},randomizeIds:{type:"boolean",default:!1}}};function em(t){var l;let r={},i=(l=t.properties)!==null&&l!==void 0?l:{};return Object.keys(i).forEach(s=>{let o=i[s];typeof o=="object"&&o.default!==void 0&&(Array.isArray(o.default)?r[s]=[...o.default]:typeof o.default=="object"?r[s]={...o.default}:r[s]=o.default)}),r}function c7(t,l){var r;let i={...em(o7),...em((r=t.schema)!==null&&r!==void 0?r:{}),...l};return JSON.parse(JSON.stringify(i))}function tm(t){return t==="transparent"?t:`#${t}`}function f7(t,l,r){var i;let s=t.shuffle(l);s.length<=1||l.length==2&&r=="gradientLinear"?(s=l,t.next()):s=t.shuffle(l),s.length===0&&(s=["transparent"]);const o=s[0],c=(i=s[1])!==null&&i!==void 0?i:s[0];return{primary:tm(o),secondary:tm(c)}}function d7(t,l={}){var r,i,s,o,c;l=c7(t,l);const d=ss(l.seed),m=t.create({prng:d,options:l}),p=d.pick((r=l.backgroundType)!==null&&r!==void 0?r:[],"solid"),{primary:x,secondary:y}=f7(d,(i=l.backgroundColor)!==null&&i!==void 0?i:[],p),v=d.integer(!((s=l.backgroundRotation)===null||s===void 0)&&s.length?Math.min(...l.backgroundRotation):0,!((o=l.backgroundRotation)===null||o===void 0)&&o.length?Math.max(...l.backgroundRotation):0);l.size&&(m.attributes.width=l.size.toString(),m.attributes.height=l.size.toString()),l.scale!==void 0&&l.scale!==100&&(m.body=n7(m,l.scale)),l.flip&&(m.body=a7(m)),l.rotate&&(m.body=r7(m,l.rotate)),(l.translateX||l.translateY)&&(m.body=l7(m,l.translateX,l.translateY)),x!=="transparent"&&y!=="transparent"&&(m.body=t7(m,x,y,p,v)),(l.radius||l.clip)&&(m.body=i7(m,(c=l.radius)!==null&&c!==void 0?c:0)),l.randomizeIds&&(m.body=s7(m));const S=u7(m),C=K8(t),T=`<svg ${S}>${C}${m.body}</svg>`;return{toString:()=>T,toJson:()=>{var z;return{svg:T,extra:{primaryBackgroundColor:x,secondaryBackgroundColor:y,backgroundType:p,backgroundRotation:v,...(z=m.extra)===null||z===void 0?void 0:z.call(m)}}},toDataUri:()=>`data:image/svg+xml;utf8,${encodeURIComponent(T)}`}}const h7={antenna01:(t,l)=>`<mask id="sidesAntenna01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="11" width="156" height="51"><g fill="#fff"><rect x="6" y="31" width="36" height="14" rx="4"/><rect x="18" y="14" width="36" height="48" rx="4"/><rect x="126" y="28" width="36" height="24" rx="4"/><path d="M11 11h2v20h-2z"/></g></mask><g mask="url(#sidesAntenna01-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path fill="#fff" fill-opacity=".3" d="M0 0h180v76H0z"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M11 11h2v20h-2z"/><circle cx="12" cy="8" r="4" fill="#FFEA8F"/><circle cx="13" cy="7" r="2" fill="#fff"/>`,antenna02:(t,l)=>`<mask id="sidesAntenna02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="9" width="160" height="51"><g fill="#fff"><rect x="10" y="28" width="36" height="32" rx="4"/><path d="M160 9h2v20h-2z"/><rect x="134" y="28" width="36" height="32" rx="4"/></g></mask><g mask="url(#sidesAntenna02-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g><path fill="#fff" fill-opacity=".4" d="M160 8h2v20h-2z"/><circle cx="161" cy="5" r="4" fill="#E1E6E8"/><circle cx="162" cy="4" r="2" fill="#fff"/>`,cables01:(t,l)=>`<path d="M38 12c-2.95 11.7-19.9 6.67-23.37 18-3.46 11.35 8.03 20 17.53 20" stroke="#2A3544" stroke-width="6" opacity=".9"/><path d="M150 55c8.4 3.49 20.1-7.6 16-16.5-4.1-8.9-16-6.7-16-19.3" stroke="#2A3544" stroke-width="4" opacity=".9"/><mask id="sidesCables01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="21" y="6" width="138" height="58"><g fill="#fff"><rect x="21" y="35" width="16" height="22" rx="2"/><rect x="136" y="42" width="23" height="22" rx="2"/><rect x="136" y="6" width="23" height="18" rx="2"/></g></mask><g mask="url(#sidesCables01-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,cables02:(t,l)=>`<g opacity=".9" stroke="#2A3544"><ellipse cx="32.5" cy="23" rx="16.5" ry="18" stroke-width="6"/><path d="M29.51 36.76c-7.4 4.29-17 1.55-21.42-6.1" stroke-width="4"/><ellipse cx="28.5" cy="52.5" rx="16.5" ry="14.5" stroke-width="4"/></g><g opacity=".9" stroke="#2A3544"><path d="M168.6 60.42c-4.27-7.41-13.95-9.84-21.6-5.42" stroke-width="4"/><ellipse cx="148.5" cy="22.5" rx="16.5" ry="15.5" stroke-width="6"/></g><mask id="sidesCables02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="21" y="0" width="138" height="72"><g fill="#fff"><rect x="21" y="27" width="16" height="22" rx="2"/><rect x="22" y="60" width="16" height="12" rx="2"/><rect x="143" y="42" width="16" height="22" rx="2"/><rect x="143" width="16" height="22" rx="2"/></g></mask><g mask="url(#sidesCables02-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/></g>`,round:(t,l)=>`<mask id="sidesRound-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="12" y="16" width="156" height="45"><g fill="#fff"><ellipse cx="150" cy="38.5" rx="18" ry="22.5"/><ellipse cx="18" cy="22.5" rx="18" ry="22.5" transform="matrix(-1 0 0 1 48 16)"/></g></mask><g mask="url(#sidesRound-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".2" d="M20 0h140v76H20z"/></g>`,square:(t,l)=>`<mask id="sidesSquare-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="14" y="16" width="152" height="44"><g fill="#fff"><rect x="14" y="16" width="36" height="44" rx="9"/><rect x="130" y="16" width="36" height="44" rx="9"/></g></mask><g mask="url(#sidesSquare-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 38h180v38H0z"/></g>`,squareAssymetric:(t,l)=>`<mask id="sidesSquareAssymetric-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="8" width="165" height="60"><g fill="#fff"><rect x="10" y="31" width="36" height="30" rx="4"/><rect x="20" y="15" width="26" height="30" rx="4"/><rect x="139" y="23" width="36" height="30" rx="4"/><rect x="134" y="8" width="36" height="60" rx="4"/></g></mask><g mask="url(#sidesSquareAssymetric-a)"><path d="M0 0h180v76H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h180v76H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".1" d="M0 47h180v29H0z"/><circle cx="161" cy="20" r="5" fill="#fff" fill-opacity=".6"/><circle cx="161" cy="36" r="5" fill="#fff" fill-opacity=".6"/></g>`},m7={antenna:(t,l)=>`<mask id="topAntenna-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="38" y="5" width="24" height="47"><path d="M38 38c0-1.1.9-2 2-2h20a2 2 0 0 1 2 2v14H38V38ZM48 5h4v31h-4z" fill="#fff"/></mask><g mask="url(#topAntenna-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 3h100v52H0V3Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 36h24v16H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,antennaCrooked:(t,l)=>`<mask id="topAntennaCrooked-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="38" y="12" width="24" height="40"><g fill="#fff"><path d="M55.54 34.39 51 45h-3.74l4.92-10.44-6.05-10.43 3.22-11.84 2.9.8-2.9 10.62 6.2 10.68Z"/><path d="M38 39h24v13H38z"/></g></mask><g mask="url(#topAntennaCrooked-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 6h100v52H0V6Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".2" d="M38 39h24v13H38z"/></g><circle cx="50" cy="8" r="8" fill="#FFE65C"/><circle cx="53" cy="5" r="3" fill="#fff"/>`,bulb01:(t,l)=>`<mask id="topBulb01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="22" y="0" width="56" height="52"><g fill="#fff"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 16A16 16 0 0 1 48 0h4a16 16 0 0 1 16 16v16a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8V16Z"/><rect x="22" y="40" width="56" height="12" rx="1"/></g></mask><g mask="url(#topBulb01-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".4" d="M20-3h60v43H20z"/><path d="M49 3.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 26-9-9L38 19.83l10 10V40h4V29.97l10.14-10.14L59.31 17l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/></g>`,glowingBulb01:(t,l)=>'<g filter="url(#topGlowingBulb01-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M32 24A16 16 0 0 1 48 8h4a16 16 0 0 1 16 16v8a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8v-8Z" fill="#fff" fill-opacity=".3"/></g><path d="M49 11.5c4.93 0 9.37 2.13 12.44 5.52" stroke="#fff" stroke-width="2" stroke-linecap="round"/><path d="m49.83 29-9-9L38 22.83l10 10V40h4v-7.03l10.14-10.14L59.31 20l-9 9h-.48Z" fill="#fff" fill-opacity=".8"/><rect x="22" y="40" width="56" height="12" rx="1" fill="#48494B"/><defs><filter id="topGlowingBulb01-a" x="24" y="0" width="52" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_617_621"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_617_621" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_617_621"/></filter></defs>',glowingBulb02:(t,l)=>'<g filter="url(#topGlowingBulb02-a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M30 33a20 20 0 1 1 40 0v11H30V33Z" fill="#fff" fill-opacity=".3"/></g><ellipse cx="50" cy="30" rx="4" ry="6" fill="#fff" fill-opacity=".6"/><path d="M50 15.5c4.93 0 9.37 2.13 12.44 5.52m2.43 3.5c.7 1.3 1.21 2.73 1.53 4.23" stroke="#fff" stroke-width="2" stroke-linecap="round"/><rect x="20" y="36" width="60" height="16" rx="1" fill="#48494B"/><defs><filter id="topGlowingBulb02-a" x="22" y="5" width="56" height="47" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="4"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_617_633"/><feBlend in="SourceGraphic" in2="effect1_dropShadow_617_633" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset/><feGaussianBlur stdDeviation="2"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0"/><feBlend in2="shape" result="effect2_innerShadow_617_633"/></filter></defs>',horns:(t,l)=>`<mask id="topHorns-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="8" y="12" width="84" height="40"><g fill="#fff"><path d="M8 40h26v12H8z"/><path transform="matrix(-1 0 0 1 92 40)" d="M0 0h26v12H0z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M16.52 13.74c0 7.84 5.39 20.71 13.72 27.04H11.36S7.84 22.66 13.43 14.1c.9-1.38 3.1-1.42 3.1-.36ZM84 14c.66 7.04-5.77 20.62-14 27h19s3.14-18.26-2-27c-1-1.7-3.14-1.45-3 0Z"/></g></mask><g mask="url(#topHorns-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#000" fill-opacity=".4" d="M0 40h100v12H0z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.46 13h16.1v27H20.83c-7.45-7.85-5.36-27-5.36-27ZM84.82 13h7.75v27H81.82c5.75-7.8 3-27 3-27Z" fill="#fff" fill-opacity=".4"/></g>`,lights:(t,l)=>`<mask id="topLights-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="22" width="80" height="30"><g fill="#fff"><path d="M10 42c0-1.1.9-2 2-2h76a2 2 0 0 1 2 2v10H10V42Z"/><path d="M18 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H18V27ZM42 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H42V27ZM66 27a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5v25H66V27Z"/></g></mask><g mask="url(#topLights-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".6" d="M0 0h100v40H0z"/><rect x="24" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="48" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/><rect x="72" y="28" width="4" height="8" rx="2" fill="#fff" fill-opacity=".6"/></g>`,pyramid:(t,l)=>`<mask id="topPyramid-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="64" height="44"><path fill-rule="evenodd" clip-rule="evenodd" d="m50 8 32 44H18L50 8Z" fill="#fff"/></mask><g mask="url(#topPyramid-a)"><path d="M0 0h100v52H0V0Z" fill="${Ke(`${l.base}`)}"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill="#fff" fill-opacity=".8" d="M50 4h30v48H50z"/></g>`,radar:(t,l)=>'<mask id="topRadar-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="37" y="0" width="36" height="53"><g fill="#fff"><path fill-rule="evenodd" clip-rule="evenodd" d="M43.8.11A20 20 0 1 0 72.08 28.4"/><circle cx="67.13" cy="5.06" r="4" transform="rotate(45 67.13 5.06)"/><path transform="rotate(45 64.3 6.48)" d="M64.31 6.48h2v26h-2z"/><path d="M47.94 28.11h4v24h-4z"/></g></mask><g mask="url(#topRadar-a)"><path d="M0 0h100v52H0V0Z" fill="#90A4AE"/><path d="M0 0h100v52H0V0Z" fill="#fff" fill-opacity=".3"/><path fill-rule="evenodd" clip-rule="evenodd" d="M43.8.11A20 20 0 1 0 72.08 28.4" fill="#fff" fill-opacity=".2"/><circle cx="67.13" cy="7.41" r="5.66" transform="rotate(45 67.13 7.4)" fill="#fff" fill-opacity=".8"/></g>'},p7={round01:(t,l)=>{var r,i;return`<mask id="faceRound01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M66 0c58.35 0 64 40.69 64 78 0 33.31-25.47 42-64 42-37.46 0-66-8.69-66-42C0 40.69 7.65 0 66 0Z" fill="#fff"/></mask><g mask="url(#faceRound01-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},round02:(t,l)=>{var r,i;return`<mask id="faceRound02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 31v-1c.18-.48.4-1.5 1-3 .83-3.06 2.78-6.56 6-10C16.7 6.6 35.17 0 65 0s48.3 6.6 58 17c3.22 3.44 5.17 6.94 6 10 .6 1.5.82 2.52 1 3v40c0-.1-.03.5 0 1a53.93 53.93 0 0 1-1 6c-1.19 6-3.4 11.91-7 17-9.72 16.34-27.74 26-57 26s-47.28-9.66-57-26C4.4 88.91 2.2 83 1 77a53.95 53.95 0 0 1-1-6c.03-.45 0-1.32 0-1V31Z" fill="#fff"/></mask><g mask="url(#faceRound02-a)"><path d="M-4-2h138v124H-4V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square01:(t,l)=>{var r,i;return`<mask id="faceSquare01-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><rect width="130" height="120" rx="18" fill="#fff"/></mask><g mask="url(#faceSquare01-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square02:(t,l)=>{var r,i;return`<mask id="faceSquare02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path d="M0 12A12 12 0 0 1 12 0h106a12 12 0 0 1 12 12v70a38 38 0 0 1-38 38H38A38 38 0 0 1 0 82V12Z" fill="#fff"/></mask><g mask="url(#faceSquare02-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square03:(t,l)=>{var r,i;return`<mask id="faceSquare03-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 18A18 18 0 0 1 18 0h94a18 18 0 0 1 18 18v27.15a40 40 0 0 1-2.28 13.31L110.24 108a18 18 0 0 1-16.98 12H36.74a18 18 0 0 1-16.98-12L2.28 58.45A40 40 0 0 1 0 45.15V18Z" fill="#fff"/></mask><g mask="url(#faceSquare03-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`},square04:(t,l)=>{var r,i;return`<mask id="faceSquare04-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="130" height="120"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 102V68.85a40 40 0 0 1 2.28-13.31L19.76 12A18 18 0 0 1 36.74 0h56.52a18 18 0 0 1 16.98 12l17.48 43.54A40 40 0 0 1 130 68.85V102a18 18 0 0 1-18 18H18a18 18 0 0 1-18-18Z" fill="#fff"/></mask><g mask="url(#faceSquare04-a)"><path d="M-2-2h134v124H-2V-2Z" fill="${Ke(`${l.base}`)}"/><g transform="translate(-1 -1)">${(i=(r=t.texture)===null||r===void 0?void 0:r.value(t,l))!==null&&i!==void 0?i:""}</g></g>`}},g7={bite:(t,l)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#000" fill-opacity=".6"/><path fill-rule="evenodd" clip-rule="evenodd" d="m20 17 6-8H14l6 8ZM32 17l6-8H26l6 8ZM44 17l6-8H38l6 8ZM56 17l6-8H50l6 8Z" fill="#E1E6E8"/>',diagram:(t,l)=>'<rect x="4" y="4" width="68" height="24" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="8" width="60" height="16" rx="2" fill="#000" fill-opacity=".8"/><path d="M9 17h11l2-4 3 7 4-8 2 9 3-11 3 10 3-3h15l3-4 2 7 3-3h4" stroke="#4EFAC9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>',grill01:(t,l)=>'<g fill="#000" fill-opacity=".6"><rect x="12" y="12" width="4" height="8" rx="2"/><rect x="36" y="12" width="4" height="8" rx="2"/><rect x="24" y="12" width="4" height="8" rx="2"/><rect x="48" y="12" width="4" height="8" rx="2"/><rect x="60" y="12" width="4" height="8" rx="2"/></g>',grill02:(t,l)=>'<g fill="#000" fill-opacity=".6"><rect x="28" y="10" width="6" height="14" rx="2"/><rect x="14" y="10" width="6" height="14" rx="2"/><rect x="42" y="10" width="6" height="14" rx="2"/><rect x="56" y="10" width="6" height="14" rx="2"/></g>',grill03:(t,l)=>'<rect x="4" y="5" width="68" height="22" rx="5" fill="#000" fill-opacity=".2"/><rect x="8" y="9" width="60" height="14" rx="2" fill="#fff"/><path fill="#000" fill-opacity=".1" d="M18 9h4v14h-4zM42 9h4v14h-4zM30 9h4v14h-4zM54 9h4v14h-4z"/>',smile01:(t,l)=>'<path d="M27.05 8.44a2 2 0 1 1 3.9-.88C31.72 10.96 34.4 13 38 13c3.6 0 6.28-2.04 7.05-5.44a2 2 0 1 1 3.9.88C47.75 13.7 43.43 17 38 17s-9.76-3.3-10.95-8.56Z" fill="#000" fill-opacity=".6"/>',smile02:(t,l)=>'<path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#000" fill-opacity=".8"/><mask id="mouthSmile02-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="18" y="8" width="40" height="20"><path fill-rule="evenodd" clip-rule="evenodd" d="M18 10.22C18 21.78 24.47 28 38 28c13.52 0 20-6.34 20-17.78C58 9.5 57.17 8 55 8H21c-2.05 0-3 1.38-3 2.22Z" fill="#fff"/></mask><g mask="url(#mouthSmile02-a)"><rect x="30" y="2" width="16" height="14" rx="2" fill="#fff"/></g>',square01:(t,l)=>'<rect x="24" y="6" width="27" height="8" rx="4" fill="#000" fill-opacity=".8"/>',square02:(t,l)=>'<rect x="16" y="8" width="44" height="4" rx="2" fill="#000" fill-opacity=".8"/>'},y7={bulging:(t,l)=>'<circle cx="28" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="74" cy="24" r="18" fill="#000" fill-opacity=".2"/><circle cx="28" cy="24" r="15" fill="#F1EEDA"/><circle cx="74" cy="24" r="15" fill="#F1EEDA"/><rect x="26" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="74" y="15" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',dizzy:(t,l)=>'<path d="m25 27.2 5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L28.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L25 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5ZM79 27.2l5.5 5.5c.5.4 1.2.4 1.6 0l1.6-1.6c.4-.5.4-1.2 0-1.6L82.2 24l5.5-5.5c.4-.5.4-1.2 0-1.6l-1.6-1.6c-.5-.4-1.2-.4-1.6 0L79 20.8l-5.5-5.5c-.5-.4-1.2-.4-1.6 0l-1.6 1.6c-.4.4-.4 1.1 0 1.6l5.5 5.5-5.5 5.5c-.4.5-.4 1.2 0 1.6l1.6 1.6c.5.4 1.2.4 1.6 0l5.5-5.5Z" fill="#000" fill-opacity=".8"/>',eva:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd"><path d="M53 0c34.75 0 49 17.47 49 31 0 13.53-19.59 17-49 17-29.05 0-51-3.47-51-17S17.11 0 53 0Z" fill="#000" fill-opacity=".8"/><path d="M28.82 34.65c-6.53-1.35-11.24-6.34-10.52-11.14.72-4.79 6.6-7.58 13.12-6.23 6.53 1.36 11.24 6.35 10.52 11.15-.72 4.8-6.6 7.59-13.12 6.23ZM75.42 34.65c-6.52 1.36-12.4-1.43-13.12-6.23-.72-4.8 4-9.8 10.52-11.15 6.52-1.35 12.4 1.44 13.12 6.24.72 4.81-4 9.8-10.52 11.15Z" fill="#25A6F5"/></g>',frame1:(t,l)=>'<rect y="4" width="104" height="42" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><rect x="66" y="25" width="10" height="11" rx="2" fill="#8BDDFF"/><path fill-rule="evenodd" clip-rule="evenodd" d="M21 4h8L12 46H4L21 4Z" fill="#fff" fill-opacity=".4"/>',frame2:(t,l)=>'<rect x="8" y="10" width="88" height="36" rx="4" fill="#000" fill-opacity=".8"/><rect x="28" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><rect x="66" y="21" width="10" height="17" rx="2" fill="#5EF2B8"/><path fill-rule="evenodd" clip-rule="evenodd" d="M83 10h5L76 46h-5l12-36Z" fill="#fff" fill-opacity=".4"/>',glow:(t,l)=>'<g fill="#fff"><circle cx="21" cy="30" r="15" fill-opacity=".1"/><circle cx="83" cy="30" r="15" fill-opacity=".1"/><circle cx="21" cy="30" r="12" fill-opacity=".1"/><circle cx="83" cy="30" r="12" fill-opacity=".1"/><circle cx="21" cy="30" r="6" fill-opacity=".8"/><circle cx="83" cy="30" r="6" fill-opacity=".8"/><circle cx="21" cy="30" r="3" fill-opacity=".8"/><circle cx="83" cy="30" r="3" fill-opacity=".8"/></g>',happy:(t,l)=>'<path d="m18 19 12-2M20 31c0-3.31 2.9-6 7-6 3.1 0 6 2.69 6 6M86 20l-12-3M84 31c0-3.31-2.9-6-6-6-4.1 0-7 2.69-7 6" stroke="#000" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>',hearts:(t,l)=>'<path d="M29.27 9.68c-2.55.13-4.96 2.24-6.25 4.15-1.48-1.76-4.1-3.6-6.65-3.47-5.48.28-8.85 3.8-8.63 8.1.3 5.72 4.88 8.89 9.7 12.24 1.71 1.15 5 4.15 5.42 4.82.42.67 2.14.6 2.58-.13a37.8 37.8 0 0 1 4.9-5.36c4.43-3.84 8.66-7.47 8.36-13.2-.23-4.3-3.95-7.44-9.43-7.15ZM87.63 10.36c-2.55-.14-5.17 1.7-6.65 3.47-1.3-1.9-3.7-4.02-6.25-4.15-5.48-.29-9.2 2.86-9.43 7.16-.3 5.72 3.93 9.35 8.36 13.19 1.6 1.32 4.55 4.64 4.9 5.36.35.7 2.06.82 2.58.13.51-.7 3.7-3.67 5.42-4.82 4.81-3.35 9.4-6.52 9.7-12.24.22-4.3-3.15-7.82-8.63-8.1Z" fill="#FF5353" fill-opacity=".8"/>',robocop:(t,l)=>'<rect x="7" y="16" width="91" height="16" rx="4" fill="#000" fill-opacity=".8"/><mask id="eyesRobocop-a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="7" y="16" width="91" height="16"><rect x="7" y="16" width="91" height="16" rx="4" fill="#fff"/></mask><g mask="url(#eyesRobocop-a)" fill-rule="evenodd" clip-rule="evenodd" fill="#fff" fill-opacity=".8"><path d="M76 7h18L82 37H64L76 7ZM52 7h9L49 37h-9L52 7Z"/></g>',round:(t,l)=>'<g fill="#fff"><circle cx="24" cy="30" r="6"/><circle cx="80" cy="30" r="6"/></g>',roundFrame01:(t,l)=>'<rect y="12" width="104" height="32" rx="16" fill="#000" fill-opacity=".8"/><rect x="24" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/><rect x="70" y="22" width="10" height="12" rx="2" fill="#F4F4F4"/>',roundFrame02:(t,l)=>'<rect y="11" width="104" height="34" rx="17" fill="#000" fill-opacity=".8"/><circle cx="29" cy="28" r="13" fill="#F1EEDA"/><circle cx="75" cy="28" r="13" fill="#F1EEDA"/><rect x="24" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/><rect x="70" y="23" width="10" height="10" rx="2" fill="#000" fill-opacity=".8"/>',sensor:(t,l)=>'<path d="M28 44a20 20 0 0 0 19.9-18h41.52a5 5 0 1 0 0-4H47.9A20 20 0 1 0 28 44Z" fill="#000" fill-opacity=".2"/><circle cx="94" cy="24" r="2" fill="#fff"/><circle cx="28" cy="24" r="16" fill="#000" fill-opacity=".6"/><circle cx="34" cy="16" r="3" fill="#fff"/>',shade01:(t,l)=>'<path d="M96 2H8c-4.5 0-8 3.5-8 8.03V28c0 4.5 3.5 8 8 8h13c8 0 11 8 18 8h27c7 0 9-8 17-8h13c4.5 0 8-3.5 8-8V10c0-4.5-3.5-8-8-8Z" fill="#000" fill-opacity=".8"/><path d="M87 14H17c-3.5 0-5 3-5 5v2c0 2 1.5 5 5 5h12c6 0 11.62 8 17 8h14c5.38 0 9-8 15-8h12c3.5 0 5-3 5-5v-2c0-2-1.5-5-5-5Z" fill="#FF3D3D"/><path d="M22.44 36.09 37.26 2h11L31.4 40.78l-.76-.58c-2.38-1.82-4.83-3.69-8.2-4.11ZM11.48 36 26.26 2h4L15.48 36h-4Z" fill="#fff" fill-opacity=".2"/>'},x7={camo01:(t,l)=>'<g fill="#000" fill-opacity=".2"><path d="M117.94-4a6.08 6.08 0 0 0 2.52-.99l.77-.12c2.72-.42 9.94-1.53 11.25-.4.85.75.47 3.39.2 5.28-.11.72-.2 1.34-.2 1.7-1.33.06-2.34-1.4-3.32-2.83-1.46-2.12-2.88-4.17-5.2-1.06-1.1 1.46-.85 3.3-.6 5.18.28 1.98.55 3.99-.74 5.62-1.54 1.93-4 2.2-6.42 2.47-2.56.28-5.1.56-6.48 2.8-.4.66-.5 1.8-.62 3.05-.2 2.15-.43 4.58-2.25 5.14-3.12.97-3.32-1.69-3.5-4-.09-1.25-.18-2.4-.7-2.84-5.7-4.7-6.23 4.37-6.35 6.43v.03c-.03.43.05.78.12 1.1.13.57.23 1.05-.33 1.73-.3.36-.7.3-1.12.23-.43-.06-.89-.13-1.27.23-1.5 1.4-1.54 1.54-1.88 3.11l-.09.37c-.11.53-.19.99-.25 1.4-.14.94-.26 1.67-.84 2.64-.27.45-.63.89-1 1.33-1.2 1.46-2.39 2.9-.14 4.69-.61 0-6 1.46-6.35 1.64-.52.27-1.12.98-1.66 1.61a4.5 4.5 0 0 1-1.18 1.15c-3.2 1.1-2.97-1.28-2.74-3.74.14-1.48.28-2.98-.32-3.77 8.28-.27 13.26-8.21 13.75-14.38a5 5 0 0 0-.65-2.5c-.28-.62-.54-1.2-.55-1.8-.02-.83.25-1.4.52-1.97.22-.47.44-.93.5-1.54.23-2.64-.85-3.61-2.27-4.89-.7-.64-1.5-1.35-2.26-2.4-2.5-3.45-1.2-3.99 2.6-3.36 2.17.36 4.26 1 6.36 1.63 2.56.78 5.12 1.56 7.84 1.83 3.48.34 6.71.18 8.36-2.66.95-1.63 1.37-6.13-1.8-6.48.8-.13 1.44-.38 2.1-.64a9.32 9.32 0 0 1 3.02-.77c1 .4 2.06.64 3.16.74ZM123.7 79.87v.01ZM32.38 86.47c.1.04.21.04.34 0-.18.13-.46.02-.37 0h.03ZM32.37 86.46h-.02.02ZM131.44 126.49c-.34-.03-.33-.04 0-.06.07-.28.16-.57.26-.85.21-.67.4-1.26.03-1.4 1.13-.21.92 1.8.8 2.96-.03.28-.05.5-.05.64-1.06 0-1.18-.59-1.04-1.3Z"/><path d="M131.52 125.78v-.04c-.44.03-.44.04 0 .07v-.02ZM41.65-5.5c.39.07 1.5.18 1.87 0h-1.87ZM39.01 51.48c-1.06-.25-1.44-.92-1.73-1.42-.16-.28-.3-.5-.5-.58-2.83-1.05-3.29.92-3.77 3.98-.1.56-.11 1.03-.13 1.47-.05 1.08-.08 1.9-1.09 2.94-.58.6-1.52.91-2.45 1.22a8.8 8.8 0 0 0-1.87.78c-1.47.93-2.12 1.78-2.92 2.83-.32.4-.66.85-1.08 1.34-.96 1.11-2.36 2.19-3.82 3.3-3.9 2.98-8.2 6.25-5.32 11.4 3.1 5.55 4.32.87 5.27-2.75.36-1.39.68-2.62 1.05-3.05 4.67-5.47 5.68-.12 6.29 3.08.1.52.18.99.27 1.34 1.31 5.03 3.1 1.4 4.58-1.58.44-.9.86-1.74 1.22-2.28.44-.63.99-1.1 1.52-1.55a5.7 5.7 0 0 0 1.68-1.92c.24-.52.12-1.17 0-1.84-.2-1.1-.4-2.25.97-2.95 1.45-.73 3.12.16 4.6.96 1.13.6 2.15 1.16 2.9.9 2.33-.83.23-3.6-1.45-5.82-.78-1.02-1.46-1.93-1.59-2.47-.36-1.58.28-2.95.91-4.32.64-1.38 1.28-2.77.9-4.37-.66.1-1.23.4-1.8.72-.8.44-1.61.88-2.65.64ZM80.6 88.07ZM95.89 72.7c.38-2.66-1.73-4.02-3.9-5.43-.7-.45-1.39-.9-2.02-1.4-1.43-1.13-2.4-2.07-3.12-3.66a3.83 3.83 0 0 1-.17-1.2c-.04-.69-.08-1.4-.42-1.65-1.85-1.27-2.88-.4-4.13.66-.6.5-1.24 1.05-2.04 1.42-2.72 1.24-2.75 1.22-4.38.26-.33-.2-.72-.43-1.22-.7l-.71-.4c-1.5-.9-2.56-1.53-4.4 1.07-.73 1.04-.7 2.87-.66 4.77.07 3.18.14 6.57-3.42 6.77 1.57.69.86 2.74.14 4.83-.74 2.15-1.49 4.34.23 5.1 4.18 1.83 5.4-6.86 6.09-11.83.23-1.64.4-2.88.6-3.2 1.67-2.62 7.63-4.86 9.34-.98.31.7.08 1.44-.15 2.2-.22.73-.45 1.47-.2 2.2.37 1.03.97 1.41 1.67 1.86.38.23.78.49 1.19.87 2.9 2.71 2.79 2.88 1.34 5.18l-.86 1.4c-.3.54-.56 1.38-.83 2.31-.61 2.1-1.35 4.63-3.25 4.92 1.04-.01 2.13.24 3.2.5 2.06.47 4.08.94 5.61-.45 1.07-.97.89-2.72.71-4.4-.11-1.09-.22-2.15.03-2.93.44-1.42 1.63-2.6 2.81-3.77 1.34-1.34 2.68-2.66 2.92-4.32ZM18.9 104.45c.03.48.07 1.03.18 1.7.4 2.48 1.51 3.9 2.95 5.7v.01l.95 1.2c-4.37.08-7.8 4.62-3.04 7.18-1.93-1.03-3.39.12-4.58 1.07-1.49 1.19-2.55 2.03-3.57-2.27l-.28-1.1c-.23-.86-.48-1.84-.58-2.5-.21-1.44-.18-1.61-.01-2.4l.1-.47c.08-.47.26-.79.43-1.09.35-.63.63-1.15-.13-2.67-.4-.79-.88-1.4-1.34-1.99-.85-1.06-1.6-2.02-1.58-3.73 0-.48.21-.86.43-1.27.37-.68.78-1.45.38-2.92a12.4 12.4 0 0 0-1.08-2.46c-.5-.97-1.01-1.94-1.2-2.99 1.81.08 2.96 1.45 3.98 2.68.36.44.71.85 1.07 1.19.8.75 1.75 1.28 2.69 1.8.8.45 1.6.9 2.24 1.45 1.8 1.58 1.86 2.4 1.98 3.9ZM24.68 91.3c1.49.12 5.48-3.14 5.74-4.07-1.29.24-2.6-.36-3.88-.94-1.44-.66-2.84-1.3-4.14-.73-2.3 1 .15 5.56 2.28 5.74ZM83.04 92.92c-1.63.3-3.49.64-4.58 0-1.06-.62-3.16-3.28-.1-3.13.78.3 1.67.5 2.56.68 1.87.4 3.7.8 4.21 2.16-.57.02-1.3.15-2.09.3ZM62.6 68.99c-.84-.05-1.62-.2-2.34-.34-2.16-.41-3.75-.72-4.43 2.13 1.12-.05 2.23.25 3.23.5 2.11.56 3.68.97 3.53-2.3ZM91.57 105.44c-.72-.36-1.4-.7-1.93-.74.68-.1.8-.77.92-1.4.1-.52.2-1.02.61-1.16.17.05.36.1.58.14 1.76.41 4.88 1.14 4.11 2.82-.93 2.04-2.71 1.14-4.3.34Z"/><path d="M23.02 113.15c-.74.04-.24.2.07.24l-.07-.24ZM64.47 65.13c.83-.57.8-3.2-.45-3.31-1.75.39-.86 4.2.45 3.3ZM129.6 34.45c.03.59 2.6 3.1 2.88 3.08 0-.07.02-.26.06-.51.17-1.29.59-4.32-.85-3.64a5 5 0 0 0-.71.44c-.42.3-.85.6-1.38.63ZM21.62 127.86c-5.14 0-3.31-2.39-1.94-1.65.3.16.55.44.81.71.3.32.6.64.96.78.09.04.11.07.14.1 0 .03.02.04.03.06ZM-.7-.88c.01-.43-2.42-1.19-1-.21-.14-.1-.03-.05.17.03.3.13.83.34.83.18ZM123.37 43.75c-1.53-.42 2.62-.23 2.1.93-.42-.05-.79-.27-1.16-.49-.3-.17-.6-.35-.94-.44Z"/></g><path d="M38.12 26.75c.24-.76-.15-1.6-.53-2.44-.32-.7-.64-1.4-.61-2.05.02-.62.47-1.75.9-2.82a18.15 18.15 0 0 0 .84-2.47c.8-3.23 2.3-9.38 7.7-6.52-4.33-2.3-2.55-4.12-.56-6.15a12.3 12.3 0 0 0 2.06-2.51c.4-.74.72-1.08.91-1.27.11-.12.18-.19.19-.26 0-.1-.1-.22-.34-.5l-.4-.45c-.59-.7-4.78-1.65-5.78-1.63-3.82.09-7.98 3.7-9.9 6.62-1.03 1.56-.67 2.43-.33 3.26.2.5.4.98.3 1.6-.05.25-.02.5 0 .74.09.73.16 1.35-2.01 1.47-2.7.15-7.77-4.33-7.8-6.53 0-.73.78-1.56 1.57-2.4 1.4-1.46 2.79-2.94-.21-3.87-2.24-.7-9.03 3.8-9.45 5.5-.26 1.06.5 2.2 1.15 3.2 1.06 1.6 1.88 2.84-2.02 2.81 0-.02 3.63 2.29 4 2.77.85 1.09 1.17 1.88 1.45 2.56.47 1.17.81 2 3.44 3.44 1.1.6 2.28 1.12 3.45 1.64 1.58.69 3.16 1.39 4.56 2.28.76.49 1.4 1.07 2.03 1.63 1.48 1.32 2.86 2.57 5.4 2.34ZM127.37 3.5c-1.41.74-.6 1.4.37 2.18.98.79 2.12 1.7 1.37 2.97-.47.81-1.6.99-2.76 1.16-1.17.18-2.37.37-2.95 1.22-.84 1.23-.5 2.1-.18 2.94.39.98.76 1.93-.78 3.38-1.08 1.01-2.1 1.34-2.98 1.62-1.31.42-2.33.75-2.8 3.09-.74 3.58 1.1 5.97 2.84 8.24 1.97 2.58 3.85 5.02 1.78 8.9l-.34.62c-1.09 1.9-3 5.22.62 6.34 2.63.81 2.48-.12 2.31-1.08-.12-.73-.25-1.48.8-1.52-.21-.6 2.98.1 2.58.98.84.09 1.25.54 1.65.98.57.63 1.12 1.24 2.9.7 1.76-.55 2.05-2.2 2.28-3.55l.02-.1c.35-2.04-.6-3.8-1.5-5.5-.75-1.41-1.47-2.78-1.42-4.22v-.54c-.01-.36-.02-.65.16-1.13a2.74 2.74 0 0 1 2-.48c1.16.24 1.48-.2.97-1.3 1-1.93.62-5.18.29-8.05-.15-1.3-.3-2.51-.3-3.5 0-.67.13-1.8.27-3.13.36-3.47.87-8.26-.26-9.68-.66-.83-5.81-2.13-6.94-1.54ZM129.58 52.35c-2.97-.76-2.61 1.57-2.33 3.35.08.52.15 1 .13 1.33-.14 2.96-.48 3.68-4.15 4.16-.88.12-1.72-.1-2.55-.3-1.4-.36-2.76-.7-4.23.55-.83.7-.8 1.57-.76 2.44.02.43.04.85-.04 1.26-.14.7-.68 1.78-1.25 2.93-1.05 2.11-2.22 4.48-1.26 5.11.65.44 2.53-.06 4.66-.62 3.68-.96 8.12-2.13 8.4.86.18 1.78-2.15 2.05-4.37 2.3-1.44.17-2.83.34-3.45.9-.19.17-.55 1.43-.91 2.68-.4 1.4-.81 2.8-.96 2.67.65.54 1.69-.2 2.91-1.07 1.8-1.28 4.02-2.86 6.04-1.12-2.49-4.76 4.86-4.08 7.99-3.8.34.04.63.07.86.08V60.21c-3.56.93-3.33-1.08-3.07-3.31.22-1.92.45-4-1.66-4.55ZM131.51 120.55c.9.05 1.81.1 2.8.1 0 .8-.74 1.17-1.48 1.53-.64.31-1.29.63-1.46 1.24-.48 1.73.58 2.33 1.56 2.88.71.4 1.38.77 1.38 1.52-.84 0-1.78.04-2.76.09-2.07.09-4.3.18-6.04-.09h-2.93l-.25-1.14-.43-.2c-1.22-.57-3.28-1.53-4.19-2.16-4.51-3.15-.46-6.42 3.78-7.72-2.92.9 1.1 3.79 2.51 4.18 1.1.3 1.74.15 2.5-.03.44-.1.94-.22 1.58-.26 1.2-.06 2.31 0 3.43.06ZM13.29 31.85c-.62-.31-1.29-.12-1.96.08-.78.22-1.56.45-2.29-.09-.39-.29-.26-.87-.13-1.41.1-.44.2-.85 0-1.05-2-1.94-2.12-1.47-2.46-.15-.15.59-.34 1.35-.77 2.14-.86 1.58-1.96 1.95-3.06 2.31-1.3.44-2.6.86-3.45 3.34-1.84 5.28-5.2 3.61-6.4-1-.2-.72-.77-1.78-1.4-2.98-1.6-2.98-3.62-6.77-1.23-7.9-1.66.79-3.61 1.13-5.57 1.48-2.27.4-4.54.8-6.34 1.9-1.92 1.15-1.91 1.41-1.88 2.74a131.99 131.99 0 0 0 .07 5.55l.04 1.51c.04 1.5.67 2.78 1.33 4.1.38.76.77 1.55 1.05 2.4.58 1.78.82 3.66 1.05 5.53.16 1.24.32 2.48.57 3.68l.17.75c.51 2.35 1 4.58-.37 6.85-.19.3-.65.66-1.14 1.04-.88.67-1.87 1.42-1.64 2.14.34 1.05 2.04-.49 2.92-1.28l.43-.38c.79-.6.83-1.17.86-1.64.04-.57.07-.97 1.4-1.01 1.8-.06 3.65 1.93 4.74 3.1l.32.35c.6.64 1.17 1.43 1.76 2.25 1.52 2.14 3.2 4.48 6.06 4.83 8.88 1.1 10.66-9.15 7.36-13.8a21.83 21.83 0 0 0-2.63-2.84c-1.67-1.6-3.39-3.25-3.85-5.15-.76-3.13 1.93-5.67 5.62-3.87 1.76.86 2.32 2.35 2.9 3.85.48 1.28.96 2.57 2.2 3.48 2.6 1.93 2.84 1.38 3.27.4.23-.52.52-1.16 1.25-1.6 2.1-1.29 5.75-2.35 6.25.86.18 1.13-.76 2.09-1.71 3.07-1.14 1.16-2.3 2.35-1.63 3.88 1.29 2.95 2.46 1.35 3.46-.01.2-.3.41-.57.61-.8 2.79-3.15 5.56-6.44 4.73-10.59-.53-2.65-2.38-4.54-4.27-6.47a32.36 32.36 0 0 1-2.47-2.72c-.45-.58-.88-1.64-1.33-2.77-.7-1.73-1.45-3.61-2.44-4.1ZM62.98 102.48c-.03 1.26-.05 2.5.5 3.73 1.29 2.79 2 4.45.22 7.05-.48.7-.98 1.22-1.46 1.72a7.8 7.8 0 0 0-2.1 3.14c-.15.47-.27.9-.38 1.3-.39 1.46-.68 2.53-2.7 3.5-4.64 2.25-8.11.2-11.17-2.37l-.69-.58c-1.54-1.28-2.59-2.15-3.53-3.9a2.45 2.45 0 0 1-.22-1.54c.07-.74.13-1.36-1.28-2.02-1.37-.64-2.7-.4-4.05-.15-1.68.3-3.38.61-5.15-.8-4.02-3.22-3-9.5.72-12.22 1.04-.77 2-1.22 2.8-1.6 1.85-.87 2.81-1.33 1.96-4.33a4.63 4.63 0 0 1-1.56-2.2 3.8 3.8 0 0 1 .5-2.08c-.1-.46.05-.9.19-1.3.28-.83.49-1.45-1.73-1.46.62-.45.8-1.45.97-2.48.27-1.52.55-3.13 2.25-3.3 2.92-.28 3.24 2.71 3.49 4.96.08.73.15 1.39.3 1.82 1.18 3.4 2.57 4.57 6.35 3.22.98-.35 5.57-2.81 5.93-3.35-1.65 2.5 1.72 4.87 4.24 6.64.62.43 1.2.83 1.62 1.19l.53.42a10.7 10.7 0 0 1 2.71 2.8c.8 1.4.77 2.8.74 4.2ZM104.42 120.99c-1.44-.16-6.73-2.2-6.09-3.91 1.63-4.33 10.12.56 13.06 2.25l.53.3c-1.12.06-2.2.38-3.27.7-1.4.4-2.78.82-4.23.66Z" fill="#000" fill-opacity=".4"/><g fill="#fff" fill-opacity=".2"><path d="M19.25-3.59c.2 1.51 3.16 3.8 5.07 2.44 1.22.44-.59-2.79-.89-3.09-1.59-1.58-4.59-2.32-4.18.65ZM52.27-1.64c-.74-.18-1.44-.34-2.03-.55-.54-.19-.57-2.24-.35-2.65.44-.8 1.95-.7 3.33-.63.4.03.8.05 1.15.05h13.3c-1.86.74.15 1.5 1.1 1.7.78-.22 6.37 3.92 6.21 5.65-.08.94-.75 1.63-1.43 2.33-.8.85-1.65 1.72-1.54 3.08.08.82.88 2.18 1.78 3.7 2.25 3.8 5.1 8.61-1.44 8.74-3.05.06-2.98-1.38-2.89-3.06.06-1.11.13-2.34-.72-3.3a6.06 6.06 0 0 0-2.07-1.28c-1.01-.46-2.03-.92-2.44-1.8-.2-.44-.05-1.37.12-2.38.41-2.5.9-5.45-3.81-2.21-.48.33-.77.97-1.07 1.61-.57 1.24-1.14 2.48-3.01 1.5-1.63-.84-.73-2.5.17-4.18.69-1.27 1.38-2.54.96-3.46-.8-1.8-3.2-2.37-5.31-2.86ZM132.7 85.8c-2.76.72-4.35-1.84-5.62-3.89-.87-1.4-1.59-2.56-2.43-2.3-2.23-1.92-4.4-.16-6.18 1.3-.67.55-1.3 1.06-1.84 1.3.1.08-4.98-1.12-3.95-1.32-6.82-2.32-6.9 2.9-6.97 7.43-.03 1.96-.06 3.8-.63 4.85-1.02 1.9-2.46 2.63-4.81 3.45-.83.3-1.74.46-2.65.63-1.9.35-3.79.7-4.86 2.17-.2.27-.39 1.13-.52 1.74-.08.35-.14.62-.17.62.6.16 4.88 1.51 5.32 1.88.4.33.5.92.6 1.46.08.46.16.88.4 1.08.7.59 1.38 1 2.04 1.38 1.12.66 2.15 1.26 2.96 2.6.35.57.53 1.24.7 1.9.43 1.59.85 3.14 3.64 3.2 2.27.04 3.61-1.72 4.31-3.23.32-.68.23-2.56.14-4.68-.23-5.18-.52-11.76 4.75-5.66.52.6.72 1 .88 1.34.28.57.46.95 1.87 1.74.58.32 1.16.34 1.72.35.81.02 1.58.04 2.27 1 .7 1 .36 1.94.15 2.5-.24.64-.3.8 1.55-.04 4.29-1.93 4.45-6.24 4.6-9.86.02-.72.05-1.4.1-2.05.21-2.25.7-3.59 1.64-5.58l.42-.7c1.03-1.65 3.32-5.32.58-4.6ZM48.2 122.55c-.78-1.1-1.78-1.81-2.83-2.58-.48-.35-.97-.7-1.46-1.1-.28-.24-.6-.44-.91-.64-.63-.4-1.26-.8-1.59-1.42-.27-.5-.17-1.18-.07-1.85.1-.78.22-1.55-.23-2.05-1.27-1.42-2.98-1.08-4.79-.73-2.4.48-4.96.99-6.8-2.63-1.32-2.59-1.96-6.32-.25-8.84.73-1.06 2.32-1.8 3.89-2.5 1.94-.9 3.85-1.78 3.98-3.24.07-.85-.57-1.46-1.23-2.1-.58-.55-1.18-1.12-1.34-1.9-.13-.64.21-1.41.54-2.15.64-1.43 1.22-2.72-1.91-2.65.05.02 0 .04-.04.06a.67.67 0 0 0-.04.02c-.04-.02-.4.12-.81.3-.54.23-1.2.5-1.45.52 0 0-.14.12-.35.34-.96.97-3.65 3.7-5.01 3.57-2.7-.24-3.74-5.44-2.3-5.71a3.69 3.69 0 0 1-1.55-.77c-.85-.6-1.74-1.23-3.58-.68-1.44.43-1.8 1.05-2.27 1.86-.16.26-.33.55-.55.86-.69.97-1.08 1.62-1.33 2.03-.26.43-.36.61-.5.64-.11.03-.24-.03-.45-.14-.4-.19-1.12-.53-2.61-.78l-.06.3c-.2 1.16-.28 1.62-.13 1.97.1.22.3.4.63.7.25.24.6.55 1.02 1 .55.6 1.18 1.13 1.81 1.67.45.39.9.77 1.32 1.17.52.5 5.35 5.5 4.35 5.73.97.18 1.07 2.48 1.16 4.7.07 1.54.13 3.04.5 3.73.35.7.93 1.28 1.5 1.88.47.47.93.95 1.28 1.48.94 1.42 1.09 3.08 1.23 4.77.15 1.61.29 3.25 1.14 4.72.22.38.58.7.94 1.01.35.3.69.6.9.95.14.24.39.45.63.66l.39.36c.74.8.82 1.22.88 1.48.01.08.03.14.06.2.12.21.5.28 2.28.62h.03c3.28.62 12.62.33 15.2-1.77.36-.3.74-1.11 1.03-1.73.2-.4.34-.73.42-.74a1.4 1.4 0 0 1-.64-.55c0-.02-.02-.03-.03-.05ZM79.18 120.45c-.9-.1-1.55-.38-2.19-.66a5.57 5.57 0 0 0-3.16-.62c-1.2.12-2.12.7-3.04 1.26-.53.33-1.07.66-1.67.9-1.45.6-3.96.86-6.7 1.14-5.5.57-11.92 1.23-12.49 4.92.93 0 2.35.1 4 .2 5.07.3 12.3.75 13.99-.83.86-.81.74-1.5.64-2.07-.14-.83-.25-1.44 2.63-1.9.94-.15 1.63.1 2.32.33 1.05.37 2.1.73 4.02-.31.27-.15 3.76-2.13 1.64-2.37ZM77.4 100.15c4.94-5.13 6.28 2.22 6.28 5.26 0 3.48-6 6.05-7.87 2.3-.62-1.24.37-6.3 1.59-7.56ZM133 1.74a9.56 9.56 0 0 1-1.94-2.4c-1-1.52-2.09-3.15-3.48-3.32-3.76-.47-3.33 3.97-2.97 7.59.19 1.88.35 3.55-.12 4.17.06 0 .28.14.61.34 1.59.99 5.53 3.43 3.55-1.06-.18-.4-.88-.72-1.58-1.05-1.28-.6-2.56-1.2-.54-2.26 1.29-.67 2.72 0 4.1.66.98.46 1.94.9 2.8.87l.03-.76c.07-1.02.15-2.35-.46-2.78ZM131.77 44.91c.4-.53.76-1.04 1.08-1.22.19-.12.83 16.67.15 16.46-3.3 1.97-2.89-2.4-2.63-5.1.1-.98.16-1.73.03-1.9-.47-.64-1.46-.88-2.45-1.11-1.36-.33-2.73-.66-2.77-2.05-.02-.59 2.1-2.22 2.63-2.58.2-.13.21-.35.22-.58.02-.24.03-.5.27-.65.14-.1.48 0 .87.1.5.14 1.07.3 1.35.08.42-.32.85-.9 1.25-1.45Z"/><path d="M95.36 58c-.5-.86-1-1.72-2.15-2.23-3.03-1.34-3.09-1.96-3.19-3.02-.06-.63-.13-1.4-.84-2.57-1.72-2.82-6.06-2.63-9.5-2.47-.7.03-1.36.06-1.95.06-.77 0-1.32-.03-1.75-.06-1.36-.08-1.5-.1-3.27 1.42-.71.62-1.42 1.34-2.14 2.09-.82.83-1.65 1.69-2.55 2.44-1.94 1.62-6.42 5.7-3.14 7.97-1.6.35-1.1 3.07.01 3.67-.13.05-1.51 3.29-1.44 3.47-.73-.05-1.42-.23-2.08-.4-1.48-.38-2.83-.73-4.14.54-1.11 1.08-.75 2.66-.39 4.24.31 1.33.62 2.66.04 3.7-1.61 2.93-6.9 3.21-9.69 1.46-1.9-1.2-6.26-5.08-7.47-6.87-2.06-3.06-1.24-5.8 3.08-5.68 1.06.02 1.8.47 2.36.8.82.48 1.18.69 1.38-1.18.08-.82-.8-1.87-1.51-2.72-.27-.32-.52-.62-.68-.86l-.33-.5c-1.85-2.74-2.6-3.85-1.2-7.19l.2-.48c1-2.38 1.34-3.2.4-5.92-1.1-3.13-1.4-4.45-1.14-7.76 0-.15.03-.32.05-.51.17-1.38.45-3.65-1.94-4 .36-.53 1.73-4.44 1.4-4.8 2.04.23 2.36-.14 2.97-.84.38-.43.88-1 1.99-1.62.77-.43 1.75-.54 2.75-.64 1.38-.15 2.8-.3 3.68-1.35.81-.95.85-2.49.88-4 .02-1.11.05-2.21.38-3.05.61-1.55 1.43-3.46 3.5-4.15 5-1.67 4.6 2.62 4.33 5.63-.05.51-.1 1-.1 1.4-.17 5.12-.25 10.56.75 15.5 1.02 5.02 1.87 3.1 3.02.5.22-.5.45-1.03.7-1.53a7.55 7.55 0 0 1 1.87-2.2c.66-.6 1.32-1.2 1.75-1.99.32-.6.3-1.21.27-1.8-.04-.84-.08-1.62.82-2.26.67-.48 1.47-.32 2.2-.17.6.12 1.15.23 1.55-.04.77-.51.88-1.96 1-3.46.17-2.13.35-4.36 2.45-4.1 2.06.23 2.25 2.33 2.41 4.09.11 1.24.21 2.32.95 2.46l-1.38.33c-3.21.74-7.77 1.8-1.48 3.92-1.93.18-1.37 2.48-1.1 3.54 0 .08.03.15.04.21.06.3.42.56.8.8.37.27.76.54.81.87.13.73-.07 1.1-.27 1.46-.14.26-.29.52-.3.93-.02.53-.08 1.04-.13 1.5-.2 2-.32 3.04 3 1.42.92-.46 1.14-1.1 1.3-1.58.24-.69.39-1.11 2.26-.44.07.19.23.3.5.34.28-.08.73.23 1.26.59.82.55 1.82 1.22 2.69.86 1.72-.71 1.07-1.93.48-3.03a5 5 0 0 1-.5-1.14c-.58-2.61-.2-2.79.63-3.18a4.8 4.8 0 0 0 2.33-2.14c.74-1.2.26-2.42-.18-3.55-.6-1.49-1.14-2.85 1.26-3.91 6.1-2.7 7.06 3.57 6.3 6.56l-.1.35c-.83 3.24-1.46 5.65.13 9 1.08 2.29 2.86 3.64 4.77 5.1.96.72 1.95 1.48 2.9 2.4 3.59 3.42 3.88 7.5-.21 10.8-3.28 2.62-7.68 3.4-11.1.65-.57-.46-.92-1.06-1.27-1.66ZM89.12 88.84c-4.72-.62-6.35-.74-9.92.14.23.23.24.4.04.5.6.23 1.51.39 2.5.55 1.75.3 3.7.64 4.43 1.5.18.2.03 1.03-.1 1.78-.12.66-.23 1.26-.1 1.34-.1-.06 4.21-5.26 4.88-5.76-.58.02-1.15 0-1.73-.05ZM7.23 102.28l.36.2c.5.18 1.02.26 1.58.24-.26 1.4-2.3 4-4.55 3.57-2.66-.5-1.64-1.68-.56-2.92.59-.68 1.2-1.37 1.24-2 0-.16 1.28.55 1.92.9ZM6.12 95.63c.4.56 1.08.99 1.74 1.4.3.18.59.36.84.55.37-.54.01-1.6-.34-2.66-.3-.87-.58-1.73-.44-2.27-1.71-.06-2.55 1.94-1.8 2.98ZM37.15-5.3c-1.63.91-7.34 4.14-7.66.8l-.07-.92h7.93l-.2.11Z"/></g>',camo02:(t,l)=>'<g fill="#fff" fill-opacity=".2"><path d="M-29.7 126.12c-2.62.41-9.54 1.51-10.8.4-.82-.74-.45-3.34-.18-5.2.1-.72.18-1.32.18-1.68 1.28-.06 2.24 1.38 3.19 2.8 1.4 2.08 2.75 4.1 5 1.03 1.04-1.44.8-3.25.55-5.1-.26-1.95-.52-3.93.72-5.53 1.48-1.9 3.83-2.17 6.16-2.44 2.47-.27 4.9-.55 6.23-2.77.38-.64.48-1.77.6-3 .19-2.11.4-4.5 2.15-5.06 3-.95 3.19 1.67 3.35 3.95.1 1.23.18 2.36.68 2.8 5.46 4.63 5.98-4.3 6.1-6.34v-.03c.02-.42-.05-.76-.12-1.08-.12-.57-.22-1.04.32-1.71.28-.35.67-.3 1.08-.23.4.07.84.14 1.21-.22 1.45-1.39 1.48-1.52 1.8-3.06l.04-.17.05-.2c.11-.52.18-.97.24-1.38A6.4 6.4 0 0 1 .61 88c1.15-1.44 2.3-2.87.14-4.63.6 0 5.76-1.43 6.1-1.62.5-.27 1.07-.96 1.59-1.58.45-.55.85-1.04 1.12-1.14 3.07-1.09 2.85 1.27 2.63 3.69-.14 1.45-.27 2.94.3 3.71-7.95.27-12.73 8.1-13.2 14.16-.07.93.29 1.73.62 2.48.27.6.53 1.17.54 1.76a4.1 4.1 0 0 1-.5 1.95c-.21.46-.42.91-.48 1.52-.23 2.6.81 3.55 2.17 4.8.69.64 1.45 1.34 2.17 2.37 2.4 3.4 1.15 3.93-2.49 3.32-2.09-.36-4.1-.98-6.1-1.61a38.06 38.06 0 0 0-7.53-1.8c-3.34-.34-6.44-.18-8.02 2.61-.92 1.62-1.32 6.05 1.72 6.4-.76.11-1.38.37-2.02.62-.83.34-1.69.68-2.9.76-.96-.39-1.97-.63-3.03-.73-.9.14-1.7.47-2.42.96l-.74.12ZM150.24 57.01c.47.27 1.37.22 2.35.17 1.06-.06 2.2-.12 2.96.21.4.18.8.64 1.2 1.1.37.42.74.85 1.12 1.06.86.5 1.78.67 2.7.84.71.13 1.42.26 2.1.53 2.8 1.14 4.88 3.6 3.26 6.47-.44.8-1.47 1.33-2.5 1.87-1.3.7-2.6 1.38-2.6 2.59 0 4.48 7.78-2.91 8.48-4.5.2-.44.27-.95.34-1.47.1-.72.2-1.46.64-2.03a6.98 6.98 0 0 1 1.96-1.3c.48-.25.87-.46.94-.58 1.3-2.1.75-7.26.32-11.22-.17-1.6-.32-3-.32-3.94-2.2.01-3.19 2.7-4.19 5.38-1.44 3.9-2.89 7.8-8.04 3.5-1.37-1.15-5.3-8.12-5.3-9.42 0-1.18.6-1.84 1.25-2.55.31-.34.63-.68.9-1.1l.75-1.14c.82-1.22 1.01-1.5 1.23-3.82.17-1.88.38-2.17.93-2.91.22-.3.5-.7.87-1.3.17-.3.5-.56.8-.82.7-.6 1.4-1.18.36-2.07-2.6-2.23-8.24 3.55-9.22 4.7-2.78 3.29-6.55 7.77-6.22 11.93.08.94 2.09 9.32 2.92 9.81ZM116.75 116.14c-.33.4-.66.78-.62 1.29.12 1.79.13 1.78.35 1.67.17-.08.46-.22 1.02.3.16.15.63.36 1.2.62 1.33.6 3.16 1.42 2.6 2.12-.28.36-1.04.4-1.85.42-.8.04-1.65.08-2.1.44-.35.28-.56.83-.76 1.32-.16.4-.3.78-.5.92-1.56 1.17-2.17 1.27-5.48 1.27 2.2-.62-3.45-4.51-4.02-3.27.53-1.16-.17-2.38-.85-3.54-.4-.68-.78-1.34-.89-1.96-.14-.8-.11-1.59-.09-2.36.06-1.75.1-3.41-1.76-4.88.63-.08.99-.53 1.34-.97.38-.47.75-.94 1.45-.96.87 2.37 2.9 2.54 5.03 2.71.98.08 1.99.17 2.92.46.3.1.57.17.84.24 1.05.28 1.9.5 2.52 1.58.74 1.28.18 1.95-.35 2.58ZM173.2-4.11c0-1.08-1.99-.92-3.45-.8-.4.02-.76.05-1.03.05.63.25 1 .42 1.24.54.2.1.32.15.45.2.26.06.53.06 1.34.04l1.44-.03ZM-39.75-2.61c-.2.65-.4 1.23-.03 1.36-1.09.22-.88-1.77-.77-2.9.03-.28.05-.5.05-.63 1.44 0 1.07 1.16.75 2.17ZM117.76-4.86h-3.58c.3.14.62.32.94.5 1.33.74 2.63 1.46 2.64-.5ZM172.3 4.14c.43-.08.7-.05.85-.03.09.02.14.03.16 0 .04-.03.03-.1 0-.3-.04-.3-.12-.85-.12-1.87-1.02.02-2.63 2.18-.9 2.2h.01ZM44.89 126.51h1.79c-.37-.08-1.44-.18-1.8 0ZM44.95 71.71c.63-.08 1.17-.4 1.72-.7.78-.43 1.55-.86 2.54-.62 1.02.25 1.4.9 1.67 1.4.15.27.28.5.47.57 2.72 1.03 3.16-.9 3.63-3.93.08-.54.1-1.01.12-1.44.04-1.06.08-1.87 1.04-2.9.55-.59 1.45-.9 2.34-1.2.65-.22 1.3-.45 1.8-.77a9.8 9.8 0 0 0 2.8-2.78c.3-.4.63-.85 1.04-1.33.92-1.1 2.27-2.15 3.66-3.24 3.76-2.94 7.88-6.16 5.11-11.24-2.97-5.46-4.15-.85-5.06 2.71-.34 1.37-.65 2.58-1 3-4.48 5.4-5.45.13-6.04-3.03-.1-.51-.18-.97-.26-1.32-1.26-4.95-2.98-1.38-4.4 1.56-.42.89-.82 1.72-1.17 2.24a7.8 7.8 0 0 1-1.46 1.53 5.57 5.57 0 0 0-1.6 1.9c-.24.5-.12 1.15 0 1.8.18 1.1.38 2.23-.94 2.9-1.4.75-3-.14-4.42-.92-1.08-.6-2.06-1.14-2.77-.88-2.25.8-.23 3.54 1.39 5.73.74 1 1.4 1.9 1.52 2.43.34 1.55-.27 2.9-.88 4.25-.61 1.36-1.23 2.73-.85 4.3ZM9.52 34.33H9.3h.23ZM.12 41.5c-.43 1.4-1.57 2.56-2.7 3.72-1.29 1.32-2.57 2.62-2.8 4.25-.36 2.63 1.66 3.97 3.75 5.35.66.44 1.33.89 1.93 1.38a9.29 9.29 0 0 1 3 3.61c.12.27.14.72.16 1.18.04.68.07 1.39.4 1.62 1.78 1.26 2.77.4 3.96-.64a8.62 8.62 0 0 1 1.96-1.4c2.61-1.23 2.65-1.2 4.21-.26.32.2.7.42 1.17.68l.68.41c1.44.88 2.46 1.5 4.22-1.06.7-1.02.67-2.83.63-4.7-.06-3.14-.13-6.47 3.3-6.66-1.52-.68-.85-2.7-.16-4.77.71-2.1 1.43-4.26-.22-5-4-1.81-5.17 6.75-5.84 11.65-.22 1.61-.38 2.83-.58 3.14-1.6 2.6-7.32 4.8-8.96.97-.3-.68-.08-1.41.14-2.16.22-.72.43-1.46.2-2.16-.36-1.03-.94-1.4-1.61-1.84a7.11 7.11 0 0 1-1.14-.86c-2.78-2.67-2.68-2.84-1.29-5.1l.83-1.38c.3-.53.53-1.37.8-2.28.58-2.08 1.29-4.56 3.12-4.84-1 0-2.04-.24-3.08-.5-1.97-.46-3.9-.93-5.37.44-1.03.96-.85 2.69-.68 4.33.1 1.08.2 2.13-.03 2.9ZM65.5 10.9l-.9-1.2c4.2-.06 7.5-4.53 2.91-7.06 1.87 1.02 3.27-.12 4.4-1.04 1.44-1.17 2.46-2 3.44 2.24l.27 1.07c.22.86.46 1.82.56 2.48.2 1.4.16 1.57 0 2.35l-.09.46c-.08.46-.25.78-.4 1.07-.35.63-.62 1.14.1 2.63.39.78.85 1.38 1.3 1.96.8 1.05 1.54 2 1.51 3.68 0 .47-.2.84-.4 1.25a3.46 3.46 0 0 0-.38 2.87c.23.84.63 1.63 1.04 2.43.49.95.98 1.9 1.15 2.94-1.73-.07-2.83-1.43-3.82-2.64-.35-.43-.68-.84-1.02-1.17-.76-.74-1.69-1.26-2.58-1.77-.78-.45-1.54-.88-2.16-1.43-1.72-1.56-1.78-2.36-1.9-3.84-.03-.47-.07-1-.17-1.67-.38-2.44-1.46-3.83-2.84-5.62ZM65.15 36.8c2.2-.98-.14-5.47-2.18-5.64-1.43-.13-5.26 3.09-5.5 4 1.22-.23 2.48.36 3.71.93 1.38.65 2.73 1.27 3.97.72ZM11.35 29.55c1.01.62 3.03 3.24.1 3.1-.75-.3-1.61-.5-2.46-.68-1.8-.4-3.54-.79-4.05-2.13.56-.01 1.26-.15 2.01-.29 1.57-.3 3.35-.63 4.4 0ZM33.07 51.36c-1.07.05-2.14-.24-3.1-.5-2.03-.54-3.54-.95-3.39 2.27.8.05 1.55.2 2.24.33 2.07.41 3.6.71 4.25-2.1ZM-.27 19.32c-.1.52-.18 1.02-.58 1.15a30.5 30.5 0 0 0-.56-.14c-1.69-.4-4.68-1.12-3.95-2.77.9-2 2.61-1.12 4.13-.34.69.36 1.33.7 1.85.73-.66.1-.78.76-.89 1.37ZM91.3 46.57a6.25 6.25 0 0 1 .02-3.58c-2.2.01-2.03 3.55-.02 3.58Z"/><path d="m64.5 9.39.06.24c.71-.04.23-.2-.07-.24ZM100.06 44.32c.47.67.52 1.66.58 2.66.09 1.51.17 3.07 1.68 3.62 1.52.56 2.3-.7 3.12-2.06.7-1.15 1.44-2.36 2.7-2.6.84-.18 1.7.24 2.58.66.82.4 1.66.8 2.53.74 2.5-.16 6.46-2.7 6.26-4.97a6.74 6.74 0 0 1-2.82-.24c-.74-.17-1.46-.35-2.3-.3-.86.05-1.7.3-2.52.55-.77.23-1.53.46-2.24.5-3.26.17-3.24-.2-3.16-1.36.03-.52.08-1.2-.15-2.06a12.3 12.3 0 0 1-.18-.78c-.12-.56-.16-.8-.75-1.63-.26-.37-.74-.65-1.24-.94-.6-.35-1.22-.71-1.47-1.25-.1-.21 0-.92.12-1.74.2-1.42.43-3.19-.18-3.31-.8 1.18-2.06 2.1-3.31 3.01-1.56 1.14-3.12 2.29-3.82 3.94-1.22 2.86.3 3.98 2.07 5.28.87.64 1.8 1.33 2.49 2.28ZM25.21 60.2c1.68-.4.82-4.15-.44-3.26-.8.56-.77 3.14.44 3.25ZM55.6 35.91ZM-39.74 88.2c.24-.1.46-.27.68-.43.4-.29.82-.59 1.32-.62-.02-.57-2.5-3.04-2.76-3.03l-.06.5c-.16 1.27-.56 4.26.82 3.59ZM66.99-3.94c-.29-.31-.57-.63-.92-.76-.09-.04-.1-.08-.13-.11a.26.26 0 0 0-.04-.05c4.93 0 3.18 2.35 1.87 1.62-.29-.15-.54-.43-.78-.7ZM88.29 122.17c.14.1.03.05-.16-.03-.3-.13-.8-.34-.8-.19-.01.43 2.33 1.18.96.22ZM-32.66 77.55c.3.18.58.35.9.44 1.47.41-2.51.23-2.02-.92.41.06.77.27 1.12.48Z"/></g><path d="M146.72 95.46c-.16.3-.3.57-.35.7 2.15.2 2.73 13.63-4.7 10.83-.65-.25-1-1.85-1.4-3.64-.8-3.58-1.76-7.9-5.6-3.63-1.26 1.4-.54 3.23.18 5.05.83 2.1 1.65 4.18-.53 5.6-3.24 2.1-4.6-.3-5.97-2.75-1.03-1.81-2.06-3.65-3.9-3.67 3.2 2.08 3.08 8.06 2.99 12.56-.03 1.64-.06 3.09.08 4.08a3.87 3.87 0 0 0 1.87-.63 3.42 3.42 0 0 1 1.93-.6c1.2.08 2 .62 2.82 1.17.37.25.73.5 1.13.7.31.16.68.43 1.08.71 1.2.86 2.73 1.95 4.1 1.34.42-.2.5-.97.57-1.83.1-1.05.2-2.22.97-2.6 1.55-.73 1.53.95 1.51 2.6-.01 1.05-.03 2.09.35 2.51 1.36 1.54 7.6 1.89 9.7 1.9.05-.89-.06-1.55-.14-2.06-.18-1.09-.25-1.56 1.41-2.24 2.63-1.06 7.26 1.84 8.77 3.05.32.26.4.77.48 1.23.06.4.12.76.3.88.65.41 6.09.27 6.46.2 2.22-.47 3.63-1.9 3.03-4.86-.48-2.38-2.85-3.47-5.25-4.57-2.57-1.2-5.18-2.39-5.54-5.2-.09-.66.27-1.47.61-2.27.27-.62.54-1.24.58-1.76.07-.8-.1-1.63-.27-2.45-.22-1.07-.44-2.13-.15-3.15.18-.62 3.65-4.84 4.01-4.96h.03-.03c-.6-.01-1.13-.23-1.65-.45a4.27 4.27 0 0 0-1.77-.45c-.1-.02-.42.6-.77 1.31-.46.91-1 1.99-1.28 2.07-3.05.9-2.28-1.25-1.72-2.8.16-.46.3-.86.33-1.12.1-1.1-.09-2.15-.28-3.2-.14-.73-.28-1.47-.31-2.22-.03-.56.1-1.07.23-1.58.17-.7.35-1.39.1-2.2-.05-.16-.68-.01-1.28.12-.53.13-1.03.25-1.04.12-.11-.71.15-1.83.41-2.95.65-2.73 1.3-5.48-3.47-2.33-2.43 1.61-3.42 3.92-4.43 6.27-.86 2.02-1.74 4.07-3.56 5.72.09.02-.32.8-.64 1.44ZM-35.67 117.64c1.35-.73.57-1.37-.36-2.15-.94-.77-2.03-1.67-1.31-2.92.46-.8 1.54-.97 2.65-1.15 1.14-.17 2.3-.36 2.85-1.2.8-1.2.48-2.06.17-2.9-.37-.96-.73-1.9.75-3.32 1.04-1 2.01-1.32 2.86-1.6 1.26-.41 2.23-.73 2.7-3.04.7-3.53-1.06-5.88-2.74-8.12-1.9-2.54-3.7-4.94-1.71-8.77l.32-.6c1.05-1.87 2.87-5.15-.6-6.25-2.52-.8-2.37.12-2.21 1.07.11.71.24 1.45-.78 1.49.21.58-2.85-.1-2.47-.96-.8-.1-1.2-.54-1.58-.97-.55-.63-1.08-1.22-2.78-.68-1.7.53-1.97 2.16-2.2 3.49l-.01.1c-.34 2 .56 3.74 1.43 5.41.72 1.4 1.42 2.74 1.37 4.16v.53c.01.36.02.64-.16 1.12-.56.4-1.2.56-1.92.46-1.1-.23-1.41.2-.92 1.3-.97 1.89-.6 5.1-.29 7.92.15 1.27.29 2.47.29 3.44 0 .67-.12 1.78-.25 3.09-.35 3.41-.84 8.14.25 9.54.63.81 5.57 2.1 6.66 1.5ZM-35.55 66.22c.26 1.76.6 4.05-2.25 3.3-2.03-.53-1.8-2.59-1.59-4.48.25-2.2.47-4.18-2.94-3.26V46.16l.81.08c3.02.28 10.07.94 7.68-3.74 1.94 1.71 4.07.16 5.8-1.1 1.17-.86 2.17-1.59 2.8-1.05-.15-.13-.54 1.24-.92 2.62-.35 1.23-.7 2.47-.88 2.64-.6.56-1.93.72-3.32.88-2.13.26-4.37.53-4.2 2.27.28 2.95 4.55 1.8 8.07.85 2.06-.55 3.86-1.04 4.49-.61.9.63-.22 2.95-1.22 5.04-.55 1.13-1.07 2.2-1.2 2.88-.08.4-.06.82-.04 1.24.03.86.07 1.71-.73 2.4-1.41 1.24-2.72.9-4.06.55-.8-.2-1.6-.41-2.45-.3-3.52.48-3.85 1.19-3.99 4.1-.01.33.06.8.14 1.3ZM-39.65 2.34c1.08.06 2.14.12 3.3.05.61-.03 1.08-.15 1.52-.25.72-.18 1.34-.33 2.4-.03 1.35.39 5.2 3.24 2.4 4.12 4.07-1.28 7.96-4.5 3.63-7.6a35.47 35.47 0 0 0-4.02-2.13l-.41-.2-.25-1.13h-2.81c-1.67-.26-3.81-.17-5.8-.08-.94.04-1.84.08-2.64.08 0 .75.63 1.11 1.31 1.5.94.54 1.97 1.13 1.5 2.84-.16.62-.78.93-1.4 1.23-.7.36-1.41.71-1.41 1.52.94-.01 1.81.04 2.68.09ZM75.74 89.64c-.64.2-1.28.38-1.88.08-.95-.49-1.67-2.34-2.34-4.05-.44-1.1-.84-2.15-1.28-2.72a31.61 31.61 0 0 0-2.37-2.68c-1.8-1.9-3.6-3.76-4.1-6.38-.8-4.08 1.87-7.33 4.54-10.44.2-.21.39-.49.6-.77.95-1.35 2.07-2.92 3.32-.01.64 1.5-.47 2.67-1.56 3.82-.92.96-1.82 1.91-1.65 3.02.49 3.17 3.98 2.13 6 .86.7-.44.98-1.07 1.2-1.58.42-.96.65-1.5 3.15.4 1.18.9 1.65 2.16 2.12 3.42.53 1.48 1.08 2.95 2.76 3.8 3.54 1.77 6.12-.73 5.4-3.82-.45-1.86-2.1-3.5-3.7-5.07a21.31 21.31 0 0 1-2.52-2.78c-3.18-4.59-1.47-14.68 7.06-13.6 2.76.35 4.36 2.65 5.82 4.76.57.8 1.1 1.59 1.69 2.21l.31.34c1.06 1.16 2.83 3.12 4.57 3.06 1.26-.04 1.3-.43 1.33-1 .03-.45.08-1.03.83-1.61l.41-.37c.85-.78 2.48-2.3 2.8-1.27.23.71-.72 1.46-1.56 2.12-.48.37-.92.72-1.1 1.02-1.32 2.24-.85 4.43-.35 6.75l.15.73c.25 1.2.4 2.4.55 3.63.23 1.84.45 3.7 1.01 5.45.27.84.64 1.61 1.01 2.37.63 1.29 1.24 2.55 1.27 4.03l.04 1.49c.03 1.55.08 3.21.06 4.59v.88c.04 1.3.05 1.57-1.79 2.7-1.73 1.07-3.91 1.47-6.1 1.87-1.87.34-3.75.68-5.34 1.45 2.3-1.11.35-4.84-1.18-7.78a17.3 17.3 0 0 1-1.34-2.93c-1.16-4.55-4.38-6.19-6.15-.98-.82 2.43-2.06 2.85-3.31 3.28-1.06.36-2.11.72-2.94 2.28-.4.78-.6 1.53-.74 2.11-.32 1.3-.44 1.76-2.36-.15-.2-.2-.1-.6 0-1.03.1-.54.24-1.11-.14-1.4-.7-.53-1.45-.3-2.2-.08ZM25.66 16.46c.54 1.21.52 2.44.5 3.67-.03 1.38-.06 2.76.7 4.13.61 1.1 1.61 1.93 2.6 2.76l.51.42c.41.35.96.74 1.55 1.17 2.42 1.75 5.66 4.08 4.08 6.54.34-.53 4.75-2.96 5.7-3.3 3.63-1.33 4.96-.18 6.09 3.17.14.43.21 1.07.29 1.8.23 2.2.55 5.15 3.35 4.88 1.63-.16 1.9-1.75 2.16-3.24.17-1.03.34-2 .93-2.45-2.13-.01-1.93-.62-1.66-1.43.13-.4.28-.84.18-1.29.36-.65.52-1.33.48-2.05a4.56 4.56 0 0 0-1.5-2.17c-.82-2.95.11-3.4 1.89-4.26.76-.37 1.68-.82 2.69-1.58 3.57-2.68 4.55-8.87.69-12.03-1.7-1.4-3.33-1.1-4.95-.8-1.3.25-2.58.49-3.89-.14-1.35-.65-1.3-1.27-1.23-1.99.05-.45.1-.95-.2-1.51-.91-1.73-1.92-2.59-3.4-3.85l-.66-.56C39.63-.19 36.29-2.2 31.83 0c-1.94.96-2.21 2.02-2.59 3.45-.1.4-.21.82-.37 1.28-.5 1.5-1.24 2.28-2 3.1-.47.49-.95 1-1.41 1.69-1.7 2.56-1.03 4.2.2 6.94ZM50.53 97.14c-.37-.83-.74-1.65-.51-2.4 2.43-.23 3.76 1 5.17 2.3.6.56 1.22 1.13 1.95 1.6 1.34.89 2.86 1.58 4.37 2.26 1.13.52 2.26 1.03 3.32 1.62 2.52 1.41 2.85 2.23 3.3 3.39.27.67.58 1.45 1.39 2.52.36.47 3.83 2.75 3.85 2.73-3.75-.03-2.96 1.2-1.95 2.76.63.99 1.36 2.11 1.1 3.15-.4 1.69-6.91 6.12-9.06 5.43-2.88-.92-1.54-2.37-.2-3.82.75-.82 1.5-1.64 1.5-2.36-.02-2.16-4.89-6.58-7.49-6.43-2.08.11-2.01.72-1.93 1.45.02.23.05.48 0 .73-.1.6.1 1.08.29 1.57.33.82.67 1.68-.32 3.22-1.85 2.87-5.83 6.43-9.5 6.52-.96.02-5-.91-5.56-1.6-.15-.2-.27-.34-.37-.45-.24-.28-.34-.4-.33-.5 0-.07.07-.14.18-.25.18-.2.49-.52.87-1.25.47-.88 1.24-1.7 1.98-2.47 1.9-2 3.62-3.8-.54-6.07 5.2 2.82 6.64-3.24 7.4-6.42l.1-.47c.13-.5.4-1.22.7-1.96.41-1.05.84-2.16.87-2.78.03-.65-.28-1.33-.59-2.02ZM-7.8 5.76c.62-1.68-4.45-3.7-5.84-3.85-1.4-.15-2.72.25-4.06.66-1.03.31-2.07.62-3.13.68l.5.3C-17.51 5.2-9.36 10.02-7.8 5.76ZM127.24 37.29c-2.09-1.27-10.33-4.32-11.54-1.56-.16.37-1.55-1.53-1.65-1.74-.7-1.55 0-3 .7-4.43a24 24 0 0 0 .44-.93c.2-.48.44-.93.68-1.38.58-1.11 1.15-2.2 1.22-3.49.04-.87-.33-1.75-.69-2.61-.38-.92-.75-1.82-.62-2.68.29-1.82 1.1-2.1 2.2-2.5.57-.19 1.21-.42 1.9-.9 1.67-1.13 1.8-1.67 2.09-2.77.09-.36.2-.78.38-1.3.29-.83.47-1.95.66-3.11.3-1.8.62-3.71 1.36-4.86.92-1.4 1.49-1.38 2.45-1.32a7.1 7.1 0 0 0 1.86-.08 10 10 0 0 0 1.94-.7c1.15-.51 2.38-1.05 3.28-.86.37.07.84.67 1.4 1.38.73.9 1.6 2 2.55 2.38.82.34 1.82.26 2.8.2.9-.07 1.8-.14 2.45.15 1.26.56 1.52 1.27 1.83 2.1.2.53.42 1.12.96 1.77.44.53.94.91 1.42 1.29a5.74 5.74 0 0 1 1.95 2.16c.3.65.28 1.25.26 1.8-.05.98-.08 1.78 1.85 2.37l-.19.19c-1.9 1.94-8.68 8.87-11.31 8.51-2-.27-1.93-1.88-1.85-3.4l.02-.85c0-.67.04-1.34.08-2.02.15-2.15.28-4.29-1.12-6.25-1.96-2.73-4.45-3.42-6.23-.42a5.04 5.04 0 0 0-.56 2.08c-.1.9-.2 1.8-.91 2.6-.63.72-1.36 1.01-2.1 1.32-.47.19-.96.38-1.42.7-3.4 2.22-6.44 5.64-5.11 9.76.94 2.93 2.6 2.98 4.49 3.05 1.36.04 2.84.09 4.27 1.2.73.57.94 1.13 1.16 1.68.28.72.54 1.4 1.95 2 1.2.5 2.63.45 4.05.4 1.09-.04 2.17-.08 3.15.13-.91.52-3.35 4.7-2.85 4.36-3.56 2.98-5.53.76-7.4-1.35-.73-.83-1.44-1.63-2.23-2.1Z" fill="#000" fill-opacity=".2"/><g fill="#000" fill-opacity=".1"><path d="M109.88 125c-.42-1.6-4.19-2.3-5.67-1.5-4.74 2.55 6.75 5.59 5.67 1.5ZM68.14 124.62c-.2-1.48-3.03-3.74-4.87-2.4-1.17-.44.56 2.75.85 3.04 1.53 1.56 4.41 2.3 4.02-.64ZM38.4 123.25c-.57-.2-1.24-.37-1.95-.54-2.03-.49-4.33-1.05-5.1-2.82-.4-.9.26-2.16.92-3.41.86-1.65 1.73-3.29.17-4.12-1.8-.96-2.35.26-2.9 1.48-.28.63-.56 1.26-1.02 1.59-4.52 3.19-4.05.28-3.66-2.18.16-1 .3-1.92.11-2.34-.39-.88-1.36-1.33-2.34-1.78-.76-.35-1.51-.7-1.98-1.26-.82-.95-.75-2.15-.7-3.26.09-1.65.16-3.06-2.77-3-6.28.12-3.54 4.87-1.38 8.61.86 1.5 1.63 2.83 1.7 3.64.1 1.34-.7 2.2-1.48 3.03-.65.7-1.3 1.37-1.37 2.3-.15 1.7 5.21 5.78 5.96 5.56.91.2 2.84.95 1.06 1.68h12.76c.33 0 .71.02 1.1.04 1.33.09 2.78.17 3.2-.61.21-.4.18-2.43-.34-2.61ZM128.02 117.12c-.42 2.86-.83 5.6 3.2 7.24 2.48 1.01-2.12 2.56-3.9 2.07-2.48-.69-3.08-1.86-3.46-4.18-.08-.5 0-1.05.08-1.61.22-1.52.44-3.04-2.53-3.18-2.4-.12-2.53.8-2.24 2.62 0 .05-3.92-.42-3.95-.44-.98-1.12-.4-1.58.2-2.04.33-.26.66-.52.71-.9.23-1.6.34-4.56-2.51-5.45-1.19-.37-2.27-.1-3.33.18-1.36.35-2.69.69-4.15-.4-.52-.39-.81-2.33-1.01-3.68-.12-.75-.2-1.32-.28-1.34.36-.54-1-1.2-2.34-1.85-.97-.48-1.92-.94-2.16-1.34-1.48-2.46 1.52-2.95 4.24-3.4.98-.16 1.94-.31 2.61-.55 1.05-.38 1.8-.71 2.4-.98 1.82-.81 2.1-.93 4.79.65.76.45 1.58 1.07 2.4 1.68.63.47 1.26.94 1.84 1.32-.73.15 3.81 1.89 3.44 1.7.82.4 1.34.6 1.7.73.31.1.5.17.65.3.25.18.39.5.76 1.36l.3.67.25.58c.74 1.65 1.8 4.03 2.31 5.68.46 1.45.22 3.03 0 4.57ZM-40.75 36.57c2.64-.71 4.17 1.8 5.4 3.83.82 1.38 1.52 2.52 2.33 2.26 2.14 1.9 4.2.16 5.92-1.27a9.27 9.27 0 0 1 1.78-1.3c-.11-.06 4.77 1.12 3.78 1.32 6.55 2.28 6.63-2.85 6.7-7.32.02-1.93.05-3.74.6-4.78.98-1.87 2.36-2.59 4.62-3.4.8-.29 1.67-.45 2.54-.62 1.82-.34 3.63-.68 4.66-2.13.19-.27.38-1.12.5-1.72.08-.35.14-.61.17-.62-.58-.15-4.68-1.48-5.1-1.84-.4-.33-.5-.91-.59-1.44-.08-.45-.15-.86-.38-1.07a13.4 13.4 0 0 0-1.96-1.35c-1.07-.65-2.06-1.25-2.84-2.57-.34-.56-.5-1.22-.67-1.86-.41-1.58-.81-3.11-3.5-3.17-2.17-.04-3.46 1.7-4.14 3.18-.3.67-.22 2.52-.13 4.61.22 5.1.5 11.58-4.56 5.58a5.4 5.4 0 0 1-.84-1.33c-.27-.55-.45-.93-1.8-1.7a3.27 3.27 0 0 0-1.65-.35c-.78-.02-1.52-.04-2.18-.99-.68-.98-.34-1.91-.14-2.47.23-.62.28-.77-1.49.05-4.11 1.9-4.27 6.15-4.4 9.71-.03.7-.06 1.39-.12 2.02a14.87 14.87 0 0 1-1.96 6.18c-.99 1.63-3.19 5.25-.55 4.55ZM40.36.37c.74 1.07 1.7 1.79 2.7 2.54.47.34.94.7 1.4 1.1.28.22.58.42.89.62.6.39 1.2.78 1.52 1.4.26.49.16 1.15.07 1.82-.1.76-.21 1.52.22 2.02 1.21 1.4 2.86 1.06 4.6.71 2.3-.47 4.76-.97 6.52 2.6 1.27 2.55 1.89 6.22.24 8.7-.7 1.05-2.23 1.77-3.73 2.47-1.88.89-3.7 1.75-3.83 3.19-.07.83.55 1.44 1.18 2.06.56.55 1.13 1.11 1.28 1.87.13.64-.2 1.4-.52 2.12-.6 1.42-1.16 2.69 1.84 2.61-.05-.02 0-.04.04-.05l.03-.02a4 4 0 0 0 .79-.3c.52-.22 1.16-.5 1.4-.5l.33-.34c.92-.96 3.5-3.65 4.81-3.52 2.58.23 3.58 5.36 2.2 5.62.58.1 1.03.43 1.49.76.81.59 1.67 1.21 3.43.67 1.39-.43 1.73-1.03 2.18-1.83.15-.27.31-.56.53-.86.66-.95 1.03-1.6 1.27-2 .25-.42.36-.6.5-.63.1-.03.21.03.42.14a8.2 8.2 0 0 0 2.5.77l.06-.3c.2-1.15.27-1.6.12-1.94-.1-.22-.29-.4-.6-.69-.24-.23-.57-.54-.98-1-.53-.57-1.14-1.1-1.74-1.63-.43-.38-.86-.76-1.27-1.15-.5-.5-5.13-5.41-4.17-5.65-.93-.17-1.02-2.44-1.11-4.62-.07-1.52-.13-3-.47-3.68-.35-.68-.9-1.27-1.45-1.85-.45-.47-.9-.94-1.23-1.46-.9-1.4-1.04-3.03-1.18-4.7-.14-1.59-.28-3.2-1.1-4.65-.2-.37-.55-.69-.9-1-.33-.3-.66-.59-.86-.93-.13-.23-.37-.45-.6-.65a5.04 5.04 0 0 1-.38-.36c-.7-.78-.78-1.2-.83-1.45a.7.7 0 0 0-.06-.2c-.12-.2-.48-.28-2.2-.6v-.01c-3.15-.61-12.12-.32-14.6 1.74-.35.3-.71 1.1-.99 1.7-.18.4-.32.72-.4.74.37.18.49.36.61.54l.04.05ZM168.56 110.33c-.52 2.23 1.1 4.08 3.18 5.07 1.07.51.98 1.45.87 2.57-.04.37-.08.75-.08 1.15-2.47-.01-7.4-2.84-8.96-4.83-1.63-2.09-1.13-3.1-.36-4.64.24-.46.49-.97.71-1.57.44-1.16.6-2.33.76-3.41.4-2.81.7-4.97 5.53-4.54 0 .55-.33.87-.67 1.22-.45.46-.93.95-.72 2.06.13.7.62 1.09 1.11 1.47.7.55 1.38 1.09 1.02 2.51-.14.55-.64.97-1.16 1.4-.53.46-1.08.92-1.22 1.54ZM10.62 2.44c.85.1 1.48.38 2.1.65.85.38 1.67.75 3.02.6 1.15-.11 2.03-.67 2.92-1.23.51-.33 1.03-.66 1.6-.9 1.4-.58 3.8-.84 6.43-1.12C31.97-.1 38.13-.76 38.68-4.4c-.9 0-2.25-.09-3.83-.19-4.88-.3-11.82-.74-13.43.82-.83.8-.72 1.47-.62 2.04.14.8.24 1.4-2.53 1.86-.9.15-1.56-.09-2.22-.32-1-.37-2-.72-3.86.3-.27.15-3.62 2.1-1.58 2.34ZM162.37 32.42c.58-1.44 1.49-3.74 2.94-3.83.52.44 1.18 1.41 1.77 2.28.5.74.96 1.4 1.22 1.6 1.21.88 1.55.84 2.5.73.42-.04.96-.1 1.73-.1 0 2.23-.61 3.37-1.32 4.68-.46.86-.97 1.8-1.36 3.18-.04.14-.08.41-.12.76-.2 1.7-.63 5.14-3.16 3.16-.62-.49-.64-1.98-.66-3.73-.04-3.23-.1-7.36-3.93-7.81.11-.2.24-.53.4-.92ZM102.33-.92c0 3 1.28 10.24 6.03 5.19 1.17-1.24 2.12-6.23 1.52-7.46-1.78-3.67-7.55-1.14-7.55 2.28ZM-39.18 121.74c-.62-.97-1.22-1.9-1.86-2.36-.59-.43-.5-1.74-.45-2.75.02-.27.04-.53.04-.74.82-.04 1.74.4 2.68.86 1.33.64 2.7 1.31 3.94.64 1.94-1.04.71-1.63-.52-2.22-.67-.32-1.34-.64-1.51-1.04-1.9-4.42 1.88-2.01 3.4-1.04.32.2.54.34.59.34-.46.6-.3 2.25-.12 4.1.34 3.57.76 7.94-2.85 7.48-1.33-.17-2.37-1.77-3.34-3.27ZM-39.86 76.85c.39-.54.8-1.12 1.2-1.43.27-.2.82-.06 1.3.07.37.1.7.2.83.1.23-.15.24-.4.26-.63 0-.23.02-.45.2-.58.52-.35 2.56-1.95 2.54-2.53-.04-1.38-1.35-1.7-2.67-2.02-.95-.23-1.9-.46-2.35-1.1-.12-.16-.05-.9.04-1.86.24-2.67.64-6.97-2.53-5.03-.65-.21-.04 16.33.15 16.21.3-.18.65-.68 1.03-1.2ZM140.32 121.53c.32-2.06.62-4 3.36-3.26.21.05-.09.84-.45 1.8-.55 1.43-1.23 3.23-.5 3.4-.34.06-.38.48-.41.88-.02.2-.03.39-.09.52-.7 1.7-.86 1.7-2.44 1.61-.45-.02-1.01-.05-1.73-.05.1-.05-.5-.82-.65-.94 2.3-.06 2.61-2.07 2.9-3.97ZM137.39 125.49h.02c-.02-.02-.03-.03-.02 0ZM126.5-1.19a7.7 7.7 0 0 0-.07-2.35 11 11 0 0 0-.45-.86h.36c2-.02 7.66-.07 4.51 2.37-.97.76-3.05.86-4.34.84ZM139.1-3.8s3.3 1.83 3.43 1.4c.65-2.3-1.46-2.17-3.33-2.05-.4.02-.8.05-1.14.05.42.09.76.29 1.03.6Z"/><path d="M-4.91 63.96c.48.84.96 1.69 2.06 2.19C.05 67.47.1 68.09.2 69.13c.07.62.14 1.38.82 2.52 1.65 2.79 5.81 2.6 9.11 2.44.68-.03 1.31-.06 1.88-.06.74 0 1.26.03 1.68.06 1.3.08 1.44.1 3.13-1.4.7-.6 1.37-1.32 2.06-2.05.78-.83 1.59-1.67 2.45-2.41 1.86-1.6 6.16-5.62 3.02-7.85 1.53-.35 1.06-3.02-.02-3.61.13-.05 1.46-3.25 1.39-3.42.7.04 1.36.22 2 .39 1.41.37 2.71.72 3.96-.53 1.08-1.07.73-2.62.38-4.18-.3-1.3-.6-2.62-.04-3.64 1.55-2.89 6.63-3.17 9.3-1.44 1.82 1.19 6 5 7.16 6.77 1.98 3.02 1.2 5.71-2.95 5.6-1-.02-1.73-.46-2.26-.78-.79-.48-1.13-.69-1.32 1.15-.08.8.76 1.85 1.45 2.69a11.22 11.22 0 0 1 .97 1.33c1.77 2.7 2.49 3.8 1.15 7.08-.06.17-.13.33-.2.48-.95 2.34-1.28 3.15-.37 5.83 1.05 3.08 1.34 4.39 1.09 7.64l-.06.51c-.16 1.36-.42 3.6 1.87 3.93-.35.53-1.66 4.38-1.34 4.75-1.96-.24-2.27.13-2.85.8-.37.44-.85 1-1.91 1.61-.75.42-1.69.53-2.64.63-1.33.15-2.68.3-3.54 1.33-.78.93-.8 2.45-.84 3.94a9.36 9.36 0 0 1-.37 3c-.58 1.53-1.37 3.41-3.36 4.1-4.8 1.64-4.42-2.59-4.15-5.55.04-.5.09-.98.1-1.38.16-5.04.23-10.4-.73-15.26-.98-4.94-1.8-3.05-2.9-.5-.2.5-.43 1.02-.67 1.51a7.4 7.4 0 0 1-1.79 2.16 7.71 7.71 0 0 0-1.68 1.97c-.31.59-.28 1.2-.26 1.78.04.82.08 1.6-.78 2.22-.65.48-1.41.32-2.11.17-.58-.12-1.11-.23-1.5.03-.73.51-.84 1.94-.96 3.41-.16 2.1-.33 4.3-2.35 4.05-1.98-.24-2.16-2.3-2.31-4.03-.11-1.23-.2-2.29-.9-2.42.37-.1.82-.22 1.3-.33 3.1-.74 7.47-1.78 1.43-3.86 1.85-.18 1.31-2.45 1.07-3.5l-.05-.2c-.07-.3-.42-.55-.77-.8-.36-.25-.73-.52-.79-.84-.12-.72.07-1.08.26-1.44.14-.26.28-.52.3-.91.01-.53.07-1.03.11-1.48.2-1.98.3-3-2.86-1.4-.9.45-1.1 1.07-1.27 1.56-.22.67-.36 1.09-2.16.43-.06-.2-.22-.3-.48-.34-.27.08-.7-.22-1.21-.58-.78-.54-1.74-1.2-2.58-.85-1.66.7-1.03 1.9-.47 2.98.21.4.42.8.49 1.13.55 2.58.2 2.75-.6 3.13-.58.28-1.38.66-2.24 2.1-.71 1.2-.26 2.4.17 3.5.57 1.48 1.09 2.83-1.21 3.87-5.86 2.66-6.78-3.52-6.04-6.46l.08-.34c.8-3.2 1.4-5.58-.11-8.87-1.04-2.26-2.75-3.59-4.58-5.02a31.58 31.58 0 0 1-2.8-2.36c-3.43-3.38-3.7-7.4.22-10.64 3.14-2.6 7.36-3.36 10.65-.65.54.45.88 1.04 1.22 1.63ZM86.86 16.93c.45.21 1.04 1 1.64 1.81.56.75 1.14 1.52 1.63 1.89.6.45 1.26.79 1.9 1.12 1.04.56 2.06 1.1 2.8 2.08 3.04 4.1.8 6.84-1.88 10.1l-.1.11c-2.9 3.54-4.47 14.02-1.33 17.42.5.54 1.28.95 2.1 1.38.9.47 1.85.97 2.5 1.68.39.42.63.92.88 1.42.23.46.46.93.8 1.33 1.22 1.44 4.02 4.31 6.14 4.43.44-2.45 1.27-3.31 3.72-4.66 3.3 1.12 4.88-6.03 4.72-6.91-.32-1.77-1.37-4.19-3.9-4.25-2.3-.06-2.76 1.15-3.21 2.36-.3.78-.58 1.56-1.37 2-2.46 1.36-2.85.26-3.46-1.48a29 29 0 0 0-.32-.88c-.24-.6-.33-1.11-.42-1.58a3.98 3.98 0 0 0-1.1-2.37 5.33 5.33 0 0 0-1.8-1.06c-.85-.36-1.7-.73-2.14-1.46-2.07-3.5 1.1-6 3.99-8.28 1.3-1.02 2.53-2 3.22-3-.17-.06 6.45-2 7.03-2.1.38-.07.87-.13 1.39-.19 2.34-.27 5.48-.63 3.8-2.41-.62-.68-1.64-.9-2.7-1.11-1.22-.26-2.5-.53-3.3-1.53-1.03-1.27-.77-2.71-.5-4.13.2-1.14.4-2.26-.08-3.27-1.42.03-2.77.55-4.1 1.06-2.34.9-4.62 1.79-7.15-.15-1.72-1.33-1.57-3.06-1.41-4.78.12-1.39.25-2.77-.6-3.93-.39-.54-.53-.8-.6-.92-.02-.06-.03-.08-.05-.09l-.03.02c-.08.05-.3.2-1.34-.01-3.03-.65-3.15-.21-3.45.88-.1.35-.2.78-.44 1.25-.47.93-2.52 7.7-1.48 8.2ZM10.6 33.44c-3.42.87-5 .75-9.52.13-.56-.05-1.1-.07-1.66-.05.64-.48 4.78-5.6 4.68-5.67.13.08.02.67-.1 1.32-.12.74-.26 1.56-.1 1.77.7.84 2.58 1.16 4.26 1.46.95.16 1.83.32 2.4.55-.2.1-.18.27.04.5ZM79.33 20.15c.03 0 .16.08.35.19.61.35 1.83 1.05 1.84.89.04-.62.63-1.3 1.19-1.97 1.04-1.22 2.02-2.37-.54-2.88-2.15-.42-4.12 2.14-4.37 3.53.54-.03 1.05.05 1.53.24ZM118.27 70.9a24.6 24.6 0 0 0-2.77-2.67c-2.59-1.07 2.46-6.6 4.3-8.62l.51-.57c.58-.67 1.67-2.92 2.66-4.95.92-1.92 1.76-3.64 1.98-3.66.62-.06 2.05 9.72 2.81 14.88.22 1.49.38 2.6.45 2.97l.1.51c.44 2.3.93 4.86-.84 6.78-1.56 1.69-5.46 3.05-7.56 1.36-1.1-.88-1.12-2.12-1.13-3.35a5.16 5.16 0 0 0-.5-2.67ZM159.65 16.33c.22.93 1.78 3.29 2.94 3.32.06-.43.78-1.77 1.51-3.12.8-1.5 1.61-3 1.5-3.22-1.15-2.31-6.57.33-5.95 3.02ZM79.07 25.5c.63.42 1.3.84 1.67 1.38.72 1.03-.08 3-1.72 2.95.13-.54-.15-1.39-.43-2.25-.34-1.03-.68-2.08-.33-2.61l.8.54ZM136.95 74.33c.54 1.43 1.05 2.8 1.32 3.25.4.66.87 1.3 1.34 1.96.74 1.03 1.5 2.06 1.98 3.16 1.2 2.68.71 4.72.2 6.84-.36 1.54-.73 3.11-.47 5 .68 4.82 4.12 2.8 5.67-.43-1.37-.18 1.95-6.67 3.6-8.01.3-.26.76-.7 1.3-1.23 2.12-2.07 5.63-5.5 7.4-4.22 1.62 1.17.7 2.52-.2 3.86-.63.94-1.26 1.87-1 2.72.04.18.62.01 1.06-.12.3-.09.53-.16.55-.11.01.03.11.05.26.07.32.06.86.15 1 .62.1.32-.07.7-.23 1.06-.14.3-.27.6-.22.84.36 1.7.13 3.27-.1 4.9-.13.93-.27 1.88-.3 2.89-.2 5.7 1.44 2.6 2.6.4.44-.83.8-1.53 1-1.6-2.04-1.62-1.4-7.4 1.75-8.04 1.3-.26 2.33.32 3.29.87 1.22.7 2.33 1.33 3.77.05.56-.49.1-7.65-.2-7.9-.47-.4-1.5-.53-2.45-.66a9.14 9.14 0 0 1-1.5-.27c-1.31-.44-6.6-2.23-2.77-3 .9-.18 1.86.33 2.81.84 1.09.57 2.17 1.14 3.17.73 1.94-.8 1.43-8.67 1.11-13.53-.1-1.35-.17-2.47-.17-3.14-2 .05-3.64 2.87-4.19 4.25-1.56 3.92-2.2 5.05-7.02 7.43a57.6 57.6 0 0 0-3.55 1.73l-.02.01c-.3.18-.76.17-1.2.16-.47 0-.9-.02-1.1.2-.25.28-.1.92.08 1.63.24.96.5 2.06-.09 2.7-2.03 2.16-3.39.77-4.94-.83l-.62-.62-.8-.76c-1.02-.95-2.35-2.2-2.83-3.06-1.66-2.96.06-3.47 2.02-4.05 1.55-.46 3.26-.96 3.52-2.78.18-1.32-1.54-2.18-3.3-3.05-.94-.48-1.9-.96-2.56-1.51-.45-.38-.77-.85-1.09-1.32-.56-.81-1.12-1.63-2.37-1.98-4.87-1.36-11.02 8.46-7.25 10.07.28.12 1.02 2.09 1.72 3.96ZM58.31 125.53c-.3-3.3-5.79-.12-7.35.79l-.2.1h7.62l-.07-.9ZM117.73 125.89c.52-.17 2.31-2.67 2.55-3.2a2.8 2.8 0 0 0-.15.73c-.12 1-.3 2.42-2.4 2.47Z"/></g>',circuits:(t,l)=>'<path d="M15 0h-4v18h4V0ZM23 0h-4v34h53.42a5 5 0 1 0 0-4H23V0Z" fill="#000" fill-opacity=".1"/><path d="M122 34.58a5 5 0 1 0-4 0V64h23v-4h-19V34.58Z" fill="#fff" fill-opacity=".2"/><path d="M114 46h-4v26h31v-4h-27V46ZM27 103.58a5 5 0 1 1 4 0V133H8v-4h19v-25.42Z" fill="#000" fill-opacity=".2"/>',dirty01:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd" fill="#000"><path d="M-9.12 122.1c4.36-30.7 13.06-4.57 33.99-9.98 9.24-2.39 1.77-12.82 8.67-17.35 5.82-3.82 13.76-.74 20.43-3.21 9.63-3.57 9.5-10.82 18.48-11.9 8.48-1.03 17.37 2.34 25.93 1.08 16.15-2.4 9.53-34.03 21.64-39.61 12.1-5.6 32.05 4.06 34.66 19.87 2.54 15.42-14.46 72.78-14.46 72.78H-9.12" fill-opacity=".2"/><path d="M35.93 122c37.67 0 41.6-14.75 60.14-21.5 18.53-6.76 34.78 10.71 41-6.27 6.24-16.98 6.2 35.95 6.2 35.95H35.94V122Z" fill-opacity=".1"/><path d="M-2 4.87C9.73 3.75 5.96 16.8 10.6 16.8c1.85 0 4.03-8.46 7.38-8.46 2.46 0 2 5.5 7.32 4.91 5-.54 4.08-4 6.6-4 5.45 0 3.39 20.2 7.74 20.2 4.36 0 5.73-14.8 7.65-20.64 2.43-7.4 16.97-11.56 6.6-14.5H-2.29" fill-opacity=".4"/></g>',dirty02:(t,l)=>'<g fill-rule="evenodd" clip-rule="evenodd" fill="#000"><path d="M100 124.65c-3.19-17.34-9.55-2.58-24.85-5.63-6.76-1.35-1.3-7.25-6.34-9.8-4.26-2.17-10.06-.43-14.94-1.82-7.04-2.02-6.95-6.12-13.5-6.73-6.2-.58-12.7 1.33-18.97.61C9.6 99.93 14.44 82.06 5.58 78.9c-8.85-3.15-23.43 2.3-25.34 11.23-1.86 8.71 10.57 41.12 10.57 41.12h109.2" fill-opacity=".2"/><path d="M136 116.77c-51.24 0-56.58-25.8-81.8-37.61C29 67.34 6.9 97.9-1.56 68.2c-8.48-29.7-8.43 62.86-8.43 62.86h146v-14.3Z" fill-opacity=".1"/><path d="M141.57 3.18c-11.93-.98-5.03 10.8-9.74 10.8-6.97 0-2.1-7.97-10.58-7.78-2.22.06-4.95 1.94-5.11 4.5-.37 5.52 3.71 15.03-1.84 15.3-5.18.25-1.1-9.64-1.65-16.24-.3-3.77-4.18-6.75-6.97-6.75-7.57 0-1.68 15.7-7.13 15.7s-1.2-9.05-5.08-13.84C88.97-.7 74.17-3.44 84.72-6h57.15" fill-opacity=".4"/></g>',dots:(t,l)=>'<g fill="#000"><path d="M27.3 65.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM35.7 69.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM35.7 82.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM35.7 94.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM34.1 109.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM49.2 107.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM27.3 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM29.2 101.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM51.1 103.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM42 88.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM39.9 103.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM29.4 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM39.9 77.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM10.5 94.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 84.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM10.5 107.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM2.1 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 100.97a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 90.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM16.8 100.97a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 71.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 65.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM16.8 75.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 96.76a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM23.1 82.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 109.38a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM35.7 119.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM27.3 115.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM42 113.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM8.4 122a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM4.2 113.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM14.7 115.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM23.1 119.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM21 71.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2Z" fill-opacity=".2"/><path d="M117.3 4.2a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM125.7 8.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM125.7 21.03a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM125.7 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM123.6 48.38a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM119.4 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM117.3 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM132 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM129.9 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM119.4 14.72a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM129.9 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM98.4 23.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 46.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM92.1 29.45a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM106.8 27.34a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 42.07a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM100.5 8.41a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM92.1 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM106.8 2.1a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 16.83a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 33.66a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM111 23.14a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 46.28a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM123.6 61a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM132 52.59a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM104.7 54.69a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2ZM113.1 58.9a2.1 2.1 0 1 1-4.2 0 2.1 2.1 0 0 1 4.2 0ZM111 10.52a2.1 2.1 0 1 0 0-4.2 2.1 2.1 0 0 0 0 4.2Z" fill-opacity=".1"/></g>',grunge01:(t,l)=>'<path d="M69.1 77c-.08.01-.09.02-.1.11.09-.01.1-.02.1-.1ZM81.25 107.1l.13-.1c1.9 0-1.25.19-.13.1ZM86 85.11c.09-.01.1-.02.1-.1-.08 0-.09.01-.1.1ZM15 92c.01.09.02.1.1.11 0-.09-.01-.1-.1-.1Z" fill="#000" fill-opacity=".4"/>',grunge02:(t,l)=>'<path d="M29.47 34.03c-.1 0-.19-.06-.26-.12-.08-.07-.14-.12-.13.14.01.5.67-.05.4-.02ZM9.33 48.92s.2-.56.03-.74c-.17.17-.18.42-.03.74ZM7.5 52c.06 0 .57-.28.48-.43-.12-.18-.49.34-.49.42ZM22.9 59.14c-.13-.11-.53-.45-.28-.5.14-.03.5.36.32.54v-.01h-.01l-.03-.03ZM26.33 108.46c.13-.02.66-.36.34-.45-.21-.04-.6.5-.34.46ZM52.63 96.34c-.05.05-.2.09-.34.12-.15.04-.26.07-.16.1.19.06.84.16.5-.22ZM4.76 43.63ZM5.1 71.63l.06-.1c1.02 0-.68.19-.07.1ZM80.53 109.92c.09-.02.1-.02.1-.11-.07.01-.08.02-.1.1ZM29.17 117.78c.08-.02.09-.03.1-.11-.08.01-.09.02-.1.1ZM9.01 49.75c.08-.02.09-.03.1-.12-.08.02-.09.03-.1.12ZM65.84 48.74c.02.09.03.1.1.1 0-.08-.01-.09-.1-.1ZM107.28 76.91c-.08.02-.09.03-.1.12.08-.02.09-.03.1-.12Z" fill="#000" fill-opacity=".2"/>'},b7=Object.freeze(Object.defineProperty({__proto__:null,eyes:y7,face:p7,mouth:g7,sides:h7,texture:x7,top:m7},Symbol.toStringTag,{value:"Module"}));function Qr({prng:t,group:l,values:r=[]}){const i=b7,s=t.pick(r);if(s&&i[l][s])return{name:s,value:i[l][s]}}function v7({prng:t,options:l}){const r=Qr({prng:t,group:"sides",values:l.sides}),i=Qr({prng:t,group:"top",values:l.top}),s=Qr({prng:t,group:"face",values:l.face}),o=Qr({prng:t,group:"mouth",values:l.mouth}),c=Qr({prng:t,group:"eyes",values:l.eyes}),d=Qr({prng:t,group:"texture",values:l.texture});return{sides:t.bool(l.sidesProbability)?r:void 0,top:t.bool(l.topProbability)?i:void 0,face:s,mouth:t.bool(l.mouthProbability)?o:void 0,eyes:c,texture:t.bool(l.textureProbability)?d:void 0}}function S7(t){return t==="transparent"?t:`#${t}`}function w7({prng:t,options:l}){var r;return{base:S7(t.pick((r=l.baseColor)!==null&&r!==void 0?r:[],"transparent"))}}const k7={$schema:"http://json-schema.org/draft-07/schema#",properties:{baseColor:{type:"array",items:{type:"string",pattern:"^(transparent|[a-fA-F0-9]{6})$"},default:["ffb300","1e88e5","546e7a","6d4c41","00acc1","f4511e","5e35b1","43a047","757575","3949ab","039be5","7cb342","c0ca33","fb8c00","d81b60","8e24aa","e53935","00897b","fdd835"]},eyes:{type:"array",items:{type:"string",enum:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},default:["bulging","dizzy","eva","frame1","frame2","glow","happy","hearts","robocop","round","roundFrame01","roundFrame02","sensor","shade01"]},face:{type:"array",items:{type:"string",enum:["round01","round02","square01","square02","square03","square04"]},default:["round01","round02","square01","square02","square03","square04"]},mouth:{type:"array",items:{type:"string",enum:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},default:["bite","diagram","grill01","grill02","grill03","smile01","smile02","square01","square02"]},mouthProbability:{type:"integer",minimum:0,maximum:100,default:100},sides:{type:"array",items:{type:"string",enum:["antenna01","antenna02","cables01","cables02","round","square","squareAssymetric"]},default:["antenna01","antenna02","cables01","cables02","round","square","squareAssymetric"]},sidesProbability:{type:"integer",minimum:0,maximum:100,default:100},texture:{type:"array",items:{type:"string",enum:["camo01","camo02","circuits","dirty01","dirty02","dots","grunge01","grunge02"]},default:["camo01","camo02","circuits","dirty01","dirty02","dots","grunge01","grunge02"]},textureProbability:{type:"integer",minimum:0,maximum:100,default:50},top:{type:"array",items:{type:"string",enum:["antenna","antennaCrooked","bulb01","glowingBulb01","glowingBulb02","horns","lights","pyramid","radar"]},default:["antenna","antennaCrooked","bulb01","glowingBulb01","glowingBulb02","horns","lights","pyramid","radar"]},topProbability:{type:"integer",minimum:0,maximum:100,default:100}}},C7={title:"Bottts",creator:"Pablo Stanley",source:"https://bottts.com/",homepage:"https://twitter.com/pablostanley",license:{name:"Free for personal and commercial use",url:"https://bottts.com/"}},E7=({prng:t,options:l})=>{var r,i,s,o,c,d,m,p,x,y;const v=v7({prng:t,options:l}),S=w7({prng:t,options:l});return{attributes:{viewBox:"0 0 180 180",fill:"none","shape-rendering":"auto"},body:`<g transform="translate(0 66)">${(i=(r=v.sides)===null||r===void 0?void 0:r.value(v,S))!==null&&i!==void 0?i:""}</g><g transform="translate(41)">${(o=(s=v.top)===null||s===void 0?void 0:s.value(v,S))!==null&&o!==void 0?o:""}</g><g transform="translate(25 44)">${(d=(c=v.face)===null||c===void 0?void 0:c.value(v,S))!==null&&d!==void 0?d:""}</g><g transform="translate(52 124)">${(p=(m=v.mouth)===null||m===void 0?void 0:m.value(v,S))!==null&&p!==void 0?p:""}</g><g transform="translate(38 76)">${(y=(x=v.eyes)===null||x===void 0?void 0:x.value(v,S))!==null&&y!==void 0?y:""}</g>`,extra:()=>({...Object.entries(v).reduce((C,[T,z])=>(C[T]=z==null?void 0:z.name,C),{}),...Object.entries(S).reduce((C,[T,z])=>(C[`${T}Color`]=z,C),{})})}},M7=Object.freeze(Object.defineProperty({__proto__:null,create:E7,meta:C7,schema:k7},Symbol.toStringTag,{value:"Module"})),nm=new Map;function Fp(t){let l=nm.get(t);return l||(l=d7(M7,{seed:t}).toDataUri(),nm.set(t,l)),l}function N7({agent:t}){const l=encodeURIComponent(t.qualifiedName);return g.jsxs("div",{className:"flex items-start gap-4",children:[g.jsx("img",{src:Fp(t.name),alt:"",className:"w-14 h-14 rounded-full shrink-0 sm:w-16 sm:h-16"}),g.jsxs("div",{className:"flex flex-col gap-3 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[t.fleetPath.length>0&&g.jsx("p",{className:"text-[11px] text-herd-muted font-medium uppercase tracking-wide mb-0.5",children:t.fleetPath.join(" / ")}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:t.name}),g.jsx(sr,{status:t.status,size:"md"})]}),t.description&&g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:t.description})]}),g.jsxs("div",{className:"hidden sm:flex gap-2 shrink-0",children:[g.jsxs("button",{type:"button",disabled:!0,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Job (coming soon)",children:[g.jsx(vi,{className:"w-3.5 h-3.5"}),"Trigger Job"]}),g.jsxs(yt,{to:`/agents/${l}/chat`,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(bi,{className:"w-3.5 h-3.5"}),"Chat"]})]})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-xs text-herd-muted",children:[t.model&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(Qx,{className:"w-3.5 h-3.5"}),g.jsx("span",{className:"font-mono",children:t.model})]}),t.permission_mode&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(R6,{className:"w-3.5 h-3.5"}),g.jsx("span",{children:t.permission_mode})]}),t.working_directory&&g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 max-w-[300px]",title:t.working_directory,children:[g.jsx(n6,{className:"w-3.5 h-3.5 shrink-0"}),g.jsx("span",{className:"font-mono truncate",children:t.working_directory})]})]}),g.jsxs("div",{className:"flex sm:hidden gap-2",children:[g.jsxs("button",{type:"button",disabled:!0,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Job (coming soon)",children:[g.jsx(vi,{className:"w-3.5 h-3.5"}),"Trigger Job"]}),g.jsxs(yt,{to:`/agents/${l}/chat`,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(bi,{className:"w-3.5 h-3.5"}),"Chat"]})]})]})]})}function j7(t,l){if(!t)return"-";const r=new Date(t).getTime(),s=(l?new Date(l).getTime():Date.now())-r;if(s<0)return"-";const o=Math.floor(s/1e3),c=Math.floor(o/60),d=Math.floor(c/60);if(d>0){const m=c%60;return m>0?`${d}h ${m}m`:`${d}h`}if(c>0){const m=o%60;return m>0?`${c}m ${m}s`:`${c}m`}return`${o}s`}function Pc(t){return t?new Date(t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"-"}function wn({label:t,children:l,mono:r=!1}){return g.jsxs("div",{className:"py-2 border-b border-herd-border last:border-b-0",children:[g.jsx("dt",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:t}),g.jsx("dd",{className:`text-sm text-herd-fg ${r?"font-mono":""}`,children:l})]})}function A7({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,"aria-hidden":"true",children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function z7({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,"aria-hidden":"true",children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function T7({triggerType:t}){const l=t??"manual",r={discord:{icon:g.jsx(A7,{className:"w-3.5 h-3.5"}),label:"Discord"},slack:{icon:g.jsx(z7,{className:"w-3.5 h-3.5"}),label:"Slack"},web:{icon:g.jsx(Dp,{className:"w-3.5 h-3.5"}),label:"Web Chat"},manual:{icon:g.jsx(oa,{className:"w-3.5 h-3.5"}),label:"Manual"},schedule:{icon:g.jsx(jp,{className:"w-3.5 h-3.5"}),label:"Schedule"},webhook:{icon:g.jsx(e1,{className:"w-3.5 h-3.5"}),label:"Webhook"},chat:{icon:g.jsx(bi,{className:"w-3.5 h-3.5"}),label:"Chat"},fork:{icon:g.jsx(is,{className:"w-3.5 h-3.5"}),label:"Fork"}},{icon:i,label:s}=r[l]??r.manual;return g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-herd-muted flex-shrink-0",children:i}),g.jsx("span",{children:s})]})}function _7(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"md"}),g.jsx("p",{className:"text-xs text-herd-muted",children:"Loading job details..."})]})}function R7({jobId:t}){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[g.jsx(Tp,{className:"w-8 h-8 text-herd-status-error"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"Job not found"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1 font-mono",children:t})]})]})}function lm({text:t,label:l}){const[r,i]=E.useState(!1),s=E.useCallback(async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1500)}catch{}},[t]);return g.jsx("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",title:l,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Ap,{className:"w-3.5 h-3.5 text-herd-status-running"}),g.jsx("span",{className:"text-herd-status-running",children:"Copied!"})]}):g.jsxs(g.Fragment,{children:[g.jsx(Rp,{className:"w-3.5 h-3.5"}),g.jsx("span",{children:l})]})})}function D7({jobId:t,onCancelled:l}){const[r,i]=E.useState(!1),[s,o]=E.useState(!1),[c,d]=E.useState(null),m=E.useCallback(async()=>{o(!0),d(null);try{await u8(t),l()}catch(p){const x=p instanceof Error?p.message:"Failed to cancel";d(x),o(!1),i(!1)}},[t,l]);return c?g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:c}):s?g.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-herd-muted",children:[g.jsx(nl,{size:"sm"}),"Cancelling..."]}):r?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-xs text-herd-muted",children:"Are you sure?"}),g.jsx("button",{type:"button",onClick:m,className:"bg-herd-status-error hover:bg-herd-status-error/80 text-white rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Cancel Job"}),g.jsx("button",{type:"button",onClick:()=>i(!1),className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Keep Running"})]}):g.jsxs("button",{type:"button",onClick:()=>i(!0),className:"bg-herd-status-error hover:bg-herd-status-error/80 text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(Ix,{className:"w-3.5 h-3.5"}),"Cancel Job"]})}function O7({jobId:t,onForked:l}){const[r,i]=E.useState(!1),[s,o]=E.useState(""),[c,d]=E.useState(!1),[m,p]=E.useState(null),x=E.useCallback(async()=>{d(!0),p(null);try{const y=await s8(t,{prompt:s.trim()||void 0});l(y.jobId)}catch(y){const v=y instanceof Error?y.message:"Failed to fork";p(v),d(!1)}},[t,s,l]);return m?g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:m}),g.jsx("button",{type:"button",onClick:()=>{p(null),i(!1)},className:"hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Dismiss"})]}):c?g.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-herd-muted",children:[g.jsx(nl,{size:"sm"}),"Forking..."]}):r?g.jsxs("div",{className:"space-y-2",children:[g.jsx("textarea",{value:s,onChange:y=>o(y.target.value),placeholder:"Override prompt (optional)...",rows:2,className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-xs text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full resize-none"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{type:"button",onClick:x,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-2 py-1 text-xs font-medium transition-colors flex items-center gap-1",children:[g.jsx(is,{className:"w-3 h-3"}),"Fork"]}),g.jsx("button",{type:"button",onClick:()=>{i(!1),o("")},className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Cancel"})]})]}):g.jsxs("button",{type:"button",onClick:()=>i(!0),className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(is,{className:"w-3.5 h-3.5"}),"Fork Job"]})}function L7({jobId:t,job:l,loading:r,onClose:i}){const{selectJob:s,fetchJobs:o}=Ip(),c=(l==null?void 0:l.status)==="running"||(l==null?void 0:l.status)==="pending",d=(l==null?void 0:l.status)==="completed"||(l==null?void 0:l.status)==="failed"||(l==null?void 0:l.status)==="cancelled",m=l?j7(l.startedAt,l.completedAt):"-",p=E.useCallback(()=>{o().catch(()=>{})},[o]),x=E.useCallback(S=>{s(S),o().catch(()=>{})},[s,o]),y=l!=null&&l.sessionId?l.workspace?`cd ${l.workspace} && claude --resume ${l.sessionId}`:`claude --resume ${l.sessionId}`:"",v=l?`herdctl trigger ${l.agentName}${l.prompt?` --prompt "${l.prompt.replace(/"/g,'\\"')}"`:""}`:"";return g.jsxs(xt,{className:"w-[320px] flex-shrink-0 self-start sticky top-4",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-herd-border",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg",children:"Job Details"}),g.jsx("button",{type:"button",onClick:i,className:"p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Close job details",children:g.jsx(xs,{className:"w-4 h-4 text-herd-muted"})})]}),g.jsx("div",{className:"p-4",children:r?g.jsx(_7,{}):l?g.jsxs("dl",{className:"space-y-0",children:[g.jsx(wn,{label:"Job ID",mono:!0,children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(i6,{className:"w-3.5 h-3.5 text-herd-muted flex-shrink-0"}),g.jsx("span",{className:"text-xs break-all",children:l.jobId})]})}),g.jsx(wn,{label:"Agent",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(l.agentName)}`,className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:l.agentName})}),g.jsx(wn,{label:"Status",children:g.jsx(sr,{status:l.status,size:"md"})}),g.jsx(wn,{label:"Source",children:g.jsx(T7,{triggerType:l.triggerType})}),g.jsx(wn,{label:"Prompt",children:g.jsx("p",{className:"whitespace-pre-wrap break-words",children:l.prompt})}),g.jsx(wn,{label:"Created",mono:!0,children:Pc(l.createdAt)}),g.jsx(wn,{label:"Started",mono:!0,children:Pc(l.startedAt)}),l.completedAt&&g.jsx(wn,{label:"Completed",mono:!0,children:Pc(l.completedAt)}),g.jsx(wn,{label:"Duration",mono:!0,children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(Mf,{className:"w-3.5 h-3.5 text-herd-muted flex-shrink-0"}),g.jsxs("span",{className:c?"text-herd-status-running":"",children:[m,c&&" (running)"]})]})}),l.exitCode!==void 0&&g.jsx(wn,{label:"Exit Code",mono:!0,children:g.jsx("span",{className:l.exitCode===0?"text-herd-status-running":"text-herd-status-error",children:l.exitCode})}),l.error&&g.jsx(wn,{label:"Error",children:g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:l.error})})]}):g.jsx(R7,{jobId:t})}),l&&g.jsxs("div",{className:"px-4 py-3 border-t border-herd-border space-y-3",children:[c&&g.jsx(D7,{jobId:l.jobId,onCancelled:p}),d&&g.jsx(O7,{jobId:l.jobId,onForked:x}),g.jsxs(yt,{to:`/agents/${encodeURIComponent(l.agentName)}/output`,className:"flex items-center justify-center gap-1.5 w-full bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-2 text-xs font-medium transition-colors",children:[g.jsx(Px,{className:"w-3.5 h-3.5"}),"View Agent Output"]}),g.jsxs("div",{className:"border-t border-herd-border pt-2 space-y-1",children:[g.jsx("p",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"CLI Commands"}),y&&g.jsx(lm,{text:y,label:"Copy Resume Command"}),g.jsx(lm,{text:v,label:"Copy Trigger Command"})]})]})]})}function U7({isOpen:t,onClose:l,preSelectedAgent:r,preSelectedSchedule:i}){var F;const{agents:s}=bs(),[o,c]=E.useState(r??""),[d,m]=E.useState(i??""),[p,x]=E.useState(""),[y,v]=E.useState(!1),[S,C]=E.useState(null),[T,z]=E.useState(!1);E.useEffect(()=>{t&&(c(r??""),m(i??""),x(""),v(!1),C(null),z(!1))},[t,r,i]);const M=((F=s.find(_=>_.qualifiedName===o))==null?void 0:F.schedules)??[],U=E.useCallback(_=>{c(_),m(""),C(null)},[]),N=async()=>{if(!o){C("Please select an agent");return}v(!0),C(null);try{await Bp(o,{scheduleName:d||void 0,prompt:p.trim()||void 0}),z(!0),setTimeout(()=>{l()},800)}catch(_){const I=_ instanceof Error?_.message:"Failed to trigger job";C(I),v(!1)}},V=_=>{_.target===_.currentTarget&&l()};return E.useEffect(()=>{if(!t)return;const _=I=>{I.key==="Escape"&&l()};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[t,l]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:V,onKeyDown:_=>{_.key==="Escape"&&l()},children:g.jsxs("div",{className:"bg-herd-card border border-herd-border rounded-[10px] p-5 max-w-md w-full mx-4 shadow-lg",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg",children:"Trigger Job"}),g.jsx("button",{type:"button",onClick:l,className:"p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Close modal",children:g.jsx(xs,{className:"w-4 h-4 text-herd-muted"})})]}),T?g.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[g.jsx(_p,{className:"w-8 h-8 text-herd-status-running"}),g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"Job triggered"})]}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mb-3",children:[g.jsx("label",{htmlFor:"trigger-agent",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Agent"}),g.jsxs("select",{id:"trigger-agent",value:o,onChange:_=>U(_.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors w-full",disabled:y,children:[g.jsx("option",{value:"",children:"Select an agent..."}),s.map(_=>g.jsx("option",{value:_.qualifiedName,children:_.qualifiedName},_.qualifiedName))]})]}),o&&M.length>0&&g.jsxs("div",{className:"mb-3",children:[g.jsx("label",{htmlFor:"trigger-schedule",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Schedule (optional)"}),g.jsxs("select",{id:"trigger-schedule",value:d,onChange:_=>m(_.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors w-full",disabled:y,children:[g.jsx("option",{value:"",children:"Default (first schedule)"}),M.map(_=>g.jsxs("option",{value:_.name,children:[_.name," (",_.type,")"]},_.name))]})]}),g.jsxs("div",{className:"mb-4",children:[g.jsx("label",{htmlFor:"trigger-prompt",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Prompt (optional)"}),g.jsx("textarea",{id:"trigger-prompt",value:p,onChange:_=>x(_.target.value),placeholder:"Override the default prompt...",rows:3,className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full resize-none",disabled:y})]}),S&&g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center gap-2",children:[g.jsx(Tp,{className:"w-3.5 h-3.5 flex-shrink-0"}),g.jsx("span",{children:S})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx("button",{type:"button",onClick:l,disabled:y,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),g.jsx("button",{type:"button",onClick:N,disabled:y||!o,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1.5",children:y?g.jsxs(g.Fragment,{children:[g.jsx(nl,{size:"sm"}),"Triggering..."]}):g.jsxs(g.Fragment,{children:[g.jsx(vi,{className:"w-3.5 h-3.5"}),"Trigger"]})})]})]})]})}):null}function H7(t,l){if(!t)return"-";const r=new Date(t).getTime(),s=(l?new Date(l).getTime():Date.now())-r;if(s<0)return"-";const o=Math.floor(s/1e3),c=Math.floor(o/60),d=Math.floor(c/60);if(d>0){const m=c%60;return m>0?`${d}h ${m}m`:`${d}h`}if(c>0){const m=o%60;return m>0?`${c}m ${m}s`:`${c}m`}return`${o}s`}function B7(t){if(!t)return"-";const l=new Date(t),r=new Date;return l.toDateString()===r.toDateString()?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Z7(t,l=60){return t.length<=l?t:`${t.slice(0,l).trim()}...`}function q7({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,"aria-hidden":"true",children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function $7({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,"aria-hidden":"true",children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function V7({type:t}){const l=t??"manual",r="w-3.5 h-3.5",i={discord:{icon:g.jsx(q7,{className:r}),label:"Discord"},slack:{icon:g.jsx($7,{className:r}),label:"Slack"},web:{icon:g.jsx(Dp,{className:r}),label:"Web Chat"},manual:{icon:g.jsx(oa,{className:r}),label:"Manual"},schedule:{icon:g.jsx(jp,{className:r}),label:"Schedule"},webhook:{icon:g.jsx(e1,{className:r}),label:"Webhook"},chat:{icon:g.jsx(bi,{className:r}),label:"Chat"},fork:{icon:g.jsx(is,{className:r}),label:"Fork"}},{icon:s,label:o}=i[l]??i.manual;return g.jsx("span",{className:"text-herd-muted",title:o,children:s})}const I7=[{value:"all",label:"All Status"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}];function J7({agentFilter:t,statusFilter:l,onAgentFilterChange:r,onStatusFilterChange:i,showAgentFilter:s}){return g.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[s&&g.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-[280px]",children:[g.jsx(A6,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-herd-muted pointer-events-none"}),g.jsx("input",{type:"text",placeholder:"Filter by agent...",value:t,onChange:o=>r(o.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg pl-9 pr-8 py-2 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full"}),t&&g.jsx("button",{type:"button",onClick:()=>r(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Clear agent filter",children:g.jsx(xs,{className:"w-3.5 h-3.5 text-herd-muted"})})]}),g.jsx("select",{value:l??"all",onChange:o=>{const c=o.target.value;i(c==="all"?void 0:c)},className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors min-w-[140px]",children:I7.map(o=>g.jsx("option",{value:o.value,children:o.label},o.value))})]})}function F7({offset:t,limit:l,total:r,onPrevious:i,onNext:s}){const o=r===0?0:t+1,c=Math.min(t+l,r),d=t>0,m=t+l<r;return g.jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-herd-border",children:[g.jsxs("span",{className:"text-xs text-herd-muted",children:["Showing ",o,"-",c," of ",r]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{type:"button",onClick:i,disabled:!d,className:"flex items-center gap-1 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[g.jsx(zp,{className:"w-3.5 h-3.5"}),"Previous"]}),g.jsxs("button",{type:"button",onClick:s,disabled:!m,className:"flex items-center gap-1 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:["Next",g.jsx(Pf,{className:"w-3.5 h-3.5"})]})]})]})}function Y7({job:t,showAgent:l,isSelected:r,onSelect:i}){const s=t.status==="running",o=H7(t.startedAt,t.completedAt);return g.jsxs("tr",{onClick:i,className:`
|
|
310
|
+
hover:bg-herd-hover transition-colors cursor-pointer
|
|
311
|
+
${r?"bg-herd-primary-muted":""}
|
|
312
|
+
`,children:[l&&g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(t.agentName)}`,onClick:c=>c.stopPropagation(),className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:t.agentName})}),g.jsx("td",{className:"py-2 px-1 text-center w-8",children:g.jsx(V7,{type:t.triggerType})}),g.jsx("td",{className:"py-2 px-3 text-herd-fg",title:t.prompt,children:Z7(t.prompt)}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:t.status})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:B7(t.startedAt)}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs font-mono",children:s?g.jsx("span",{className:"text-herd-status-running",children:o}):o})]})}function G7({hasFilters:t}){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[g.jsx(ys,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No jobs found"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:t?"Try adjusting your filters to see more results":"Jobs will appear here once agents start running tasks"})]})]})}function X7({message:t,onRetry:l}){return g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center justify-between",children:[g.jsx("span",{children:t}),g.jsx("button",{type:"button",onClick:l,className:"hover:underline font-medium ml-4",children:"Retry"})]})}function Yp({agentName:t}){const{jobs:l,totalJobs:r,jobsLoading:i,jobsError:s,jobsFilter:o,jobsOffset:c,jobsLimit:d}=$8(),{fetchJobs:m,setJobsFilter:p,setJobsOffset:x,selectJob:y,clearJobsState:v}=Ip(),{selectedJobId:S,selectedJob:C,selectedJobLoading:T}=V8(),[z,M]=E.useState(!1),U=!!t;E.useEffect(()=>{v(),t&&p({agentName:t})},[t,v,p]),E.useEffect(()=>{m().catch(()=>{})},[m]);const N=E.useMemo(()=>!!(o.agentName||o.status),[o]),V=O=>{p({agentName:O||void 0})},F=O=>{p({status:O})},_=()=>{const O=Math.max(0,c-d);x(O)},I=()=>{const O=c+d;O<r&&x(O)},se=O=>{y(S===O?null:O)},oe=()=>{y(null)};return i&&l.length===0&&!s?g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"lg"}),g.jsx("p",{className:"text-sm text-herd-muted",children:"Loading job history..."})]})}):g.jsxs("div",{className:"flex gap-4",children:[g.jsxs(xt,{className:"p-4 flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg",children:U?"Job History":"All Jobs"}),g.jsxs("div",{className:"flex items-center gap-2",children:[i&&l.length>0&&g.jsx(nl,{size:"sm"}),g.jsxs("button",{type:"button",onClick:()=>M(!0),className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(vi,{className:"w-3.5 h-3.5"}),"Trigger Job"]})]})]}),s&&g.jsx(X7,{message:s,onRetry:m}),g.jsx(J7,{agentFilter:U?"":o.agentName??"",statusFilter:o.status,onAgentFilterChange:V,onStatusFilterChange:F,showAgentFilter:!U}),l.length===0&&!i?g.jsx(G7,{hasFilters:N}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-xs text-herd-muted font-medium uppercase tracking-wide",children:[!U&&g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-center py-2 px-1 w-8",title:"Source"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Prompt"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Started"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Duration"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:l.map(O=>g.jsx(Y7,{job:O,showAgent:!U,isSelected:S===O.jobId,onSelect:()=>se(O.jobId)},O.jobId))})]})}),g.jsx(F7,{offset:c,limit:d,total:r,onPrevious:_,onNext:I})]})]}),S&&g.jsx(L7,{jobId:S,job:C,loading:T,onClose:oe}),g.jsx(U7,{isOpen:z,onClose:()=>{M(!1),m().catch(()=>{})},preSelectedAgent:t})]})}function Q7({agent:t}){return g.jsx(Yp,{agentName:t.qualifiedName})}function K7({agentName:t,jobId:l}){const r=E.useRef(null),i=q8(l),s=Ne(o=>o.setActiveJobView);return E.useEffect(()=>{const o=window.__herdWsClient;return t&&o&&(r.current&&r.current!==t&&o.unsubscribe(r.current),o.subscribe(t),r.current=t),()=>{r.current&&o&&(o.unsubscribe(r.current),r.current=null)}},[t]),E.useEffect(()=>(l&&s(l,!0),()=>{l&&s(l,!1)}),[l,s]),{messages:i,isSubscribed:r.current===t&&t!==null}}function P7({message:t}){const l=t.stream==="stderr";return g.jsx("div",{className:`
|
|
310
313
|
font-mono text-xs whitespace-pre-wrap break-all
|
|
311
314
|
animate-[fadeSlideIn_150ms_ease-out]
|
|
312
315
|
${l?"text-herd-status-error":"text-herd-code-fg"}
|
|
313
|
-
`,children:t.data})}function
|
|
316
|
+
`,children:t.data})}function W7({jobId:t}){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[g.jsx(oa,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"Waiting for output..."}),g.jsx("p",{className:"text-xs text-herd-muted mt-1 font-mono",children:t})]})]})}function eb({onClick:t}){return g.jsxs("button",{type:"button",onClick:t,className:`
|
|
314
317
|
absolute bottom-4 right-4
|
|
315
318
|
flex items-center gap-1.5
|
|
316
319
|
bg-herd-primary hover:bg-herd-primary-hover
|
|
@@ -318,51 +321,48 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
|
|
|
318
321
|
text-xs font-medium transition-colors
|
|
319
322
|
shadow-lg
|
|
320
323
|
animate-[fadeSlideIn_150ms_ease-out]
|
|
321
|
-
`,children:[g.jsx(
|
|
324
|
+
`,children:[g.jsx(zx,{className:"w-3.5 h-3.5"}),"Jump to bottom"]})}function tb({jobId:t,messages:l,startTime:r}){const i=E.useRef(null),[s,o]=E.useState(!0),[c,d]=E.useState(!1),m=E.useCallback(()=>{const y=i.current;if(!y)return;const C=y.scrollHeight-y.scrollTop-y.clientHeight<=50;o(C),d(!C&&l.length>0)},[l.length]);E.useEffect(()=>{const y=i.current;y&&s&&(y.scrollTop=y.scrollHeight)},[s]),E.useEffect(()=>{const y=i.current;if(y)return y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)},[m]);const p=E.useCallback(()=>{const y=i.current;y&&(y.scrollTop=y.scrollHeight,o(!0),d(!1))},[]),x=r?new Date(r).toLocaleString():null;return g.jsxs("div",{className:"relative flex flex-col h-full",children:[g.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-herd-border bg-herd-card",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(oa,{className:"w-3.5 h-3.5 text-herd-muted"}),g.jsx("span",{className:"text-xs font-mono text-herd-muted",children:t})]}),x&&g.jsx("span",{className:"text-xs text-herd-muted",children:x})]}),g.jsx("div",{ref:i,className:`
|
|
322
325
|
flex-1 overflow-auto
|
|
323
326
|
bg-herd-code-bg
|
|
324
327
|
p-3 min-h-[200px] max-h-[500px]
|
|
325
|
-
`,children:l.length===0?g.jsx(
|
|
328
|
+
`,children:l.length===0?g.jsx(W7,{jobId:t}):g.jsx("div",{className:"space-y-0.5",children:l.map(y=>g.jsx(P7,{message:y},y.id))})}),c&&g.jsx(eb,{onClick:p})]})}function nb({lastJobId:t,onViewLastJob:l}){return g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 text-center",children:[g.jsx(oa,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No Active Job"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Trigger a job or wait for a scheduled run to see live output"})]}),t&&l&&g.jsxs("button",{type:"button",onClick:l,className:`
|
|
326
329
|
flex items-center gap-1.5 mt-2
|
|
327
330
|
text-herd-primary hover:text-herd-primary-hover
|
|
328
331
|
text-xs font-medium transition-colors
|
|
329
|
-
`,children:[g.jsx(ws,{className:"w-3.5 h-3.5"}),"View last job output"]})]})})}function Tb({agent:t}){const l=t.status==="running"&&t.currentJobId,r=l?t.currentJobId:null,{messages:i}=Eb({agentName:t.qualifiedName,jobId:r});return l?g.jsx(xt,{className:"overflow-hidden",children:g.jsx(Ab,{jobId:t.currentJobId,messages:i,startTime:void 0})}):g.jsx(zb,{lastJobId:t.lastJobId,onViewLastJob:void 0})}function _b(t,l){if(!t)return"-";const r=new Date(t).getTime(),s=(l?new Date(l).getTime():Date.now())-r;if(s<0)return"-";const o=Math.floor(s/1e3),c=Math.floor(o/60),d=Math.floor(c/60);if(d>0){const m=c%60;return m>0?`${d}h ${m}m`:`${d}h`}if(c>0){const m=o%60;return m>0?`${c}m ${m}s`:`${c}m`}return`${o}s`}function af(t){return t?new Date(t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}):"-"}function wn({label:t,children:l,mono:r=!1}){return g.jsxs("div",{className:"py-2 border-b border-herd-border last:border-b-0",children:[g.jsx("dt",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:t}),g.jsx("dd",{className:`text-sm text-herd-fg ${r?"font-mono":""}`,children:l})]})}function Rb({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function Db({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function Ob({triggerType:t}){const l=t??"manual",r={discord:{icon:g.jsx(Rb,{className:"w-3.5 h-3.5"}),label:"Discord"},slack:{icon:g.jsx(Db,{className:"w-3.5 h-3.5"}),label:"Slack"},web:{icon:g.jsx(o3,{className:"w-3.5 h-3.5"}),label:"Web Chat"},manual:{icon:g.jsx(ca,{className:"w-3.5 h-3.5"}),label:"Manual"},schedule:{icon:g.jsx(l3,{className:"w-3.5 h-3.5"}),label:"Schedule"},webhook:{icon:g.jsx(s1,{className:"w-3.5 h-3.5"}),label:"Webhook"},chat:{icon:g.jsx(Si,{className:"w-3.5 h-3.5"}),label:"Chat"},fork:{icon:g.jsx(os,{className:"w-3.5 h-3.5"}),label:"Fork"}},{icon:i,label:s}=r[l]??r.manual;return g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-herd-muted flex-shrink-0",children:i}),g.jsx("span",{children:s})]})}function Lb(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"md"}),g.jsx("p",{className:"text-xs text-herd-muted",children:"Loading job details..."})]})}function Ub({jobId:t}){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[g.jsx(i3,{className:"w-8 h-8 text-herd-status-error"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"Job not found"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1 font-mono",children:t})]})]})}function hm({text:t,label:l}){const[r,i]=E.useState(!1),s=E.useCallback(async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1500)}catch{}},[t]);return g.jsx("button",{onClick:s,className:"flex items-center gap-1.5 hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",title:l,children:r?g.jsxs(g.Fragment,{children:[g.jsx(r3,{className:"w-3.5 h-3.5 text-herd-status-running"}),g.jsx("span",{className:"text-herd-status-running",children:"Copied!"})]}):g.jsxs(g.Fragment,{children:[g.jsx(s3,{className:"w-3.5 h-3.5"}),g.jsx("span",{children:l})]})})}function Hb({jobId:t,onCancelled:l}){const[r,i]=E.useState(!1),[s,o]=E.useState(!1),[c,d]=E.useState(null),m=E.useCallback(async()=>{o(!0),d(null);try{await Xx(t),l()}catch(p){const x=p instanceof Error?p.message:"Failed to cancel";d(x),o(!1),i(!1)}},[t,l]);return c?g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:c}):s?g.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-herd-muted",children:[g.jsx(nl,{size:"sm"}),"Cancelling..."]}):r?g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-xs text-herd-muted",children:"Are you sure?"}),g.jsx("button",{onClick:m,className:"bg-herd-status-error hover:bg-herd-status-error/80 text-white rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Cancel Job"}),g.jsx("button",{onClick:()=>i(!1),className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Keep Running"})]}):g.jsxs("button",{onClick:()=>i(!0),className:"bg-herd-status-error hover:bg-herd-status-error/80 text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(h8,{className:"w-3.5 h-3.5"}),"Cancel Job"]})}function Bb({jobId:t,onForked:l}){const[r,i]=E.useState(!1),[s,o]=E.useState(""),[c,d]=E.useState(!1),[m,p]=E.useState(null),x=E.useCallback(async()=>{d(!0),p(null);try{const y=await Qx(t,{prompt:s.trim()||void 0});l(y.jobId)}catch(y){const v=y instanceof Error?y.message:"Failed to fork";p(v),d(!1)}},[t,s,l]);return m?g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:m}),g.jsx("button",{onClick:()=>{p(null),i(!1)},className:"hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Dismiss"})]}):c?g.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-herd-muted",children:[g.jsx(nl,{size:"sm"}),"Forking..."]}):r?g.jsxs("div",{className:"space-y-2",children:[g.jsx("textarea",{value:s,onChange:y=>o(y.target.value),placeholder:"Override prompt (optional)...",rows:2,className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-xs text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full resize-none"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{onClick:x,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-2 py-1 text-xs font-medium transition-colors flex items-center gap-1",children:[g.jsx(os,{className:"w-3 h-3"}),"Fork"]}),g.jsx("button",{onClick:()=>{i(!1),o("")},className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-2 py-1 text-xs font-medium transition-colors",children:"Cancel"})]})]}):g.jsxs("button",{onClick:()=>i(!0),className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(os,{className:"w-3.5 h-3.5"}),"Fork Job"]})}function Zb({jobId:t,job:l,loading:r,onClose:i}){const{selectJob:s,fetchJobs:o}=Op(),c=(l==null?void 0:l.status)==="running"||(l==null?void 0:l.status)==="pending",d=(l==null?void 0:l.status)==="completed"||(l==null?void 0:l.status)==="failed"||(l==null?void 0:l.status)==="cancelled",m=l?_b(l.startedAt,l.completedAt):"-",p=E.useCallback(()=>{o().catch(()=>{})},[o]),x=E.useCallback(S=>{s(S),o().catch(()=>{})},[s,o]),y=l!=null&&l.sessionId?l.workspace?`cd ${l.workspace} && claude --resume ${l.sessionId}`:`claude --resume ${l.sessionId}`:"",v=l?`herdctl trigger ${l.agentName}${l.prompt?` --prompt "${l.prompt.replace(/"/g,'\\"')}"`:""}`:"";return g.jsxs(xt,{className:"w-[320px] flex-shrink-0 self-start sticky top-4",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-herd-border",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg",children:"Job Details"}),g.jsx("button",{onClick:i,className:"p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Close job details",children:g.jsx(ks,{className:"w-4 h-4 text-herd-muted"})})]}),g.jsx("div",{className:"p-4",children:r?g.jsx(Lb,{}):l?g.jsxs("dl",{className:"space-y-0",children:[g.jsx(wn,{label:"Job ID",mono:!0,children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(A8,{className:"w-3.5 h-3.5 text-herd-muted flex-shrink-0"}),g.jsx("span",{className:"text-xs break-all",children:l.jobId})]})}),g.jsx(wn,{label:"Agent",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(l.agentName)}`,className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:l.agentName})}),g.jsx(wn,{label:"Status",children:g.jsx(sr,{status:l.status,size:"md"})}),g.jsx(wn,{label:"Source",children:g.jsx(Ob,{triggerType:l.triggerType})}),g.jsx(wn,{label:"Prompt",children:g.jsx("p",{className:"whitespace-pre-wrap break-words",children:l.prompt})}),g.jsx(wn,{label:"Created",mono:!0,children:af(l.createdAt)}),g.jsx(wn,{label:"Started",mono:!0,children:af(l.startedAt)}),l.completedAt&&g.jsx(wn,{label:"Completed",mono:!0,children:af(l.completedAt)}),g.jsx(wn,{label:"Duration",mono:!0,children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(jf,{className:"w-3.5 h-3.5 text-herd-muted flex-shrink-0"}),g.jsxs("span",{className:c?"text-herd-status-running":"",children:[m,c&&" (running)"]})]})}),l.exitCode!==void 0&&g.jsx(wn,{label:"Exit Code",mono:!0,children:g.jsx("span",{className:l.exitCode===0?"text-herd-status-running":"text-herd-status-error",children:l.exitCode})}),l.error&&g.jsx(wn,{label:"Error",children:g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5 text-xs",children:l.error})})]}):g.jsx(Ub,{jobId:t})}),l&&g.jsxs("div",{className:"px-4 py-3 border-t border-herd-border space-y-3",children:[c&&g.jsx(Hb,{jobId:l.jobId,onCancelled:p}),d&&g.jsx(Bb,{jobId:l.jobId,onForked:x}),g.jsxs(yt,{to:`/agents/${encodeURIComponent(l.agentName)}/output`,className:"flex items-center justify-center gap-1.5 w-full bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-2 text-xs font-medium transition-colors",children:[g.jsx(S8,{className:"w-3.5 h-3.5"}),"View Agent Output"]}),g.jsxs("div",{className:"border-t border-herd-border pt-2 space-y-1",children:[g.jsx("p",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"CLI Commands"}),y&&g.jsx(hm,{text:y,label:"Copy Resume Command"}),g.jsx(hm,{text:v,label:"Copy Trigger Command"})]})]})]})}function qb({isOpen:t,onClose:l,preSelectedAgent:r,preSelectedSchedule:i}){var F;const{agents:s}=ys(),[o,c]=E.useState(r??""),[d,m]=E.useState(i??""),[p,x]=E.useState(""),[y,v]=E.useState(!1),[S,C]=E.useState(null),[T,z]=E.useState(!1);E.useEffect(()=>{t&&(c(r??""),m(i??""),x(""),v(!1),C(null),z(!1))},[t,r,i]);const M=((F=s.find(_=>_.qualifiedName===o))==null?void 0:F.schedules)??[],U=E.useCallback(_=>{c(_),m(""),C(null)},[]),N=async()=>{if(!o){C("Please select an agent");return}v(!0),C(null);try{await _p(o,{scheduleName:d||void 0,prompt:p.trim()||void 0}),z(!0),setTimeout(()=>{l()},800)}catch(_){const I=_ instanceof Error?_.message:"Failed to trigger job";C(I),v(!1)}},V=_=>{_.target===_.currentTarget&&l()};return E.useEffect(()=>{if(!t)return;const _=I=>{I.key==="Escape"&&l()};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[t,l]),t?g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-sm",onClick:V,children:g.jsxs("div",{className:"bg-herd-card border border-herd-border rounded-[10px] p-5 max-w-md w-full mx-4 shadow-lg",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg",children:"Trigger Job"}),g.jsx("button",{onClick:l,className:"p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Close modal",children:g.jsx(ks,{className:"w-4 h-4 text-herd-muted"})})]}),T?g.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[g.jsx(u3,{className:"w-8 h-8 text-herd-status-running"}),g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"Job triggered"})]}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"mb-3",children:[g.jsx("label",{htmlFor:"trigger-agent",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Agent"}),g.jsxs("select",{id:"trigger-agent",value:o,onChange:_=>U(_.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors w-full",disabled:y,children:[g.jsx("option",{value:"",children:"Select an agent..."}),s.map(_=>g.jsx("option",{value:_.qualifiedName,children:_.qualifiedName},_.qualifiedName))]})]}),o&&M.length>0&&g.jsxs("div",{className:"mb-3",children:[g.jsx("label",{htmlFor:"trigger-schedule",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Schedule (optional)"}),g.jsxs("select",{id:"trigger-schedule",value:d,onChange:_=>m(_.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors w-full",disabled:y,children:[g.jsx("option",{value:"",children:"Default (first schedule)"}),M.map(_=>g.jsxs("option",{value:_.name,children:[_.name," (",_.type,")"]},_.name))]})]}),g.jsxs("div",{className:"mb-4",children:[g.jsx("label",{htmlFor:"trigger-prompt",className:"block text-xs text-herd-muted font-medium uppercase tracking-wide mb-1",children:"Prompt (optional)"}),g.jsx("textarea",{id:"trigger-prompt",value:p,onChange:_=>x(_.target.value),placeholder:"Override the default prompt...",rows:3,className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full resize-none",disabled:y})]}),S&&g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center gap-2",children:[g.jsx(i3,{className:"w-3.5 h-3.5 flex-shrink-0"}),g.jsx("span",{children:S})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx("button",{onClick:l,disabled:y,className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"}),g.jsx("button",{onClick:N,disabled:y||!o,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1.5",children:y?g.jsxs(g.Fragment,{children:[g.jsx(nl,{size:"sm"}),"Triggering..."]}):g.jsxs(g.Fragment,{children:[g.jsx(wi,{className:"w-3.5 h-3.5"}),"Trigger"]})})]})]})]})}):null}function $b(t,l){if(!t)return"-";const r=new Date(t).getTime(),s=(l?new Date(l).getTime():Date.now())-r;if(s<0)return"-";const o=Math.floor(s/1e3),c=Math.floor(o/60),d=Math.floor(c/60);if(d>0){const m=c%60;return m>0?`${d}h ${m}m`:`${d}h`}if(c>0){const m=o%60;return m>0?`${c}m ${m}s`:`${c}m`}return`${o}s`}function Vb(t){if(!t)return"-";const l=new Date(t),r=new Date;return l.toDateString()===r.toDateString()?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Ib(t,l=60){return t.length<=l?t:t.slice(0,l).trim()+"..."}function Jb({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function Fb({className:t}){return g.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:t,children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})})}function Yb({type:t}){const l=t??"manual",r="w-3.5 h-3.5",i={discord:{icon:g.jsx(Jb,{className:r}),label:"Discord"},slack:{icon:g.jsx(Fb,{className:r}),label:"Slack"},web:{icon:g.jsx(o3,{className:r}),label:"Web Chat"},manual:{icon:g.jsx(ca,{className:r}),label:"Manual"},schedule:{icon:g.jsx(l3,{className:r}),label:"Schedule"},webhook:{icon:g.jsx(s1,{className:r}),label:"Webhook"},chat:{icon:g.jsx(Si,{className:r}),label:"Chat"},fork:{icon:g.jsx(os,{className:r}),label:"Fork"}},{icon:s,label:o}=i[l]??i.manual;return g.jsx("span",{className:"text-herd-muted",title:o,children:s})}const Gb=[{value:"all",label:"All Status"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"}];function Xb({agentFilter:t,statusFilter:l,onAgentFilterChange:r,onStatusFilterChange:i,showAgentFilter:s}){return g.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[s&&g.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-[280px]",children:[g.jsx(P8,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-herd-muted pointer-events-none"}),g.jsx("input",{type:"text",placeholder:"Filter by agent...",value:t,onChange:o=>r(o.target.value),className:"bg-herd-input-bg border border-herd-border rounded-lg pl-9 pr-8 py-2 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors w-full"}),t&&g.jsx("button",{onClick:()=>r(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-herd-hover rounded transition-colors","aria-label":"Clear agent filter",children:g.jsx(ks,{className:"w-3.5 h-3.5 text-herd-muted"})})]}),g.jsx("select",{value:l??"all",onChange:o=>{const c=o.target.value;i(c==="all"?void 0:c)},className:"bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2 text-sm text-herd-fg focus:outline-none focus:border-herd-primary/60 transition-colors min-w-[140px]",children:Gb.map(o=>g.jsx("option",{value:o.value,children:o.label},o.value))})]})}function Qb({offset:t,limit:l,total:r,onPrevious:i,onNext:s}){const o=r===0?0:t+1,c=Math.min(t+l,r),d=t>0,m=t+l<r;return g.jsxs("div",{className:"flex items-center justify-between mt-4 pt-3 border-t border-herd-border",children:[g.jsxs("span",{className:"text-xs text-herd-muted",children:["Showing ",o,"-",c," of ",r]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs("button",{onClick:i,disabled:!d,className:"flex items-center gap-1 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[g.jsx(a3,{className:"w-3.5 h-3.5"}),"Previous"]}),g.jsxs("button",{onClick:s,disabled:!m,className:"flex items-center gap-1 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:["Next",g.jsx(i1,{className:"w-3.5 h-3.5"})]})]})]})}function Kb({job:t,showAgent:l,isSelected:r,onSelect:i}){const s=t.status==="running",o=$b(t.startedAt,t.completedAt);return g.jsxs("tr",{onClick:i,className:`
|
|
330
|
-
hover:bg-herd-hover transition-colors cursor-pointer
|
|
331
|
-
${r?"bg-herd-primary-muted":""}
|
|
332
|
-
`,children:[l&&g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(t.agentName)}`,onClick:c=>c.stopPropagation(),className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:t.agentName})}),g.jsx("td",{className:"py-2 px-1 text-center w-8",children:g.jsx(Yb,{type:t.triggerType})}),g.jsx("td",{className:"py-2 px-3 text-herd-fg",title:t.prompt,children:Ib(t.prompt)}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:t.status})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:Vb(t.startedAt)}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs font-mono",children:s?g.jsx("span",{className:"text-herd-status-running",children:o}):o})]})}function Pb({hasFilters:t}){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[g.jsx(ws,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No jobs found"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:t?"Try adjusting your filters to see more results":"Jobs will appear here once agents start running tasks"})]})]})}function Wb({message:t,onRetry:l}){return g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center justify-between",children:[g.jsx("span",{children:t}),g.jsx("button",{onClick:l,className:"hover:underline font-medium ml-4",children:"Retry"})]})}function g3({agentName:t}){const{jobs:l,totalJobs:r,jobsLoading:i,jobsError:s,jobsFilter:o,jobsOffset:c,jobsLimit:d}=h6(),{fetchJobs:m,setJobsFilter:p,setJobsOffset:x,selectJob:y,clearJobsState:v}=Op(),{selectedJobId:S,selectedJob:C,selectedJobLoading:T}=m6(),[z,M]=E.useState(!1),U=!!t;E.useEffect(()=>{v(),t&&p({agentName:t})},[t,v,p]),E.useEffect(()=>{m().catch(()=>{})},[m,o,c]);const N=E.useMemo(()=>!!(o.agentName||o.status),[o]),V=O=>{p({agentName:O||void 0})},F=O=>{p({status:O})},_=()=>{const O=Math.max(0,c-d);x(O)},I=()=>{const O=c+d;O<r&&x(O)},se=O=>{y(S===O?null:O)},oe=()=>{y(null)};return i&&l.length===0&&!s?g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"lg"}),g.jsx("p",{className:"text-sm text-herd-muted",children:"Loading job history..."})]})}):g.jsxs("div",{className:"flex gap-4",children:[g.jsxs(xt,{className:"p-4 flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg",children:U?"Job History":"All Jobs"}),g.jsxs("div",{className:"flex items-center gap-2",children:[i&&l.length>0&&g.jsx(nl,{size:"sm"}),g.jsxs("button",{onClick:()=>M(!0),className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors flex items-center gap-1.5",children:[g.jsx(wi,{className:"w-3.5 h-3.5"}),"Trigger Job"]})]})]}),s&&g.jsx(Wb,{message:s,onRetry:m}),g.jsx(Xb,{agentFilter:U?"":o.agentName??"",statusFilter:o.status,onAgentFilterChange:V,onStatusFilterChange:F,showAgentFilter:!U}),l.length===0&&!i?g.jsx(Pb,{hasFilters:N}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-xs text-herd-muted font-medium uppercase tracking-wide",children:[!U&&g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-center py-2 px-1 w-8",title:"Source"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Prompt"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Started"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Duration"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:l.map(O=>g.jsx(Kb,{job:O,showAgent:!U,isSelected:S===O.jobId,onSelect:()=>se(O.jobId)},O.jobId))})]})}),g.jsx(Qb,{offset:c,limit:d,total:r,onPrevious:_,onNext:I})]})]}),S&&g.jsx(Zb,{jobId:S,job:C,loading:T,onClose:oe}),g.jsx(qb,{isOpen:z,onClose:()=>{M(!1),m().catch(()=>{})},preSelectedAgent:t})]})}function ev({agent:t}){return g.jsx(g3,{agentName:t.qualifiedName})}function tv(t){switch(t){case"interval":return jf;case"cron":return a1;case"webhook":return s1;case"chat":return u1;default:return jf}}function nv(t){return t.interval?t.interval:t.cron?t.cron:t.type}function lv(t){return t==="connected"||t==="ready"?"text-herd-status-running":t==="error"||t==="failed"?"text-herd-status-error":"text-herd-status-idle"}function Xu({title:t,children:l}){return g.jsxs(xt,{className:"p-4",children:[g.jsx("h3",{className:"text-sm font-semibold text-herd-fg mb-3",children:t}),l]})}function Kr({label:t,value:l,mono:r=!1}){const i=l??"--";return g.jsxs("div",{className:"flex justify-between items-baseline gap-4 py-1.5",children:[g.jsx("dt",{className:"text-xs text-herd-muted shrink-0",children:t}),g.jsx("dd",{className:`text-xs text-herd-fg text-right truncate ${r?"font-mono":""}`,title:typeof i=="string"?i:void 0,children:i})]})}function rv({schedule:t}){const l=tv(t.type),r=t.status==="running"?"text-herd-status-running":t.status==="disabled"?"text-herd-status-error":"text-herd-status-idle";return g.jsxs("tr",{className:"border-b border-herd-border last:border-b-0",children:[g.jsx("td",{className:"py-2 pr-3",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(l,{className:"w-3.5 h-3.5 text-herd-muted"}),g.jsx("span",{className:"text-xs text-herd-fg",children:t.name})]})}),g.jsx("td",{className:"py-2 px-3 text-xs text-herd-muted capitalize",children:t.type}),g.jsx("td",{className:"py-2 px-3 text-xs text-herd-fg font-mono",children:nv(t)}),g.jsx("td",{className:`py-2 pl-3 text-xs capitalize ${r}`,children:t.status})]})}function av({name:t,connector:l}){const r=l.connectionStatus??(l.configured?"configured":"inactive");return g.jsxs("div",{className:"flex items-center justify-between py-1.5",children:[g.jsx("span",{className:"text-xs text-herd-fg capitalize",children:t}),g.jsx("span",{className:`text-xs ${lv(r)}`,children:r})]})}function iv({agent:t}){return g.jsxs("div",{className:"space-y-4",children:[g.jsx(Xu,{title:"General",children:g.jsxs("dl",{className:"divide-y divide-herd-border",children:[g.jsx(Kr,{label:"Name",value:t.name}),g.jsx(Kr,{label:"Description",value:t.description}),g.jsx(Kr,{label:"Model",value:t.model,mono:!0}),g.jsx(Kr,{label:"Permission Mode",value:t.permission_mode}),g.jsx(Kr,{label:"Max Concurrent",value:t.maxConcurrent})]})}),g.jsx(Xu,{title:"Schedules",children:t.schedules.length===0?g.jsx("p",{className:"text-xs text-herd-muted",children:"No schedules configured"}):g.jsxs("table",{className:"w-full",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"text-xs text-herd-muted font-medium uppercase tracking-wide border-b border-herd-border",children:[g.jsx("th",{className:"text-left py-2 pr-3",children:"Name"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Type"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Value"}),g.jsx("th",{className:"text-left py-2 pl-3",children:"Status"})]})}),g.jsx("tbody",{children:t.schedules.map(l=>g.jsx(rv,{schedule:l},l.name))})]})}),g.jsx(Xu,{title:"Chat Connectors",children:!t.chat||Object.keys(t.chat).length===0?g.jsx("p",{className:"text-xs text-herd-muted",children:"No chat connectors configured"}):g.jsx("div",{className:"divide-y divide-herd-border",children:Object.entries(t.chat).map(([l,r])=>g.jsx(av,{name:l,connector:r},l))})}),t.working_directory&&g.jsx(Xu,{title:"Environment",children:g.jsx("dl",{children:g.jsx(Kr,{label:"Working Directory",value:t.working_directory,mono:!0})})})]})}const uv=[{id:"overview",label:"Overview",icon:c3},{id:"jobs",label:"Jobs",icon:ws},{id:"output",label:"Output",icon:ca}];function sv({activeTab:t,agentName:l}){const r=encodeURIComponent(l);return g.jsx("div",{className:"flex border-b border-herd-border",children:uv.map(i=>{const s=i.icon,o=t===i.id;return g.jsxs(yt,{to:`/agents/${r}/${i.id}`,replace:!0,className:`
|
|
332
|
+
`,children:[g.jsx(ys,{className:"w-3.5 h-3.5"}),"View last job output"]})]})})}function lb({agent:t}){const l=t.status==="running"&&t.currentJobId,r=l?t.currentJobId:null,{messages:i}=K7({agentName:t.qualifiedName,jobId:r});return l?g.jsx(xt,{className:"overflow-hidden",children:g.jsx(tb,{jobId:t.currentJobId,messages:i,startTime:void 0})}):g.jsx(nb,{lastJobId:t.lastJobId,onViewLastJob:void 0})}const rb=[{id:"overview",label:"Overview",icon:Op},{id:"jobs",label:"Jobs",icon:ys},{id:"output",label:"Output",icon:oa}];function ab({activeTab:t,agentName:l}){const r=encodeURIComponent(l);return g.jsx("div",{className:"flex border-b border-herd-border",children:rb.map(i=>{const s=i.icon,o=t===i.id;return g.jsxs(yt,{to:`/agents/${r}/${i.id}`,replace:!0,className:`
|
|
333
333
|
flex items-center gap-1.5 px-4 py-2 text-xs font-medium transition-colors
|
|
334
334
|
border-b-2 -mb-px
|
|
335
335
|
${o?"text-herd-primary border-herd-primary":"text-herd-muted hover:text-herd-fg border-transparent hover:border-herd-border"}
|
|
336
|
-
`,children:[g.jsx(s,{className:"w-3.5 h-3.5"}),i.label]},i.id)})})}function mm({name:t}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs(xt,{className:"p-6 max-w-md w-full text-center",children:[g.jsx("h2",{className:"text-lg font-semibold text-herd-fg mb-2",children:"Agent Not Found"}),g.jsxs("p",{className:"text-sm text-herd-muted mb-4",children:['No agent named "',t,'" exists in the fleet.']}),g.jsxs(yt,{to:"/",className:"inline-flex items-center gap-1.5 text-herd-primary hover:text-herd-primary-hover text-xs font-medium transition-colors",children:[g.jsx(r1,{className:"w-3.5 h-3.5"}),"Back to Dashboard"]})]})})}function ov({name:t}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-3",children:[g.jsx(nl,{size:"lg"}),g.jsxs("p",{className:"text-sm text-herd-muted",children:['Loading agent "',t,'"...']})]})})}function cv({message:t,onRetry:l}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs(xt,{className:"p-6 max-w-md w-full",children:[g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4",children:t}),g.jsxs("div",{className:"flex gap-2 justify-center",children:[g.jsx("button",{onClick:l,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Retry"}),g.jsx(yt,{to:"/",className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Back to Dashboard"})]})]})})}const fv=new Set(["overview","jobs","output"]);function pm(){const{name:t,tab:l}=Jf(),{agent:r,loading:i,error:s,retry:o}=kb(t??null),c=l&&fv.has(l)?l:"overview";if(!t)return g.jsx(mm,{name:"(unknown)"});if(i)return g.jsx(ov,{name:t});if(s)return g.jsx(cv,{message:s,onRetry:o});if(!r)return g.jsx(mm,{name:t});function d(){switch(c){case"overview":return g.jsx(iv,{agent:r});case"jobs":return g.jsx(ev,{agent:r});case"output":return g.jsx(Tb,{agent:r});default:return c}}return g.jsxs("div",{className:"p-4 space-y-4 overflow-auto h-full",children:[g.jsxs(yt,{to:"/",className:"inline-flex items-center gap-1.5 text-herd-muted hover:text-herd-fg text-xs font-medium transition-colors",children:[g.jsx(r1,{className:"w-3.5 h-3.5"}),"Back to Dashboard"]}),g.jsx(xt,{className:"p-4",children:g.jsx(Cb,{agent:r})}),g.jsxs(xt,{className:"overflow-hidden",children:[g.jsx(sv,{activeTab:c,agentName:t}),g.jsx("div",{className:"p-4",children:d()})]})]})}function dv(t,l){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const hv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pv={};function gm(t,l){return(pv.jsx?mv:hv).test(t)}const gv=/[ \t\n\f\r]/g;function yv(t){return typeof t=="object"?t.type==="text"?ym(t.value):!1:ym(t)}function ym(t){return t.replace(gv,"")===""}class ji{constructor(l,r,i){this.normal=r,this.property=l,i&&(this.space=i)}}ji.prototype.normal={};ji.prototype.property={};ji.prototype.space=void 0;function y3(t,l){const r={},i={};for(const s of t)Object.assign(r,s.property),Object.assign(i,s.normal);return new ji(r,i,l)}function zf(t){return t.toLowerCase()}class It{constructor(l,r){this.attribute=r,this.property=l}}It.prototype.attribute="";It.prototype.booleanish=!1;It.prototype.boolean=!1;It.prototype.commaOrSpaceSeparated=!1;It.prototype.commaSeparated=!1;It.prototype.defined=!1;It.prototype.mustUseProperty=!1;It.prototype.number=!1;It.prototype.overloadedBoolean=!1;It.prototype.property="";It.prototype.spaceSeparated=!1;It.prototype.space=void 0;let xv=0;const Ee=or(),ht=or(),Tf=or(),le=or(),Qe=or(),aa=or(),Wt=or();function or(){return 2**++xv}const _f=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:ht,commaOrSpaceSeparated:Wt,commaSeparated:aa,number:le,overloadedBoolean:Tf,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),uf=Object.keys(_f);class o1 extends It{constructor(l,r,i,s){let o=-1;if(super(l,r),xm(this,"space",s),typeof i=="number")for(;++o<uf.length;){const c=uf[o];xm(this,uf[o],(i&_f[c])===_f[c])}}}o1.prototype.defined=!0;function xm(t,l,r){r&&(t[l]=r)}function da(t){const l={},r={};for(const[i,s]of Object.entries(t.properties)){const o=new o1(i,t.transform(t.attributes||{},i),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),l[i]=o,r[zf(i)]=i,r[zf(o.attribute)]=i}return new ji(l,r,t.space)}const x3=da({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:Qe,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:le,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:Qe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ht,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function b3(t,l){return l in t?t[l]:l}function v3(t,l){return b3(t,l.toLowerCase())}const bv=da({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:aa,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Qe,autoFocus:Ee,autoPlay:Ee,blocking:Qe,capture:null,charSet:null,checked:Ee,cite:null,className:Qe,cols:le,colSpan:null,content:null,contentEditable:ht,controls:Ee,controlsList:Qe,coords:le|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Tf,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Qe,height:le,hidden:Tf,high:le,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ee,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:le,pattern:null,ping:Qe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Qe,required:Ee,reversed:Ee,rows:le,rowSpan:le,sandbox:Qe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:ht,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:v3}),vv=da({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wt,rev:Wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wt,requiredFeatures:Wt,requiredFonts:Wt,requiredFormats:Wt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:b3}),S3=da({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),w3=da({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:v3}),k3=da({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),Sv={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},wv=/[A-Z]/g,bm=/-[a-z]/g,kv=/^data[-\w.:]+$/i;function Cv(t,l){const r=zf(l);let i=l,s=It;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&kv.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(bm,Mv);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!bm.test(o)){let c=o.replace(wv,Ev);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}s=o1}return new s(i,l)}function Ev(t){return"-"+t.toLowerCase()}function Mv(t){return t.charAt(1).toUpperCase()}const Nv=y3([x3,bv,S3,w3,k3],"html"),c1=y3([x3,vv,S3,w3,k3],"svg");function jv(t){return t.join(" ").trim()}var Pr={},sf,vm;function Av(){if(vm)return sf;vm=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
|
|
337
|
-
`,p="/",x="*",y="",v="comment",S="declaration";function C(z,M){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];M=M||{};var U=1,N=1;function V(ue){var P=ue.match(l);P&&(U+=P.length);var H=ue.lastIndexOf(m);N=~H?ue.length-H:N+ue.length}function F(){var ue={line:U,column:N};return function(P){return P.position=new _(ue),oe(),P}}function _(ue){this.start=ue,this.end={line:U,column:N},this.source=M.source}_.prototype.content=z;function I(ue){var P=new Error(M.source+":"+U+":"+N+": "+ue);if(P.reason=ue,P.filename=M.source,P.line=U,P.column=N,P.source=z,!M.silent)throw P}function se(ue){var P=ue.exec(z);if(P){var H=P[0];return V(H),z=z.slice(H.length),P}}function oe(){se(r)}function O(ue){var P;for(ue=ue||[];P=ae();)P!==!1&&ue.push(P);return ue}function ae(){var ue=F();if(!(p!=z.charAt(0)||x!=z.charAt(1))){for(var P=2;y!=z.charAt(P)&&(x!=z.charAt(P)||p!=z.charAt(P+1));)++P;if(P+=2,y===z.charAt(P-1))return I("End of comment missing");var H=z.slice(2,P-2);return N+=2,V(H),z=z.slice(P),N+=2,ue({type:v,comment:H})}}function te(){var ue=F(),P=se(i);if(P){if(ae(),!se(s))return I("property missing ':'");var H=se(o),W=ue({type:S,property:T(P[0].replace(t,y)),value:H?T(H[0].replace(t,y)):y});return se(c),W}}function be(){var ue=[];O(ue);for(var P;P=te();)P!==!1&&(ue.push(P),O(ue));return ue}return oe(),be()}function T(z){return z?z.replace(d,y):y}return sf=C,sf}var Sm;function zv(){if(Sm)return Pr;Sm=1;var t=Pr&&Pr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.default=r;const l=t(Av());function r(i,s){let o=null;if(!i||typeof i!="string")return o;const c=(0,l.default)(i),d=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:x}=m;d?s(p,x,m):x&&(o=o||{},o[p]=x)}),o}return Pr}var oi={},wm;function Tv(){if(wm)return oi;wm=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(p){return!p||r.test(p)||t.test(p)},c=function(p,x){return x.toUpperCase()},d=function(p,x){return"".concat(x,"-")},m=function(p,x){return x===void 0&&(x={}),o(p)?p:(p=p.toLowerCase(),x.reactCompat?p=p.replace(s,d):p=p.replace(i,d),p.replace(l,c))};return oi.camelCase=m,oi}var ci,km;function _v(){if(km)return ci;km=1;var t=ci&&ci.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(zv()),r=Tv();function i(s,o){var c={};return!s||typeof s!="string"||(0,l.default)(s,function(d,m){d&&m&&(c[(0,r.camelCase)(d,o)]=m)}),c}return i.default=i,ci=i,ci}var Rv=_v();const Dv=qf(Rv),C3=E3("end"),f1=E3("start");function E3(t){return l;function l(r){const i=r&&r.position&&r.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function Ov(t){const l=f1(t),r=C3(t);if(l&&r)return{start:l,end:r}}function pi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Cm(t.position):"start"in t||"end"in t?Cm(t):"line"in t||"column"in t?Rf(t):""}function Rf(t){return Em(t&&t.line)+":"+Em(t&&t.column)}function Cm(t){return Rf(t&&t.start)+"-"+Rf(t&&t.end)}function Em(t){return t&&typeof t=="number"?t:1}class At extends Error{constructor(l,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof l=="string"?s=l:!o.cause&&l&&(c=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof i=="string"){const m=i.indexOf(":");m===-1?o.ruleId=i:(o.source=i.slice(0,m),o.ruleId=i.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=pi(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const d1={}.hasOwnProperty,Lv=new Map,Uv=/[A-Z]/g,Hv=new Set(["table","tbody","thead","tfoot","tr"]),Bv=new Set(["td","th"]),M3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zv(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=l.filePath||void 0;let i;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Gv(r,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Yv(r,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:i,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?c1:Nv,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=N3(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function N3(t,l,r){if(l.type==="element")return qv(t,l,r);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return $v(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return Iv(t,l,r);if(l.type==="mdxjsEsm")return Vv(t,l);if(l.type==="root")return Jv(t,l,r);if(l.type==="text")return Fv(t,l)}function qv(t,l,r){const i=t.schema;let s=i;l.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=c1,t.schema=s),t.ancestors.push(l);const o=A3(t,l.tagName,!1),c=Xv(t,l);let d=m1(t,l);return Hv.has(l.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!yv(m):!0})),j3(t,c,o,l),h1(c,d),t.ancestors.pop(),t.schema=i,t.create(l,o,c,r)}function $v(t,l){if(l.data&&l.data.estree&&t.evaluater){const i=l.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}ki(t,l.position)}function Vv(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);ki(t,l.position)}function Iv(t,l,r){const i=t.schema;let s=i;l.name==="svg"&&i.space==="html"&&(s=c1,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:A3(t,l.name,!0),c=Qv(t,l),d=m1(t,l);return j3(t,c,o,l),h1(c,d),t.ancestors.pop(),t.schema=i,t.create(l,o,c,r)}function Jv(t,l,r){const i={};return h1(i,m1(t,l)),t.create(l,t.Fragment,i,r)}function Fv(t,l){return l.value}function j3(t,l,r,i){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(l.node=i)}function h1(t,l){if(l.length>0){const r=l.length>1?l:l[0];r&&(t.children=r)}}function Yv(t,l,r){return i;function i(s,o,c,d){const p=Array.isArray(c.children)?r:l;return d?p(o,c,d):p(o,c)}}function Gv(t,l){return r;function r(i,s,o,c){const d=Array.isArray(o.children),m=f1(i);return l(s,o,c,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function Xv(t,l){const r={};let i,s;for(s in l.properties)if(s!=="children"&&d1.call(l.properties,s)){const o=Kv(t,s,l.properties[s]);if(o){const[c,d]=o;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Bv.has(l.tagName)?i=d:r[c]=d}}if(i){const o=r.style||(r.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function Qv(t,l){const r={};for(const i of l.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,t.evaluater.evaluateExpression(d.argument))}else ki(t,l.position);else{const s=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const d=i.value.data.estree.body[0];d.type,o=t.evaluater.evaluateExpression(d.expression)}else ki(t,l.position);else o=i.value===null?!0:i.value;r[s]=o}return r}function m1(t,l){const r=[];let i=-1;const s=t.passKeys?new Map:Lv;for(;++i<l.children.length;){const o=l.children[i];let c;if(t.passKeys){const m=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(m){const p=s.get(m)||0;c=m+"-"+p,s.set(m,p+1)}}const d=N3(t,o,c);d!==void 0&&r.push(d)}return r}function Kv(t,l,r){const i=Cv(t.schema,l);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?dv(r):jv(r)),i.property==="style"){let s=typeof r=="object"?r:Pv(t,String(r));return t.stylePropertyNameCase==="css"&&(s=Wv(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&i.space?Sv[i.property]||i.property:i.attribute,r]}}function Pv(t,l){try{return Dv(l,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const i=r,s=new At("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=M3+"#cannot-parse-style-attribute",s}}function A3(t,l,r){let i;if(!r)i={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,c;for(;++o<s.length;){const d=gm(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}i=c}else i=gm(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(i.type==="Literal"){const s=i.value;return d1.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(i);ki(t)}function ki(t,l){const r=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=M3+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Wv(t){const l={};let r;for(r in t)d1.call(t,r)&&(l[e9(r)]=t[r]);return l}function e9(t){let l=t.replace(Uv,t9);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function t9(t){return"-"+t.toLowerCase()}const of={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},n9={};function p1(t,l){const r=n9,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return z3(t,i,s)}function z3(t,l,r){if(l9(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Mm(t.children,l,r)}return Array.isArray(t)?Mm(t,l,r):""}function Mm(t,l,r){const i=[];let s=-1;for(;++s<t.length;)i[s]=z3(t[s],l,r);return i.join("")}function l9(t){return!!(t&&typeof t=="object")}const Nm=document.createElement("i");function g1(t){const l="&"+t+";";Nm.innerHTML=l;const r=Nm.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===l?!1:r}function tn(t,l,r,i){const s=t.length;let o=0,c;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(l,r),t.splice(...c);else for(r&&t.splice(l,r);o<i.length;)c=i.slice(o,o+1e4),c.unshift(l,0),t.splice(...c),o+=1e4,l+=1e4}function mn(t,l){return t.length>0?(tn(t,t.length,0,l),t):l}const jm={}.hasOwnProperty;function T3(t){const l={};let r=-1;for(;++r<t.length;)r9(l,t[r]);return l}function r9(t,l){let r;for(r in l){const s=(jm.call(t,r)?t[r]:void 0)||(t[r]={}),o=l[r];let c;if(o)for(c in o){jm.call(s,c)||(s[c]=[]);const d=o[c];a9(s[c],Array.isArray(d)?d:d?[d]:[])}}}function a9(t,l){let r=-1;const i=[];for(;++r<l.length;)(l[r].add==="after"?t:i).push(l[r]);tn(t,0,0,i)}function _3(t,l){const r=Number.parseInt(t,l);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Cn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=Ul(/[A-Za-z]/),jt=Ul(/[\dA-Za-z]/),i9=Ul(/[#-'*+\--9=?A-Z^-~]/);function fs(t){return t!==null&&(t<32||t===127)}const Df=Ul(/\d/),u9=Ul(/[\dA-Fa-f]/),s9=Ul(/[!-/:-@[-`{-~]/);function ge(t){return t!==null&&t<-2}function Xe(t){return t!==null&&(t<0||t===32)}function Te(t){return t===-2||t===-1||t===32}const Cs=Ul(new RegExp("\\p{P}|\\p{S}","u")),ur=Ul(/\s/);function Ul(t){return l;function l(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ha(t){const l=[];let r=-1,i=0,s=0;for(;++r<t.length;){const o=t.charCodeAt(r);let c="";if(o===37&&jt(t.charCodeAt(r+1))&&jt(t.charCodeAt(r+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=t.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(l.push(t.slice(i,r),encodeURIComponent(c)),i=r+s+1,c=""),s&&(r+=s,s=0)}return l.join("")+t.slice(i)}function Oe(t,l,r,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(m){return Te(m)?(t.enter(r),d(m)):l(m)}function d(m){return Te(m)&&o++<s?(t.consume(m),d):(t.exit(r),l(m))}}const o9={tokenize:c9};function c9(t){const l=t.attempt(this.parser.constructs.contentInitial,i,s);let r;return l;function i(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Oe(t,l,"linePrefix")}function s(d){return t.enter("paragraph"),o(d)}function o(d){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return ge(d)?(t.consume(d),t.exit("chunkText"),o):(t.consume(d),c)}}const f9={tokenize:d9},Am={tokenize:h9};function d9(t){const l=this,r=[];let i=0,s,o,c;return d;function d(N){if(i<r.length){const V=r[i];return l.containerState=V[1],t.attempt(V[0].continuation,m,p)(N)}return p(N)}function m(N){if(i++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&U();const V=l.events.length;let F=V,_;for(;F--;)if(l.events[F][0]==="exit"&&l.events[F][1].type==="chunkFlow"){_=l.events[F][1].end;break}M(i);let I=V;for(;I<l.events.length;)l.events[I][1].end={..._},I++;return tn(l.events,F+1,0,l.events.slice(V)),l.events.length=I,p(N)}return d(N)}function p(N){if(i===r.length){if(!s)return v(N);if(s.currentConstruct&&s.currentConstruct.concrete)return C(N);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Am,x,y)(N)}function x(N){return s&&U(),M(i),v(N)}function y(N){return l.parser.lazy[l.now().line]=i!==r.length,c=l.now().offset,C(N)}function v(N){return l.containerState={},t.attempt(Am,S,C)(N)}function S(N){return i++,r.push([l.currentConstruct,l.containerState]),v(N)}function C(N){if(N===null){s&&U(),M(0),t.consume(N);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),T(N)}function T(N){if(N===null){z(t.exit("chunkFlow"),!0),M(0),t.consume(N);return}return ge(N)?(t.consume(N),z(t.exit("chunkFlow")),i=0,l.interrupt=void 0,d):(t.consume(N),T)}function z(N,V){const F=l.sliceStream(N);if(V&&F.push(null),N.previous=o,o&&(o.next=N),o=N,s.defineSkip(N.start),s.write(F),l.parser.lazy[N.start.line]){let _=s.events.length;for(;_--;)if(s.events[_][1].start.offset<c&&(!s.events[_][1].end||s.events[_][1].end.offset>c))return;const I=l.events.length;let se=I,oe,O;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){if(oe){O=l.events[se][1].end;break}oe=!0}for(M(i),_=I;_<l.events.length;)l.events[_][1].end={...O},_++;tn(l.events,se+1,0,l.events.slice(I)),l.events.length=_}}function M(N){let V=r.length;for(;V-- >N;){const F=r[V];l.containerState=F[1],F[0].exit.call(l,t)}r.length=N}function U(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function h9(t,l,r){return Oe(t,t.attempt(this.parser.constructs.document,l,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ia(t){if(t===null||Xe(t)||ur(t))return 1;if(Cs(t))return 2}function Es(t,l,r){const i=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!i.includes(o)&&(l=o(l,r),i.push(o))}return l}const Of={name:"attention",resolveAll:m9,tokenize:p9};function m9(t,l){let r=-1,i,s,o,c,d,m,p,x;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(i=r;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&l.sliceSerialize(t[i][1]).charCodeAt(0)===l.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[i][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[i][1].end.offset-t[i][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[i][1].end},v={...t[r][1].start};zm(y,-m),zm(v,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[i][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:v},o={type:m>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[r][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[i][1].end={...c.start},t[r][1].start={...d.end},p=[],t[i][1].end.offset-t[i][1].start.offset&&(p=mn(p,[["enter",t[i][1],l],["exit",t[i][1],l]])),p=mn(p,[["enter",s,l],["enter",c,l],["exit",c,l],["enter",o,l]]),p=mn(p,Es(l.parser.constructs.insideSpan.null,t.slice(i+1,r),l)),p=mn(p,[["exit",o,l],["enter",d,l],["exit",d,l],["exit",s,l]]),t[r][1].end.offset-t[r][1].start.offset?(x=2,p=mn(p,[["enter",t[r][1],l],["exit",t[r][1],l]])):x=0,tn(t,i-1,r-i+3,p),r=i+p.length-x-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function p9(t,l){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,s=ia(i);let o;return c;function c(m){return o=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===o)return t.consume(m),d;const p=t.exit("attentionSequence"),x=ia(m),y=!x||x===2&&s||r.includes(m),v=!s||s===2&&x||r.includes(i);return p._open=!!(o===42?y:y&&(s||!v)),p._close=!!(o===42?v:v&&(x||!y)),l(m)}}function zm(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const g9={name:"autolink",tokenize:y9};function y9(t,l,r){let i=0;return s;function s(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(S){return Rt(S)?(t.consume(S),c):S===64?r(S):p(S)}function c(S){return S===43||S===45||S===46||jt(S)?(i=1,d(S)):p(S)}function d(S){return S===58?(t.consume(S),i=0,m):(S===43||S===45||S===46||jt(S))&&i++<32?(t.consume(S),d):(i=0,p(S))}function m(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||fs(S)?r(S):(t.consume(S),m)}function p(S){return S===64?(t.consume(S),x):i9(S)?(t.consume(S),p):r(S)}function x(S){return jt(S)?y(S):r(S)}function y(S){return S===46?(t.consume(S),i=0,x):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):v(S)}function v(S){if((S===45||jt(S))&&i++<63){const C=S===45?v:y;return t.consume(S),C}return r(S)}}const Ai={partial:!0,tokenize:x9};function x9(t,l,r){return i;function i(o){return Te(o)?Oe(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||ge(o)?l(o):r(o)}}const R3={continuation:{tokenize:v9},exit:S9,name:"blockQuote",tokenize:b9};function b9(t,l,r){const i=this;return s;function s(c){if(c===62){const d=i.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),o}return r(c)}function o(c){return Te(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function v9(t,l,r){const i=this;return s;function s(c){return Te(c)?Oe(t,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return t.attempt(R3,l,r)(c)}}function S9(t){t.exit("blockQuote")}const D3={name:"characterEscape",tokenize:w9};function w9(t,l,r){return i;function i(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return s9(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):r(o)}}const O3={name:"characterReference",tokenize:k9};function k9(t,l,r){const i=this;let s=0,o,c;return d;function d(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),o=31,c=jt,x(y))}function p(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,c=u9,x):(t.enter("characterReferenceValue"),o=7,c=Df,x(y))}function x(y){if(y===59&&s){const v=t.exit("characterReferenceValue");return c===jt&&!g1(i.sliceSerialize(v))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(y)&&s++<o?(t.consume(y),x):r(y)}}const Tm={partial:!0,tokenize:E9},_m={concrete:!0,name:"codeFenced",tokenize:C9};function C9(t,l,r){const i=this,s={partial:!0,tokenize:F};let o=0,c=0,d;return m;function m(_){return p(_)}function p(_){const I=i.events[i.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,d=_,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(_)}function x(_){return _===d?(c++,t.consume(_),x):c<3?r(_):(t.exit("codeFencedFenceSequence"),Te(_)?Oe(t,y,"whitespace")(_):y(_))}function y(_){return _===null||ge(_)?(t.exit("codeFencedFence"),i.interrupt?l(_):t.check(Tm,T,V)(_)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||ge(_)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(_)):Te(_)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Oe(t,S,"whitespace")(_)):_===96&&_===d?r(_):(t.consume(_),v)}function S(_){return _===null||ge(_)?y(_):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(_))}function C(_){return _===null||ge(_)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(_)):_===96&&_===d?r(_):(t.consume(_),C)}function T(_){return t.attempt(s,V,z)(_)}function z(_){return t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),M}function M(_){return o>0&&Te(_)?Oe(t,U,"linePrefix",o+1)(_):U(_)}function U(_){return _===null||ge(_)?t.check(Tm,T,V)(_):(t.enter("codeFlowValue"),N(_))}function N(_){return _===null||ge(_)?(t.exit("codeFlowValue"),U(_)):(t.consume(_),N)}function V(_){return t.exit("codeFenced"),l(_)}function F(_,I,se){let oe=0;return O;function O(P){return _.enter("lineEnding"),_.consume(P),_.exit("lineEnding"),ae}function ae(P){return _.enter("codeFencedFence"),Te(P)?Oe(_,te,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):te(P)}function te(P){return P===d?(_.enter("codeFencedFenceSequence"),be(P)):se(P)}function be(P){return P===d?(oe++,_.consume(P),be):oe>=c?(_.exit("codeFencedFenceSequence"),Te(P)?Oe(_,ue,"whitespace")(P):ue(P)):se(P)}function ue(P){return P===null||ge(P)?(_.exit("codeFencedFence"),I(P)):se(P)}}}function E9(t,l,r){const i=this;return s;function s(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o)}function o(c){return i.parser.lazy[i.now().line]?r(c):l(c)}}const cf={name:"codeIndented",tokenize:N9},M9={partial:!0,tokenize:j9};function N9(t,l,r){const i=this;return s;function s(p){return t.enter("codeIndented"),Oe(t,o,"linePrefix",5)(p)}function o(p){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(p):r(p)}function c(p){return p===null?m(p):ge(p)?t.attempt(M9,c,m)(p):(t.enter("codeFlowValue"),d(p))}function d(p){return p===null||ge(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),d)}function m(p){return t.exit("codeIndented"),l(p)}}function j9(t,l,r){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?r(c):ge(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Oe(t,o,"linePrefix",5)(c)}function o(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):ge(c)?s(c):r(c)}}const A9={name:"codeText",previous:T9,resolve:z9,tokenize:_9};function z9(t){let l=t.length-4,r=3,i,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(i=r;++i<l;)if(t[i][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[l][1].type="codeTextPadding",r+=2,l-=2;break}}for(i=r-1,l++;++i<=l;)s===void 0?i!==l&&t[i][1].type!=="lineEnding"&&(s=i):(i===l||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),l-=i-s-2,i=s+2),s=void 0);return t}function T9(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _9(t,l,r){let i=0,s,o;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),i++,d):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(o=t.enter("codeTextSequence"),s=0,x(y)):ge(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||ge(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),p)}function x(y){return y===96?(t.consume(y),s++,x):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",p(y))}}class R9{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(l,i):l>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(l,r,i){const s=r||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&fi(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),fi(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),fi(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const r=this.left.splice(l,Number.POSITIVE_INFINITY);fi(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);fi(this.left,r.reverse())}}}function fi(t,l){let r=0;if(l.length<1e4)t.push(...l);else for(;r<l.length;)t.push(...l.slice(r,r+1e4)),r+=1e4}function L3(t){const l={};let r=-1,i,s,o,c,d,m,p;const x=new R9(t);for(;++r<x.length;){for(;r in l;)r=l[r];if(i=x.get(r),r&&i[1].type==="chunkFlow"&&x.get(r-1)[1].type==="listItemPrefix"&&(m=i[1]._tokenizer.events,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(l,D9(x,r)),r=l[r],p=!0);else if(i[1]._container){for(o=r,s=void 0;o--;)if(c=x.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...x.get(s)[1].start},d=x.slice(s,r),d.unshift(i),x.splice(s,r-s+1,d))}}return tn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!p}function D9(t,l){const r=t.get(l)[1],i=t.get(l)[2];let s=l-1;const o=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],p={};let x,y,v=-1,S=r,C=0,T=0;const z=[T];for(;S;){for(;t.get(++s)[1]!==S;);o.push(s),S._tokenizer||(x=i.sliceStream(S),S.next||x.push(null),y&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=S,S=S.next}for(S=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(T=v+1,z.push(T),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):z.pop(),v=z.length;v--;){const M=d.slice(z[v],z[v+1]),U=o.pop();m.push([U,U+M.length-1]),t.splice(U,2,M)}for(m.reverse(),v=-1;++v<m.length;)p[C+m[v][0]]=C+m[v][1],C+=m[v][1]-m[v][0]-1;return p}const O9={resolve:U9,tokenize:H9},L9={partial:!0,tokenize:B9};function U9(t){return L3(t),t}function H9(t,l){let r;return i;function i(d){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):ge(d)?t.check(L9,c,o)(d):(t.consume(d),s)}function o(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function B9(t,l,r){const i=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Oe(t,o,"linePrefix")}function o(c){if(c===null||ge(c))return r(c);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(i.parser.constructs.flow,r,l)(c)}}function U3(t,l,r,i,s,o,c,d,m){const p=m||Number.POSITIVE_INFINITY;let x=0;return y;function y(M){return M===60?(t.enter(i),t.enter(s),t.enter(o),t.consume(M),t.exit(o),v):M===null||M===32||M===41||fs(M)?r(M):(t.enter(i),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),T(M))}function v(M){return M===62?(t.enter(o),t.consume(M),t.exit(o),t.exit(s),t.exit(i),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===62?(t.exit("chunkString"),t.exit(d),v(M)):M===null||M===60||ge(M)?r(M):(t.consume(M),M===92?C:S)}function C(M){return M===60||M===62||M===92?(t.consume(M),S):S(M)}function T(M){return!x&&(M===null||M===41||Xe(M))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(i),l(M)):x<p&&M===40?(t.consume(M),x++,T):M===41?(t.consume(M),x--,T):M===null||M===32||M===40||fs(M)?r(M):(t.consume(M),M===92?z:T)}function z(M){return M===40||M===41||M===92?(t.consume(M),T):T(M)}}function H3(t,l,r,i,s,o){const c=this;let d=0,m;return p;function p(S){return t.enter(i),t.enter(s),t.consume(S),t.exit(s),t.enter(o),x}function x(S){return d>999||S===null||S===91||S===93&&!m||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(S):S===93?(t.exit(o),t.enter(s),t.consume(S),t.exit(s),t.exit(i),l):ge(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===null||S===91||S===93||ge(S)||d++>999?(t.exit("chunkString"),x(S)):(t.consume(S),m||(m=!Te(S)),S===92?v:y)}function v(S){return S===91||S===92||S===93?(t.consume(S),d++,y):y(S)}}function B3(t,l,r,i,s,o){let c;return d;function d(v){return v===34||v===39||v===40?(t.enter(i),t.enter(s),t.consume(v),t.exit(s),c=v===40?41:v,m):r(v)}function m(v){return v===c?(t.enter(s),t.consume(v),t.exit(s),t.exit(i),l):(t.enter(o),p(v))}function p(v){return v===c?(t.exit(o),m(c)):v===null?r(v):ge(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Oe(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===c||v===null||ge(v)?(t.exit("chunkString"),p(v)):(t.consume(v),v===92?y:x)}function y(v){return v===c||v===92?(t.consume(v),x):x(v)}}function gi(t,l){let r;return i;function i(s){return ge(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,i):Te(s)?Oe(t,i,r?"linePrefix":"lineSuffix")(s):l(s)}}const Z9={name:"definition",tokenize:$9},q9={partial:!0,tokenize:V9};function $9(t,l,r){const i=this;let s;return o;function o(S){return t.enter("definition"),c(S)}function c(S){return H3.call(i,t,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return s=Cn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),m):r(S)}function m(S){return Xe(S)?gi(t,p)(S):p(S)}function p(S){return U3(t,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function x(S){return t.attempt(q9,y,y)(S)}function y(S){return Te(S)?Oe(t,v,"whitespace")(S):v(S)}function v(S){return S===null||ge(S)?(t.exit("definition"),i.parser.defined.push(s),l(S)):r(S)}}function V9(t,l,r){return i;function i(d){return Xe(d)?gi(t,s)(d):r(d)}function s(d){return B3(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Te(d)?Oe(t,c,"whitespace")(d):c(d)}function c(d){return d===null||ge(d)?l(d):r(d)}}const I9={name:"hardBreakEscape",tokenize:J9};function J9(t,l,r){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return ge(o)?(t.exit("hardBreakEscape"),l(o)):r(o)}}const F9={name:"headingAtx",resolve:Y9,tokenize:G9};function Y9(t,l){let r=t.length-2,i=3,s,o;return t[i][1].type==="whitespace"&&(i+=2),r-2>i&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&t[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[r][1].end},o={type:"chunkText",start:t[i][1].start,end:t[r][1].end,contentType:"text"},tn(t,i,r-i+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function G9(t,l,r){let i=0;return s;function s(x){return t.enter("atxHeading"),o(x)}function o(x){return t.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&i++<6?(t.consume(x),c):x===null||Xe(x)?(t.exit("atxHeadingSequence"),d(x)):r(x)}function d(x){return x===35?(t.enter("atxHeadingSequence"),m(x)):x===null||ge(x)?(t.exit("atxHeading"),l(x)):Te(x)?Oe(t,d,"whitespace")(x):(t.enter("atxHeadingText"),p(x))}function m(x){return x===35?(t.consume(x),m):(t.exit("atxHeadingSequence"),d(x))}function p(x){return x===null||x===35||Xe(x)?(t.exit("atxHeadingText"),d(x)):(t.consume(x),p)}}const X9=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Rm=["pre","script","style","textarea"],Q9={concrete:!0,name:"htmlFlow",resolveTo:W9,tokenize:eS},K9={partial:!0,tokenize:nS},P9={partial:!0,tokenize:tS};function W9(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function eS(t,l,r){const i=this;let s,o,c,d,m;return p;function p(k){return x(k)}function x(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),y}function y(k){return k===33?(t.consume(k),v):k===47?(t.consume(k),o=!0,T):k===63?(t.consume(k),s=3,i.interrupt?l:j):Rt(k)?(t.consume(k),c=String.fromCharCode(k),z):r(k)}function v(k){return k===45?(t.consume(k),s=2,S):k===91?(t.consume(k),s=5,d=0,C):Rt(k)?(t.consume(k),s=4,i.interrupt?l:j):r(k)}function S(k){return k===45?(t.consume(k),i.interrupt?l:j):r(k)}function C(k){const Q="CDATA[";return k===Q.charCodeAt(d++)?(t.consume(k),d===Q.length?i.interrupt?l:te:C):r(k)}function T(k){return Rt(k)?(t.consume(k),c=String.fromCharCode(k),z):r(k)}function z(k){if(k===null||k===47||k===62||Xe(k)){const Q=k===47,re=c.toLowerCase();return!Q&&!o&&Rm.includes(re)?(s=1,i.interrupt?l(k):te(k)):X9.includes(c.toLowerCase())?(s=6,Q?(t.consume(k),M):i.interrupt?l(k):te(k)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(k):o?U(k):N(k))}return k===45||jt(k)?(t.consume(k),c+=String.fromCharCode(k),z):r(k)}function M(k){return k===62?(t.consume(k),i.interrupt?l:te):r(k)}function U(k){return Te(k)?(t.consume(k),U):O(k)}function N(k){return k===47?(t.consume(k),O):k===58||k===95||Rt(k)?(t.consume(k),V):Te(k)?(t.consume(k),N):O(k)}function V(k){return k===45||k===46||k===58||k===95||jt(k)?(t.consume(k),V):F(k)}function F(k){return k===61?(t.consume(k),_):Te(k)?(t.consume(k),F):N(k)}function _(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),m=k,I):Te(k)?(t.consume(k),_):se(k)}function I(k){return k===m?(t.consume(k),m=null,oe):k===null||ge(k)?r(k):(t.consume(k),I)}function se(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Xe(k)?F(k):(t.consume(k),se)}function oe(k){return k===47||k===62||Te(k)?N(k):r(k)}function O(k){return k===62?(t.consume(k),ae):r(k)}function ae(k){return k===null||ge(k)?te(k):Te(k)?(t.consume(k),ae):r(k)}function te(k){return k===45&&s===2?(t.consume(k),H):k===60&&s===1?(t.consume(k),W):k===62&&s===4?(t.consume(k),R):k===63&&s===3?(t.consume(k),j):k===93&&s===5?(t.consume(k),Se):ge(k)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(K9,J,be)(k)):k===null||ge(k)?(t.exit("htmlFlowData"),be(k)):(t.consume(k),te)}function be(k){return t.check(P9,ue,J)(k)}function ue(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),P}function P(k){return k===null||ge(k)?be(k):(t.enter("htmlFlowData"),te(k))}function H(k){return k===45?(t.consume(k),j):te(k)}function W(k){return k===47?(t.consume(k),c="",ce):te(k)}function ce(k){if(k===62){const Q=c.toLowerCase();return Rm.includes(Q)?(t.consume(k),R):te(k)}return Rt(k)&&c.length<8?(t.consume(k),c+=String.fromCharCode(k),ce):te(k)}function Se(k){return k===93?(t.consume(k),j):te(k)}function j(k){return k===62?(t.consume(k),R):k===45&&s===2?(t.consume(k),j):te(k)}function R(k){return k===null||ge(k)?(t.exit("htmlFlowData"),J(k)):(t.consume(k),R)}function J(k){return t.exit("htmlFlow"),l(k)}}function tS(t,l,r){const i=this;return s;function s(c){return ge(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):r(c)}function o(c){return i.parser.lazy[i.now().line]?r(c):l(c)}}function nS(t,l,r){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Ai,l,r)}}const lS={name:"htmlText",tokenize:rS};function rS(t,l,r){const i=this;let s,o,c;return d;function d(j){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(j),m}function m(j){return j===33?(t.consume(j),p):j===47?(t.consume(j),F):j===63?(t.consume(j),N):Rt(j)?(t.consume(j),se):r(j)}function p(j){return j===45?(t.consume(j),x):j===91?(t.consume(j),o=0,C):Rt(j)?(t.consume(j),U):r(j)}function x(j){return j===45?(t.consume(j),S):r(j)}function y(j){return j===null?r(j):j===45?(t.consume(j),v):ge(j)?(c=y,W(j)):(t.consume(j),y)}function v(j){return j===45?(t.consume(j),S):y(j)}function S(j){return j===62?H(j):j===45?v(j):y(j)}function C(j){const R="CDATA[";return j===R.charCodeAt(o++)?(t.consume(j),o===R.length?T:C):r(j)}function T(j){return j===null?r(j):j===93?(t.consume(j),z):ge(j)?(c=T,W(j)):(t.consume(j),T)}function z(j){return j===93?(t.consume(j),M):T(j)}function M(j){return j===62?H(j):j===93?(t.consume(j),M):T(j)}function U(j){return j===null||j===62?H(j):ge(j)?(c=U,W(j)):(t.consume(j),U)}function N(j){return j===null?r(j):j===63?(t.consume(j),V):ge(j)?(c=N,W(j)):(t.consume(j),N)}function V(j){return j===62?H(j):N(j)}function F(j){return Rt(j)?(t.consume(j),_):r(j)}function _(j){return j===45||jt(j)?(t.consume(j),_):I(j)}function I(j){return ge(j)?(c=I,W(j)):Te(j)?(t.consume(j),I):H(j)}function se(j){return j===45||jt(j)?(t.consume(j),se):j===47||j===62||Xe(j)?oe(j):r(j)}function oe(j){return j===47?(t.consume(j),H):j===58||j===95||Rt(j)?(t.consume(j),O):ge(j)?(c=oe,W(j)):Te(j)?(t.consume(j),oe):H(j)}function O(j){return j===45||j===46||j===58||j===95||jt(j)?(t.consume(j),O):ae(j)}function ae(j){return j===61?(t.consume(j),te):ge(j)?(c=ae,W(j)):Te(j)?(t.consume(j),ae):oe(j)}function te(j){return j===null||j===60||j===61||j===62||j===96?r(j):j===34||j===39?(t.consume(j),s=j,be):ge(j)?(c=te,W(j)):Te(j)?(t.consume(j),te):(t.consume(j),ue)}function be(j){return j===s?(t.consume(j),s=void 0,P):j===null?r(j):ge(j)?(c=be,W(j)):(t.consume(j),be)}function ue(j){return j===null||j===34||j===39||j===60||j===61||j===96?r(j):j===47||j===62||Xe(j)?oe(j):(t.consume(j),ue)}function P(j){return j===47||j===62||Xe(j)?oe(j):r(j)}function H(j){return j===62?(t.consume(j),t.exit("htmlTextData"),t.exit("htmlText"),l):r(j)}function W(j){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),ce}function ce(j){return Te(j)?Oe(t,Se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):Se(j)}function Se(j){return t.enter("htmlTextData"),c(j)}}const y1={name:"labelEnd",resolveAll:sS,resolveTo:oS,tokenize:cS},aS={tokenize:fS},iS={tokenize:dS},uS={tokenize:hS};function sS(t){let l=-1;const r=[];for(;++l<t.length;){const i=t[l][1];if(r.push(t[l]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",l+=s}}return t.length!==r.length&&tn(t,0,t.length,r),t}function oS(t,l){let r=t.length,i=0,s,o,c,d;for(;r--;)if(s=t[r][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=r,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=r);const m={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[o][1].start},end:{...t[c][1].end}},x={type:"labelText",start:{...t[o+i+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",m,l],["enter",p,l]],d=mn(d,t.slice(o+1,o+i+3)),d=mn(d,[["enter",x,l]]),d=mn(d,Es(l.parser.constructs.insideSpan.null,t.slice(o+i+4,c-3),l)),d=mn(d,[["exit",x,l],t[c-2],t[c-1],["exit",p,l]]),d=mn(d,t.slice(c+1)),d=mn(d,[["exit",m,l]]),tn(t,o,t.length,d),t}function cS(t,l,r){const i=this;let s=i.events.length,o,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return d;function d(v){return o?o._inactive?y(v):(c=i.parser.defined.includes(Cn(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),m):r(v)}function m(v){return v===40?t.attempt(aS,x,c?x:y)(v):v===91?t.attempt(iS,x,c?p:y)(v):c?x(v):y(v)}function p(v){return t.attempt(uS,x,y)(v)}function x(v){return l(v)}function y(v){return o._balanced=!0,r(v)}}function fS(t,l,r){return i;function i(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Xe(y)?gi(t,o)(y):o(y)}function o(y){return y===41?x(y):U3(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Xe(y)?gi(t,m)(y):x(y)}function d(y){return r(y)}function m(y){return y===34||y===39||y===40?B3(t,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function p(y){return Xe(y)?gi(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):r(y)}}function dS(t,l,r){const i=this;return s;function s(d){return H3.call(i,t,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return i.parser.defined.includes(Cn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?l(d):r(d)}function c(d){return r(d)}}function hS(t,l,r){return i;function i(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):r(o)}}const mS={name:"labelStartImage",resolveAll:y1.resolveAll,tokenize:pS};function pS(t,l,r){const i=this;return s;function s(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),o}function o(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):r(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):l(d)}}const gS={name:"labelStartLink",resolveAll:y1.resolveAll,tokenize:yS};function yS(t,l,r){const i=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):l(c)}}const ff={name:"lineEnding",tokenize:xS};function xS(t,l){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Oe(t,l,"linePrefix")}}const rs={name:"thematicBreak",tokenize:bS};function bS(t,l,r){let i=0,s;return o;function o(p){return t.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(t.enter("thematicBreakSequence"),m(p)):i>=3&&(p===null||ge(p))?(t.exit("thematicBreak"),l(p)):r(p)}function m(p){return p===s?(t.consume(p),i++,m):(t.exit("thematicBreakSequence"),Te(p)?Oe(t,d,"whitespace")(p):d(p))}}const $t={continuation:{tokenize:kS},exit:ES,name:"list",tokenize:wS},vS={partial:!0,tokenize:MS},SS={partial:!0,tokenize:CS};function wS(t,l,r){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(S){const C=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Df(S)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(rs,r,p)(S):p(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(S)}return r(S)}function m(S){return Df(S)&&++c<10?(t.consume(S),m):(!i.interrupt||c<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),p(S)):r(S)}function p(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(Ai,i.interrupt?r:x,t.attempt(vS,v,y))}function x(S){return i.containerState.initialBlankLine=!0,o++,v(S)}function y(S){return Te(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),v):r(S)}function v(S){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function kS(t,l,r){const i=this;return i.containerState._closeFlow=void 0,t.check(Ai,s,o);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Oe(t,l,"listItemIndent",i.containerState.size+1)(d)}function o(d){return i.containerState.furtherBlankLines||!Te(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(SS,l,c)(d))}function c(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Oe(t,t.attempt($t,l,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function CS(t,l,r){const i=this;return Oe(t,s,"listItemIndent",i.containerState.size+1);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?l(o):r(o)}}function ES(t){t.exit(this.containerState.type)}function MS(t,l,r){const i=this;return Oe(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=i.events[i.events.length-1];return!Te(o)&&c&&c[1].type==="listItemPrefixWhitespace"?l(o):r(o)}}const Dm={name:"setextUnderline",resolveTo:NS,tokenize:jS};function NS(t,l){let r=t.length,i,s,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){i=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",c,l]),t.splice(o+1,0,["exit",t[i][1],l]),t[i][1].end={...t[o][1].end}):t[i][1]=c,t.push(["exit",c,l]),t}function jS(t,l,r){const i=this;let s;return o;function o(p){let x=i.events.length,y;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){y=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(t.enter("setextHeadingLine"),s=p,c(p)):r(p)}function c(p){return t.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(t.consume(p),d):(t.exit("setextHeadingLineSequence"),Te(p)?Oe(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||ge(p)?(t.exit("setextHeadingLine"),l(p)):r(p)}}const AS={tokenize:zS};function zS(t){const l=this,r=t.attempt(Ai,i,t.attempt(this.parser.constructs.flowInitial,s,Oe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(O9,s)),"linePrefix")));return r;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,r}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,r}}const TS={resolveAll:q3()},_S=Z3("string"),RS=Z3("text");function Z3(t){return{resolveAll:q3(t==="text"?DS:void 0),tokenize:l};function l(r){const i=this,s=this.parser.constructs[t],o=r.attempt(s,c,d);return c;function c(x){return p(x)?o(x):d(x)}function d(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),m}function m(x){return p(x)?(r.exit("data"),o(x)):(r.consume(x),m)}function p(x){if(x===null)return!0;const y=s[x];let v=-1;if(y)for(;++v<y.length;){const S=y[v];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function q3(t){return l;function l(r,i){let s=-1,o;for(;++s<=r.length;)o===void 0?r[s]&&r[s][1].type==="data"&&(o=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==o+2&&(r[o][1].end=r[s-1][1].end,r.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(r,i):r}}function DS(t,l){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const i=t[r-1][1],s=l.sliceStream(i);let o=s.length,c=-1,d=0,m;for(;o--;){const p=s[o];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)m=!0,d++;else if(p!==-1){o++;break}}if(l._contentTypeTextTrailing&&r===t.length&&(d=0),d){const p={type:r===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:i.start._bufferIndex+c,_index:i.start._index+o,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(t.splice(r,0,["enter",p,l],["exit",p,l]),r+=2)}r++}return t}const OS={42:$t,43:$t,45:$t,48:$t,49:$t,50:$t,51:$t,52:$t,53:$t,54:$t,55:$t,56:$t,57:$t,62:R3},LS={91:Z9},US={[-2]:cf,[-1]:cf,32:cf},HS={35:F9,42:rs,45:[Dm,rs],60:Q9,61:Dm,95:rs,96:_m,126:_m},BS={38:O3,92:D3},ZS={[-5]:ff,[-4]:ff,[-3]:ff,33:mS,38:O3,42:Of,60:[g9,lS],91:gS,92:[I9,D3],93:y1,95:Of,96:A9},qS={null:[Of,TS]},$S={null:[42,95]},VS={null:[]},IS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$S,contentInitial:LS,disable:VS,document:OS,flow:HS,flowInitial:US,insideSpan:qS,string:BS,text:ZS},Symbol.toStringTag,{value:"Module"}));function JS(t,l,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},o=[];let c=[],d=[];const m={attempt:I(F),check:I(_),consume:U,enter:N,exit:V,interrupt:I(_,{interrupt:!0})},p={code:null,containerState:{},defineSkip:T,events:[],now:C,parser:t,previous:null,sliceSerialize:v,sliceStream:S,write:y};let x=l.tokenize.call(p,m);return l.resolveAll&&o.push(l),p;function y(ae){return c=mn(c,ae),z(),c[c.length-1]!==null?[]:(se(l,0),p.events=Es(o,p.events,p),p.events)}function v(ae,te){return YS(S(ae),te)}function S(ae){return FS(c,ae)}function C(){const{_bufferIndex:ae,_index:te,line:be,column:ue,offset:P}=i;return{_bufferIndex:ae,_index:te,line:be,column:ue,offset:P}}function T(ae){s[ae.line]=ae.column,O()}function z(){let ae;for(;i._index<c.length;){const te=c[i._index];if(typeof te=="string")for(ae=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ae&&i._bufferIndex<te.length;)M(te.charCodeAt(i._bufferIndex));else M(te)}}function M(ae){x=x(ae)}function U(ae){ge(ae)?(i.line++,i.column=1,i.offset+=ae===-3?2:1,O()):ae!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=ae}function N(ae,te){const be=te||{};return be.type=ae,be.start=C(),p.events.push(["enter",be,p]),d.push(be),be}function V(ae){const te=d.pop();return te.end=C(),p.events.push(["exit",te,p]),te}function F(ae,te){se(ae,te.from)}function _(ae,te){te.restore()}function I(ae,te){return be;function be(ue,P,H){let W,ce,Se,j;return Array.isArray(ue)?J(ue):"tokenize"in ue?J([ue]):R(ue);function R(ee){return ne;function ne(fe){const me=fe!==null&&ee[fe],Le=fe!==null&&ee.null,st=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return J(st)(fe)}}function J(ee){return W=ee,ce=0,ee.length===0?H:k(ee[ce])}function k(ee){return ne;function ne(fe){return j=oe(),Se=ee,ee.partial||(p.currentConstruct=ee),ee.name&&p.parser.constructs.disable.null.includes(ee.name)?re():ee.tokenize.call(te?Object.assign(Object.create(p),te):p,m,Q,re)(fe)}}function Q(ee){return ae(Se,j),P}function re(ee){return j.restore(),++ce<W.length?k(W[ce]):H}}}function se(ae,te){ae.resolveAll&&!o.includes(ae)&&o.push(ae),ae.resolve&&tn(p.events,te,p.events.length-te,ae.resolve(p.events.slice(te),p)),ae.resolveTo&&(p.events=ae.resolveTo(p.events,p))}function oe(){const ae=C(),te=p.previous,be=p.currentConstruct,ue=p.events.length,P=Array.from(d);return{from:ue,restore:H};function H(){i=ae,p.previous=te,p.currentConstruct=be,p.events.length=ue,d=P,O()}}function O(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function FS(t,l){const r=l.start._index,i=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let c;if(r===s)c=[t[r].slice(i,o)];else{if(c=t.slice(r,s),i>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(i):c.shift()}o>0&&c.push(t[s].slice(0,o))}return c}function YS(t,l){let r=-1;const i=[];let s;for(;++r<t.length;){const o=t[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
336
|
+
`,children:[g.jsx(s,{className:"w-3.5 h-3.5"}),i.label]},i.id)})})}function rm({name:t}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs(xt,{className:"p-6 max-w-md w-full text-center",children:[g.jsx("h2",{className:"text-lg font-semibold text-herd-fg mb-2",children:"Agent Not Found"}),g.jsxs("p",{className:"text-sm text-herd-muted mb-4",children:['No agent named "',t,'" exists in the fleet.']}),g.jsxs(yt,{to:"/",className:"inline-flex items-center gap-1.5 text-herd-primary hover:text-herd-primary-hover text-xs font-medium transition-colors",children:[g.jsx(Qf,{className:"w-3.5 h-3.5"}),"Back to Dashboard"]})]})})}function ib({name:t}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-3",children:[g.jsx(nl,{size:"lg"}),g.jsxs("p",{className:"text-sm text-herd-muted",children:['Loading agent "',t,'"...']})]})})}function ub({message:t,onRetry:l}){return g.jsx("div",{className:"p-4 h-full flex items-center justify-center",children:g.jsxs(xt,{className:"p-6 max-w-md w-full",children:[g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4",children:t}),g.jsxs("div",{className:"flex gap-2 justify-center",children:[g.jsx("button",{type:"button",onClick:l,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Retry"}),g.jsx(yt,{to:"/",className:"border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:"Back to Dashboard"})]})]})})}const sb=new Set(["overview","jobs","output"]);function am(){const{name:t,tab:l}=Jf(),{agent:r,loading:i,error:s,retry:o}=Q8(t??null),c=l&&sb.has(l)?l:"overview";if(!t)return g.jsx(rm,{name:"(unknown)"});if(i)return g.jsx(ib,{name:t});if(s)return g.jsx(ub,{message:s,onRetry:o});if(!r)return g.jsx(rm,{name:t});function d(){switch(c){case"overview":return g.jsx(n8,{agent:r});case"jobs":return g.jsx(Q7,{agent:r});case"output":return g.jsx(lb,{agent:r});default:return c}}return g.jsxs("div",{className:"p-4 space-y-4 overflow-auto h-full",children:[g.jsxs(yt,{to:"/",className:"inline-flex items-center gap-1.5 text-herd-muted hover:text-herd-fg text-xs font-medium transition-colors",children:[g.jsx(Qf,{className:"w-3.5 h-3.5"}),"Back to Dashboard"]}),g.jsx(xt,{className:"p-4",children:g.jsx(N7,{agent:r})}),g.jsxs(xt,{className:"overflow-hidden",children:[g.jsx(ab,{activeTab:c,agentName:t}),g.jsx("div",{className:"p-4",children:d()})]})]})}function ob(t,l){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const cb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,db={};function im(t,l){return(db.jsx?fb:cb).test(t)}const hb=/[ \t\n\f\r]/g;function mb(t){return typeof t=="object"?t.type==="text"?um(t.value):!1:um(t)}function um(t){return t.replace(hb,"")===""}class ji{constructor(l,r,i){this.normal=r,this.property=l,i&&(this.space=i)}}ji.prototype.normal={};ji.prototype.property={};ji.prototype.space=void 0;function Gp(t,l){const r={},i={};for(const s of t)Object.assign(r,s.property),Object.assign(i,s.normal);return new ji(r,i,l)}function Nf(t){return t.toLowerCase()}class It{constructor(l,r){this.attribute=r,this.property=l}}It.prototype.attribute="";It.prototype.booleanish=!1;It.prototype.boolean=!1;It.prototype.commaOrSpaceSeparated=!1;It.prototype.commaSeparated=!1;It.prototype.defined=!1;It.prototype.mustUseProperty=!1;It.prototype.number=!1;It.prototype.overloadedBoolean=!1;It.prototype.property="";It.prototype.spaceSeparated=!1;It.prototype.space=void 0;let pb=0;const Ee=or(),ht=or(),jf=or(),le=or(),Qe=or(),ra=or(),Wt=or();function or(){return 2**++pb}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:ht,commaOrSpaceSeparated:Wt,commaSeparated:ra,number:le,overloadedBoolean:jf,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),Wc=Object.keys(Af);class a1 extends It{constructor(l,r,i,s){let o=-1;if(super(l,r),sm(this,"space",s),typeof i=="number")for(;++o<Wc.length;){const c=Wc[o];sm(this,Wc[o],(i&Af[c])===Af[c])}}}a1.prototype.defined=!0;function sm(t,l,r){r&&(t[l]=r)}function da(t){const l={},r={};for(const[i,s]of Object.entries(t.properties)){const o=new a1(i,t.transform(t.attributes||{},i),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(o.mustUseProperty=!0),l[i]=o,r[Nf(i)]=i,r[Nf(o.attribute)]=i}return new ji(l,r,t.space)}const Xp=da({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:Qe,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:le,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:Qe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ht,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Qp(t,l){return l in t?t[l]:l}function Kp(t,l){return Qp(t,l.toLowerCase())}const gb=da({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Qe,autoFocus:Ee,autoPlay:Ee,blocking:Qe,capture:null,charSet:null,checked:Ee,cite:null,className:Qe,cols:le,colSpan:null,content:null,contentEditable:ht,controls:Ee,controlsList:Qe,coords:le|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:jf,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Qe,height:le,hidden:jf,high:le,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Ee,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:le,pattern:null,ping:Qe,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Qe,required:Ee,reversed:Ee,rows:le,rowSpan:le,sandbox:Qe,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:ht,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Kp}),yb=da({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Wt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ra,g2:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:Wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wt,rev:Wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wt,requiredFeatures:Wt,requiredFonts:Wt,requiredFormats:Wt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:Wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qp}),Pp=da({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),Wp=da({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Kp}),e3=da({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),xb={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},bb=/[A-Z]/g,om=/-[a-z]/g,vb=/^data[-\w.:]+$/i;function Sb(t,l){const r=Nf(l);let i=l,s=It;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&vb.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(om,kb);i="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!om.test(o)){let c=o.replace(bb,wb);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}s=a1}return new s(i,l)}function wb(t){return"-"+t.toLowerCase()}function kb(t){return t.charAt(1).toUpperCase()}const Cb=Gp([Xp,gb,Pp,Wp,e3],"html"),i1=Gp([Xp,yb,Pp,Wp,e3],"svg");function Eb(t){return t.join(" ").trim()}var Kr={},ef,cm;function Mb(){if(cm)return ef;cm=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
|
|
337
|
+
`,p="/",x="*",y="",v="comment",S="declaration";function C(z,M){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];M=M||{};var U=1,N=1;function V(ue){var P=ue.match(l);P&&(U+=P.length);var H=ue.lastIndexOf(m);N=~H?ue.length-H:N+ue.length}function F(){var ue={line:U,column:N};return function(P){return P.position=new _(ue),oe(),P}}function _(ue){this.start=ue,this.end={line:U,column:N},this.source=M.source}_.prototype.content=z;function I(ue){var P=new Error(M.source+":"+U+":"+N+": "+ue);if(P.reason=ue,P.filename=M.source,P.line=U,P.column=N,P.source=z,!M.silent)throw P}function se(ue){var P=ue.exec(z);if(P){var H=P[0];return V(H),z=z.slice(H.length),P}}function oe(){se(r)}function O(ue){var P;for(ue=ue||[];P=ae();)P!==!1&&ue.push(P);return ue}function ae(){var ue=F();if(!(p!=z.charAt(0)||x!=z.charAt(1))){for(var P=2;y!=z.charAt(P)&&(x!=z.charAt(P)||p!=z.charAt(P+1));)++P;if(P+=2,y===z.charAt(P-1))return I("End of comment missing");var H=z.slice(2,P-2);return N+=2,V(H),z=z.slice(P),N+=2,ue({type:v,comment:H})}}function te(){var ue=F(),P=se(i);if(P){if(ae(),!se(s))return I("property missing ':'");var H=se(o),W=ue({type:S,property:T(P[0].replace(t,y)),value:H?T(H[0].replace(t,y)):y});return se(c),W}}function be(){var ue=[];O(ue);for(var P;P=te();)P!==!1&&(ue.push(P),O(ue));return ue}return oe(),be()}function T(z){return z?z.replace(d,y):y}return ef=C,ef}var fm;function Nb(){if(fm)return Kr;fm=1;var t=Kr&&Kr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.default=r;const l=t(Mb());function r(i,s){let o=null;if(!i||typeof i!="string")return o;const c=(0,l.default)(i),d=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:x}=m;d?s(p,x,m):x&&(o=o||{},o[p]=x)}),o}return Kr}var oi={},dm;function jb(){if(dm)return oi;dm=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(p){return!p||r.test(p)||t.test(p)},c=function(p,x){return x.toUpperCase()},d=function(p,x){return"".concat(x,"-")},m=function(p,x){return x===void 0&&(x={}),o(p)?p:(p=p.toLowerCase(),x.reactCompat?p=p.replace(s,d):p=p.replace(i,d),p.replace(l,c))};return oi.camelCase=m,oi}var ci,hm;function Ab(){if(hm)return ci;hm=1;var t=ci&&ci.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(Nb()),r=jb();function i(s,o){var c={};return!s||typeof s!="string"||(0,l.default)(s,function(d,m){d&&m&&(c[(0,r.camelCase)(d,o)]=m)}),c}return i.default=i,ci=i,ci}var zb=Ab();const Tb=qf(zb),t3=n3("end"),u1=n3("start");function n3(t){return l;function l(r){const i=r&&r.position&&r.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function _b(t){const l=u1(t),r=t3(t);if(l&&r)return{start:l,end:r}}function pi(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?mm(t.position):"start"in t||"end"in t?mm(t):"line"in t||"column"in t?zf(t):""}function zf(t){return pm(t&&t.line)+":"+pm(t&&t.column)}function mm(t){return zf(t&&t.start)+"-"+zf(t&&t.end)}function pm(t){return t&&typeof t=="number"?t:1}class At extends Error{constructor(l,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let s="",o={},c=!1;if(r&&("line"in r&&"column"in r?o={place:r}:"start"in r&&"end"in r?o={place:r}:"type"in r?o={ancestors:[r],place:r.position}:o={...r}),typeof l=="string"?s=l:!o.cause&&l&&(c=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof i=="string"){const m=i.indexOf(":");m===-1?o.ruleId=i:(o.source=i.slice(0,m),o.ruleId=i.slice(m+1))}if(!o.place&&o.ancestors&&o.ancestors){const m=o.ancestors[o.ancestors.length-1];m&&(o.place=m.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=pi(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const s1={}.hasOwnProperty,Rb=new Map,Db=/[A-Z]/g,Ob=new Set(["table","tbody","thead","tfoot","tr"]),Lb=new Set(["td","th"]),l3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ub(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=l.filePath||void 0;let i;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Jb(r,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=Ib(r,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:i,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?i1:Cb,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=r3(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function r3(t,l,r){if(l.type==="element")return Hb(t,l,r);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return Bb(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return qb(t,l,r);if(l.type==="mdxjsEsm")return Zb(t,l);if(l.type==="root")return $b(t,l,r);if(l.type==="text")return Vb(t,l)}function Hb(t,l,r){const i=t.schema;let s=i;l.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=i1,t.schema=s),t.ancestors.push(l);const o=i3(t,l.tagName,!1),c=Fb(t,l);let d=c1(t,l);return Ob.has(l.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!mb(m):!0})),a3(t,c,o,l),o1(c,d),t.ancestors.pop(),t.schema=i,t.create(l,o,c,r)}function Bb(t,l){if(l.data&&l.data.estree&&t.evaluater){const i=l.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Si(t,l.position)}function Zb(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Si(t,l.position)}function qb(t,l,r){const i=t.schema;let s=i;l.name==="svg"&&i.space==="html"&&(s=i1,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:i3(t,l.name,!0),c=Yb(t,l),d=c1(t,l);return a3(t,c,o,l),o1(c,d),t.ancestors.pop(),t.schema=i,t.create(l,o,c,r)}function $b(t,l,r){const i={};return o1(i,c1(t,l)),t.create(l,t.Fragment,i,r)}function Vb(t,l){return l.value}function a3(t,l,r,i){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(l.node=i)}function o1(t,l){if(l.length>0){const r=l.length>1?l:l[0];r&&(t.children=r)}}function Ib(t,l,r){return i;function i(s,o,c,d){const p=Array.isArray(c.children)?r:l;return d?p(o,c,d):p(o,c)}}function Jb(t,l){return r;function r(i,s,o,c){const d=Array.isArray(o.children),m=u1(i);return l(s,o,c,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function Fb(t,l){const r={};let i,s;for(s in l.properties)if(s!=="children"&&s1.call(l.properties,s)){const o=Gb(t,s,l.properties[s]);if(o){const[c,d]=o;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&Lb.has(l.tagName)?i=d:r[c]=d}}if(i){const o=r.style||(r.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function Yb(t,l){const r={};for(const i of l.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const o=i.data.estree.body[0];o.type;const c=o.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,t.evaluater.evaluateExpression(d.argument))}else Si(t,l.position);else{const s=i.name;let o;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const d=i.value.data.estree.body[0];d.type,o=t.evaluater.evaluateExpression(d.expression)}else Si(t,l.position);else o=i.value===null?!0:i.value;r[s]=o}return r}function c1(t,l){const r=[];let i=-1;const s=t.passKeys?new Map:Rb;for(;++i<l.children.length;){const o=l.children[i];let c;if(t.passKeys){const m=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(m){const p=s.get(m)||0;c=m+"-"+p,s.set(m,p+1)}}const d=r3(t,o,c);d!==void 0&&r.push(d)}return r}function Gb(t,l,r){const i=Sb(t.schema,l);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?ob(r):Eb(r)),i.property==="style"){let s=typeof r=="object"?r:Xb(t,String(r));return t.stylePropertyNameCase==="css"&&(s=Qb(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&i.space?xb[i.property]||i.property:i.attribute,r]}}function Xb(t,l){try{return Tb(l,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const i=r,s=new At("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=l3+"#cannot-parse-style-attribute",s}}function i3(t,l,r){let i;if(!r)i={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,c;for(;++o<s.length;){const d=im(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}i=c}else i=im(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(i.type==="Literal"){const s=i.value;return s1.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(i);Si(t)}function Si(t,l){const r=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=l3+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Qb(t){const l={};let r;for(r in t)s1.call(t,r)&&(l[Kb(r)]=t[r]);return l}function Kb(t){let l=t.replace(Db,Pb);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function Pb(t){return"-"+t.toLowerCase()}const tf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Wb={};function f1(t,l){const r=Wb,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return u3(t,i,s)}function u3(t,l,r){if(ev(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return gm(t.children,l,r)}return Array.isArray(t)?gm(t,l,r):""}function gm(t,l,r){const i=[];let s=-1;for(;++s<t.length;)i[s]=u3(t[s],l,r);return i.join("")}function ev(t){return!!(t&&typeof t=="object")}const ym=document.createElement("i");function d1(t){const l="&"+t+";";ym.innerHTML=l;const r=ym.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===l?!1:r}function tn(t,l,r,i){const s=t.length;let o=0,c;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(l,r),t.splice(...c);else for(r&&t.splice(l,r);o<i.length;)c=i.slice(o,o+1e4),c.unshift(l,0),t.splice(...c),o+=1e4,l+=1e4}function mn(t,l){return t.length>0?(tn(t,t.length,0,l),t):l}const xm={}.hasOwnProperty;function s3(t){const l={};let r=-1;for(;++r<t.length;)tv(l,t[r]);return l}function tv(t,l){let r;for(r in l){const s=(xm.call(t,r)?t[r]:void 0)||(t[r]={}),o=l[r];let c;if(o)for(c in o){xm.call(s,c)||(s[c]=[]);const d=o[c];nv(s[c],Array.isArray(d)?d:d?[d]:[])}}}function nv(t,l){let r=-1;const i=[];for(;++r<l.length;)(l[r].add==="after"?t:i).push(l[r]);tn(t,0,0,i)}function o3(t,l){const r=Number.parseInt(t,l);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function kn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=Ul(/[A-Za-z]/),jt=Ul(/[\dA-Za-z]/),lv=Ul(/[#-'*+\--9=?A-Z^-~]/);function os(t){return t!==null&&(t<32||t===127)}const Tf=Ul(/\d/),rv=Ul(/[\dA-Fa-f]/),av=Ul(/[!-/:-@[-`{-~]/);function ge(t){return t!==null&&t<-2}function Xe(t){return t!==null&&(t<0||t===32)}function Te(t){return t===-2||t===-1||t===32}const vs=Ul(new RegExp("\\p{P}|\\p{S}","u")),ir=Ul(/\s/);function Ul(t){return l;function l(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function ha(t){const l=[];let r=-1,i=0,s=0;for(;++r<t.length;){const o=t.charCodeAt(r);let c="";if(o===37&&jt(t.charCodeAt(r+1))&&jt(t.charCodeAt(r+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const d=t.charCodeAt(r+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),s=1):c="�"}else c=String.fromCharCode(o);c&&(l.push(t.slice(i,r),encodeURIComponent(c)),i=r+s+1,c=""),s&&(r+=s,s=0)}return l.join("")+t.slice(i)}function Oe(t,l,r,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(m){return Te(m)?(t.enter(r),d(m)):l(m)}function d(m){return Te(m)&&o++<s?(t.consume(m),d):(t.exit(r),l(m))}}const iv={tokenize:uv};function uv(t){const l=t.attempt(this.parser.constructs.contentInitial,i,s);let r;return l;function i(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Oe(t,l,"linePrefix")}function s(d){return t.enter("paragraph"),o(d)}function o(d){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return ge(d)?(t.consume(d),t.exit("chunkText"),o):(t.consume(d),c)}}const sv={tokenize:ov},bm={tokenize:cv};function ov(t){const l=this,r=[];let i=0,s,o,c;return d;function d(N){if(i<r.length){const V=r[i];return l.containerState=V[1],t.attempt(V[0].continuation,m,p)(N)}return p(N)}function m(N){if(i++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&U();const V=l.events.length;let F=V,_;for(;F--;)if(l.events[F][0]==="exit"&&l.events[F][1].type==="chunkFlow"){_=l.events[F][1].end;break}M(i);let I=V;for(;I<l.events.length;)l.events[I][1].end={..._},I++;return tn(l.events,F+1,0,l.events.slice(V)),l.events.length=I,p(N)}return d(N)}function p(N){if(i===r.length){if(!s)return v(N);if(s.currentConstruct&&s.currentConstruct.concrete)return C(N);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(bm,x,y)(N)}function x(N){return s&&U(),M(i),v(N)}function y(N){return l.parser.lazy[l.now().line]=i!==r.length,c=l.now().offset,C(N)}function v(N){return l.containerState={},t.attempt(bm,S,C)(N)}function S(N){return i++,r.push([l.currentConstruct,l.containerState]),v(N)}function C(N){if(N===null){s&&U(),M(0),t.consume(N);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),T(N)}function T(N){if(N===null){z(t.exit("chunkFlow"),!0),M(0),t.consume(N);return}return ge(N)?(t.consume(N),z(t.exit("chunkFlow")),i=0,l.interrupt=void 0,d):(t.consume(N),T)}function z(N,V){const F=l.sliceStream(N);if(V&&F.push(null),N.previous=o,o&&(o.next=N),o=N,s.defineSkip(N.start),s.write(F),l.parser.lazy[N.start.line]){let _=s.events.length;for(;_--;)if(s.events[_][1].start.offset<c&&(!s.events[_][1].end||s.events[_][1].end.offset>c))return;const I=l.events.length;let se=I,oe,O;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){if(oe){O=l.events[se][1].end;break}oe=!0}for(M(i),_=I;_<l.events.length;)l.events[_][1].end={...O},_++;tn(l.events,se+1,0,l.events.slice(I)),l.events.length=_}}function M(N){let V=r.length;for(;V-- >N;){const F=r[V];l.containerState=F[1],F[0].exit.call(l,t)}r.length=N}function U(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function cv(t,l,r){return Oe(t,t.attempt(this.parser.constructs.document,l,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ia(t){if(t===null||Xe(t)||ir(t))return 1;if(vs(t))return 2}function Ss(t,l,r){const i=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!i.includes(o)&&(l=o(l,r),i.push(o))}return l}const _f={name:"attention",resolveAll:fv,tokenize:dv};function fv(t,l){let r=-1,i,s,o,c,d,m,p,x;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(i=r;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&l.sliceSerialize(t[i][1]).charCodeAt(0)===l.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[i][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[i][1].end.offset-t[i][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[i][1].end},v={...t[r][1].start};vm(y,-m),vm(v,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[i][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:v},o={type:m>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[r][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[i][1].end={...c.start},t[r][1].start={...d.end},p=[],t[i][1].end.offset-t[i][1].start.offset&&(p=mn(p,[["enter",t[i][1],l],["exit",t[i][1],l]])),p=mn(p,[["enter",s,l],["enter",c,l],["exit",c,l],["enter",o,l]]),p=mn(p,Ss(l.parser.constructs.insideSpan.null,t.slice(i+1,r),l)),p=mn(p,[["exit",o,l],["enter",d,l],["exit",d,l],["exit",s,l]]),t[r][1].end.offset-t[r][1].start.offset?(x=2,p=mn(p,[["enter",t[r][1],l],["exit",t[r][1],l]])):x=0,tn(t,i-1,r-i+3,p),r=i+p.length-x-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function dv(t,l){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,s=ia(i);let o;return c;function c(m){return o=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===o)return t.consume(m),d;const p=t.exit("attentionSequence"),x=ia(m),y=!x||x===2&&s||r.includes(m),v=!s||s===2&&x||r.includes(i);return p._open=!!(o===42?y:y&&(s||!v)),p._close=!!(o===42?v:v&&(x||!y)),l(m)}}function vm(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const hv={name:"autolink",tokenize:mv};function mv(t,l,r){let i=0;return s;function s(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(S){return Rt(S)?(t.consume(S),c):S===64?r(S):p(S)}function c(S){return S===43||S===45||S===46||jt(S)?(i=1,d(S)):p(S)}function d(S){return S===58?(t.consume(S),i=0,m):(S===43||S===45||S===46||jt(S))&&i++<32?(t.consume(S),d):(i=0,p(S))}function m(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||os(S)?r(S):(t.consume(S),m)}function p(S){return S===64?(t.consume(S),x):lv(S)?(t.consume(S),p):r(S)}function x(S){return jt(S)?y(S):r(S)}function y(S){return S===46?(t.consume(S),i=0,x):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):v(S)}function v(S){if((S===45||jt(S))&&i++<63){const C=S===45?v:y;return t.consume(S),C}return r(S)}}const Ai={partial:!0,tokenize:pv};function pv(t,l,r){return i;function i(o){return Te(o)?Oe(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||ge(o)?l(o):r(o)}}const c3={continuation:{tokenize:yv},exit:xv,name:"blockQuote",tokenize:gv};function gv(t,l,r){const i=this;return s;function s(c){if(c===62){const d=i.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),o}return r(c)}function o(c){return Te(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function yv(t,l,r){const i=this;return s;function s(c){return Te(c)?Oe(t,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return t.attempt(c3,l,r)(c)}}function xv(t){t.exit("blockQuote")}const f3={name:"characterEscape",tokenize:bv};function bv(t,l,r){return i;function i(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return av(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):r(o)}}const d3={name:"characterReference",tokenize:vv};function vv(t,l,r){const i=this;let s=0,o,c;return d;function d(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),o=31,c=jt,x(y))}function p(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,c=rv,x):(t.enter("characterReferenceValue"),o=7,c=Tf,x(y))}function x(y){if(y===59&&s){const v=t.exit("characterReferenceValue");return c===jt&&!d1(i.sliceSerialize(v))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(y)&&s++<o?(t.consume(y),x):r(y)}}const Sm={partial:!0,tokenize:wv},wm={concrete:!0,name:"codeFenced",tokenize:Sv};function Sv(t,l,r){const i=this,s={partial:!0,tokenize:F};let o=0,c=0,d;return m;function m(_){return p(_)}function p(_){const I=i.events[i.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,d=_,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(_)}function x(_){return _===d?(c++,t.consume(_),x):c<3?r(_):(t.exit("codeFencedFenceSequence"),Te(_)?Oe(t,y,"whitespace")(_):y(_))}function y(_){return _===null||ge(_)?(t.exit("codeFencedFence"),i.interrupt?l(_):t.check(Sm,T,V)(_)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===null||ge(_)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(_)):Te(_)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Oe(t,S,"whitespace")(_)):_===96&&_===d?r(_):(t.consume(_),v)}function S(_){return _===null||ge(_)?y(_):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(_))}function C(_){return _===null||ge(_)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(_)):_===96&&_===d?r(_):(t.consume(_),C)}function T(_){return t.attempt(s,V,z)(_)}function z(_){return t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),M}function M(_){return o>0&&Te(_)?Oe(t,U,"linePrefix",o+1)(_):U(_)}function U(_){return _===null||ge(_)?t.check(Sm,T,V)(_):(t.enter("codeFlowValue"),N(_))}function N(_){return _===null||ge(_)?(t.exit("codeFlowValue"),U(_)):(t.consume(_),N)}function V(_){return t.exit("codeFenced"),l(_)}function F(_,I,se){let oe=0;return O;function O(P){return _.enter("lineEnding"),_.consume(P),_.exit("lineEnding"),ae}function ae(P){return _.enter("codeFencedFence"),Te(P)?Oe(_,te,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):te(P)}function te(P){return P===d?(_.enter("codeFencedFenceSequence"),be(P)):se(P)}function be(P){return P===d?(oe++,_.consume(P),be):oe>=c?(_.exit("codeFencedFenceSequence"),Te(P)?Oe(_,ue,"whitespace")(P):ue(P)):se(P)}function ue(P){return P===null||ge(P)?(_.exit("codeFencedFence"),I(P)):se(P)}}}function wv(t,l,r){const i=this;return s;function s(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o)}function o(c){return i.parser.lazy[i.now().line]?r(c):l(c)}}const nf={name:"codeIndented",tokenize:Cv},kv={partial:!0,tokenize:Ev};function Cv(t,l,r){const i=this;return s;function s(p){return t.enter("codeIndented"),Oe(t,o,"linePrefix",5)(p)}function o(p){const x=i.events[i.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?c(p):r(p)}function c(p){return p===null?m(p):ge(p)?t.attempt(kv,c,m)(p):(t.enter("codeFlowValue"),d(p))}function d(p){return p===null||ge(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),d)}function m(p){return t.exit("codeIndented"),l(p)}}function Ev(t,l,r){const i=this;return s;function s(c){return i.parser.lazy[i.now().line]?r(c):ge(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Oe(t,o,"linePrefix",5)(c)}function o(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):ge(c)?s(c):r(c)}}const Mv={name:"codeText",previous:jv,resolve:Nv,tokenize:Av};function Nv(t){let l=t.length-4,r=3,i,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(i=r;++i<l;)if(t[i][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[l][1].type="codeTextPadding",r+=2,l-=2;break}}for(i=r-1,l++;++i<=l;)s===void 0?i!==l&&t[i][1].type!=="lineEnding"&&(s=i):(i===l||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),l-=i-s-2,i=s+2),s=void 0);return t}function jv(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Av(t,l,r){let i=0,s,o;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),i++,d):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(o=t.enter("codeTextSequence"),s=0,x(y)):ge(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||ge(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),p)}function x(y){return y===96?(t.consume(y),s++,x):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",p(y))}}class zv{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(l,i):l>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(l,r,i){const s=r||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&fi(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),fi(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),fi(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const r=this.left.splice(l,Number.POSITIVE_INFINITY);fi(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);fi(this.left,r.reverse())}}}function fi(t,l){let r=0;if(l.length<1e4)t.push(...l);else for(;r<l.length;)t.push(...l.slice(r,r+1e4)),r+=1e4}function h3(t){const l={};let r=-1,i,s,o,c,d,m,p;const x=new zv(t);for(;++r<x.length;){for(;r in l;)r=l[r];if(i=x.get(r),r&&i[1].type==="chunkFlow"&&x.get(r-1)[1].type==="listItemPrefix"&&(m=i[1]._tokenizer.events,o=0,o<m.length&&m[o][1].type==="lineEndingBlank"&&(o+=2),o<m.length&&m[o][1].type==="content"))for(;++o<m.length&&m[o][1].type!=="content";)m[o][1].type==="chunkText"&&(m[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(l,Tv(x,r)),r=l[r],p=!0);else if(i[1]._container){for(o=r,s=void 0;o--;)if(c=x.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(i[1].end={...x.get(s)[1].start},d=x.slice(s,r),d.unshift(i),x.splice(s,r-s+1,d))}}return tn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!p}function Tv(t,l){const r=t.get(l)[1],i=t.get(l)[2];let s=l-1;const o=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],p={};let x,y,v=-1,S=r,C=0,T=0;const z=[T];for(;S;){for(;t.get(++s)[1]!==S;);o.push(s),S._tokenizer||(x=i.sliceStream(S),S.next||x.push(null),y&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(x),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=S,S=S.next}for(S=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(T=v+1,z.push(T),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):z.pop(),v=z.length;v--;){const M=d.slice(z[v],z[v+1]),U=o.pop();m.push([U,U+M.length-1]),t.splice(U,2,M)}for(m.reverse(),v=-1;++v<m.length;)p[C+m[v][0]]=C+m[v][1],C+=m[v][1]-m[v][0]-1;return p}const _v={resolve:Dv,tokenize:Ov},Rv={partial:!0,tokenize:Lv};function Dv(t){return h3(t),t}function Ov(t,l){let r;return i;function i(d){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):ge(d)?t.check(Rv,c,o)(d):(t.consume(d),s)}function o(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function Lv(t,l,r){const i=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Oe(t,o,"linePrefix")}function o(c){if(c===null||ge(c))return r(c);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(i.parser.constructs.flow,r,l)(c)}}function m3(t,l,r,i,s,o,c,d,m){const p=m||Number.POSITIVE_INFINITY;let x=0;return y;function y(M){return M===60?(t.enter(i),t.enter(s),t.enter(o),t.consume(M),t.exit(o),v):M===null||M===32||M===41||os(M)?r(M):(t.enter(i),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),T(M))}function v(M){return M===62?(t.enter(o),t.consume(M),t.exit(o),t.exit(s),t.exit(i),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===62?(t.exit("chunkString"),t.exit(d),v(M)):M===null||M===60||ge(M)?r(M):(t.consume(M),M===92?C:S)}function C(M){return M===60||M===62||M===92?(t.consume(M),S):S(M)}function T(M){return!x&&(M===null||M===41||Xe(M))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(i),l(M)):x<p&&M===40?(t.consume(M),x++,T):M===41?(t.consume(M),x--,T):M===null||M===32||M===40||os(M)?r(M):(t.consume(M),M===92?z:T)}function z(M){return M===40||M===41||M===92?(t.consume(M),T):T(M)}}function p3(t,l,r,i,s,o){const c=this;let d=0,m;return p;function p(S){return t.enter(i),t.enter(s),t.consume(S),t.exit(s),t.enter(o),x}function x(S){return d>999||S===null||S===91||S===93&&!m||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(S):S===93?(t.exit(o),t.enter(s),t.consume(S),t.exit(s),t.exit(i),l):ge(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===null||S===91||S===93||ge(S)||d++>999?(t.exit("chunkString"),x(S)):(t.consume(S),m||(m=!Te(S)),S===92?v:y)}function v(S){return S===91||S===92||S===93?(t.consume(S),d++,y):y(S)}}function g3(t,l,r,i,s,o){let c;return d;function d(v){return v===34||v===39||v===40?(t.enter(i),t.enter(s),t.consume(v),t.exit(s),c=v===40?41:v,m):r(v)}function m(v){return v===c?(t.enter(s),t.consume(v),t.exit(s),t.exit(i),l):(t.enter(o),p(v))}function p(v){return v===c?(t.exit(o),m(c)):v===null?r(v):ge(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Oe(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===c||v===null||ge(v)?(t.exit("chunkString"),p(v)):(t.consume(v),v===92?y:x)}function y(v){return v===c||v===92?(t.consume(v),x):x(v)}}function gi(t,l){let r;return i;function i(s){return ge(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,i):Te(s)?Oe(t,i,r?"linePrefix":"lineSuffix")(s):l(s)}}const Uv={name:"definition",tokenize:Bv},Hv={partial:!0,tokenize:Zv};function Bv(t,l,r){const i=this;let s;return o;function o(S){return t.enter("definition"),c(S)}function c(S){return p3.call(i,t,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return s=kn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),m):r(S)}function m(S){return Xe(S)?gi(t,p)(S):p(S)}function p(S){return m3(t,x,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function x(S){return t.attempt(Hv,y,y)(S)}function y(S){return Te(S)?Oe(t,v,"whitespace")(S):v(S)}function v(S){return S===null||ge(S)?(t.exit("definition"),i.parser.defined.push(s),l(S)):r(S)}}function Zv(t,l,r){return i;function i(d){return Xe(d)?gi(t,s)(d):r(d)}function s(d){return g3(t,o,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Te(d)?Oe(t,c,"whitespace")(d):c(d)}function c(d){return d===null||ge(d)?l(d):r(d)}}const qv={name:"hardBreakEscape",tokenize:$v};function $v(t,l,r){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return ge(o)?(t.exit("hardBreakEscape"),l(o)):r(o)}}const Vv={name:"headingAtx",resolve:Iv,tokenize:Jv};function Iv(t,l){let r=t.length-2,i=3,s,o;return t[i][1].type==="whitespace"&&(i+=2),r-2>i&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&t[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[r][1].end},o={type:"chunkText",start:t[i][1].start,end:t[r][1].end,contentType:"text"},tn(t,i,r-i+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function Jv(t,l,r){let i=0;return s;function s(x){return t.enter("atxHeading"),o(x)}function o(x){return t.enter("atxHeadingSequence"),c(x)}function c(x){return x===35&&i++<6?(t.consume(x),c):x===null||Xe(x)?(t.exit("atxHeadingSequence"),d(x)):r(x)}function d(x){return x===35?(t.enter("atxHeadingSequence"),m(x)):x===null||ge(x)?(t.exit("atxHeading"),l(x)):Te(x)?Oe(t,d,"whitespace")(x):(t.enter("atxHeadingText"),p(x))}function m(x){return x===35?(t.consume(x),m):(t.exit("atxHeadingSequence"),d(x))}function p(x){return x===null||x===35||Xe(x)?(t.exit("atxHeadingText"),d(x)):(t.consume(x),p)}}const Fv=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],km=["pre","script","style","textarea"],Yv={concrete:!0,name:"htmlFlow",resolveTo:Qv,tokenize:Kv},Gv={partial:!0,tokenize:Wv},Xv={partial:!0,tokenize:Pv};function Qv(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Kv(t,l,r){const i=this;let s,o,c,d,m;return p;function p(k){return x(k)}function x(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),y}function y(k){return k===33?(t.consume(k),v):k===47?(t.consume(k),o=!0,T):k===63?(t.consume(k),s=3,i.interrupt?l:j):Rt(k)?(t.consume(k),c=String.fromCharCode(k),z):r(k)}function v(k){return k===45?(t.consume(k),s=2,S):k===91?(t.consume(k),s=5,d=0,C):Rt(k)?(t.consume(k),s=4,i.interrupt?l:j):r(k)}function S(k){return k===45?(t.consume(k),i.interrupt?l:j):r(k)}function C(k){const Q="CDATA[";return k===Q.charCodeAt(d++)?(t.consume(k),d===Q.length?i.interrupt?l:te:C):r(k)}function T(k){return Rt(k)?(t.consume(k),c=String.fromCharCode(k),z):r(k)}function z(k){if(k===null||k===47||k===62||Xe(k)){const Q=k===47,re=c.toLowerCase();return!Q&&!o&&km.includes(re)?(s=1,i.interrupt?l(k):te(k)):Fv.includes(c.toLowerCase())?(s=6,Q?(t.consume(k),M):i.interrupt?l(k):te(k)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(k):o?U(k):N(k))}return k===45||jt(k)?(t.consume(k),c+=String.fromCharCode(k),z):r(k)}function M(k){return k===62?(t.consume(k),i.interrupt?l:te):r(k)}function U(k){return Te(k)?(t.consume(k),U):O(k)}function N(k){return k===47?(t.consume(k),O):k===58||k===95||Rt(k)?(t.consume(k),V):Te(k)?(t.consume(k),N):O(k)}function V(k){return k===45||k===46||k===58||k===95||jt(k)?(t.consume(k),V):F(k)}function F(k){return k===61?(t.consume(k),_):Te(k)?(t.consume(k),F):N(k)}function _(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(t.consume(k),m=k,I):Te(k)?(t.consume(k),_):se(k)}function I(k){return k===m?(t.consume(k),m=null,oe):k===null||ge(k)?r(k):(t.consume(k),I)}function se(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||Xe(k)?F(k):(t.consume(k),se)}function oe(k){return k===47||k===62||Te(k)?N(k):r(k)}function O(k){return k===62?(t.consume(k),ae):r(k)}function ae(k){return k===null||ge(k)?te(k):Te(k)?(t.consume(k),ae):r(k)}function te(k){return k===45&&s===2?(t.consume(k),H):k===60&&s===1?(t.consume(k),W):k===62&&s===4?(t.consume(k),R):k===63&&s===3?(t.consume(k),j):k===93&&s===5?(t.consume(k),Se):ge(k)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Gv,J,be)(k)):k===null||ge(k)?(t.exit("htmlFlowData"),be(k)):(t.consume(k),te)}function be(k){return t.check(Xv,ue,J)(k)}function ue(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),P}function P(k){return k===null||ge(k)?be(k):(t.enter("htmlFlowData"),te(k))}function H(k){return k===45?(t.consume(k),j):te(k)}function W(k){return k===47?(t.consume(k),c="",ce):te(k)}function ce(k){if(k===62){const Q=c.toLowerCase();return km.includes(Q)?(t.consume(k),R):te(k)}return Rt(k)&&c.length<8?(t.consume(k),c+=String.fromCharCode(k),ce):te(k)}function Se(k){return k===93?(t.consume(k),j):te(k)}function j(k){return k===62?(t.consume(k),R):k===45&&s===2?(t.consume(k),j):te(k)}function R(k){return k===null||ge(k)?(t.exit("htmlFlowData"),J(k)):(t.consume(k),R)}function J(k){return t.exit("htmlFlow"),l(k)}}function Pv(t,l,r){const i=this;return s;function s(c){return ge(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):r(c)}function o(c){return i.parser.lazy[i.now().line]?r(c):l(c)}}function Wv(t,l,r){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Ai,l,r)}}const e9={name:"htmlText",tokenize:t9};function t9(t,l,r){const i=this;let s,o,c;return d;function d(j){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(j),m}function m(j){return j===33?(t.consume(j),p):j===47?(t.consume(j),F):j===63?(t.consume(j),N):Rt(j)?(t.consume(j),se):r(j)}function p(j){return j===45?(t.consume(j),x):j===91?(t.consume(j),o=0,C):Rt(j)?(t.consume(j),U):r(j)}function x(j){return j===45?(t.consume(j),S):r(j)}function y(j){return j===null?r(j):j===45?(t.consume(j),v):ge(j)?(c=y,W(j)):(t.consume(j),y)}function v(j){return j===45?(t.consume(j),S):y(j)}function S(j){return j===62?H(j):j===45?v(j):y(j)}function C(j){const R="CDATA[";return j===R.charCodeAt(o++)?(t.consume(j),o===R.length?T:C):r(j)}function T(j){return j===null?r(j):j===93?(t.consume(j),z):ge(j)?(c=T,W(j)):(t.consume(j),T)}function z(j){return j===93?(t.consume(j),M):T(j)}function M(j){return j===62?H(j):j===93?(t.consume(j),M):T(j)}function U(j){return j===null||j===62?H(j):ge(j)?(c=U,W(j)):(t.consume(j),U)}function N(j){return j===null?r(j):j===63?(t.consume(j),V):ge(j)?(c=N,W(j)):(t.consume(j),N)}function V(j){return j===62?H(j):N(j)}function F(j){return Rt(j)?(t.consume(j),_):r(j)}function _(j){return j===45||jt(j)?(t.consume(j),_):I(j)}function I(j){return ge(j)?(c=I,W(j)):Te(j)?(t.consume(j),I):H(j)}function se(j){return j===45||jt(j)?(t.consume(j),se):j===47||j===62||Xe(j)?oe(j):r(j)}function oe(j){return j===47?(t.consume(j),H):j===58||j===95||Rt(j)?(t.consume(j),O):ge(j)?(c=oe,W(j)):Te(j)?(t.consume(j),oe):H(j)}function O(j){return j===45||j===46||j===58||j===95||jt(j)?(t.consume(j),O):ae(j)}function ae(j){return j===61?(t.consume(j),te):ge(j)?(c=ae,W(j)):Te(j)?(t.consume(j),ae):oe(j)}function te(j){return j===null||j===60||j===61||j===62||j===96?r(j):j===34||j===39?(t.consume(j),s=j,be):ge(j)?(c=te,W(j)):Te(j)?(t.consume(j),te):(t.consume(j),ue)}function be(j){return j===s?(t.consume(j),s=void 0,P):j===null?r(j):ge(j)?(c=be,W(j)):(t.consume(j),be)}function ue(j){return j===null||j===34||j===39||j===60||j===61||j===96?r(j):j===47||j===62||Xe(j)?oe(j):(t.consume(j),ue)}function P(j){return j===47||j===62||Xe(j)?oe(j):r(j)}function H(j){return j===62?(t.consume(j),t.exit("htmlTextData"),t.exit("htmlText"),l):r(j)}function W(j){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),ce}function ce(j){return Te(j)?Oe(t,Se,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):Se(j)}function Se(j){return t.enter("htmlTextData"),c(j)}}const h1={name:"labelEnd",resolveAll:a9,resolveTo:i9,tokenize:u9},n9={tokenize:s9},l9={tokenize:o9},r9={tokenize:c9};function a9(t){let l=-1;const r=[];for(;++l<t.length;){const i=t[l][1];if(r.push(t[l]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",l+=s}}return t.length!==r.length&&tn(t,0,t.length,r),t}function i9(t,l){let r=t.length,i=0,s,o,c,d;for(;r--;)if(s=t[r][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=r,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(c=r);const m={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[o][1].start},end:{...t[c][1].end}},x={type:"labelText",start:{...t[o+i+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",m,l],["enter",p,l]],d=mn(d,t.slice(o+1,o+i+3)),d=mn(d,[["enter",x,l]]),d=mn(d,Ss(l.parser.constructs.insideSpan.null,t.slice(o+i+4,c-3),l)),d=mn(d,[["exit",x,l],t[c-2],t[c-1],["exit",p,l]]),d=mn(d,t.slice(c+1)),d=mn(d,[["exit",m,l]]),tn(t,o,t.length,d),t}function u9(t,l,r){const i=this;let s=i.events.length,o,c;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return d;function d(v){return o?o._inactive?y(v):(c=i.parser.defined.includes(kn(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),m):r(v)}function m(v){return v===40?t.attempt(n9,x,c?x:y)(v):v===91?t.attempt(l9,x,c?p:y)(v):c?x(v):y(v)}function p(v){return t.attempt(r9,x,y)(v)}function x(v){return l(v)}function y(v){return o._balanced=!0,r(v)}}function s9(t,l,r){return i;function i(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Xe(y)?gi(t,o)(y):o(y)}function o(y){return y===41?x(y):m3(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Xe(y)?gi(t,m)(y):x(y)}function d(y){return r(y)}function m(y){return y===34||y===39||y===40?g3(t,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function p(y){return Xe(y)?gi(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):r(y)}}function o9(t,l,r){const i=this;return s;function s(d){return p3.call(i,t,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return i.parser.defined.includes(kn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?l(d):r(d)}function c(d){return r(d)}}function c9(t,l,r){return i;function i(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):r(o)}}const f9={name:"labelStartImage",resolveAll:h1.resolveAll,tokenize:d9};function d9(t,l,r){const i=this;return s;function s(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),o}function o(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):r(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):l(d)}}const h9={name:"labelStartLink",resolveAll:h1.resolveAll,tokenize:m9};function m9(t,l,r){const i=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):l(c)}}const lf={name:"lineEnding",tokenize:p9};function p9(t,l){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),Oe(t,l,"linePrefix")}}const ns={name:"thematicBreak",tokenize:g9};function g9(t,l,r){let i=0,s;return o;function o(p){return t.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(t.enter("thematicBreakSequence"),m(p)):i>=3&&(p===null||ge(p))?(t.exit("thematicBreak"),l(p)):r(p)}function m(p){return p===s?(t.consume(p),i++,m):(t.exit("thematicBreakSequence"),Te(p)?Oe(t,d,"whitespace")(p):d(p))}}const $t={continuation:{tokenize:v9},exit:w9,name:"list",tokenize:b9},y9={partial:!0,tokenize:k9},x9={partial:!0,tokenize:S9};function b9(t,l,r){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(S){const C=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:Tf(S)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(ns,r,p)(S):p(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(S)}return r(S)}function m(S){return Tf(S)&&++c<10?(t.consume(S),m):(!i.interrupt||c<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),p(S)):r(S)}function p(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(Ai,i.interrupt?r:x,t.attempt(y9,v,y))}function x(S){return i.containerState.initialBlankLine=!0,o++,v(S)}function y(S){return Te(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),v):r(S)}function v(S){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function v9(t,l,r){const i=this;return i.containerState._closeFlow=void 0,t.check(Ai,s,o);function s(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Oe(t,l,"listItemIndent",i.containerState.size+1)(d)}function o(d){return i.containerState.furtherBlankLines||!Te(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(x9,l,c)(d))}function c(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Oe(t,t.attempt($t,l,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function S9(t,l,r){const i=this;return Oe(t,s,"listItemIndent",i.containerState.size+1);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?l(o):r(o)}}function w9(t){t.exit(this.containerState.type)}function k9(t,l,r){const i=this;return Oe(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=i.events[i.events.length-1];return!Te(o)&&c&&c[1].type==="listItemPrefixWhitespace"?l(o):r(o)}}const Cm={name:"setextUnderline",resolveTo:C9,tokenize:E9};function C9(t,l){let r=t.length,i,s,o;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){i=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!o&&t[r][1].type==="definition"&&(o=r);const c={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",c,l]),t.splice(o+1,0,["exit",t[i][1],l]),t[i][1].end={...t[o][1].end}):t[i][1]=c,t.push(["exit",c,l]),t}function E9(t,l,r){const i=this;let s;return o;function o(p){let x=i.events.length,y;for(;x--;)if(i.events[x][1].type!=="lineEnding"&&i.events[x][1].type!=="linePrefix"&&i.events[x][1].type!=="content"){y=i.events[x][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(t.enter("setextHeadingLine"),s=p,c(p)):r(p)}function c(p){return t.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(t.consume(p),d):(t.exit("setextHeadingLineSequence"),Te(p)?Oe(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||ge(p)?(t.exit("setextHeadingLine"),l(p)):r(p)}}const M9={tokenize:N9};function N9(t){const l=this,r=t.attempt(Ai,i,t.attempt(this.parser.constructs.flowInitial,s,Oe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(_v,s)),"linePrefix")));return r;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,r}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,r}}const j9={resolveAll:x3()},A9=y3("string"),z9=y3("text");function y3(t){return{resolveAll:x3(t==="text"?T9:void 0),tokenize:l};function l(r){const i=this,s=this.parser.constructs[t],o=r.attempt(s,c,d);return c;function c(x){return p(x)?o(x):d(x)}function d(x){if(x===null){r.consume(x);return}return r.enter("data"),r.consume(x),m}function m(x){return p(x)?(r.exit("data"),o(x)):(r.consume(x),m)}function p(x){if(x===null)return!0;const y=s[x];let v=-1;if(y)for(;++v<y.length;){const S=y[v];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function x3(t){return l;function l(r,i){let s=-1,o;for(;++s<=r.length;)o===void 0?r[s]&&r[s][1].type==="data"&&(o=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==o+2&&(r[o][1].end=r[s-1][1].end,r.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(r,i):r}}function T9(t,l){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const i=t[r-1][1],s=l.sliceStream(i);let o=s.length,c=-1,d=0,m;for(;o--;){const p=s[o];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)m=!0,d++;else if(p!==-1){o++;break}}if(l._contentTypeTextTrailing&&r===t.length&&(d=0),d){const p={type:r===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:i.start._bufferIndex+c,_index:i.start._index+o,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(t.splice(r,0,["enter",p,l],["exit",p,l]),r+=2)}r++}return t}const _9={42:$t,43:$t,45:$t,48:$t,49:$t,50:$t,51:$t,52:$t,53:$t,54:$t,55:$t,56:$t,57:$t,62:c3},R9={91:Uv},D9={[-2]:nf,[-1]:nf,32:nf},O9={35:Vv,42:ns,45:[Cm,ns],60:Yv,61:Cm,95:ns,96:wm,126:wm},L9={38:d3,92:f3},U9={[-5]:lf,[-4]:lf,[-3]:lf,33:f9,38:d3,42:_f,60:[hv,e9],91:h9,92:[qv,f3],93:h1,95:_f,96:Mv},H9={null:[_f,j9]},B9={null:[42,95]},Z9={null:[]},q9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:B9,contentInitial:R9,disable:Z9,document:_9,flow:O9,flowInitial:D9,insideSpan:H9,string:L9,text:U9},Symbol.toStringTag,{value:"Module"}));function $9(t,l,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},o=[];let c=[],d=[];const m={attempt:I(F),check:I(_),consume:U,enter:N,exit:V,interrupt:I(_,{interrupt:!0})},p={code:null,containerState:{},defineSkip:T,events:[],now:C,parser:t,previous:null,sliceSerialize:v,sliceStream:S,write:y};let x=l.tokenize.call(p,m);return l.resolveAll&&o.push(l),p;function y(ae){return c=mn(c,ae),z(),c[c.length-1]!==null?[]:(se(l,0),p.events=Ss(o,p.events,p),p.events)}function v(ae,te){return I9(S(ae),te)}function S(ae){return V9(c,ae)}function C(){const{_bufferIndex:ae,_index:te,line:be,column:ue,offset:P}=i;return{_bufferIndex:ae,_index:te,line:be,column:ue,offset:P}}function T(ae){s[ae.line]=ae.column,O()}function z(){let ae;for(;i._index<c.length;){const te=c[i._index];if(typeof te=="string")for(ae=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ae&&i._bufferIndex<te.length;)M(te.charCodeAt(i._bufferIndex));else M(te)}}function M(ae){x=x(ae)}function U(ae){ge(ae)?(i.line++,i.column=1,i.offset+=ae===-3?2:1,O()):ae!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=ae}function N(ae,te){const be=te||{};return be.type=ae,be.start=C(),p.events.push(["enter",be,p]),d.push(be),be}function V(ae){const te=d.pop();return te.end=C(),p.events.push(["exit",te,p]),te}function F(ae,te){se(ae,te.from)}function _(ae,te){te.restore()}function I(ae,te){return be;function be(ue,P,H){let W,ce,Se,j;return Array.isArray(ue)?J(ue):"tokenize"in ue?J([ue]):R(ue);function R(ee){return ne;function ne(fe){const me=fe!==null&&ee[fe],Le=fe!==null&&ee.null,st=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(Le)?Le:Le?[Le]:[]];return J(st)(fe)}}function J(ee){return W=ee,ce=0,ee.length===0?H:k(ee[ce])}function k(ee){return ne;function ne(fe){return j=oe(),Se=ee,ee.partial||(p.currentConstruct=ee),ee.name&&p.parser.constructs.disable.null.includes(ee.name)?re():ee.tokenize.call(te?Object.assign(Object.create(p),te):p,m,Q,re)(fe)}}function Q(ee){return ae(Se,j),P}function re(ee){return j.restore(),++ce<W.length?k(W[ce]):H}}}function se(ae,te){ae.resolveAll&&!o.includes(ae)&&o.push(ae),ae.resolve&&tn(p.events,te,p.events.length-te,ae.resolve(p.events.slice(te),p)),ae.resolveTo&&(p.events=ae.resolveTo(p.events,p))}function oe(){const ae=C(),te=p.previous,be=p.currentConstruct,ue=p.events.length,P=Array.from(d);return{from:ue,restore:H};function H(){i=ae,p.previous=te,p.currentConstruct=be,p.events.length=ue,d=P,O()}}function O(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function V9(t,l){const r=l.start._index,i=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let c;if(r===s)c=[t[r].slice(i,o)];else{if(c=t.slice(r,s),i>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(i):c.shift()}o>0&&c.push(t[s].slice(0,o))}return c}function I9(t,l){let r=-1;const i=[];let s;for(;++r<t.length;){const o=t[r];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
|
|
338
338
|
`;break}case-3:{c=`\r
|
|
339
|
-
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,i.push(c)}return i.join("")}function GS(t){const i={constructs:T3([IS,...(t||{}).extensions||[]]),content:s(o9),defined:[],document:s(f9),flow:s(AS),lazy:{},string:s(_S),text:s(RS)};return i;function s(o){return c;function c(d){return JS(i,o,d)}}}function XS(t){for(;!L3(t););return t}const Om=/[\0\t\n\r]/g;function QS(){let t=1,l="",r=!0,i;return s;function s(o,c,d){const m=[];let p,x,y,v,S;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,l="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if(Om.lastIndex=y,p=Om.exec(o),v=p&&p.index!==void 0?p.index:o.length,S=o.charCodeAt(v),!p){l=o.slice(y);break}if(S===10&&y===v&&i)m.push(-3),i=void 0;else switch(i&&(m.push(-5),i=void 0),y<v&&(m.push(o.slice(y,v)),t+=v-y),S){case 0:{m.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,m.push(-2);t++<x;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:i=!0,t=1}y=v+1}return d&&(i&&m.push(-5),l&&m.push(l),m.push(null)),m}}const KS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function PS(t){return t.replace(KS,WS)}function WS(t,l,r){if(l)return l;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),o=s===120||s===88;return _3(r.slice(o?2:1),o?16:10)}return g1(r)||t}const $3={}.hasOwnProperty;function ew(t,l,r){return typeof l!="string"&&(r=l,l=void 0),tw(r)(XS(GS(r).document().write(QS()(t,l,!0))))}function tw(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Rn),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:o(nn),blockQuote:o(Le),characterEscape:oe,characterReference:oe,codeFenced:o(st),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(st,c),codeText:o(Mt,c),codeTextData:oe,data:oe,codeFlowValue:oe,definition:o(Fe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(at),hardBreakEscape:o(gn),hardBreakTrailing:o(gn),htmlFlow:o(al,c),htmlFlowData:oe,htmlText:o(al,c),htmlTextData:oe,image:o(mt),label:c,link:o(Rn),listItem:o(yn),listItemValue:v,listOrdered:o(il,y),listUnordered:o(il),paragraph:o(cr),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(nn),strong:o(ma),thematicBreak:o(As)},exit:{atxHeading:m(),atxHeadingSequence:F,autolink:m(),autolinkEmail:me,autolinkProtocol:fe,blockQuote:m(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ee,characterReference:ne,codeFenced:m(z),codeFencedFence:T,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:m(M),codeText:m(P),codeTextData:O,data:O,definition:m(),definitionDestinationString:V,definitionLabelString:U,definitionTitleString:N,emphasis:m(),hardBreakEscape:m(te),hardBreakTrailing:m(te),htmlFlow:m(be),htmlFlowData:O,htmlText:m(ue),htmlTextData:O,image:m(W),label:Se,labelText:ce,lineEnding:ae,link:m(H),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:Q,resourceDestinationString:j,resourceTitleString:R,resource:J,setextHeading:m(se),setextHeadingLineSequence:I,setextHeadingText:_,strong:m(),thematicBreak:m()}};V3(l,(t||{}).mdastExtensions||[]);const r={};return i;function i(G){let ie={type:"root",children:[]};const xe={stack:[ie],tokenStack:[],config:l,enter:d,exit:p,buffer:c,resume:x,data:r},je=[];let Ze=-1;for(;++Ze<G.length;)if(G[Ze][1].type==="listOrdered"||G[Ze][1].type==="listUnordered")if(G[Ze][0]==="enter")je.push(Ze);else{const Jt=je.pop();Ze=s(G,Jt,Ze)}for(Ze=-1;++Ze<G.length;){const Jt=l[G[Ze][0]];$3.call(Jt,G[Ze][1].type)&&Jt[G[Ze][1].type].call(Object.assign({sliceSerialize:G[Ze][2].sliceSerialize},xe),G[Ze][1])}if(xe.tokenStack.length>0){const Jt=xe.tokenStack[xe.tokenStack.length-1];(Jt[1]||Lm).call(xe,void 0,Jt[0])}for(ie.position={start:Rl(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Rl(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<l.transforms.length;)ie=l.transforms[Ze](ie)||ie;return ie}function s(G,ie,xe){let je=ie-1,Ze=-1,Jt=!1,Dn,Tt,pt,Dt;for(;++je<=xe;){const Ye=G[je];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Ze++:Ze--,Dt=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(Dn&&!Dt&&!Ze&&!pt&&(pt=je),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ze&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Ze===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(Dn){let ul=je;for(Tt=void 0;ul--;){const xn=G[ul];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;Tt&&(G[Tt][1].type="lineEndingBlank",Jt=!0),xn[1].type="lineEnding",Tt=ul}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}pt&&(!Tt||pt<Tt)&&(Dn._spread=!0),Dn.end=Object.assign({},Tt?G[Tt][1].start:Ye[1].end),G.splice(Tt||je,0,["exit",Dn,Ye[2]]),je++,xe++}if(Ye[1].type==="listItemPrefix"){const ul={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};Dn=ul,G.splice(je,0,["enter",ul,Ye[2]]),je++,xe++,pt=void 0,Dt=!0}}}return G[ie][1]._spread=Jt,xe}function o(G,ie){return xe;function xe(je){d.call(this,G(je),je),ie&&ie.call(this,je)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(G,ie,xe){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ie,xe||void 0]),G.position={start:Rl(ie.start),end:void 0}}function m(G){return ie;function ie(xe){G&&G.call(this,xe),p.call(this,xe)}}function p(G,ie){const xe=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==G.type&&(ie?ie.call(this,G,je[0]):(je[1]||Lm).call(this,G,je[0]));else throw new Error("Cannot close `"+G.type+"` ("+pi({start:G.start,end:G.end})+"): it’s not open");xe.position.end=Rl(G.end)}function x(){return p1(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(G){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function S(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=G}function C(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=G}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function M(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/(\r?\n|\r)$/g,"")}function U(G){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Cn(this.sliceSerialize(G)).toLowerCase()}function N(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function V(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function F(G){const ie=this.stack[this.stack.length-1];if(!ie.depth){const xe=this.sliceSerialize(G).length;ie.depth=xe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function I(G){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(G){const xe=this.stack[this.stack.length-1].children;let je=xe[xe.length-1];(!je||je.type!=="text")&&(je=zt(),je.position={start:Rl(G.start),end:void 0},xe.push(je)),this.stack.push(je)}function O(G){const ie=this.stack.pop();ie.value+=this.sliceSerialize(G),ie.position.end=Rl(G.end)}function ae(G){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ie.children[ie.children.length-1];xe.position.end=Rl(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(oe.call(this,G),O.call(this,G))}function te(){this.data.atHardBreak=!0}function be(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function ue(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function P(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function H(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function W(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ce(G){const ie=this.sliceSerialize(G),xe=this.stack[this.stack.length-2];xe.label=PS(ie),xe.identifier=Cn(ie).toLowerCase()}function Se(){const G=this.stack[this.stack.length-1],ie=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const je=G.children;xe.children=je}else xe.alt=ie}function j(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function R(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function J(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Q(G){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=Cn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function re(G){this.data.characterReferenceType=G.type}function ee(G){const ie=this.sliceSerialize(G),xe=this.data.characterReferenceType;let je;xe?(je=_3(ie,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=g1(ie);const Ze=this.stack[this.stack.length-1];Ze.value+=je}function ne(G){const ie=this.stack.pop();ie.position.end=Rl(G.end)}function fe(G){O.call(this,G);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(G)}function me(G){O.call(this,G);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(G)}function Le(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Mt(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function at(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function gn(){return{type:"break"}}function al(){return{type:"html",value:""}}function mt(){return{type:"image",title:null,url:"",alt:null}}function Rn(){return{type:"link",title:null,url:"",children:[]}}function il(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function yn(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function cr(){return{type:"paragraph",children:[]}}function ma(){return{type:"strong",children:[]}}function zt(){return{type:"text",value:""}}function As(){return{type:"thematicBreak"}}}function Rl(t){return{line:t.line,column:t.column,offset:t.offset}}function V3(t,l){let r=-1;for(;++r<l.length;){const i=l[r];Array.isArray(i)?V3(t,i):nw(t,i)}}function nw(t,l){let r;for(r in l)if($3.call(l,r))switch(r){case"canContainEols":{const i=l[r];i&&t[r].push(...i);break}case"transforms":{const i=l[r];i&&t[r].push(...i);break}case"enter":case"exit":{const i=l[r];i&&Object.assign(t[r],i);break}}}function Lm(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+pi({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+pi({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+pi({start:l.start,end:l.end})+") is still open")}function lw(t){const l=this;l.parser=r;function r(i){return ew(i,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function rw(t,l){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,r),t.applyData(l,r)}function aw(t,l){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,r),[t.applyData(l,r),{type:"text",value:`
|
|
340
|
-
`}]}function
|
|
341
|
-
`:"",i={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return l.meta&&(o.data={meta:l.meta}),t.patch(l,o),o=t.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(l,o),o}function
|
|
339
|
+
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,i.push(c)}return i.join("")}function J9(t){const i={constructs:s3([q9,...(t||{}).extensions||[]]),content:s(iv),defined:[],document:s(sv),flow:s(M9),lazy:{},string:s(A9),text:s(z9)};return i;function s(o){return c;function c(d){return $9(i,o,d)}}}function F9(t){for(;!h3(t););return t}const Em=/[\0\t\n\r]/g;function Y9(){let t=1,l="",r=!0,i;return s;function s(o,c,d){const m=[];let p,x,y,v,S;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),y=0,l="",r&&(o.charCodeAt(0)===65279&&y++,r=void 0);y<o.length;){if(Em.lastIndex=y,p=Em.exec(o),v=p&&p.index!==void 0?p.index:o.length,S=o.charCodeAt(v),!p){l=o.slice(y);break}if(S===10&&y===v&&i)m.push(-3),i=void 0;else switch(i&&(m.push(-5),i=void 0),y<v&&(m.push(o.slice(y,v)),t+=v-y),S){case 0:{m.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,m.push(-2);t++<x;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:i=!0,t=1}y=v+1}return d&&(i&&m.push(-5),l&&m.push(l),m.push(null)),m}}const G9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function X9(t){return t.replace(G9,Q9)}function Q9(t,l,r){if(l)return l;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),o=s===120||s===88;return o3(r.slice(o?2:1),o?16:10)}return d1(r)||t}const b3={}.hasOwnProperty;function K9(t,l,r){return typeof l!="string"&&(r=l,l=void 0),P9(r)(F9(J9(r).document().write(Y9()(t,l,!0))))}function P9(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Rn),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:o(nn),blockQuote:o(Le),characterEscape:oe,characterReference:oe,codeFenced:o(st),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(st,c),codeText:o(Mt,c),codeTextData:oe,data:oe,codeFlowValue:oe,definition:o(Fe),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(at),hardBreakEscape:o(gn),hardBreakTrailing:o(gn),htmlFlow:o(al,c),htmlFlowData:oe,htmlText:o(al,c),htmlTextData:oe,image:o(mt),label:c,link:o(Rn),listItem:o(yn),listItemValue:v,listOrdered:o(il,y),listUnordered:o(il),paragraph:o(cr),reference:k,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(nn),strong:o(ma),thematicBreak:o(As)},exit:{atxHeading:m(),atxHeadingSequence:F,autolink:m(),autolinkEmail:me,autolinkProtocol:fe,blockQuote:m(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ee,characterReference:ne,codeFenced:m(z),codeFencedFence:T,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:m(M),codeText:m(P),codeTextData:O,data:O,definition:m(),definitionDestinationString:V,definitionLabelString:U,definitionTitleString:N,emphasis:m(),hardBreakEscape:m(te),hardBreakTrailing:m(te),htmlFlow:m(be),htmlFlowData:O,htmlText:m(ue),htmlTextData:O,image:m(W),label:Se,labelText:ce,lineEnding:ae,link:m(H),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:Q,resourceDestinationString:j,resourceTitleString:R,resource:J,setextHeading:m(se),setextHeadingLineSequence:I,setextHeadingText:_,strong:m(),thematicBreak:m()}};v3(l,(t||{}).mdastExtensions||[]);const r={};return i;function i(G){let ie={type:"root",children:[]};const xe={stack:[ie],tokenStack:[],config:l,enter:d,exit:p,buffer:c,resume:x,data:r},je=[];let Ze=-1;for(;++Ze<G.length;)if(G[Ze][1].type==="listOrdered"||G[Ze][1].type==="listUnordered")if(G[Ze][0]==="enter")je.push(Ze);else{const Jt=je.pop();Ze=s(G,Jt,Ze)}for(Ze=-1;++Ze<G.length;){const Jt=l[G[Ze][0]];b3.call(Jt,G[Ze][1].type)&&Jt[G[Ze][1].type].call(Object.assign({sliceSerialize:G[Ze][2].sliceSerialize},xe),G[Ze][1])}if(xe.tokenStack.length>0){const Jt=xe.tokenStack[xe.tokenStack.length-1];(Jt[1]||Mm).call(xe,void 0,Jt[0])}for(ie.position={start:Rl(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Rl(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Ze=-1;++Ze<l.transforms.length;)ie=l.transforms[Ze](ie)||ie;return ie}function s(G,ie,xe){let je=ie-1,Ze=-1,Jt=!1,Dn,Tt,pt,Dt;for(;++je<=xe;){const Ye=G[je];switch(Ye[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ye[0]==="enter"?Ze++:Ze--,Dt=void 0;break}case"lineEndingBlank":{Ye[0]==="enter"&&(Dn&&!Dt&&!Ze&&!pt&&(pt=je),Dt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dt=void 0}if(!Ze&&Ye[0]==="enter"&&Ye[1].type==="listItemPrefix"||Ze===-1&&Ye[0]==="exit"&&(Ye[1].type==="listUnordered"||Ye[1].type==="listOrdered")){if(Dn){let ul=je;for(Tt=void 0;ul--;){const xn=G[ul];if(xn[1].type==="lineEnding"||xn[1].type==="lineEndingBlank"){if(xn[0]==="exit")continue;Tt&&(G[Tt][1].type="lineEndingBlank",Jt=!0),xn[1].type="lineEnding",Tt=ul}else if(!(xn[1].type==="linePrefix"||xn[1].type==="blockQuotePrefix"||xn[1].type==="blockQuotePrefixWhitespace"||xn[1].type==="blockQuoteMarker"||xn[1].type==="listItemIndent"))break}pt&&(!Tt||pt<Tt)&&(Dn._spread=!0),Dn.end=Object.assign({},Tt?G[Tt][1].start:Ye[1].end),G.splice(Tt||je,0,["exit",Dn,Ye[2]]),je++,xe++}if(Ye[1].type==="listItemPrefix"){const ul={type:"listItem",_spread:!1,start:Object.assign({},Ye[1].start),end:void 0};Dn=ul,G.splice(je,0,["enter",ul,Ye[2]]),je++,xe++,pt=void 0,Dt=!0}}}return G[ie][1]._spread=Jt,xe}function o(G,ie){return xe;function xe(je){d.call(this,G(je),je),ie&&ie.call(this,je)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(G,ie,xe){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ie,xe||void 0]),G.position={start:Rl(ie.start),end:void 0}}function m(G){return ie;function ie(xe){G&&G.call(this,xe),p.call(this,xe)}}function p(G,ie){const xe=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==G.type&&(ie?ie.call(this,G,je[0]):(je[1]||Mm).call(this,G,je[0]));else throw new Error("Cannot close `"+G.type+"` ("+pi({start:G.start,end:G.end})+"): it’s not open");xe.position.end=Rl(G.end)}function x(){return f1(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(G){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function S(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=G}function C(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=G}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function M(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/(\r?\n|\r)$/g,"")}function U(G){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=kn(this.sliceSerialize(G)).toLowerCase()}function N(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function V(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function F(G){const ie=this.stack[this.stack.length-1];if(!ie.depth){const xe=this.sliceSerialize(G).length;ie.depth=xe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function I(G){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(G){const xe=this.stack[this.stack.length-1].children;let je=xe[xe.length-1];(!je||je.type!=="text")&&(je=zt(),je.position={start:Rl(G.start),end:void 0},xe.push(je)),this.stack.push(je)}function O(G){const ie=this.stack.pop();ie.value+=this.sliceSerialize(G),ie.position.end=Rl(G.end)}function ae(G){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=ie.children[ie.children.length-1];xe.position.end=Rl(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(oe.call(this,G),O.call(this,G))}function te(){this.data.atHardBreak=!0}function be(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function ue(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function P(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function H(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function W(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ce(G){const ie=this.sliceSerialize(G),xe=this.stack[this.stack.length-2];xe.label=X9(ie),xe.identifier=kn(ie).toLowerCase()}function Se(){const G=this.stack[this.stack.length-1],ie=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const je=G.children;xe.children=je}else xe.alt=ie}function j(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function R(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function J(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function Q(G){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.label=ie,xe.identifier=kn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function re(G){this.data.characterReferenceType=G.type}function ee(G){const ie=this.sliceSerialize(G),xe=this.data.characterReferenceType;let je;xe?(je=o3(ie,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=d1(ie);const Ze=this.stack[this.stack.length-1];Ze.value+=je}function ne(G){const ie=this.stack.pop();ie.position.end=Rl(G.end)}function fe(G){O.call(this,G);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(G)}function me(G){O.call(this,G);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(G)}function Le(){return{type:"blockquote",children:[]}}function st(){return{type:"code",lang:null,meta:null,value:""}}function Mt(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function at(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function gn(){return{type:"break"}}function al(){return{type:"html",value:""}}function mt(){return{type:"image",title:null,url:"",alt:null}}function Rn(){return{type:"link",title:null,url:"",children:[]}}function il(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function yn(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function cr(){return{type:"paragraph",children:[]}}function ma(){return{type:"strong",children:[]}}function zt(){return{type:"text",value:""}}function As(){return{type:"thematicBreak"}}}function Rl(t){return{line:t.line,column:t.column,offset:t.offset}}function v3(t,l){let r=-1;for(;++r<l.length;){const i=l[r];Array.isArray(i)?v3(t,i):W9(t,i)}}function W9(t,l){let r;for(r in l)if(b3.call(l,r))switch(r){case"canContainEols":{const i=l[r];i&&t[r].push(...i);break}case"transforms":{const i=l[r];i&&t[r].push(...i);break}case"enter":case"exit":{const i=l[r];i&&Object.assign(t[r],i);break}}}function Mm(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+pi({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+pi({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+pi({start:l.start,end:l.end})+") is still open")}function eS(t){const l=this;l.parser=r;function r(i){return K9(i,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function tS(t,l){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,r),t.applyData(l,r)}function nS(t,l){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,r),[t.applyData(l,r),{type:"text",value:`
|
|
340
|
+
`}]}function lS(t,l){const r=l.value?l.value+`
|
|
341
|
+
`:"",i={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return l.meta&&(o.data={meta:l.meta}),t.patch(l,o),o=t.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(l,o),o}function rS(t,l){const r={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function aS(t,l){const r={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function iS(t,l){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(l.identifier).toUpperCase(),s=ha(i.toLowerCase()),o=t.footnoteOrder.indexOf(i);let c,d=t.footnoteCounts.get(i);d===void 0?(d=0,t.footnoteOrder.push(i),c=t.footnoteOrder.length):c=o+1,d+=1,t.footnoteCounts.set(i,d);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(l,p),t.applyData(l,p)}function uS(t,l){const r={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function sS(t,l){if(t.options.allowDangerousHtml){const r={type:"raw",value:l.value};return t.patch(l,r),t.applyData(l,r)}}function S3(t,l){const r=l.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+i}];const s=t.all(l),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=i:s.push({type:"text",value:i}),s}function oS(t,l){const r=String(l.identifier).toUpperCase(),i=t.definitionById.get(r);if(!i)return S3(t,l);const s={src:ha(i.url||""),alt:l.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const o={type:"element",tagName:"img",properties:s,children:[]};return t.patch(l,o),t.applyData(l,o)}function cS(t,l){const r={src:ha(l.url)};l.alt!==null&&l.alt!==void 0&&(r.alt=l.alt),l.title!==null&&l.title!==void 0&&(r.title=l.title);const i={type:"element",tagName:"img",properties:r,children:[]};return t.patch(l,i),t.applyData(l,i)}function fS(t,l){const r={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(l,i),t.applyData(l,i)}function dS(t,l){const r=String(l.identifier).toUpperCase(),i=t.definitionById.get(r);if(!i)return S3(t,l);const s={href:ha(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const o={type:"element",tagName:"a",properties:s,children:t.all(l)};return t.patch(l,o),t.applyData(l,o)}function hS(t,l){const r={href:ha(l.url)};l.title!==null&&l.title!==void 0&&(r.title=l.title);const i={type:"element",tagName:"a",properties:r,children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function mS(t,l,r){const i=t.all(l),s=r?pS(r):w3(l),o={},c=[];if(typeof l.checked=="boolean"){const x=i[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},i.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const x=i[d];(s||d!==0||x.type!=="element"||x.tagName!=="p")&&c.push({type:"text",value:`
|
|
342
342
|
`}),x.type==="element"&&x.tagName==="p"&&!s?c.push(...x.children):c.push(x)}const m=i[i.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
343
|
-
`});const p={type:"element",tagName:"li",properties:o,children:c};return t.patch(l,p),t.applyData(l,p)}function
|
|
343
|
+
`});const p={type:"element",tagName:"li",properties:o,children:c};return t.patch(l,p),t.applyData(l,p)}function pS(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const r=t.children;let i=-1;for(;!l&&++i<r.length;)l=w3(r[i])}return l}function w3(t){const l=t.spread;return l??t.children.length>1}function gS(t,l){const r={},i=t.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(r.start=l.start);++s<i.length;){const c=i[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:r,children:t.wrap(i,!0)};return t.patch(l,o),t.applyData(l,o)}function yS(t,l){const r={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function xS(t,l){const r={type:"root",children:t.wrap(t.all(l))};return t.patch(l,r),t.applyData(l,r)}function bS(t,l){const r={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function vS(t,l){const r=t.all(l),i=r.shift(),s=[];if(i){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(l.children[0],c),s.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},d=u1(l.children[1]),m=t3(l.children[l.children.length-1]);d&&m&&(c.position={start:d,end:m}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,o),t.applyData(l,o)}function SS(t,l,r){const i=r?r.children:void 0,o=(i?i.indexOf(l):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,d=c?c.length:l.children.length;let m=-1;const p=[];for(;++m<d;){const y=l.children[m],v={},S=c?c[m]:void 0;S&&(v.align=S);let C={type:"element",tagName:o,properties:v,children:[]};y&&(C.children=t.all(y),t.patch(y,C),C=t.applyData(y,C)),p.push(C)}const x={type:"element",tagName:"tr",properties:{},children:t.wrap(p,!0)};return t.patch(l,x),t.applyData(l,x)}function wS(t,l){const r={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}const Nm=9,jm=32;function kS(t){const l=String(t),r=/\r?\n|\r/g;let i=r.exec(l),s=0;const o=[];for(;i;)o.push(Am(l.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=r.exec(l);return o.push(Am(l.slice(s),s>0,!1)),o.join("")}function Am(t,l,r){let i=0,s=t.length;if(l){let o=t.codePointAt(i);for(;o===Nm||o===jm;)i++,o=t.codePointAt(i)}if(r){let o=t.codePointAt(s-1);for(;o===Nm||o===jm;)s--,o=t.codePointAt(s-1)}return s>i?t.slice(i,s):""}function CS(t,l){const r={type:"text",value:kS(String(l.value))};return t.patch(l,r),t.applyData(l,r)}function ES(t,l){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,r),t.applyData(l,r)}const MS={blockquote:tS,break:nS,code:lS,delete:rS,emphasis:aS,footnoteReference:iS,heading:uS,html:sS,imageReference:oS,image:cS,inlineCode:fS,linkReference:dS,link:hS,listItem:mS,list:gS,paragraph:yS,root:xS,strong:bS,table:vS,tableCell:wS,tableRow:SS,text:CS,thematicBreak:ES,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const k3=-1,ws=0,yi=1,cs=2,m1=3,p1=4,g1=5,y1=6,C3=7,E3=8,zm=typeof self=="object"?self:globalThis,NS=(t,l)=>{const r=(s,o)=>(t.set(o,s),s),i=s=>{if(t.has(s))return t.get(s);const[o,c]=l[s];switch(o){case ws:case k3:return r(c,s);case yi:{const d=r([],s);for(const m of c)d.push(i(m));return d}case cs:{const d=r({},s);for(const[m,p]of c)d[i(m)]=i(p);return d}case m1:return r(new Date(c),s);case p1:{const{source:d,flags:m}=c;return r(new RegExp(d,m),s)}case g1:{const d=r(new Map,s);for(const[m,p]of c)d.set(i(m),i(p));return d}case y1:{const d=r(new Set,s);for(const m of c)d.add(i(m));return d}case C3:{const{name:d,message:m}=c;return r(new zm[d](m),s)}case E3:return r(BigInt(c),s);case"BigInt":return r(Object(BigInt(c)),s);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return r(new DataView(d),c)}}return r(new zm[o](c),s)};return i},Tm=t=>NS(new Map,t)(0),Pr="",{toString:jS}={},{keys:AS}=Object,di=t=>{const l=typeof t;if(l!=="object"||!t)return[ws,l];const r=jS.call(t).slice(8,-1);switch(r){case"Array":return[yi,Pr];case"Object":return[cs,Pr];case"Date":return[m1,Pr];case"RegExp":return[p1,Pr];case"Map":return[g1,Pr];case"Set":return[y1,Pr];case"DataView":return[yi,r]}return r.includes("Array")?[yi,r]:r.includes("Error")?[C3,r]:[cs,r]},Qu=([t,l])=>t===ws&&(l==="function"||l==="symbol"),zS=(t,l,r,i)=>{const s=(c,d)=>{const m=i.push(c)-1;return r.set(d,m),m},o=c=>{if(r.has(c))return r.get(c);let[d,m]=di(c);switch(d){case ws:{let x=c;switch(m){case"bigint":d=E3,x=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);x=null;break;case"undefined":return s([k3],c)}return s([d,x],c)}case yi:{if(m){let v=c;return m==="DataView"?v=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(v=new Uint8Array(c)),s([m,[...v]],c)}const x=[],y=s([d,x],c);for(const v of c)x.push(o(v));return y}case cs:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(l&&"toJSON"in c)return o(c.toJSON());const x=[],y=s([d,x],c);for(const v of AS(c))(t||!Qu(di(c[v])))&&x.push([o(v),o(c[v])]);return y}case m1:return s([d,c.toISOString()],c);case p1:{const{source:x,flags:y}=c;return s([d,{source:x,flags:y}],c)}case g1:{const x=[],y=s([d,x],c);for(const[v,S]of c)(t||!(Qu(di(v))||Qu(di(S))))&&x.push([o(v),o(S)]);return y}case y1:{const x=[],y=s([d,x],c);for(const v of c)(t||!Qu(di(v)))&&x.push(o(v));return y}}const{message:p}=c;return s([d,{name:m,message:p}],c)};return o},_m=(t,{json:l,lossy:r}={})=>{const i=[];return zS(!(l||r),!!l,new Map,i)(t),i},fs=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Tm(_m(t,l)):structuredClone(t):(t,l)=>Tm(_m(t,l));function TS(t,l){const r=[{type:"text",value:"↩"}];return l>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),r}function _S(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function RS(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||TS,i=t.options.footnoteBackLabel||_S,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<t.footnoteOrder.length;){const p=t.footnoteById.get(t.footnoteOrder[m]);if(!p)continue;const x=t.all(p),y=String(p.identifier).toUpperCase(),v=ha(y.toLowerCase());let S=0;const C=[],T=t.footnoteCounts.get(y);for(;T!==void 0&&++S<=T;){C.length>0&&C.push({type:"text",value:" "});let U=typeof r=="string"?r:r(m,S);typeof U=="string"&&(U={type:"text",value:U}),C.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(m,S),className:["data-footnote-backref"]},children:Array.isArray(U)?U:[U]})}const z=x[x.length-1];if(z&&z.type==="element"&&z.tagName==="p"){const U=z.children[z.children.length-1];U&&U.type==="text"?U.value+=" ":z.children.push({type:"text",value:" "}),z.children.push(...C)}else x.push(...C);const M={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:t.wrap(x,!0)};t.patch(p,M),d.push(M)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...fs(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
344
344
|
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
345
|
-
`}]}}const
|
|
345
|
+
`}]}}const ks=(function(t){if(t==null)return US;if(typeof t=="function")return Cs(t);if(typeof t=="object")return Array.isArray(t)?DS(t):OS(t);if(typeof t=="string")return LS(t);throw new Error("Expected function, string, or object as test")});function DS(t){const l=[];let r=-1;for(;++r<t.length;)l[r]=ks(t[r]);return Cs(i);function i(...s){let o=-1;for(;++o<l.length;)if(l[o].apply(this,s))return!0;return!1}}function OS(t){const l=t;return Cs(r);function r(i){const s=i;let o;for(o in t)if(s[o]!==l[o])return!1;return!0}}function LS(t){return Cs(l);function l(r){return r&&r.type===t}}function Cs(t){return l;function l(r,i,s){return!!(HS(r)&&t.call(this,r,typeof i=="number"?i:void 0,s||void 0))}}function US(){return!0}function HS(t){return t!==null&&typeof t=="object"&&"type"in t}const M3=[],BS=!0,Rf=!1,ZS="skip";function N3(t,l,r,i){let s;typeof l=="function"&&typeof r!="function"?(i=r,r=l):s=l;const o=ks(s),c=i?-1:1;d(t,void 0,[])();function d(m,p,x){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const S=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(m.type+(S?"<"+S+">":""))+")"})}return v;function v(){let S=M3,C,T,z;if((!l||o(m,p,x[x.length-1]||void 0))&&(S=qS(r(m,x)),S[0]===Rf))return S;if("children"in m&&m.children){const M=m;if(M.children&&S[0]!==ZS)for(T=(i?M.children.length:-1)+c,z=x.concat(M);T>-1&&T<M.children.length;){const U=M.children[T];if(C=d(U,T,z)(),C[0]===Rf)return C;T=typeof C[1]=="number"?C[1]:T+c}}return S}}}function qS(t){return Array.isArray(t)?t:typeof t=="number"?[BS,t]:t==null?M3:[t]}function x1(t,l,r,i){let s,o,c;typeof l=="function"&&typeof r!="function"?(o=void 0,c=l,s=r):(o=l,c=r,s=i),N3(t,o,d,s);function d(m,p){const x=p[p.length-1],y=x?x.children.indexOf(m):void 0;return c(m,y,x)}}const Df={}.hasOwnProperty,$S={};function VS(t,l){const r=l||$S,i=new Map,s=new Map,o=new Map,c={...MS,...r.handlers},d={all:p,applyData:JS,definitionById:i,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:m,options:r,patch:IS,wrap:YS};return x1(t,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?i:s,v=String(x.identifier).toUpperCase();y.has(v)||y.set(v,x)}}),d;function m(x,y){const v=x.type,S=d.handlers[v];if(Df.call(d.handlers,v)&&S)return S(d,x,y);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in x){const{children:T,...z}=x,M=fs(z);return M.children=d.all(x),M}return fs(x)}return(d.options.unknownHandler||FS)(d,x,y)}function p(x){const y=[];if("children"in x){const v=x.children;let S=-1;for(;++S<v.length;){const C=d.one(v[S],x);if(C){if(S&&v[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=Rm(C.value)),!Array.isArray(C)&&C.type==="element")){const T=C.children[0];T&&T.type==="text"&&(T.value=Rm(T.value))}Array.isArray(C)?y.push(...C):y.push(C)}}}return y}}function IS(t,l){t.position&&(l.position=_b(t))}function JS(t,l){let r=l;if(t&&t.data){const i=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const c="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:c}}r.type==="element"&&o&&Object.assign(r.properties,fs(o)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function FS(t,l){const r=l.data||{},i="value"in l&&!(Df.call(r,"hProperties")||Df.call(r,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function YS(t,l){const r=[];let i=-1;for(l&&r.push({type:"text",value:`
|
|
346
346
|
`});++i<t.length;)i&&r.push({type:"text",value:`
|
|
347
347
|
`}),r.push(t[i]);return l&&t.length>0&&r.push({type:"text",value:`
|
|
348
|
-
`}),r}function
|
|
349
|
-
`},s),o}function Kw(t,l){return t&&"run"in t?async function(r,i){const s=Im(r,{file:i,...l});await t.run(s,i)}:function(r,i){return Im(r,{file:i,...t||l})}}function Jm(t){if(t)throw t}var df,Fm;function Pw(){if(Fm)return df;Fm=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},o=function(p){if(!p||l.call(p)!=="[object Object]")return!1;var x=t.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!x&&!y)return!1;var v;for(v in p);return typeof v>"u"||t.call(p,v)},c=function(p,x){r&&x.name==="__proto__"?r(p,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):p[x.name]=x.newValue},d=function(p,x){if(x==="__proto__")if(t.call(p,x)){if(i)return i(p,x).value}else return;return p[x]};return df=function m(){var p,x,y,v,S,C,T=arguments[0],z=1,M=arguments.length,U=!1;for(typeof T=="boolean"&&(U=T,T=arguments[1]||{},z=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});z<M;++z)if(p=arguments[z],p!=null)for(x in p)y=d(T,x),v=d(p,x),T!==v&&(U&&v&&(o(v)||(S=s(v)))?(S?(S=!1,C=y&&s(y)?y:[]):C=y&&o(y)?y:{},c(T,{name:x,newValue:m(U,C,v)})):typeof v<"u"&&c(T,{name:x,newValue:v}));return T},df}var Ww=Pw();const hf=qf(Ww);function Hf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function ek(){const t=[],l={run:r,use:i};return l;function r(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(m,...p){const x=t[++o];let y=-1;if(m){c(m);return}for(;++y<s.length;)(p[y]===null||p[y]===void 0)&&(p[y]=s[y]);s=p,x?tk(x,d)(...p):c(null,...p)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function tk(t,l){let r;return i;function i(...c){const d=t.length>c.length;let m;d&&c.push(s);try{m=t.apply(this,c)}catch(p){const x=p;if(d&&r)throw x;return s(x)}d||(m&&m.then&&typeof m.then=="function"?m.then(o,s):m instanceof Error?s(m):o(m))}function s(c,...d){r||(r=!0,l(c,...d))}function o(c){s(null,c)}}const An={basename:nk,dirname:lk,extname:rk,join:ak,sep:"/"};function nk(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');zi(t);let r=0,i=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else i<0&&(o=!0,i=s+1);return i<0?"":t.slice(r,i)}if(l===t)return"";let c=-1,d=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(t.codePointAt(s)===l.codePointAt(d--)?d<0&&(i=s):(d=-1,i=c));return r===i?i=c:i<0&&(i=t.length),t.slice(r,i)}function lk(t){if(zi(t),t.length===0)return".";let l=-1,r=t.length,i;for(;--r;)if(t.codePointAt(r)===47){if(i){l=r;break}}else i||(i=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function rk(t){zi(t);let l=t.length,r=-1,i=0,s=-1,o=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){i=l+1;break}continue}r<0&&(c=!0,r=l+1),d===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||r<0||o===0||o===1&&s===r-1&&s===i+1?"":t.slice(s,r)}function ak(...t){let l=-1,r;for(;++l<t.length;)zi(t[l]),t[l]&&(r=r===void 0?t[l]:r+"/"+t[l]);return r===void 0?".":ik(r)}function ik(t){zi(t);const l=t.codePointAt(0)===47;let r=uk(t,!l);return r.length===0&&!l&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),l?"/"+r:r}function uk(t,l){let r="",i=0,s=-1,o=0,c=-1,d,m;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",i=0):(r=r.slice(0,m),i=r.length-1-r.lastIndexOf("/")),s=c,o=0;continue}}else if(r.length>0){r="",i=0,s=c,o=0;continue}}l&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(s+1,c):r=t.slice(s+1,c),i=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return r}function zi(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const sk={cwd:ok};function ok(){return"/"}function Bf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function ck(t){if(typeof t=="string")t=new URL(t);else if(!Bf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return fk(t)}function fk(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const l=t.pathname;let r=-1;for(;++r<l.length;)if(l.codePointAt(r)===37&&l.codePointAt(r+1)===50){const i=l.codePointAt(r+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const mf=["history","path","basename","stem","extname","dirname"];class K3{constructor(l){let r;l?Bf(l)?r={path:l}:typeof l=="string"||dk(l)?r={value:l}:r=l:r={},this.cwd="cwd"in r?"":sk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<mf.length;){const o=mf[i];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let s;for(s in r)mf.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(l){gf(l,"basename"),pf(l,"basename"),this.path=An.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(l){Ym(this.basename,"dirname"),this.path=An.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(l){if(pf(l,"extname"),Ym(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=An.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Bf(l)&&(l=ck(l)),gf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(l){gf(l,"stem"),pf(l,"stem"),this.path=An.join(this.dirname||"",l+(this.extname||""))}fail(l,r,i){const s=this.message(l,r,i);throw s.fatal=!0,s}info(l,r,i){const s=this.message(l,r,i);return s.fatal=void 0,s}message(l,r,i){const s=new At(l,r,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function pf(t,l){if(t&&t.includes(An.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+An.sep+"`")}function gf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function Ym(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function dk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const hk=(function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o}),mk={}.hasOwnProperty;class k1 extends hk{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ek()}copy(){const l=new k1;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];l.use(...i)}return l.data(hf(!0,{},this.namespace)),l}data(l,r){return typeof l=="string"?arguments.length===2?(bf("data",this.frozen),this.namespace[l]=r,this):mk.call(this.namespace,l)&&this.namespace[l]||void 0:l?(bf("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=r.call(l,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const r=Pu(l),i=this.parser||this.Parser;return yf("parse",i),i(String(r),r)}process(l,r){const i=this;return this.freeze(),yf("process",this.parser||this.Parser),xf("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(o,c){const d=Pu(l),m=i.parse(d);i.run(m,d,function(x,y,v){if(x||!y||!v)return p(x);const S=y,C=i.stringify(S,v);yk(C)?v.value=C:v.result=C,p(x,v)});function p(x,y){x||!y?c(x):o?o(y):r(void 0,y)}}}processSync(l){let r=!1,i;return this.freeze(),yf("processSync",this.parser||this.Parser),xf("processSync",this.compiler||this.Compiler),this.process(l,s),Xm("processSync","process",r),i;function s(o,c){r=!0,Jm(o),i=c}}run(l,r,i){Gm(l),this.freeze();const s=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?o(void 0,i):new Promise(o);function o(c,d){const m=Pu(r);s.run(l,m,p);function p(x,y,v){const S=y||l;x?d(x):c?c(S):i(void 0,S,v)}}}runSync(l,r){let i=!1,s;return this.run(l,r,o),Xm("runSync","run",i),s;function o(c,d){Jm(c),s=d,i=!0}}stringify(l,r){this.freeze();const i=Pu(r),s=this.compiler||this.Compiler;return xf("stringify",s),Gm(l),s(l,i)}use(l,...r){const i=this.attachers,s=this.namespace;if(bf("use",this.frozen),l!=null)if(typeof l=="function")m(l,r);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[x,...y]=p;m(x,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(s.settings=hf(!0,s.settings,p.settings))}function d(p){let x=-1;if(p!=null)if(Array.isArray(p))for(;++x<p.length;){const y=p[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,x){let y=-1,v=-1;for(;++y<i.length;)if(i[y][0]===p){v=y;break}if(v===-1)i.push([p,...x]);else if(x.length>0){let[S,...C]=x;const T=i[v][1];Hf(T)&&Hf(S)&&(S=hf(!0,T,S)),i[v]=[p,S,...C]}}}}const pk=new k1().freeze();function yf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function xf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function bf(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gm(t){if(!Hf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Xm(t,l,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Pu(t){return gk(t)?t:new K3(t)}function gk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function yk(t){return typeof t=="string"||xk(t)}function xk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const bk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Qm=[],Km={allowDangerousHtml:!0},vk=/^(https?|ircs?|mailto|xmpp)$/i,Sk=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function wk(t){const l=kk(t),r=Ck(t);return Ek(l.runSync(l.parse(r),r),t)}function kk(t){const l=t.rehypePlugins||Qm,r=t.remarkPlugins||Qm,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Km}:Km;return pk().use(lw).use(r).use(Kw,i).use(l)}function Ck(t){const l=t.children||"",r=new K3;return typeof l=="string"&&(r.value=l),r}function Ek(t,l){const r=l.allowedElements,i=l.allowElement,s=l.components,o=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,m=l.urlTransform||Mk;for(const x of Sk)Object.hasOwn(l,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+bk+x.id,void 0);return w1(t,p),Zv(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(x,y,v){if(x.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let S;for(S in of)if(Object.hasOwn(of,S)&&Object.hasOwn(x.properties,S)){const C=x.properties[S],T=of[S];(T===null||T.includes(x.tagName))&&(x.properties[S]=m(String(C||""),S,x))}}if(x.type==="element"){let S=r?!r.includes(x.tagName):o?o.includes(x.tagName):!1;if(!S&&i&&typeof y=="number"&&(S=!i(x,y,v)),S&&v&&typeof y=="number")return d&&x.children?v.children.splice(y,1,...x.children):v.children.splice(y,1),y}}}function Mk(t){const l=t.indexOf(":"),r=t.indexOf("?"),i=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||r!==-1&&l>r||i!==-1&&l>i||vk.test(t.slice(0,l))?t:""}function Pm(t,l){const r=String(t);if(typeof l!="string")throw new TypeError("Expected character");let i=0,s=r.indexOf(l);for(;s!==-1;)i++,s=r.indexOf(l,s+l.length);return i}function Nk(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jk(t,l,r){const s=Ns((r||{}).ignore||[]),o=Ak(l);let c=-1;for(;++c<o.length;)Q3(t,"text",d);function d(p,x){let y=-1,v;for(;++y<x.length;){const S=x[y],C=v?v.children:void 0;if(s(S,C?C.indexOf(S):void 0,v))return;v=S}if(v)return m(p,x)}function m(p,x){const y=x[x.length-1],v=o[c][0],S=o[c][1];let C=0;const z=y.children.indexOf(p);let M=!1,U=[];v.lastIndex=0;let N=v.exec(p.value);for(;N;){const V=N.index,F={index:N.index,input:N.input,stack:[...x,p]};let _=S(...N,F);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?v.lastIndex=V+1:(C!==V&&U.push({type:"text",value:p.value.slice(C,V)}),Array.isArray(_)?U.push(..._):_&&U.push(_),C=V+N[0].length,M=!0),!v.global)break;N=v.exec(p.value)}return M?(C<p.value.length&&U.push({type:"text",value:p.value.slice(C)}),y.children.splice(z,1,...U)):U=[p],z+U.length}}function Ak(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<r.length;){const s=r[i];l.push([zk(s[0]),Tk(s[1])])}return l}function zk(t){return typeof t=="string"?new RegExp(Nk(t),"g"):t}function Tk(t){return typeof t=="function"?t:function(){return t}}const vf="phrasing",Sf=["autolink","link","image","label"];function _k(){return{transforms:[Bk],enter:{literalAutolink:Dk,literalAutolinkEmail:wf,literalAutolinkHttp:wf,literalAutolinkWww:wf},exit:{literalAutolink:Hk,literalAutolinkEmail:Uk,literalAutolinkHttp:Ok,literalAutolinkWww:Lk}}}function Rk(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vf,notInConstruct:Sf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vf,notInConstruct:Sf},{character:":",before:"[ps]",after:"\\/",inConstruct:vf,notInConstruct:Sf}]}}function Dk(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function wf(t){this.config.enter.autolinkProtocol.call(this,t)}function Ok(t){this.config.exit.autolinkProtocol.call(this,t)}function Lk(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function Uk(t){this.config.exit.autolinkEmail.call(this,t)}function Hk(t){this.exit(t)}function Bk(t){jk(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Zk],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qk]],{ignore:["link","linkReference"]})}function Zk(t,l,r,i,s){let o="";if(!P3(s)||(/^w/i.test(l)&&(r=l+r,l="",o="http://"),!$k(r)))return!1;const c=Vk(r+i);if(!c[0])return!1;const d={type:"link",title:null,url:o+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function qk(t,l,r,i){return!P3(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+r,children:[{type:"text",value:l+"@"+r}]}}function $k(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function Vk(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let r=l[0],i=r.indexOf(")");const s=Pm(t,"(");let o=Pm(t,")");for(;i!==-1&&s>o;)t+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),o++;return[t,r]}function P3(t,l){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ur(r)||Cs(r))&&(!l||r!==47)}W3.peek=Pk;function Ik(){this.buffer()}function Jk(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Fk(){this.buffer()}function Yk(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Gk(t){const l=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cn(this.sliceSerialize(t)).toLowerCase(),r.label=l}function Xk(t){this.exit(t)}function Qk(t){const l=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Cn(this.sliceSerialize(t)).toLowerCase(),r.label=l}function Kk(t){this.exit(t)}function Pk(){return"["}function W3(t,l,r,i){const s=r.createTracker(i);let o=s.move("[^");const c=r.enter("footnoteReference"),d=r.enter("reference");return o+=s.move(r.safe(r.associationId(t),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function Wk(){return{enter:{gfmFootnoteCallString:Ik,gfmFootnoteCall:Jk,gfmFootnoteDefinitionLabelString:Fk,gfmFootnoteDefinition:Yk},exit:{gfmFootnoteCallString:Gk,gfmFootnoteCall:Xk,gfmFootnoteDefinitionLabelString:Qk,gfmFootnoteDefinition:Kk}}}function eC(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:r,footnoteReference:W3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,s,o,c){const d=o.createTracker(c);let m=d.move("[^");const p=o.enter("footnoteDefinition"),x=o.enter("label");return m+=d.move(o.safe(o.associationId(i),{before:m,after:"]"})),x(),m+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),m+=d.move((l?`
|
|
350
|
-
`:" ")+o.indentLines(o.containerFlow(i,d.current()),l?
|
|
351
|
-
`)}function
|
|
352
|
-
`&&
|
|
353
|
-
`}function
|
|
348
|
+
`}),r}function Rm(t){let l=0,r=t.charCodeAt(l);for(;r===9||r===32;)l++,r=t.charCodeAt(l);return t.slice(l)}function Dm(t,l){const r=VS(t,l),i=r.one(t,void 0),s=RS(r),o=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
349
|
+
`},s),o}function GS(t,l){return t&&"run"in t?async function(r,i){const s=Dm(r,{file:i,...l});await t.run(s,i)}:function(r,i){return Dm(r,{file:i,...t||l})}}function Om(t){if(t)throw t}var rf,Lm;function XS(){if(Lm)return rf;Lm=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):l.call(p)==="[object Array]"},o=function(p){if(!p||l.call(p)!=="[object Object]")return!1;var x=t.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!x&&!y)return!1;var v;for(v in p);return typeof v>"u"||t.call(p,v)},c=function(p,x){r&&x.name==="__proto__"?r(p,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):p[x.name]=x.newValue},d=function(p,x){if(x==="__proto__")if(t.call(p,x)){if(i)return i(p,x).value}else return;return p[x]};return rf=function m(){var p,x,y,v,S,C,T=arguments[0],z=1,M=arguments.length,U=!1;for(typeof T=="boolean"&&(U=T,T=arguments[1]||{},z=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});z<M;++z)if(p=arguments[z],p!=null)for(x in p)y=d(T,x),v=d(p,x),T!==v&&(U&&v&&(o(v)||(S=s(v)))?(S?(S=!1,C=y&&s(y)?y:[]):C=y&&o(y)?y:{},c(T,{name:x,newValue:m(U,C,v)})):typeof v<"u"&&c(T,{name:x,newValue:v}));return T},rf}var QS=XS();const af=qf(QS);function Of(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function KS(){const t=[],l={run:r,use:i};return l;function r(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(m,...p){const x=t[++o];let y=-1;if(m){c(m);return}for(;++y<s.length;)(p[y]===null||p[y]===void 0)&&(p[y]=s[y]);s=p,x?PS(x,d)(...p):c(null,...p)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function PS(t,l){let r;return i;function i(...c){const d=t.length>c.length;let m;d&&c.push(s);try{m=t.apply(this,c)}catch(p){const x=p;if(d&&r)throw x;return s(x)}d||(m&&m.then&&typeof m.then=="function"?m.then(o,s):m instanceof Error?s(m):o(m))}function s(c,...d){r||(r=!0,l(c,...d))}function o(c){s(null,c)}}const An={basename:WS,dirname:ew,extname:tw,join:nw,sep:"/"};function WS(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');zi(t);let r=0,i=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else i<0&&(o=!0,i=s+1);return i<0?"":t.slice(r,i)}if(l===t)return"";let c=-1,d=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){r=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(t.codePointAt(s)===l.codePointAt(d--)?d<0&&(i=s):(d=-1,i=c));return r===i?i=c:i<0&&(i=t.length),t.slice(r,i)}function ew(t){if(zi(t),t.length===0)return".";let l=-1,r=t.length,i;for(;--r;)if(t.codePointAt(r)===47){if(i){l=r;break}}else i||(i=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function tw(t){zi(t);let l=t.length,r=-1,i=0,s=-1,o=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){i=l+1;break}continue}r<0&&(c=!0,r=l+1),d===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||r<0||o===0||o===1&&s===r-1&&s===i+1?"":t.slice(s,r)}function nw(...t){let l=-1,r;for(;++l<t.length;)zi(t[l]),t[l]&&(r=r===void 0?t[l]:r+"/"+t[l]);return r===void 0?".":lw(r)}function lw(t){zi(t);const l=t.codePointAt(0)===47;let r=rw(t,!l);return r.length===0&&!l&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),l?"/"+r:r}function rw(t,l){let r="",i=0,s=-1,o=0,c=-1,d,m;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",i=0):(r=r.slice(0,m),i=r.length-1-r.lastIndexOf("/")),s=c,o=0;continue}}else if(r.length>0){r="",i=0,s=c,o=0;continue}}l&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(s+1,c):r=t.slice(s+1,c),i=c-s-1;s=c,o=0}else d===46&&o>-1?o++:o=-1}return r}function zi(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const aw={cwd:iw};function iw(){return"/"}function Lf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function uw(t){if(typeof t=="string")t=new URL(t);else if(!Lf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return sw(t)}function sw(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const l=t.pathname;let r=-1;for(;++r<l.length;)if(l.codePointAt(r)===37&&l.codePointAt(r+1)===50){const i=l.codePointAt(r+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const uf=["history","path","basename","stem","extname","dirname"];class j3{constructor(l){let r;l?Lf(l)?r={path:l}:typeof l=="string"||ow(l)?r={value:l}:r=l:r={},this.cwd="cwd"in r?"":aw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<uf.length;){const o=uf[i];o in r&&r[o]!==void 0&&r[o]!==null&&(this[o]=o==="history"?[...r[o]]:r[o])}let s;for(s in r)uf.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(l){of(l,"basename"),sf(l,"basename"),this.path=An.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(l){Um(this.basename,"dirname"),this.path=An.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(l){if(sf(l,"extname"),Um(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=An.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Lf(l)&&(l=uw(l)),of(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(l){of(l,"stem"),sf(l,"stem"),this.path=An.join(this.dirname||"",l+(this.extname||""))}fail(l,r,i){const s=this.message(l,r,i);throw s.fatal=!0,s}info(l,r,i){const s=this.message(l,r,i);return s.fatal=void 0,s}message(l,r,i){const s=new At(l,r,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function sf(t,l){if(t&&t.includes(An.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+An.sep+"`")}function of(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function Um(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function ow(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const cw=(function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o}),fw={}.hasOwnProperty;class b1 extends cw{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=KS()}copy(){const l=new b1;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];l.use(...i)}return l.data(af(!0,{},this.namespace)),l}data(l,r){return typeof l=="string"?arguments.length===2?(df("data",this.frozen),this.namespace[l]=r,this):fw.call(this.namespace,l)&&this.namespace[l]||void 0:l?(df("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=r.call(l,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const r=Ku(l),i=this.parser||this.Parser;return cf("parse",i),i(String(r),r)}process(l,r){const i=this;return this.freeze(),cf("process",this.parser||this.Parser),ff("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(o,c){const d=Ku(l),m=i.parse(d);i.run(m,d,function(x,y,v){if(x||!y||!v)return p(x);const S=y,C=i.stringify(S,v);mw(C)?v.value=C:v.result=C,p(x,v)});function p(x,y){x||!y?c(x):o?o(y):r(void 0,y)}}}processSync(l){let r=!1,i;return this.freeze(),cf("processSync",this.parser||this.Parser),ff("processSync",this.compiler||this.Compiler),this.process(l,s),Bm("processSync","process",r),i;function s(o,c){r=!0,Om(o),i=c}}run(l,r,i){Hm(l),this.freeze();const s=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?o(void 0,i):new Promise(o);function o(c,d){const m=Ku(r);s.run(l,m,p);function p(x,y,v){const S=y||l;x?d(x):c?c(S):i(void 0,S,v)}}}runSync(l,r){let i=!1,s;return this.run(l,r,o),Bm("runSync","run",i),s;function o(c,d){Om(c),s=d,i=!0}}stringify(l,r){this.freeze();const i=Ku(r),s=this.compiler||this.Compiler;return ff("stringify",s),Hm(l),s(l,i)}use(l,...r){const i=this.attachers,s=this.namespace;if(df("use",this.frozen),l!=null)if(typeof l=="function")m(l,r);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[x,...y]=p;m(x,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(s.settings=af(!0,s.settings,p.settings))}function d(p){let x=-1;if(p!=null)if(Array.isArray(p))for(;++x<p.length;){const y=p[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,x){let y=-1,v=-1;for(;++y<i.length;)if(i[y][0]===p){v=y;break}if(v===-1)i.push([p,...x]);else if(x.length>0){let[S,...C]=x;const T=i[v][1];Of(T)&&Of(S)&&(S=af(!0,T,S)),i[v]=[p,S,...C]}}}}const dw=new b1().freeze();function cf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function ff(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function df(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Hm(t){if(!Of(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Bm(t,l,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Ku(t){return hw(t)?t:new j3(t)}function hw(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function mw(t){return typeof t=="string"||pw(t)}function pw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const gw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Zm=[],qm={allowDangerousHtml:!0},yw=/^(https?|ircs?|mailto|xmpp)$/i,xw=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function bw(t){const l=vw(t),r=Sw(t);return ww(l.runSync(l.parse(r),r),t)}function vw(t){const l=t.rehypePlugins||Zm,r=t.remarkPlugins||Zm,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...qm}:qm;return dw().use(eS).use(r).use(GS,i).use(l)}function Sw(t){const l=t.children||"",r=new j3;return typeof l=="string"&&(r.value=l),r}function ww(t,l){const r=l.allowedElements,i=l.allowElement,s=l.components,o=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,m=l.urlTransform||kw;for(const x of xw)Object.hasOwn(l,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+gw+x.id,void 0);return x1(t,p),Ub(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(x,y,v){if(x.type==="raw"&&v&&typeof y=="number")return c?v.children.splice(y,1):v.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let S;for(S in tf)if(Object.hasOwn(tf,S)&&Object.hasOwn(x.properties,S)){const C=x.properties[S],T=tf[S];(T===null||T.includes(x.tagName))&&(x.properties[S]=m(String(C||""),S,x))}}if(x.type==="element"){let S=r?!r.includes(x.tagName):o?o.includes(x.tagName):!1;if(!S&&i&&typeof y=="number"&&(S=!i(x,y,v)),S&&v&&typeof y=="number")return d&&x.children?v.children.splice(y,1,...x.children):v.children.splice(y,1),y}}}function kw(t){const l=t.indexOf(":"),r=t.indexOf("?"),i=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||r!==-1&&l>r||i!==-1&&l>i||yw.test(t.slice(0,l))?t:""}function $m(t,l){const r=String(t);if(typeof l!="string")throw new TypeError("Expected character");let i=0,s=r.indexOf(l);for(;s!==-1;)i++,s=r.indexOf(l,s+l.length);return i}function Cw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ew(t,l,r){const s=ks((r||{}).ignore||[]),o=Mw(l);let c=-1;for(;++c<o.length;)N3(t,"text",d);function d(p,x){let y=-1,v;for(;++y<x.length;){const S=x[y],C=v?v.children:void 0;if(s(S,C?C.indexOf(S):void 0,v))return;v=S}if(v)return m(p,x)}function m(p,x){const y=x[x.length-1],v=o[c][0],S=o[c][1];let C=0;const z=y.children.indexOf(p);let M=!1,U=[];v.lastIndex=0;let N=v.exec(p.value);for(;N;){const V=N.index,F={index:N.index,input:N.input,stack:[...x,p]};let _=S(...N,F);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?v.lastIndex=V+1:(C!==V&&U.push({type:"text",value:p.value.slice(C,V)}),Array.isArray(_)?U.push(..._):_&&U.push(_),C=V+N[0].length,M=!0),!v.global)break;N=v.exec(p.value)}return M?(C<p.value.length&&U.push({type:"text",value:p.value.slice(C)}),y.children.splice(z,1,...U)):U=[p],z+U.length}}function Mw(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<r.length;){const s=r[i];l.push([Nw(s[0]),jw(s[1])])}return l}function Nw(t){return typeof t=="string"?new RegExp(Cw(t),"g"):t}function jw(t){return typeof t=="function"?t:function(){return t}}const hf="phrasing",mf=["autolink","link","image","label"];function Aw(){return{transforms:[Lw],enter:{literalAutolink:Tw,literalAutolinkEmail:pf,literalAutolinkHttp:pf,literalAutolinkWww:pf},exit:{literalAutolink:Ow,literalAutolinkEmail:Dw,literalAutolinkHttp:_w,literalAutolinkWww:Rw}}}function zw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hf,notInConstruct:mf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hf,notInConstruct:mf},{character:":",before:"[ps]",after:"\\/",inConstruct:hf,notInConstruct:mf}]}}function Tw(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function pf(t){this.config.enter.autolinkProtocol.call(this,t)}function _w(t){this.config.exit.autolinkProtocol.call(this,t)}function Rw(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function Dw(t){this.config.exit.autolinkEmail.call(this,t)}function Ow(t){this.exit(t)}function Lw(t){Ew(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Uw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Hw]],{ignore:["link","linkReference"]})}function Uw(t,l,r,i,s){let o="";if(!A3(s)||(/^w/i.test(l)&&(r=l+r,l="",o="http://"),!Bw(r)))return!1;const c=Zw(r+i);if(!c[0])return!1;const d={type:"link",title:null,url:o+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function Hw(t,l,r,i){return!A3(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+r,children:[{type:"text",value:l+"@"+r}]}}function Bw(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function Zw(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let r=l[0],i=r.indexOf(")");const s=$m(t,"(");let o=$m(t,")");for(;i!==-1&&s>o;)t+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),o++;return[t,r]}function A3(t,l){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ir(r)||vs(r))&&(!l||r!==47)}z3.peek=Xw;function qw(){this.buffer()}function $w(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Vw(){this.buffer()}function Iw(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Jw(t){const l=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=kn(this.sliceSerialize(t)).toLowerCase(),r.label=l}function Fw(t){this.exit(t)}function Yw(t){const l=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=kn(this.sliceSerialize(t)).toLowerCase(),r.label=l}function Gw(t){this.exit(t)}function Xw(){return"["}function z3(t,l,r,i){const s=r.createTracker(i);let o=s.move("[^");const c=r.enter("footnoteReference"),d=r.enter("reference");return o+=s.move(r.safe(r.associationId(t),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function Qw(){return{enter:{gfmFootnoteCallString:qw,gfmFootnoteCall:$w,gfmFootnoteDefinitionLabelString:Vw,gfmFootnoteDefinition:Iw},exit:{gfmFootnoteCallString:Jw,gfmFootnoteCall:Fw,gfmFootnoteDefinitionLabelString:Yw,gfmFootnoteDefinition:Gw}}}function Kw(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:r,footnoteReference:z3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,s,o,c){const d=o.createTracker(c);let m=d.move("[^");const p=o.enter("footnoteDefinition"),x=o.enter("label");return m+=d.move(o.safe(o.associationId(i),{before:m,after:"]"})),x(),m+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),m+=d.move((l?`
|
|
350
|
+
`:" ")+o.indentLines(o.containerFlow(i,d.current()),l?T3:Pw))),p(),m}}function Pw(t,l,r){return l===0?t:T3(t,l,r)}function T3(t,l,r){return(r?"":" ")+t}const Ww=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];_3.peek=rk;function ek(){return{canContainEols:["delete"],enter:{strikethrough:nk},exit:{strikethrough:lk}}}function tk(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ww}],handlers:{delete:_3}}}function nk(t){this.enter({type:"delete",children:[]},t)}function lk(t){this.exit(t)}function _3(t,l,r,i){const s=r.createTracker(i),o=r.enter("strikethrough");let c=s.move("~~");return c+=r.containerPhrasing(t,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function rk(){return"~"}function ak(t){return t.length}function ik(t,l){const r=l||{},i=(r.align||[]).concat(),s=r.stringLength||ak,o=[],c=[],d=[],m=[];let p=0,x=-1;for(;++x<t.length;){const T=[],z=[];let M=-1;for(t[x].length>p&&(p=t[x].length);++M<t[x].length;){const U=uk(t[x][M]);if(r.alignDelimiters!==!1){const N=s(U);z[M]=N,(m[M]===void 0||N>m[M])&&(m[M]=N)}T.push(U)}c[x]=T,d[x]=z}let y=-1;if(typeof i=="object"&&"length"in i)for(;++y<p;)o[y]=Vm(i[y]);else{const T=Vm(i);for(;++y<p;)o[y]=T}y=-1;const v=[],S=[];for(;++y<p;){const T=o[y];let z="",M="";T===99?(z=":",M=":"):T===108?z=":":T===114&&(M=":");let U=r.alignDelimiters===!1?1:Math.max(1,m[y]-z.length-M.length);const N=z+"-".repeat(U)+M;r.alignDelimiters!==!1&&(U=z.length+U+M.length,U>m[y]&&(m[y]=U),S[y]=U),v[y]=N}c.splice(1,0,v),d.splice(1,0,S),x=-1;const C=[];for(;++x<c.length;){const T=c[x],z=d[x];y=-1;const M=[];for(;++y<p;){const U=T[y]||"";let N="",V="";if(r.alignDelimiters!==!1){const F=m[y]-(z[y]||0),_=o[y];_===114?N=" ".repeat(F):_===99?F%2?(N=" ".repeat(F/2+.5),V=" ".repeat(F/2-.5)):(N=" ".repeat(F/2),V=N):V=" ".repeat(F)}r.delimiterStart!==!1&&!y&&M.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&U==="")&&(r.delimiterStart!==!1||y)&&M.push(" "),r.alignDelimiters!==!1&&M.push(N),M.push(U),r.alignDelimiters!==!1&&M.push(V),r.padding!==!1&&M.push(" "),(r.delimiterEnd!==!1||y!==p-1)&&M.push("|")}C.push(r.delimiterEnd===!1?M.join("").replace(/ +$/,""):M.join(""))}return C.join(`
|
|
351
|
+
`)}function uk(t){return t==null?"":String(t)}function Vm(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function sk(t,l,r,i){const s=r.enter("blockquote"),o=r.createTracker(i);o.move("> "),o.shift(2);const c=r.indentLines(r.containerFlow(t,o.current()),ok);return s(),c}function ok(t,l,r){return">"+(r?"":" ")+t}function ck(t,l){return Im(t,l.inConstruct,!0)&&!Im(t,l.notInConstruct,!1)}function Im(t,l,r){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return r;let i=-1;for(;++i<l.length;)if(t.includes(l[i]))return!0;return!1}function Jm(t,l,r,i){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
|
|
352
|
+
`&&ck(r.stack,r.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
353
|
+
`}function fk(t,l){const r=String(t);let i=r.indexOf(l),s=i,o=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++o>c&&(c=o):o=1,s=i+l.length,i=r.indexOf(l,s);return c}function dk(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function hk(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function mk(t,l,r,i){const s=hk(r),o=t.value||"",c=s==="`"?"GraveAccent":"Tilde";if(dk(t,r)){const y=r.enter("codeIndented"),v=r.indentLines(o,pk);return y(),v}const d=r.createTracker(i),m=s.repeat(Math.max(fk(o,s)+1,3)),p=r.enter("codeFenced");let x=d.move(m);if(t.lang){const y=r.enter(`codeFencedLang${c}`);x+=d.move(r.safe(t.lang,{before:x,after:" ",encode:["`"],...d.current()})),y()}if(t.lang&&t.meta){const y=r.enter(`codeFencedMeta${c}`);x+=d.move(" "),x+=d.move(r.safe(t.meta,{before:x,after:`
|
|
354
354
|
`,encode:["`"],...d.current()})),y()}return x+=d.move(`
|
|
355
355
|
`),o&&(x+=d.move(o+`
|
|
356
|
-
`)),x+=d.move(m),p(),x}function
|
|
357
|
-
`,...m.current()}))),d(),t.title&&(d=r.enter(`title${o}`),p+=m.move(" "+s),p+=m.move(r.safe(t.title,{before:p,after:s,...m.current()})),p+=m.move(s),d()),c(),p}function
|
|
356
|
+
`)),x+=d.move(m),p(),x}function pk(t,l,r){return(r?"":" ")+t}function v1(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function gk(t,l,r,i){const s=v1(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("definition");let d=r.enter("label");const m=r.createTracker(i);let p=m.move("[");return p+=m.move(r.safe(r.associationId(t),{before:p,after:"]",...m.current()})),p+=m.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(d=r.enter("destinationRaw"),p+=m.move(r.safe(t.url,{before:p,after:t.title?" ":`
|
|
357
|
+
`,...m.current()}))),d(),t.title&&(d=r.enter(`title${o}`),p+=m.move(" "+s),p+=m.move(r.safe(t.title,{before:p,after:s,...m.current()})),p+=m.move(s),d()),c(),p}function yk(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function wi(t){return"&#x"+t.toString(16).toUpperCase()+";"}function ds(t,l,r){const i=ia(t),s=ia(l);return i===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}R3.peek=xk;function R3(t,l,r,i){const s=yk(r),o=r.enter("emphasis"),c=r.createTracker(i),d=c.move(s);let m=c.move(r.containerPhrasing(t,{after:s,before:d,...c.current()}));const p=m.charCodeAt(0),x=ds(i.before.charCodeAt(i.before.length-1),p,s);x.inside&&(m=wi(p)+m.slice(1));const y=m.charCodeAt(m.length-1),v=ds(i.after.charCodeAt(0),y,s);v.inside&&(m=m.slice(0,-1)+wi(y));const S=c.move(s);return o(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},d+m+S}function xk(t,l,r){return r.options.emphasis||"*"}function bk(t,l){let r=!1;return x1(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,Rf}),!!((!t.depth||t.depth<3)&&f1(t)&&(l.options.setext||r))}function vk(t,l,r,i){const s=Math.max(Math.min(6,t.depth||1),1),o=r.createTracker(i);if(bk(t,r)){const x=r.enter("headingSetext"),y=r.enter("phrasing"),v=r.containerPhrasing(t,{...o.current(),before:`
|
|
358
358
|
`,after:`
|
|
359
359
|
`});return y(),x(),v+`
|
|
360
360
|
`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
361
361
|
`))+1))}const c="#".repeat(s),d=r.enter("headingAtx"),m=r.enter("phrasing");o.move(c+" ");let p=r.containerPhrasing(t,{before:"# ",after:`
|
|
362
|
-
`,...o.current()});return/^[\t ]/.test(p)&&(p=
|
|
362
|
+
`,...o.current()});return/^[\t ]/.test(p)&&(p=wi(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,r.options.closeAtx&&(p+=" "+c),m(),d(),p}D3.peek=Sk;function D3(t){return t.value||""}function Sk(){return"<"}O3.peek=wk;function O3(t,l,r,i){const s=v1(r),o=s==='"'?"Quote":"Apostrophe",c=r.enter("image");let d=r.enter("label");const m=r.createTracker(i);let p=m.move("![");return p+=m.move(r.safe(t.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=r.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(r.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(d=r.enter("destinationRaw"),p+=m.move(r.safe(t.url,{before:p,after:t.title?" ":")",...m.current()}))),d(),t.title&&(d=r.enter(`title${o}`),p+=m.move(" "+s),p+=m.move(r.safe(t.title,{before:p,after:s,...m.current()})),p+=m.move(s),d()),p+=m.move(")"),c(),p}function wk(){return"!"}L3.peek=kk;function L3(t,l,r,i){const s=t.referenceType,o=r.enter("imageReference");let c=r.enter("label");const d=r.createTracker(i);let m=d.move("![");const p=r.safe(t.alt,{before:m,after:"]",...d.current()});m+=d.move(p+"]["),c();const x=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(t),{before:m,after:"]",...d.current()});return c(),r.stack=x,o(),s==="full"||!p||p!==y?m+=d.move(y+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function kk(){return"!"}U3.peek=Ck;function U3(t,l,r){let i=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<r.unsafe.length;){const c=r.unsafe[o],d=r.compilePattern(c);let m;if(c.atBreak)for(;m=d.exec(i);){let p=m.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(m.index+1)}}return s+i+s}function Ck(){return"`"}function H3(t,l){const r=f1(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}B3.peek=Ek;function B3(t,l,r,i){const s=v1(r),o=s==='"'?"Quote":"Apostrophe",c=r.createTracker(i);let d,m;if(H3(t,r)){const x=r.stack;r.stack=[],d=r.enter("autolink");let y=c.move("<");return y+=c.move(r.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),d(),r.stack=x,y}d=r.enter("link"),m=r.enter("label");let p=c.move("[");return p+=c.move(r.containerPhrasing(t,{before:p,after:"](",...c.current()})),p+=c.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=r.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(r.safe(t.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(m=r.enter("destinationRaw"),p+=c.move(r.safe(t.url,{before:p,after:t.title?" ":")",...c.current()}))),m(),t.title&&(m=r.enter(`title${o}`),p+=c.move(" "+s),p+=c.move(r.safe(t.title,{before:p,after:s,...c.current()})),p+=c.move(s),m()),p+=c.move(")"),d(),p}function Ek(t,l,r){return H3(t,r)?"<":"["}Z3.peek=Mk;function Z3(t,l,r,i){const s=t.referenceType,o=r.enter("linkReference");let c=r.enter("label");const d=r.createTracker(i);let m=d.move("[");const p=r.containerPhrasing(t,{before:m,after:"]",...d.current()});m+=d.move(p+"]["),c();const x=r.stack;r.stack=[],c=r.enter("reference");const y=r.safe(r.associationId(t),{before:m,after:"]",...d.current()});return c(),r.stack=x,o(),s==="full"||!p||p!==y?m+=d.move(y+"]"):s==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function Mk(){return"["}function S1(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function Nk(t){const l=S1(t),r=t.options.bulletOther;if(!r)return l==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+r+"`) to be different");return r}function jk(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function q3(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function Ak(t,l,r,i){const s=r.enter("list"),o=r.bulletCurrent;let c=t.ordered?jk(r):S1(r);const d=t.ordered?c==="."?")":".":Nk(r);let m=l&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!t.ordered){const x=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&x&&(!x.children||!x.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&&(m=!0),q3(r)===c&&x){let y=-1;for(;++y<t.children.length;){const v=t.children[y];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=d),r.bulletCurrent=c;const p=r.containerFlow(t,i);return r.bulletLastUsed=c,r.bulletCurrent=o,s(),p}function zk(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function Tk(t,l,r,i){const s=zk(r);let o=r.bulletCurrent||S1(r);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(r.options.incrementListMarker===!1?0:l.children.indexOf(t))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=r.createTracker(i);d.move(o+" ".repeat(c-o.length)),d.shift(c);const m=r.enter("listItem"),p=r.indentLines(r.containerFlow(t,d.current()),x);return m(),p;function x(y,v,S){return v?(S?"":" ".repeat(c))+y:(S?o:o+" ".repeat(c-o.length))+y}}function _k(t,l,r,i){const s=r.enter("paragraph"),o=r.enter("phrasing"),c=r.containerPhrasing(t,i);return o(),s(),c}const Rk=ks(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Dk(t,l,r,i){return(t.children.some(function(c){return Rk(c)})?r.containerPhrasing:r.containerFlow).call(r,t,i)}function Ok(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}$3.peek=Lk;function $3(t,l,r,i){const s=Ok(r),o=r.enter("strong"),c=r.createTracker(i),d=c.move(s+s);let m=c.move(r.containerPhrasing(t,{after:s,before:d,...c.current()}));const p=m.charCodeAt(0),x=ds(i.before.charCodeAt(i.before.length-1),p,s);x.inside&&(m=wi(p)+m.slice(1));const y=m.charCodeAt(m.length-1),v=ds(i.after.charCodeAt(0),y,s);v.inside&&(m=m.slice(0,-1)+wi(y));const S=c.move(s+s);return o(),r.attentionEncodeSurroundingInfo={after:v.outside,before:x.outside},d+m+S}function Lk(t,l,r){return r.options.strong||"*"}function Uk(t,l,r,i){return r.safe(t.value,i)}function Hk(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function Bk(t,l,r){const i=(q3(r)+(r.options.ruleSpaces?" ":"")).repeat(Hk(r));return r.options.ruleSpaces?i.slice(0,-1):i}const V3={blockquote:sk,break:Jm,code:mk,definition:gk,emphasis:R3,hardBreak:Jm,heading:vk,html:D3,image:O3,imageReference:L3,inlineCode:U3,link:B3,linkReference:Z3,list:Ak,listItem:Tk,paragraph:_k,root:Dk,strong:$3,text:Uk,thematicBreak:Bk};function Zk(){return{enter:{table:qk,tableData:Fm,tableHeader:Fm,tableRow:Vk},exit:{codeText:Ik,table:$k,tableData:gf,tableHeader:gf,tableRow:gf}}}function qk(t){const l=t._align;this.enter({type:"table",align:l.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function $k(t){this.exit(t),this.data.inTable=void 0}function Vk(t){this.enter({type:"tableRow",children:[]},t)}function gf(t){this.exit(t)}function Fm(t){this.enter({type:"tableCell",children:[]},t)}function Ik(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,Jk));const r=this.stack[this.stack.length-1];r.type,r.value=l,this.exit(t)}function Jk(t,l){return l==="|"?l:t}function Fk(t){const l=t||{},r=l.tableCellPadding,i=l.tablePipeAlign,s=l.stringLength,o=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
363
363
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:m,tableRow:d}};function c(S,C,T,z){return p(x(S,T,z),S.align)}function d(S,C,T,z){const M=y(S,T,z),U=p([M]);return U.slice(0,U.indexOf(`
|
|
364
|
-
`))}function m(S,C,T,z){const M=T.enter("tableCell"),U=T.enter("phrasing"),N=T.containerPhrasing(S,{...z,before:o,after:o});return U(),M(),N}function p(S,C){return oC(S,{align:C,alignDelimiters:i,padding:r,stringLength:s})}function x(S,C,T){const z=S.children;let M=-1;const U=[],N=C.enter("table");for(;++M<z.length;)U[M]=y(z[M],C,T);return N(),U}function y(S,C,T){const z=S.children;let M=-1;const U=[],N=C.enter("tableRow");for(;++M<z.length;)U[M]=m(z[M],S,C,T);return N(),U}function v(S,C,T){let z=d4.inlineCode(S,C,T);return T.stack.includes("tableCell")&&(z=z.replace(/\|/g,"\\$&")),z}}function QC(){return{exit:{taskListCheckValueChecked:lp,taskListCheckValueUnchecked:lp,paragraph:PC}}}function KC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:WC}}}function lp(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function PC(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const s=l.children;let o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;break}}c===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(t)}function WC(t,l,r,i){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=r.createTracker(i);o&&d.move(c);let m=d4.listItem(t,l,r,{...i,...d.current()});return o&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(x){return x+c}}function eE(){return[_k(),Wk(),lC(),VC(),QC()]}function tE(t){return{extensions:[Rk(),eC(t),rC(),XC(t),KC()]}}const nE={tokenize:sE,partial:!0},h4={tokenize:oE,partial:!0},m4={tokenize:cE,partial:!0},p4={tokenize:fE,partial:!0},lE={tokenize:dE,partial:!0},g4={name:"wwwAutolink",tokenize:iE,previous:x4},y4={name:"protocolAutolink",tokenize:uE,previous:b4},rl={name:"emailAutolink",tokenize:aE,previous:v4},_n={};function rE(){return{text:_n}}let lr=48;for(;lr<123;)_n[lr]=rl,lr++,lr===58?lr=65:lr===91&&(lr=97);_n[43]=rl;_n[45]=rl;_n[46]=rl;_n[95]=rl;_n[72]=[rl,y4];_n[104]=[rl,y4];_n[87]=[rl,g4];_n[119]=[rl,g4];function aE(t,l,r){const i=this;let s,o;return c;function c(y){return!Zf(y)||!v4.call(i,i.previous)||M1(i.events)?r(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(y))}function d(y){return Zf(y)?(t.consume(y),d):y===64?(t.consume(y),m):r(y)}function m(y){return y===46?t.check(lE,x,p)(y):y===45||y===95||jt(y)?(o=!0,t.consume(y),m):x(y)}function p(y){return t.consume(y),s=!0,m}function x(y){return o&&s&&Rt(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):r(y)}}function iE(t,l,r){const i=this;return s;function s(c){return c!==87&&c!==119||!x4.call(i,i.previous)||M1(i.events)?r(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(nE,t.attempt(h4,t.attempt(m4,o),r),r)(c))}function o(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function uE(t,l,r){const i=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&b4.call(i,i.previous)&&!M1(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),d):r(y)}function d(y){if(Rt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),d;if(y===58){const v=s.toLowerCase();if(v==="http"||v==="https")return t.consume(y),m}return r(y)}function m(y){return y===47?(t.consume(y),o?p:(o=!0,m)):r(y)}function p(y){return y===null||fs(y)||Xe(y)||ur(y)||Cs(y)?r(y):t.attempt(h4,t.attempt(m4,x),r)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function sE(t,l,r){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,t.consume(c),s):c===46&&i===3?(t.consume(c),o):r(c)}function o(c){return c===null?r(c):l(c)}}function oE(t,l,r){let i,s,o;return c;function c(p){return p===46||p===95?t.check(p4,m,d)(p):p===null||Xe(p)||ur(p)||p!==45&&Cs(p)?m(p):(o=!0,t.consume(p),c)}function d(p){return p===95?i=!0:(s=i,i=void 0),t.consume(p),c}function m(p){return s||i||!o?r(p):l(p)}}function cE(t,l){let r=0,i=0;return s;function s(c){return c===40?(r++,t.consume(c),s):c===41&&i<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(p4,l,o)(c):c===null||Xe(c)||ur(c)?l(c):(t.consume(c),s)}function o(c){return c===41&&i++,t.consume(c),s}}function fE(t,l,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?(t.consume(d),i):d===38?(t.consume(d),o):d===93?(t.consume(d),s):d===60||d===null||Xe(d)||ur(d)?l(d):r(d)}function s(d){return d===null||d===40||d===91||Xe(d)||ur(d)?l(d):i(d)}function o(d){return Rt(d)?c(d):r(d)}function c(d){return d===59?(t.consume(d),i):Rt(d)?(t.consume(d),c):r(d)}}function dE(t,l,r){return i;function i(o){return t.consume(o),s}function s(o){return jt(o)?r(o):l(o)}}function x4(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Xe(t)}function b4(t){return!Rt(t)}function v4(t){return!(t===47||Zf(t))}function Zf(t){return t===43||t===45||t===46||t===95||jt(t)}function M1(t){let l=t.length,r=!1;for(;l--;){const i=t[l][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const hE={tokenize:SE,partial:!0};function mE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xE,continuation:{tokenize:bE},exit:vE}},text:{91:{name:"gfmFootnoteCall",tokenize:yE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pE,resolveTo:gE}}}}function pE(t,l,r){const i=this;let s=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const m=i.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return d;function d(m){if(!c||!c._balanced)return r(m);const p=Cn(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?r(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),l(m))}}function gE(t,l){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[t[r+1],t[r+2],["enter",i,l],t[r+3],t[r+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",c,l],["exit",c,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",i,l]];return t.splice(r,t.length-r+1,...d),t}function yE(t,l,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,c;return d;function d(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?r(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(y){if(o>999||y===93&&!c||y===null||y===91||Xe(y))return r(y);if(y===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return s.includes(Cn(i.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):r(y)}return Xe(y)||(c=!0),o++,t.consume(y),y===92?x:p}function x(y){return y===91||y===92||y===93?(t.consume(y),o++,p):p(y)}}function xE(t,l,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,c=0,d;return m;function m(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):r(C)}function x(C){if(c>999||C===93&&!d||C===null||C===91||Xe(C))return r(C);if(C===93){t.exit("chunkString");const T=t.exit("gfmFootnoteDefinitionLabelString");return o=Cn(i.sliceSerialize(T)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return Xe(C)||(d=!0),c++,t.consume(C),C===92?y:x}function y(C){return C===91||C===92||C===93?(t.consume(C),c++,x):x(C)}function v(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),s.includes(o)||s.push(o),Oe(t,S,"gfmFootnoteDefinitionWhitespace")):r(C)}function S(C){return l(C)}}function bE(t,l,r){return t.check(Ai,l,t.attempt(hE,l,r))}function vE(t){t.exit("gfmFootnoteDefinition")}function SE(t,l,r){const i=this;return Oe(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(o):r(o)}}function wE(t){let r=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,d){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},y={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},v=[["enter",x,d],["enter",c[p][1],d],["exit",c[p][1],d],["enter",y,d]],S=d.parser.constructs.insideSpan.null;S&&tn(v,v.length,0,Es(S,c.slice(p+1,m),d)),tn(v,v.length,0,[["exit",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["exit",x,d]]),tn(c,p-1,m-p+3,v),m=p+v.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function o(c,d,m){const p=this.previous,x=this.events;let y=0;return v;function v(C){return p===126&&x[x.length-1][1].type!=="characterEscape"?m(C):(c.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const T=ia(p);if(C===126)return y>1?m(C):(c.consume(C),y++,S);if(y<2&&!r)return m(C);const z=c.exit("strikethroughSequenceTemporary"),M=ia(C);return z._open=!M||M===2&&!!T,z._close=!T||T===2&&!!M,d(C)}}}class kE{constructor(){this.map=[]}add(l,r,i){CE(this,l,r,i)}consume(l){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(l.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),l.length=this.map[r][0];i.push(l.slice()),l.length=0;let s=i.pop();for(;s;){for(const o of s)l.push(o);s=i.pop()}this.map.length=0}}function CE(t,l,r,i){let s=0;if(!(r===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=r,t.map[s][2].push(...i);return}s+=1}t.map.push([l,r,i])}}function EE(t,l){let r=!1;const i=[];for(;l<t.length;){const s=t[l];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);l+=1}return i}function ME(){return{flow:{null:{name:"table",tokenize:NE,resolveAll:jE}}}}function NE(t,l,r){const i=this;let s=0,o=0,c;return d;function d(O){let ae=i.events.length-1;for(;ae>-1;){const ue=i.events[ae][1].type;if(ue==="lineEnding"||ue==="linePrefix")ae--;else break}const te=ae>-1?i.events[ae][1].type:null,be=te==="tableHead"||te==="tableRow"?_:m;return be===_&&i.parser.lazy[i.now().line]?r(O):be(O)}function m(O){return t.enter("tableHead"),t.enter("tableRow"),p(O)}function p(O){return O===124||(c=!0,o+=1),x(O)}function x(O){return O===null?r(O):ge(O)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):r(O):Te(O)?Oe(t,x,"whitespace")(O):(o+=1,c&&(c=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),c=!0,x):(t.enter("data"),y(O)))}function y(O){return O===null||O===124||Xe(O)?(t.exit("data"),x(O)):(t.consume(O),O===92?v:y)}function v(O){return O===92||O===124?(t.consume(O),y):y(O)}function S(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(t.enter("tableDelimiterRow"),c=!1,Te(O)?Oe(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?z(O):O===124?(c=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),T):F(O)}function T(O){return Te(O)?Oe(t,z,"whitespace")(O):z(O)}function z(O){return O===58?(o+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),M):O===45?(o+=1,M(O)):O===null||ge(O)?V(O):F(O)}function M(O){return O===45?(t.enter("tableDelimiterFiller"),U(O)):F(O)}function U(O){return O===45?(t.consume(O),U):O===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),N):(t.exit("tableDelimiterFiller"),N(O))}function N(O){return Te(O)?Oe(t,V,"whitespace")(O):V(O)}function V(O){return O===124?C(O):O===null||ge(O)?!c||s!==o?F(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(O)):F(O)}function F(O){return r(O)}function _(O){return t.enter("tableRow"),I(O)}function I(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),I):O===null||ge(O)?(t.exit("tableRow"),l(O)):Te(O)?Oe(t,I,"whitespace")(O):(t.enter("data"),se(O))}function se(O){return O===null||O===124||Xe(O)?(t.exit("data"),I(O)):(t.consume(O),O===92?oe:se)}function oe(O){return O===92||O===124?(t.consume(O),se):se(O)}}function jE(t,l){let r=-1,i=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,m=0,p,x,y;const v=new kE;for(;++r<t.length;){const S=t[r],C=S[1];S[0]==="enter"?C.type==="tableHead"?(d=!1,m!==0&&(rp(v,l,m,p,x),x=void 0,m=0),p={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(r,0,[["enter",p,l]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,y=void 0,o=[0,0,0,0],c=[0,r+1,0,0],d&&(d=!1,x={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(r,0,[["enter",x,l]])),s=C.type==="tableDelimiterRow"?2:x?3:1):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=Wu(v,l,o,s,void 0,y),o=[0,0,0,0]),c[2]=r)):C.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(c[0]=c[1],y=Wu(v,l,o,s,void 0,y)),o=c,c=[o[1],r,0,0])):C.type==="tableHead"?(d=!0,m=r):C.type==="tableRow"||C.type==="tableDelimiterRow"?(m=r,o[1]!==0?(c[0]=c[1],y=Wu(v,l,o,s,r,y)):c[1]!==0&&(y=Wu(v,l,c,s,r,y)),s=0):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(c[3]=r)}for(m!==0&&rp(v,l,m,p,x),v.consume(l.events),r=-1;++r<l.events.length;){const S=l.events[r];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=EE(l.events,r))}return t}function Wu(t,l,r,i,s,o){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},ta(l.events,r[0])),t.add(r[0],0,[["exit",o,l]]));const m=ta(l.events,r[1]);if(o={type:c,start:Object.assign({},m),end:Object.assign({},m)},t.add(r[1],0,[["enter",o,l]]),r[2]!==0){const p=ta(l.events,r[2]),x=ta(l.events,r[3]),y={type:d,start:Object.assign({},p),end:Object.assign({},x)};if(t.add(r[2],0,[["enter",y,l]]),i!==2){const v=l.events[r[2]],S=l.events[r[3]];if(v[1].end=Object.assign({},S[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const C=r[2]+1,T=r[3]-r[2]-1;t.add(C,T,[])}}t.add(r[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},ta(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function rp(t,l,r,i,s){const o=[],c=ta(l.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,l])),i.end=Object.assign({},c),o.push(["exit",i,l]),t.add(r+1,0,o)}function ta(t,l){const r=t[l],i=r[0]==="enter"?"start":"end";return r[1][i]}const AE={name:"tasklistCheck",tokenize:TE};function zE(){return{text:{91:AE}}}function TE(t,l,r){const i=this;return s;function s(m){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),o)}function o(m){return Xe(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),c):r(m)}function c(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):r(m)}function d(m){return ge(m)?l(m):Te(m)?t.check({tokenize:_E},l,r)(m):r(m)}}function _E(t,l,r){return Oe(t,i,"whitespace");function i(s){return s===null?r(s):l(s)}}function RE(t){return T3([rE(),mE(),wE(t),ME(),zE()])}const DE={};function OE(t){const l=this,r=t||DE,i=l.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(RE(r)),o.push(eE()),c.push(tE(r))}function LE({text:t}){const[l,r]=E.useState(!1),i=E.useCallback(async()=>{try{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},[t]);return g.jsx("button",{type:"button",onClick:i,className:"absolute top-2 right-2 p-1 rounded-md bg-herd-hover hover:bg-herd-active text-herd-code-fg/60 hover:text-herd-code-fg transition-colors",title:"Copy code",children:l?g.jsx(r3,{className:"w-3.5 h-3.5"}):g.jsx(s3,{className:"w-3.5 h-3.5"})})}function UE({children:t,className:l}){const r=String(t).replace(/\n$/,"");return g.jsxs("div",{className:"relative my-3",children:[g.jsx("pre",{className:"bg-herd-code-bg text-herd-code-fg rounded-lg p-3 text-xs font-mono overflow-x-auto",children:g.jsx("code",{className:l,children:r})}),g.jsx(LE,{text:r})]})}function HE({children:t}){return g.jsx("code",{className:"bg-herd-hover px-1.5 py-0.5 rounded text-xs font-mono text-herd-fg",children:t})}function BE({content:t,useSerif:l=!1}){const r={code(i){const{className:s,children:o}=i;return(s==null?void 0:s.startsWith("language-"))?g.jsx(UE,{className:s,children:o}):g.jsx(HE,{children:o})},pre({children:i}){return g.jsx(g.Fragment,{children:i})},a({href:i,children:s}){return g.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-herd-primary hover:underline",children:s})},h1({children:i}){return g.jsx("h1",{className:"text-lg font-semibold text-herd-fg mt-4 mb-2",children:i})},h2({children:i}){return g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mt-3 mb-2",children:i})},h3({children:i}){return g.jsx("h3",{className:"text-sm font-medium text-herd-fg mt-3 mb-1",children:i})},h4({children:i}){return g.jsx("h4",{className:"text-sm font-medium text-herd-muted mt-2 mb-1",children:i})},p({children:i}){return g.jsx("p",{className:"text-sm text-herd-fg mb-2 last:mb-0",children:i})},ul({children:i}){return g.jsx("ul",{className:"list-disc list-inside text-sm text-herd-fg mb-2 ml-2",children:i})},ol({children:i}){return g.jsx("ol",{className:"list-decimal list-inside text-sm text-herd-fg mb-2 ml-2",children:i})},li({children:i}){return g.jsx("li",{className:"mb-0.5",children:i})},table({children:i}){return g.jsx("div",{className:"overflow-x-auto my-3",children:g.jsx("table",{className:"w-full text-sm",children:i})})},thead({children:i}){return g.jsx("thead",{children:i})},tbody({children:i}){return g.jsx("tbody",{className:"divide-y divide-herd-border",children:i})},tr({children:i}){return g.jsx("tr",{className:"border-b border-herd-border hover:bg-herd-hover transition-colors",children:i})},th({children:i}){return g.jsx("th",{className:"text-left py-2 px-3 text-xs text-herd-muted font-medium uppercase tracking-wide",children:i})},td({children:i}){return g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:i})},blockquote({children:i}){return g.jsx("blockquote",{className:"border-l-2 border-herd-primary pl-3 my-2 text-sm text-herd-muted italic",children:i})},hr(){return g.jsx("hr",{className:"border-herd-border my-4"})},strong({children:i}){return g.jsx("strong",{className:"font-semibold",children:i})},em({children:i}){return g.jsx("em",{className:"italic",children:i})}};return g.jsx("div",{className:l?"font-serif":"font-sans",children:g.jsx(wk,{remarkPlugins:[OE],components:r,children:t})})}function ZE(t){switch(t){case"interval":return"Interval";case"cron":return"Cron";case"webhook":return"Webhook";case"chat":return"Chat"}}function qE(t){return t.expression?t.expression:t.interval?t.interval:"-"}function ap(t){if(!t)return"-";const l=new Date(t),r=new Date;return l.toDateString()===r.toDateString()?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function $E({schedule:t,onTrigger:l,onEnable:r,onDisable:i}){const s=t.status==="disabled";return g.jsxs("tr",{className:"hover:bg-herd-hover transition-colors",children:[g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(t.agentName)}`,className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:t.agentName})}),g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:t.name}),g.jsx("td",{className:"py-2 px-3",children:g.jsx("span",{className:"inline-flex items-center bg-herd-hover rounded-lg px-2 py-0.5 text-[11px] font-medium text-herd-muted",children:ZE(t.type)})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs font-mono",children:qE(t)}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:t.status})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:ap(t.lastRunAt)}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:ap(t.nextRunAt)}),g.jsx("td",{className:"py-2 px-3",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsxs("button",{onClick:()=>l(t.agentName,t.name),className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors inline-flex items-center gap-1 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Now",children:[g.jsx(wi,{className:"w-3 h-3"}),"Trigger"]}),s?g.jsx("button",{onClick:()=>r(t.agentName,t.name),className:"hover:bg-herd-hover text-herd-muted hover:text-herd-status-running rounded-lg p-1.5 transition-colors",title:"Enable schedule",children:g.jsx(G8,{className:"w-3.5 h-3.5"})}):g.jsx("button",{onClick:()=>i(t.agentName,t.name),className:"hover:bg-herd-hover text-herd-muted hover:text-herd-status-error rounded-lg p-1.5 transition-colors",title:"Disable schedule",children:g.jsx(F8,{className:"w-3.5 h-3.5"})})]})})]})}function VE(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[g.jsx(a1,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No schedules configured"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Schedules will appear here once agents have interval, cron, or webhook triggers defined"})]})]})}function IE({message:t,onRetry:l}){return g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center justify-between",children:[g.jsx("span",{children:t}),g.jsx("button",{onClick:l,className:"hover:underline font-medium ml-4",children:"Retry"})]})}function JE(){const{schedules:t,schedulesLoading:l,schedulesError:r}=y6(),{fetchSchedules:i,triggerSchedule:s,enableSchedule:o,disableSchedule:c}=x6();E.useEffect(()=>{i().catch(()=>{})},[i]);const d=(x,y)=>{s(x,y).catch(()=>{})},m=(x,y)=>{o(x,y).catch(()=>{})},p=(x,y)=>{c(x,y).catch(()=>{})};return l&&t.length===0&&!r?g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"lg"}),g.jsx("p",{className:"text-sm text-herd-muted",children:"Loading schedules..."})]})}):g.jsxs(xt,{className:"p-4",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg",children:"All Schedules"}),l&&t.length>0&&g.jsx(nl,{size:"sm"})]}),r&&g.jsx(IE,{message:r,onRetry:i}),t.length===0&&!l?g.jsx(VE,{}):g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-[11px] text-herd-muted font-medium uppercase tracking-wide",children:[g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Schedule"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Type"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Expression"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Last Run"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Next Run"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Actions"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:t.map(x=>g.jsx($E,{schedule:x,onTrigger:d,onEnable:m,onDisable:p},`${x.agentName}:${x.name}`))})]})})]})}function FE(t){const l=new Date(t),i=new Date().getTime()-l.getTime(),s=Math.floor(i/6e4),o=Math.floor(i/36e5),c=Math.floor(i/864e5);return s<1?"just now":s<60?`${s}m ago`:o<24?`${o}h ago`:c<7?`${c}d ago`:l.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function YE(t){if(t<1e3)return`${t}ms`;const l=Math.floor(t/1e3);if(l<60)return`${l}s`;const r=Math.floor(l/60),i=l%60;return i>0?`${r}m ${i}s`:`${r}m`}const GE={Bash:"💻",bash:"💻",Read:"📄",Write:"✏️",Edit:"✏️",Glob:"🔍",Grep:"🔍",WebFetch:"🌐",WebSearch:"🌐"};function XE({message:t}){const[l,r]=E.useState(!1),i=t.toolCall,s=GE[i.toolName]??"🔧",o=200,c=i.output.length>o,d=l?i.output:i.output.substring(0,o)+(c?"...":"");return g.jsx("div",{className:"flex flex-col items-start animate-[fadeSlideIn_150ms_ease-out]",children:g.jsxs("div",{className:`max-w-[85%] px-3 py-2 rounded-lg border ${i.isError?"border-red-500/30 bg-red-500/5":"border-herd-border bg-herd-hover"}`,children:[g.jsxs("button",{type:"button",onClick:()=>r(!l),className:"flex items-center gap-1.5 w-full text-left",children:[g.jsx("span",{className:"text-xs",children:s}),g.jsx("span",{className:"text-xs font-medium text-herd-fg",children:i.toolName}),i.isError&&g.jsx("span",{className:"text-[10px] text-red-500 font-medium",children:"ERROR"}),i.durationMs!==void 0&&g.jsx("span",{className:"text-[10px] text-herd-muted ml-auto",children:YE(i.durationMs)}),g.jsx("span",{className:"text-[10px] text-herd-muted",children:l?"▲":"▼"})]}),i.inputSummary&&g.jsx("div",{className:"mt-1",children:g.jsx("code",{className:"text-[11px] text-herd-muted break-all",children:i.inputSummary})}),(l||!c)&&i.output.trim().length>0&&g.jsx("pre",{className:"mt-1.5 text-[11px] text-herd-fg/80 bg-herd-bg rounded px-2 py-1.5 overflow-x-auto max-h-60 overflow-y-auto whitespace-pre-wrap break-all",children:d}),!l&&c&&i.output.trim().length>0&&g.jsxs("div",{className:"mt-1.5 text-[11px] text-herd-muted",children:[(i.output.length/1e3).toFixed(1),"k chars"]})]})})}function ip({message:t,isStreaming:l=!1}){if(t.role==="tool"&&t.toolCall)return g.jsx(XE,{message:t});const r=t.role==="user";return g.jsxs("div",{className:`flex flex-col ${r?"items-end":"items-start"} animate-[fadeSlideIn_150ms_ease-out]`,children:[g.jsx("div",{className:`max-w-[85%] px-4 py-2.5 ${r?"bg-herd-user-bubble text-herd-fg rounded-2xl rounded-br-md":"bg-herd-card border border-herd-border text-herd-fg rounded-2xl rounded-bl-md"}`,children:r?g.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.content}):g.jsxs("div",{className:l?"relative":"",children:[g.jsx(BE,{content:t.content,useSerif:!0}),l&&g.jsxs("span",{className:"inline-flex ml-1",children:[g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse"}),g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse ml-0.5 [animation-delay:150ms]"}),g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse ml-0.5 [animation-delay:300ms]"})]})]})}),!l&&g.jsx("span",{className:"text-[11px] text-herd-muted mt-1 px-1",children:FE(t.timestamp)})]})}function QE({agentName:t}){const{chatMessages:l,chatMessagesLoading:r,chatStreaming:i,chatStreamingContent:s}=Pf(),o=E.useRef(null),c=E.useRef(l.length);if(E.useEffect(()=>{const m=o.current;if(!m)return;const p=m.scrollHeight-m.scrollTop-m.clientHeight<100;(l.length>c.current||i||p)&&(m.scrollTop=m.scrollHeight),c.current=l.length},[l,i,s]),r)return g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-herd-muted",children:[g.jsx("div",{className:"w-5 h-5 border-2 border-herd-muted border-t-transparent rounded-full animate-spin"}),g.jsx("span",{className:"text-xs",children:"Loading messages..."})]})});if(l.length===0&&!i)return g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-3 text-herd-muted",children:[g.jsx(u1,{className:"w-12 h-12 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Send a message to start the conversation"})]})});const d=i?{role:"assistant",content:s||"...",timestamp:new Date().toISOString()}:null;return g.jsx("div",{ref:o,className:"flex-1 overflow-y-auto px-4 py-4",children:g.jsxs("div",{className:"max-w-2xl mx-auto space-y-4",children:[l.map((m,p)=>g.jsx(ip,{message:m},`${m.timestamp}-${p}`)),d&&g.jsx(ip,{message:d,isStreaming:!0})]})})}function KE({agentName:t,sessionId:l}){const[r,i]=E.useState(""),s=E.useRef(null),{chatStreaming:o}=Pf(),{addUserMessage:c}=Wf();E.useEffect(()=>{const y=s.current;if(!y)return;y.style.height="auto";const v=Math.min(y.scrollHeight,200);y.style.height=`${v}px`},[r]);const d=r.trim().length>0&&!o,m=E.useCallback(()=>{if(!d)return;const y=r.trim();i(""),c(y);const v=window.__herdWsClient;v&&v.send({type:"chat:send",payload:{agentName:t,sessionId:l,message:y}})},[d,r,c,t,l]),p=E.useCallback(y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),m())},[m]),x=E.useCallback(y=>{i(y.target.value)},[]);return g.jsx("div",{className:"border-t border-herd-border bg-herd-card p-4",children:g.jsxs("div",{className:"max-w-2xl mx-auto",children:[g.jsxs("div",{className:"relative flex items-end gap-2",children:[g.jsx("textarea",{ref:s,value:r,onChange:x,onKeyDown:p,placeholder:`Send a message to ${t}...`,rows:1,className:"flex-1 bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2.5 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors resize-none",style:{minHeight:"42px",maxHeight:"200px"}}),g.jsx("button",{type:"button",onClick:m,disabled:!d,className:`flex-shrink-0 w-9 h-9 rounded-lg flex items-center justify-center transition-colors ${d?"bg-herd-primary hover:bg-herd-primary-hover text-white":"bg-herd-hover text-herd-muted cursor-not-allowed"}`,title:"Send message",children:g.jsx(n8,{className:"w-4 h-4"})})]}),g.jsx("p",{className:"text-[11px] text-herd-muted mt-2 text-center",children:"Press Enter to send, Shift+Enter for new line"})]})})}function up(){const{name:t,sessionId:l}=Jf(),r=If(),{activeChatSessionId:i,chatError:s}=Pf(),{chatSessions:o}=p6(),{fetchChatMessages:c,setActiveChatSession:d,clearChatState:m,createChatSession:p}=Wf();if(E.useEffect(()=>()=>{m()},[t,m]),E.useEffect(()=>{l&&t?c(t,l):d(null)},[l,t,c,d]),!t)return g.jsx("div",{className:"flex items-center justify-center h-full text-herd-muted",children:g.jsx("p",{className:"text-sm",children:"Agent not found"})});const x=async()=>{const y=await p(t);y&&r(`/agents/${encodeURIComponent(t)}/chat/${y}`)};return g.jsx("div",{className:"flex-1 flex flex-col min-w-0 h-full",children:l?g.jsxs(g.Fragment,{children:[s&&g.jsx("div",{className:"px-4 pt-4",children:g.jsx("div",{className:"max-w-2xl mx-auto",children:g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs",children:s})})}),g.jsx(QE,{agentName:t}),g.jsx(KE,{agentName:t,sessionId:l})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-4 text-center px-4",children:[g.jsx("div",{className:"w-16 h-16 rounded-full bg-herd-primary-muted flex items-center justify-center",children:g.jsx(u1,{className:"w-8 h-8 text-herd-primary"})}),g.jsxs("div",{children:[g.jsxs("h2",{className:"text-lg font-semibold text-herd-fg mb-1",children:["Chat with ",t]}),g.jsx("p",{className:"text-sm text-herd-muted max-w-sm",children:o.length>0?"Select a conversation from the sidebar or start a new one.":"Start a new conversation to chat with this agent."})]}),g.jsx("button",{type:"button",onClick:x,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:"New Chat"})]})})})}function PE(t){switch(t){case"success":return g.jsx(u3,{className:"w-4 h-4 text-herd-status-running flex-shrink-0"});case"error":return g.jsx(p8,{className:"w-4 h-4 text-herd-status-error flex-shrink-0"});case"info":return g.jsx(_8,{className:"w-4 h-4 text-herd-primary flex-shrink-0"})}}function WE(t){switch(t){case"success":return"bg-herd-status-running/10 border-herd-status-running/20";case"error":return"bg-herd-status-error/10 border-herd-status-error/20";case"info":return"bg-herd-primary-muted border-herd-primary/20"}}function eM({toast:t,onDismiss:l}){return g.jsxs("div",{className:`
|
|
364
|
+
`))}function m(S,C,T,z){const M=T.enter("tableCell"),U=T.enter("phrasing"),N=T.containerPhrasing(S,{...z,before:o,after:o});return U(),M(),N}function p(S,C){return ik(S,{align:C,alignDelimiters:i,padding:r,stringLength:s})}function x(S,C,T){const z=S.children;let M=-1;const U=[],N=C.enter("table");for(;++M<z.length;)U[M]=y(z[M],C,T);return N(),U}function y(S,C,T){const z=S.children;let M=-1;const U=[],N=C.enter("tableRow");for(;++M<z.length;)U[M]=m(z[M],S,C,T);return N(),U}function v(S,C,T){let z=V3.inlineCode(S,C,T);return T.stack.includes("tableCell")&&(z=z.replace(/\|/g,"\\$&")),z}}function Yk(){return{exit:{taskListCheckValueChecked:Ym,taskListCheckValueUnchecked:Ym,paragraph:Xk}}}function Gk(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qk}}}function Ym(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function Xk(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const s=l.children;let o=-1,c;for(;++o<s.length;){const d=s[o];if(d.type==="paragraph"){c=d;break}}c===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(t)}function Qk(t,l,r,i){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=r.createTracker(i);o&&d.move(c);let m=V3.listItem(t,l,r,{...i,...d.current()});return o&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(x){return x+c}}function Kk(){return[Aw(),Qw(),ek(),Zk(),Yk()]}function Pk(t){return{extensions:[zw(),Kw(t),tk(),Fk(t),Gk()]}}const Wk={tokenize:aC,partial:!0},I3={tokenize:iC,partial:!0},J3={tokenize:uC,partial:!0},F3={tokenize:sC,partial:!0},eC={tokenize:oC,partial:!0},Y3={name:"wwwAutolink",tokenize:lC,previous:X3},G3={name:"protocolAutolink",tokenize:rC,previous:Q3},rl={name:"emailAutolink",tokenize:nC,previous:K3},_n={};function tC(){return{text:_n}}let nr=48;for(;nr<123;)_n[nr]=rl,nr++,nr===58?nr=65:nr===91&&(nr=97);_n[43]=rl;_n[45]=rl;_n[46]=rl;_n[95]=rl;_n[72]=[rl,G3];_n[104]=[rl,G3];_n[87]=[rl,Y3];_n[119]=[rl,Y3];function nC(t,l,r){const i=this;let s,o;return c;function c(y){return!Uf(y)||!K3.call(i,i.previous)||w1(i.events)?r(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(y))}function d(y){return Uf(y)?(t.consume(y),d):y===64?(t.consume(y),m):r(y)}function m(y){return y===46?t.check(eC,x,p)(y):y===45||y===95||jt(y)?(o=!0,t.consume(y),m):x(y)}function p(y){return t.consume(y),s=!0,m}function x(y){return o&&s&&Rt(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):r(y)}}function lC(t,l,r){const i=this;return s;function s(c){return c!==87&&c!==119||!X3.call(i,i.previous)||w1(i.events)?r(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Wk,t.attempt(I3,t.attempt(J3,o),r),r)(c))}function o(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function rC(t,l,r){const i=this;let s="",o=!1;return c;function c(y){return(y===72||y===104)&&Q3.call(i,i.previous)&&!w1(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),d):r(y)}function d(y){if(Rt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),d;if(y===58){const v=s.toLowerCase();if(v==="http"||v==="https")return t.consume(y),m}return r(y)}function m(y){return y===47?(t.consume(y),o?p:(o=!0,m)):r(y)}function p(y){return y===null||os(y)||Xe(y)||ir(y)||vs(y)?r(y):t.attempt(I3,t.attempt(J3,x),r)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function aC(t,l,r){let i=0;return s;function s(c){return(c===87||c===119)&&i<3?(i++,t.consume(c),s):c===46&&i===3?(t.consume(c),o):r(c)}function o(c){return c===null?r(c):l(c)}}function iC(t,l,r){let i,s,o;return c;function c(p){return p===46||p===95?t.check(F3,m,d)(p):p===null||Xe(p)||ir(p)||p!==45&&vs(p)?m(p):(o=!0,t.consume(p),c)}function d(p){return p===95?i=!0:(s=i,i=void 0),t.consume(p),c}function m(p){return s||i||!o?r(p):l(p)}}function uC(t,l){let r=0,i=0;return s;function s(c){return c===40?(r++,t.consume(c),s):c===41&&i<r?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(F3,l,o)(c):c===null||Xe(c)||ir(c)?l(c):(t.consume(c),s)}function o(c){return c===41&&i++,t.consume(c),s}}function sC(t,l,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?(t.consume(d),i):d===38?(t.consume(d),o):d===93?(t.consume(d),s):d===60||d===null||Xe(d)||ir(d)?l(d):r(d)}function s(d){return d===null||d===40||d===91||Xe(d)||ir(d)?l(d):i(d)}function o(d){return Rt(d)?c(d):r(d)}function c(d){return d===59?(t.consume(d),i):Rt(d)?(t.consume(d),c):r(d)}}function oC(t,l,r){return i;function i(o){return t.consume(o),s}function s(o){return jt(o)?r(o):l(o)}}function X3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Xe(t)}function Q3(t){return!Rt(t)}function K3(t){return!(t===47||Uf(t))}function Uf(t){return t===43||t===45||t===46||t===95||jt(t)}function w1(t){let l=t.length,r=!1;for(;l--;){const i=t[l][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const cC={tokenize:xC,partial:!0};function fC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:pC,continuation:{tokenize:gC},exit:yC}},text:{91:{name:"gfmFootnoteCall",tokenize:mC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dC,resolveTo:hC}}}}function dC(t,l,r){const i=this;let s=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let c;for(;s--;){const m=i.events[s][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return d;function d(m){if(!c||!c._balanced)return r(m);const p=kn(i.sliceSerialize({start:c.end,end:i.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?r(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),l(m))}}function hC(t,l){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[t[r+1],t[r+2],["enter",i,l],t[r+3],t[r+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",c,l],["exit",c,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",i,l]];return t.splice(r,t.length-r+1,...d),t}function mC(t,l,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,c;return d;function d(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?r(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(y){if(o>999||y===93&&!c||y===null||y===91||Xe(y))return r(y);if(y===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return s.includes(kn(i.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):r(y)}return Xe(y)||(c=!0),o++,t.consume(y),y===92?x:p}function x(y){return y===91||y===92||y===93?(t.consume(y),o++,p):p(y)}}function pC(t,l,r){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,c=0,d;return m;function m(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):r(C)}function x(C){if(c>999||C===93&&!d||C===null||C===91||Xe(C))return r(C);if(C===93){t.exit("chunkString");const T=t.exit("gfmFootnoteDefinitionLabelString");return o=kn(i.sliceSerialize(T)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return Xe(C)||(d=!0),c++,t.consume(C),C===92?y:x}function y(C){return C===91||C===92||C===93?(t.consume(C),c++,x):x(C)}function v(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),s.includes(o)||s.push(o),Oe(t,S,"gfmFootnoteDefinitionWhitespace")):r(C)}function S(C){return l(C)}}function gC(t,l,r){return t.check(Ai,l,t.attempt(cC,l,r))}function yC(t){t.exit("gfmFootnoteDefinition")}function xC(t,l,r){const i=this;return Oe(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=i.events[i.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(o):r(o)}}function bC(t){let r=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:s};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(c,d){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},y={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},v=[["enter",x,d],["enter",c[p][1],d],["exit",c[p][1],d],["enter",y,d]],S=d.parser.constructs.insideSpan.null;S&&tn(v,v.length,0,Ss(S,c.slice(p+1,m),d)),tn(v,v.length,0,[["exit",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["exit",x,d]]),tn(c,p-1,m-p+3,v),m=p+v.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function o(c,d,m){const p=this.previous,x=this.events;let y=0;return v;function v(C){return p===126&&x[x.length-1][1].type!=="characterEscape"?m(C):(c.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const T=ia(p);if(C===126)return y>1?m(C):(c.consume(C),y++,S);if(y<2&&!r)return m(C);const z=c.exit("strikethroughSequenceTemporary"),M=ia(C);return z._open=!M||M===2&&!!T,z._close=!T||T===2&&!!M,d(C)}}}class vC{constructor(){this.map=[]}add(l,r,i){SC(this,l,r,i)}consume(l){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(l.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),l.length=this.map[r][0];i.push(l.slice()),l.length=0;let s=i.pop();for(;s;){for(const o of s)l.push(o);s=i.pop()}this.map.length=0}}function SC(t,l,r,i){let s=0;if(!(r===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=r,t.map[s][2].push(...i);return}s+=1}t.map.push([l,r,i])}}function wC(t,l){let r=!1;const i=[];for(;l<t.length;){const s=t[l];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);l+=1}return i}function kC(){return{flow:{null:{name:"table",tokenize:CC,resolveAll:EC}}}}function CC(t,l,r){const i=this;let s=0,o=0,c;return d;function d(O){let ae=i.events.length-1;for(;ae>-1;){const ue=i.events[ae][1].type;if(ue==="lineEnding"||ue==="linePrefix")ae--;else break}const te=ae>-1?i.events[ae][1].type:null,be=te==="tableHead"||te==="tableRow"?_:m;return be===_&&i.parser.lazy[i.now().line]?r(O):be(O)}function m(O){return t.enter("tableHead"),t.enter("tableRow"),p(O)}function p(O){return O===124||(c=!0,o+=1),x(O)}function x(O){return O===null?r(O):ge(O)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):r(O):Te(O)?Oe(t,x,"whitespace")(O):(o+=1,c&&(c=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),c=!0,x):(t.enter("data"),y(O)))}function y(O){return O===null||O===124||Xe(O)?(t.exit("data"),x(O)):(t.consume(O),O===92?v:y)}function v(O){return O===92||O===124?(t.consume(O),y):y(O)}function S(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(t.enter("tableDelimiterRow"),c=!1,Te(O)?Oe(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?z(O):O===124?(c=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),T):F(O)}function T(O){return Te(O)?Oe(t,z,"whitespace")(O):z(O)}function z(O){return O===58?(o+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),M):O===45?(o+=1,M(O)):O===null||ge(O)?V(O):F(O)}function M(O){return O===45?(t.enter("tableDelimiterFiller"),U(O)):F(O)}function U(O){return O===45?(t.consume(O),U):O===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),N):(t.exit("tableDelimiterFiller"),N(O))}function N(O){return Te(O)?Oe(t,V,"whitespace")(O):V(O)}function V(O){return O===124?C(O):O===null||ge(O)?!c||s!==o?F(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(O)):F(O)}function F(O){return r(O)}function _(O){return t.enter("tableRow"),I(O)}function I(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),I):O===null||ge(O)?(t.exit("tableRow"),l(O)):Te(O)?Oe(t,I,"whitespace")(O):(t.enter("data"),se(O))}function se(O){return O===null||O===124||Xe(O)?(t.exit("data"),I(O)):(t.consume(O),O===92?oe:se)}function oe(O){return O===92||O===124?(t.consume(O),se):se(O)}}function EC(t,l){let r=-1,i=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,m=0,p,x,y;const v=new vC;for(;++r<t.length;){const S=t[r],C=S[1];S[0]==="enter"?C.type==="tableHead"?(d=!1,m!==0&&(Gm(v,l,m,p,x),x=void 0,m=0),p={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(r,0,[["enter",p,l]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,y=void 0,o=[0,0,0,0],c=[0,r+1,0,0],d&&(d=!1,x={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},v.add(r,0,[["enter",x,l]])),s=C.type==="tableDelimiterRow"?2:x?3:1):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],y=Pu(v,l,o,s,void 0,y),o=[0,0,0,0]),c[2]=r)):C.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(c[0]=c[1],y=Pu(v,l,o,s,void 0,y)),o=c,c=[o[1],r,0,0])):C.type==="tableHead"?(d=!0,m=r):C.type==="tableRow"||C.type==="tableDelimiterRow"?(m=r,o[1]!==0?(c[0]=c[1],y=Pu(v,l,o,s,r,y)):c[1]!==0&&(y=Pu(v,l,c,s,r,y)),s=0):s&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(c[3]=r)}for(m!==0&&Gm(v,l,m,p,x),v.consume(l.events),r=-1;++r<l.events.length;){const S=l.events[r];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=wC(l.events,r))}return t}function Pu(t,l,r,i,s,o){const c=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(o.end=Object.assign({},ea(l.events,r[0])),t.add(r[0],0,[["exit",o,l]]));const m=ea(l.events,r[1]);if(o={type:c,start:Object.assign({},m),end:Object.assign({},m)},t.add(r[1],0,[["enter",o,l]]),r[2]!==0){const p=ea(l.events,r[2]),x=ea(l.events,r[3]),y={type:d,start:Object.assign({},p),end:Object.assign({},x)};if(t.add(r[2],0,[["enter",y,l]]),i!==2){const v=l.events[r[2]],S=l.events[r[3]];if(v[1].end=Object.assign({},S[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const C=r[2]+1,T=r[3]-r[2]-1;t.add(C,T,[])}}t.add(r[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},ea(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function Gm(t,l,r,i,s){const o=[],c=ea(l.events,r);s&&(s.end=Object.assign({},c),o.push(["exit",s,l])),i.end=Object.assign({},c),o.push(["exit",i,l]),t.add(r+1,0,o)}function ea(t,l){const r=t[l],i=r[0]==="enter"?"start":"end";return r[1][i]}const MC={name:"tasklistCheck",tokenize:jC};function NC(){return{text:{91:MC}}}function jC(t,l,r){const i=this;return s;function s(m){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),o)}function o(m){return Xe(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),c):r(m)}function c(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):r(m)}function d(m){return ge(m)?l(m):Te(m)?t.check({tokenize:AC},l,r)(m):r(m)}}function AC(t,l,r){return Oe(t,i,"whitespace");function i(s){return s===null?r(s):l(s)}}function zC(t){return s3([tC(),fC(),bC(t),kC(),NC()])}const TC={};function _C(t){const l=this,r=t||TC,i=l.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),c=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(zC(r)),o.push(Kk()),c.push(Pk(r))}function RC({text:t}){const[l,r]=E.useState(!1),i=E.useCallback(async()=>{try{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)}catch{}},[t]);return g.jsx("button",{type:"button",onClick:i,className:"absolute top-2 right-2 p-1 rounded-md bg-herd-hover hover:bg-herd-active text-herd-code-fg/60 hover:text-herd-code-fg transition-colors",title:"Copy code",children:l?g.jsx(Ap,{className:"w-3.5 h-3.5"}):g.jsx(Rp,{className:"w-3.5 h-3.5"})})}function DC({children:t,className:l}){const r=String(t).replace(/\n$/,"");return g.jsxs("div",{className:"relative my-3",children:[g.jsx("pre",{className:"bg-herd-code-bg text-herd-code-fg rounded-lg p-3 text-xs font-mono overflow-x-auto",children:g.jsx("code",{className:l,children:r})}),g.jsx(RC,{text:r})]})}function OC({children:t}){return g.jsx("code",{className:"bg-herd-hover px-1.5 py-0.5 rounded text-xs font-mono text-herd-fg",children:t})}function LC({content:t,useSerif:l=!1}){const r={code(i){const{className:s,children:o}=i;return(s==null?void 0:s.startsWith("language-"))?g.jsx(DC,{className:s,children:o}):g.jsx(OC,{children:o})},pre({children:i}){return g.jsx(g.Fragment,{children:i})},a({href:i,children:s}){return g.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-herd-primary hover:underline",children:s})},h1({children:i}){return g.jsx("h1",{className:"text-lg font-semibold text-herd-fg mt-4 mb-2",children:i})},h2({children:i}){return g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mt-3 mb-2",children:i})},h3({children:i}){return g.jsx("h3",{className:"text-sm font-medium text-herd-fg mt-3 mb-1",children:i})},h4({children:i}){return g.jsx("h4",{className:"text-sm font-medium text-herd-muted mt-2 mb-1",children:i})},p({children:i}){return g.jsx("p",{className:"text-sm text-herd-fg mb-2 last:mb-0",children:i})},ul({children:i}){return g.jsx("ul",{className:"list-disc list-inside text-sm text-herd-fg mb-2 ml-2",children:i})},ol({children:i}){return g.jsx("ol",{className:"list-decimal list-inside text-sm text-herd-fg mb-2 ml-2",children:i})},li({children:i}){return g.jsx("li",{className:"mb-0.5",children:i})},table({children:i}){return g.jsx("div",{className:"overflow-x-auto my-3",children:g.jsx("table",{className:"w-full text-sm",children:i})})},thead({children:i}){return g.jsx("thead",{children:i})},tbody({children:i}){return g.jsx("tbody",{className:"divide-y divide-herd-border",children:i})},tr({children:i}){return g.jsx("tr",{className:"border-b border-herd-border hover:bg-herd-hover transition-colors",children:i})},th({children:i}){return g.jsx("th",{className:"text-left py-2 px-3 text-xs text-herd-muted font-medium uppercase tracking-wide",children:i})},td({children:i}){return g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:i})},blockquote({children:i}){return g.jsx("blockquote",{className:"border-l-2 border-herd-primary pl-3 my-2 text-sm text-herd-muted italic",children:i})},hr(){return g.jsx("hr",{className:"border-herd-border my-4"})},strong({children:i}){return g.jsx("strong",{className:"font-semibold",children:i})},em({children:i}){return g.jsx("em",{className:"italic",children:i})}};return g.jsx("div",{className:l?"font-serif":"font-sans",children:g.jsx(bw,{remarkPlugins:[_C],components:r,children:t})})}function UC({agentName:t,sessionId:l}){const[r,i]=E.useState(""),s=E.useRef(null),{chatStreaming:o}=l1(),{addUserMessage:c}=r1();E.useEffect(()=>{const y=s.current;if(!y)return;y.style.height="auto";const v=Math.min(y.scrollHeight,200);y.style.height=`${v}px`},[]);const d=r.trim().length>0&&!o,m=E.useCallback(()=>{if(!d)return;const y=r.trim();i(""),c(y);const v=window.__herdWsClient;v&&v.send({type:"chat:send",payload:{agentName:t,sessionId:l,message:y}})},[d,r,c,t,l]),p=E.useCallback(y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),m())},[m]),x=E.useCallback(y=>{i(y.target.value)},[]);return g.jsx("div",{className:"border-t border-herd-border bg-herd-card p-4",children:g.jsxs("div",{className:"max-w-2xl mx-auto",children:[g.jsxs("div",{className:"relative flex items-end gap-2",children:[g.jsx("textarea",{ref:s,value:r,onChange:x,onKeyDown:p,placeholder:`Send a message to ${t}...`,rows:1,className:"flex-1 bg-herd-input-bg border border-herd-border rounded-lg px-3 py-2.5 text-sm text-herd-fg placeholder:text-herd-muted focus:outline-none focus:border-herd-primary/60 transition-colors resize-none",style:{minHeight:"42px",maxHeight:"200px"}}),g.jsx("button",{type:"button",onClick:m,disabled:!d,className:`flex-shrink-0 w-9 h-9 rounded-lg flex items-center justify-center transition-colors ${d?"bg-herd-primary hover:bg-herd-primary-hover text-white":"bg-herd-hover text-herd-muted cursor-not-allowed"}`,title:"Send message",children:g.jsx(Rx,{className:"w-4 h-4"})})]}),g.jsx("p",{className:"text-[11px] text-herd-muted mt-2 text-center",children:"Press Enter to send, Shift+Enter for new line"})]})})}function HC(t){const l=new Date(t),i=new Date().getTime()-l.getTime(),s=Math.floor(i/6e4),o=Math.floor(i/36e5),c=Math.floor(i/864e5);return s<1?"just now":s<60?`${s}m ago`:o<24?`${o}h ago`:c<7?`${c}d ago`:l.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function BC(t){if(t<1e3)return`${t}ms`;const l=Math.floor(t/1e3);if(l<60)return`${l}s`;const r=Math.floor(l/60),i=l%60;return i>0?`${r}m ${i}s`:`${r}m`}const ZC={Bash:"💻",bash:"💻",Read:"📄",Write:"✏️",Edit:"✏️",Glob:"🔍",Grep:"🔍",WebFetch:"🌐",WebSearch:"🌐"};function qC({message:t}){const[l,r]=E.useState(!1),i=t.toolCall,s=ZC[i.toolName]??"🔧",o=200,c=i.output.length>o,d=l?i.output:i.output.substring(0,o)+(c?"...":"");return g.jsx("div",{className:"flex flex-col items-start animate-[fadeSlideIn_150ms_ease-out]",children:g.jsxs("div",{className:`max-w-[85%] px-3 py-2 rounded-lg border ${i.isError?"border-red-500/30 bg-red-500/5":"border-herd-border bg-herd-hover"}`,children:[g.jsxs("button",{type:"button",onClick:()=>r(!l),className:"flex items-center gap-1.5 w-full text-left",children:[g.jsx("span",{className:"text-xs",children:s}),g.jsx("span",{className:"text-xs font-medium text-herd-fg",children:i.toolName}),i.isError&&g.jsx("span",{className:"text-[10px] text-red-500 font-medium",children:"ERROR"}),i.durationMs!==void 0&&g.jsx("span",{className:"text-[10px] text-herd-muted ml-auto",children:BC(i.durationMs)}),g.jsx("span",{className:"text-[10px] text-herd-muted",children:l?"▲":"▼"})]}),i.inputSummary&&g.jsx("div",{className:"mt-1",children:g.jsx("code",{className:"text-[11px] text-herd-muted break-all",children:i.inputSummary})}),(l||!c)&&i.output.trim().length>0&&g.jsx("pre",{className:"mt-1.5 text-[11px] text-herd-fg/80 bg-herd-bg rounded px-2 py-1.5 overflow-x-auto max-h-60 overflow-y-auto whitespace-pre-wrap break-all",children:d}),!l&&c&&i.output.trim().length>0&&g.jsxs("div",{className:"mt-1.5 text-[11px] text-herd-muted",children:[(i.output.length/1e3).toFixed(1),"k chars"]})]})})}function Xm({message:t,isStreaming:l=!1}){if(t.role==="tool"&&t.toolCall)return g.jsx(qC,{message:t});const r=t.role==="user";return g.jsxs("div",{className:`flex flex-col ${r?"items-end":"items-start"} animate-[fadeSlideIn_150ms_ease-out]`,children:[g.jsx("div",{className:`max-w-[85%] px-4 py-2.5 ${r?"bg-herd-user-bubble text-herd-fg rounded-2xl rounded-br-md":"bg-herd-card border border-herd-border text-herd-fg rounded-2xl rounded-bl-md"}`,children:r?g.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.content}):g.jsxs("div",{className:l?"relative":"",children:[g.jsx(LC,{content:t.content,useSerif:!0}),l&&g.jsxs("span",{className:"inline-flex ml-1",children:[g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse"}),g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse ml-0.5 [animation-delay:150ms]"}),g.jsx("span",{className:"w-1 h-1 bg-herd-muted rounded-full animate-pulse ml-0.5 [animation-delay:300ms]"})]})]})}),!l&&g.jsx("span",{className:"text-[11px] text-herd-muted mt-1 px-1",children:HC(t.timestamp)})]})}function $C(t){const{chatMessages:l,chatMessagesLoading:r,chatStreaming:i,chatStreamingContent:s}=l1(),o=E.useRef(null),c=E.useRef(l.length);if(E.useEffect(()=>{const m=o.current;if(!m)return;const p=m.scrollHeight-m.scrollTop-m.clientHeight<100;(l.length>c.current||i||p)&&(m.scrollTop=m.scrollHeight),c.current=l.length},[l,i]),r)return g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-herd-muted",children:[g.jsx("div",{className:"w-5 h-5 border-2 border-herd-muted border-t-transparent rounded-full animate-spin"}),g.jsx("span",{className:"text-xs",children:"Loading messages..."})]})});if(l.length===0&&!i)return g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-3 text-herd-muted",children:[g.jsx(Wf,{className:"w-12 h-12 opacity-50"}),g.jsx("p",{className:"text-sm",children:"Send a message to start the conversation"})]})});const d=i?{role:"assistant",content:s||"...",timestamp:new Date().toISOString()}:null;return g.jsx("div",{ref:o,className:"flex-1 overflow-y-auto px-4 py-4",children:g.jsxs("div",{className:"max-w-2xl mx-auto space-y-4",children:[l.map((m,p)=>g.jsx(Xm,{message:m},`${m.timestamp}-${p}`)),d&&g.jsx(Xm,{message:d,isStreaming:!0})]})})}function Qm(){const{name:t,sessionId:l}=Jf(),r=If(),{chatError:i}=l1(),{chatSessions:s}=I8(),{fetchChatMessages:o,setActiveChatSession:c,clearActiveChatState:d,createChatSession:m}=r1();if(E.useEffect(()=>()=>{d()},[t,d]),E.useEffect(()=>{l&&t?o(t,l):c(null)},[l,t,o,c]),!t)return g.jsx("div",{className:"flex items-center justify-center h-full text-herd-muted",children:g.jsx("p",{className:"text-sm",children:"Agent not found"})});const p=async()=>{const x=await m(t);x&&r(`/agents/${encodeURIComponent(t)}/chat/${x}`)};return g.jsx("div",{className:"flex-1 flex flex-col min-w-0 h-full",children:l?g.jsxs(g.Fragment,{children:[i&&g.jsx("div",{className:"px-4 pt-4",children:g.jsx("div",{className:"max-w-2xl mx-auto",children:g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs",children:i})})}),g.jsx($C,{agentName:t}),g.jsx(UC,{agentName:t,sessionId:l})]}):g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsxs("div",{className:"flex flex-col items-center gap-4 text-center px-4",children:[g.jsx("div",{className:"w-16 h-16 rounded-full bg-herd-primary-muted flex items-center justify-center",children:g.jsx(Wf,{className:"w-8 h-8 text-herd-primary"})}),g.jsxs("div",{children:[g.jsxs("h2",{className:"text-lg font-semibold text-herd-fg mb-1",children:["Chat with ",t]}),g.jsx("p",{className:"text-sm text-herd-muted max-w-sm",children:s.length>0?"Select a conversation from the sidebar or start a new one.":"Start a new conversation to chat with this agent."})]}),g.jsx("button",{type:"button",onClick:p,className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-4 py-2 text-sm font-medium transition-colors",children:"New Chat"})]})})})}function VC(t){const l=new Date(t),i=new Date().getTime()-l.getTime(),s=Math.floor(i/6e4),o=Math.floor(i/36e5),c=Math.floor(i/864e5);return s<1?"just now":s<60?`${s}m`:o<24?`${o}h`:c<7?`${c}d`:l.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function P3(){const[t,l]=E.useState(!0),[r,i]=E.useState(null),[s,o]=E.useState(0),c=Ne(p=>p.setFleetStatus),d=Ne(p=>p.setAgents);return E.useEffect(()=>{let p=!1;async function x(){l(!0),i(null);try{const[y,v]=await Promise.all([Lp(),Up()]);if(p)return;c(y),d(v),l(!1)}catch(y){if(p)return;const v=y instanceof Error?y.message:"Failed to fetch fleet data";i(v),l(!1)}}return x(),()=>{p=!0}},[d,c]),{loading:t,error:r,retry:()=>{o(p=>p+1)}}}function IC({className:t}){return g.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:g.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.947 2.418-2.157 2.418z"})})}function JC({className:t}){return g.jsx("svg",{className:t,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:g.jsx("path",{d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.27 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.163 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.163 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.163 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.27a2.527 2.527 0 0 1-2.52-2.523 2.527 2.527 0 0 1 2.52-2.52h6.315A2.528 2.528 0 0 1 24 15.163a2.528 2.528 0 0 1-2.522 2.523h-6.315z"})})}function Km(t,l){return t.length<=l?t:`${t.slice(0,l-1)}…`}function FC(t){if(t.schedules.length===0)return null;const l=t.schedules.filter(m=>m.nextRunAt).map(m=>new Date(m.nextRunAt).getTime());if(l.length===0)return null;const r=Math.min(...l),i=Date.now(),s=r-i;if(s<0)return"Due";const o=Math.floor(s/6e4);if(o<1)return"< 1m";if(o<60)return`${o}m`;const c=Math.floor(o/60);return c<24?`${c}h`:`${Math.floor(c/24)}d`}function YC(t){return t.chat?Object.keys(t.chat):[]}function GC(t){switch(t){case"discord":return{label:"Discord",icon:g.jsx(IC,{className:"w-3 h-3"}),bgClass:"bg-herd-discord/10",textClass:"text-herd-discord"};case"slack":return{label:"Slack",icon:g.jsx(JC,{className:"w-3 h-3"}),bgClass:"bg-herd-slack/10",textClass:"text-herd-slack"};default:return{label:t.charAt(0).toUpperCase()+t.slice(1),icon:null,bgClass:"bg-herd-hover",textClass:"text-herd-muted"}}}function XC({agent:t}){const l=YC(t),r=t.status==="idle"?FC(t):null;return g.jsxs(xt,{as:"article",className:"p-4 flex flex-col gap-3 transition-colors duration-150",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsxs("div",{className:"min-w-0 flex-1",children:[t.fleetPath.length>0&&g.jsx("p",{className:"text-[10px] text-herd-muted font-medium uppercase tracking-wide mb-0.5",children:t.fleetPath.join(" / ")}),g.jsx("h3",{className:"text-sm font-medium text-herd-fg truncate",children:t.name}),t.description&&g.jsx("p",{className:"text-xs text-herd-muted mt-0.5 line-clamp-2",children:Km(t.description,80)})]}),g.jsx(sr,{status:t.status,size:"sm"})]}),g.jsxs("div",{className:"min-h-[32px]",children:[t.status==="running"&&t.currentJobId&&g.jsx("div",{className:"bg-herd-hover rounded-lg px-2 py-1.5",children:g.jsx("p",{className:"text-xs text-herd-muted font-mono truncate",children:"Job active"})}),t.status==="idle"&&g.jsx("div",{className:"text-xs text-herd-muted",children:r?g.jsx("span",{children:r==="Due"?"Next run due":`Next run in ${r}`}):g.jsx("span",{children:"No scheduled runs"})}),t.status==="error"&&t.errorMessage&&g.jsx("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-2 py-1.5",children:g.jsx("p",{className:"text-xs truncate",children:Km(t.errorMessage,60)})})]}),l.length>0&&g.jsx("div",{className:"flex gap-1.5 flex-wrap",children:l.map(i=>{const s=GC(i);return g.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] font-medium ${s.textClass} ${s.bgClass} px-2 py-0.5 rounded`,children:[s.icon,s.label]},i)})}),g.jsxs("div",{className:"flex gap-2 pt-1 border-t border-herd-border mt-auto",children:[g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}`,className:"flex items-center gap-1.5 border border-herd-border hover:bg-herd-hover text-herd-fg rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[g.jsx(e6,{className:"w-3.5 h-3.5"}),"View"]}),g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}/chat`,className:"flex items-center gap-1.5 bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",children:[g.jsx(bi,{className:"w-3.5 h-3.5"}),"Chat"]})]})]})}function QC(t,l){return t.length<=l?t:`${t.slice(0,l-1)}…`}function KC(t){const l=new Date(t).getTime(),i=Date.now()-l;if(i<0)return"Just now";const s=Math.floor(i/1e3);if(s<60)return"Just now";const o=Math.floor(s/60);if(o<60)return`${o}m ago`;const c=Math.floor(o/60);if(c<24)return`${c}h ago`;const d=Math.floor(c/24);return d<7?`${d}d ago`:`${Math.floor(d/7)}w ago`}function PC({jobs:t,pageSize:l=10}){const[r,i]=E.useState(0),s=Math.ceil(t.length/l),o=r*l,c=t.slice(o,o+l);return g.jsxs("div",{children:[g.jsx("div",{className:"flex items-center justify-between mb-3",children:g.jsxs("h2",{className:"text-sm font-semibold text-herd-fg",children:["Recent Jobs",g.jsxs("span",{className:"text-herd-muted font-normal ml-1.5",children:["(",t.length,")"]})]})}),c.length===0?g.jsx("p",{className:"text-xs text-herd-muted py-4",children:"No recent jobs"}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-xs text-herd-muted font-medium uppercase tracking-wide",children:[g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Prompt"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Time"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:c.map(d=>g.jsxs("tr",{className:"hover:bg-herd-hover transition-colors",children:[g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(d.agentName)}`,className:"hover:text-herd-primary transition-colors",children:d.agentName})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted font-mono text-xs max-w-[200px]",children:g.jsx("span",{className:"block truncate",children:QC(d.prompt,50)})}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:d.status,size:"sm"})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs whitespace-nowrap",children:KC(d.createdAt)})]},d.jobId))})]})}),s>1&&g.jsxs("div",{className:"flex items-center justify-between pt-3 mt-3 border-t border-herd-border",children:[g.jsxs("span",{className:"text-[11px] text-herd-muted",children:[o+1,"–",Math.min(o+l,t.length)," of ",t.length]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{type:"button",onClick:()=>i(d=>Math.max(0,d-1)),disabled:r===0,className:"p-1 rounded hover:bg-herd-hover text-herd-muted hover:text-herd-fg transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Previous page",children:g.jsx(zp,{className:"w-4 h-4"})}),g.jsxs("span",{className:"text-[11px] text-herd-muted px-1",children:[r+1," / ",s]}),g.jsx("button",{type:"button",onClick:()=>i(d=>Math.min(s-1,d+1)),disabled:r>=s-1,className:"p-1 rounded hover:bg-herd-hover text-herd-muted hover:text-herd-fg transition-colors disabled:opacity-30 disabled:cursor-not-allowed",title:"Next page",children:g.jsx(Pf,{className:"w-4 h-4"})})]})]})]})]})}function WC(t){if(t===null||t<0)return"--";const l=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),s=Math.floor(t%60);return l>0?`${l}d ${r}h ${i}m`:r>0?`${r}h ${i}m ${s}s`:i>0?`${i}m ${s}s`:`${s}s`}function yf({label:t,value:l,variant:r="default"}){const i={default:"text-herd-fg",success:"text-herd-status-running",muted:"text-herd-muted"};return g.jsxs("div",{className:"bg-herd-hover rounded-lg px-3 py-1.5 flex items-center gap-1.5",children:[g.jsx("span",{className:`text-sm font-medium ${i[r]}`,children:l}),g.jsx("span",{className:"text-xs text-herd-muted",children:t})]})}function eE(){return g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(t=>g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-herd-hover opacity-50 animate-pulse"}),g.jsx("div",{className:"h-4 w-24 bg-herd-hover opacity-50 animate-pulse rounded"})]}),g.jsx("div",{className:"h-3 w-32 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-20 bg-herd-hover opacity-50 animate-pulse rounded"})]})},t))})}function tE(){return g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"h-5 w-36 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-24 bg-herd-hover opacity-50 animate-pulse rounded"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"h-8 w-20 bg-herd-hover opacity-50 animate-pulse rounded-lg"}),g.jsx("div",{className:"h-8 w-20 bg-herd-hover opacity-50 animate-pulse rounded-lg"})]})]})})}function nE(){return g.jsxs(xt,{className:"p-4",children:[g.jsx("div",{className:"h-4 w-24 bg-herd-hover opacity-50 animate-pulse rounded mb-4"}),g.jsx("div",{className:"space-y-3",children:[1,2,3].map(t=>g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("div",{className:"h-3 w-20 bg-herd-hover opacity-50 animate-pulse rounded"}),g.jsx("div",{className:"h-3 w-40 bg-herd-hover opacity-50 animate-pulse rounded flex-1"}),g.jsx("div",{className:"h-3 w-16 bg-herd-hover opacity-50 animate-pulse rounded"})]},t))})]})}function lE(){return g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-6 text-center",children:[g.jsx(T6,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No agents configured"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Add agents to your herdctl.yaml to get started"})]})]})})}function rE(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8 text-center",children:[g.jsx(ys,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No jobs yet"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Jobs will appear here when agents run"})]})]})}const aE=24;function iE(){const{fleetStatus:t,agents:l,recentJobs:r,lastUpdated:i}=bs(),{setRecentJobs:s}=Z8(),{loading:o}=P3();E.useEffect(()=>{Hp({limit:100}).then(x=>{s(x.jobs)}).catch(()=>{})},[s]);const c=Date.now()-aE*60*60*1e3,d=r.filter(x=>new Date(x.createdAt).getTime()>=c),m=(t==null?void 0:t.counts)??{totalAgents:0,runningJobs:0},p=r.filter(x=>x.status==="completed").length;return o&&!t?g.jsxs("div",{className:"p-4 space-y-6 overflow-auto h-full",children:[g.jsx(tE,{}),g.jsxs("section",{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Agents"}),g.jsx(eE,{})]}),g.jsx("section",{children:g.jsx(nE,{})})]}):g.jsxs("div",{className:"p-4 space-y-6 overflow-auto h-full",children:[g.jsx(xt,{className:"p-4",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:"Fleet Overview"}),g.jsx(Q6,{timestamp:i,prefix:"Updated"})]}),t&&g.jsxs("p",{className:"text-xs text-herd-muted mt-0.5",children:["Uptime: ",WC(t.uptimeSeconds)]})]}),t&&g.jsx(sr,{status:t.state==="running"?"running":t.state==="error"?"error":"idle",size:"md"})]}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx(yf,{label:"agents",value:m.totalAgents,variant:"default"}),g.jsx(yf,{label:"running",value:m.runningJobs,variant:m.runningJobs>0?"success":"muted"}),g.jsx(yf,{label:"completed",value:p,variant:"muted"})]})]})}),g.jsxs("section",{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Agents"}),l.length===0?g.jsx(lE,{}):g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:l.map(x=>g.jsx(XC,{agent:x},x.qualifiedName))})]}),g.jsx("section",{children:g.jsx(xt,{className:"p-4",children:d.length===0?g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg mb-3",children:"Recent Jobs"}),g.jsx(rE,{})]}):g.jsx(PC,{jobs:d,pageSize:10})})})]})}const Es=E.createContext(null);Es.displayName="PanelGroupContext";const rt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},k1=10,ar=E.useLayoutEffect,Pm=$5.useId,uE=typeof Pm=="function"?Pm:()=>null;let sE=0;function C1(t=null){const l=uE(),r=E.useRef(t||l||null);return r.current===null&&(r.current=""+sE++),t??r.current}function W3({children:t,className:l="",collapsedSize:r,collapsible:i,defaultSize:s,forwardedRef:o,id:c,maxSize:d,minSize:m,onCollapse:p,onExpand:x,onResize:y,order:v,style:S,tagName:C="div",...T}){const z=E.useContext(Es);if(z===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:M,expandPanel:U,getPanelSize:N,getPanelStyle:V,groupId:F,isPanelCollapsed:_,reevaluatePanelConstraints:I,registerPanel:se,resizePanel:oe,unregisterPanel:O}=z,ae=C1(c),te=E.useRef({callbacks:{onCollapse:p,onExpand:x,onResize:y},constraints:{collapsedSize:r,collapsible:i,defaultSize:s,maxSize:d,minSize:m},id:ae,idIsFromProps:c!==void 0,order:v});E.useRef({didLogMissingDefaultSizeWarning:!1}),ar(()=>{const{callbacks:ue,constraints:P}=te.current,H={...P};te.current.id=ae,te.current.idIsFromProps=c!==void 0,te.current.order=v,ue.onCollapse=p,ue.onExpand=x,ue.onResize=y,P.collapsedSize=r,P.collapsible=i,P.defaultSize=s,P.maxSize=d,P.minSize=m,(H.collapsedSize!==P.collapsedSize||H.collapsible!==P.collapsible||H.maxSize!==P.maxSize||H.minSize!==P.minSize)&&I(te.current,H)}),ar(()=>{const ue=te.current;return se(ue),()=>{O(ue)}},[v,ae,se,O]),E.useImperativeHandle(o,()=>({collapse:()=>{M(te.current)},expand:ue=>{U(te.current,ue)},getId(){return ae},getSize(){return N(te.current)},isCollapsed(){return _(te.current)},isExpanded(){return!_(te.current)},resize:ue=>{oe(te.current,ue)}}),[M,U,N,_,ae,oe]);const be=V(te.current,s);return E.createElement(C,{...T,children:t,className:l,id:ae,style:{...be,...S},[rt.groupId]:F,[rt.panel]:"",[rt.panelCollapsible]:i||void 0,[rt.panelId]:ae,[rt.panelSize]:parseFloat(""+be.flexGrow).toFixed(1)})}const ls=E.forwardRef((t,l)=>E.createElement(W3,{...t,forwardedRef:l}));W3.displayName="Panel";ls.displayName="forwardRef(Panel)";let Hf=null,rs=-1,Ol=null;function oE(t,l){if(l){const r=(l&r4)!==0,i=(l&a4)!==0,s=(l&i4)!==0,o=(l&u4)!==0;if(r)return s?"se-resize":o?"ne-resize":"e-resize";if(i)return s?"sw-resize":o?"nw-resize":"w-resize";if(s)return"s-resize";if(o)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function cE(){Ol!==null&&(document.head.removeChild(Ol),Hf=null,Ol=null,rs=-1)}function xf(t,l){var r,i;const s=oE(t,l);if(Hf!==s){if(Hf=s,Ol===null&&(Ol=document.createElement("style"),document.head.appendChild(Ol)),rs>=0){var o;(o=Ol.sheet)===null||o===void 0||o.removeRule(rs)}rs=(r=(i=Ol.sheet)===null||i===void 0?void 0:i.insertRule(`*{cursor: ${s} !important;}`))!==null&&r!==void 0?r:-1}}function e4(t){return t.type==="keydown"}function t4(t){return t.type.startsWith("pointer")}function n4(t){return t.type.startsWith("mouse")}function Ms(t){if(t4(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(n4(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function fE(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function dE(t,l,r){return t.x<l.x+l.width&&t.x+t.width>l.x&&t.y<l.y+l.height&&t.y+t.height>l.y}function hE(t,l){if(t===l)throw new Error("Cannot compare node with itself");const r={a:tp(t),b:tp(l)};let i;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),l=r.b.pop(),i=t;Me(i,"Stacking order can only be calculated for elements with a common ancestor");const s={a:ep(Wm(r.a)),b:ep(Wm(r.b))};if(s.a===s.b){const o=i.childNodes,c={a:r.a.at(-1),b:r.b.at(-1)};let d=o.length;for(;d--;){const m=o[d];if(m===c.a)return 1;if(m===c.b)return-1}}return Math.sign(s.a-s.b)}const mE=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function pE(t){var l;const r=getComputedStyle((l=l4(t))!==null&&l!==void 0?l:t).display;return r==="flex"||r==="inline-flex"}function gE(t){const l=getComputedStyle(t);return!!(l.position==="fixed"||l.zIndex!=="auto"&&(l.position!=="static"||pE(t))||+l.opacity<1||"transform"in l&&l.transform!=="none"||"webkitTransform"in l&&l.webkitTransform!=="none"||"mixBlendMode"in l&&l.mixBlendMode!=="normal"||"filter"in l&&l.filter!=="none"||"webkitFilter"in l&&l.webkitFilter!=="none"||"isolation"in l&&l.isolation==="isolate"||mE.test(l.willChange)||l.webkitOverflowScrolling==="touch")}function Wm(t){let l=t.length;for(;l--;){const r=t[l];if(Me(r,"Missing node"),gE(r))return r}return null}function ep(t){return t&&Number(getComputedStyle(t).zIndex)||0}function tp(t){const l=[];for(;t;)l.push(t),t=l4(t);return l}function l4(t){const{parentNode:l}=t;return l&&l instanceof ShadowRoot?l.host:l}const r4=1,a4=2,i4=4,u4=8,yE=fE()==="coarse";let Cn=[],aa=!1,rr=new Map,Ns=new Map;const ki=new Set;function xE(t,l,r,i,s){var o;const{ownerDocument:c}=l,d={direction:r,element:l,hitAreaMargins:i,setResizeHandlerState:s},m=(o=rr.get(c))!==null&&o!==void 0?o:0;return rr.set(c,m+1),ki.add(d),hs(),function(){var x;Ns.delete(t),ki.delete(d);const y=(x=rr.get(c))!==null&&x!==void 0?x:1;if(rr.set(c,y-1),hs(),y===1&&rr.delete(c),Cn.includes(d)){const v=Cn.indexOf(d);v>=0&&Cn.splice(v,1),M1(),s("up",!0,null)}}}function bE(t){const{target:l}=t,{x:r,y:i}=Ms(t);aa=!0,E1({target:l,x:r,y:i}),hs(),Cn.length>0&&(ms("down",t),t.preventDefault(),s4(l)||t.stopImmediatePropagation())}function bf(t){const{x:l,y:r}=Ms(t);if(aa&&t.buttons===0&&(aa=!1,ms("up",t)),!aa){const{target:i}=t;E1({target:i,x:l,y:r})}ms("move",t),M1(),Cn.length>0&&t.preventDefault()}function vf(t){const{target:l}=t,{x:r,y:i}=Ms(t);Ns.clear(),aa=!1,Cn.length>0&&(t.preventDefault(),s4(l)||t.stopImmediatePropagation()),ms("up",t),E1({target:l,x:r,y:i}),M1(),hs()}function s4(t){let l=t;for(;l;){if(l.hasAttribute(rt.resizeHandle))return!0;l=l.parentElement}return!1}function E1({target:t,x:l,y:r}){Cn.splice(0);let i=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(i=t),ki.forEach(s=>{const{element:o,hitAreaMargins:c}=s,d=o.getBoundingClientRect(),{bottom:m,left:p,right:x,top:y}=d,v=yE?c.coarse:c.fine;if(l>=p-v&&l<=x+v&&r>=y-v&&r<=m+v){if(i!==null&&document.contains(i)&&o!==i&&!o.contains(i)&&!i.contains(o)&&hE(i,o)>0){let C=i,T=!1;for(;C&&!C.contains(o);){if(dE(C.getBoundingClientRect(),d)){T=!0;break}C=C.parentElement}if(T)return}Cn.push(s)}})}function Sf(t,l){Ns.set(t,l)}function M1(){let t=!1,l=!1;Cn.forEach(i=>{const{direction:s}=i;s==="horizontal"?t=!0:l=!0});let r=0;Ns.forEach(i=>{r|=i}),t&&l?xf("intersection",r):t?xf("horizontal",r):l?xf("vertical",r):cE()}let wf=new AbortController;function hs(){wf.abort(),wf=new AbortController;const t={capture:!0,signal:wf.signal};ki.size&&(aa?(Cn.length>0&&rr.forEach((l,r)=>{const{body:i}=r;l>0&&(i.addEventListener("contextmenu",vf,t),i.addEventListener("pointerleave",bf,t),i.addEventListener("pointermove",bf,t))}),window.addEventListener("pointerup",vf,t),window.addEventListener("pointercancel",vf,t)):rr.forEach((l,r)=>{const{body:i}=r;l>0&&(i.addEventListener("pointerdown",bE,t),i.addEventListener("pointermove",bf,t))}))}function ms(t,l){ki.forEach(r=>{const{setResizeHandlerState:i}=r,s=Cn.includes(r);i(t,s,l)})}function vE(){const[t,l]=E.useState(0);return E.useCallback(()=>l(r=>r+1),[])}function Me(t,l){if(!t)throw console.error(l),Error(l)}function ur(t,l,r=k1){return t.toFixed(r)===l.toFixed(r)?0:t>l?1:-1}function Wn(t,l,r=k1){return ur(t,l,r)===0}function en(t,l,r){return ur(t,l,r)===0}function SE(t,l,r){if(t.length!==l.length)return!1;for(let i=0;i<t.length;i++){const s=t[i],o=l[i];if(!en(s,o,r))return!1}return!0}function la({panelConstraints:t,panelIndex:l,size:r}){const i=t[l];Me(i!=null,`Panel constraints not found for index ${l}`);let{collapsedSize:s=0,collapsible:o,maxSize:c=100,minSize:d=0}=i;if(ur(r,d)<0)if(o){const m=(s+d)/2;ur(r,m)<0?r=s:r=d}else r=d;return r=Math.min(c,r),r=parseFloat(r.toFixed(k1)),r}function hi({delta:t,initialLayout:l,panelConstraints:r,pivotIndices:i,prevLayout:s,trigger:o}){if(en(t,0))return l;const c=[...l],[d,m]=i;Me(d!=null,"Invalid first pivot index"),Me(m!=null,"Invalid second pivot index");let p=0;if(o==="keyboard"){{const y=t<0?m:d,v=r[y];Me(v,`Panel constraints not found for index ${y}`);const{collapsedSize:S=0,collapsible:C,minSize:T=0}=v;if(C){const z=l[y];if(Me(z!=null,`Previous layout not found for panel index ${y}`),en(z,S)){const M=T-z;ur(M,Math.abs(t))>0&&(t=t<0?0-M:M)}}}{const y=t<0?d:m,v=r[y];Me(v,`No panel constraints found for index ${y}`);const{collapsedSize:S=0,collapsible:C,minSize:T=0}=v;if(C){const z=l[y];if(Me(z!=null,`Previous layout not found for panel index ${y}`),en(z,T)){const M=z-S;ur(M,Math.abs(t))>0&&(t=t<0?0-M:M)}}}}{const y=t<0?1:-1;let v=t<0?m:d,S=0;for(;;){const T=l[v];Me(T!=null,`Previous layout not found for panel index ${v}`);const M=la({panelConstraints:r,panelIndex:v,size:100})-T;if(S+=M,v+=y,v<0||v>=r.length)break}const C=Math.min(Math.abs(t),Math.abs(S));t=t<0?0-C:C}{let v=t<0?d:m;for(;v>=0&&v<r.length;){const S=Math.abs(t)-Math.abs(p),C=l[v];Me(C!=null,`Previous layout not found for panel index ${v}`);const T=C-S,z=la({panelConstraints:r,panelIndex:v,size:T});if(!en(C,z)&&(p+=C-z,c[v]=z,p.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(SE(s,c))return s;{const y=t<0?m:d,v=l[y];Me(v!=null,`Previous layout not found for panel index ${y}`);const S=v+p,C=la({panelConstraints:r,panelIndex:y,size:S});if(c[y]=C,!en(C,S)){let T=S-C,M=t<0?m:d;for(;M>=0&&M<r.length;){const U=c[M];Me(U!=null,`Previous layout not found for panel index ${M}`);const N=U+T,V=la({panelConstraints:r,panelIndex:M,size:N});if(en(U,V)||(T-=V-U,c[M]=V),en(T,0))break;t>0?M--:M++}}}const x=c.reduce((y,v)=>v+y,0);return en(x,100)?c:s}function wE({layout:t,panelsArray:l,pivotIndices:r}){let i=0,s=100,o=0,c=0;const d=r[0];Me(d!=null,"No pivot index found"),l.forEach((y,v)=>{const{constraints:S}=y,{maxSize:C=100,minSize:T=0}=S;v===d?(i=T,s=C):(o+=T,c+=C)});const m=Math.min(s,100-o),p=Math.max(i,100-c),x=t[d];return{valueMax:m,valueMin:p,valueNow:x}}function Ci(t,l=document){return Array.from(l.querySelectorAll(`[${rt.resizeHandleId}][data-panel-group-id="${t}"]`))}function o4(t,l,r=document){const s=Ci(t,r).findIndex(o=>o.getAttribute(rt.resizeHandleId)===l);return s??null}function c4(t,l,r){const i=o4(t,l,r);return i!=null?[i,i+1]:[-1,-1]}function f4(t,l=document){var r;if(l instanceof HTMLElement&&(l==null||(r=l.dataset)===null||r===void 0?void 0:r.panelGroupId)==t)return l;const i=l.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return i||null}function js(t,l=document){const r=l.querySelector(`[${rt.resizeHandleId}="${t}"]`);return r||null}function kE(t,l,r,i=document){var s,o,c,d;const m=js(l,i),p=Ci(t,i),x=m?p.indexOf(m):-1,y=(s=(o=r[x])===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:null,v=(c=(d=r[x+1])===null||d===void 0?void 0:d.id)!==null&&c!==void 0?c:null;return[y,v]}function CE({committedValuesRef:t,eagerValuesRef:l,groupId:r,layout:i,panelDataArray:s,panelGroupElement:o,setLayout:c}){E.useRef({didWarnAboutMissingResizeHandle:!1}),ar(()=>{if(!o)return;const d=Ci(r,o);for(let m=0;m<s.length-1;m++){const{valueMax:p,valueMin:x,valueNow:y}=wE({layout:i,panelsArray:s,pivotIndices:[m,m+1]}),v=d[m];if(v!=null){const S=s[m];Me(S,`No panel data found for index "${m}"`),v.setAttribute("aria-controls",S.id),v.setAttribute("aria-valuemax",""+Math.round(p)),v.setAttribute("aria-valuemin",""+Math.round(x)),v.setAttribute("aria-valuenow",y!=null?""+Math.round(y):"")}}return()=>{d.forEach((m,p)=>{m.removeAttribute("aria-controls"),m.removeAttribute("aria-valuemax"),m.removeAttribute("aria-valuemin"),m.removeAttribute("aria-valuenow")})}},[r,i,s,o]),E.useEffect(()=>{if(!o)return;const d=l.current;Me(d,"Eager values not found");const{panelDataArray:m}=d,p=f4(r,o);Me(p!=null,`No group found for id "${r}"`);const x=Ci(r,o);Me(x,`No resize handles found for group id "${r}"`);const y=x.map(v=>{const S=v.getAttribute(rt.resizeHandleId);Me(S,"Resize handle element has no handle id attribute");const[C,T]=kE(r,S,m,o);if(C==null||T==null)return()=>{};const z=M=>{if(!M.defaultPrevented)switch(M.key){case"Enter":{M.preventDefault();const U=m.findIndex(N=>N.id===C);if(U>=0){const N=m[U];Me(N,`No panel data found for index ${U}`);const V=i[U],{collapsedSize:F=0,collapsible:_,minSize:I=0}=N.constraints;if(V!=null&&_){const se=hi({delta:en(V,F)?I-F:F-V,initialLayout:i,panelConstraints:m.map(oe=>oe.constraints),pivotIndices:c4(r,S,o),prevLayout:i,trigger:"keyboard"});i!==se&&c(se)}}break}}};return v.addEventListener("keydown",z),()=>{v.removeEventListener("keydown",z)}});return()=>{y.forEach(v=>v())}},[o,t,l,r,i,s,c])}function np(t,l){if(t.length!==l.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==l[r])return!1;return!0}function d4(t,l){const r=t==="horizontal",{x:i,y:s}=Ms(l);return r?i:s}function EE(t,l,r,i,s){const o=r==="horizontal",c=js(l,s);Me(c,`No resize handle element found for id "${l}"`);const d=c.getAttribute(rt.groupId);Me(d,"Resize handle element has no group id attribute");let{initialCursorPosition:m}=i;const p=d4(r,t),x=f4(d,s);Me(x,`No group element found for id "${d}"`);const y=x.getBoundingClientRect(),v=o?y.width:y.height;return(p-m)/v*100}function ME(t,l,r,i,s,o){if(e4(t)){const c=r==="horizontal";let d=0;t.shiftKey?d=100:s!=null?d=s:d=10;let m=0;switch(t.key){case"ArrowDown":m=c?0:d;break;case"ArrowLeft":m=c?-d:0;break;case"ArrowRight":m=c?d:0;break;case"ArrowUp":m=c?0:-d;break;case"End":m=100;break;case"Home":m=-100;break}return m}else return i==null?0:EE(t,l,r,i,o)}function NE({panelDataArray:t}){const l=Array(t.length),r=t.map(o=>o.constraints);let i=0,s=100;for(let o=0;o<t.length;o++){const c=r[o];Me(c,`Panel constraints not found for index ${o}`);const{defaultSize:d}=c;d!=null&&(i++,l[o]=d,s-=d)}for(let o=0;o<t.length;o++){const c=r[o];Me(c,`Panel constraints not found for index ${o}`);const{defaultSize:d}=c;if(d!=null)continue;const m=t.length-i,p=s/m;i++,l[o]=p,s-=p}return l}function Wr(t,l,r){l.forEach((i,s)=>{const o=t[s];Me(o,`Panel data not found for index ${s}`);const{callbacks:c,constraints:d,id:m}=o,{collapsedSize:p=0,collapsible:x}=d,y=r[m];if(y==null||i!==y){r[m]=i;const{onCollapse:v,onExpand:S,onResize:C}=c;C&&C(i,y),x&&(v||S)&&(S&&(y==null||Wn(y,p))&&!Wn(i,p)&&S(),v&&(y==null||!Wn(y,p))&&Wn(i,p)&&v())}})}function Wu(t,l){if(t.length!==l.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=l[r])return!1;return!0}function jE({defaultSize:t,dragState:l,layout:r,panelData:i,panelIndex:s,precision:o=3}){const c=r[s];let d;return c==null?d=t!=null?t.toPrecision(o):"1":i.length===1?d="1":d=c.toPrecision(o),{flexBasis:0,flexGrow:d,flexShrink:1,overflow:"hidden",pointerEvents:l!==null?"none":void 0}}function AE(t,l=10){let r=null;return(...s)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...s)},l)}}function lp(t){try{if(typeof localStorage<"u")t.getItem=l=>localStorage.getItem(l),t.setItem=(l,r)=>{localStorage.setItem(l,r)};else throw new Error("localStorage not supported in this environment")}catch(l){console.error(l),t.getItem=()=>null,t.setItem=()=>{}}}function h4(t){return`react-resizable-panels:${t}`}function m4(t){return t.map(l=>{const{constraints:r,id:i,idIsFromProps:s,order:o}=l;return s?i:o?`${o}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((l,r)=>l.localeCompare(r)).join(",")}function p4(t,l){try{const r=h4(t),i=l.getItem(r);if(i){const s=JSON.parse(i);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function zE(t,l,r){var i,s;const o=(i=p4(t,r))!==null&&i!==void 0?i:{},c=m4(l);return(s=o[c])!==null&&s!==void 0?s:null}function TE(t,l,r,i,s){var o;const c=h4(t),d=m4(l),m=(o=p4(t,s))!==null&&o!==void 0?o:{};m[d]={expandToSizes:Object.fromEntries(r.entries()),layout:i};try{s.setItem(c,JSON.stringify(m))}catch(p){console.error(p)}}function rp({layout:t,panelConstraints:l}){const r=[...t],i=r.reduce((o,c)=>o+c,0);if(r.length!==l.length)throw Error(`Invalid ${l.length} panel layout: ${r.map(o=>`${o}%`).join(", ")}`);if(!en(i,100)&&r.length>0)for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=100/i*c;r[o]=d}let s=0;for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=la({panelConstraints:l,panelIndex:o,size:c});c!=d&&(s+=c-d,r[o]=d)}if(!en(s,0))for(let o=0;o<l.length;o++){const c=r[o];Me(c!=null,`No layout data found for index ${o}`);const d=c+s,m=la({panelConstraints:l,panelIndex:o,size:d});if(c!==m&&(s-=m-c,r[o]=m,en(s,0)))break}return r}const _E=100,mi={getItem:t=>(lp(mi),mi.getItem(t)),setItem:(t,l)=>{lp(mi),mi.setItem(t,l)}},ap={};function g4({autoSaveId:t=null,children:l,className:r="",direction:i,forwardedRef:s,id:o=null,onLayout:c=null,keyboardResizeBy:d=null,storage:m=mi,style:p,tagName:x="div",...y}){const v=C1(o),S=E.useRef(null),[C,T]=E.useState(null),[z,M]=E.useState([]),U=vE(),N=E.useRef({}),V=E.useRef(new Map),F=E.useRef(0),_=E.useRef({autoSaveId:t,direction:i,dragState:C,id:v,keyboardResizeBy:d,onLayout:c,storage:m}),I=E.useRef({layout:z,panelDataArray:[],panelDataArrayChanged:!1});E.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),E.useImperativeHandle(s,()=>({getId:()=>_.current.id,getLayout:()=>{const{layout:k}=I.current;return k},setLayout:k=>{const{onLayout:Q}=_.current,{layout:re,panelDataArray:ee}=I.current,ne=rp({layout:k,panelConstraints:ee.map(fe=>fe.constraints)});np(re,ne)||(M(ne),I.current.layout=ne,Q&&Q(ne),Wr(ee,ne,N.current))}}),[]),ar(()=>{_.current.autoSaveId=t,_.current.direction=i,_.current.dragState=C,_.current.id=v,_.current.onLayout=c,_.current.storage=m}),CE({committedValuesRef:_,eagerValuesRef:I,groupId:v,layout:z,panelDataArray:I.current.panelDataArray,setLayout:M,panelGroupElement:S.current}),E.useEffect(()=>{const{panelDataArray:k}=I.current;if(t){if(z.length===0||z.length!==k.length)return;let Q=ap[t];Q==null&&(Q=AE(TE,_E),ap[t]=Q);const re=[...k],ee=new Map(V.current);Q(t,re,ee,z,m)}},[t,z,m]),E.useEffect(()=>{});const se=E.useCallback(k=>{const{onLayout:Q}=_.current,{layout:re,panelDataArray:ee}=I.current;if(k.constraints.collapsible){const ne=ee.map(st=>st.constraints),{collapsedSize:fe=0,panelSize:me,pivotIndices:Le}=lr(ee,k,re);if(Me(me!=null,`Panel size not found for panel "${k.id}"`),!Wn(me,fe)){V.current.set(k.id,me);const Mt=ta(ee,k)===ee.length-1?me-fe:fe-me,Fe=hi({delta:Mt,initialLayout:re,panelConstraints:ne,pivotIndices:Le,prevLayout:re,trigger:"imperative-api"});Wu(re,Fe)||(M(Fe),I.current.layout=Fe,Q&&Q(Fe),Wr(ee,Fe,N.current))}}},[]),oe=E.useCallback((k,Q)=>{const{onLayout:re}=_.current,{layout:ee,panelDataArray:ne}=I.current;if(k.constraints.collapsible){const fe=ne.map(at=>at.constraints),{collapsedSize:me=0,panelSize:Le=0,minSize:st=0,pivotIndices:Mt}=lr(ne,k,ee),Fe=Q??st;if(Wn(Le,me)){const at=V.current.get(k.id),nn=at!=null&&at>=Fe?at:Fe,al=ta(ne,k)===ne.length-1?Le-nn:nn-Le,mt=hi({delta:al,initialLayout:ee,panelConstraints:fe,pivotIndices:Mt,prevLayout:ee,trigger:"imperative-api"});Wu(ee,mt)||(M(mt),I.current.layout=mt,re&&re(mt),Wr(ne,mt,N.current))}}},[]),O=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{panelSize:ee}=lr(re,k,Q);return Me(ee!=null,`Panel size not found for panel "${k.id}"`),ee},[]),ae=E.useCallback((k,Q)=>{const{panelDataArray:re}=I.current,ee=ta(re,k);return jE({defaultSize:Q,dragState:C,layout:z,panelData:re,panelIndex:ee})},[C,z]),te=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{collapsedSize:ee=0,collapsible:ne,panelSize:fe}=lr(re,k,Q);return Me(fe!=null,`Panel size not found for panel "${k.id}"`),ne===!0&&Wn(fe,ee)},[]),be=E.useCallback(k=>{const{layout:Q,panelDataArray:re}=I.current,{collapsedSize:ee=0,collapsible:ne,panelSize:fe}=lr(re,k,Q);return Me(fe!=null,`Panel size not found for panel "${k.id}"`),!ne||ur(fe,ee)>0},[]),ue=E.useCallback(k=>{const{panelDataArray:Q}=I.current;Q.push(k),Q.sort((re,ee)=>{const ne=re.order,fe=ee.order;return ne==null&&fe==null?0:ne==null?-1:fe==null?1:ne-fe}),I.current.panelDataArrayChanged=!0,U()},[U]);ar(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:k,onLayout:Q,storage:re}=_.current,{layout:ee,panelDataArray:ne}=I.current;let fe=null;if(k){const Le=zE(k,ne,re);Le&&(V.current=new Map(Object.entries(Le.expandToSizes)),fe=Le.layout)}fe==null&&(fe=NE({panelDataArray:ne}));const me=rp({layout:fe,panelConstraints:ne.map(Le=>Le.constraints)});np(ee,me)||(M(me),I.current.layout=me,Q&&Q(me),Wr(ne,me,N.current))}}),ar(()=>{const k=I.current;return()=>{k.layout=[]}},[]);const P=E.useCallback(k=>{let Q=!1;const re=S.current;return re&&window.getComputedStyle(re,null).getPropertyValue("direction")==="rtl"&&(Q=!0),function(ne){ne.preventDefault();const fe=S.current;if(!fe)return()=>null;const{direction:me,dragState:Le,id:st,keyboardResizeBy:Mt,onLayout:Fe}=_.current,{layout:at,panelDataArray:nn}=I.current,{initialLayout:gn}=Le??{},al=c4(st,k,fe);let mt=ME(ne,k,me,Le,Mt,fe);const Rn=me==="horizontal";Rn&&Q&&(mt=-mt);const il=nn.map(ma=>ma.constraints),yn=hi({delta:mt,initialLayout:gn??at,panelConstraints:il,pivotIndices:al,prevLayout:at,trigger:e4(ne)?"keyboard":"mouse-or-touch"}),cr=!Wu(at,yn);(t4(ne)||n4(ne))&&F.current!=mt&&(F.current=mt,!cr&&mt!==0?Rn?Sf(k,mt<0?r4:a4):Sf(k,mt<0?i4:u4):Sf(k,0)),cr&&(M(yn),I.current.layout=yn,Fe&&Fe(yn),Wr(nn,yn,N.current))}},[]),H=E.useCallback((k,Q)=>{const{onLayout:re}=_.current,{layout:ee,panelDataArray:ne}=I.current,fe=ne.map(at=>at.constraints),{panelSize:me,pivotIndices:Le}=lr(ne,k,ee);Me(me!=null,`Panel size not found for panel "${k.id}"`);const Mt=ta(ne,k)===ne.length-1?me-Q:Q-me,Fe=hi({delta:Mt,initialLayout:ee,panelConstraints:fe,pivotIndices:Le,prevLayout:ee,trigger:"imperative-api"});Wu(ee,Fe)||(M(Fe),I.current.layout=Fe,re&&re(Fe),Wr(ne,Fe,N.current))},[]),W=E.useCallback((k,Q)=>{const{layout:re,panelDataArray:ee}=I.current,{collapsedSize:ne=0,collapsible:fe}=Q,{collapsedSize:me=0,collapsible:Le,maxSize:st=100,minSize:Mt=0}=k.constraints,{panelSize:Fe}=lr(ee,k,re);Fe!=null&&(fe&&Le&&Wn(Fe,ne)?Wn(ne,me)||H(k,me):Fe<Mt?H(k,Mt):Fe>st&&H(k,st))},[H]),ce=E.useCallback((k,Q)=>{const{direction:re}=_.current,{layout:ee}=I.current;if(!S.current)return;const ne=js(k,S.current);Me(ne,`Drag handle element not found for id "${k}"`);const fe=d4(re,Q);T({dragHandleId:k,dragHandleRect:ne.getBoundingClientRect(),initialCursorPosition:fe,initialLayout:ee})},[]),Se=E.useCallback(()=>{T(null)},[]),j=E.useCallback(k=>{const{panelDataArray:Q}=I.current,re=ta(Q,k);re>=0&&(Q.splice(re,1),delete N.current[k.id],I.current.panelDataArrayChanged=!0,U())},[U]),R=E.useMemo(()=>({collapsePanel:se,direction:i,dragState:C,expandPanel:oe,getPanelSize:O,getPanelStyle:ae,groupId:v,isPanelCollapsed:te,isPanelExpanded:be,reevaluatePanelConstraints:W,registerPanel:ue,registerResizeHandle:P,resizePanel:H,startDragging:ce,stopDragging:Se,unregisterPanel:j,panelGroupElement:S.current}),[se,C,i,oe,O,ae,v,te,be,W,ue,P,H,ce,Se,j]),J={display:"flex",flexDirection:i==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return E.createElement(Es.Provider,{value:R},E.createElement(x,{...y,children:l,className:r,id:o,ref:S,style:{...J,...p},[rt.group]:"",[rt.groupDirection]:i,[rt.groupId]:v}))}const y4=E.forwardRef((t,l)=>E.createElement(g4,{...t,forwardedRef:l}));g4.displayName="PanelGroup";y4.displayName="forwardRef(PanelGroup)";function ta(t,l){return t.findIndex(r=>r===l||r.id===l.id)}function lr(t,l,r){const i=ta(t,l),o=i===t.length-1?[i-1,i]:[i,i+1],c=r[i];return{...l.constraints,panelSize:c,pivotIndices:o}}function RE({disabled:t,handleId:l,resizeHandler:r,panelGroupElement:i}){E.useEffect(()=>{if(t||r==null||i==null)return;const s=js(l,i);if(s==null)return;const o=c=>{if(!c.defaultPrevented)switch(c.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{c.preventDefault(),r(c);break}case"F6":{c.preventDefault();const d=s.getAttribute(rt.groupId);Me(d,`No group element found for id "${d}"`);const m=Ci(d,i),p=o4(d,l,i);Me(p!==null,`No resize element found for id "${l}"`);const x=c.shiftKey?p>0?p-1:m.length-1:p+1<m.length?p+1:0;m[x].focus();break}}};return s.addEventListener("keydown",o),()=>{s.removeEventListener("keydown",o)}},[i,t,l,r])}function Bf({children:t=null,className:l="",disabled:r=!1,hitAreaMargins:i,id:s,onBlur:o,onClick:c,onDragging:d,onFocus:m,onPointerDown:p,onPointerUp:x,style:y={},tabIndex:v=0,tagName:S="div",...C}){var T,z;const M=E.useRef(null),U=E.useRef({onClick:c,onDragging:d,onPointerDown:p,onPointerUp:x});E.useEffect(()=>{U.current.onClick=c,U.current.onDragging=d,U.current.onPointerDown=p,U.current.onPointerUp=x});const N=E.useContext(Es);if(N===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:V,groupId:F,registerResizeHandle:_,startDragging:I,stopDragging:se,panelGroupElement:oe}=N,O=C1(s),[ae,te]=E.useState("inactive"),[be,ue]=E.useState(!1),[P,H]=E.useState(null),W=E.useRef({state:ae});ar(()=>{W.current.state=ae}),E.useEffect(()=>{if(r)H(null);else{const R=_(O);H(()=>R)}},[r,O,_]);const ce=(T=i==null?void 0:i.coarse)!==null&&T!==void 0?T:15,Se=(z=i==null?void 0:i.fine)!==null&&z!==void 0?z:5;E.useEffect(()=>{if(r||P==null)return;const R=M.current;Me(R,"Element ref not attached");let J=!1;return xE(O,R,V,{coarse:ce,fine:Se},(Q,re,ee)=>{if(!re){te("inactive");return}switch(Q){case"down":{te("drag"),J=!1,Me(ee,'Expected event to be defined for "down" action'),I(O,ee);const{onDragging:ne,onPointerDown:fe}=U.current;ne==null||ne(!0),fe==null||fe();break}case"move":{const{state:ne}=W.current;J=!0,ne!=="drag"&&te("hover"),Me(ee,'Expected event to be defined for "move" action'),P(ee);break}case"up":{te("hover"),se();const{onClick:ne,onDragging:fe,onPointerUp:me}=U.current;fe==null||fe(!1),me==null||me(),J||ne==null||ne();break}}})},[ce,V,r,Se,_,O,P,I,se]),RE({disabled:r,handleId:O,resizeHandler:P,panelGroupElement:oe});const j={touchAction:"none",userSelect:"none"};return E.createElement(S,{...C,children:t,className:l,id:s,onBlur:()=>{ue(!1),o==null||o()},onFocus:()=>{ue(!0),m==null||m()},ref:M,role:"separator",style:{...j,...y},tabIndex:v,[rt.groupDirection]:V,[rt.groupId]:F,[rt.resizeHandle]:"",[rt.resizeHandleActive]:ae==="drag"?"pointer":be?"keyboard":void 0,[rt.resizeHandleEnabled]:!r,[rt.resizeHandleId]:O,[rt.resizeHandleState]:ae})}Bf.displayName="PanelResizeHandle";function DE(t){switch(t){case"connected":return"bg-herd-status-running";case"reconnecting":return"bg-herd-status-pending animate-pulse";case"disconnected":return"bg-herd-status-error"}}function OE(t){switch(t){case"connected":return"Connected";case"reconnecting":return"Reconnecting";case"disconnected":return"Disconnected"}}function LE(t,l){if(t==="/")return{title:"Fleet Dashboard"};if(t==="/jobs")return{title:"Jobs"};if(t==="/schedules")return{title:"Schedules"};if(t.startsWith("/agents/")&&l){const r=t.match(/^\/agents\/[^/]+\/chat\/(.+)$/);return r?{title:`Chat with ${l}`,backTo:`/agents/${encodeURIComponent(l)}`,sessionId:r[1]}:t.endsWith("/chat")?{title:`Chat with ${l}`,backTo:`/agents/${encodeURIComponent(l)}`}:{title:l}}return{title:"herdctl"}}const UE=[{value:"light",icon:O6,label:"Light mode"},{value:"dark",icon:x6,label:"Dark mode"},{value:"system",icon:g6,label:"System theme"}];function HE(){const{connectionStatus:t}=bs(),{theme:l}=$p(),{toggleSidebarMobile:r,setTheme:i}=Vp(),s=ll(),o=Jf(),c=LE(s.pathname,o.name);return g.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b border-herd-border bg-herd-card",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{type:"button",onClick:r,className:"md:hidden hover:bg-herd-hover text-herd-muted hover:text-herd-fg rounded-lg p-1.5 transition-colors","aria-label":"Toggle sidebar",children:g.jsx(d6,{className:"w-4 h-4"})}),c.backTo&&g.jsx(yt,{to:c.backTo,className:"text-herd-muted hover:text-herd-fg transition-colors",title:"Back to agent",children:g.jsx(Qf,{className:"w-4 h-4"})}),g.jsx("h1",{className:"text-lg font-semibold text-herd-fg",children:c.title}),c.sessionId&&g.jsx("span",{className:"text-xs text-herd-muted font-mono",children:c.sessionId.slice(0,8)})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex items-center bg-herd-hover rounded-lg p-0.5",children:UE.map(({value:d,icon:m,label:p})=>g.jsx("button",{type:"button",onClick:()=>i(d),className:`p-1.5 rounded-md transition-colors ${l===d?"bg-herd-card text-herd-fg shadow-sm":"text-herd-muted hover:text-herd-fg"}`,title:p,"aria-label":p,children:g.jsx(m,{className:"w-3.5 h-3.5"})},d))}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:`w-2 h-2 rounded-full ${DE(t)}`}),g.jsx("span",{className:"text-xs text-herd-muted",children:OE(t)})]})]})]})}function BE(t){const l=[],r=new Map;for(const s of t){if(s.fleetPath.length===0){l.push(s);continue}for(let c=0;c<s.fleetPath.length;c++){const d=s.fleetPath.slice(0,c+1).join(".");if(r.has(d)||r.set(d,{name:s.fleetPath[c],agents:[],children:[]}),c>0){const m=s.fleetPath.slice(0,c).join("."),p=r.get(m),x=r.get(d);p.children.includes(x)||p.children.push(x)}}const o=s.fleetPath.join(".");r.get(o).agents.push(s)}const i=[];for(const[s,o]of r.entries())s.includes(".")||i.push(o);return{rootAgents:l,fleetNodes:i}}function Zf(t,l){return t.agents.some(r=>r.status===l)?!0:t.children.some(r=>Zf(r,l))}function x4(t){let l=t.agents.length;for(const r of t.children)l+=x4(r);return l}function ZE(t){switch(t){case"connected":return"bg-herd-status-running";case"reconnecting":return"bg-herd-status-pending animate-pulse";case"disconnected":return"bg-herd-status-idle"}}function qE(t){return Zf(t,"error")?"bg-herd-status-error":Zf(t,"running")?"bg-herd-status-running animate-pulse":"bg-herd-status-idle"}function b4({agent:t,sessions:l,isActive:r,activeSessionId:i,onNavigate:s,onNewChat:o,indent:c=0}){const d=c>0?`${c*16+2}px`:void 0;return g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center border-b border-herd-sidebar-border bg-herd-sidebar-hover",children:[g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}`,onClick:s,className:`flex-1 flex items-center gap-2 py-2.5 rounded-lg text-sm font-semibold tracking-wide transition-colors min-w-0 ${r?"text-herd-sidebar-fg":"text-herd-sidebar-fg/80 hover:text-herd-sidebar-fg"}`,style:d?{paddingLeft:d}:{paddingLeft:"12px"},children:[g.jsx("img",{src:Fp(t.name),alt:"",className:"w-5 h-5 rounded flex-shrink-0"}),g.jsx("span",{className:"truncate",children:t.name})]}),g.jsx("button",{type:"button",onClick:m=>{m.stopPropagation(),o(t.qualifiedName)},className:"flex-shrink-0 p-1.5 mr-1 rounded bg-herd-primary/80 text-white hover:bg-herd-primary transition-colors",title:"New chat",children:g.jsx(S6,{className:"w-3.5 h-3.5"})})]}),l.length===0?g.jsx("p",{className:"text-[11px] text-herd-sidebar-muted/50 text-center py-3",children:"No chats yet"}):g.jsx("div",{className:"mr-1 mt-0.5 space-y-1",children:l.map(m=>{const p=m.sessionId===i;return g.jsxs(yt,{to:`/agents/${encodeURIComponent(t.qualifiedName)}/chat/${m.sessionId}`,onClick:s,className:`flex items-center justify-between gap-2 px-3 py-2 rounded text-sm transition-colors ${p?"text-herd-sidebar-fg bg-herd-sidebar-active":"text-herd-sidebar-muted hover:bg-herd-sidebar-hover hover:text-herd-sidebar-fg"}`,children:[g.jsx("span",{className:"truncate",children:m.preview||"New conversation"}),g.jsx("span",{className:"flex-shrink-0 text-herd-sidebar-muted/60 text-[10px]",children:VC(m.lastMessageAt)})]},m.sessionId)})})]})}function v4({node:t,sidebarSessions:l,currentAgentQualifiedName:r,activeSessionId:i,onNavigate:s,onNewChat:o,depth:c=0,expandedFleets:d,toggleFleet:m,fleetKeyPrefix:p=""}){const x=p?`${p}.${t.name}`:t.name,y=d.has(x),v=x4(t);return qE(t),g.jsxs("div",{children:[g.jsxs("button",{type:"button",onClick:()=>m(x),className:"w-full flex items-center gap-2 py-2 rounded-lg text-xs font-medium text-herd-sidebar-muted hover:text-herd-sidebar-fg hover:bg-herd-sidebar-hover transition-colors",style:{paddingLeft:`${c*16+8}px`},children:[g.jsx(Pf,{className:`w-3 h-3 transition-transform flex-shrink-0 ${y?"rotate-90":""}`}),g.jsx("span",{className:"truncate font-semibold uppercase tracking-wide",children:t.name}),g.jsx("span",{className:"text-[11px] text-herd-sidebar-muted/60 ml-auto mr-2",children:v})]}),y&&g.jsxs("div",{className:"ml-2 border-l-2 border-herd-sidebar-border/60",children:[t.agents.map(S=>g.jsx(b4,{agent:S,sessions:l[S.qualifiedName]??[],isActive:r===S.qualifiedName,activeSessionId:i,onNavigate:s,onNewChat:o,indent:c+1},S.qualifiedName)),t.children.map(S=>g.jsx(v4,{node:S,sidebarSessions:l,currentAgentQualifiedName:r,activeSessionId:i,onNavigate:s,onNewChat:o,depth:c+1,expandedFleets:d,toggleFleet:m,fleetKeyPrefix:x},S.name))]})]})}function kf({to:t,icon:l,label:r,isActive:i,onNavigate:s}){return g.jsxs(yt,{to:t,onClick:s,className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm transition-colors ${i?"text-herd-sidebar-fg bg-herd-sidebar-active font-medium":"text-herd-sidebar-muted hover:bg-herd-sidebar-hover hover:text-herd-sidebar-fg"}`,children:[l,r]})}function ip({onNavigate:t}={}){const{agents:l,connectionStatus:r,fleetStatus:i}=bs(),{sidebarSessions:s}=J8(),{createChatSession:o,fetchSidebarSessions:c}=r1(),d=ll(),m=If(),[p,x]=E.useState(new Set),{rootAgents:y,fleetNodes:v}=E.useMemo(()=>BE(l),[l]),S=v.length>0;E.useEffect(()=>{if(S&&p.size===0){let V=function(_,I){for(const se of _){const oe=I?`${I}.${se.name}`:se.name;F.add(oe),V(se.children,oe)}};const F=new Set;V(v,""),x(F)}},[S,v,p.size]);const C=E.useCallback(V=>{x(F=>{const _=new Set(F);return _.has(V)?_.delete(V):_.add(V),_})},[]),T=E.useMemo(()=>l.map(V=>V.qualifiedName),[l]);E.useEffect(()=>{T.length>0&&c(T)},[c,T]);const z=E.useMemo(()=>{if(!d.pathname.startsWith("/agents/"))return null;const V=d.pathname.slice(8),F=V.indexOf("/"),_=F>=0?V.slice(0,F):V;return decodeURIComponent(_)},[d.pathname]),M=E.useMemo(()=>{const V=d.pathname.match(/\/chat\/(.+)$/);return V?V[1]:null},[d.pathname]),U=E.useCallback(async V=>{const F=await o(V);F&&(m(`/agents/${encodeURIComponent(V)}/chat/${F}`),t==null||t())},[o,m,t]),N=(i==null?void 0:i.counts)??{runningAgents:0,idleAgents:0,errorAgents:0};return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"p-4 border-b border-herd-sidebar-border",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("img",{src:"/herdctl-logo.svg",alt:"herdctl logo",className:"w-7 h-7"}),g.jsx("h1",{className:"text-lg font-semibold text-herd-sidebar-fg",children:"herdctl"})]}),g.jsx("div",{className:"flex items-center gap-1.5",children:g.jsx("span",{className:`w-2 h-2 rounded-full ${ZE(r)}`})})]})}),g.jsxs("div",{className:"flex-1 overflow-auto p-2",children:[v.length>0&&g.jsx("div",{className:"divide-y divide-herd-sidebar-border",children:v.map(V=>g.jsx("div",{className:"py-3 first:pt-0 last:pb-0",children:g.jsx(v4,{node:V,sidebarSessions:s,currentAgentQualifiedName:z,activeSessionId:M,onNavigate:t,onNewChat:U,expandedFleets:p,toggleFleet:C})},V.name))}),y.length>0&&g.jsx("div",{className:"space-y-0.5",children:y.map(V=>g.jsx(b4,{agent:V,sessions:s[V.qualifiedName]??[],isActive:z===V.qualifiedName,activeSessionId:M,onNavigate:t,onNewChat:U},V.qualifiedName))}),l.length===0&&g.jsx("p",{className:"text-xs text-herd-sidebar-muted px-3 py-2",children:"No agents configured"})]}),g.jsx("nav",{className:"p-2 border-t border-herd-sidebar-border",children:g.jsxs("div",{className:"space-y-1",children:[g.jsx(kf,{to:"/",icon:g.jsx(Op,{className:"w-4 h-4"}),label:"Dashboard",isActive:d.pathname==="/",onNavigate:t}),g.jsx(kf,{to:"/jobs",icon:g.jsx(Ox,{className:"w-4 h-4"}),label:"Jobs",isActive:d.pathname==="/jobs",onNavigate:t}),g.jsx(kf,{to:"/schedules",icon:g.jsx(Kf,{className:"w-4 h-4"}),label:"Schedules",isActive:d.pathname==="/schedules",onNavigate:t})]})}),g.jsx("div",{className:"px-4 py-2 border-t border-herd-sidebar-border",children:g.jsxs("p",{className:"text-xs text-herd-sidebar-muted",children:[N.runningAgents," running"," ",g.jsx("span",{className:"text-herd-sidebar-muted/50",children:"·"})," ",N.idleAgents," idle"," ",g.jsx("span",{className:"text-herd-sidebar-muted/50",children:"·"})," ",N.errorAgents," errors"]})})]})}function $E({children:t}){const{rightPanelOpen:l,sidebarCollapsed:r,sidebarMobileOpen:i}=$p(),{setSidebarMobileOpen:s}=Vp(),o=Ne(c=>c.connectionStatus);return g.jsxs("div",{className:"h-dvh bg-herd-bg overflow-hidden",children:[i&&g.jsxs("div",{className:"md:hidden fixed inset-0 z-40",children:[g.jsx("div",{className:"absolute inset-0 bg-black/30",onClick:()=>s(!1),onKeyDown:c=>{c.key==="Escape"&&s(!1)}}),g.jsx("div",{className:"absolute inset-y-0 left-0 w-[260px] bg-herd-sidebar border-r border-herd-sidebar-border animate-fade-slide-in",children:g.jsx(ip,{onNavigate:()=>s(!1)})})]}),g.jsxs(y4,{direction:"horizontal",className:"h-full",children:[!r&&g.jsxs(g.Fragment,{children:[g.jsx(ls,{id:"sidebar",order:1,defaultSize:20,minSize:15,maxSize:30,className:"bg-herd-sidebar hidden md:block",children:g.jsx(ip,{})}),g.jsx(Bf,{className:"w-px bg-herd-border hover:bg-herd-primary/30 transition-colors hidden md:block"})]}),g.jsxs(ls,{id:"main",order:2,minSize:40,className:"flex flex-col min-w-0",children:[g.jsx(HE,{}),g.jsx(J6,{status:o}),g.jsx("main",{className:"flex-1 overflow-auto",children:t})]}),l&&g.jsxs(g.Fragment,{children:[g.jsx(Bf,{className:"w-px bg-herd-border hover:bg-herd-primary/30 transition-colors"}),g.jsx(ls,{id:"detail",order:3,defaultSize:22,minSize:18,maxSize:35,className:"bg-herd-card border-l border-herd-border",children:g.jsx("div",{className:"p-4",children:g.jsx("p",{className:"text-xs text-herd-muted",children:"Detail panel — Coming in Phase 3"})})})]})]})]})}function VE(t){switch(t){case"interval":return"Interval";case"cron":return"Cron";case"webhook":return"Webhook";case"chat":return"Chat"}}function IE(t){return t.expression?t.expression:t.interval?t.interval:"-"}function up(t){if(!t)return"-";const l=new Date(t),r=new Date;return l.toDateString()===r.toDateString()?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function JE({schedule:t,onTrigger:l,onEnable:r,onDisable:i}){const s=t.status==="disabled";return g.jsxs("tr",{className:"hover:bg-herd-hover transition-colors",children:[g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:g.jsx(yt,{to:`/agents/${encodeURIComponent(t.agentName)}`,className:"text-herd-primary hover:text-herd-primary-hover transition-colors",children:t.agentName})}),g.jsx("td",{className:"py-2 px-3 text-herd-fg",children:t.name}),g.jsx("td",{className:"py-2 px-3",children:g.jsx("span",{className:"inline-flex items-center bg-herd-hover rounded-lg px-2 py-0.5 text-[11px] font-medium text-herd-muted",children:VE(t.type)})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs font-mono",children:IE(t)}),g.jsx("td",{className:"py-2 px-3",children:g.jsx(sr,{status:t.status})}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:up(t.lastRunAt)}),g.jsx("td",{className:"py-2 px-3 text-herd-muted text-xs",children:up(t.nextRunAt)}),g.jsx("td",{className:"py-2 px-3",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsxs("button",{type:"button",onClick:()=>l(t.agentName,t.name),className:"bg-herd-primary hover:bg-herd-primary-hover text-white rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors inline-flex items-center gap-1 disabled:opacity-50 disabled:cursor-not-allowed",title:"Trigger Now",children:[g.jsx(vi,{className:"w-3 h-3"}),"Trigger"]}),s?g.jsx("button",{type:"button",onClick:()=>r(t.agentName,t.name),className:"hover:bg-herd-hover text-herd-muted hover:text-herd-status-running rounded-lg p-1.5 transition-colors",title:"Enable schedule",children:g.jsx(E6,{className:"w-3.5 h-3.5"})}):g.jsx("button",{type:"button",onClick:()=>i(t.agentName,t.name),className:"hover:bg-herd-hover text-herd-muted hover:text-herd-status-error rounded-lg p-1.5 transition-colors",title:"Disable schedule",children:g.jsx(k6,{className:"w-3.5 h-3.5"})})]})})]})}function FE(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[g.jsx(Kf,{className:"w-12 h-12 text-herd-muted"}),g.jsxs("div",{children:[g.jsx("p",{className:"text-sm text-herd-fg font-medium",children:"No schedules configured"}),g.jsx("p",{className:"text-xs text-herd-muted mt-1",children:"Schedules will appear here once agents have interval, cron, or webhook triggers defined"})]})]})}function YE({message:t,onRetry:l}){return g.jsxs("div",{className:"bg-herd-status-error/10 border border-herd-status-error/20 text-herd-status-error rounded-lg px-3 py-2 text-xs mb-4 flex items-center justify-between",children:[g.jsx("span",{children:t}),g.jsx("button",{type:"button",onClick:l,className:"hover:underline font-medium ml-4",children:"Retry"})]})}function GE(){const{schedules:t,schedulesLoading:l,schedulesError:r}=F8(),{fetchSchedules:i,triggerSchedule:s,enableSchedule:o,disableSchedule:c}=Y8();E.useEffect(()=>{i().catch(()=>{})},[i]);const d=(x,y)=>{s(x,y).catch(()=>{})},m=(x,y)=>{o(x,y).catch(()=>{})},p=(x,y)=>{c(x,y).catch(()=>{})};return l&&t.length===0&&!r?g.jsx(xt,{className:"p-6",children:g.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-8",children:[g.jsx(nl,{size:"lg"}),g.jsx("p",{className:"text-sm text-herd-muted",children:"Loading schedules..."})]})}):g.jsxs(xt,{className:"p-4",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsx("h2",{className:"text-sm font-semibold text-herd-fg",children:"All Schedules"}),l&&t.length>0&&g.jsx(nl,{size:"sm"})]}),r&&g.jsx(YE,{message:r,onRetry:i}),t.length===0&&!l?g.jsx(FE,{}):g.jsx("div",{className:"overflow-x-auto",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"border-b border-herd-border text-[11px] text-herd-muted font-medium uppercase tracking-wide",children:[g.jsx("th",{className:"text-left py-2 px-3",children:"Agent"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Schedule"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Type"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Expression"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Status"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Last Run"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Next Run"}),g.jsx("th",{className:"text-left py-2 px-3",children:"Actions"})]})}),g.jsx("tbody",{className:"divide-y divide-herd-border",children:t.map(x=>g.jsx(JE,{schedule:x,onTrigger:d,onEnable:m,onDisable:p},`${x.agentName}:${x.name}`))})]})})]})}function XE(t){switch(t){case"success":return g.jsx(_p,{className:"w-4 h-4 text-herd-status-running flex-shrink-0"});case"error":return g.jsx(Fx,{className:"w-4 h-4 text-herd-status-error flex-shrink-0"});case"info":return g.jsx(o6,{className:"w-4 h-4 text-herd-primary flex-shrink-0"})}}function QE(t){switch(t){case"success":return"bg-herd-status-running/10 border-herd-status-running/20";case"error":return"bg-herd-status-error/10 border-herd-status-error/20";case"info":return"bg-herd-primary-muted border-herd-primary/20"}}function KE({toast:t,onDismiss:l}){return g.jsxs("div",{className:`
|
|
365
365
|
flex items-center gap-2 px-3 py-2 rounded-[10px] border text-sm text-herd-fg
|
|
366
366
|
animate-fade-slide-in min-w-[240px] max-w-[360px]
|
|
367
|
-
${
|
|
368
|
-
`,children:[
|
|
367
|
+
${QE(t.type)}
|
|
368
|
+
`,children:[XE(t.type),g.jsx("span",{className:"flex-1 text-xs",children:t.message}),g.jsx("button",{type:"button",onClick:()=>l(t.id),className:"hover:bg-herd-hover rounded p-0.5 transition-colors flex-shrink-0","aria-label":"Dismiss",children:g.jsx(xs,{className:"w-3.5 h-3.5 text-herd-muted"})})]})}function PE(){const t=G8(),{removeToast:l}=X8();return t.length===0?null:g.jsx("div",{className:"fixed bottom-4 right-4 z-50 flex flex-col gap-2",children:t.map(r=>g.jsx(KE,{toast:r,onDismiss:l},r.id))})}function WE(t={}){const{url:l=eM(),onMessage:r,onStatusChange:i,initialReconnectDelay:s=1e3,maxReconnectDelay:o=3e4,pingInterval:c=3e4}=t;let d=null,m="disconnected",p=0,x=null,y=null,v=!0;function S(O){m!==O&&(m=O,i==null||i(m))}function C(){const O=s*2**p;return Math.min(O,o)}function T(){z(),y=setInterval(()=>{(d==null?void 0:d.readyState)===WebSocket.OPEN&&V({type:"ping"})},c)}function z(){y!==null&&(clearInterval(y),y=null)}function M(){if(!v)return;const O=C();p++,S("reconnecting"),x=setTimeout(()=>{x=null,N()},O)}function U(){x!==null&&(clearTimeout(x),x=null)}function N(){d&&(d.onopen=null,d.onclose=null,d.onerror=null,d.onmessage=null,(d.readyState===WebSocket.OPEN||d.readyState===WebSocket.CONNECTING)&&d.close());try{d=new WebSocket(l),d.onopen=()=>{p=0,S("connected"),T()},d.onclose=()=>{z(),S("disconnected"),v&&M()},d.onerror=()=>{},d.onmessage=O=>{try{const ae=JSON.parse(O.data);r==null||r(ae)}catch{}}}catch{S("disconnected"),v&&M()}}function V(O){(d==null?void 0:d.readyState)===WebSocket.OPEN&&d.send(JSON.stringify(O))}function F(O){V({type:"subscribe",payload:{agentName:O}})}function _(O){V({type:"unsubscribe",payload:{agentName:O}})}function I(){return m}function se(){v=!1,U(),z(),d&&(d.onopen=null,d.onclose=null,d.onerror=null,d.onmessage=null,(d.readyState===WebSocket.OPEN||d.readyState===WebSocket.CONNECTING)&&d.close(),d=null),S("disconnected")}function oe(){v=!0,U(),p=0,N()}return N(),{send:V,subscribe:F,unsubscribe:_,getStatus:I,disconnect:se,reconnect:oe}}function eM(){return typeof window>"u"?"ws://localhost:3000/ws":`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function tM(){const t=E.useRef(null),l=E.useRef("disconnected"),r=E.useRef(!1),i=Ne(N=>N.setFleetStatus),s=Ne(N=>N.setAgents),o=Ne(N=>N.updateAgent),c=Ne(N=>N.addJob),d=Ne(N=>N.completeJob),m=Ne(N=>N.failJob),p=Ne(N=>N.cancelJob),x=Ne(N=>N.setConnectionStatus),y=Ne(N=>N.connectionStatus),v=Ne(N=>N.appendOutput),S=Ne(N=>N.appendStreamingChunk),C=Ne(N=>N.completeStreaming),T=Ne(N=>N.addToolCallMessage),z=Ne(N=>N.setChatError),M=Ne(N=>N.updateScheduleFromWS),U=Ne(N=>N.addToast);return E.useEffect(()=>{const N=F=>{switch(F.type){case"fleet:status":i(F.payload);break;case"agent:updated":o(F.payload);break;case"job:created":c(F.payload);break;case"job:completed":d(F.payload),U({message:`Job completed for ${F.payload.agentName}`,type:"success"});break;case"job:failed":m(F.payload),U({message:`Job failed for ${F.payload.agentName}`,type:"error",duration:5e3});break;case"job:cancelled":p(F.payload);break;case"schedule:triggered":M(),U({message:`Schedule triggered for ${F.payload.agentName}`,type:"info"});break;case"job:output":{const{jobId:_,agentName:I,data:se,stream:oe}=F.payload;v(_,I,se,oe);break}case"pong":break;case"chat:response":{const{chunk:_}=F.payload;S(_);break}case"chat:complete":{C();break}case"chat:tool_call":{T({toolName:F.payload.toolName,inputSummary:F.payload.inputSummary,output:F.payload.output,isError:F.payload.isError,durationMs:F.payload.durationMs});break}case"chat:error":{z(F.payload.error);break}}},V=F=>{const _=l.current;l.current=F,x(F),F==="connected"&&(_==="disconnected"||_==="reconnecting")&&r.current&&(async()=>{try{const[I,se]=await Promise.all([Lp(),Up()]);i(I),s(se)}catch{}})(),F==="connected"&&(r.current=!0)};return t.current=WE({onMessage:N,onStatusChange:V}),window.__herdWsClient=t.current,()=>{var F;(F=t.current)==null||F.disconnect(),t.current=null,delete window.__herdWsClient}},[c,U,T,v,S,p,d,C,m,s,z,x,i,o,M]),{connectionStatus:y,subscribe:N=>{var V;return(V=t.current)==null?void 0:V.subscribe(N)},unsubscribe:N=>{var V;return(V=t.current)==null?void 0:V.unsubscribe(N)},reconnect:()=>{var N;return(N=t.current)==null?void 0:N.reconnect()}}}function nM(){return g.jsxs("div",{className:"p-4 h-full overflow-auto",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg mb-4",children:"Job History"}),g.jsx(Yp,{})]})}function lM(){return g.jsxs("div",{className:"p-4 h-full overflow-auto",children:[g.jsx("h1",{className:"text-lg font-semibold text-herd-fg mb-4",children:"Schedules"}),g.jsx(GE,{})]})}function rM(){return tM(),P3(),g.jsxs(_l,{children:[g.jsx($E,{children:g.jsxs(Fy,{children:[g.jsx(Dl,{path:"/",element:g.jsx(_l,{children:g.jsx(iE,{})})}),g.jsx(Dl,{path:"/agents/:name",element:g.jsx(_l,{children:g.jsx(am,{})})}),g.jsx(Dl,{path:"/agents/:name/:tab",element:g.jsx(_l,{children:g.jsx(am,{})})}),g.jsx(Dl,{path:"/agents/:name/chat",element:g.jsx(_l,{children:g.jsx(Qm,{})})}),g.jsx(Dl,{path:"/agents/:name/chat/:sessionId",element:g.jsx(_l,{children:g.jsx(Qm,{})})}),g.jsx(Dl,{path:"/jobs",element:g.jsx(_l,{children:g.jsx(nM,{})})}),g.jsx(Dl,{path:"/schedules",element:g.jsx(_l,{children:g.jsx(lM,{})})})]})}),g.jsx(PE,{})]})}L8();const S4=document.getElementById("root");if(!S4)throw new Error("Root element not found");X5.createRoot(S4).render(g.jsx(E.StrictMode,{children:g.jsx(gx,{children:g.jsx(rM,{})})}));
|