@alexgorbatchev/dotfiles 0.0.5 → 0.0.10
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/README.md +45 -47
- package/cli.js +157 -157
- package/cli.js.map +274 -274
- package/dashboard-vf1askzj.js +159 -0
- package/{dashboard-0ebz5sqb.js.map → dashboard-vf1askzj.js.map} +33 -33
- package/dashboard.js +11 -11
- package/package.json +1 -1
- package/schemas.d.ts +106 -100
- package/skill/SKILL.md +7 -5
- package/skill/references/api-reference.md +49 -49
- package/skill/references/configuration.md +184 -174
- package/skill/references/installation-methods/brew.md +18 -18
- package/skill/references/installation-methods/cargo.md +19 -19
- package/skill/references/installation-methods/curl-binary.md +29 -27
- package/skill/references/installation-methods/curl-script.md +28 -28
- package/skill/references/installation-methods/curl-tar.md +27 -19
- package/skill/references/installation-methods/dmg.md +24 -24
- package/skill/references/installation-methods/gitea-release.md +24 -24
- package/skill/references/installation-methods/github-release.md +20 -20
- package/skill/references/installation-methods/manual.md +18 -18
- package/skill/references/installation-methods/npm.md +19 -19
- package/skill/references/installation-methods/overview.md +74 -75
- package/skill/references/installation-methods/zsh-plugin.md +31 -32
- package/skill/references/make-tool.md +168 -167
- package/skill/references/shell-and-hooks.md +78 -77
- package/dashboard-0ebz5sqb.js +0 -159
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import{a as P,b as j,c as d0,d as M0,e as Z0,f as Zw,g as Xw,h as L0}from"./cli-w822cqdk.js";import{j as f1}from"./cli-fj2hdbnx.js";var V0,_,Aw,hv,N0=0,Pv=[],R=P,kv=R.__b,Fv=R.__r,Mv=R.diffed,Av=R.__c,Gv=R.unmount,xv=R.__;function T0(w,v){R.__h&&R.__h(_,w,N0||v),N0=0;var b=_.__H||(_.__H={__:[],__h:[]});return w>=b.__.length&&b.__.push({}),b.__[w]}function T(w){return N0=1,C0(_v,w)}function C0(w,v,b){var y=T0(V0++,2);if(y.t=w,!y.__c&&(y.__=[b?b(v):_v(void 0,v),function(z){var Z=y.__N?y.__N[0]:y.__[0],Q=y.t(Z,z);Z!==Q&&(y.__N=[Q,y.__[1]],y.__c.setState({}))}],y.__c=_,!_.__f)){var d=function(z,Z,Q){if(!y.__c.__H)return!0;var Y=y.__c.__H.__.filter(function(K){return K.__c});if(Y.every(function(K){return!K.__N}))return!J||J.call(this,z,Z,Q);var q=y.__c.props!==z;return Y.some(function(K){if(K.__N){var $=K.__[0];K.__=K.__N,K.__N=void 0,$!==K.__[0]&&(q=!0)}}),J&&J.call(this,z,Z,Q)||q};_.__f=!0;var{shouldComponentUpdate:J,componentWillUpdate:X}=_;_.componentWillUpdate=function(z,Z,Q){if(this.__e){var Y=J;J=void 0,d(z,Z,Q),J=Y}X&&X.call(this,z,Z,Q)},_.shouldComponentUpdate=d}return y.__N||y.__}function X0(w,v){var b=T0(V0++,3);!R.__s&&xw(b.__H,v)&&(b.__=w,b.u=v,_.__H.__h.push(b))}function yw(w,v){var b=T0(V0++,4);!R.__s&&xw(b.__H,v)&&(b.__=w,b.u=v,_.__h.push(b))}function i(w){return N0=5,a(function(){return{current:w}},[])}function a(w,v){var b=T0(V0++,7);return xw(b.__H,v)&&(b.__=w(),b.__H=v,b.__h=w),b.__}function z0(w,v){return N0=8,a(function(){return w},v)}function fw(w){var v=_.context[w.__c],b=T0(V0++,9);return b.c=w,v?(b.__==null&&(b.__=!0,v.sub(_)),v.props.value):w.__}function h1(){for(var w;w=Pv.shift();){var v=w.__H;if(w.__P&&v)try{v.__h.some(bw),v.__h.some(Gw),v.__h=[]}catch(b){v.__h=[],R.__e(b,w.__v)}}}R.__b=function(w){_=null,kv&&kv(w)},R.__=function(w,v){w&&v.__k&&v.__k.__m&&(w.__m=v.__k.__m),xv&&xv(w,v)},R.__r=function(w){Fv&&Fv(w),V0=0;var v=(_=w.__c).__H;v&&(Aw===_?(v.__h=[],_.__h=[],v.__.some(function(b){b.__N&&(b.__=b.__N),b.u=b.__N=void 0})):(v.__h.some(bw),v.__h.some(Gw),v.__h=[],V0=0)),Aw=_},R.diffed=function(w){Mv&&Mv(w);var v=w.__c;v&&v.__H&&(v.__H.__h.length&&(Pv.push(v)!==1&&hv===R.requestAnimationFrame||((hv=R.requestAnimationFrame)||k1)(h1)),v.__H.__.some(function(b){b.u&&(b.__H=b.u),b.u=void 0})),Aw=_=null},R.__c=function(w,v){v.some(function(b){try{b.__h.some(bw),b.__h=b.__h.filter(function(y){return!y.__||Gw(y)})}catch(y){v.some(function(d){d.__h&&(d.__h=[])}),v=[],R.__e(y,b.__v)}}),Av&&Av(w,v)},R.unmount=function(w){Gv&&Gv(w);var v,b=w.__c;b&&b.__H&&(b.__H.__.some(function(y){try{bw(y)}catch(d){v=d}}),b.__H=void 0,v&&R.__e(v,b.__v))};var Ov=typeof requestAnimationFrame=="function";function k1(w){var v,b=function(){clearTimeout(y),Ov&&cancelAnimationFrame(v),setTimeout(w)},y=setTimeout(b,35);Ov&&(v=requestAnimationFrame(b))}function bw(w){var v=_,b=w.__c;typeof b=="function"&&(w.__c=void 0,b()),_=v}function Gw(w){var v=_;w.__c=w.__(),_=v}function xw(w,v){return!w||w.length!==v.length||v.some(function(b,y){return b!==w[y]})}function _v(w,v){return typeof v=="function"?v(w):v}var A0,R0;function F1(w){return!R0||(typeof R0=="string"?w.startsWith(R0):R0.test(w))}function M1(w,v){let b="";if(A0=void 0,v&&v.type==="click"){if(v.ctrlKey||v.metaKey||v.altKey||v.shiftKey||v.button!==0)return w;let y=v.composedPath().find((J)=>J.nodeName=="A"&&J.href),d=y&&y.getAttribute("href");if(!y||y.origin!=location.origin||/^#/.test(d)||!/^(_?self)?$/i.test(y.target)||!F1(d)||y.download)return w;A0=!0,v.preventDefault(),b=y.href.replace(location.origin,"")}else if(v&&v.url)A0=!v.replace,b=v.url;else b=location.pathname+location.search;if(A0===!0)history.pushState(null,"",b);else if(A0===!1)history.replaceState(null,"",b);return b}var A1=(w,v,b={})=>{if(w=w.split("/").filter(Boolean),v=(v||"").split("/").filter(Boolean),!b.params)b.params={};for(let y=0,d,J;y<Math.max(w.length,v.length);y++){let[,X,z,Z]=(v[y]||"").match(/^(:?)(.*?)([+*?]?)$/);if(d=w[y],!X&&z==d)continue;if(!X&&d&&Z=="*"){b.rest="/"+w.slice(y).map(decodeURIComponent).join("/");break}if(!X||!d&&Z!="?"&&Z!="*")return;if(J=Z=="+"||Z=="*",J)d=w.slice(y).map(decodeURIComponent).join("/")||void 0;else if(d)d=decodeURIComponent(d);if(b.params[z]=d,!(z in b))b[z]=d;if(J)break}return b};function r0(w){let[v,b]=C0(M1,w.url||location.pathname+location.search);if(w.scope)R0=w.scope;let y=A0===!0,d=a(()=>{let J=new URL(v,location.origin),X=J.pathname.replace(/\/+$/g,"")||"/";return{url:v,path:X,query:Object.fromEntries(J.searchParams),route:(z,Z)=>b({url:z,replace:Z}),wasPush:y}},[v]);return yw(()=>{return addEventListener("click",b),addEventListener("popstate",b),()=>{removeEventListener("click",b),removeEventListener("popstate",b)}},[]),j(r0.ctx.Provider,{value:d},w.children)}var G1=Promise.resolve();function zw(w){let[v,b]=C0((k)=>k+1,0),{url:y,query:d,wasPush:J,path:X}=G0();if(!y)throw Error("preact-iso's <Router> must be used within a <LocationProvider>, see: https://github.com/preactjs/preact-iso#locationprovider");let{rest:z=X,params:Z={}}=fw(Iv),Q=i(!1),Y=i(X),q=i(0),K=i(),$=i(),H=i(),h=i(!1),E=i();E.current=!1;let G,x,M;Z0(w.children).some((k)=>{if(A1(z,k.props.path,M={...k.props,path:z,query:d,params:Object.assign({},Z),rest:""}))return G=Xw(k,M);if(k.props.default)x=Xw(k,M)});let U=G||x,L=K.current&&K.current.__u&dw&&K.current.__u&Jw,N=K.current&&K.current.__h,c=a(()=>{$.current=K.current,K.current=j(Iv.Provider,{value:M},U);let k=$.current&&$.current.props.children;if(!k||!U||U.type!==k.type||U.props.component!==k.props.component){if(this.__v&&this.__v.__k)this.__v.__k.reverse();return q.current++,!0}return!1},[y,JSON.stringify(M)]);if(L)K.current.__u|=dw,K.current.__u|=Jw;else if(N)K.current.__h=!0;let W=$.current;return $.current=null,this.__c=(k,s)=>{if(E.current=!0,$.current=W,w.onLoadStart)w.onLoadStart(y);Q.current=!0;let v0=q.current;k.then(()=>{if(v0!==q.current)return;if($.current=null,K.current){if(s.__h)K.current.__h=s.__h;if(s.__u&Jw)K.current.__u|=Jw;if(s.__u&dw)K.current.__u|=dw}G1.then(b)})},yw(()=>{let k=this.__v&&this.__v.__e;if(E.current){if(!h.current&&!H.current)H.current=k;return}if(!h.current&&H.current){if(H.current!==k)H.current.remove();H.current=null}if(h.current=!0,Y.current!==X){if(J)scrollTo(0,0);if(w.onRouteChange)w.onRouteChange(y);Y.current=X}if(w.onLoadEnd&&Q.current)w.onLoadEnd(y);Q.current=!1},[X,J,v]),c?[j(Ow,{r:K}),j(Ow,{r:$})]:j(Ow,{r:K})}var dw=32,Jw=128,Ow=({r:w})=>w.current;zw.Provider=r0;r0.ctx=L0({});var Iv=L0({}),W0=(w)=>j(w.component,w),G0=()=>fw(r0.ctx);var Nv=P.__b;P.__b=(w)=>{if(w.type&&w.type._forwarded&&w.ref)w.props.ref=w.ref,w.ref=null;if(Nv)Nv(w)};var Tv=P.__e;P.__e=(w,v,b)=>{if(w&&w.then){let y=v;while(y=y.__)if(y.__c&&y.__c.__c){if(v.__e==null)v.__c.__z=[b.__e],v.__e=b.__e,v.__k=b.__k;if(!v.__k)v.__k=[];return y.__c.__c(w,v)}}if(Tv)Tv(w,v,b)};var Pw=(w)=>w.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O1=(w)=>w.replace(/^([A-Z])|[\s-_]+(\w)/g,(v,b,y)=>y?y.toUpperCase():b.toLowerCase()),_w=(w)=>{let v=O1(w);return v.charAt(0).toUpperCase()+v.slice(1)},Cv=(...w)=>w.filter((v,b,y)=>{return Boolean(v)&&v.trim()!==""&&y.indexOf(v)===b}).join(" ").trim();var Rv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};var Lv=({color:w="currentColor",size:v=24,strokeWidth:b=2,absoluteStrokeWidth:y,children:d,iconNode:J,class:X="",...z})=>j("svg",{...Rv,width:String(v),height:v,stroke:w,["stroke-width"]:y?Number(b)*24/Number(v):b,class:["lucide",X].join(" "),...z},[...J.map(([Z,Q])=>j(Z,Q)),...Z0(d)]);var D=(w,v)=>{let b=({class:y="",children:d,...J})=>j(Lv,{...J,iconNode:v,class:Cv(`lucide-${Pw(_w(w))}`,`lucide-${Pw(w)}`,y)},d);return b.displayName=_w(w),b};var j0=D("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var Iw=D("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);var Nw=D("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var Tw=D("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Cw=D("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);var Qw=D("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Rw=D("circle-x",[["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"}]]);var S0=D("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var g0=D("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);var Lw=D("copy",[["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"}]]);var l0=D("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);var m0=D("external-link",[["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"}]]);var f0=D("file-code",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);var jw=D("file-cog",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m2.305 15.53.923-.382",key:"yfp9st"}],["path",{d:"m3.228 12.852-.924-.383",key:"bckynb"}],["path",{d:"M4.677 21.5a2 2 0 0 0 1.313.5H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2.5",key:"1yo3oz"}],["path",{d:"m4.852 11.228-.383-.923",key:"1j88i9"}],["path",{d:"m4.852 16.772-.383.924",key:"sag1dv"}],["path",{d:"m7.148 11.228.383-.923",key:"rj39hk"}],["path",{d:"m7.53 17.696-.382-.924",key:"1uu5cs"}],["path",{d:"m8.772 12.852.923-.383",key:"13811l"}],["path",{d:"m8.772 15.148.923.383",key:"z1a5l0"}],["circle",{cx:"6",cy:"14",r:"3",key:"a1xfv6"}]]);var Sw=D("file-plus",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);var gw=D("file-symlink",[["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4 11V4a2 2 0 0 1 2-2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"50q2rw"}]]);var lw=D("file-terminal",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m8 16 2-2-2-2",key:"10vzyd"}],["path",{d:"M12 18h4",key:"1wd2n7"}]]);var Q0=D("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);var mw=D("folder-cog",[["path",{d:"M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3",key:"128dxu"}],["path",{d:"m14.305 19.53.923-.382",key:"3m78fa"}],["path",{d:"m15.228 16.852-.923-.383",key:"npixar"}],["path",{d:"m16.852 15.228-.383-.923",key:"5xggr7"}],["path",{d:"m16.852 20.772-.383.924",key:"dpfhf9"}],["path",{d:"m19.148 15.228.383-.923",key:"1reyyz"}],["path",{d:"m19.53 21.696-.382-.924",key:"1goivc"}],["path",{d:"m20.772 16.852.924-.383",key:"htqkph"}],["path",{d:"m20.772 19.148.924.383",key:"9w9pjp"}],["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}]]);var i0=D("folder-open",[["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"}]]);var iw=D("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var o0=D("folder-tree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);var ow=D("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var x0=D("git-branch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var cw=D("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);var pw=D("heart-pulse",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}],["path",{d:"M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"auskq0"}]]);var c0=D("history",[["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"}]]);var uw=D("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var aw=D("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);var p0=D("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var U0=D("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);var tw=D("refresh-cw",[["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"}]]);var B0=D("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var nw=D("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var sw=D("shield",[["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"}]]);var ew=D("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);var wv=D("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var vv=D("triangle-alert",[["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"}]]);var bv=D("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);var E0=D("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);async function jv(w){let b=await(await fetch("/api"+w)).json();if(!b.success)throw Error(b.error||"API error");return b.data}async function Yw(w,v){let y=await(await fetch("/api"+w,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)})).json();if(!y.success)throw Error(y.error||"API error");return y.data}function S(w,v=[]){let[b,y]=T(null),[d,J]=T(!0),[X,z]=T(null),Z=JSON.stringify(v);return X0(()=>{(async()=>{J(!0),z(null);try{let Y=await jv(w);y(Y)}catch(Y){z(Y instanceof Error?Y:Error(String(Y)))}finally{J(!1)}})()},[w,Z]),{data:b,loading:d,error:X}}var P1=0;function f(w,v,b,y,d,J){v||(v={});var X,z,Z=v;if("ref"in Z)for(z in Z={},v)z=="ref"?X=v[z]:Z[z]=v[z];var Q={type:w,props:Z,key:b,ref:X,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--P1,__i:-1,__u:0,__source:d,__self:J};if(typeof w=="function"&&(X=w.defaultProps))for(z in X)Z[z]===void 0&&(Z[z]=X[z]);return P.vnode&&P.vnode(Q),Q}function Sv(){let[w,v]=T(!1),[b,y]=T(""),[d,J]=T(0),X=i(null),{route:z}=G0(),{data:Z}=S("/tools");X0(()=>{let K=($)=>{if(($.metaKey||$.ctrlKey)&&$.key==="k")$.preventDefault(),v((H)=>!H);if($.key==="Escape"&&w)v(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[w]),X0(()=>{if(w)y(""),J(0),setTimeout(()=>X.current?.focus(),0)},[w]);let Q=a(()=>{if(!Z||!b.trim())return[];let K=b.toLowerCase(),$=[];for(let H of Z){if(H.config.name.toLowerCase().includes(K)){$.push({tool:H,matchType:"name",matchedValue:H.config.name});continue}let h=H.config.binaries||[];for(let E of h){let G=typeof E==="string"?E:E.name;if(G.toLowerCase().includes(K)){$.push({tool:H,matchType:"binary",matchedValue:G});break}}}return $.slice(0,10)},[Z,b]),Y=z0((K)=>{v(!1),z(`/tools/${encodeURIComponent(K.tool.config.name)}`)},[z]),q=z0((K)=>{if(K.key==="ArrowDown")K.preventDefault(),J(($)=>Math.min($+1,Q.length-1));else if(K.key==="ArrowUp")K.preventDefault(),J(($)=>Math.max($-1,0));else if(K.key==="Enter"&&Q[d])K.preventDefault(),Y(Q[d])},[Q,d,Y]);if(!w)return null;return f("div",{"data-testid":"CommandPalette",class:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",children:[f("div",{class:"fixed inset-0 bg-black/50",onClick:()=>v(!1)}),f("div",{class:"relative w-full max-w-lg overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:[f("div",{class:"flex items-center border-b border-border px-3",children:[f(B0,{class:"h-4 w-4 text-muted-foreground"}),f("input",{ref:X,type:"text",value:b,onInput:(K)=>{y(K.target.value),J(0)},onKeyDown:q,placeholder:"Search tools by name or binary...",class:"flex-1 bg-transparent px-3 py-3 focus:outline-none"}),f("kbd",{class:"bg-muted px-1.5 py-0.5 text-xs text-muted-foreground rounded",children:"esc"})]}),b.trim()&&f("div",{class:"max-h-80 overflow-y-auto",children:Q.length===0?f("div",{class:"px-4 py-8 text-center text-muted-foreground",children:"No tools found"}):f("ul",{children:Q.map((K,$)=>f("li",{class:`px-4 py-2 cursor-pointer flex items-center justify-between ${$===d?"bg-accent":"hover:bg-accent/50"}`,onClick:()=>Y(K),onMouseEnter:()=>J($),children:[f("div",{children:[f("div",{class:"font-medium",children:K.tool.config.name}),K.matchType==="binary"&&f("div",{class:"text-sm text-muted-foreground",children:["binary: ",f("code",{class:"bg-muted px-1 rounded",children:K.matchedValue})]})]}),f("span",{class:"text-xs text-muted-foreground",children:K.tool.config.installationMethod})]},K.tool.config.name))})}),!b.trim()&&f("div",{class:"px-4 py-3 text-sm text-muted-foreground",children:"Type to search tools by name or binary..."})]})]})}function gv(w){var v,b,y="";if(typeof w=="string"||typeof w=="number")y+=w;else if(typeof w=="object")if(Array.isArray(w)){var d=w.length;for(v=0;v<d;v++)w[v]&&(b=gv(w[v]))&&(y&&(y+=" "),y+=b)}else for(b in w)w[b]&&(y&&(y+=" "),y+=b);return y}function h0(){for(var w,v,b=0,y="",d=arguments.length;b<d;b++)(w=arguments[b])&&(v=gv(w))&&(y&&(y+=" "),y+=v);return y}var _1=(w,v)=>{let b=Array(w.length+v.length);for(let y=0;y<w.length;y++)b[y]=w[y];for(let y=0;y<v.length;y++)b[w.length+y]=v[y];return b},I1=(w,v)=>({classGroupId:w,validator:v}),pv=(w=new Map,v=null,b)=>({nextPart:w,validators:v,classGroupId:b});var lv=[];var N1=(w)=>{let v=C1(w),{conflictingClassGroups:b,conflictingClassGroupModifiers:y}=w;return{getClassGroupId:(X)=>{if(X.startsWith("[")&&X.endsWith("]"))return T1(X);let z=X.split("-"),Z=z[0]===""&&z.length>1?1:0;return uv(z,Z,v)},getConflictingClassGroupIds:(X,z)=>{if(z){let Z=y[X],Q=b[X];if(Z){if(Q)return _1(Q,Z);return Z}return Q||lv}return b[X]||lv}}},uv=(w,v,b)=>{if(w.length-v===0)return b.classGroupId;let d=w[v],J=b.nextPart.get(d);if(J){let Q=uv(w,v+1,J);if(Q)return Q}let X=b.validators;if(X===null)return;let z=v===0?w.join("-"):w.slice(v).join("-"),Z=X.length;for(let Q=0;Q<Z;Q++){let Y=X[Q];if(Y.validator(z))return Y.classGroupId}return},T1=(w)=>w.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let v=w.slice(1,-1),b=v.indexOf(":"),y=v.slice(0,b);return y?"arbitrary.."+y:void 0})(),C1=(w)=>{let{theme:v,classGroups:b}=w;return R1(b,v)},R1=(w,v)=>{let b=pv();for(let y in w){let d=w[y];fv(d,b,y,v)}return b},fv=(w,v,b,y)=>{let d=w.length;for(let J=0;J<d;J++){let X=w[J];L1(X,v,b,y)}},L1=(w,v,b,y)=>{if(typeof w==="string"){j1(w,v,b);return}if(typeof w==="function"){S1(w,v,b,y);return}g1(w,v,b,y)},j1=(w,v,b)=>{let y=w===""?v:av(v,w);y.classGroupId=b},S1=(w,v,b,y)=>{if(l1(w)){fv(w(y),v,b,y);return}if(v.validators===null)v.validators=[];v.validators.push(I1(b,w))},g1=(w,v,b,y)=>{let d=Object.entries(w),J=d.length;for(let X=0;X<J;X++){let[z,Z]=d[X];fv(Z,av(v,z),b,y)}},av=(w,v)=>{let b=w,y=v.split("-"),d=y.length;for(let J=0;J<d;J++){let X=y[J],z=b.nextPart.get(X);if(!z)z=pv(),b.nextPart.set(X,z);b=z}return b},l1=(w)=>("isThemeGetter"in w)&&w.isThemeGetter===!0,m1=(w)=>{if(w<1)return{get:()=>{return},set:()=>{}};let v=0,b=Object.create(null),y=Object.create(null),d=(J,X)=>{if(b[J]=X,v++,v>w)v=0,y=b,b=Object.create(null)};return{get(J){let X=b[J];if(X!==void 0)return X;if((X=y[J])!==void 0)return d(J,X),X},set(J,X){if(J in b)b[J]=X;else d(J,X)}}};var i1=[],mv=(w,v,b,y,d)=>({modifiers:w,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:y,isExternal:d}),o1=(w)=>{let{prefix:v,experimentalParseClassName:b}=w,y=(d)=>{let J=[],X=0,z=0,Z=0,Q,Y=d.length;for(let h=0;h<Y;h++){let E=d[h];if(X===0&&z===0){if(E===":"){J.push(d.slice(Z,h)),Z=h+1;continue}if(E==="/"){Q=h;continue}}if(E==="[")X++;else if(E==="]")X--;else if(E==="(")z++;else if(E===")")z--}let q=J.length===0?d:d.slice(Z),K=q,$=!1;if(q.endsWith("!"))K=q.slice(0,-1),$=!0;else if(q.startsWith("!"))K=q.slice(1),$=!0;let H=Q&&Q>Z?Q-Z:void 0;return mv(J,$,K,H)};if(v){let d=v+":",J=y;y=(X)=>X.startsWith(d)?J(X.slice(d.length)):mv(i1,!1,X,void 0,!0)}if(b){let d=y;y=(J)=>b({className:J,parseClassName:d})}return y},c1=(w)=>{let v=new Map;return w.orderSensitiveModifiers.forEach((b,y)=>{v.set(b,1e6+y)}),(b)=>{let y=[],d=[];for(let J=0;J<b.length;J++){let X=b[J],z=X[0]==="[",Z=v.has(X);if(z||Z){if(d.length>0)d.sort(),y.push(...d),d=[];y.push(X)}else d.push(X)}if(d.length>0)d.sort(),y.push(...d);return y}},p1=(w)=>({cache:m1(w.cacheSize),parseClassName:o1(w),sortModifiers:c1(w),...N1(w)}),u1=/\s+/,a1=(w,v)=>{let{parseClassName:b,getClassGroupId:y,getConflictingClassGroupIds:d,sortModifiers:J}=v,X=[],z=w.trim().split(u1),Z="";for(let Q=z.length-1;Q>=0;Q-=1){let Y=z[Q],{isExternal:q,modifiers:K,hasImportantModifier:$,baseClassName:H,maybePostfixModifierPosition:h}=b(Y);if(q){Z=Y+(Z.length>0?" "+Z:Z);continue}let E=!!h,G=y(E?H.substring(0,h):H);if(!G){if(!E){Z=Y+(Z.length>0?" "+Z:Z);continue}if(G=y(H),!G){Z=Y+(Z.length>0?" "+Z:Z);continue}E=!1}let x=K.length===0?"":K.length===1?K[0]:J(K).join(":"),M=$?x+"!":x,U=M+G;if(X.indexOf(U)>-1)continue;X.push(U);let L=d(G,E);for(let N=0;N<L.length;++N){let c=L[N];X.push(M+c)}Z=Y+(Z.length>0?" "+Z:Z)}return Z},t1=(...w)=>{let v=0,b,y,d="";while(v<w.length)if(b=w[v++]){if(y=tv(b))d&&(d+=" "),d+=y}return d},tv=(w)=>{if(typeof w==="string")return w;let v,b="";for(let y=0;y<w.length;y++)if(w[y]){if(v=tv(w[y]))b&&(b+=" "),b+=v}return b},n1=(w,...v)=>{let b,y,d,J,X=(Z)=>{let Q=v.reduce((Y,q)=>q(Y),w());return b=p1(Q),y=b.cache.get,d=b.cache.set,J=z,z(Z)},z=(Z)=>{let Q=y(Z);if(Q)return Q;let Y=a1(Z,b);return d(Z,Y),Y};return J=X,(...Z)=>J(t1(...Z))},s1=[],g=(w)=>{let v=(b)=>b[w]||s1;return v.isThemeGetter=!0,v},nv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,wy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,by=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Y0=(w)=>e1.test(w),F=(w)=>!!w&&!Number.isNaN(Number(w)),K0=(w)=>!!w&&Number.isInteger(Number(w)),yv=(w)=>w.endsWith("%")&&F(w.slice(0,-1)),J0=(w)=>wy.test(w),ev=()=>!0,dy=(w)=>vy.test(w)&&!by.test(w),dv=()=>!1,Jy=(w)=>yy.test(w),Xy=(w)=>fy.test(w),zy=(w)=>!V(w)&&!r(w),Zy=(w)=>$0(w,bb,dv),V=(w)=>nv.test(w),k0=(w)=>$0(w,yb,dy),iv=(w)=>$0(w,Vy,F),Qy=(w)=>$0(w,db,ev),Yy=(w)=>$0(w,fb,dv),ov=(w)=>$0(w,wb,dv),Ky=(w)=>$0(w,vb,Xy),Kw=(w)=>$0(w,Jb,Jy),r=(w)=>sv.test(w),u0=(w)=>F0(w,yb),$y=(w)=>F0(w,fb),cv=(w)=>F0(w,wb),qy=(w)=>F0(w,bb),Dy=(w)=>F0(w,vb),$w=(w)=>F0(w,Jb,!0),Hy=(w)=>F0(w,db,!0),$0=(w,v,b)=>{let y=nv.exec(w);if(y){if(y[1])return v(y[1]);return b(y[2])}return!1},F0=(w,v,b=!1)=>{let y=sv.exec(w);if(y){if(y[1])return v(y[1]);return b}return!1},wb=(w)=>w==="position"||w==="percentage",vb=(w)=>w==="image"||w==="url",bb=(w)=>w==="length"||w==="size"||w==="bg-size",yb=(w)=>w==="length",Vy=(w)=>w==="number",fb=(w)=>w==="family-name",db=(w)=>w==="number"||w==="weight",Jb=(w)=>w==="shadow";var ry=()=>{let w=g("color"),v=g("font"),b=g("text"),y=g("font-weight"),d=g("tracking"),J=g("leading"),X=g("breakpoint"),z=g("container"),Z=g("spacing"),Q=g("radius"),Y=g("shadow"),q=g("inset-shadow"),K=g("text-shadow"),$=g("drop-shadow"),H=g("blur"),h=g("perspective"),E=g("aspect"),G=g("ease"),x=g("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...U(),r,V],N=()=>["auto","hidden","clip","visible","scroll"],c=()=>["auto","contain","none"],W=()=>[r,V,Z],k=()=>[Y0,"full","auto",...W()],s=()=>[K0,"none","subgrid",r,V],v0=()=>["auto",{span:["full",K0,r,V]},K0,r,V],b0=()=>[K0,"auto",r,V],y0=()=>["auto","min","max","fr",r,V],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],C=()=>["start","end","center","stretch","center-safe","end-safe"],u=()=>["auto",...W()],H0=()=>[Y0,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...W()],hw=()=>[Y0,"screen","full","dvw","lvw","svw","min","max","fit",...W()],kw=()=>[Y0,"screen","full","lh","dvh","lvh","svh","min","max","fit",...W()],B=()=>[w,r,V],rv=()=>[...U(),cv,ov,{position:[r,V]}],Wv=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Uv=()=>["auto","cover","contain",qy,Zy,{size:[r,V]}],Fw=()=>[yv,u0,k0],t=()=>["","none","full",Q,r,V],n=()=>["",F,u0,k0],s0=()=>["solid","dashed","dotted","double"],Bv=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],m=()=>[F,yv,cv,ov],Ev=()=>["","none",H,r,V],e0=()=>["none",F,r,V],ww=()=>["none",F,r,V],Mw=()=>[F,r,V],vw=()=>[Y0,"full",...W()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[J0],breakpoint:[J0],color:[ev],container:[J0],"drop-shadow":[J0],ease:["in","out","in-out"],font:[zy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[J0],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[J0],shadow:[J0],spacing:["px",F],text:[J0],"text-shadow":[J0],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Y0,V,r,E]}],container:["container"],columns:[{columns:[F,V,r,z]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:c()}],"overscroll-x":[{"overscroll-x":c()}],"overscroll-y":[{"overscroll-y":c()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{"inset-s":k(),start:k()}],end:[{"inset-e":k(),end:k()}],"inset-bs":[{"inset-bs":k()}],"inset-be":[{"inset-be":k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[K0,"auto",r,V]}],basis:[{basis:[Y0,"full","auto",z,...W()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[F,Y0,"auto","initial","none",V]}],grow:[{grow:["",F,r,V]}],shrink:[{shrink:["",F,r,V]}],order:[{order:[K0,"first","last","none",r,V]}],"grid-cols":[{"grid-cols":s()}],"col-start-end":[{col:v0()}],"col-start":[{"col-start":b0()}],"col-end":[{"col-end":b0()}],"grid-rows":[{"grid-rows":s()}],"row-start-end":[{row:v0()}],"row-start":[{"row-start":b0()}],"row-end":[{"row-end":b0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":y0()}],"auto-rows":[{"auto-rows":y0()}],gap:[{gap:W()}],"gap-x":[{"gap-x":W()}],"gap-y":[{"gap-y":W()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...C(),"normal"]}],"justify-self":[{"justify-self":["auto",...C()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...C(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...C(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...C(),"baseline"]}],"place-self":[{"place-self":["auto",...C()]}],p:[{p:W()}],px:[{px:W()}],py:[{py:W()}],ps:[{ps:W()}],pe:[{pe:W()}],pbs:[{pbs:W()}],pbe:[{pbe:W()}],pt:[{pt:W()}],pr:[{pr:W()}],pb:[{pb:W()}],pl:[{pl:W()}],m:[{m:u()}],mx:[{mx:u()}],my:[{my:u()}],ms:[{ms:u()}],me:[{me:u()}],mbs:[{mbs:u()}],mbe:[{mbe:u()}],mt:[{mt:u()}],mr:[{mr:u()}],mb:[{mb:u()}],ml:[{ml:u()}],"space-x":[{"space-x":W()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":W()}],"space-y-reverse":["space-y-reverse"],size:[{size:H0()}],"inline-size":[{inline:["auto",...hw()]}],"min-inline-size":[{"min-inline":["auto",...hw()]}],"max-inline-size":[{"max-inline":["none",...hw()]}],"block-size":[{block:["auto",...kw()]}],"min-block-size":[{"min-block":["auto",...kw()]}],"max-block-size":[{"max-block":["none",...kw()]}],w:[{w:[z,"screen",...H0()]}],"min-w":[{"min-w":[z,"screen","none",...H0()]}],"max-w":[{"max-w":[z,"screen","none","prose",{screen:[X]},...H0()]}],h:[{h:["screen","lh",...H0()]}],"min-h":[{"min-h":["screen","lh","none",...H0()]}],"max-h":[{"max-h":["screen","lh",...H0()]}],"font-size":[{text:["base",b,u0,k0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[y,Hy,Qy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yv,V]}],"font-family":[{font:[$y,Yy,v]}],"font-features":[{"font-features":[V]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,r,V]}],"line-clamp":[{"line-clamp":[F,"none",r,iv]}],leading:[{leading:[J,...W()]}],"list-image":[{"list-image":["none",r,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",r,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...s0(),"wavy"]}],"text-decoration-thickness":[{decoration:[F,"from-font","auto",r,k0]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[F,"auto",r,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:W()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",r,V]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",r,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:rv()}],"bg-repeat":[{bg:Wv()}],"bg-size":[{bg:Uv()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},K0,r,V],radial:["",r,V],conic:[K0,r,V]},Dy,Ky]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:Fw()}],"gradient-via-pos":[{via:Fw()}],"gradient-to-pos":[{to:Fw()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:t()}],"rounded-s":[{"rounded-s":t()}],"rounded-e":[{"rounded-e":t()}],"rounded-t":[{"rounded-t":t()}],"rounded-r":[{"rounded-r":t()}],"rounded-b":[{"rounded-b":t()}],"rounded-l":[{"rounded-l":t()}],"rounded-ss":[{"rounded-ss":t()}],"rounded-se":[{"rounded-se":t()}],"rounded-ee":[{"rounded-ee":t()}],"rounded-es":[{"rounded-es":t()}],"rounded-tl":[{"rounded-tl":t()}],"rounded-tr":[{"rounded-tr":t()}],"rounded-br":[{"rounded-br":t()}],"rounded-bl":[{"rounded-bl":t()}],"border-w":[{border:n()}],"border-w-x":[{"border-x":n()}],"border-w-y":[{"border-y":n()}],"border-w-s":[{"border-s":n()}],"border-w-e":[{"border-e":n()}],"border-w-bs":[{"border-bs":n()}],"border-w-be":[{"border-be":n()}],"border-w-t":[{"border-t":n()}],"border-w-r":[{"border-r":n()}],"border-w-b":[{"border-b":n()}],"border-w-l":[{"border-l":n()}],"divide-x":[{"divide-x":n()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":n()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...s0(),"hidden","none"]}],"divide-style":[{divide:[...s0(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-bs":[{"border-bs":B()}],"border-color-be":[{"border-be":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...s0(),"none","hidden"]}],"outline-offset":[{"outline-offset":[F,r,V]}],"outline-w":[{outline:["",F,u0,k0]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",Y,$w,Kw]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",q,$w,Kw]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:n()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[F,k0]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":n()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",K,$w,Kw]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[F,r,V]}],"mix-blend":[{"mix-blend":[...Bv(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Bv()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[F]}],"mask-image-linear-from-pos":[{"mask-linear-from":m()}],"mask-image-linear-to-pos":[{"mask-linear-to":m()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":m()}],"mask-image-t-to-pos":[{"mask-t-to":m()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":m()}],"mask-image-r-to-pos":[{"mask-r-to":m()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":m()}],"mask-image-b-to-pos":[{"mask-b-to":m()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":m()}],"mask-image-l-to-pos":[{"mask-l-to":m()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":m()}],"mask-image-x-to-pos":[{"mask-x-to":m()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":m()}],"mask-image-y-to-pos":[{"mask-y-to":m()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[r,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":m()}],"mask-image-radial-to-pos":[{"mask-radial-to":m()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[F]}],"mask-image-conic-from-pos":[{"mask-conic-from":m()}],"mask-image-conic-to-pos":[{"mask-conic-to":m()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:rv()}],"mask-repeat":[{mask:Wv()}],"mask-size":[{mask:Uv()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",r,V]}],filter:[{filter:["","none",r,V]}],blur:[{blur:Ev()}],brightness:[{brightness:[F,r,V]}],contrast:[{contrast:[F,r,V]}],"drop-shadow":[{"drop-shadow":["","none",$,$w,Kw]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",F,r,V]}],"hue-rotate":[{"hue-rotate":[F,r,V]}],invert:[{invert:["",F,r,V]}],saturate:[{saturate:[F,r,V]}],sepia:[{sepia:["",F,r,V]}],"backdrop-filter":[{"backdrop-filter":["","none",r,V]}],"backdrop-blur":[{"backdrop-blur":Ev()}],"backdrop-brightness":[{"backdrop-brightness":[F,r,V]}],"backdrop-contrast":[{"backdrop-contrast":[F,r,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",F,r,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[F,r,V]}],"backdrop-invert":[{"backdrop-invert":["",F,r,V]}],"backdrop-opacity":[{"backdrop-opacity":[F,r,V]}],"backdrop-saturate":[{"backdrop-saturate":[F,r,V]}],"backdrop-sepia":[{"backdrop-sepia":["",F,r,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":W()}],"border-spacing-x":[{"border-spacing-x":W()}],"border-spacing-y":[{"border-spacing-y":W()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",r,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[F,"initial",r,V]}],ease:[{ease:["linear","initial",G,r,V]}],delay:[{delay:[F,r,V]}],animate:[{animate:["none",x,r,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,r,V]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:e0()}],"rotate-x":[{"rotate-x":e0()}],"rotate-y":[{"rotate-y":e0()}],"rotate-z":[{"rotate-z":e0()}],scale:[{scale:ww()}],"scale-x":[{"scale-x":ww()}],"scale-y":[{"scale-y":ww()}],"scale-z":[{"scale-z":ww()}],"scale-3d":["scale-3d"],skew:[{skew:Mw()}],"skew-x":[{"skew-x":Mw()}],"skew-y":[{"skew-y":Mw()}],transform:[{transform:[r,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:vw()}],"translate-x":[{"translate-x":vw()}],"translate-y":[{"translate-y":vw()}],"translate-z":[{"translate-z":vw()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",r,V]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":W()}],"scroll-mx":[{"scroll-mx":W()}],"scroll-my":[{"scroll-my":W()}],"scroll-ms":[{"scroll-ms":W()}],"scroll-me":[{"scroll-me":W()}],"scroll-mbs":[{"scroll-mbs":W()}],"scroll-mbe":[{"scroll-mbe":W()}],"scroll-mt":[{"scroll-mt":W()}],"scroll-mr":[{"scroll-mr":W()}],"scroll-mb":[{"scroll-mb":W()}],"scroll-ml":[{"scroll-ml":W()}],"scroll-p":[{"scroll-p":W()}],"scroll-px":[{"scroll-px":W()}],"scroll-py":[{"scroll-py":W()}],"scroll-ps":[{"scroll-ps":W()}],"scroll-pe":[{"scroll-pe":W()}],"scroll-pbs":[{"scroll-pbs":W()}],"scroll-pbe":[{"scroll-pbe":W()}],"scroll-pt":[{"scroll-pt":W()}],"scroll-pr":[{"scroll-pr":W()}],"scroll-pb":[{"scroll-pb":W()}],"scroll-pl":[{"scroll-pl":W()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",r,V]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[F,u0,k0,iv]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var Xb=n1(ry);function p(...w){return Xb(h0(w))}var zb=(w)=>typeof w==="boolean"?`${w}`:w===0?"0":w,Zb=h0,qw=(w,v)=>(b)=>{var y;if((v===null||v===void 0?void 0:v.variants)==null)return Zb(w,b===null||b===void 0?void 0:b.class,b===null||b===void 0?void 0:b.className);let{variants:d,defaultVariants:J}=v,X=Object.keys(d).map((Q)=>{let Y=b===null||b===void 0?void 0:b[Q],q=J===null||J===void 0?void 0:J[Q];if(Y===null)return null;let K=zb(Y)||zb(q);return d[Q][K]}),z=b&&Object.entries(b).reduce((Q,Y)=>{let[q,K]=Y;if(K===void 0)return Q;return Q[q]=K,Q},{}),Z=v===null||v===void 0?void 0:(y=v.compoundVariants)===null||y===void 0?void 0:y.reduce((Q,Y)=>{let{class:q,className:K,...$}=Y;return Object.entries($).every((H)=>{let[h,E]=H;return Array.isArray(E)?E.includes({...J,...z}[h]):{...J,...z}[h]===E})?[...Q,q,K]:Q},[]);return Zb(w,X,Z,b===null||b===void 0?void 0:b.class,b===null||b===void 0?void 0:b.className)};var Wy=qw('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer',{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function w0({class:w,variant:v,size:b,...y}){return f("button",{"data-testid":"Button","data-slot":"button",class:p(Wy({variant:v,size:b,className:w})),...y})}var Uy=[{path:"/",label:"\uD83C\uDFE0 Home"},{path:"/health",label:"\uD83C\uDFE5 Health"},{path:"/settings",label:"⚙️ Settings"}];function By(){document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0}))}function Qb(){let{url:w}=G0();return f("nav",{"data-testid":"Nav",class:"bg-card border-b border-border",children:f("div",{class:"max-w-7xl mx-auto px-4",children:f("div",{class:"flex items-center justify-between h-14",children:[f("div",{class:"flex items-center space-x-4",children:[f("span",{class:"text-xl font-bold text-primary",children:"⚡ Dotfiles"}),f("div",{class:"flex space-x-1",children:Uy.map((v)=>{let b=w===v.path||v.path!=="/"&&w.startsWith(v.path);return f(w0,{variant:b?"secondary":"ghost",size:"sm",asChild:!0,children:f("a",{href:v.path,class:p(b&&"pointer-events-none"),children:v.label})},v.path)})})]}),f("div",{class:"flex items-center space-x-4",children:f("button",{onClick:By,class:"flex items-center gap-2 rounded-md border border-border bg-input px-3 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-accent",children:[f(B0,{class:"h-4 w-4"}),f("span",{children:"Search..."}),f("kbd",{class:"bg-muted px-1.5 py-0.5 text-xs rounded",children:"⌘K"})]})})]})})})}function O0({class:w,...v}){return f("div",{"data-testid":"Card","data-slot":"card",class:p("bg-card text-card-foreground flex flex-col gap-2 rounded-xl border py-6 shadow-sm",w),...v})}function Yb({class:w,...v}){return f("div",{"data-testid":"CardHeader","data-slot":"card-header",class:p("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",w),...v})}function Kb({class:w,...v}){return f("div",{"data-testid":"CardTitle","data-slot":"card-title",class:p("text-lg leading-none font-bold",w),...v})}function P0({class:w,...v}){return f("div",{"data-testid":"CardContent","data-slot":"card-content",class:p("px-6",w),...v})}function O({title:w,icon:v,action:b,children:y,class:d,contentClass:J}){return f(O0,{class:d,children:[f(Yb,{class:"pb-2",children:f("div",{class:"flex items-center justify-between",children:[f(Kb,{class:"flex items-center gap-2 text-lg font-semibold",children:[v,w]}),b]})}),f(P0,{class:J,children:y})]})}function Ey(w){switch(w){case"pass":return f(Qw,{class:"h-4 w-4"});case"warn":return f(vv,{class:"h-4 w-4"});case"fail":return f(Rw,{class:"h-4 w-4"});default:return f(Qw,{class:"h-4 w-4"})}}function hy({check:w}){return f(O,{title:w.name,icon:Ey(w.status),children:[w.message&&f("p",{class:"text-sm font-bold text-foreground",children:w.message}),(w.details?.length||0)>0&&f("ul",{class:"text-xs text-muted-foreground/70 mt-2 ml-4 space-y-1 list-disc",children:w.details?.map((v,b)=>f("li",{children:v},b))})]})}function $b(){let{data:w,loading:v}=S("/health");if(v)return f("div",{"data-testid":"Health",class:"flex items-center justify-center h-64",children:f("div",{class:"text-muted-foreground",children:"Loading..."})});return f("div",{"data-testid":"Health",class:"space-y-6",children:[f("div",{class:"flex items-center space-x-2",children:[f(pw,{class:"h-6 w-6"}),f("h1",{class:"text-2xl font-bold",children:"Health Checks"})]}),f(O0,{class:"text-center",children:f(P0,{class:"pt-6",children:[f("div",{class:`w-4 h-4 rounded-full mx-auto mb-4 ${{healthy:"bg-green-500",warning:"bg-amber-500",unhealthy:"bg-red-500"}[w?.overall||"healthy"]}`}),f("h2",{class:"text-2xl font-bold capitalize",children:w?.overall||"Unknown"}),f("p",{class:"text-muted-foreground text-sm mt-2",children:["Last check: ",w?.lastCheck?new Date(w.lastCheck).toLocaleString():"Never"]})]})}),f("div",{class:"space-y-4",children:w?.checks?.map((y,d)=>f(hy,{check:y},d))||f("div",{class:"text-muted-foreground",children:"No checks available"})})]})}function qb(){return f("div",{"data-testid":"NotFound",class:"py-8 text-center",children:[f("h1",{class:"mb-4 text-2xl font-bold",children:"404 - Not Found"}),f(w0,{variant:"link",asChild:!0,children:f("a",{href:"/",children:"Go to Dashboard"})})]})}function Db(){let{data:w,loading:v}=S("/config");if(v)return f("div",{"data-testid":"Settings",class:"flex items-center justify-center h-64",children:f("div",{class:"text-muted-foreground",children:"Loading..."})});let b=[{label:"Dotfiles Directory",value:w?.dotfilesDir},{label:"Generated Directory",value:w?.generatedDir},{label:"Binaries Directory",value:w?.binariesDir},{label:"Target Directory",value:w?.targetDir},{label:"Tool Configs Directory",value:w?.toolConfigsDir}];return f("div",{"data-testid":"Settings",class:"space-y-6",children:f(O,{title:"Project Paths",icon:f(mw,{class:"h-4 w-4"}),children:f("div",{class:"space-y-4",children:b.map((y,d)=>f("div",{children:[f("div",{class:"mb-1 text-sm text-muted-foreground",children:y.label}),f("code",{class:"block overflow-x-auto rounded bg-muted px-3 py-2 text-sm",children:y.value||"Not configured"})]},d))})})})}var ky=qw("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500/20 text-green-500 border-green-500/30",warning:"border-transparent bg-yellow-500/20 text-yellow-400 border-yellow-500/30",error:"border-transparent bg-red-500 text-white"}},defaultVariants:{variant:"default"}});function q0({class:w,variant:v,...b}){return f("div",{"data-testid":"Badge",class:p(ky({variant:v}),w),...b})}var Fy={"github-release":f(x0,{class:"h-3 w-3"}),"github-release:cli":f(x0,{class:"h-3 w-3"}),homebrew:f(U0,{class:"h-3 w-3"}),brew:f(U0,{class:"h-3 w-3"}),cargo:f(Iw,{class:"h-3 w-3"}),"curl-tar":f(l0,{class:"h-3 w-3"}),"curl-script":f(f0,{class:"h-3 w-3"}),"zsh-plugin":f(ew,{class:"h-3 w-3"}),manual:f(bv,{class:"h-3 w-3"})};function a0({method:w,ghCli:v}){let b=w==="github-release"&&v?"github-release:cli":w,y=Fy[b]||f(U0,{class:"h-3 w-3"});return f(q0,{variant:"outline",class:"gap-1",children:[y,b]})}function Dw({href:w,children:v}){return f(w0,{variant:"outline",size:"sm",asChild:!0,children:f("a",{href:w,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center gap-1.5 whitespace-nowrap",children:[f(m0,{class:"h-4 w-4"}),v]})})}function Wb(w,v,b=!1){if(!w)return w;if(w.startsWith("http://")||w.startsWith("https://")||w.startsWith("//"))return w;if(w.startsWith("#"))return w;let y=w.startsWith("./")?w.slice(2):w;return`https://github.com/${v}/${b?"raw":"blob"}/HEAD/${y}`}function My(w){return{a:({href:v,children:b,...y})=>{let d=typeof v==="string"?v:void 0,J=Wb(d,w,!1),X=d?.startsWith("#");return f("a",{...y,href:J,target:X?void 0:"_blank",rel:X?void 0:"noopener noreferrer",children:b})},img:({src:v,alt:b,...y})=>{return f("img",{...y,src:Wb(typeof v==="string"?v:void 0,w,!0),alt:b})}}}function Ub({toolName:w,repo:v}){let{data:b,loading:y,error:d}=S(`/tools/${encodeURIComponent(w)}/readme`,[w]);if(y)return f(O,{title:"README",icon:f(j0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-center py-8",children:"Loading README..."})});if(d||!b?.content)return f(O,{title:"README",icon:f(j0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-center py-8",children:[f("p",{class:"mb-2",children:"README not available"}),f("a",{href:`https://github.com/${v}#readme`,target:"_blank",rel:"noopener noreferrer",class:"text-sm text-blue-500 hover:underline inline-flex items-center gap-1",children:["View on GitHub ",f(m0,{class:"h-3 w-3"})]})]})});return f(O,{title:"README",icon:f(j0,{class:"h-4 w-4"}),action:f(Dw,{href:`https://github.com/${v}#readme`,children:"View on GitHub"}),children:f("div",{class:"markdown-body p-4 text-lg",children:f(Hb,{remarkPlugins:[rb],rehypePlugins:[Vb],components:My(v),children:b.content})})})}function Bb({status:w}){switch(w){case"installed":return f(q0,{variant:"success",children:"✓ Installed"});case"not-installed":return f(q0,{variant:"error",children:"Not Installed"});case"error":return f(q0,{variant:"error",children:"Error"})}}var Ay={writeFile:f(Sw,{class:"h-4 w-4"}),chmod:f(sw,{class:"h-4 w-4"}),rm:f(wv,{class:"h-4 w-4"}),mkdir:f(iw,{class:"h-4 w-4"}),symlink:f(p0,{class:"h-4 w-4"}),rename:f(Q0,{class:"h-4 w-4"}),cp:f(Lw,{class:"h-4 w-4"})},Gy={writeFile:"Created",chmod:"Permissions",rm:"Removed",mkdir:"Directory",symlink:"Linked",rename:"Renamed",cp:"Copied"};function xy(w,v){if(w.startsWith(v))return`<dotfiles>${w.slice(v.length)}`;return w}function Eb({entries:w,installedAt:v,dotfilesDir:b}){if(w.length===0&&!v)return f("div",{"data-testid":"ToolHistory",class:"text-muted-foreground py-4 text-center",children:"No history recorded"});return f("div",{"data-testid":"ToolHistory",class:"space-y-4",children:[v&&f("div",{class:"flex items-center gap-3 rounded-lg bg-muted/50 p-3",children:[f("div",{class:"flex h-8 w-8 items-center justify-center rounded-full bg-green-500/20 text-green-500",children:f(S0,{class:"h-4 w-4"})}),f("div",{children:[f("div",{class:"font-medium",children:"Installed"}),f("div",{class:"text-sm text-muted-foreground",children:new Date(v).toLocaleString()})]})]}),w.length>0&&f("div",{class:"relative",children:[f("div",{class:"absolute left-4 top-0 bottom-0 w-px bg-border"}),f("div",{class:"space-y-3",children:w.map((y)=>f("div",{class:"relative flex items-start gap-3 pl-8",children:[f("div",{class:"absolute left-2 top-1 flex h-4 w-4 items-center justify-center rounded-full border border-border bg-background",children:f("div",{class:"h-2 w-2 rounded-full bg-muted-foreground"})}),f("div",{class:"min-w-0 flex-1",children:[f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:Ay[y.operationType]||f(Q0,{class:"h-4 w-4"})}),f("span",{class:"font-medium",children:Gy[y.operationType]||y.operationType}),f("span",{class:"ml-auto text-xs text-muted-foreground",children:y.relativeTime})]}),f("div",{class:"mt-1 truncate text-sm text-muted-foreground",title:y.filePath,children:xy(y.filePath,b)})]})]},y.id))})]})]})}function _b(w,v){for(var b in v)w[b]=v[b];return w}function hb(w,v){for(var b in w)if(b!=="__source"&&!(b in v))return!0;for(var y in v)if(y!=="__source"&&w[y]!==v[y])return!0;return!1}function kb(w,v){this.props=w,this.context=v}(kb.prototype=new M0).isPureReactComponent=!0,kb.prototype.shouldComponentUpdate=function(w,v){return hb(this.props,w)||hb(this.state,v)};var Fb=P.__b;P.__b=function(w){w.type&&w.type.__f&&w.ref&&(w.props.ref=w.ref,w.ref=null),Fb&&Fb(w)};var Py=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ib(w){function v(b){var y=_b({},b);return delete y.ref,w(y,b.ref||null)}return v.$$typeof=Py,v.render=w,v.prototype.isReactComponent=v.__f=!0,v.displayName="ForwardRef("+(w.displayName||w.name)+")",v}var _y=P.__e;P.__e=function(w,v,b,y){if(w.then){for(var d,J=v;J=J.__;)if((d=J.__c)&&d.__c)return v.__e==null&&(v.__e=b.__e,v.__k=b.__k),d.__c(w,v)}_y(w,v,b,y)};var Mb=P.unmount;function Nb(w,v,b){return w&&(w.__c&&w.__c.__H&&(w.__c.__H.__.forEach(function(y){typeof y.__c=="function"&&y.__c()}),w.__c.__H=null),(w=_b({},w)).__c!=null&&(w.__c.__P===b&&(w.__c.__P=v),w.__c.__e=!0,w.__c=null),w.__k=w.__k&&w.__k.map(function(y){return Nb(y,v,b)})),w}function Tb(w,v,b){return w&&b&&(w.__v=null,w.__k=w.__k&&w.__k.map(function(y){return Tb(y,v,b)}),w.__c&&w.__c.__P===v&&(w.__e&&b.appendChild(w.__e),w.__c.__e=!0,w.__c.__P=b)),w}function Jv(){this.__u=0,this.o=null,this.__b=null}function Cb(w){if(!w.__)return null;var v=w.__.__c;return v&&v.__a&&v.__a(w)}function Hw(){this.i=null,this.l=null}P.unmount=function(w){var v=w.__c;v&&(v.__z=!0),v&&v.__R&&v.__R(),v&&32&w.__u&&(w.type=null),Mb&&Mb(w)},(Jv.prototype=new M0).__c=function(w,v){var b=v.__c,y=this;y.o==null&&(y.o=[]),y.o.push(b);var d=Cb(y.__v),J=!1,X=function(){J||y.__z||(J=!0,b.__R=null,d?d(Z):Z())};b.__R=X;var z=b.__P;b.__P=null;var Z=function(){if(!--y.__u){if(y.state.__a){var Q=y.state.__a;y.__v.__k[0]=Tb(Q,Q.__c.__P,Q.__c.__O)}var Y;for(y.setState({__a:y.__b=null});Y=y.o.pop();)Y.__P=z,Y.forceUpdate()}};y.__u++||32&v.__u||y.setState({__a:y.__b=y.__v.__k[0]}),w.then(X,X)},Jv.prototype.componentWillUnmount=function(){this.o=[]},Jv.prototype.render=function(w,v){if(this.__b){if(this.__v.__k){var b=document.createElement("div"),y=this.__v.__k[0].__c;this.__v.__k[0]=Nb(this.__b,b,y.__O=y.__P)}this.__b=null}var d=v.__a&&j(d0,null,w.fallback);return d&&(d.__u&=-33),[j(d0,null,v.__a?null:w.children),d]};var Ab=function(w,v,b){if(++b[1]===b[0]&&w.l.delete(v),w.props.revealOrder&&(w.props.revealOrder[0]!=="t"||!w.l.size))for(b=w.i;b;){for(;b.length>3;)b.pop()();if(b[1]<b[0])break;w.i=b=b[2]}};(Hw.prototype=new M0).__a=function(w){var v=this,b=Cb(v.__v),y=v.l.get(w);return y[0]++,function(d){var J=function(){v.props.revealOrder?(y.push(d),Ab(v,w,y)):d()};b?b(J):J()}},Hw.prototype.render=function(w){this.i=null,this.l=new Map;var v=Z0(w.children);w.revealOrder&&w.revealOrder[0]==="b"&&v.reverse();for(var b=v.length;b--;)this.l.set(v[b],this.i=[1,0,this.i]);return w.children},Hw.prototype.componentDidUpdate=Hw.prototype.componentDidMount=function(){var w=this;this.l.forEach(function(v,b){Ab(w,b,v)})};var Iy=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ny=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ty=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Cy=/[A-Z0-9]/g,Ry=typeof document<"u",Ly=function(w){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(w)};M0.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(w){Object.defineProperty(M0.prototype,w,{configurable:!0,get:function(){return this["UNSAFE_"+w]},set:function(v){Object.defineProperty(this,w,{configurable:!0,writable:!0,value:v})}})});var Gb=P.event;function jy(){}function Sy(){return this.cancelBubble}function gy(){return this.defaultPrevented}P.event=function(w){return Gb&&(w=Gb(w)),w.persist=jy,w.isPropagationStopped=Sy,w.isDefaultPrevented=gy,w.nativeEvent=w};var Rb,ly={enumerable:!1,configurable:!0,get:function(){return this.class}},xb=P.vnode;P.vnode=function(w){typeof w.type=="string"&&function(v){var{props:b,type:y}=v,d={},J=y.indexOf("-")===-1;for(var X in b){var z=b[X];if(!(X==="value"&&("defaultValue"in b)&&z==null||Ry&&X==="children"&&y==="noscript"||X==="class"||X==="className")){var Z=X.toLowerCase();X==="defaultValue"&&"value"in b&&b.value==null?X="value":X==="download"&&z===!0?z="":Z==="translate"&&z==="no"?z=!1:Z[0]==="o"&&Z[1]==="n"?Z==="ondoubleclick"?X="ondblclick":Z!=="onchange"||y!=="input"&&y!=="textarea"||Ly(b.type)?Z==="onfocus"?X="onfocusin":Z==="onblur"?X="onfocusout":Ty.test(X)&&(X=Z):Z=X="oninput":J&&Ny.test(X)?X=X.replace(Cy,"-$&").toLowerCase():z===null&&(z=void 0),Z==="oninput"&&d[X=Z]&&(X="oninputCapture"),d[X]=z}}y=="select"&&d.multiple&&Array.isArray(d.value)&&(d.value=Z0(b.children).forEach(function(Q){Q.props.selected=d.value.indexOf(Q.props.value)!=-1})),y=="select"&&d.defaultValue!=null&&(d.value=Z0(b.children).forEach(function(Q){Q.props.selected=d.multiple?d.defaultValue.indexOf(Q.props.value)!=-1:d.defaultValue==Q.props.value})),b.class&&!b.className?(d.class=b.class,Object.defineProperty(d,"className",ly)):b.className&&(d.class=d.className=b.className),v.props=d}(w),w.$$typeof=Iy,xb&&xb(w)};var Ob=P.__r;P.__r=function(w){Ob&&Ob(w),Rb=w.__c};var Pb=P.diffed;P.diffed=function(w){Pb&&Pb(w);var{props:v,__e:b}=w;b!=null&&w.type==="textarea"&&"value"in v&&v.value!==b.value&&(b.value=v.value==null?"":v.value),Rb=null};var jb=Object.prototype.hasOwnProperty;function Sb(w,v,b){for(b of w.keys())if(_0(b,v))return b}function _0(w,v){var b,y,d;if(w===v)return!0;if(w&&v&&(b=w.constructor)===v.constructor){if(b===Date)return w.getTime()===v.getTime();if(b===RegExp)return w.toString()===v.toString();if(b===Array){if((y=w.length)===v.length)while(y--&&_0(w[y],v[y]));return y===-1}if(b===Set){if(w.size!==v.size)return!1;for(y of w){if(d=y,d&&typeof d==="object"){if(d=Sb(v,d),!d)return!1}if(!v.has(d))return!1}return!0}if(b===Map){if(w.size!==v.size)return!1;for(y of w){if(d=y[0],d&&typeof d==="object"){if(d=Sb(v,d),!d)return!1}if(!_0(y[1],v.get(d)))return!1}return!0}if(b===ArrayBuffer)w=new Uint8Array(w),v=new Uint8Array(v);else if(b===DataView){if((y=w.byteLength)===v.byteLength)while(y--&&w.getInt8(y)===v.getInt8(y));return y===-1}if(ArrayBuffer.isView(w)){if((y=w.byteLength)===v.byteLength)while(y--&&w[y]===v[y]);return y===-1}if(!b||typeof w==="object"){y=0;for(b in w){if(jb.call(w,b)&&++y&&!jb.call(v,b))return!1;if(!(b in v)||!_0(w[b],v[b]))return!1}return Object.keys(v).length===y}}return w!==w&&v!==v}var Xv=(w)=>{let v=i(w),b=i(0);if(typeof w!=="object"||w===null){if(w!==v.current)v.current=w,b.current+=1;return[w,b.current]}if(w!==v.current){if(!_0(w,v.current))v.current=w,b.current+=1}return[v.current,b.current]},iy=(w,v,b)=>{let y=Date.now();clearTimeout(v.current.timeoutId);let d=Math.max(0,v.current.nextAllowedTime-y);v.current.timeoutId=setTimeout(()=>{w().catch(console.error),v.current.nextAllowedTime=y+b},d)},mb=(w,v,b)=>{let y=v?Array.isArray(v)?v:[v]:[];if(w==null||typeof w==="string"&&!w.trim())return{languageId:"plaintext",displayLanguageId:"plaintext",langsToLoad:void 0};if(typeof w==="object")return{languageId:w.name,displayLanguageId:w.name||null,langsToLoad:w};let d=w.toLowerCase(),J=(z)=>z?.toLowerCase()===d,X=y.find((z)=>J(z.name)||J(z.scopeName)||J(z.scopeName?.split(".").pop())||z.aliases?.some(J)||z.fileTypes?.some(J));if(X)return{languageId:X.name||w,displayLanguageId:w,langsToLoad:X};if(b?.[w])return{languageId:b[w],displayLanguageId:w,langsToLoad:b[w]};return{languageId:w,displayLanguageId:w,langsToLoad:w}},gb=(w)=>typeof w==="object"&&w!==null&&("tokenColors"in w)&&Array.isArray(w.tokenColors);function oy(w){let v=gb(w),b=typeof w==="object"&&w!==null&&!v,y=typeof w==="object"&&w!==null&&!v&&Object.entries(w).some(([d,J])=>d&&J&&d.trim()!==""&&J!==""&&(typeof J==="string"||gb(J)));if(b)return{isMultiTheme:!0,themeId:y?`multi-${Object.values(w).map((J)=>(typeof J==="string"?J:J?.name)||"custom").sort().join("-")}`:"multi-default",multiTheme:y?w:null,themesToLoad:y?Object.values(w):[]};return{isMultiTheme:!1,themeId:typeof w==="string"?w:w?.name||"custom",singleTheme:w,themesToLoad:[w]}}function cy(w=1){return{name:"react-shiki:line-numbers",code(v){if(this.addClassToHast(v,"has-line-numbers"),w!==1){let b=v.properties?.style||"",y=b?`${b}; --line-start: ${w}`:`--line-start: ${w}`;v.properties={...v.properties,style:y}}},line(v){return this.addClassToHast(v,"line-numbers"),v}}}var lb={light:"github-light",dark:"github-dark"},ib=(w,v,b,y={},d)=>{let[J,X]=T(null),[z,Z]=Xv(v),[Q,Y]=Xv(b),[q,K]=Xv(y),{languageId:$,langsToLoad:H}=a(()=>mb(z,q.customLanguages,q.langAlias),[z,q.customLanguages,q.langAlias]),{isMultiTheme:h,themeId:E,multiTheme:G,singleTheme:x,themesToLoad:M}=a(()=>oy(Q),[Q]),U=i({nextAllowedTime:0,timeoutId:void 0}),L=a(()=>{let N={lang:$},{defaultColor:c,cssVariablePrefix:W,showLineNumbers:k,startingLineNumber:s,...v0}=q,b0=h?{themes:G||lb,defaultColor:c,cssVariablePrefix:W}:{theme:x||lb.dark},y0=v0.transformers||[];if(k)y0.push(cy(s));return{...N,...b0,...v0,transformers:y0}},[$,E,Z,Y,K]);return X0(()=>{let N=!0,c=async()=>{if(!$)return;let k=q.highlighter?q.highlighter:await d(H,M,q.engine),v0=k.getLoadedLanguages().includes($)?$:"plaintext",b0={...L,lang:v0};if(N){let y0=q.outputFormat==="html"?k.codeToHtml(w,b0):Lb(k.codeToHast(w,b0),{jsx:f,jsxs:f,Fragment:d0});X(y0)}},{delay:W}=q;if(W)iy(c,U,W);else c().catch(console.error);return()=>{N=!1,clearTimeout(U.current.timeoutId)}},[w,L,q.delay,q.highlighter,H,M]),J};function py(w,{insertAt:v}={}){if(!w||typeof document>"u")return;let b=document.head||document.getElementsByTagName("head")[0],y=document.createElement("style");if(y.type="text/css",v==="top")if(b.firstChild)b.insertBefore(y,b.firstChild);else b.appendChild(y);else b.appendChild(y);if(y.styleSheet)y.styleSheet.cssText=w;else y.appendChild(document.createTextNode(w))}py(`.relative {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.defaultStyles pre {
|
|
5
|
+
overflow: auto;
|
|
6
|
+
border-radius: 0.5rem;
|
|
7
|
+
padding-left: 1.5rem;
|
|
8
|
+
padding-right: 1.5rem;
|
|
9
|
+
padding-top: 1.25rem;
|
|
10
|
+
padding-bottom: 1.25rem;
|
|
11
|
+
}
|
|
12
|
+
.languageLabel {
|
|
13
|
+
position: absolute;
|
|
14
|
+
right: 0.75rem;
|
|
15
|
+
top: 0.5rem;
|
|
16
|
+
font-family: monospace;
|
|
17
|
+
font-size: 0.75rem;
|
|
18
|
+
letter-spacing: -0.05em;
|
|
19
|
+
color: rgba(107, 114, 128, 0.85);
|
|
20
|
+
}
|
|
21
|
+
.line-numbers::before {
|
|
22
|
+
counter-increment: line-number;
|
|
23
|
+
content: counter(line-number);
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
justify-content: flex-end;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
box-sizing: content-box;
|
|
28
|
+
min-width: var(--line-numbers-width, 2ch);
|
|
29
|
+
padding-left: var(--line-numbers-padding-left, 2ch);
|
|
30
|
+
padding-right: var(--line-numbers-padding-right, 2ch);
|
|
31
|
+
color: var(--line-numbers-foreground, rgba(107, 114, 128, 0.6));
|
|
32
|
+
font-size: var(--line-numbers-font-size, inherit);
|
|
33
|
+
font-weight: var(--line-numbers-font-weight, inherit);
|
|
34
|
+
line-height: var(--line-numbers-line-height, inherit);
|
|
35
|
+
font-family: var(--line-numbers-font-family, inherit);
|
|
36
|
+
opacity: var(--line-numbers-opacity, 1);
|
|
37
|
+
user-select: none;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
}
|
|
40
|
+
.has-line-numbers {
|
|
41
|
+
counter-reset: line-number calc(var(--line-start, 1) - 1);
|
|
42
|
+
--line-numbers-foreground: rgba(107, 114, 128, 0.5);
|
|
43
|
+
--line-numbers-width: 2ch;
|
|
44
|
+
--line-numbers-padding-left: 0ch;
|
|
45
|
+
--line-numbers-padding-right: 2ch;
|
|
46
|
+
--line-numbers-font-size: inherit;
|
|
47
|
+
--line-numbers-font-weight: inherit;
|
|
48
|
+
--line-numbers-line-height: inherit;
|
|
49
|
+
--line-numbers-font-family: inherit;
|
|
50
|
+
--line-numbers-opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
`);var ob=(w)=>{return Ib(({language:v,theme:b,delay:y,transformers:d,defaultColor:J,cssVariablePrefix:X,addDefaultStyles:z=!0,style:Z,langStyle:Q,className:Y,langClassName:q,showLanguage:K=!0,showLineNumbers:$=!1,startingLineNumber:H=1,children:h,as:E="pre",customLanguages:G,...x},M)=>{let U={delay:y,transformers:d,customLanguages:G,showLineNumbers:$,defaultColor:J,cssVariablePrefix:X,startingLineNumber:H,...x},{displayLanguageId:L}=mb(v,G),N=w(h,v,b,U),c=typeof N==="string";return f(E,{ref:M,"data-testid":"shiki-container",className:h0("relative","not-prose",z&&"defaultStyles",Y),style:Z,id:"shiki-container",children:[K&&L?f("span",{className:h0("languageLabel",q),style:Q,id:"language-label",children:L}):null,c?f("div",{dangerouslySetInnerHTML:{__html:N}}):N]})})};function pb(w,v){if(w<v)return-1;if(w>v)return 1;return 0}function ub(w,v){if(w===null&&v===null)return 0;if(!w)return-1;if(!v)return 1;let b=w.length,y=v.length;if(b===y){for(let d=0;d<b;d++){let J=pb(w[d],v[d]);if(J!==0)return J}return 0}return b-y}function cb(w){if(/^#[0-9a-f]{6}$/i.test(w))return!0;if(/^#[0-9a-f]{8}$/i.test(w))return!0;if(/^#[0-9a-f]{3}$/i.test(w))return!0;if(/^#[0-9a-f]{4}$/i.test(w))return!0;return!1}function uy(w){return w.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ab=class{constructor(w){this.fn=w}cache=new Map;get(w){if(this.cache.has(w))return this.cache.get(w);let v=this.fn(w);return this.cache.set(w,v),v}},tb=class{constructor(w,v,b){this._colorMap=w,this._defaults=v,this._root=b}static createFromRawTheme(w,v){return this.createFromParsedTheme(ny(w),v)}static createFromParsedTheme(w,v){return ey(w,v)}_cachedMatchRoot=new ab((w)=>this._root.match(w));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(w){if(w===null)return this._defaults;let v=w.scopeName,y=this._cachedMatchRoot.get(v).find((d)=>ay(w.parent,d.parentScopes));if(!y)return null;return new nb(y.fontStyle,y.foreground,y.background)}},zv=class w{constructor(v,b){this.parent=v,this.scopeName=b}static push(v,b){for(let y of b)v=new w(v,y);return v}static from(...v){let b=null;for(let y=0;y<v.length;y++)b=new w(b,v[y]);return b}push(v){return new w(this,v)}getSegments(){let v=this,b=[];while(v)b.push(v.scopeName),v=v.parent;return b.reverse(),b}toString(){return this.getSegments().join(" ")}extends(v){if(this===v)return!0;if(this.parent===null)return!1;return this.parent.extends(v)}getExtensionIfDefined(v){let b=[],y=this;while(y&&y!==v)b.push(y.scopeName),y=y.parent;return y===v?b.reverse():void 0}};function ay(w,v){if(v.length===0)return!0;for(let b=0;b<v.length;b++){let y=v[b],d=!1;if(y===">"){if(b===v.length-1)return!1;y=v[++b],d=!0}while(w){if(ty(w.scopeName,y))break;if(d)return!1;w=w.parent}if(!w)return!1;w=w.parent}return!0}function ty(w,v){return v===w||w.startsWith(v)&&w[v.length]==="."}var nb=class{constructor(w,v,b){this.fontStyle=w,this.foregroundId=v,this.backgroundId=b}};function ny(w){if(!w)return[];if(!w.settings||!Array.isArray(w.settings))return[];let v=w.settings,b=[],y=0;for(let d=0,J=v.length;d<J;d++){let X=v[d];if(!X.settings)continue;let z;if(typeof X.scope==="string"){let q=X.scope;q=q.replace(/^[,]+/,""),q=q.replace(/[,]+$/,""),z=q.split(",")}else if(Array.isArray(X.scope))z=X.scope;else z=[""];let Z=-1;if(typeof X.settings.fontStyle==="string"){Z=0;let q=X.settings.fontStyle.split(" ");for(let K=0,$=q.length;K<$;K++)switch(q[K]){case"italic":Z=Z|1;break;case"bold":Z=Z|2;break;case"underline":Z=Z|4;break;case"strikethrough":Z=Z|8;break}}let Q=null;if(typeof X.settings.foreground==="string"&&cb(X.settings.foreground))Q=X.settings.foreground;let Y=null;if(typeof X.settings.background==="string"&&cb(X.settings.background))Y=X.settings.background;for(let q=0,K=z.length;q<K;q++){let H=z[q].trim().split(" "),h=H[H.length-1],E=null;if(H.length>1)E=H.slice(0,H.length-1),E.reverse();b[y++]=new sy(h,E,d,Z,Q,Y)}}return b}var sy=class{constructor(w,v,b,y,d,J){this.scope=w,this.parentScopes=v,this.index=b,this.fontStyle=y,this.foreground=d,this.background=J}};function ey(w,v){w.sort((Z,Q)=>{let Y=pb(Z.scope,Q.scope);if(Y!==0)return Y;if(Y=ub(Z.parentScopes,Q.parentScopes),Y!==0)return Y;return Z.index-Q.index});let b=0,y="#000000",d="#ffffff";while(w.length>=1&&w[0].scope===""){let Z=w.shift();if(Z.fontStyle!==-1)b=Z.fontStyle;if(Z.foreground!==null)y=Z.foreground;if(Z.background!==null)d=Z.background}let J=new w5(v),X=new nb(b,J.getId(y),J.getId(d)),z=new b5(new Yv(0,null,-1,0,0),[]);for(let Z=0,Q=w.length;Z<Q;Z++){let Y=w[Z];z.insert(0,Y.scope,Y.parentScopes,Y.fontStyle,J.getId(Y.foreground),J.getId(Y.background))}return new tb(J,X,z)}var w5=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(w){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(w)){this._isFrozen=!0;for(let v=0,b=w.length;v<b;v++)this._color2id[w[v]]=v,this._id2color[v]=w[v]}else this._isFrozen=!1}getId(w){if(w===null)return 0;w=w.toUpperCase();let v=this._color2id[w];if(v)return v;if(this._isFrozen)throw Error(`Missing color in color map - ${w}`);return v=++this._lastColorId,this._color2id[w]=v,this._id2color[v]=w,v}getColorMap(){return this._id2color.slice(0)}},v5=Object.freeze([]),Yv=class w{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(v,b,y,d,J){this.scopeDepth=v,this.parentScopes=b||v5,this.fontStyle=y,this.foreground=d,this.background=J}clone(){return new w(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(v){let b=[];for(let y=0,d=v.length;y<d;y++)b[y]=v[y].clone();return b}acceptOverwrite(v,b,y,d){if(this.scopeDepth>v)console.log("how did this happen?");else this.scopeDepth=v;if(b!==-1)this.fontStyle=b;if(y!==0)this.foreground=y;if(d!==0)this.background=d}},b5=class w{constructor(v,b=[],y={}){this._mainRule=v,this._children=y,this._rulesWithParentScopes=b}_rulesWithParentScopes;static _cmpBySpecificity(v,b){if(v.scopeDepth!==b.scopeDepth)return b.scopeDepth-v.scopeDepth;let y=0,d=0;while(!0){if(v.parentScopes[y]===">")y++;if(b.parentScopes[d]===">")d++;if(y>=v.parentScopes.length||d>=b.parentScopes.length)break;let J=b.parentScopes[d].length-v.parentScopes[y].length;if(J!==0)return J;y++,d++}return b.parentScopes.length-v.parentScopes.length}match(v){if(v!==""){let y=v.indexOf("."),d,J;if(y===-1)d=v,J="";else d=v.substring(0,y),J=v.substring(y+1);if(this._children.hasOwnProperty(d))return this._children[d].match(J)}let b=this._rulesWithParentScopes.concat(this._mainRule);return b.sort(w._cmpBySpecificity),b}insert(v,b,y,d,J,X){if(b===""){this._doInsertHere(v,y,d,J,X);return}let z=b.indexOf("."),Z,Q;if(z===-1)Z=b,Q="";else Z=b.substring(0,z),Q=b.substring(z+1);let Y;if(this._children.hasOwnProperty(Z))Y=this._children[Z];else Y=new w(this._mainRule.clone(),Yv.cloneArr(this._rulesWithParentScopes)),this._children[Z]=Y;Y.insert(v+1,Q,y,d,J,X)}_doInsertHere(v,b,y,d,J){if(b===null){this._mainRule.acceptOverwrite(v,y,d,J);return}for(let X=0,z=this._rulesWithParentScopes.length;X<z;X++){let Z=this._rulesWithParentScopes[X];if(ub(Z.parentScopes,b)===0){Z.acceptOverwrite(v,y,d,J);return}}if(y===-1)y=this._mainRule.fontStyle;if(d===0)d=this._mainRule.foreground;if(J===0)J=this._mainRule.background;this._rulesWithParentScopes.push(new Yv(v,b,y,d,J))}},sb=class w{static toBinaryStr(v){return v.toString(2).padStart(32,"0")}static print(v){let b=w.getLanguageId(v),y=w.getTokenType(v),d=w.getFontStyle(v),J=w.getForeground(v),X=w.getBackground(v);console.log({languageId:b,tokenType:y,fontStyle:d,foreground:J,background:X})}static getLanguageId(v){return(v&255)>>>0}static getTokenType(v){return(v&768)>>>8}static containsBalancedBrackets(v){return(v&1024)!==0}static getFontStyle(v){return(v&30720)>>>11}static getForeground(v){return(v&16744448)>>>15}static getBackground(v){return(v&4278190080)>>>24}static set(v,b,y,d,J,X,z){let Z=w.getLanguageId(v),Q=w.getTokenType(v),Y=w.containsBalancedBrackets(v)?1:0,q=w.getFontStyle(v),K=w.getForeground(v),$=w.getBackground(v);if(b!==0)Z=b;if(y!==8)Q=y5(y);if(d!==null)Y=d?1:0;if(J!==-1)q=J;if(X!==0)K=X;if(z!==0)$=z;return(Z<<0|Q<<8|Y<<10|q<<11|K<<15|$<<24)>>>0}};function y5(w){return w}var Jd=Symbol("RuleId");function f5(w){return w}function d5(w){return w}var Zv=class{constructor(w,v){this.languageId=w,this.tokenType=v}},Xd=class w{_defaultAttributes;_embeddedLanguagesMatcher;constructor(v,b){this._defaultAttributes=new Zv(v,8),this._embeddedLanguagesMatcher=new J5(Object.entries(b||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(v){if(v===null)return w._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(v)}static _NULL_SCOPE_METADATA=new Zv(0,0);_getBasicScopeAttributes=new ab((v)=>{let b=this._scopeToLanguage(v),y=this._toStandardTokenType(v);return new Zv(b,y)});_scopeToLanguage(v){return this._embeddedLanguagesMatcher.match(v)||0}_toStandardTokenType(v){let b=v.match(w.STANDARD_TOKEN_TYPE_REGEXP);if(!b)return 8;switch(b[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},J5=class{values;scopesRegExp;constructor(w){if(w.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(w);let v=w.map(([b,y])=>uy(b));v.sort(),v.reverse(),this.scopesRegExp=new RegExp(`^((${v.join(")|(")}))($|\\.)`,"")}}match(w){if(!this.scopesRegExp)return;let v=w.match(this.scopesRegExp);if(!v)return;return this.values.get(v[1])}},zd={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG};var Qv=class w{constructor(v,b,y){this.parent=v,this.scopePath=b,this.tokenAttributes=y}static fromExtension(v,b){let y=v,d=v?.scopePath??null;for(let J of b)d=zv.push(d,J.scopeNames),y=new w(y,d,J.encodedTokenAttributes);return y}static createRoot(v,b){return new w(null,new zv(null,v),b)}static createRootAndLookUpScopeName(v,b,y){let d=y.getMetadataForScope(v),J=new zv(null,v),X=y.themeProvider.themeMatch(J),z=w.mergeAttributes(b,d,X);return new w(null,J,z)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(v){return w.equals(this,v)}static equals(v,b){do{if(v===b)return!0;if(!v&&!b)return!0;if(!v||!b)return!1;if(v.scopeName!==b.scopeName||v.tokenAttributes!==b.tokenAttributes)return!1;v=v.parent,b=b.parent}while(!0)}static mergeAttributes(v,b,y){let d=-1,J=0,X=0;if(y!==null)d=y.fontStyle,J=y.foregroundId,X=y.backgroundId;return sb.set(v,b.languageId,b.tokenType,null,d,J,X)}pushAttributed(v,b){if(v===null)return this;if(v.indexOf(" ")===-1)return w._pushAttributed(this,v,b);let y=v.split(/ /g),d=this;for(let J of y)d=w._pushAttributed(d,J,b);return d}static _pushAttributed(v,b,y){let d=y.getMetadataForScope(b),J=v.scopePath.push(b),X=y.themeProvider.themeMatch(J),z=w.mergeAttributes(v.tokenAttributes,d,X);return new w(v,J,z)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(v){let b=[],y=this;while(y&&y!==v)b.push({encodedTokenAttributes:y.tokenAttributes,scopeNames:y.scopePath.getExtensionIfDefined(y.parent?.scopePath??null)}),y=y.parent;return y===v?b.reverse():void 0}},X5=class w{constructor(v,b,y,d,J,X,z,Z){this.parent=v,this.ruleId=b,this.beginRuleCapturedEOL=J,this.endRule=X,this.nameScopesList=z,this.contentNameScopesList=Z,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=y,this._anchorPos=d}_stackElementBrand=void 0;static NULL=new w(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(v){if(v===null)return!1;return w._equals(this,v)}static _equals(v,b){if(v===b)return!0;if(!this._structuralEquals(v,b))return!1;return Qv.equals(v.contentNameScopesList,b.contentNameScopesList)}static _structuralEquals(v,b){do{if(v===b)return!0;if(!v&&!b)return!0;if(!v||!b)return!1;if(v.depth!==b.depth||v.ruleId!==b.ruleId||v.endRule!==b.endRule)return!1;v=v.parent,b=b.parent}while(!0)}clone(){return this}static _reset(v){while(v)v._enterPos=-1,v._anchorPos=-1,v=v.parent}reset(){w._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(v,b,y,d,J,X,z){return new w(this,v,b,y,d,J,X,z)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(v){return v.getRule(this.ruleId)}toString(){let v=[];return this._writeString(v,0),"["+v.join(",")+"]"}_writeString(v,b){if(this.parent)b=this.parent._writeString(v,b);return v[b++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,b}withContentNameScopesList(v){if(this.contentNameScopesList===v)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,v)}withEndRule(v){if(this.endRule===v)return this;return new w(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,v,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(v){let b=this;while(b&&b._enterPos===v._enterPos){if(b.ruleId===v.ruleId)return!0;b=b.parent}return!1}toStateStackFrame(){return{ruleId:d5(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(v,b){let y=Qv.fromExtension(v?.nameScopesList??null,b.nameScopesList);return new w(v,f5(b.ruleId),b.enterPos??-1,b.anchorPos??-1,b.beginRuleCapturedEOL,b.endRule,y,Qv.fromExtension(y,b.contentNameScopesList))}};var z5=X5.NULL;class rw extends Error{constructor(w){super(w);this.name="ShikiError"}}function Q5(){return 2147483648}function Y5(){return typeof performance<"u"?performance.now():Date.now()}var K5=(w,v)=>w+(v-w%v)%v;async function $5(w){let v,b,y={};function d($){b=$,y.HEAPU8=new Uint8Array($),y.HEAPU32=new Uint32Array($)}function J($,H,h){y.HEAPU8.copyWithin($,H,H+h)}function X($){try{return v.grow($-b.byteLength+65535>>>16),d(v.buffer),1}catch{}}function z($){let H=y.HEAPU8.length;$=$>>>0;let h=Q5();if($>h)return!1;for(let E=1;E<=4;E*=2){let G=H*(1+0.2/E);G=Math.min(G,$+100663296);let x=Math.min(h,K5(Math.max($,G),65536));if(X(x))return!0}return!1}let Z=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function Q($,H,h=1024){let E=H+h,G=H;while($[G]&&!(G>=E))++G;if(G-H>16&&$.buffer&&Z)return Z.decode($.subarray(H,G));let x="";while(H<G){let M=$[H++];if(!(M&128)){x+=String.fromCharCode(M);continue}let U=$[H++]&63;if((M&224)===192){x+=String.fromCharCode((M&31)<<6|U);continue}let L=$[H++]&63;if((M&240)===224)M=(M&15)<<12|U<<6|L;else M=(M&7)<<18|U<<12|L<<6|$[H++]&63;if(M<65536)x+=String.fromCharCode(M);else{let N=M-65536;x+=String.fromCharCode(55296|N>>10,56320|N&1023)}}return x}function Y($,H){return $?Q(y.HEAPU8,$,H):""}let q={emscripten_get_now:Y5,emscripten_memcpy_big:J,emscripten_resize_heap:z,fd_write:()=>0};async function K(){let H=await w({env:q,wasi_snapshot_preview1:q});v=H.memory,d(v.buffer),Object.assign(y,H),y.UTF8ToString=Y}return await K(),y}var q5=Object.defineProperty,D5=(w,v,b)=>(v in w)?q5(w,v,{enumerable:!0,configurable:!0,writable:!0,value:b}):w[v]=b,l=(w,v,b)=>D5(w,typeof v!=="symbol"?v+"":v,b),o=null;function H5(w){throw new rw(w.UTF8ToString(w.getLastOnigError()))}class Ww{constructor(w){l(this,"utf16Length"),l(this,"utf8Length"),l(this,"utf16Value"),l(this,"utf8Value"),l(this,"utf16OffsetToUtf8"),l(this,"utf8OffsetToUtf16");let v=w.length,b=Ww._utf8ByteLength(w),y=b!==v,d=y?new Uint32Array(v+1):null;if(y)d[v]=b;let J=y?new Uint32Array(b+1):null;if(y)J[b]=v;let X=new Uint8Array(b),z=0;for(let Z=0;Z<v;Z++){let Q=w.charCodeAt(Z),Y=Q,q=!1;if(Q>=55296&&Q<=56319){if(Z+1<v){let K=w.charCodeAt(Z+1);if(K>=56320&&K<=57343)Y=(Q-55296<<10)+65536|K-56320,q=!0}}if(y){if(d[Z]=z,q)d[Z+1]=z;if(Y<=127)J[z+0]=Z;else if(Y<=2047)J[z+0]=Z,J[z+1]=Z;else if(Y<=65535)J[z+0]=Z,J[z+1]=Z,J[z+2]=Z;else J[z+0]=Z,J[z+1]=Z,J[z+2]=Z,J[z+3]=Z}if(Y<=127)X[z++]=Y;else if(Y<=2047)X[z++]=192|(Y&1984)>>>6,X[z++]=128|(Y&63)>>>0;else if(Y<=65535)X[z++]=224|(Y&61440)>>>12,X[z++]=128|(Y&4032)>>>6,X[z++]=128|(Y&63)>>>0;else X[z++]=240|(Y&1835008)>>>18,X[z++]=128|(Y&258048)>>>12,X[z++]=128|(Y&4032)>>>6,X[z++]=128|(Y&63)>>>0;if(q)Z++}this.utf16Length=v,this.utf8Length=b,this.utf16Value=w,this.utf8Value=X,this.utf16OffsetToUtf8=d,this.utf8OffsetToUtf16=J}static _utf8ByteLength(w){let v=0;for(let b=0,y=w.length;b<y;b++){let d=w.charCodeAt(b),J=d,X=!1;if(d>=55296&&d<=56319){if(b+1<y){let z=w.charCodeAt(b+1);if(z>=56320&&z<=57343)J=(d-55296<<10)+65536|z-56320,X=!0}}if(J<=127)v+=1;else if(J<=2047)v+=2;else if(J<=65535)v+=3;else v+=4;if(X)b++}return v}createString(w){let v=w.omalloc(this.utf8Length);return w.HEAPU8.set(this.utf8Value,v),v}}var Uw=class w{constructor(v){if(l(this,"id",++w.LAST_ID),l(this,"_onigBinding"),l(this,"content"),l(this,"utf16Length"),l(this,"utf8Length"),l(this,"utf16OffsetToUtf8"),l(this,"utf8OffsetToUtf16"),l(this,"ptr"),!o)throw new rw("Must invoke loadWasm first.");this._onigBinding=o,this.content=v;let b=new Ww(v);if(this.utf16Length=b.utf16Length,this.utf8Length=b.utf8Length,this.utf16OffsetToUtf8=b.utf16OffsetToUtf8,this.utf8OffsetToUtf16=b.utf8OffsetToUtf16,this.utf8Length<1e4&&!w._sharedPtrInUse){if(!w._sharedPtr)w._sharedPtr=o.omalloc(1e4);w._sharedPtrInUse=!0,o.HEAPU8.set(b.utf8Value,w._sharedPtr),this.ptr=w._sharedPtr}else this.ptr=b.createString(o)}convertUtf8OffsetToUtf16(v){if(this.utf8OffsetToUtf16){if(v<0)return 0;if(v>this.utf8Length)return this.utf16Length;return this.utf8OffsetToUtf16[v]}return v}convertUtf16OffsetToUtf8(v){if(this.utf16OffsetToUtf8){if(v<0)return 0;if(v>this.utf16Length)return this.utf8Length;return this.utf16OffsetToUtf8[v]}return v}dispose(){if(this.ptr===w._sharedPtr)w._sharedPtrInUse=!1;else this._onigBinding.ofree(this.ptr)}};l(Uw,"LAST_ID",0);l(Uw,"_sharedPtr",0);l(Uw,"_sharedPtrInUse",!1);var eb=Uw;class w1{constructor(w){if(l(this,"_onigBinding"),l(this,"_ptr"),!o)throw new rw("Must invoke loadWasm first.");let v=[],b=[];for(let X=0,z=w.length;X<z;X++){let Z=new Ww(w[X]);v[X]=Z.createString(o),b[X]=Z.utf8Length}let y=o.omalloc(4*w.length);o.HEAPU32.set(v,y/4);let d=o.omalloc(4*w.length);o.HEAPU32.set(b,d/4);let J=o.createOnigScanner(y,d,w.length);for(let X=0,z=w.length;X<z;X++)o.ofree(v[X]);if(o.ofree(d),o.ofree(y),J===0)H5(o);this._onigBinding=o,this._ptr=J}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(w,v,b){let y=0;if(typeof b==="number")y=b;if(typeof w==="string"){w=new eb(w);let d=this._findNextMatchSync(w,v,!1,y);return w.dispose(),d}return this._findNextMatchSync(w,v,!1,y)}_findNextMatchSync(w,v,b,y){let d=this._onigBinding,J=d.findNextOnigScannerMatch(this._ptr,w.id,w.ptr,w.utf8Length,w.convertUtf16OffsetToUtf8(v),y);if(J===0)return null;let X=d.HEAPU32,z=J/4,Z=X[z++],Q=X[z++],Y=[];for(let q=0;q<Q;q++){let K=w.convertUtf8OffsetToUtf16(X[z++]),$=w.convertUtf8OffsetToUtf16(X[z++]);Y[q]={start:K,end:$,length:$-K}}return{index:Z,captureIndices:Y}}}function V5(w){return typeof w.instantiator==="function"}function r5(w){return typeof w.default==="function"}function W5(w){return typeof w.data<"u"}function U5(w){return typeof Response<"u"&&w instanceof Response}function B5(w){return typeof ArrayBuffer<"u"&&(w instanceof ArrayBuffer||ArrayBuffer.isView(w))||typeof Buffer<"u"&&Buffer.isBuffer?.(w)||typeof SharedArrayBuffer<"u"&&w instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&w instanceof Uint32Array}var Vw;function E5(w){if(Vw)return Vw;async function v(){o=await $5(async(b)=>{let y=w;if(y=await y,typeof y==="function")y=await y(b);if(typeof y==="function")y=await y(b);if(V5(y))y=await y.instantiator(b);else if(r5(y))y=await y.default(b);else{if(W5(y))y=y.data;if(U5(y))if(typeof WebAssembly.instantiateStreaming==="function")y=await h5(y)(b);else y=await k5(y)(b);else if(B5(y))y=await $v(y)(b);else if(y instanceof WebAssembly.Module)y=await $v(y)(b);else if("default"in y&&y.default instanceof WebAssembly.Module)y=await $v(y.default)(b)}if("instance"in y)y=y.instance;if("exports"in y)y=y.exports;return y})}return Vw=v(),Vw}function $v(w){return(v)=>WebAssembly.instantiate(w,v)}function h5(w){return(v)=>WebAssembly.instantiateStreaming(w,v)}function k5(w){return async(v)=>{let b=await w.arrayBuffer();return WebAssembly.instantiate(b,v)}}async function qv(w){if(w)await E5(w);return{createScanner(v){return new w1(v.map((b)=>typeof b==="string"?b:b.source))},createString(v){return new eb(v)}}}function Dv(w){return w.replace(/[- _]+/g,"").toLowerCase()}var v1=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;var b1=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});var z7=new RegExp(String.raw`(?<noncapturingStart>${v1})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");var M5=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Z7=new RegExp(String.raw`
|
|
53
|
+
\\(?: \d+
|
|
54
|
+
| c[A-Za-z]
|
|
55
|
+
| [gk]<[^>]+>
|
|
56
|
+
| [pPu]\{[^\}]+\}
|
|
57
|
+
| u[A-Fa-f\d]{4}
|
|
58
|
+
| x[A-Fa-f\d]{2}
|
|
59
|
+
)
|
|
60
|
+
| \((?: \? (?: [:=!>]
|
|
61
|
+
| <(?:[=!]|[^>]+>)
|
|
62
|
+
| [A-Za-z\-]+:
|
|
63
|
+
| \(DEFINE\)
|
|
64
|
+
))?
|
|
65
|
+
| (?<qBase>${M5})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
66
|
+
| \\?.
|
|
67
|
+
`.replace(/\s+/g,""),"gsu");var t0=String.raw,x5=t0`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,O5=t0`\(\?R=(?<rDepth>[^\)]+)\)|${x5}`,y1=t0`\(\?<(?![=!])(?<captureName>[^>]+)>`,U7=t0`${y1}|(?<unnamed>\()(?!\?)`,B7=new RegExp(t0`${y1}|${O5}|\(\?|\\?.`,"gsu");var{fromCodePoint:e,raw:I}=String,Bw={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};Bw.bugFlagVLiteralHyphenIsRange=Bw.unicodeSets?(()=>{try{new RegExp(I`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Bw.bugNestedClassIgnoresNegation=Bw.unicodeSets&&new RegExp("[[^a]]","v").test("a");function C5(w,v,b){if(!w.has(v))w.set(v,b);return w.get(v)}var T7=new Set([e(304),e(305)]),C7=I`[\p{L}\p{M}\p{N}\p{Pc}]`;var R7=new Map(`C Other
|
|
68
|
+
Cc Control cntrl
|
|
69
|
+
Cf Format
|
|
70
|
+
Cn Unassigned
|
|
71
|
+
Co Private_Use
|
|
72
|
+
Cs Surrogate
|
|
73
|
+
L Letter
|
|
74
|
+
LC Cased_Letter
|
|
75
|
+
Ll Lowercase_Letter
|
|
76
|
+
Lm Modifier_Letter
|
|
77
|
+
Lo Other_Letter
|
|
78
|
+
Lt Titlecase_Letter
|
|
79
|
+
Lu Uppercase_Letter
|
|
80
|
+
M Mark Combining_Mark
|
|
81
|
+
Mc Spacing_Mark
|
|
82
|
+
Me Enclosing_Mark
|
|
83
|
+
Mn Nonspacing_Mark
|
|
84
|
+
N Number
|
|
85
|
+
Nd Decimal_Number digit
|
|
86
|
+
Nl Letter_Number
|
|
87
|
+
No Other_Number
|
|
88
|
+
P Punctuation punct
|
|
89
|
+
Pc Connector_Punctuation
|
|
90
|
+
Pd Dash_Punctuation
|
|
91
|
+
Pe Close_Punctuation
|
|
92
|
+
Pf Final_Punctuation
|
|
93
|
+
Pi Initial_Punctuation
|
|
94
|
+
Po Other_Punctuation
|
|
95
|
+
Ps Open_Punctuation
|
|
96
|
+
S Symbol
|
|
97
|
+
Sc Currency_Symbol
|
|
98
|
+
Sk Modifier_Symbol
|
|
99
|
+
Sm Math_Symbol
|
|
100
|
+
So Other_Symbol
|
|
101
|
+
Z Separator
|
|
102
|
+
Zl Line_Separator
|
|
103
|
+
Zp Paragraph_Separator
|
|
104
|
+
Zs Space_Separator
|
|
105
|
+
ASCII
|
|
106
|
+
ASCII_Hex_Digit AHex
|
|
107
|
+
Alphabetic Alpha
|
|
108
|
+
Any
|
|
109
|
+
Assigned
|
|
110
|
+
Bidi_Control Bidi_C
|
|
111
|
+
Bidi_Mirrored Bidi_M
|
|
112
|
+
Case_Ignorable CI
|
|
113
|
+
Cased
|
|
114
|
+
Changes_When_Casefolded CWCF
|
|
115
|
+
Changes_When_Casemapped CWCM
|
|
116
|
+
Changes_When_Lowercased CWL
|
|
117
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
118
|
+
Changes_When_Titlecased CWT
|
|
119
|
+
Changes_When_Uppercased CWU
|
|
120
|
+
Dash
|
|
121
|
+
Default_Ignorable_Code_Point DI
|
|
122
|
+
Deprecated Dep
|
|
123
|
+
Diacritic Dia
|
|
124
|
+
Emoji
|
|
125
|
+
Emoji_Component EComp
|
|
126
|
+
Emoji_Modifier EMod
|
|
127
|
+
Emoji_Modifier_Base EBase
|
|
128
|
+
Emoji_Presentation EPres
|
|
129
|
+
Extended_Pictographic ExtPict
|
|
130
|
+
Extender Ext
|
|
131
|
+
Grapheme_Base Gr_Base
|
|
132
|
+
Grapheme_Extend Gr_Ext
|
|
133
|
+
Hex_Digit Hex
|
|
134
|
+
IDS_Binary_Operator IDSB
|
|
135
|
+
IDS_Trinary_Operator IDST
|
|
136
|
+
ID_Continue IDC
|
|
137
|
+
ID_Start IDS
|
|
138
|
+
Ideographic Ideo
|
|
139
|
+
Join_Control Join_C
|
|
140
|
+
Logical_Order_Exception LOE
|
|
141
|
+
Lowercase Lower
|
|
142
|
+
Math
|
|
143
|
+
Noncharacter_Code_Point NChar
|
|
144
|
+
Pattern_Syntax Pat_Syn
|
|
145
|
+
Pattern_White_Space Pat_WS
|
|
146
|
+
Quotation_Mark QMark
|
|
147
|
+
Radical
|
|
148
|
+
Regional_Indicator RI
|
|
149
|
+
Sentence_Terminal STerm
|
|
150
|
+
Soft_Dotted SD
|
|
151
|
+
Terminal_Punctuation Term
|
|
152
|
+
Unified_Ideograph UIdeo
|
|
153
|
+
Uppercase Upper
|
|
154
|
+
Variation_Selector VS
|
|
155
|
+
White_Space space
|
|
156
|
+
XID_Continue XIDC
|
|
157
|
+
XID_Start XIDS`.split(/\s/).map((w)=>[Dv(w),w])),L7=new Map([["s",e(383)],[e(383),"s"]]),j7=new Map([[e(223),e(7838)],[e(107),e(8490)],[e(229),e(8491)],[e(969),e(8486)]]),S7=new Map([D0(453),D0(456),D0(459),D0(498),...Hv(8072,8079),...Hv(8088,8095),...Hv(8104,8111),D0(8124),D0(8140),D0(8188)]),g7=new Map([["alnum",I`[\p{Alpha}\p{Nd}]`],["alpha",I`\p{Alpha}`],["ascii",I`\p{ASCII}`],["blank",I`[\p{Zs}\t]`],["cntrl",I`\p{Cc}`],["digit",I`\p{Nd}`],["graph",I`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",I`\p{Lower}`],["print",I`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",I`[\p{P}\p{S}]`],["space",I`\p{space}`],["upper",I`\p{Upper}`],["word",I`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",I`\p{AHex}`]]);function R5(w,v){let b=[];for(let y=w;y<=v;y++)b.push(y);return b}function D0(w){let v=e(w);return[v.toLowerCase(),v]}function Hv(w,v){return R5(w,v).map((b)=>D0(b))}var c7=new Map([[9,I`\t`],[10,I`\n`],[11,I`\v`],[12,I`\f`],[13,I`\r`],[8232,I`\u2028`],[8233,I`\u2029`],[65279,I`\uFEFF`]]);var p7=class w extends RegExp{#v=new Map;#w=null;#y;#b=null;#f=null;rawOptions={};get source(){return this.#y||"(?:)"}constructor(v,b,y){let d=!!y?.lazyCompile;if(v instanceof RegExp){if(y)throw Error("Cannot provide options when copying a regexp");let J=v;super(J,b);if(this.#y=J.source,J instanceof w)this.#v=J.#v,this.#b=J.#b,this.#f=J.#f,this.rawOptions=J.rawOptions}else{let J={hiddenCaptures:[],strategy:null,transfers:[],...y};super(d?"":v,b);this.#y=v,this.#v=j5(J.hiddenCaptures,J.transfers),this.#f=J.strategy,this.rawOptions=y??{}}if(!d)this.#w=this}exec(v){if(!this.#w){let{lazyCompile:d,...J}=this.rawOptions;this.#w=new w(this.#y,this.flags,J)}let b=this.global||this.sticky,y=this.lastIndex;if(this.#f==="clip_search"&&b&&y){this.lastIndex=0;let d=this.#d(v.slice(y));if(d)L5(d,y,v,this.hasIndices),this.lastIndex+=y;return d}return this.#d(v)}#d(v){this.#w.lastIndex=this.lastIndex;let b=super.exec.call(this.#w,v);if(this.lastIndex=this.#w.lastIndex,!b||!this.#v.size)return b;let y=[...b];b.length=1;let d;if(this.hasIndices)d=[...b.indices],b.indices.length=1;let J=[0];for(let X=1;X<y.length;X++){let{hidden:z,transferTo:Z}=this.#v.get(X)??{};if(z)J.push(null);else if(J.push(b.length),b.push(y[X]),this.hasIndices)b.indices.push(d[X]);if(Z&&y[X]!==void 0){let Q=J[Z];if(!Q)throw Error(`Invalid capture transfer to "${Q}"`);if(b[Q]=y[X],this.hasIndices)b.indices[Q]=d[X];if(b.groups){if(!this.#b)this.#b=S5(this.source);let Y=this.#b.get(Z);if(Y){if(b.groups[Y]=y[X],this.hasIndices)b.indices.groups[Y]=d[X]}}}}return b}};function L5(w,v,b,y){if(w.index+=v,w.input=b,y){let d=w.indices;for(let X=0;X<d.length;X++){let z=d[X];if(z)d[X]=[z[0]+v,z[1]+v]}let J=d.groups;if(J)Object.keys(J).forEach((X)=>{let z=J[X];if(z)J[X]=[z[0]+v,z[1]+v]})}}function j5(w,v){let b=new Map;for(let y of w)b.set(y,{hidden:!0});for(let[y,d]of v)for(let J of d)C5(b,J,{}).transferTo=y;return b}function S5(w){let v=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,b=new Map,y=0,d=0,J;while(J=v.exec(w)){let{0:X,groups:{capture:z,name:Z}}=J;if(X==="[")y++;else if(!y){if(z){if(d++,Z)b.set(d,Z)}}else if(X==="]")y--}return b}async function m5(w,v,b){try{return await Kv({langs:[w],themes:v,engine:b??qv(import("./wasm-n3cagcre.js"))})}catch(y){if(y instanceof Error&&y.message.includes("Language"))return await Kv({langs:["plaintext"],themes:v,engine:b??qv(import("./wasm-n3cagcre.js"))});throw y}}var i5=(w,v,b,y={})=>{return ib(w,v,b,y,m5)},d1=ob(i5);function J1({toolName:w}){let{data:v,loading:b,error:y}=S(`/tools/${encodeURIComponent(w)}/source`,[w]);if(b)return f(O,{title:"Source",icon:f(g0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-center py-8",children:"Loading source..."})});if(y||!v?.content)return f(O,{title:"Source",icon:f(g0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-center py-8",children:"Source not available"})});return f(O,{title:"Source",icon:f(g0,{class:"h-4 w-4"}),action:f(Dw,{href:`vscode://file/${v.filePath}`,children:"Open in VSCode"}),children:f("div",{class:"overflow-x-auto rounded-md border border-border [&_pre]:!bg-muted/25",children:f(d1,{language:"typescript",theme:"github-light",children:v.content.trim()})})})}function X1({item:w,depth:v=0,defaultExpanded:b=!0,renderActions:y,renderLabel:d,onItemClick:J,iconClassName:X}){let[z,Z]=T(b),Q=w.children&&w.children.length>0,Y=v*16;function q(){if(Q)Z(!z);J?.(w)}function K(){if(!Q)return f("span",{class:"w-4 mr-1"});return f("span",{class:"w-4 mr-1 flex items-center justify-center",children:z?f(Nw,{class:"h-4 w-4 text-muted-foreground"}):f(Tw,{class:"h-4 w-4 text-muted-foreground"})})}return f("div",{"data-testid":"TreeItem",children:[f("div",{class:"flex items-center py-1 hover:bg-accent rounded cursor-pointer text-sm group",style:{paddingLeft:`${Y}px`},onClick:q,children:[K(),w.iconDecorator&&f("span",{class:"flex-shrink-0 mr-1",children:w.iconDecorator}),w.icon&&f("span",{class:p("flex-shrink-0",X),children:w.icon}),f("span",{class:p("ml-2 flex-1 min-w-0",Q&&"font-medium"),children:d?d(w):w.label}),y&&f("span",{class:"ml-2 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:y(w)})]}),Q&&z&&f("div",{children:w.children?.map(($)=>f(X1,{item:$,depth:v+1,defaultExpanded:b,renderActions:y,renderLabel:d,onItemClick:J,iconClassName:X},$.id))})]})}function Ew({items:w,defaultExpanded:v=!0,renderActions:b,renderLabel:y,onItemClick:d,iconClassName:J,class:X}){return f("div",{"data-testid":"Tree",class:p("space-y-1",X),children:w.map((z)=>f(X1,{item:z,defaultExpanded:v,renderLabel:y,renderActions:b,onItemClick:d,iconClassName:J},z.id))})}var o5={shim:"text-blue-400",binary:"text-green-400","binary-path":"text-cyan-400",symlink:"text-purple-400",config:"text-amber-400",completion:"text-cyan-400",init:"text-pink-400","hook-generated":"text-orange-400",catalog:"text-muted-foreground",install:"text-green-400",source:"text-purple-400"};function c5(w){switch(w){case"shim":return f(f0,{class:"h-4 w-4"});case"binary":return f(lw,{class:"h-4 w-4"});case"binary-path":return f(E0,{class:"h-4 w-4"});case"symlink":return f(gw,{class:"h-4 w-4"});case"config":return f(jw,{class:"h-4 w-4"});case"completion":return f(nw,{class:"h-4 w-4"});case"init":case"hook-generated":return f(f0,{class:"h-4 w-4"});case"catalog":case"install":return f(U0,{class:"h-4 w-4"});case"source":return f(p0,{class:"h-4 w-4"});default:return f(Q0,{class:"h-4 w-4"})}}function p5(w){let v=w.type==="directory",b=w.children&&w.children.length>0,y=v?"text-amber-300":o5[w.fileType||""]||"text-muted-foreground";if(v)return f("span",{class:y,children:b?f(i0,{class:"h-4 w-4"}):f(ow,{class:"h-4 w-4"})});return f("span",{class:y,children:c5(w.fileType)})}function z1(w){return w.map((v)=>({id:v.path,label:v.name,icon:p5(v),data:v,children:v.children?z1(v.children):void 0}))}function u5(w){let v=w.data,b=v?.type==="directory";return f("span",{class:"flex items-center",children:[f("span",{children:w.label}),!b&&v?.fileType&&f(q0,{variant:"outline",class:"ml-2 text-xs",children:v.fileType})]})}function Z1({nodes:w}){let v=z1(w);return f(Ew,{items:v,renderLabel:u5})}function I0(w){if(w===0)return"0 B";let v=["B","KB","MB","GB"],b=w,y=0;while(b>=1024&&y<v.length-1)b/=1024,y++;return`${b.toFixed(b>=10?0:1)} ${v[y]}`}function Q1(w){if(w.children)w.children.sort((v,b)=>{if(v.type!==b.type)return v.type==="directory"?-1:1;return v.name.localeCompare(b.name)}),w.children.forEach(Q1)}function Y1(w){if(!w.length)return[];let v=w.map((J)=>J.filePath),b="";if(v.length===1){let J=v[0];if(J){let X=J.split("/").filter(Boolean);if(X.length>=2){if(b="/"+X.slice(0,X.length-2).join("/"),b==="/")b=""}}}else{let J=v.map((Q)=>Q.split("/").filter(Boolean)),X=Math.min(...J.map((Q)=>Q.length)),z=[],Z=J[0];if(Z)for(let Q=0;Q<X-1;Q+=1){let Y=Z[Q];if(Y&&J.every((q)=>q[Q]===Y))z.push(Y);else break}if(z.length>1)b="/"+z.slice(0,-1).join("/")}let y=new Map;for(let J of w){let X=J.filePath;if(b&&X.startsWith(b))X=X.substring(b.length);if(!X.startsWith("/"))X="/"+X;let z=X.split("/").filter(Boolean),Z="";for(let Y=0;Y<z.length-1;Y+=1){let q=z[Y];if(!q)continue;let K=Z;Z=Z?Z+"/"+q:"/"+q;let $=y.get(Z);if(!$){let H={name:q,path:b+Z,type:"directory",children:[]};y.set(Z,H);let h=K?y.get(K):void 0;if(h?.children)h.children.push(H)}else if($.type==="file")$.type="directory",$.children=[]}let Q=z[z.length-1];if(Q){let Y=Z?Z+"/"+Q:"/"+Q,q={name:Q,path:b+Y,type:"file",fileType:J.fileType,lastOperation:J.lastOperation};y.set(Y,q);let K=Z?y.get(Z):void 0;if(K?.children)K.children.push(q)}}let d=[];for(let[J,X]of y){let z=J.substring(0,J.lastIndexOf("/"));if(!z||!y.has(z))d.push(X)}return d.forEach(Q1),d.sort((J,X)=>{if(J.type!==X.type)return J.type==="directory"?-1:1;return J.name.localeCompare(X.name)}),d}function a5(w){let v=[{installationMethod:w.installationMethod,installParams:w.installParams}];for(let b of w.platformConfigs??[])v.push({installationMethod:b.installationMethod??w.installationMethod,installParams:b.installParams??w.installParams});return v}function t5(w,v){switch(w){case"github-release":if(v.repo)return{value:v.repo,url:`https://github.com/${v.repo}`};break;case"cargo":if(v.crate)return{value:v.crate,url:`https://crates.io/crates/${v.crate}`};break;case"brew":if(v.formula)return{value:v.formula,url:`https://formulae.brew.sh/formula/${v.formula}`};break;case"zsh-plugin":if(v.repo)return{value:v.repo,url:`https://github.com/${v.repo}`};break;case"curl-script":case"curl-tar":if(v.url)return{value:v.url,url:v.url};break;default:return null}return null}function Vv(w){return typeof w==="string"?w:w.name}function K1(w){let v=new Map;for(let b of w){let y=b.config.binaries??[];for(let d of y){let J=Vv(d);v.set(J,b.config.name)}}return v}function $1(w,v){let b=new Set(v);return w.filter((y)=>{return(y.config.dependencies??[]).some((J)=>b.has(J))})}function q1(w){if(w.installParams.repo)return w.installParams.repo;for(let v of w.platformConfigs??[])if(v.installParams?.repo)return v.installParams.repo;return null}function D1(w){for(let v of a5(w)){let b=t5(v.installationMethod,v.installParams);if(b)return b}return null}function n5(w){let v=D1(w);if(!v)return null;return f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Source"}),v.url?f("a",{href:v.url,target:"_blank",rel:"noopener noreferrer",class:"text-sm text-blue-500 hover:underline break-all",children:v.value}):f("span",{class:"text-sm font-medium break-all",children:v.value})]})}function s5({entry:w}){let v=w.platforms.join(", "),b=w.architectures?` (${w.architectures.join(", ")})`:"";return f("div",{class:"border border-border rounded-md p-3 space-y-2",children:[f("div",{class:"flex items-center gap-2",children:f("span",{class:"text-sm font-medium text-foreground",children:[v,b]})}),f("div",{class:"pl-2 space-y-1.5 text-sm",children:[w.installationMethod&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:"Method:"}),f(a0,{method:w.installationMethod,ghCli:w.installParams?.ghCli})]}),w.installParams?.repo&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:"Repo:"}),f("a",{href:`https://github.com/${w.installParams.repo}`,target:"_blank",rel:"noopener noreferrer",class:"text-blue-500 hover:underline",children:w.installParams.repo})]}),w.installParams?.formula&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:"Formula:"}),f("span",{class:"font-mono",children:w.installParams.formula})]}),w.installParams?.crate&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:"Crate:"}),f("span",{class:"font-mono",children:w.installParams.crate})]}),w.installParams?.url&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-muted-foreground",children:"URL:"}),f("span",{class:"font-mono text-xs break-all",children:w.installParams.url})]}),w.binaries&&w.binaries.length>0&&f("div",{class:"flex items-start gap-2",children:[f("span",{class:"text-muted-foreground",children:"Binaries:"}),f("span",{class:"font-mono",children:w.binaries.map((y)=>typeof y==="string"?y:y.name).join(", ")})]}),w.symlinks&&w.symlinks.length>0&&f("div",{class:"flex flex-col gap-1",children:[f("span",{class:"text-muted-foreground",children:"Symlinks:"}),f("div",{class:"pl-2",children:w.symlinks.map((y,d)=>f("div",{class:"font-mono text-xs",children:[y.source," → ",y.target]},d))})]})]})]})}function H1({params:w}){let v=decodeURIComponent(w.name),{data:b,loading:y}=S("/tools",[v]),{data:d,loading:J}=S(`/tools/${encodeURIComponent(v)}/history`,[v]),[X,z]=T(!1),[Z,Q]=T(null),[Y,q]=T(null),[K,$]=T(!1),[H,h]=T(null),[E,G]=T(!1),[x,M]=T(null),U=b?.find((A)=>A.config.name===v)||null,L=y||J,N=a(()=>K1(b??[]),[b]),c=a(()=>(U?.config.binaries??[]).map(Vv),[U]),W=a(()=>$1(b??[],c),[b,c]),k=z0(async(A)=>{z(!0),Q(null),q(null);try{let C=await Yw(`/tools/${encodeURIComponent(v)}/install`,{force:A});if(C.installed){let u=C.alreadyInstalled?`Already installed (${C.version})`:`Installed ${C.version}`;q(u),setTimeout(()=>window.location.reload(),1500)}else Q(C.error??"Installation failed")}catch(C){Q(C instanceof Error?C.message:"Installation failed")}finally{z(!1)}},[v]),s=z0(async()=>{$(!0),h(null);try{let A=await Yw(`/tools/${encodeURIComponent(v)}/check-update`,{});h(A)}catch(A){h({hasUpdate:!1,currentVersion:"unknown",latestVersion:"unknown",supported:!1,error:A instanceof Error?A.message:"Check failed"})}finally{$(!1)}},[v]),v0=z0(async()=>{G(!0),M(null);try{let A=await Yw(`/tools/${encodeURIComponent(v)}/update`,{});if(M(A),A.updated)setTimeout(()=>window.location.reload(),1500)}catch(A){M({updated:!1,supported:!1,error:A instanceof Error?A.message:"Update failed"})}finally{G(!1)}},[v]);if(L)return f("div",{"data-testid":"ToolDetail",class:"flex items-center justify-center h-64",children:f("div",{class:"text-muted-foreground",children:"Loading..."})});if(!U)return f("div",{"data-testid":"ToolDetail",class:"text-center py-8",children:[f("div",{class:"text-muted-foreground mb-4",children:"Tool not found"}),f(w0,{variant:"link",asChild:!0,children:f("a",{href:"/",children:"← Back to Home"})})]});let b0=Y1(U.files||[]),y0=q1(U.config);return f("div",{"data-testid":"ToolDetail",class:"space-y-4",children:[f("div",{class:"flex items-center justify-between",children:[f("div",{class:"flex items-center gap-4",children:[f("h1",{class:"text-2xl font-bold",children:U.config.name}),f(Bb,{status:U.runtime.status})]}),f("div",{class:"flex items-center gap-2",children:U.runtime.status==="installed"?f(d0,{children:[f(w0,{variant:"outline",size:"sm",onClick:s,disabled:K||X||E,children:[f(B0,{class:`h-4 w-4 ${K?"animate-spin":""}`}),K?"Checking...":"Check for updates"]}),f(w0,{variant:"outline",size:"sm",onClick:v0,disabled:E||X||K,children:[f(Cw,{class:`h-4 w-4 ${E?"animate-spin":""}`}),E?"Updating...":"Update"]}),f(w0,{variant:"outline",size:"sm",onClick:()=>k(!0),disabled:X||E||K,children:[f(tw,{class:`h-4 w-4 ${X?"animate-spin":""}`}),X?"Installing...":"Re-install"]})]}):f(w0,{variant:"default",size:"sm",onClick:()=>k(!1),disabled:X,children:[f(l0,{class:"h-4 w-4"}),X?"Installing...":"Install"]})})]}),Z&&f("div",{class:"bg-destructive/10 border border-destructive/20 text-destructive px-4 py-2 rounded-md text-sm",children:Z}),Y&&f("div",{class:"bg-green-500/10 border border-green-500/20 text-green-600 dark:text-green-400 px-4 py-2 rounded-md text-sm",children:Y}),H&&!H.error&&f("div",{class:`px-4 py-2 rounded-md text-sm ${H.hasUpdate?"bg-yellow-500/10 border border-yellow-500/20 text-yellow-600 dark:text-yellow-400":"bg-green-500/10 border border-green-500/20 text-green-600 dark:text-green-400"}`,children:H.hasUpdate?`Update available: ${H.currentVersion} → ${H.latestVersion}`:`Up to date (${H.currentVersion})`}),H?.error&&f("div",{class:"bg-destructive/10 border border-destructive/20 text-destructive px-4 py-2 rounded-md text-sm",children:H.error}),x&&!x.error&&x.updated&&f("div",{class:"bg-green-500/10 border border-green-500/20 text-green-600 dark:text-green-400 px-4 py-2 rounded-md text-sm",children:`Updated: ${x.oldVersion} → ${x.newVersion}`}),x?.error&&f("div",{class:"bg-destructive/10 border border-destructive/20 text-destructive px-4 py-2 rounded-md text-sm",children:x.error}),f("div",{class:`grid gap-4 ${U.usage.totalCount>0?"lg:grid-cols-2":""}`,children:[f(O,{title:"Overview",icon:f(uw,{class:"h-4 w-4"}),children:f("div",{class:"space-y-3",children:[f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Method"}),f(a0,{method:U.config.installationMethod,ghCli:U.config.installParams.ghCli})]}),n5(U.config),f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Version"}),f("span",{class:"font-medium",children:U.runtime.installedVersion||U.config.version||"Unknown"})]}),f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Installed"}),f("span",{class:"font-medium",children:U.runtime.installedAt?new Date(U.runtime.installedAt).toLocaleDateString():"Not installed"})]}),U.binaryDiskSize>0&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Binary Size"}),f("span",{class:"font-medium",children:I0(U.binaryDiskSize)})]}),U.config.hostname&&f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Hostname"}),f("code",{class:"text-sm font-mono bg-muted px-1.5 py-0.5 rounded",children:U.config.hostname})]}),U.config.dependencies&&U.config.dependencies.length>0&&f("div",{class:"flex items-start gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Depends on"}),f("div",{class:"flex flex-wrap gap-2",children:U.config.dependencies.map((A,C)=>{let u=N.get(A);return f("a",{href:`/tools/${encodeURIComponent(u??A)}`,class:"text-sm text-blue-500 hover:underline",children:u??A},C)})})]}),W.length>0&&f("div",{class:"flex items-start gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Required by"}),f("div",{class:"flex flex-wrap gap-2",children:W.map((A,C)=>f("a",{href:`/tools/${encodeURIComponent(A.config.name)}`,class:"text-sm text-blue-500 hover:underline",children:A.config.name},C))})]})]})}),U.usage.totalCount>0&&f(O,{title:"Usage",icon:f(E0,{class:"h-4 w-4"}),children:f("div",{class:"space-y-3",children:[f("div",{class:"flex items-center gap-2",children:[f("span",{class:"text-sm text-muted-foreground w-24",children:"Total Runs"}),f("span",{class:"font-medium",children:U.usage.totalCount.toLocaleString()})]}),f("div",{class:"space-y-2",children:U.usage.binaries.map((A)=>f("div",{class:"rounded-md border border-border p-2",children:[f("div",{class:"flex items-center justify-between gap-2",children:[f("code",{class:"text-xs font-mono bg-muted px-1.5 py-0.5 rounded",children:A.binaryName}),f("span",{class:"text-sm font-medium",children:[A.count.toLocaleString()," runs"]})]}),A.lastUsedAt&&f("div",{class:"mt-1 text-xs text-muted-foreground",children:["Last used ",new Date(A.lastUsedAt).toLocaleString()]})]},A.binaryName))})]})})]}),f(J1,{toolName:U.config.name}),U.config.platformConfigs&&U.config.platformConfigs.length>0&&f(O,{title:"Platform Configurations",icon:f(aw,{class:"h-4 w-4"}),children:f("div",{class:"space-y-3",children:U.config.platformConfigs.map((A,C)=>f(s5,{entry:A},C))})}),U.runtime.status==="installed"&&f(O,{title:"Files",icon:f(Q0,{class:"h-4 w-4"}),children:(U.files?.length||0)>0?f(Z1,{nodes:b0}):f("div",{class:"text-muted-foreground text-center py-4",children:"No files tracked"})}),U.runtime.status==="installed"&&f(O,{title:"History",icon:f(c0,{class:"h-4 w-4"}),children:f(Eb,{entries:d?.entries??[],installedAt:d?.installedAt??null,dotfilesDir:d?.dotfilesDir??""})}),y0&&f(Ub,{toolName:U.config.name,repo:y0})]})}function e5({source:w}){if(w==="git")return f(x0,{class:"h-3 w-3 text-green-500",title:"From git commit date"});return f(cw,{class:"h-3 w-3 text-amber-500",title:"From file modification time"})}function V1(){let{data:w,loading:v}=S("/recent-tools"),b=w?.tools||[];return f(O,{title:"Recently Added",icon:f(S0,{class:"h-4 w-4 text-muted-foreground"}),class:"h-full",contentClass:"flex-1 overflow-auto",children:v?f("div",{class:"text-muted-foreground text-sm",children:"Loading..."}):b.length===0?f("div",{class:"text-muted-foreground text-sm text-center py-4",children:"No tools added yet"}):f("div",{class:"space-y-0",children:b.map((y)=>f("a",{href:`/tools/${encodeURIComponent(y.name)}`,class:"flex items-center gap-2 py-1 rounded hover:bg-accent cursor-pointer text-sm group",children:[f(f0,{class:"h-4 w-4 text-muted-foreground group-hover:text-foreground transition-colors flex-shrink-0"}),f("span",{class:"font-medium truncate text-sm flex-1 min-w-0",children:y.name}),f("span",{class:"flex items-center gap-1 text-xs text-muted-foreground flex-shrink-0",children:[f(e5,{source:y.timestampSource}),y.relativeTime]})]},y.configFilePath))})})}function n0({value:w,label:v,color:b="text-foreground"}){return f(O0,{class:"text-center py-4",children:f(P0,{class:"space-y-1",children:[f("div",{class:p("text-3xl font-bold",b),children:w}),f("div",{class:"text-muted-foreground text-sm",children:v})]})})}function r1(w,v,b,y,d,J){return w.map((X)=>{if(X.type==="directory")return{id:X.path,label:X.name,icon:f(i0,{class:"h-4 w-4 text-amber-300"}),children:X.children?r1(X.children,v,b,y,d,J):[]};let z=X.toolName?v.get(X.toolName):void 0,Z=z==="installed"?"text-green-400":z==="error"?"text-red-400":"text-blue-400",Q=w2(z);return{id:X.path,label:X.name,icon:f(f0,{class:`h-4 w-4 ${Z}`}),iconDecorator:f("span",{class:`inline-block w-2 h-2 rounded-full ${Q}`}),data:{toolName:X.toolName,isFile:!0,installMethod:X.toolName?b.get(X.toolName):void 0,ghCli:X.toolName?y.get(X.toolName):void 0,fileCount:X.toolName?d.get(X.toolName):void 0,status:z,binaryDiskSize:X.toolName?J.get(X.toolName):void 0}}})}function w2(w){switch(w){case"installed":return"bg-green-500";case"error":return"bg-red-500";default:return"bg-gray-300"}}function v2(w){if(w.data?.isFile&&w.label.endsWith(".tool.ts")){let v=w.label.replace(/\.tool\.ts$/,""),b=w.data.fileCount??0,y=w.data.binaryDiskSize??0;return f("span",{class:"flex items-center justify-between flex-1",children:[f("span",{children:[v,f("span",{class:"text-gray-400",children:".tool.ts"})]}),f("span",{class:"flex items-center gap-2",children:[w.data.installMethod&&f(a0,{method:w.data.installMethod,ghCli:w.data.ghCli}),f("span",{class:"text-xs text-muted-foreground",children:[b," files"]}),y>0&&f("span",{class:"text-xs font-bold text-orange-400",children:I0(y)})]})]})}return w.label}function b2(w){if(w.data?.toolName)window.location.href=`/tools/${encodeURIComponent(w.data.toolName)}`}function W1({tools:w}){let{data:v,loading:b}=S("/tool-configs-tree"),y=new Map,d=new Map,J=new Map,X=new Map,z=new Map;for(let Q of w)y.set(Q.config.name,Q.runtime.status),d.set(Q.config.name,Q.config.installationMethod),J.set(Q.config.name,Q.config.installParams.ghCli??!1),X.set(Q.config.name,Q.files.length),z.set(Q.config.name,Q.binaryDiskSize);if(b)return f(O,{title:"Tool Files",icon:f(o0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-sm",children:"Loading..."})});let Z=v?r1(v.entries,y,d,J,X,z):[];if(Z.length===0)return f(O,{title:"Tool Files",icon:f(o0,{class:"h-4 w-4"}),children:f("div",{class:"text-muted-foreground text-sm",children:"No tool files found"})});return f(O,{title:"Tool Files",icon:f(o0,{class:"h-4 w-4"}),children:f(Ew,{items:Z,defaultExpanded:!0,onItemClick:b2,renderLabel:v2,iconClassName:"mr-1"})})}function y2(w){let b=Date.now()-w,y=Math.floor(b/1000);if(y<60)return"just now";let d=Math.floor(y/60);if(d<60)return`${d} minute${d===1?"":"s"} ago`;let J=Math.floor(d/60);if(J<24)return`${J} hour${J===1?"":"s"} ago`;let X=Math.floor(J/24);if(X<30)return`${X} day${X===1?"":"s"} ago`;let z=Math.floor(X/30);return`${z} month${z===1?"":"s"} ago`}function f2(w){return w.usage.binaries.reduce((v,b)=>{if(!b.lastUsedAt)return v;let y=Date.parse(b.lastUsedAt);if(Number.isNaN(y))return v;return Math.max(v,y)},0)}function d2(w){return w.map((v)=>({name:v.config.name,count:v.usage.totalCount,lastUsedAt:f2(v)})).filter((v)=>v.count>0)}function U1({title:w,icon:v,items:b,secondary:y,emptyText:d}){return f(O,{title:w,icon:v,class:"h-full",contentClass:"flex-1 overflow-auto",children:b.length===0?f("div",{class:"text-muted-foreground py-4 text-center text-sm",children:d}):f("div",{class:"space-y-0",children:b.map((J)=>f("a",{href:`/tools/${encodeURIComponent(J.name)}`,class:"group flex cursor-pointer items-center gap-2 rounded py-1 text-sm hover:bg-accent",children:[f("span",{class:"min-w-0 flex-1 truncate text-sm font-medium",children:J.name}),f("span",{class:"flex-shrink-0 text-xs text-muted-foreground",children:y(J)})]},J.name))})})}function B1(){let{data:w,loading:v}=S("/tools"),b=w||[],y=b.reduce((Q,Y)=>Q+(Y.files?.length||0),0),d=b.filter((Q)=>Q.runtime.status==="installed").length,J=b.reduce((Q,Y)=>Q+(Y.binaryDiskSize||0),0),X=d2(b),z=X.toSorted((Q,Y)=>Y.count-Q.count||Y.lastUsedAt-Q.lastUsedAt).slice(0,10),Z=X.toSorted((Q,Y)=>Y.lastUsedAt-Q.lastUsedAt||Y.count-Q.count).slice(0,10);if(v)return f("div",{"data-testid":"Tools",class:"flex items-center justify-center h-64",children:f("div",{class:"text-muted-foreground",children:"Loading..."})});return f("div",{"data-testid":"Tools",class:"space-y-4",children:[f("div",{class:"grid grid-cols-4 gap-4",children:[f(n0,{value:b.length,label:"Total Tools",color:"text-blue-400"}),f(n0,{value:d,label:"Installed",color:"text-green-400"}),f(n0,{value:y,label:"Files Tracked",color:"text-purple-400"}),f(n0,{value:I0(J),label:"Binary Size",color:"text-orange-400"})]}),f("div",{class:"grid gap-4 lg:grid-cols-3",children:[f(V1,{}),f(U1,{title:"Most Recently Used",icon:f(c0,{class:"h-4 w-4 text-muted-foreground"}),items:Z,secondary:(Q)=>y2(Q.lastUsedAt),emptyText:"No usage recorded yet"}),f(U1,{title:"Most Used",icon:f(E0,{class:"h-4 w-4 text-muted-foreground"}),items:z,secondary:(Q)=>`${Q.count.toLocaleString()} runs`,emptyText:"No usage recorded yet"})]}),f("div",{children:f(W1,{tools:b})}),b.length===0&&f("div",{class:"py-8 text-center text-muted-foreground",children:"No tools configured"})]})}function E1(){return f(r0,{children:f("div",{class:"min-h-screen bg-background text-foreground",children:[f(Qb,{}),f("main",{class:"max-w-7xl mx-auto px-4 py-6",children:f(zw,{children:[f(W0,{path:"/",component:B1}),f(W0,{path:"/tools/:name",component:H1}),f(W0,{path:"/health",component:$b}),f(W0,{path:"/settings",component:Db}),f(W0,{default:!0,component:qb})]})}),f(Sv,{})]})})}if(typeof window<"u"){let w=document.getElementById("app");if(w)Zw(j(E1,{}),w)}
|
|
158
|
+
|
|
159
|
+
//# debugId=BDA07D213A51606D64756E2164756E21
|