nomoreide 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/service-health.d.ts +9 -0
- package/dist/core/service-health.js +33 -0
- package/dist/core/service-health.js.map +1 -0
- package/dist/core/types.d.ts +19 -0
- package/dist/web/client/assets/{index-CAdzcVNV.js → index-BFDx6_9m.js} +1 -1
- package/dist/web/client/index.html +1 -1
- package/dist/web/dashboard.d.ts +2 -1
- package/dist/web/dashboard.js +20 -1
- package/dist/web/dashboard.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PortBindingStatus } from "./port-utils.js";
|
|
2
|
+
import type { LogEntry, ServiceDefinition, ServiceHealth, ServiceStatus } from "./types.js";
|
|
3
|
+
export interface ComputeServiceHealthInput {
|
|
4
|
+
service: ServiceDefinition;
|
|
5
|
+
status?: ServiceStatus;
|
|
6
|
+
ports: PortBindingStatus[];
|
|
7
|
+
logs: LogEntry[];
|
|
8
|
+
}
|
|
9
|
+
export declare function computeServiceHealth(input: ComputeServiceHealthInput): ServiceHealth;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export function computeServiceHealth(input) {
|
|
2
|
+
const status = input.status;
|
|
3
|
+
const lastErrorLog = [...input.logs]
|
|
4
|
+
.reverse()
|
|
5
|
+
.find((entry) => entry.stream === "stderr" || /error|failed|exception/i.test(entry.text));
|
|
6
|
+
if (!status || status.state === "stopped") {
|
|
7
|
+
return baseHealth(input, "unknown", "Service is not running.", lastErrorLog);
|
|
8
|
+
}
|
|
9
|
+
if (status.state === "exited") {
|
|
10
|
+
return baseHealth(input, "unhealthy", `Service exited with code ${status.exitCode ?? "unknown"}.`, lastErrorLog);
|
|
11
|
+
}
|
|
12
|
+
if (status.processTree && status.processTree.rssMb >= 1000) {
|
|
13
|
+
return baseHealth(input, "warning", `High memory usage: ${status.processTree.rssMb.toFixed(1)} MB RSS.`, lastErrorLog);
|
|
14
|
+
}
|
|
15
|
+
if (lastErrorLog) {
|
|
16
|
+
return baseHealth(input, "warning", `Recent error log: ${lastErrorLog.text}`, lastErrorLog);
|
|
17
|
+
}
|
|
18
|
+
return baseHealth(input, "healthy", "Service is running without detected warnings.", lastErrorLog);
|
|
19
|
+
}
|
|
20
|
+
function baseHealth(input, status, summary, lastErrorLog) {
|
|
21
|
+
return {
|
|
22
|
+
service: input.service.name,
|
|
23
|
+
status,
|
|
24
|
+
summary,
|
|
25
|
+
checkedAt: new Date().toISOString(),
|
|
26
|
+
checks: [],
|
|
27
|
+
processTree: input.status?.processTree,
|
|
28
|
+
ports: input.ports,
|
|
29
|
+
lastErrorLog,
|
|
30
|
+
agentContext: "",
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=service-health.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-health.js","sourceRoot":"","sources":["../../src/core/service-health.ts"],"names":[],"mappings":"AAeA,MAAM,UAAU,oBAAoB,CAClC,KAAgC;IAEhC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAC5B,MAAM,YAAY,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;SACjC,OAAO,EAAE;SACT,IAAI,CACH,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAC1E,CAAC;IAEJ,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,yBAAyB,EAAE,YAAY,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,UAAU,CACf,KAAK,EACL,WAAW,EACX,4BAA4B,MAAM,CAAC,QAAQ,IAAI,SAAS,GAAG,EAC3D,YAAY,CACb,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;QAC3D,OAAO,UAAU,CACf,KAAK,EACL,SAAS,EACT,sBAAsB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,EACnE,YAAY,CACb,CAAC;IACJ,CAAC;IAED,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,UAAU,CACf,KAAK,EACL,SAAS,EACT,qBAAqB,YAAY,CAAC,IAAI,EAAE,EACxC,YAAY,CACb,CAAC;IACJ,CAAC;IAED,OAAO,UAAU,CACf,KAAK,EACL,SAAS,EACT,+CAA+C,EAC/C,YAAY,CACb,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CACjB,KAAgC,EAChC,MAA+B,EAC/B,OAAe,EACf,YAAuB;IAEvB,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;QAC3B,MAAM;QACN,OAAO;QACP,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,MAAM,EAAE,EAAE;QACV,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,WAAW;QACtC,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,YAAY;QACZ,YAAY,EAAE,EAAE;KACjB,CAAC;AACJ,CAAC"}
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ProcessTreeSummary } from "./process-tree.js";
|
|
2
|
+
import type { PortBindingStatus } from "./port-utils.js";
|
|
2
3
|
export interface ServiceDefinition {
|
|
3
4
|
name: string;
|
|
4
5
|
command: string;
|
|
@@ -41,6 +42,24 @@ export interface LogEntry {
|
|
|
41
42
|
text: string;
|
|
42
43
|
timestamp: string;
|
|
43
44
|
}
|
|
45
|
+
export type ServiceHealthStatus = "unknown" | "healthy" | "warning" | "unhealthy";
|
|
46
|
+
export interface HealthCheckResult {
|
|
47
|
+
name: string;
|
|
48
|
+
ok: boolean;
|
|
49
|
+
summary: string;
|
|
50
|
+
latencyMs?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface ServiceHealth {
|
|
53
|
+
service: string;
|
|
54
|
+
status: ServiceHealthStatus;
|
|
55
|
+
summary: string;
|
|
56
|
+
checkedAt: string;
|
|
57
|
+
checks: HealthCheckResult[];
|
|
58
|
+
processTree?: ProcessTreeSummary;
|
|
59
|
+
ports: PortBindingStatus[];
|
|
60
|
+
lastErrorLog?: LogEntry;
|
|
61
|
+
agentContext: string;
|
|
62
|
+
}
|
|
44
63
|
export interface ToolResult {
|
|
45
64
|
ok: boolean;
|
|
46
65
|
message: string;
|
|
@@ -9,4 +9,4 @@ Error generating stack: `+s.message+`
|
|
|
9
9
|
`).replace(Qv,"")}function y0(t,e){return e=g0(e),g0(t)===e}function kt(t,e,n,s,r,u){switch(n){case"children":typeof s=="string"?e==="body"||e==="textarea"&&s===""||Ia(t,s):(typeof s=="number"||typeof s=="bigint")&&e!=="body"&&Ia(t,""+s);break;case"className":cl(t,"class",s);break;case"tabIndex":cl(t,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(t,n,s);break;case"style":yd(t,s,u);break;case"data":if(e!=="object"){cl(t,"data",s);break}case"src":case"href":if(s===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=dl(""+s),t.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(n==="formAction"?(e!=="input"&&kt(t,e,"name",r.name,r,null),kt(t,e,"formEncType",r.formEncType,r,null),kt(t,e,"formMethod",r.formMethod,r,null),kt(t,e,"formTarget",r.formTarget,r,null)):(kt(t,e,"encType",r.encType,r,null),kt(t,e,"method",r.method,r,null),kt(t,e,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){t.removeAttribute(n);break}s=dl(""+s),t.setAttribute(n,s);break;case"onClick":s!=null&&(t.onclick=Sn);break;case"onScroll":s!=null&&Tt("scroll",t);break;case"onScrollEnd":s!=null&&Tt("scrollend",t);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"multiple":t.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":t.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){t.removeAttribute("xlink:href");break}n=dl(""+s),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""+s):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":s===!0?t.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?t.setAttribute(n,s):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?t.setAttribute(n,s):t.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?t.removeAttribute(n):t.setAttribute(n,s);break;case"popover":Tt("beforetoggle",t),Tt("toggle",t),ul(t,"popover",s);break;case"xlinkActuate":xn(t,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":xn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":xn(t,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":xn(t,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":xn(t,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":xn(t,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":xn(t,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":xn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":xn(t,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ul(t,"is",s);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=x2.get(n)||n,ul(t,n,s))}}function ec(t,e,n,s,r,u){switch(n){case"style":yd(t,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(o(60));t.innerHTML=n}}break;case"children":typeof s=="string"?Ia(t,s):(typeof s=="number"||typeof s=="bigint")&&Ia(t,""+s);break;case"onScroll":s!=null&&Tt("scroll",t);break;case"onScrollEnd":s!=null&&Tt("scrollend",t);break;case"onClick":s!=null&&(t.onclick=Sn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rd.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),e=n.slice(2,r?n.length-7:void 0),u=t[ve]||null,u=u!=null?u[n]:null,typeof u=="function"&&t.removeEventListener(e,u,r),typeof s=="function")){typeof u!="function"&&u!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,s,r);break t}n in t?t[n]=s:s===!0?t.setAttribute(n,""):ul(t,n,s)}}}function fe(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tt("error",t),Tt("load",t);var s=!1,r=!1,u;for(u in n)if(n.hasOwnProperty(u)){var h=n[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:kt(t,e,u,h,n,null)}}r&&kt(t,e,"srcSet",n.srcSet,n,null),s&&kt(t,e,"src",n.src,n,null);return;case"input":Tt("invalid",t);var b=u=h=r=null,T=null,N=null;for(s in n)if(n.hasOwnProperty(s)){var _=n[s];if(_!=null)switch(s){case"name":r=_;break;case"type":h=_;break;case"checked":T=_;break;case"defaultChecked":N=_;break;case"value":u=_;break;case"defaultValue":b=_;break;case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(137,e));break;default:kt(t,e,s,_,n,null)}}hd(t,u,b,T,N,h,r,!1);return;case"select":Tt("invalid",t),s=h=u=null;for(r in n)if(n.hasOwnProperty(r)&&(b=n[r],b!=null))switch(r){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":s=b;default:kt(t,e,r,b,n,null)}e=u,n=h,t.multiple=!!s,e!=null?Wa(t,!!s,e,!1):n!=null&&Wa(t,!!s,n,!0);return;case"textarea":Tt("invalid",t),u=r=s=null;for(h in n)if(n.hasOwnProperty(h)&&(b=n[h],b!=null))switch(h){case"value":s=b;break;case"defaultValue":r=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:kt(t,e,h,b,n,null)}pd(t,s,r,u);return;case"option":for(T in n)n.hasOwnProperty(T)&&(s=n[T],s!=null)&&(T==="selected"?t.selected=s&&typeof s!="function"&&typeof s!="symbol":kt(t,e,T,s,n,null));return;case"dialog":Tt("beforetoggle",t),Tt("toggle",t),Tt("cancel",t),Tt("close",t);break;case"iframe":case"object":Tt("load",t);break;case"video":case"audio":for(s=0;s<As.length;s++)Tt(As[s],t);break;case"image":Tt("error",t),Tt("load",t);break;case"details":Tt("toggle",t);break;case"embed":case"source":case"link":Tt("error",t),Tt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(s=n[N],s!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,e));default:kt(t,e,N,s,n,null)}return;default:if(pr(e)){for(_ in n)n.hasOwnProperty(_)&&(s=n[_],s!==void 0&&ec(t,e,_,s,n,void 0));return}}for(b in n)n.hasOwnProperty(b)&&(s=n[b],s!=null&&kt(t,e,b,s,n,null))}function Kv(t,e,n,s){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,h=null,b=null,T=null,N=null,_=null;for(V in n){var G=n[V];if(n.hasOwnProperty(V)&&G!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":T=G;default:s.hasOwnProperty(V)||kt(t,e,V,null,s,G)}}for(var D in s){var V=s[D];if(G=n[D],s.hasOwnProperty(D)&&(V!=null||G!=null))switch(D){case"type":u=V;break;case"name":r=V;break;case"checked":N=V;break;case"defaultChecked":_=V;break;case"value":h=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,e));break;default:V!==G&&kt(t,e,D,V,s,G)}}hr(t,h,b,T,N,_,u,r);return;case"select":V=h=b=D=null;for(u in n)if(T=n[u],n.hasOwnProperty(u)&&T!=null)switch(u){case"value":break;case"multiple":V=T;default:s.hasOwnProperty(u)||kt(t,e,u,null,s,T)}for(r in s)if(u=s[r],T=n[r],s.hasOwnProperty(r)&&(u!=null||T!=null))switch(r){case"value":D=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==T&&kt(t,e,r,u,s,T)}e=b,n=h,s=V,D!=null?Wa(t,!!n,D,!1):!!s!=!!n&&(e!=null?Wa(t,!!n,e,!0):Wa(t,!!n,n?[]:"",!1));return;case"textarea":V=D=null;for(b in n)if(r=n[b],n.hasOwnProperty(b)&&r!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:kt(t,e,b,null,s,r)}for(h in s)if(r=s[h],u=n[h],s.hasOwnProperty(h)&&(r!=null||u!=null))switch(h){case"value":D=r;break;case"defaultValue":V=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&kt(t,e,h,r,s,u)}md(t,D,V);return;case"option":for(var nt in n)D=n[nt],n.hasOwnProperty(nt)&&D!=null&&!s.hasOwnProperty(nt)&&(nt==="selected"?t.selected=!1:kt(t,e,nt,null,s,D));for(T in s)D=s[T],V=n[T],s.hasOwnProperty(T)&&D!==V&&(D!=null||V!=null)&&(T==="selected"?t.selected=D&&typeof D!="function"&&typeof D!="symbol":kt(t,e,T,D,s,V));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ct in n)D=n[ct],n.hasOwnProperty(ct)&&D!=null&&!s.hasOwnProperty(ct)&&kt(t,e,ct,null,s,D);for(N in s)if(D=s[N],V=n[N],s.hasOwnProperty(N)&&D!==V&&(D!=null||V!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(o(137,e));break;default:kt(t,e,N,D,s,V)}return;default:if(pr(e)){for(var _t in n)D=n[_t],n.hasOwnProperty(_t)&&D!==void 0&&!s.hasOwnProperty(_t)&&ec(t,e,_t,void 0,s,D);for(_ in s)D=s[_],V=n[_],!s.hasOwnProperty(_)||D===V||D===void 0&&V===void 0||ec(t,e,_,D,s,V);return}}for(var C in n)D=n[C],n.hasOwnProperty(C)&&D!=null&&!s.hasOwnProperty(C)&&kt(t,e,C,null,s,D);for(G in s)D=s[G],V=n[G],!s.hasOwnProperty(G)||D===V||D==null&&V==null||kt(t,e,G,D,s,V)}function v0(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jv(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],u=r.transferSize,h=r.initiatorType,b=r.duration;if(u&&b&&v0(h)){for(h=0,b=r.responseEnd,s+=1;s<n.length;s++){var T=n[s],N=T.startTime;if(N>b)break;var _=T.transferSize,G=T.initiatorType;_&&v0(G)&&(T=T.responseEnd,h+=_*(T<b?1:(b-N)/(T-N)))}if(--s,e+=8*(u+h)/(r.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var nc=null,ac=null;function oo(t){return t.nodeType===9?t:t.ownerDocument}function b0(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function x0(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function ic(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var sc=null;function Fv(){var t=window.event;return t&&t.type==="popstate"?t===sc?!1:(sc=t,!0):(sc=null,!1)}var S0=typeof setTimeout=="function"?setTimeout:void 0,Pv=typeof clearTimeout=="function"?clearTimeout:void 0,T0=typeof Promise=="function"?Promise:void 0,$v=typeof queueMicrotask=="function"?queueMicrotask:typeof T0<"u"?function(t){return T0.resolve(null).then(t).catch(Wv)}:S0;function Wv(t){setTimeout(function(){throw t})}function la(t){return t==="head"}function w0(t,e){var n=e,s=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){t.removeChild(r),Ni(e);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")js(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,js(n);for(var u=n.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[Xi]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||n.removeChild(u),u=h}}else n==="body"&&js(t.ownerDocument.body);n=r}while(n);Ni(e)}function A0(t,e){var n=t;t=0;do{var s=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=s}while(n)}function lc(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":lc(n),fr(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function Iv(t,e,n,s){for(;t.nodeType===1;){var r=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!s&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(s){if(!t[Xi])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(u=t.getAttribute("rel"),u==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(u!==r.rel||t.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||t.getAttribute("title")!==(r.title==null?null:r.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(u=t.getAttribute("src"),(u!==(r.src==null?null:r.src)||t.getAttribute("type")!==(r.type==null?null:r.type)||t.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&t.getAttribute("name")===u)return t}else return t;if(t=Ke(t.nextSibling),t===null)break}return null}function tb(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Ke(t.nextSibling),t===null))return null;return t}function E0(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=Ke(t.nextSibling),t===null))return null;return t}function oc(t){return t.data==="$?"||t.data==="$~"}function rc(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function eb(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var s=function(){e(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),t._reactRetry=s}}function Ke(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var uc=null;function j0(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return Ke(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function C0(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function M0(t,e,n){switch(e=oo(n),t){case"html":if(t=e.documentElement,!t)throw Error(o(452));return t;case"head":if(t=e.head,!t)throw Error(o(453));return t;case"body":if(t=e.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function js(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);fr(t)}var Je=new Map,z0=new Set;function ro(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Bn=F.d;F.d={f:nb,r:ab,D:ib,C:sb,L:lb,m:ob,X:ub,S:rb,M:cb};function nb(){var t=Bn.f(),e=Il();return t||e}function ab(t){var e=Fa(t);e!==null&&e.tag===5&&e.type==="form"?Qh(e):Bn.r(t)}var Ci=typeof document>"u"?null:document;function N0(t,e,n){var s=Ci;if(s&&typeof e=="string"&&e){var r=He(e);r='link[rel="'+t+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),z0.has(r)||(z0.add(r),t={rel:t,crossOrigin:n,href:e},s.querySelector(r)===null&&(e=s.createElement("link"),fe(e,"link",t),se(e),s.head.appendChild(e)))}}function ib(t){Bn.D(t),N0("dns-prefetch",t,null)}function sb(t,e){Bn.C(t,e),N0("preconnect",t,e)}function lb(t,e,n){Bn.L(t,e,n);var s=Ci;if(s&&t&&e){var r='link[rel="preload"][as="'+He(e)+'"]';e==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+He(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+He(n.imageSizes)+'"]')):r+='[href="'+He(t)+'"]';var u=r;switch(e){case"style":u=Mi(t);break;case"script":u=zi(t)}Je.has(u)||(t=x({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Je.set(u,t),s.querySelector(r)!==null||e==="style"&&s.querySelector(Cs(u))||e==="script"&&s.querySelector(Ms(u))||(e=s.createElement("link"),fe(e,"link",t),se(e),s.head.appendChild(e)))}}function ob(t,e){Bn.m(t,e);var n=Ci;if(n&&t){var s=e&&typeof e.as=="string"?e.as:"script",r='link[rel="modulepreload"][as="'+He(s)+'"][href="'+He(t)+'"]',u=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=zi(t)}if(!Je.has(u)&&(t=x({rel:"modulepreload",href:t},e),Je.set(u,t),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ms(u)))return}s=n.createElement("link"),fe(s,"link",t),se(s),n.head.appendChild(s)}}}function rb(t,e,n){Bn.S(t,e,n);var s=Ci;if(s&&t){var r=Pa(s).hoistableStyles,u=Mi(t);e=e||"default";var h=r.get(u);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(Cs(u)))b.loading=5;else{t=x({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Je.get(u))&&cc(t,n);var T=h=s.createElement("link");se(T),fe(T,"link",t),T._p=new Promise(function(N,_){T.onload=N,T.onerror=_}),T.addEventListener("load",function(){b.loading|=1}),T.addEventListener("error",function(){b.loading|=2}),b.loading|=4,uo(h,e,s)}h={type:"stylesheet",instance:h,count:1,state:b},r.set(u,h)}}}function ub(t,e){Bn.X(t,e);var n=Ci;if(n&&t){var s=Pa(n).hoistableScripts,r=zi(t),u=s.get(r);u||(u=n.querySelector(Ms(r)),u||(t=x({src:t,async:!0},e),(e=Je.get(r))&&fc(t,e),u=n.createElement("script"),se(u),fe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(r,u))}}function cb(t,e){Bn.M(t,e);var n=Ci;if(n&&t){var s=Pa(n).hoistableScripts,r=zi(t),u=s.get(r);u||(u=n.querySelector(Ms(r)),u||(t=x({src:t,async:!0,type:"module"},e),(e=Je.get(r))&&fc(t,e),u=n.createElement("script"),se(u),fe(u,"link",t),n.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(r,u))}}function D0(t,e,n,s){var r=(r=ot.current)?ro(r):null;if(!r)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Mi(n.href),n=Pa(r).hoistableStyles,s=n.get(e),s||(s={type:"style",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Mi(n.href);var u=Pa(r).hoistableStyles,h=u.get(t);if(h||(r=r.ownerDocument||r,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,h),(u=r.querySelector(Cs(t)))&&!u._p&&(h.instance=u,h.state.loading=5),Je.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Je.set(t,n),u||fb(r,t,n,h.state))),e&&s===null)throw Error(o(528,""));return h}if(e&&s!==null)throw Error(o(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=zi(n),n=Pa(r).hoistableScripts,s=n.get(e),s||(s={type:"script",instance:null,count:0,state:null},n.set(e,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function Mi(t){return'href="'+He(t)+'"'}function Cs(t){return'link[rel="stylesheet"]['+t+"]"}function R0(t){return x({},t,{"data-precedence":t.precedence,precedence:null})}function fb(t,e,n,s){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?s.loading=1:(e=t.createElement("link"),s.preload=e,e.addEventListener("load",function(){return s.loading|=1}),e.addEventListener("error",function(){return s.loading|=2}),fe(e,"link",n),se(e),t.head.appendChild(e))}function zi(t){return'[src="'+He(t)+'"]'}function Ms(t){return"script[async]"+t}function V0(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var s=t.querySelector('style[data-href~="'+He(n.href)+'"]');if(s)return e.instance=s,se(s),s;var r=x({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(t.ownerDocument||t).createElement("style"),se(s),fe(s,"style",r),uo(s,n.precedence,t),e.instance=s;case"stylesheet":r=Mi(n.href);var u=t.querySelector(Cs(r));if(u)return e.state.loading|=4,e.instance=u,se(u),u;s=R0(n),(r=Je.get(r))&&cc(s,r),u=(t.ownerDocument||t).createElement("link"),se(u);var h=u;return h._p=new Promise(function(b,T){h.onload=b,h.onerror=T}),fe(u,"link",s),e.state.loading|=4,uo(u,n.precedence,t),e.instance=u;case"script":return u=zi(n.src),(r=t.querySelector(Ms(u)))?(e.instance=r,se(r),r):(s=n,(r=Je.get(u))&&(s=x({},n),fc(s,r)),t=t.ownerDocument||t,r=t.createElement("script"),se(r),fe(r,"link",s),t.head.appendChild(r),e.instance=r);case"void":return null;default:throw Error(o(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(s=e.instance,e.state.loading|=4,uo(s,n.precedence,t));return e.instance}function uo(t,e,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,u=r,h=0;h<s.length;h++){var b=s[h];if(b.dataset.precedence===e)u=b;else if(u!==r)break}u?u.parentNode.insertBefore(t,u.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function cc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function fc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var co=null;function O0(t,e,n){if(co===null){var s=new Map,r=co=new Map;r.set(n,s)}else r=co,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(t))return s;for(s.set(t,null),n=n.getElementsByTagName(t),r=0;r<n.length;r++){var u=n[r];if(!(u[Xi]||u[oe]||t==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(e)||"";h=t+h;var b=s.get(h);b?b.push(u):s.set(h,[u])}}return s}function k0(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function db(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function _0(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function hb(t,e,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=Mi(s.href),u=e.querySelector(Cs(r));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=fo.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=u,se(u);return}u=e.ownerDocument||e,s=R0(s),(r=Je.get(r))&&cc(s,r),u=u.createElement("link"),se(u);var h=u;h._p=new Promise(function(b,T){h.onload=b,h.onerror=T}),fe(u,"link",s),n.instance=u}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=fo.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var dc=0;function mb(t,e){return t.stylesheets&&t.count===0&&mo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var s=setTimeout(function(){if(t.stylesheets&&mo(t,t.stylesheets),t.unsuspend){var u=t.unsuspend;t.unsuspend=null,u()}},6e4+e);0<t.imgBytes&&dc===0&&(dc=62500*Jv());var r=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&mo(t,t.stylesheets),t.unsuspend)){var u=t.unsuspend;t.unsuspend=null,u()}},(t.imgBytes>dc?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function fo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var ho=null;function mo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,ho=new Map,e.forEach(pb,t),ho=null,fo.call(t))}function pb(t,e){if(!(e.state.loading&4)){var n=ho.get(t);if(n)var s=n.get(null);else{n=new Map,ho.set(t,n);for(var r=t.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var h=r[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(n.set(h.dataset.precedence,h),s=h)}s&&n.set(null,s)}r=e.instance,h=r.getAttribute("data-precedence"),u=n.get(h)||s,u===s&&n.set(null,r),n.set(h,r),this.count++,s=fo.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),u?u.parentNode.insertBefore(r,u.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(r,t.firstChild)),e.state.loading|=4}}var zs={$$typeof:X,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function gb(t,e,n,s,r,u,h,b,T){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=or(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=or(0),this.hiddenUpdates=or(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function B0(t,e,n,s,r,u,h,b,T,N,_,G){return t=new gb(t,e,n,h,T,N,_,G,b),e=1,u===!0&&(e|=24),u=Ne(3,null,null,e),t.current=u,u.stateNode=t,e=Zr(),e.refCount++,t.pooledCache=e,e.refCount++,u.memoizedState={element:s,isDehydrated:n,cache:e},Fr(u),t}function L0(t){return t?(t=li,t):li}function U0(t,e,n,s,r,u){r=L0(r),s.context===null?s.context=r:s.pendingContext=r,s=Fn(e),s.payload={element:n},u=u===void 0?null:u,u!==null&&(s.callback=u),n=Pn(t,s,e),n!==null&&(Ae(n,t,e),os(n,t,e))}function H0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function hc(t,e){H0(t,e),(t=t.alternate)&&H0(t,e)}function G0(t){if(t.tag===13||t.tag===31){var e=Aa(t,67108864);e!==null&&Ae(e,t,67108864),hc(t,67108864)}}function q0(t){if(t.tag===13||t.tag===31){var e=ke();e=rr(e);var n=Aa(t,e);n!==null&&Ae(n,t,e),hc(t,e)}}var po=!0;function yb(t,e,n,s){var r=R.T;R.T=null;var u=F.p;try{F.p=2,mc(t,e,n,s)}finally{F.p=u,R.T=r}}function vb(t,e,n,s){var r=R.T;R.T=null;var u=F.p;try{F.p=8,mc(t,e,n,s)}finally{F.p=u,R.T=r}}function mc(t,e,n,s){if(po){var r=pc(s);if(r===null)tc(t,e,s,go,n),X0(t,s);else if(xb(r,t,e,n,s))s.stopPropagation();else if(X0(t,s),e&4&&-1<bb.indexOf(t)){for(;r!==null;){var u=Fa(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=ba(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var T=1<<31-Me(h);b.entanglements[1]|=T,h&=~T}dn(u),(Dt&6)===0&&($l=je()+500,ws(0))}}break;case 31:case 13:b=Aa(u,2),b!==null&&Ae(b,u,2),Il(),hc(u,2)}if(u=pc(s),u===null&&tc(t,e,s,go,n),u===r)break;r=u}r!==null&&s.stopPropagation()}else tc(t,e,s,null,n)}}function pc(t){return t=yr(t),gc(t)}var go=null;function gc(t){if(go=null,t=Ja(t),t!==null){var e=d(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=f(e),t!==null)return t;t=null}else if(n===31){if(t=m(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return go=t,null}function Y0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(i2()){case $f:return 2;case Wf:return 8;case il:case s2:return 32;case If:return 268435456;default:return 32}default:return 32}}var yc=!1,oa=null,ra=null,ua=null,Ns=new Map,Ds=new Map,ca=[],bb="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function X0(t,e){switch(t){case"focusin":case"focusout":oa=null;break;case"dragenter":case"dragleave":ra=null;break;case"mouseover":case"mouseout":ua=null;break;case"pointerover":case"pointerout":Ns.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(e.pointerId)}}function Rs(t,e,n,s,r,u){return t===null||t.nativeEvent!==u?(t={blockedOn:e,domEventName:n,eventSystemFlags:s,nativeEvent:u,targetContainers:[r]},e!==null&&(e=Fa(e),e!==null&&G0(e)),t):(t.eventSystemFlags|=s,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function xb(t,e,n,s,r){switch(e){case"focusin":return oa=Rs(oa,t,e,n,s,r),!0;case"dragenter":return ra=Rs(ra,t,e,n,s,r),!0;case"mouseover":return ua=Rs(ua,t,e,n,s,r),!0;case"pointerover":var u=r.pointerId;return Ns.set(u,Rs(Ns.get(u)||null,t,e,n,s,r)),!0;case"gotpointercapture":return u=r.pointerId,Ds.set(u,Rs(Ds.get(u)||null,t,e,n,s,r)),!0}return!1}function Z0(t){var e=Ja(t.target);if(e!==null){var n=d(e);if(n!==null){if(e=n.tag,e===13){if(e=f(n),e!==null){t.blockedOn=e,sd(t.priority,function(){q0(n)});return}}else if(e===31){if(e=m(n),e!==null){t.blockedOn=e,sd(t.priority,function(){q0(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yo(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=pc(t.nativeEvent);if(n===null){n=t.nativeEvent;var s=new n.constructor(n.type,n);gr=s,n.target.dispatchEvent(s),gr=null}else return e=Fa(n),e!==null&&G0(e),t.blockedOn=n,!1;e.shift()}return!0}function Q0(t,e,n){yo(t)&&n.delete(e)}function Sb(){yc=!1,oa!==null&&yo(oa)&&(oa=null),ra!==null&&yo(ra)&&(ra=null),ua!==null&&yo(ua)&&(ua=null),Ns.forEach(Q0),Ds.forEach(Q0)}function vo(t,e){t.blockedOn===e&&(t.blockedOn=null,yc||(yc=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Sb)))}var bo=null;function K0(t){bo!==t&&(bo=t,a.unstable_scheduleCallback(a.unstable_NormalPriority,function(){bo===t&&(bo=null);for(var e=0;e<t.length;e+=3){var n=t[e],s=t[e+1],r=t[e+2];if(typeof s!="function"){if(gc(s||n)===null)continue;break}var u=Fa(n);u!==null&&(t.splice(e,3),e-=3,pu(u,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function Ni(t){function e(T){return vo(T,t)}oa!==null&&vo(oa,t),ra!==null&&vo(ra,t),ua!==null&&vo(ua,t),Ns.forEach(e),Ds.forEach(e);for(var n=0;n<ca.length;n++){var s=ca[n];s.blockedOn===t&&(s.blockedOn=null)}for(;0<ca.length&&(n=ca[0],n.blockedOn===null);)Z0(n),n.blockedOn===null&&ca.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],u=n[s+1],h=r[ve]||null;if(typeof u=="function")h||K0(n);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(r=u,h=u[ve]||null)b=h.formAction;else if(gc(r)!==null)continue}else b=h.action;typeof b=="function"?n[s+1]=b:(n.splice(s,3),s-=3),K0(n)}}}function J0(){function t(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return r=h})},focusReset:"manual",scroll:"manual"})}function e(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),r!==null&&(r(),r=null)}}}function vc(t){this._internalRoot=t}xo.prototype.render=vc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(o(409));var n=e.current,s=ke();U0(n,s,t,e,null,null)},xo.prototype.unmount=vc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;U0(t.current,2,null,t,null,null),Il(),e[Ka]=null}};function xo(t){this._internalRoot=t}xo.prototype.unstable_scheduleHydration=function(t){if(t){var e=id();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ca.length&&e!==0&&e<ca[n].priority;n++);ca.splice(n,0,t),n===0&&Z0(t)}};var F0=i.version;if(F0!=="19.2.6")throw Error(o(527,F0,"19.2.6"));F.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=p(e),t=t!==null?v(t):null,t=t===null?null:t.stateNode,t};var Tb={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var So=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!So.isDisabled&&So.supportsFiber)try{Gi=So.inject(Tb),Ce=So}catch{}}return Os.createRoot=function(t,e){if(!c(t))throw Error(o(299));var n=!1,s="",r=nm,u=am,h=im;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(s=e.identifierPrefix),e.onUncaughtError!==void 0&&(r=e.onUncaughtError),e.onCaughtError!==void 0&&(u=e.onCaughtError),e.onRecoverableError!==void 0&&(h=e.onRecoverableError)),e=B0(t,1,!1,null,null,n,s,null,r,u,h,J0),t[Ka]=e.current,Iu(t),new vc(e)},Os.hydrateRoot=function(t,e,n){if(!c(t))throw Error(o(299));var s=!1,r="",u=nm,h=am,b=im,T=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError),n.formState!==void 0&&(T=n.formState)),e=B0(t,1,!0,e,n??null,s,r,T,u,h,b,J0),e.context=L0(null),n=e.current,s=ke(),s=rr(s),r=Fn(s),r.callback=null,Pn(n,r,s),n=s,e.current.lanes=n,Yi(e,n),dn(e),t[Ka]=e.current,Iu(t),new xo(e)},Os.version="19.2.6",Os}var s1;function Db(){if(s1)return Sc.exports;s1=1;function a(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),Sc.exports=Nb(),Sc.exports}var Gp=Db();const qp=(...a)=>a.filter((i,l,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===l).join(" ").trim();const Rb=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Vb=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,o)=>o?o.toUpperCase():l.toLowerCase());const l1=a=>{const i=Vb(a);return i.charAt(0).toUpperCase()+i.slice(1)};var Ec={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ob=a=>{for(const i in a)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},kb=O.createContext({}),_b=()=>O.useContext(kb),Bb=O.forwardRef(({color:a,size:i,strokeWidth:l,absoluteStrokeWidth:o,className:c="",children:d,iconNode:f,...m},y)=>{const{size:p=24,strokeWidth:v=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:j=""}=_b()??{},E=o??x?Number(l??v)*24/Number(i??p):l??v;return O.createElement("svg",{ref:y,...Ec,width:i??p??Ec.width,height:i??p??Ec.height,stroke:a??S,strokeWidth:E,className:qp("lucide",j,c),...!d&&!Ob(m)&&{"aria-hidden":"true"},...m},[...f.map(([z,k])=>O.createElement(z,k)),...Array.isArray(d)?d:[d]])});const xt=(a,i)=>{const l=O.forwardRef(({className:o,...c},d)=>O.createElement(Bb,{ref:d,iconNode:i,className:qp(`lucide-${Rb(l1(a))}`,`lucide-${a}`,o),...c}));return l.displayName=l1(a),l};const Lb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ub=xt("arrow-down",Lb);const Hb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Gb=xt("arrow-up",Hb);const qb=[["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"}]],o1=xt("box",qb);const Yb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xb=xt("check",Yb);const Zb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ws=xt("chevron-down",Zb);const Qb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Kb=xt("chevron-right",Qb);const Jb=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Fb=xt("database",Jb);const Pb=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],$b=xt("earth",Pb);const Wb=[["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"}]],Ib=xt("external-link",Wb);const t3=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],e3=xt("file-code-corner",t3);const n3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],a3=xt("file-text",n3);const i3=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],s3=xt("file",i3);const l3=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],o3=xt("flask-conical",l3);const r3=[["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"}]],u3=xt("folder-plus",r3);const c3=[["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"}]],bf=xt("folder",c3);const f3=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],Uo=xt("git-branch",f3);const d3=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 9v12",key:"1sc30k"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v3",key:"1jb6z3"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]],h3=xt("git-pull-request-create",d3);const m3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],p3=xt("image",m3);const g3=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yp=xt("loader-circle",g3);const y3=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],v3=xt("lock-keyhole",y3);const b3=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],x3=xt("network",b3);const S3=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],T3=xt("palette",S3);const w3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],A3=xt("panel-left-close",w3);const E3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],j3=xt("panel-left-open",E3);const C3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],M3=xt("panel-left",C3);const z3=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],N3=xt("pencil",z3);const D3=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],R3=xt("play",D3);const V3=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ho=xt("plus",V3);const O3=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],r1=xt("radio",O3);const k3=[["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"}]],Xp=xt("refresh-cw",k3);const _3=[["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"}]],B3=xt("rotate-ccw",_3);const L3=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],U3=xt("save",L3);const H3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],G3=xt("search",H3);const q3=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Y3=xt("server",q3);const X3=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Z3=xt("settings-2",X3);const Q3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],K3=xt("square",Q3);const J3=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Zp=xt("terminal",J3);const F3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$o=xt("x",F3),P3="/assets/nomoreide-logo-B2E14b65.png";async function $3(){return Is("/api/dashboard")}async function W3(a){const i=await fetch(`/api/git/diff?file=${encodeURIComponent(a)}`);if(!i.ok){const l=await i.json().catch(()=>({error:i.statusText}));throw new Error(l.error||"Unable to load diff")}return i.text()}async function I3(a){return Is(`/api/fs/directories?path=${encodeURIComponent(a)}`)}async function u1(a){return(await Is(`/api/services/${encodeURIComponent(a)}/logs`)).logs}async function ln(a,i){const l=new URLSearchParams;for(const[o,c]of Object.entries(i))c!==void 0&&String(c).trim()&&l.set(o,String(c));await Is(a,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:l})}async function tx(a){return ex("/api/services/test",a)}async function ex(a,i){const l=new URLSearchParams;for(const[o,c]of Object.entries(i))c!==void 0&&String(c).trim()&&l.set(o,String(c));return Is(a,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:l})}async function Is(a,i){const l=await fetch(a,i),o=await l.json().catch(()=>{});if(!l.ok)throw new Error(o?.error||l.statusText);return o}function Qp(a){var i,l,o="";if(typeof a=="string"||typeof a=="number")o+=a;else if(typeof a=="object")if(Array.isArray(a)){var c=a.length;for(i=0;i<c;i++)a[i]&&(l=Qp(a[i]))&&(o&&(o+=" "),o+=l)}else for(l in a)a[l]&&(o&&(o+=" "),o+=l);return o}function Qs(){for(var a,i,l=0,o="",c=arguments.length;l<c;l++)(a=arguments[l])&&(i=Qp(a))&&(o&&(o+=" "),o+=i);return o}const c1=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,f1=Qs,Kp=(a,i)=>l=>{var o;if(i?.variants==null)return f1(a,l?.class,l?.className);const{variants:c,defaultVariants:d}=i,f=Object.keys(c).map(p=>{const v=l?.[p],x=d?.[p];if(v===null)return null;const S=c1(v)||c1(x);return c[p][S]}),m=l&&Object.entries(l).reduce((p,v)=>{let[x,S]=v;return S===void 0||(p[x]=S),p},{}),y=i==null||(o=i.compoundVariants)===null||o===void 0?void 0:o.reduce((p,v)=>{let{class:x,className:S,...j}=v;return Object.entries(j).every(E=>{let[z,k]=E;return Array.isArray(k)?k.includes({...d,...m}[z]):{...d,...m}[z]===k})?[...p,x,S]:p},[]);return f1(a,f,y,l?.class,l?.className)},nx=(a,i)=>{const l=new Array(a.length+i.length);for(let o=0;o<a.length;o++)l[o]=a[o];for(let o=0;o<i.length;o++)l[a.length+o]=i[o];return l},ax=(a,i)=>({classGroupId:a,validator:i}),Jp=(a=new Map,i=null,l)=>({nextPart:a,validators:i,classGroupId:l}),Go="-",d1=[],ix="arbitrary..",sx=a=>{const i=ox(a),{conflictingClassGroups:l,conflictingClassGroupModifiers:o}=a;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return lx(f);const m=f.split(Go),y=m[0]===""&&m.length>1?1:0;return Fp(m,y,i)},getConflictingClassGroupIds:(f,m)=>{if(m){const y=o[f],p=l[f];return y?p?nx(p,y):y:p||d1}return l[f]||d1}}},Fp=(a,i,l)=>{if(a.length-i===0)return l.classGroupId;const c=a[i],d=l.nextPart.get(c);if(d){const p=Fp(a,i+1,d);if(p)return p}const f=l.validators;if(f===null)return;const m=i===0?a.join(Go):a.slice(i).join(Go),y=f.length;for(let p=0;p<y;p++){const v=f[p];if(v.validator(m))return v.classGroupId}},lx=a=>a.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=a.slice(1,-1),l=i.indexOf(":"),o=i.slice(0,l);return o?ix+o:void 0})(),ox=a=>{const{theme:i,classGroups:l}=a;return rx(l,i)},rx=(a,i)=>{const l=Jp();for(const o in a){const c=a[o];xf(c,l,o,i)}return l},xf=(a,i,l,o)=>{const c=a.length;for(let d=0;d<c;d++){const f=a[d];ux(f,i,l,o)}},ux=(a,i,l,o)=>{if(typeof a=="string"){cx(a,i,l);return}if(typeof a=="function"){fx(a,i,l,o);return}dx(a,i,l,o)},cx=(a,i,l)=>{const o=a===""?i:Pp(i,a);o.classGroupId=l},fx=(a,i,l,o)=>{if(hx(a)){xf(a(o),i,l,o);return}i.validators===null&&(i.validators=[]),i.validators.push(ax(l,a))},dx=(a,i,l,o)=>{const c=Object.entries(a),d=c.length;for(let f=0;f<d;f++){const[m,y]=c[f];xf(y,Pp(i,m),l,o)}},Pp=(a,i)=>{let l=a;const o=i.split(Go),c=o.length;for(let d=0;d<c;d++){const f=o[d];let m=l.nextPart.get(f);m||(m=Jp(),l.nextPart.set(f,m)),l=m}return l},hx=a=>"isThemeGetter"in a&&a.isThemeGetter===!0,mx=a=>{if(a<1)return{get:()=>{},set:()=>{}};let i=0,l=Object.create(null),o=Object.create(null);const c=(d,f)=>{l[d]=f,i++,i>a&&(i=0,o=l,l=Object.create(null))};return{get(d){let f=l[d];if(f!==void 0)return f;if((f=o[d])!==void 0)return c(d,f),f},set(d,f){d in l?l[d]=f:c(d,f)}}},Qc="!",h1=":",px=[],m1=(a,i,l,o,c)=>({modifiers:a,hasImportantModifier:i,baseClassName:l,maybePostfixModifierPosition:o,isExternal:c}),gx=a=>{const{prefix:i,experimentalParseClassName:l}=a;let o=c=>{const d=[];let f=0,m=0,y=0,p;const v=c.length;for(let z=0;z<v;z++){const k=c[z];if(f===0&&m===0){if(k===h1){d.push(c.slice(y,z)),y=z+1;continue}if(k==="/"){p=z;continue}}k==="["?f++:k==="]"?f--:k==="("?m++:k===")"&&m--}const x=d.length===0?c:c.slice(y);let S=x,j=!1;x.endsWith(Qc)?(S=x.slice(0,-1),j=!0):x.startsWith(Qc)&&(S=x.slice(1),j=!0);const E=p&&p>y?p-y:void 0;return m1(d,j,S,E)};if(i){const c=i+h1,d=o;o=f=>f.startsWith(c)?d(f.slice(c.length)):m1(px,!1,f,void 0,!0)}if(l){const c=o;o=d=>l({className:d,parseClassName:c})}return o},yx=a=>{const i=new Map;return a.orderSensitiveModifiers.forEach((l,o)=>{i.set(l,1e6+o)}),l=>{const o=[];let c=[];for(let d=0;d<l.length;d++){const f=l[d],m=f[0]==="[",y=i.has(f);m||y?(c.length>0&&(c.sort(),o.push(...c),c=[]),o.push(f)):c.push(f)}return c.length>0&&(c.sort(),o.push(...c)),o}},vx=a=>({cache:mx(a.cacheSize),parseClassName:gx(a),sortModifiers:yx(a),postfixLookupClassGroupIds:bx(a),...sx(a)}),bx=a=>{const i=Object.create(null),l=a.postfixLookupClassGroups;if(l)for(let o=0;o<l.length;o++)i[l[o]]=!0;return i},xx=/\s+/,Sx=(a,i)=>{const{parseClassName:l,getClassGroupId:o,getConflictingClassGroupIds:c,sortModifiers:d,postfixLookupClassGroupIds:f}=i,m=[],y=a.trim().split(xx);let p="";for(let v=y.length-1;v>=0;v-=1){const x=y[v],{isExternal:S,modifiers:j,hasImportantModifier:E,baseClassName:z,maybePostfixModifierPosition:k}=l(x);if(S){p=x+(p.length>0?" "+p:p);continue}let L=!!k,Q;if(L){const J=z.substring(0,k);Q=o(J);const B=Q&&f[Q]?o(z):void 0;B&&B!==Q&&(Q=B,L=!1)}else Q=o(z);if(!Q){if(!L){p=x+(p.length>0?" "+p:p);continue}if(Q=o(z),!Q){p=x+(p.length>0?" "+p:p);continue}L=!1}const X=j.length===0?"":j.length===1?j[0]:d(j).join(":"),Z=E?X+Qc:X,q=Z+Q;if(m.indexOf(q)>-1)continue;m.push(q);const P=c(Q,L);for(let J=0;J<P.length;++J){const B=P[J];m.push(Z+B)}p=x+(p.length>0?" "+p:p)}return p},Tx=(...a)=>{let i=0,l,o,c="";for(;i<a.length;)(l=a[i++])&&(o=$p(l))&&(c&&(c+=" "),c+=o);return c},$p=a=>{if(typeof a=="string")return a;let i,l="";for(let o=0;o<a.length;o++)a[o]&&(i=$p(a[o]))&&(l&&(l+=" "),l+=i);return l},wx=(a,...i)=>{let l,o,c,d;const f=y=>{const p=i.reduce((v,x)=>x(v),a());return l=vx(p),o=l.cache.get,c=l.cache.set,d=m,m(y)},m=y=>{const p=o(y);if(p)return p;const v=Sx(y,l);return c(y,v),v};return d=f,(...y)=>d(Tx(...y))},Ax=[],ne=a=>{const i=l=>l[a]||Ax;return i.isThemeGetter=!0,i},Wp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ip=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ex=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,jx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cx=/\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$/,Mx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,da=a=>Ex.test(a),vt=a=>!!a&&!Number.isNaN(Number(a)),hn=a=>!!a&&Number.isInteger(Number(a)),jc=a=>a.endsWith("%")&&vt(a.slice(0,-1)),Ln=a=>jx.test(a),tg=()=>!0,Dx=a=>Cx.test(a)&&!Mx.test(a),Sf=()=>!1,Rx=a=>zx.test(a),Vx=a=>Nx.test(a),Ox=a=>!I(a)&&!et(a),kx=a=>a.startsWith("@container")&&(a[10]==="/"&&a[11]!==void 0||a[11]==="s"&&a[16]!==void 0&&a.startsWith("-size/",10)||a[11]==="n"&&a[18]!==void 0&&a.startsWith("-normal/",10)),_x=a=>ya(a,ag,Sf),I=a=>Wp.test(a),Ba=a=>ya(a,ig,Dx),p1=a=>ya(a,Xx,vt),Bx=a=>ya(a,lg,tg),Lx=a=>ya(a,sg,Sf),g1=a=>ya(a,eg,Sf),Ux=a=>ya(a,ng,Vx),To=a=>ya(a,og,Rx),et=a=>Ip.test(a),ks=a=>Xa(a,ig),Hx=a=>Xa(a,sg),y1=a=>Xa(a,eg),Gx=a=>Xa(a,ag),qx=a=>Xa(a,ng),wo=a=>Xa(a,og,!0),Yx=a=>Xa(a,lg,!0),ya=(a,i,l)=>{const o=Wp.exec(a);return o?o[1]?i(o[1]):l(o[2]):!1},Xa=(a,i,l=!1)=>{const o=Ip.exec(a);return o?o[1]?i(o[1]):l:!1},eg=a=>a==="position"||a==="percentage",ng=a=>a==="image"||a==="url",ag=a=>a==="length"||a==="size"||a==="bg-size",ig=a=>a==="length",Xx=a=>a==="number",sg=a=>a==="family-name",lg=a=>a==="number"||a==="weight",og=a=>a==="shadow",Zx=()=>{const a=ne("color"),i=ne("font"),l=ne("text"),o=ne("font-weight"),c=ne("tracking"),d=ne("leading"),f=ne("breakpoint"),m=ne("container"),y=ne("spacing"),p=ne("radius"),v=ne("shadow"),x=ne("inset-shadow"),S=ne("text-shadow"),j=ne("drop-shadow"),E=ne("blur"),z=ne("perspective"),k=ne("aspect"),L=ne("ease"),Q=ne("animate"),X=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...Z(),et,I],P=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto","contain","none"],B=()=>[et,I,y],ft=()=>[da,"full","auto",...B()],Y=()=>[hn,"none","subgrid",et,I],rt=()=>["auto",{span:["full",hn,et,I]},hn,et,I],dt=()=>[hn,"auto",et,I],qt=()=>["auto","min","max","fr",et,I],wt=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],yt=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...B()],F=()=>[da,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],$=()=>[da,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ut=()=>[da,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],K=()=>[a,et,I],w=()=>[...Z(),y1,g1,{position:[et,I]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Gx,_x,{size:[et,I]}],tt=()=>[jc,ks,Ba],st=()=>["","none","full",p,et,I],ot=()=>["",vt,ks,Ba],jt=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],gt=()=>[vt,jc,y1,g1],Un=()=>["","none",E,et,I],bn=()=>["none",vt,et,I],Hn=()=>["none",vt,et,I],Qa=()=>[vt,et,I],Le=()=>[da,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[tg],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[Ox],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",vt],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",da,I,et,k]}],container:["container"],"container-type":[{"@container":["","normal","size",et,I]}],"container-named":[kx],columns:[{columns:[vt,I,et,m]}],"break-after":[{"break-after":X()}],"break-before":[{"break-before":X()}],"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:q()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ft()}],"inset-x":[{"inset-x":ft()}],"inset-y":[{"inset-y":ft()}],start:[{"inset-s":ft(),start:ft()}],end:[{"inset-e":ft(),end:ft()}],"inset-bs":[{"inset-bs":ft()}],"inset-be":[{"inset-be":ft()}],top:[{top:ft()}],right:[{right:ft()}],bottom:[{bottom:ft()}],left:[{left:ft()}],visibility:["visible","invisible","collapse"],z:[{z:[hn,"auto",et,I]}],basis:[{basis:[da,"full","auto",m,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[vt,da,"auto","initial","none",I]}],grow:[{grow:["",vt,et,I]}],shrink:[{shrink:["",vt,et,I]}],order:[{order:[hn,"first","last","none",et,I]}],"grid-cols":[{"grid-cols":Y()}],"col-start-end":[{col:rt()}],"col-start":[{"col-start":dt()}],"col-end":[{"col-end":dt()}],"grid-rows":[{"grid-rows":Y()}],"row-start-end":[{row:rt()}],"row-start":[{"row-start":dt()}],"row-end":[{"row-end":dt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":qt()}],"auto-rows":[{"auto-rows":qt()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...wt(),"normal"]}],"justify-items":[{"justify-items":[...yt(),"normal"]}],"justify-self":[{"justify-self":["auto",...yt()]}],"align-content":[{content:["normal",...wt()]}],"align-items":[{items:[...yt(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...yt(),{baseline:["","last"]}]}],"place-content":[{"place-content":wt()}],"place-items":[{"place-items":[...yt(),"baseline"]}],"place-self":[{"place-self":["auto",...yt()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...$()]}],"min-inline-size":[{"min-inline":["auto",...$()]}],"max-inline-size":[{"max-inline":["none",...$()]}],"block-size":[{block:["auto",...ut()]}],"min-block-size":[{"min-block":["auto",...ut()]}],"max-block-size":[{"max-block":["none",...ut()]}],w:[{w:[m,"screen",...F()]}],"min-w":[{"min-w":[m,"screen","none",...F()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",l,ks,Ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Yx,Bx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jc,I]}],"font-family":[{font:[Hx,Lx,i]}],"font-features":[{"font-features":[I]}],"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:[c,et,I]}],"line-clamp":[{"line-clamp":[vt,"none",et,p1]}],leading:[{leading:[d,...B()]}],"list-image":[{"list-image":["none",et,I]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",et,I]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...jt(),"wavy"]}],"text-decoration-thickness":[{decoration:[vt,"from-font","auto",et,Ba]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[vt,"auto",et,I]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"tab-size":[{tab:[hn,et,I]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",et,I]}],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",et,I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:w()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hn,et,I],radial:["",et,I],conic:[hn,et,I]},qx,Ux]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:tt()}],"gradient-via-pos":[{via:tt()}],"gradient-to-pos":[{to:tt()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:st()}],"rounded-s":[{"rounded-s":st()}],"rounded-e":[{"rounded-e":st()}],"rounded-t":[{"rounded-t":st()}],"rounded-r":[{"rounded-r":st()}],"rounded-b":[{"rounded-b":st()}],"rounded-l":[{"rounded-l":st()}],"rounded-ss":[{"rounded-ss":st()}],"rounded-se":[{"rounded-se":st()}],"rounded-ee":[{"rounded-ee":st()}],"rounded-es":[{"rounded-es":st()}],"rounded-tl":[{"rounded-tl":st()}],"rounded-tr":[{"rounded-tr":st()}],"rounded-br":[{"rounded-br":st()}],"rounded-bl":[{"rounded-bl":st()}],"border-w":[{border:ot()}],"border-w-x":[{"border-x":ot()}],"border-w-y":[{"border-y":ot()}],"border-w-s":[{"border-s":ot()}],"border-w-e":[{"border-e":ot()}],"border-w-bs":[{"border-bs":ot()}],"border-w-be":[{"border-be":ot()}],"border-w-t":[{"border-t":ot()}],"border-w-r":[{"border-r":ot()}],"border-w-b":[{"border-b":ot()}],"border-w-l":[{"border-l":ot()}],"divide-x":[{"divide-x":ot()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ot()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...jt(),"hidden","none"]}],"divide-style":[{divide:[...jt(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...jt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[vt,et,I]}],"outline-w":[{outline:["",vt,ks,Ba]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",v,wo,To]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",x,wo,To]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:ot()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[vt,Ba]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":ot()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,wo,To]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[vt,et,I]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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":[vt]}],"mask-image-linear-from-pos":[{"mask-linear-from":gt()}],"mask-image-linear-to-pos":[{"mask-linear-to":gt()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":gt()}],"mask-image-t-to-pos":[{"mask-t-to":gt()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":gt()}],"mask-image-r-to-pos":[{"mask-r-to":gt()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":gt()}],"mask-image-b-to-pos":[{"mask-b-to":gt()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":gt()}],"mask-image-l-to-pos":[{"mask-l-to":gt()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":gt()}],"mask-image-x-to-pos":[{"mask-x-to":gt()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":gt()}],"mask-image-y-to-pos":[{"mask-y-to":gt()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[et,I]}],"mask-image-radial-from-pos":[{"mask-radial-from":gt()}],"mask-image-radial-to-pos":[{"mask-radial-to":gt()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"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":Z()}],"mask-image-conic-pos":[{"mask-conic":[vt]}],"mask-image-conic-from-pos":[{"mask-conic-from":gt()}],"mask-image-conic-to-pos":[{"mask-conic-to":gt()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:w()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",et,I]}],filter:[{filter:["","none",et,I]}],blur:[{blur:Un()}],brightness:[{brightness:[vt,et,I]}],contrast:[{contrast:[vt,et,I]}],"drop-shadow":[{"drop-shadow":["","none",j,wo,To]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",vt,et,I]}],"hue-rotate":[{"hue-rotate":[vt,et,I]}],invert:[{invert:["",vt,et,I]}],saturate:[{saturate:[vt,et,I]}],sepia:[{sepia:["",vt,et,I]}],"backdrop-filter":[{"backdrop-filter":["","none",et,I]}],"backdrop-blur":[{"backdrop-blur":Un()}],"backdrop-brightness":[{"backdrop-brightness":[vt,et,I]}],"backdrop-contrast":[{"backdrop-contrast":[vt,et,I]}],"backdrop-grayscale":[{"backdrop-grayscale":["",vt,et,I]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vt,et,I]}],"backdrop-invert":[{"backdrop-invert":["",vt,et,I]}],"backdrop-opacity":[{"backdrop-opacity":[vt,et,I]}],"backdrop-saturate":[{"backdrop-saturate":[vt,et,I]}],"backdrop-sepia":[{"backdrop-sepia":["",vt,et,I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",et,I]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[vt,"initial",et,I]}],ease:[{ease:["linear","initial",L,et,I]}],delay:[{delay:[vt,et,I]}],animate:[{animate:["none",Q,et,I]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[z,et,I]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:bn()}],"rotate-x":[{"rotate-x":bn()}],"rotate-y":[{"rotate-y":bn()}],"rotate-z":[{"rotate-z":bn()}],scale:[{scale:Hn()}],"scale-x":[{"scale-x":Hn()}],"scale-y":[{"scale-y":Hn()}],"scale-z":[{"scale-z":Hn()}],"scale-3d":["scale-3d"],skew:[{skew:Qa()}],"skew-x":[{"skew-x":Qa()}],"skew-y":[{"skew-y":Qa()}],transform:[{transform:[et,I,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],zoom:[{zoom:[hn,et,I]}],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"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",et,I]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":K()}],"scrollbar-track-color":[{"scrollbar-track":K()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"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",et,I]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[vt,ks,Ba,p1]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Qx=wx(Zx);function bt(...a){return Qx(Qs(a))}const Kx=Kp("inline-flex h-9 shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-transparent px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border-border bg-background hover:bg-muted",ghost:"hover:bg-muted",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-9 px-3",sm:"h-8 px-2.5 text-xs",icon:"size-9 p-0"}},defaultVariants:{variant:"default",size:"default"}});function Mt({className:a,variant:i,size:l,...o}){return g.jsx("button",{className:bt(Kx({variant:i,size:l,className:a})),...o})}const rg=O.createContext({});function Jx(a){const i=O.useRef(null);return i.current===null&&(i.current=a()),i.current}const Fx=typeof window<"u",Px=Fx?O.useLayoutEffect:O.useEffect,Tf=O.createContext(null);function wf(a,i){a.indexOf(i)===-1&&a.push(i)}function qo(a,i){const l=a.indexOf(i);l>-1&&a.splice(l,1)}const vn=(a,i,l)=>l>i?i:l<a?a:l;let Af=()=>{};const pa={},ug=a=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(a);function cg(a){return typeof a=="object"&&a!==null}const fg=a=>/^0[^.\s]+$/u.test(a);function dg(a){let i;return()=>(i===void 0&&(i=a()),i)}const Pe=a=>a,$x=(a,i)=>l=>i(a(l)),tl=(...a)=>a.reduce($x),Ks=(a,i,l)=>{const o=i-a;return o===0?1:(l-a)/o};class Ef{constructor(){this.subscriptions=[]}add(i){return wf(this.subscriptions,i),()=>qo(this.subscriptions,i)}notify(i,l,o){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](i,l,o);else for(let d=0;d<c;d++){const f=this.subscriptions[d];f&&f(i,l,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _e=a=>a*1e3,Fe=a=>a/1e3;function hg(a,i){return i?a*(1e3/i):0}const mg=(a,i,l)=>(((1-3*l+3*i)*a+(3*l-6*i))*a+3*i)*a,Wx=1e-7,Ix=12;function t5(a,i,l,o,c){let d,f,m=0;do f=i+(l-i)/2,d=mg(f,o,c)-a,d>0?l=f:i=f;while(Math.abs(d)>Wx&&++m<Ix);return f}function el(a,i,l,o){if(a===i&&l===o)return Pe;const c=d=>t5(d,0,1,a,l);return d=>d===0||d===1?d:mg(c(d),i,o)}const pg=a=>i=>i<=.5?a(2*i)/2:(2-a(2*(1-i)))/2,gg=a=>i=>1-a(1-i),yg=el(.33,1.53,.69,.99),jf=gg(yg),vg=pg(jf),bg=a=>a>=1?1:(a*=2)<1?.5*jf(a):.5*(2-Math.pow(2,-10*(a-1))),Cf=a=>1-Math.sin(Math.acos(a)),xg=gg(Cf),Sg=pg(Cf),e5=el(.42,0,1,1),n5=el(0,0,.58,1),Tg=el(.42,0,.58,1),a5=a=>Array.isArray(a)&&typeof a[0]!="number",wg=a=>Array.isArray(a)&&typeof a[0]=="number",i5={linear:Pe,easeIn:e5,easeInOut:Tg,easeOut:n5,circIn:Cf,circInOut:Sg,circOut:xg,backIn:jf,backInOut:vg,backOut:yg,anticipate:bg},s5=a=>typeof a=="string",v1=a=>{if(wg(a)){Af(a.length===4);const[i,l,o,c]=a;return el(i,l,o,c)}else if(s5(a))return i5[a];return a},Ao=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function l5(a,i){let l=new Set,o=new Set,c=!1,d=!1;const f=new WeakSet;let m={delta:0,timestamp:0,isProcessing:!1};function y(v){f.has(v)&&(p.schedule(v),a()),v(m)}const p={schedule:(v,x=!1,S=!1)=>{const E=S&&c?l:o;return x&&f.add(v),E.add(v),v},cancel:v=>{o.delete(v),f.delete(v)},process:v=>{if(m=v,c){d=!0;return}c=!0;const x=l;l=o,o=x,l.forEach(y),l.clear(),c=!1,d&&(d=!1,p.process(v))}};return p}const o5=40;function Ag(a,i){let l=!1,o=!0;const c={delta:0,timestamp:0,isProcessing:!1},d=()=>l=!0,f=Ao.reduce((X,Z)=>(X[Z]=l5(d),X),{}),{setup:m,read:y,resolveKeyframes:p,preUpdate:v,update:x,preRender:S,render:j,postRender:E}=f,z=()=>{const X=pa.useManualTiming,Z=X?c.timestamp:performance.now();l=!1,X||(c.delta=o?1e3/60:Math.max(Math.min(Z-c.timestamp,o5),1)),c.timestamp=Z,c.isProcessing=!0,m.process(c),y.process(c),p.process(c),v.process(c),x.process(c),S.process(c),j.process(c),E.process(c),c.isProcessing=!1,l&&i&&(o=!1,a(z))},k=()=>{l=!0,o=!0,c.isProcessing||a(z)};return{schedule:Ao.reduce((X,Z)=>{const q=f[Z];return X[Z]=(P,J=!1,B=!1)=>(l||k(),q.schedule(P,J,B)),X},{}),cancel:X=>{for(let Z=0;Z<Ao.length;Z++)f[Ao[Z]].cancel(X)},state:c,steps:f}}const{schedule:Lt,cancel:ga,state:de,steps:Cc}=Ag(typeof requestAnimationFrame<"u"?requestAnimationFrame:Pe,!0);let No;function r5(){No=void 0}const ge={now:()=>(No===void 0&&ge.set(de.isProcessing||pa.useManualTiming?de.timestamp:performance.now()),No),set:a=>{No=a,queueMicrotask(r5)}},Eg=a=>i=>typeof i=="string"&&i.startsWith(a),jg=Eg("--"),u5=Eg("var(--"),Mf=a=>u5(a)?c5.test(a.split("/*")[0].trim()):!1,c5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function b1(a){return typeof a!="string"?!1:a.split("/*")[0].includes("var(--")}const Li={test:a=>typeof a=="number",parse:parseFloat,transform:a=>a},Js={...Li,transform:a=>vn(0,1,a)},Eo={...Li,default:1},Ls=a=>Math.round(a*1e5)/1e5,zf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function f5(a){return a==null}const d5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Nf=(a,i)=>l=>!!(typeof l=="string"&&d5.test(l)&&l.startsWith(a)||i&&!f5(l)&&Object.prototype.hasOwnProperty.call(l,i)),Cg=(a,i,l)=>o=>{if(typeof o!="string")return o;const[c,d,f,m]=o.match(zf);return{[a]:parseFloat(c),[i]:parseFloat(d),[l]:parseFloat(f),alpha:m!==void 0?parseFloat(m):1}},h5=a=>vn(0,255,a),Mc={...Li,transform:a=>Math.round(h5(a))},Ha={test:Nf("rgb","red"),parse:Cg("red","green","blue"),transform:({red:a,green:i,blue:l,alpha:o=1})=>"rgba("+Mc.transform(a)+", "+Mc.transform(i)+", "+Mc.transform(l)+", "+Ls(Js.transform(o))+")"};function m5(a){let i="",l="",o="",c="";return a.length>5?(i=a.substring(1,3),l=a.substring(3,5),o=a.substring(5,7),c=a.substring(7,9)):(i=a.substring(1,2),l=a.substring(2,3),o=a.substring(3,4),c=a.substring(4,5),i+=i,l+=l,o+=o,c+=c),{red:parseInt(i,16),green:parseInt(l,16),blue:parseInt(o,16),alpha:c?parseInt(c,16)/255:1}}const Kc={test:Nf("#"),parse:m5,transform:Ha.transform},nl=a=>({test:i=>typeof i=="string"&&i.endsWith(a)&&i.split(" ").length===1,parse:parseFloat,transform:i=>`${i}${a}`}),ha=nl("deg"),yn=nl("%"),at=nl("px"),p5=nl("vh"),g5=nl("vw"),x1={...yn,parse:a=>yn.parse(a)/100,transform:a=>yn.transform(a*100)},Vi={test:Nf("hsl","hue"),parse:Cg("hue","saturation","lightness"),transform:({hue:a,saturation:i,lightness:l,alpha:o=1})=>"hsla("+Math.round(a)+", "+yn.transform(Ls(i))+", "+yn.transform(Ls(l))+", "+Ls(Js.transform(o))+")"},It={test:a=>Ha.test(a)||Kc.test(a)||Vi.test(a),parse:a=>Ha.test(a)?Ha.parse(a):Vi.test(a)?Vi.parse(a):Kc.parse(a),transform:a=>typeof a=="string"?a:a.hasOwnProperty("red")?Ha.transform(a):Vi.transform(a),getAnimatableNone:a=>{const i=It.parse(a);return i.alpha=0,It.transform(i)}},y5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function v5(a){return isNaN(a)&&typeof a=="string"&&(a.match(zf)?.length||0)+(a.match(y5)?.length||0)>0}const Mg="number",zg="color",b5="var",x5="var(",S1="${}",S5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _i(a){const i=a.toString(),l=[],o={color:[],number:[],var:[]},c=[];let d=0;const m=i.replace(S5,y=>(It.test(y)?(o.color.push(d),c.push(zg),l.push(It.parse(y))):y.startsWith(x5)?(o.var.push(d),c.push(b5),l.push(y)):(o.number.push(d),c.push(Mg),l.push(parseFloat(y))),++d,S1)).split(S1);return{values:l,split:m,indexes:o,types:c}}function T5(a){return _i(a).values}function Ng({split:a,types:i}){const l=a.length;return o=>{let c="";for(let d=0;d<l;d++)if(c+=a[d],o[d]!==void 0){const f=i[d];f===Mg?c+=Ls(o[d]):f===zg?c+=It.transform(o[d]):c+=o[d]}return c}}function w5(a){return Ng(_i(a))}const A5=a=>typeof a=="number"?0:It.test(a)?It.getAnimatableNone(a):a,E5=(a,i)=>typeof a=="number"?i?.trim().endsWith("/")?a:0:A5(a);function j5(a){const i=_i(a);return Ng(i)(i.values.map((o,c)=>E5(o,i.split[c])))}const on={test:v5,parse:T5,createTransformer:w5,getAnimatableNone:j5};function zc(a,i,l){return l<0&&(l+=1),l>1&&(l-=1),l<1/6?a+(i-a)*6*l:l<1/2?i:l<2/3?a+(i-a)*(2/3-l)*6:a}function C5({hue:a,saturation:i,lightness:l,alpha:o}){a/=360,i/=100,l/=100;let c=0,d=0,f=0;if(!i)c=d=f=l;else{const m=l<.5?l*(1+i):l+i-l*i,y=2*l-m;c=zc(y,m,a+1/3),d=zc(y,m,a),f=zc(y,m,a-1/3)}return{red:Math.round(c*255),green:Math.round(d*255),blue:Math.round(f*255),alpha:o}}function Yo(a,i){return l=>l>0?i:a}const Gt=(a,i,l)=>a+(i-a)*l,Nc=(a,i,l)=>{const o=a*a,c=l*(i*i-o)+o;return c<0?0:Math.sqrt(c)},M5=[Kc,Ha,Vi],z5=a=>M5.find(i=>i.test(a));function T1(a){const i=z5(a);if(!i)return!1;let l=i.parse(a);return i===Vi&&(l=C5(l)),l}const w1=(a,i)=>{const l=T1(a),o=T1(i);if(!l||!o)return Yo(a,i);const c={...l};return d=>(c.red=Nc(l.red,o.red,d),c.green=Nc(l.green,o.green,d),c.blue=Nc(l.blue,o.blue,d),c.alpha=Gt(l.alpha,o.alpha,d),Ha.transform(c))},Jc=new Set(["none","hidden"]);function N5(a,i){return Jc.has(a)?l=>l<=0?a:i:l=>l>=1?i:a}function D5(a,i){return l=>Gt(a,i,l)}function Df(a){return typeof a=="number"?D5:typeof a=="string"?Mf(a)?Yo:It.test(a)?w1:O5:Array.isArray(a)?Dg:typeof a=="object"?It.test(a)?w1:R5:Yo}function Dg(a,i){const l=[...a],o=l.length,c=a.map((d,f)=>Df(d)(d,i[f]));return d=>{for(let f=0;f<o;f++)l[f]=c[f](d);return l}}function R5(a,i){const l={...a,...i},o={};for(const c in l)a[c]!==void 0&&i[c]!==void 0&&(o[c]=Df(a[c])(a[c],i[c]));return c=>{for(const d in o)l[d]=o[d](c);return l}}function V5(a,i){const l=[],o={color:0,var:0,number:0};for(let c=0;c<i.values.length;c++){const d=i.types[c],f=a.indexes[d][o[d]],m=a.values[f]??0;l[c]=m,o[d]++}return l}const O5=(a,i)=>{const l=on.createTransformer(i),o=_i(a),c=_i(i);return o.indexes.var.length===c.indexes.var.length&&o.indexes.color.length===c.indexes.color.length&&o.indexes.number.length>=c.indexes.number.length?Jc.has(a)&&!c.values.length||Jc.has(i)&&!o.values.length?N5(a,i):tl(Dg(V5(o,c),c.values),l):Yo(a,i)};function Rg(a,i,l){return typeof a=="number"&&typeof i=="number"&&typeof l=="number"?Gt(a,i,l):Df(a)(a,i)}const k5=a=>{const i=({timestamp:l})=>a(l);return{start:(l=!0)=>Lt.update(i,l),stop:()=>ga(i),now:()=>de.isProcessing?de.timestamp:ge.now()}},Vg=(a,i,l=10)=>{let o="";const c=Math.max(Math.round(i/l),2);for(let d=0;d<c;d++)o+=Math.round(a(d/(c-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Xo=2e4;function Rf(a){let i=0;const l=50;let o=a.next(i);for(;!o.done&&i<Xo;)i+=l,o=a.next(i);return i>=Xo?1/0:i}function _5(a,i=100,l){const o=l({...a,keyframes:[0,i]}),c=Math.min(Rf(o),Xo);return{type:"keyframes",ease:d=>o.next(c*d).value/i,duration:Fe(c)}}const Qt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Fc(a,i){return a*Math.sqrt(1-i*i)}const B5=12;function L5(a,i,l){let o=l;for(let c=1;c<B5;c++)o=o-a(o)/i(o);return o}const Dc=.001;function U5({duration:a=Qt.duration,bounce:i=Qt.bounce,velocity:l=Qt.velocity,mass:o=Qt.mass}){let c,d,f=1-i;f=vn(Qt.minDamping,Qt.maxDamping,f),a=vn(Qt.minDuration,Qt.maxDuration,Fe(a)),f<1?(c=p=>{const v=p*f,x=v*a,S=v-l,j=Fc(p,f),E=Math.exp(-x);return Dc-S/j*E},d=p=>{const x=p*f*a,S=x*l+l,j=Math.pow(f,2)*Math.pow(p,2)*a,E=Math.exp(-x),z=Fc(Math.pow(p,2),f);return(-c(p)+Dc>0?-1:1)*((S-j)*E)/z}):(c=p=>{const v=Math.exp(-p*a),x=(p-l)*a+1;return-Dc+v*x},d=p=>{const v=Math.exp(-p*a),x=(l-p)*(a*a);return v*x});const m=5/a,y=L5(c,d,m);if(a=_e(a),isNaN(y))return{stiffness:Qt.stiffness,damping:Qt.damping,duration:a};{const p=Math.pow(y,2)*o;return{stiffness:p,damping:f*2*Math.sqrt(o*p),duration:a}}}const H5=["duration","bounce"],G5=["stiffness","damping","mass"];function A1(a,i){return i.some(l=>a[l]!==void 0)}function q5(a){let i={velocity:Qt.velocity,stiffness:Qt.stiffness,damping:Qt.damping,mass:Qt.mass,isResolvedFromDuration:!1,...a};if(!A1(a,G5)&&A1(a,H5))if(i.velocity=0,a.visualDuration){const l=a.visualDuration,o=2*Math.PI/(l*1.2),c=o*o,d=2*vn(.05,1,1-(a.bounce||0))*Math.sqrt(c);i={...i,mass:Qt.mass,stiffness:c,damping:d}}else{const l=U5({...a,velocity:0});i={...i,...l,mass:Qt.mass},i.isResolvedFromDuration=!0}return i}function Zo(a=Qt.visualDuration,i=Qt.bounce){const l=typeof a!="object"?{visualDuration:a,keyframes:[0,1],bounce:i}:a;let{restSpeed:o,restDelta:c}=l;const d=l.keyframes[0],f=l.keyframes[l.keyframes.length-1],m={done:!1,value:d},{stiffness:y,damping:p,mass:v,duration:x,velocity:S,isResolvedFromDuration:j}=q5({...l,velocity:-Fe(l.velocity||0)}),E=S||0,z=p/(2*Math.sqrt(y*v)),k=f-d,L=Fe(Math.sqrt(y/v)),Q=Math.abs(k)<5;o||(o=Q?Qt.restSpeed.granular:Qt.restSpeed.default),c||(c=Q?Qt.restDelta.granular:Qt.restDelta.default);let X,Z,q,P,J,B;if(z<1)q=Fc(L,z),P=(E+z*L*k)/q,X=Y=>{const rt=Math.exp(-z*L*Y);return f-rt*(P*Math.sin(q*Y)+k*Math.cos(q*Y))},J=z*L*P+k*q,B=z*L*k-P*q,Z=Y=>Math.exp(-z*L*Y)*(J*Math.sin(q*Y)+B*Math.cos(q*Y));else if(z===1){X=rt=>f-Math.exp(-L*rt)*(k+(E+L*k)*rt);const Y=E+L*k;Z=rt=>Math.exp(-L*rt)*(L*Y*rt-E)}else{const Y=L*Math.sqrt(z*z-1);X=wt=>{const yt=Math.exp(-z*L*wt),R=Math.min(Y*wt,300);return f-yt*((E+z*L*k)*Math.sinh(R)+Y*k*Math.cosh(R))/Y};const rt=(E+z*L*k)/Y,dt=z*L*rt-k*Y,qt=z*L*k-rt*Y;Z=wt=>{const yt=Math.exp(-z*L*wt),R=Math.min(Y*wt,300);return yt*(dt*Math.sinh(R)+qt*Math.cosh(R))}}const ft={calculatedDuration:j&&x||null,velocity:Y=>_e(Z(Y)),next:Y=>{if(!j&&z<1){const dt=Math.exp(-z*L*Y),qt=Math.sin(q*Y),wt=Math.cos(q*Y),yt=f-dt*(P*qt+k*wt),R=_e(dt*(J*qt+B*wt));return m.done=Math.abs(R)<=o&&Math.abs(f-yt)<=c,m.value=m.done?f:yt,m}const rt=X(Y);if(j)m.done=Y>=x;else{const dt=_e(Z(Y));m.done=Math.abs(dt)<=o&&Math.abs(f-rt)<=c}return m.value=m.done?f:rt,m},toString:()=>{const Y=Math.min(Rf(ft),Xo),rt=Vg(dt=>ft.next(Y*dt).value,Y,30);return Y+"ms "+rt},toTransition:()=>{}};return ft}Zo.applyToOptions=a=>{const i=_5(a,100,Zo);return a.ease=i.ease,a.duration=_e(i.duration),a.type="keyframes",a};const Y5=5;function Og(a,i,l){const o=Math.max(i-Y5,0);return hg(l-a(o),i-o)}function Pc({keyframes:a,velocity:i=0,power:l=.8,timeConstant:o=325,bounceDamping:c=10,bounceStiffness:d=500,modifyTarget:f,min:m,max:y,restDelta:p=.5,restSpeed:v}){const x=a[0],S={done:!1,value:x},j=B=>m!==void 0&&B<m||y!==void 0&&B>y,E=B=>m===void 0?y:y===void 0||Math.abs(m-B)<Math.abs(y-B)?m:y;let z=l*i;const k=x+z,L=f===void 0?k:f(k);L!==k&&(z=L-x);const Q=B=>-z*Math.exp(-B/o),X=B=>L+Q(B),Z=B=>{const ft=Q(B),Y=X(B);S.done=Math.abs(ft)<=p,S.value=S.done?L:Y};let q,P;const J=B=>{j(S.value)&&(q=B,P=Zo({keyframes:[S.value,E(S.value)],velocity:Og(X,B,S.value),damping:c,stiffness:d,restDelta:p,restSpeed:v}))};return J(0),{calculatedDuration:null,next:B=>{let ft=!1;return!P&&q===void 0&&(ft=!0,Z(B),J(B)),q!==void 0&&B>=q?P.next(B-q):(!ft&&Z(B),S)}}}function X5(a,i,l){const o=[],c=l||pa.mix||Rg,d=a.length-1;for(let f=0;f<d;f++){let m=c(a[f],a[f+1]);if(i){const y=Array.isArray(i)?i[f]||Pe:i;m=tl(y,m)}o.push(m)}return o}function Z5(a,i,{clamp:l=!0,ease:o,mixer:c}={}){const d=a.length;if(Af(d===i.length),d===1)return()=>i[0];if(d===2&&i[0]===i[1])return()=>i[1];const f=a[0]===a[1];a[0]>a[d-1]&&(a=[...a].reverse(),i=[...i].reverse());const m=X5(i,o,c),y=m.length,p=v=>{if(f&&v<a[0])return i[0];let x=0;if(y>1)for(;x<a.length-2&&!(v<a[x+1]);x++);const S=Ks(a[x],a[x+1],v);return m[x](S)};return l?v=>p(vn(a[0],a[d-1],v)):p}function Q5(a,i){const l=a[a.length-1];for(let o=1;o<=i;o++){const c=Ks(0,i,o);a.push(Gt(l,1,c))}}function K5(a){const i=[0];return Q5(i,a.length-1),i}function J5(a,i){return a.map(l=>l*i)}function F5(a,i){return a.map(()=>i||Tg).splice(0,a.length-1)}function Us({duration:a=300,keyframes:i,times:l,ease:o="easeInOut"}){const c=a5(o)?o.map(v1):v1(o),d={done:!1,value:i[0]},f=J5(l&&l.length===i.length?l:K5(i),a),m=Z5(f,i,{ease:Array.isArray(c)?c:F5(i,c)});return{calculatedDuration:a,next:y=>(d.value=m(y),d.done=y>=a,d)}}const P5=a=>a!==null;function Wo(a,{repeat:i,repeatType:l="loop"},o,c=1){const d=a.filter(P5),m=c<0||i&&l!=="loop"&&i%2===1?0:d.length-1;return!m||o===void 0?d[m]:o}const $5={decay:Pc,inertia:Pc,tween:Us,keyframes:Us,spring:Zo};function kg(a){typeof a.type=="string"&&(a.type=$5[a.type])}class Vf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(i=>{this.resolve=i})}notifyFinished(){this.resolve()}then(i,l){return this.finished.then(i,l)}}const W5=a=>a/100;class Qo extends Vf{constructor(i){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:l}=this.options;l&&l.updatedAt!==ge.now()&&this.tick(ge.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=i,this.initAnimation(),this.play(),i.autoplay===!1&&this.pause()}initAnimation(){const{options:i}=this;kg(i);const{type:l=Us,repeat:o=0,repeatDelay:c=0,repeatType:d,velocity:f=0}=i;let{keyframes:m}=i;const y=l||Us;y!==Us&&typeof m[0]!="number"&&(this.mixKeyframes=tl(W5,Rg(m[0],m[1])),m=[0,100]);const p=y({...i,keyframes:m});d==="mirror"&&(this.mirroredGenerator=y({...i,keyframes:[...m].reverse(),velocity:-f})),p.calculatedDuration===null&&(p.calculatedDuration=Rf(p));const{calculatedDuration:v}=p;this.calculatedDuration=v,this.resolvedDuration=v+c,this.totalDuration=this.resolvedDuration*(o+1)-c,this.generator=p}updateTime(i){const l=Math.round(i-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=l}tick(i,l=!1){const{generator:o,totalDuration:c,mixKeyframes:d,mirroredGenerator:f,resolvedDuration:m,calculatedDuration:y}=this;if(this.startTime===null)return o.next(0);const{delay:p=0,keyframes:v,repeat:x,repeatType:S,repeatDelay:j,type:E,onUpdate:z,finalKeyframe:k}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,i):this.speed<0&&(this.startTime=Math.min(i-c/this.speed,this.startTime)),l?this.currentTime=i:this.updateTime(i);const L=this.currentTime-p*(this.playbackSpeed>=0?1:-1),Q=this.playbackSpeed>=0?L<0:L>c;this.currentTime=Math.max(L,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let X=this.currentTime,Z=o;if(x){const B=Math.min(this.currentTime,c)/m;let ft=Math.floor(B),Y=B%1;!Y&&B>=1&&(Y=1),Y===1&&ft--,ft=Math.min(ft,x+1),ft%2&&(S==="reverse"?(Y=1-Y,j&&(Y-=j/m)):S==="mirror"&&(Z=f)),X=vn(0,1,Y)*m}let q;Q?(this.delayState.value=v[0],q=this.delayState):q=Z.next(X),d&&!Q&&(q.value=d(q.value));let{done:P}=q;!Q&&y!==null&&(P=this.playbackSpeed>=0?this.currentTime>=c:this.currentTime<=0);const J=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return J&&E!==Pc&&(q.value=Wo(v,this.options,k,this.speed)),z&&z(q.value),J&&this.finish(),q}then(i,l){return this.finished.then(i,l)}get duration(){return Fe(this.calculatedDuration)}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Fe(i)}get time(){return Fe(this.currentTime)}set time(i){i=_e(i),this.currentTime=i,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=i:this.driver&&(this.startTime=this.driver.now()-i/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=i,this.tick(i))}getGeneratorVelocity(){const i=this.currentTime;if(i<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(i);const l=this.generator.next(i).value;return Og(o=>this.generator.next(o).value,i,l)}get speed(){return this.playbackSpeed}set speed(i){const l=this.playbackSpeed!==i;l&&this.driver&&this.updateTime(ge.now()),this.playbackSpeed=i,l&&this.driver&&(this.time=Fe(this.currentTime))}play(){if(this.isStopped)return;const{driver:i=k5,startTime:l}=this.options;this.driver||(this.driver=i(c=>this.tick(c))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=l??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ge.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(i){return this.startTime=0,this.tick(i,!0)}attachTimeline(i){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),i.observe(this)}}function I5(a){for(let i=1;i<a.length;i++)a[i]??(a[i]=a[i-1])}const Ga=a=>a*180/Math.PI,$c=a=>{const i=Ga(Math.atan2(a[1],a[0]));return Wc(i)},t4={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:a=>(Math.abs(a[0])+Math.abs(a[3]))/2,rotate:$c,rotateZ:$c,skewX:a=>Ga(Math.atan(a[1])),skewY:a=>Ga(Math.atan(a[2])),skew:a=>(Math.abs(a[1])+Math.abs(a[2]))/2},Wc=a=>(a=a%360,a<0&&(a+=360),a),E1=$c,j1=a=>Math.sqrt(a[0]*a[0]+a[1]*a[1]),C1=a=>Math.sqrt(a[4]*a[4]+a[5]*a[5]),e4={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:j1,scaleY:C1,scale:a=>(j1(a)+C1(a))/2,rotateX:a=>Wc(Ga(Math.atan2(a[6],a[5]))),rotateY:a=>Wc(Ga(Math.atan2(-a[2],a[0]))),rotateZ:E1,rotate:E1,skewX:a=>Ga(Math.atan(a[4])),skewY:a=>Ga(Math.atan(a[1])),skew:a=>(Math.abs(a[1])+Math.abs(a[4]))/2};function Ic(a){return a.includes("scale")?1:0}function tf(a,i){if(!a||a==="none")return Ic(i);const l=a.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,c;if(l)o=e4,c=l;else{const m=a.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=t4,c=m}if(!c)return Ic(i);const d=o[i],f=c[1].split(",").map(a4);return typeof d=="function"?d(f):f[d]}const n4=(a,i)=>{const{transform:l="none"}=getComputedStyle(a);return tf(l,i)};function a4(a){return parseFloat(a.trim())}const Ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hi=new Set(Ui),M1=a=>a===Li||a===at,i4=new Set(["x","y","z"]),s4=Ui.filter(a=>!i4.has(a));function l4(a){const i=[];return s4.forEach(l=>{const o=a.getValue(l);o!==void 0&&(i.push([l,o.get()]),o.set(l.startsWith("scale")?1:0))}),i}const ma={width:({x:a},{paddingLeft:i="0",paddingRight:l="0",boxSizing:o})=>{const c=a.max-a.min;return o==="border-box"?c:c-parseFloat(i)-parseFloat(l)},height:({y:a},{paddingTop:i="0",paddingBottom:l="0",boxSizing:o})=>{const c=a.max-a.min;return o==="border-box"?c:c-parseFloat(i)-parseFloat(l)},top:(a,{top:i})=>parseFloat(i),left:(a,{left:i})=>parseFloat(i),bottom:({y:a},{top:i})=>parseFloat(i)+(a.max-a.min),right:({x:a},{left:i})=>parseFloat(i)+(a.max-a.min),x:(a,{transform:i})=>tf(i,"x"),y:(a,{transform:i})=>tf(i,"y")};ma.translateX=ma.x;ma.translateY=ma.y;const qa=new Set;let ef=!1,nf=!1,af=!1;function _g(){if(nf){const a=Array.from(qa).filter(o=>o.needsMeasurement),i=new Set(a.map(o=>o.element)),l=new Map;i.forEach(o=>{const c=l4(o);c.length&&(l.set(o,c),o.render())}),a.forEach(o=>o.measureInitialState()),i.forEach(o=>{o.render();const c=l.get(o);c&&c.forEach(([d,f])=>{o.getValue(d)?.set(f)})}),a.forEach(o=>o.measureEndState()),a.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}nf=!1,ef=!1,qa.forEach(a=>a.complete(af)),qa.clear()}function Bg(){qa.forEach(a=>{a.readKeyframes(),a.needsMeasurement&&(nf=!0)})}function o4(){af=!0,Bg(),_g(),af=!1}class Of{constructor(i,l,o,c,d,f=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...i],this.onComplete=l,this.name=o,this.motionValue=c,this.element=d,this.isAsync=f}scheduleResolve(){this.state="scheduled",this.isAsync?(qa.add(this),ef||(ef=!0,Lt.read(Bg),Lt.resolveKeyframes(_g))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:i,name:l,element:o,motionValue:c}=this;if(i[0]===null){const d=c?.get(),f=i[i.length-1];if(d!==void 0)i[0]=d;else if(o&&l){const m=o.readValue(l,f);m!=null&&(i[0]=m)}i[0]===void 0&&(i[0]=f),c&&d===void 0&&c.set(i[0])}I5(i)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(i=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,i),qa.delete(this)}cancel(){this.state==="scheduled"&&(qa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r4=a=>a.startsWith("--");function Lg(a,i,l){r4(i)?a.style.setProperty(i,l):a.style[i]=l}const u4={};function Ug(a,i){const l=dg(a);return()=>u4[i]??l()}const c4=Ug(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Hg=Ug(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Bs=([a,i,l,o])=>`cubic-bezier(${a}, ${i}, ${l}, ${o})`,z1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bs([0,.65,.55,1]),circOut:Bs([.55,0,1,.45]),backIn:Bs([.31,.01,.66,-.59]),backOut:Bs([.33,1.53,.69,.99])};function Gg(a,i){if(a)return typeof a=="function"?Hg()?Vg(a,i):"ease-out":wg(a)?Bs(a):Array.isArray(a)?a.map(l=>Gg(l,i)||z1.easeOut):z1[a]}function f4(a,i,l,{delay:o=0,duration:c=300,repeat:d=0,repeatType:f="loop",ease:m="easeOut",times:y}={},p=void 0){const v={[i]:l};y&&(v.offset=y);const x=Gg(m,c);Array.isArray(x)&&(v.easing=x);const S={delay:o,duration:c,easing:Array.isArray(x)?"linear":x,fill:"both",iterations:d+1,direction:f==="reverse"?"alternate":"normal"};return p&&(S.pseudoElement=p),a.animate(v,S)}function qg(a){return typeof a=="function"&&"applyToOptions"in a}function d4({type:a,...i}){return qg(a)&&Hg()?a.applyToOptions(i):(i.duration??(i.duration=300),i.ease??(i.ease="easeOut"),i)}class Yg extends Vf{constructor(i){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!i)return;const{element:l,name:o,keyframes:c,pseudoElement:d,allowFlatten:f=!1,finalKeyframe:m,onComplete:y}=i;this.isPseudoElement=!!d,this.allowFlatten=f,this.options=i,Af(typeof i.type!="string");const p=d4(i);this.animation=f4(l,o,c,p,d),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!d){const v=Wo(c,this.options,m,this.speed);this.updateMotionValue&&this.updateMotionValue(v),Lg(l,o,v),this.animation.cancel()}y?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:i}=this;i==="idle"||i==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const i=this.options?.element;!this.isPseudoElement&&i?.isConnected&&this.animation.commitStyles?.()}get duration(){const i=this.animation.effect?.getComputedTiming?.().duration||0;return Fe(Number(i))}get iterationDuration(){const{delay:i=0}=this.options||{};return this.duration+Fe(i)}get time(){return Fe(Number(this.animation.currentTime)||0)}set time(i){const l=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_e(i),l&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(i){i<0&&(this.finishedTime=null),this.animation.playbackRate=i}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(i){this.manualStartTime=this.animation.startTime=i}attachTimeline({timeline:i,rangeStart:l,rangeEnd:o,observe:c}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,i&&c4()?(this.animation.timeline=i,l&&(this.animation.rangeStart=l),o&&(this.animation.rangeEnd=o),Pe):c(this)}}const Xg={anticipate:bg,backInOut:vg,circInOut:Sg};function h4(a){return a in Xg}function m4(a){typeof a.ease=="string"&&h4(a.ease)&&(a.ease=Xg[a.ease])}const Rc=10;class p4 extends Yg{constructor(i){m4(i),kg(i),super(i),i.startTime!==void 0&&i.autoplay!==!1&&(this.startTime=i.startTime),this.options=i}updateMotionValue(i){const{motionValue:l,onUpdate:o,onComplete:c,element:d,...f}=this.options;if(!l)return;if(i!==void 0){l.set(i);return}const m=new Qo({...f,autoplay:!1}),y=Math.max(Rc,ge.now()-this.startTime),p=vn(0,Rc,y-Rc),v=m.sample(y).value,{name:x}=this.options;d&&x&&Lg(d,x,v),l.setWithVelocity(m.sample(Math.max(0,y-p)).value,v,p),m.stop()}}const N1=(a,i)=>i==="zIndex"?!1:!!(typeof a=="number"||Array.isArray(a)||typeof a=="string"&&(on.test(a)||a==="0")&&!a.startsWith("url("));function g4(a){const i=a[0];if(a.length===1)return!0;for(let l=0;l<a.length;l++)if(a[l]!==i)return!0}function y4(a,i,l,o){const c=a[0];if(c===null)return!1;if(i==="display"||i==="visibility")return!0;const d=a[a.length-1],f=N1(c,i),m=N1(d,i);return!f||!m?!1:g4(a)||(l==="spring"||qg(l))&&o}function sf(a){a.duration=0,a.type="keyframes"}const Zg=new Set(["opacity","clipPath","filter","transform"]),v4=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function b4(a){for(let i=0;i<a.length;i++)if(typeof a[i]=="string"&&v4.test(a[i]))return!0;return!1}const x4=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),S4=dg(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function T4(a){const{motionValue:i,name:l,repeatDelay:o,repeatType:c,damping:d,type:f,keyframes:m}=a;if(!(i?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:v}=i.owner.getProps();return S4()&&l&&(Zg.has(l)||x4.has(l)&&b4(m))&&(l!=="transform"||!v)&&!p&&!o&&c!=="mirror"&&d!==0&&f!=="inertia"}const w4=40;class A4 extends Vf{constructor({autoplay:i=!0,delay:l=0,type:o="keyframes",repeat:c=0,repeatDelay:d=0,repeatType:f="loop",keyframes:m,name:y,motionValue:p,element:v,...x}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ge.now();const S={autoplay:i,delay:l,type:o,repeat:c,repeatDelay:d,repeatType:f,name:y,motionValue:p,element:v,...x},j=v?.KeyframeResolver||Of;this.keyframeResolver=new j(m,(E,z,k)=>this.onKeyframesResolved(E,z,S,!k),y,p,v),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(i,l,o,c){this.keyframeResolver=void 0;const{name:d,type:f,velocity:m,delay:y,isHandoff:p,onUpdate:v}=o;this.resolvedAt=ge.now();let x=!0;y4(i,d,f,m)||(x=!1,(pa.instantAnimations||!y)&&v?.(Wo(i,o,l)),i[0]=i[i.length-1],sf(o),o.repeat=0);const j={startTime:c?this.resolvedAt?this.resolvedAt-this.createdAt>w4?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:l,...o,keyframes:i},E=x&&!p&&T4(j),z=j.motionValue?.owner?.current;let k;if(E)try{k=new p4({...j,element:z})}catch{k=new Qo(j)}else k=new Qo(j);k.finished.then(()=>{this.notifyFinished()}).catch(Pe),this.pendingTimeline&&(this.stopTimeline=k.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=k}get finished(){return this._animation?this.animation.finished:this._finished}then(i,l){return this.finished.finally(i).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),o4()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(i){this.animation.time=i}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(i){this.animation.speed=i}get startTime(){return this.animation.startTime}attachTimeline(i){return this._animation?this.stopTimeline=this.animation.attachTimeline(i):this.pendingTimeline=i,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Qg(a,i,l,o=0,c=1){const d=Array.from(a).sort((p,v)=>p.sortNodePosition(v)).indexOf(i),f=a.size,m=(f-1)*o;return typeof l=="function"?l(d,f):c===1?d*o:m-d*o}const E4=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function j4(a){const i=E4.exec(a);if(!i)return[,];const[,l,o,c]=i;return[`--${l??o}`,c]}function Kg(a,i,l=1){const[o,c]=j4(a);if(!o)return;const d=window.getComputedStyle(i).getPropertyValue(o);if(d){const f=d.trim();return ug(f)?parseFloat(f):f}return Mf(c)?Kg(c,i,l+1):c}const C4={type:"spring",stiffness:500,damping:25,restSpeed:10},M4=a=>({type:"spring",stiffness:550,damping:a===0?2*Math.sqrt(550):30,restSpeed:10}),z4={type:"keyframes",duration:.8},N4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},D4=(a,{keyframes:i})=>i.length>2?z4:Hi.has(a)?a.startsWith("scale")?M4(i[1]):C4:N4;function Jg(a,i){if(a?.inherit&&i){const{inherit:l,...o}=a;return{...i,...o}}return a}function kf(a,i){const l=a?.[i]??a?.default??a;return l!==a?Jg(l,a):l}const R4=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function V4(a){for(const i in a)if(!R4.has(i))return!0;return!1}const _f=(a,i,l,o={},c,d)=>f=>{const m=kf(o,a)||{},y=m.delay||o.delay||0;let{elapsed:p=0}=o;p=p-_e(y);const v={keyframes:Array.isArray(l)?l:[null,l],ease:"easeOut",velocity:i.getVelocity(),...m,delay:-p,onUpdate:S=>{i.set(S),m.onUpdate&&m.onUpdate(S)},onComplete:()=>{f(),m.onComplete&&m.onComplete()},name:a,motionValue:i,element:d?void 0:c};V4(m)||Object.assign(v,D4(a,v)),v.duration&&(v.duration=_e(v.duration)),v.repeatDelay&&(v.repeatDelay=_e(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let x=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(sf(v),v.delay===0&&(x=!0)),(pa.instantAnimations||pa.skipAnimations||c?.shouldSkipAnimations)&&(x=!0,sf(v),v.delay=0),v.allowFlatten=!m.type&&!m.ease,x&&!d&&i.get()!==void 0){const S=Wo(v.keyframes,m);if(S!==void 0){Lt.update(()=>{v.onUpdate(S),v.onComplete()});return}}return m.isSync?new Qo(v):new A4(v)};function D1(a){const i=[{},{}];return a?.values.forEach((l,o)=>{i[0][o]=l.get(),i[1][o]=l.getVelocity()}),i}function Bf(a,i,l,o){if(typeof i=="function"){const[c,d]=D1(o);i=i(l!==void 0?l:a.custom,c,d)}if(typeof i=="string"&&(i=a.variants&&a.variants[i]),typeof i=="function"){const[c,d]=D1(o);i=i(l!==void 0?l:a.custom,c,d)}return i}function Ya(a,i,l){const o=a.getProps();return Bf(o,i,l!==void 0?l:o.custom,a)}const Fg=new Set(["width","height","top","left","right","bottom",...Ui]),R1=30,O4=a=>!isNaN(parseFloat(a));class k4{constructor(i,l={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const c=ge.now();if(this.updatedAt!==c&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const d of this.dependents)d.dirty()},this.hasAnimated=!1,this.setCurrent(i),this.owner=l.owner}setCurrent(i){this.current=i,this.updatedAt=ge.now(),this.canTrackVelocity===null&&i!==void 0&&(this.canTrackVelocity=O4(this.current))}setPrevFrameValue(i=this.current){this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt}onChange(i){return this.on("change",i)}on(i,l){this.events[i]||(this.events[i]=new Ef);const o=this.events[i].add(l);return i==="change"?()=>{o(),Lt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const i in this.events)this.events[i].clear()}attach(i,l){this.passiveEffect=i,this.stopPassiveEffect=l}set(i){this.passiveEffect?this.passiveEffect(i,this.updateAndNotify):this.updateAndNotify(i)}setWithVelocity(i,l,o){this.set(l),this.prev=void 0,this.prevFrameValue=i,this.prevUpdatedAt=this.updatedAt-o}jump(i,l=!0){this.updateAndNotify(i),this.prev=i,this.prevUpdatedAt=this.prevFrameValue=void 0,l&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(i){this.dependents||(this.dependents=new Set),this.dependents.add(i)}removeDependent(i){this.dependents&&this.dependents.delete(i)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const i=ge.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||i-this.updatedAt>R1)return 0;const l=Math.min(this.updatedAt-this.prevUpdatedAt,R1);return hg(parseFloat(this.current)-parseFloat(this.prevFrameValue),l)}start(i){return this.stop(),new Promise(l=>{this.hasAnimated=!0,this.animation=i(l),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bi(a,i){return new k4(a,i)}const lf=a=>Array.isArray(a);function _4(a,i,l){a.hasValue(i)?a.getValue(i).set(l):a.addValue(i,Bi(l))}function B4(a){return lf(a)?a[a.length-1]||0:a}function L4(a,i){const l=Ya(a,i);let{transitionEnd:o={},transition:c={},...d}=l||{};d={...d,...o};for(const f in d){const m=B4(d[f]);_4(a,f,m)}}const he=a=>!!(a&&a.getVelocity);function U4(a){return!!(he(a)&&a.add)}function of(a,i){const l=a.getValue("willChange");if(U4(l))return l.add(i);if(!l&&pa.WillChange){const o=new pa.WillChange("auto");a.addValue("willChange",o),o.add(i)}}function Lf(a){return a.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`)}const H4="framerAppearId",Pg="data-"+Lf(H4);function $g(a){return a.props[Pg]}function G4({protectedKeys:a,needsAnimating:i},l){const o=a.hasOwnProperty(l)&&i[l]!==!0;return i[l]=!1,o}function Wg(a,i,{delay:l=0,transitionOverride:o,type:c}={}){let{transition:d,transitionEnd:f,...m}=i;const y=a.getDefaultTransition();d=d?Jg(d,y):y;const p=d?.reduceMotion;o&&(d=o);const v=[],x=c&&a.animationState&&a.animationState.getState()[c];for(const S in m){const j=a.getValue(S,a.latestValues[S]??null),E=m[S];if(E===void 0||x&&G4(x,S))continue;const z={delay:l,...kf(d||{},S)},k=j.get();if(k!==void 0&&!j.isAnimating()&&!Array.isArray(E)&&E===k&&!z.velocity){Lt.update(()=>j.set(E));continue}let L=!1;if(window.MotionHandoffAnimation){const Z=$g(a);if(Z){const q=window.MotionHandoffAnimation(Z,S,Lt);q!==null&&(z.startTime=q,L=!0)}}of(a,S);const Q=p??a.shouldReduceMotion;j.start(_f(S,j,E,Q&&Fg.has(S)?{type:!1}:z,a,L));const X=j.animation;X&&v.push(X)}if(f){const S=()=>Lt.update(()=>{f&&L4(a,f)});v.length?Promise.all(v).then(S):S()}return v}function rf(a,i,l={}){const o=Ya(a,i,l.type==="exit"?a.presenceContext?.custom:void 0);let{transition:c=a.getDefaultTransition()||{}}=o||{};l.transitionOverride&&(c=l.transitionOverride);const d=o?()=>Promise.all(Wg(a,o,l)):()=>Promise.resolve(),f=a.variantChildren&&a.variantChildren.size?(y=0)=>{const{delayChildren:p=0,staggerChildren:v,staggerDirection:x}=c;return q4(a,i,y,p,v,x,l)}:()=>Promise.resolve(),{when:m}=c;if(m){const[y,p]=m==="beforeChildren"?[d,f]:[f,d];return y().then(()=>p())}else return Promise.all([d(),f(l.delay)])}function q4(a,i,l=0,o=0,c=0,d=1,f){const m=[];for(const y of a.variantChildren)y.notify("AnimationStart",i),m.push(rf(y,i,{...f,delay:l+(typeof o=="function"?0:o)+Qg(a.variantChildren,y,o,c,d)}).then(()=>y.notify("AnimationComplete",i)));return Promise.all(m)}function Y4(a,i,l={}){a.notify("AnimationStart",i);let o;if(Array.isArray(i)){const c=i.map(d=>rf(a,d,l));o=Promise.all(c)}else if(typeof i=="string")o=rf(a,i,l);else{const c=typeof i=="function"?Ya(a,i,l.custom):i;o=Promise.all(Wg(a,c,l))}return o.then(()=>{a.notify("AnimationComplete",i)})}const X4={test:a=>a==="auto",parse:a=>a},Ig=a=>i=>i.test(a),ty=[Li,at,yn,ha,g5,p5,X4],V1=a=>ty.find(Ig(a));function Z4(a){return typeof a=="number"?a===0:a!==null?a==="none"||a==="0"||fg(a):!0}const Q4=new Set(["brightness","contrast","saturate","opacity"]);function K4(a){const[i,l]=a.slice(0,-1).split("(");if(i==="drop-shadow")return a;const[o]=l.match(zf)||[];if(!o)return a;const c=l.replace(o,"");let d=Q4.has(i)?1:0;return o!==l&&(d*=100),i+"("+d+c+")"}const J4=/\b([a-z-]*)\(.*?\)/gu,uf={...on,getAnimatableNone:a=>{const i=a.match(J4);return i?i.map(K4).join(" "):a}},cf={...on,getAnimatableNone:a=>{const i=on.parse(a);return on.createTransformer(a)(i.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}},O1={...Li,transform:Math.round},F4={rotate:ha,rotateX:ha,rotateY:ha,rotateZ:ha,scale:Eo,scaleX:Eo,scaleY:Eo,scaleZ:Eo,skew:ha,skewX:ha,skewY:ha,distance:at,translateX:at,translateY:at,translateZ:at,x:at,y:at,z:at,perspective:at,transformPerspective:at,opacity:Js,originX:x1,originY:x1,originZ:at},Uf={borderWidth:at,borderTopWidth:at,borderRightWidth:at,borderBottomWidth:at,borderLeftWidth:at,borderRadius:at,borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomRightRadius:at,borderBottomLeftRadius:at,width:at,maxWidth:at,height:at,maxHeight:at,top:at,right:at,bottom:at,left:at,inset:at,insetBlock:at,insetBlockStart:at,insetBlockEnd:at,insetInline:at,insetInlineStart:at,insetInlineEnd:at,padding:at,paddingTop:at,paddingRight:at,paddingBottom:at,paddingLeft:at,paddingBlock:at,paddingBlockStart:at,paddingBlockEnd:at,paddingInline:at,paddingInlineStart:at,paddingInlineEnd:at,margin:at,marginTop:at,marginRight:at,marginBottom:at,marginLeft:at,marginBlock:at,marginBlockStart:at,marginBlockEnd:at,marginInline:at,marginInlineStart:at,marginInlineEnd:at,fontSize:at,backgroundPositionX:at,backgroundPositionY:at,...F4,zIndex:O1,fillOpacity:Js,strokeOpacity:Js,numOctaves:O1},P4={...Uf,color:It,backgroundColor:It,outlineColor:It,fill:It,stroke:It,borderColor:It,borderTopColor:It,borderRightColor:It,borderBottomColor:It,borderLeftColor:It,filter:uf,WebkitFilter:uf,mask:cf,WebkitMask:cf},ey=a=>P4[a],$4=new Set([uf,cf]);function ny(a,i){let l=ey(a);return $4.has(l)||(l=on),l.getAnimatableNone?l.getAnimatableNone(i):void 0}const W4=new Set(["auto","none","0"]);function I4(a,i,l){let o=0,c;for(;o<a.length&&!c;){const d=a[o];typeof d=="string"&&!W4.has(d)&&_i(d).values.length&&(c=a[o]),o++}if(c&&l)for(const d of i)a[d]=ny(l,c)}class t8 extends Of{constructor(i,l,o,c,d){super(i,l,o,c,d,!0)}readKeyframes(){const{unresolvedKeyframes:i,element:l,name:o}=this;if(!l||!l.current)return;super.readKeyframes();for(let v=0;v<i.length;v++){let x=i[v];if(typeof x=="string"&&(x=x.trim(),Mf(x))){const S=Kg(x,l.current);S!==void 0&&(i[v]=S),v===i.length-1&&(this.finalKeyframe=x)}}if(this.resolveNoneKeyframes(),!Fg.has(o)||i.length!==2)return;const[c,d]=i,f=V1(c),m=V1(d),y=b1(c),p=b1(d);if(y!==p&&ma[o]){this.needsMeasurement=!0;return}if(f!==m)if(M1(f)&&M1(m))for(let v=0;v<i.length;v++){const x=i[v];typeof x=="string"&&(i[v]=parseFloat(x))}else ma[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:i,name:l}=this,o=[];for(let c=0;c<i.length;c++)(i[c]===null||Z4(i[c]))&&o.push(c);o.length&&I4(i,o,l)}measureInitialState(){const{element:i,unresolvedKeyframes:l,name:o}=this;if(!i||!i.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ma[o](i.measureViewportBox(),window.getComputedStyle(i.current)),l[0]=this.measuredOrigin;const c=l[l.length-1];c!==void 0&&i.getValue(o,c).jump(c,!1)}measureEndState(){const{element:i,name:l,unresolvedKeyframes:o}=this;if(!i||!i.current)return;const c=i.getValue(l);c&&c.jump(this.measuredOrigin,!1);const d=o.length-1,f=o[d];o[d]=ma[l](i.measureViewportBox(),window.getComputedStyle(i.current)),f!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=f),this.removedTransforms?.length&&this.removedTransforms.forEach(([m,y])=>{i.getValue(m).set(y)}),this.resolveNoneKeyframes()}}function ay(a,i,l){if(a==null)return[];if(a instanceof EventTarget)return[a];if(typeof a=="string"){let o=document;const c=l?.[a]??o.querySelectorAll(a);return c?Array.from(c):[]}return Array.from(a).filter(o=>o!=null)}const iy=(a,i)=>i&&typeof a=="number"?i.transform(a):a;function e8(a){return cg(a)&&"offsetHeight"in a&&!("ownerSVGElement"in a)}const{schedule:Hf}=Ag(queueMicrotask,!1),sn={x:!1,y:!1};function sy(){return sn.x||sn.y}function n8(a){return a==="x"||a==="y"?sn[a]?null:(sn[a]=!0,()=>{sn[a]=!1}):sn.x||sn.y?null:(sn.x=sn.y=!0,()=>{sn.x=sn.y=!1})}function ly(a,i){const l=ay(a),o=new AbortController,c={passive:!0,...i,signal:o.signal};return[l,c,()=>o.abort()]}function a8(a){return!(a.pointerType==="touch"||sy())}function i8(a,i,l={}){const[o,c,d]=ly(a,l);return o.forEach(f=>{let m=!1,y=!1,p;const v=()=>{f.removeEventListener("pointerleave",E)},x=k=>{p&&(p(k),p=void 0),v()},S=k=>{m=!1,window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",S),y&&(y=!1,x(k))},j=()=>{m=!0,window.addEventListener("pointerup",S,c),window.addEventListener("pointercancel",S,c)},E=k=>{if(k.pointerType!=="touch"){if(m){y=!0;return}x(k)}},z=k=>{if(!a8(k))return;y=!1;const L=i(f,k);typeof L=="function"&&(p=L,f.addEventListener("pointerleave",E,c))};f.addEventListener("pointerenter",z,c),f.addEventListener("pointerdown",j,c)}),d}const oy=(a,i)=>i?a===i?!0:oy(a,i.parentElement):!1,Gf=a=>a.pointerType==="mouse"?typeof a.button!="number"||a.button<=0:a.isPrimary!==!1,s8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function l8(a){return s8.has(a.tagName)||a.isContentEditable===!0}const o8=new Set(["INPUT","SELECT","TEXTAREA"]);function r8(a){return o8.has(a.tagName)||a.isContentEditable===!0}const Do=new WeakSet;function k1(a){return i=>{i.key==="Enter"&&a(i)}}function Vc(a,i){a.dispatchEvent(new PointerEvent("pointer"+i,{isPrimary:!0,bubbles:!0}))}const u8=(a,i)=>{const l=a.currentTarget;if(!l)return;const o=k1(()=>{if(Do.has(l))return;Vc(l,"down");const c=k1(()=>{Vc(l,"up")}),d=()=>Vc(l,"cancel");l.addEventListener("keyup",c,i),l.addEventListener("blur",d,i)});l.addEventListener("keydown",o,i),l.addEventListener("blur",()=>l.removeEventListener("keydown",o),i)};function _1(a){return Gf(a)&&!sy()}const B1=new WeakSet;function c8(a,i,l={}){const[o,c,d]=ly(a,l),f=m=>{const y=m.currentTarget;if(!_1(m)||B1.has(m))return;Do.add(y),l.stopPropagation&&B1.add(m);const p=i(y,m),v=(j,E)=>{window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",S),Do.has(y)&&Do.delete(y),_1(j)&&typeof p=="function"&&p(j,{success:E})},x=j=>{v(j,y===window||y===document||l.useGlobalTarget||oy(y,j.target))},S=j=>{v(j,!1)};window.addEventListener("pointerup",x,c),window.addEventListener("pointercancel",S,c)};return o.forEach(m=>{(l.useGlobalTarget?window:m).addEventListener("pointerdown",f,c),e8(m)&&(m.addEventListener("focus",p=>u8(p,c)),!l8(m)&&!m.hasAttribute("tabindex")&&(m.tabIndex=0))}),d}function qf(a){return cg(a)&&"ownerSVGElement"in a}const Ro=new WeakMap;let Vo;const ry=(a,i,l)=>(o,c)=>c&&c[0]?c[0][a+"Size"]:qf(o)&&"getBBox"in o?o.getBBox()[i]:o[l],f8=ry("inline","width","offsetWidth"),d8=ry("block","height","offsetHeight");function h8({target:a,borderBoxSize:i}){Ro.get(a)?.forEach(l=>{l(a,{get width(){return f8(a,i)},get height(){return d8(a,i)}})})}function m8(a){a.forEach(h8)}function p8(){typeof ResizeObserver>"u"||(Vo=new ResizeObserver(m8))}function g8(a,i){Vo||p8();const l=ay(a);return l.forEach(o=>{let c=Ro.get(o);c||(c=new Set,Ro.set(o,c)),c.add(i),Vo?.observe(o)}),()=>{l.forEach(o=>{const c=Ro.get(o);c?.delete(i),c?.size||Vo?.unobserve(o)})}}const Oo=new Set;let Oi;function y8(){Oi=()=>{const a={get width(){return window.innerWidth},get height(){return window.innerHeight}};Oo.forEach(i=>i(a))},window.addEventListener("resize",Oi)}function v8(a){return Oo.add(a),Oi||y8(),()=>{Oo.delete(a),!Oo.size&&typeof Oi=="function"&&(window.removeEventListener("resize",Oi),Oi=void 0)}}function L1(a,i){return typeof a=="function"?v8(a):g8(a,i)}function b8(a){return qf(a)&&a.tagName==="svg"}const x8=[...ty,It,on],S8=a=>x8.find(Ig(a)),U1=()=>({translate:0,scale:1,origin:0,originPoint:0}),ki=()=>({x:U1(),y:U1()}),H1=()=>({min:0,max:0}),ae=()=>({x:H1(),y:H1()}),T8=new WeakMap;function Io(a){return a!==null&&typeof a=="object"&&typeof a.start=="function"}function Fs(a){return typeof a=="string"||Array.isArray(a)}const Yf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xf=["initial",...Yf];function tr(a){return Io(a.animate)||Xf.some(i=>Fs(a[i]))}function uy(a){return!!(tr(a)||a.variants)}function w8(a,i,l){for(const o in i){const c=i[o],d=l[o];if(he(c))a.addValue(o,c);else if(he(d))a.addValue(o,Bi(c,{owner:a}));else if(d!==c)if(a.hasValue(o)){const f=a.getValue(o);f.liveStyle===!0?f.jump(c):f.hasAnimated||f.set(c)}else{const f=a.getStaticValue(o);a.addValue(o,Bi(f!==void 0?f:c,{owner:a}))}}for(const o in l)i[o]===void 0&&a.removeValue(o);return i}const ff={current:null},cy={current:!1},A8=typeof window<"u";function E8(){if(cy.current=!0,!!A8)if(window.matchMedia){const a=window.matchMedia("(prefers-reduced-motion)"),i=()=>ff.current=a.matches;a.addEventListener("change",i),i()}else ff.current=!1}const G1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ko={};function fy(a){Ko=a}function j8(){return Ko}class C8{scrapeMotionValuesFromProps(i,l,o){return{}}constructor({parent:i,props:l,presenceContext:o,reducedMotionConfig:c,skipAnimations:d,blockInitialAnimation:f,visualState:m},y={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Of,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const j=ge.now();this.renderScheduledAt<j&&(this.renderScheduledAt=j,Lt.render(this.render,!1,!0))};const{latestValues:p,renderState:v}=m;this.latestValues=p,this.baseTarget={...p},this.initialValues=l.initial?{...p}:{},this.renderState=v,this.parent=i,this.props=l,this.presenceContext=o,this.depth=i?i.depth+1:0,this.reducedMotionConfig=c,this.skipAnimationsConfig=d,this.options=y,this.blockInitialAnimation=!!f,this.isControllingVariants=tr(l),this.isVariantNode=uy(l),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(i&&i.current);const{willChange:x,...S}=this.scrapeMotionValuesFromProps(l,{},this);for(const j in S){const E=S[j];p[j]!==void 0&&he(E)&&E.set(p[j])}}mount(i){if(this.hasBeenMounted)for(const l in this.initialValues)this.values.get(l)?.jump(this.initialValues[l]),this.latestValues[l]=this.initialValues[l];this.current=i,T8.set(i,this),this.projection&&!this.projection.instance&&this.projection.mount(i),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((l,o)=>this.bindToMotionValue(o,l)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(cy.current||E8(),this.shouldReduceMotion=ff.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),ga(this.notifyUpdate),ga(this.render),this.valueSubscriptions.forEach(i=>i()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const i in this.events)this.events[i].clear();for(const i in this.features){const l=this.features[i];l&&(l.unmount(),l.isMounted=!1)}this.current=null}addChild(i){this.children.add(i),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(i)}removeChild(i){this.children.delete(i),this.enteringChildren&&this.enteringChildren.delete(i)}bindToMotionValue(i,l){if(this.valueSubscriptions.has(i)&&this.valueSubscriptions.get(i)(),l.accelerate&&Zg.has(i)&&this.current instanceof HTMLElement){const{factory:f,keyframes:m,times:y,ease:p,duration:v}=l.accelerate,x=new Yg({element:this.current,name:i,keyframes:m,times:y,ease:p,duration:_e(v)}),S=f(x);this.valueSubscriptions.set(i,()=>{S(),x.cancel()});return}const o=Hi.has(i);o&&this.onBindTransform&&this.onBindTransform();const c=l.on("change",f=>{this.latestValues[i]=f,this.props.onUpdate&&Lt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let d;typeof window<"u"&&window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,i,l)),this.valueSubscriptions.set(i,()=>{c(),d&&d(),l.owner&&l.stop()})}sortNodePosition(i){return!this.current||!this.sortInstanceNodePosition||this.type!==i.type?0:this.sortInstanceNodePosition(this.current,i.current)}updateFeatures(){let i="animation";for(i in Ko){const l=Ko[i];if(!l)continue;const{isEnabled:o,Feature:c}=l;if(!this.features[i]&&c&&o(this.props)&&(this.features[i]=new c(this)),this.features[i]){const d=this.features[i];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ae()}getStaticValue(i){return this.latestValues[i]}setStaticValue(i,l){this.latestValues[i]=l}update(i,l){(i.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=i,this.prevPresenceContext=this.presenceContext,this.presenceContext=l;for(let o=0;o<G1.length;o++){const c=G1[o];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const d="on"+c,f=i[d];f&&(this.propEventSubscriptions[c]=this.on(c,f))}this.prevMotionValues=w8(this,this.scrapeMotionValuesFromProps(i,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(i){return this.props.variants?this.props.variants[i]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(i){const l=this.getClosestVariantNode();if(l)return l.variantChildren&&l.variantChildren.add(i),()=>l.variantChildren.delete(i)}addValue(i,l){const o=this.values.get(i);l!==o&&(o&&this.removeValue(i),this.bindToMotionValue(i,l),this.values.set(i,l),this.latestValues[i]=l.get())}removeValue(i){this.values.delete(i);const l=this.valueSubscriptions.get(i);l&&(l(),this.valueSubscriptions.delete(i)),delete this.latestValues[i],this.removeValueFromRenderState(i,this.renderState)}hasValue(i){return this.values.has(i)}getValue(i,l){if(this.props.values&&this.props.values[i])return this.props.values[i];let o=this.values.get(i);return o===void 0&&l!==void 0&&(o=Bi(l===null?void 0:l,{owner:this}),this.addValue(i,o)),o}readValue(i,l){let o=this.latestValues[i]!==void 0||!this.current?this.latestValues[i]:this.getBaseTargetFromProps(this.props,i)??this.readValueFromInstance(this.current,i,this.options);return o!=null&&(typeof o=="string"&&(ug(o)||fg(o))?o=parseFloat(o):!S8(o)&&on.test(l)&&(o=ny(i,l)),this.setBaseTarget(i,he(o)?o.get():o)),he(o)?o.get():o}setBaseTarget(i,l){this.baseTarget[i]=l}getBaseTarget(i){const{initial:l}=this.props;let o;if(typeof l=="string"||typeof l=="object"){const d=Bf(this.props,l,this.presenceContext?.custom);d&&(o=d[i])}if(l&&o!==void 0)return o;const c=this.getBaseTargetFromProps(this.props,i);return c!==void 0&&!he(c)?c:this.initialValues[i]!==void 0&&o===void 0?void 0:this.baseTarget[i]}on(i,l){return this.events[i]||(this.events[i]=new Ef),this.events[i].add(l)}notify(i,...l){this.events[i]&&this.events[i].notify(...l)}scheduleRenderMicrotask(){Hf.render(this.render)}}class dy extends C8{constructor(){super(...arguments),this.KeyframeResolver=t8}sortInstanceNodePosition(i,l){return i.compareDocumentPosition(l)&2?1:-1}getBaseTargetFromProps(i,l){const o=i.style;return o?o[l]:void 0}removeValueFromRenderState(i,{vars:l,style:o}){delete l[i],delete o[i]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:i}=this.props;he(i)&&(this.childSubscription=i.on("change",l=>{this.current&&(this.current.textContent=`${l}`)}))}}class va{constructor(i){this.isMounted=!1,this.node=i}update(){}}function hy({top:a,left:i,right:l,bottom:o}){return{x:{min:i,max:l},y:{min:a,max:o}}}function M8({x:a,y:i}){return{top:i.min,right:a.max,bottom:i.max,left:a.min}}function z8(a,i){if(!i)return a;const l=i({x:a.left,y:a.top}),o=i({x:a.right,y:a.bottom});return{top:l.y,left:l.x,bottom:o.y,right:o.x}}function Oc(a){return a===void 0||a===1}function df({scale:a,scaleX:i,scaleY:l}){return!Oc(a)||!Oc(i)||!Oc(l)}function Ua(a){return df(a)||my(a)||a.z||a.rotate||a.rotateX||a.rotateY||a.skewX||a.skewY}function my(a){return q1(a.x)||q1(a.y)}function q1(a){return a&&a!=="0%"}function Jo(a,i,l){const o=a-l,c=i*o;return l+c}function Y1(a,i,l,o,c){return c!==void 0&&(a=Jo(a,c,o)),Jo(a,l,o)+i}function hf(a,i=0,l=1,o,c){a.min=Y1(a.min,i,l,o,c),a.max=Y1(a.max,i,l,o,c)}function py(a,{x:i,y:l}){hf(a.x,i.translate,i.scale,i.originPoint),hf(a.y,l.translate,l.scale,l.originPoint)}const X1=.999999999999,Z1=1.0000000000001;function N8(a,i,l,o=!1){const c=l.length;if(!c)return;i.x=i.y=1;let d,f;for(let m=0;m<c;m++){d=l[m],f=d.projectionDelta;const{visualElement:y}=d.options;y&&y.props.style&&y.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&(pn(a.x,-d.scroll.offset.x),pn(a.y,-d.scroll.offset.y)),f&&(i.x*=f.x.scale,i.y*=f.y.scale,py(a,f)),o&&Ua(d.latestValues)&&ko(a,d.latestValues,d.layout?.layoutBox))}i.x<Z1&&i.x>X1&&(i.x=1),i.y<Z1&&i.y>X1&&(i.y=1)}function pn(a,i){a.min+=i,a.max+=i}function Q1(a,i,l,o,c=.5){const d=Gt(a.min,a.max,c);hf(a,i,l,d,o)}function K1(a,i){return typeof a=="string"?parseFloat(a)/100*(i.max-i.min):a}function ko(a,i,l){const o=l??a;Q1(a.x,K1(i.x,o.x),i.scaleX,i.scale,i.originX),Q1(a.y,K1(i.y,o.y),i.scaleY,i.scale,i.originY)}function gy(a,i){return hy(z8(a.getBoundingClientRect(),i))}function D8(a,i,l){const o=gy(a,l),{scroll:c}=i;return c&&(pn(o.x,c.offset.x),pn(o.y,c.offset.y)),o}const R8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},V8=Ui.length;function O8(a,i,l){let o="",c=!0;for(let d=0;d<V8;d++){const f=Ui[d],m=a[f];if(m===void 0)continue;let y=!0;if(typeof m=="number")y=m===(f.startsWith("scale")?1:0);else{const p=parseFloat(m);y=f.startsWith("scale")?p===1:p===0}if(!y||l){const p=iy(m,Uf[f]);if(!y){c=!1;const v=R8[f]||f;o+=`${v}(${p}) `}l&&(i[f]=p)}}return o=o.trim(),l?o=l(i,c?"":o):c&&(o="none"),o}function Zf(a,i,l){const{style:o,vars:c,transformOrigin:d}=a;let f=!1,m=!1;for(const y in i){const p=i[y];if(Hi.has(y)){f=!0;continue}else if(jg(y)){c[y]=p;continue}else{const v=iy(p,Uf[y]);y.startsWith("origin")?(m=!0,d[y]=v):o[y]=v}}if(i.transform||(f||l?o.transform=O8(i,a.transform,l):o.transform&&(o.transform="none")),m){const{originX:y="50%",originY:p="50%",originZ:v=0}=d;o.transformOrigin=`${y} ${p} ${v}`}}function yy(a,{style:i,vars:l},o,c){const d=a.style;let f;for(f in i)d[f]=i[f];c?.applyProjectionStyles(d,o);for(f in l)d.setProperty(f,l[f])}function J1(a,i){return i.max===i.min?0:a/(i.max-i.min)*100}const _s={correct:(a,i)=>{if(!i.target)return a;if(typeof a=="string")if(at.test(a))a=parseFloat(a);else return a;const l=J1(a,i.target.x),o=J1(a,i.target.y);return`${l}% ${o}%`}},k8={correct:(a,{treeScale:i,projectionDelta:l})=>{const o=a,c=on.parse(a);if(c.length>5)return o;const d=on.createTransformer(a),f=typeof c[0]!="number"?1:0,m=l.x.scale*i.x,y=l.y.scale*i.y;c[0+f]/=m,c[1+f]/=y;const p=Gt(m,y,.5);return typeof c[2+f]=="number"&&(c[2+f]/=p),typeof c[3+f]=="number"&&(c[3+f]/=p),d(c)}},mf={borderRadius:{..._s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_s,borderTopRightRadius:_s,borderBottomLeftRadius:_s,borderBottomRightRadius:_s,boxShadow:k8};function vy(a,{layout:i,layoutId:l}){return Hi.has(a)||a.startsWith("origin")||(i||l!==void 0)&&(!!mf[a]||a==="opacity")}function Qf(a,i,l){const o=a.style,c=i?.style,d={};if(!o)return d;for(const f in o)(he(o[f])||c&&he(c[f])||vy(f,a)||l?.getValue(f)?.liveStyle!==void 0)&&(d[f]=o[f]);return d}function _8(a){return window.getComputedStyle(a)}class B8 extends dy{constructor(){super(...arguments),this.type="html",this.renderInstance=yy}readValueFromInstance(i,l){if(Hi.has(l))return this.projection?.isProjecting?Ic(l):n4(i,l);{const o=_8(i),c=(jg(l)?o.getPropertyValue(l):o[l])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(i,{transformPagePoint:l}){return gy(i,l)}build(i,l,o){Zf(i,l,o.transformTemplate)}scrapeMotionValuesFromProps(i,l,o){return Qf(i,l,o)}}const L8={offset:"stroke-dashoffset",array:"stroke-dasharray"},U8={offset:"strokeDashoffset",array:"strokeDasharray"};function H8(a,i,l=1,o=0,c=!0){a.pathLength=1;const d=c?L8:U8;a[d.offset]=`${-o}`,a[d.array]=`${i} ${l}`}const G8=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function by(a,{attrX:i,attrY:l,attrScale:o,pathLength:c,pathSpacing:d=1,pathOffset:f=0,...m},y,p,v){if(Zf(a,m,p),y){a.style.viewBox&&(a.attrs.viewBox=a.style.viewBox);return}a.attrs=a.style,a.style={};const{attrs:x,style:S}=a;x.transform&&(S.transform=x.transform,delete x.transform),(S.transform||x.transformOrigin)&&(S.transformOrigin=x.transformOrigin??"50% 50%",delete x.transformOrigin),S.transform&&(S.transformBox=v?.transformBox??"fill-box",delete x.transformBox);for(const j of G8)x[j]!==void 0&&(S[j]=x[j],delete x[j]);i!==void 0&&(x.x=i),l!==void 0&&(x.y=l),o!==void 0&&(x.scale=o),c!==void 0&&H8(x,c,d,f,!1)}const xy=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Sy=a=>typeof a=="string"&&a.toLowerCase()==="svg";function q8(a,i,l,o){yy(a,i,void 0,o);for(const c in i.attrs)a.setAttribute(xy.has(c)?c:Lf(c),i.attrs[c])}function Ty(a,i,l){const o=Qf(a,i,l);for(const c in a)if(he(a[c])||he(i[c])){const d=Ui.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;o[d]=a[c]}return o}class Y8 extends dy{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ae}getBaseTargetFromProps(i,l){return i[l]}readValueFromInstance(i,l){if(Hi.has(l)){const o=ey(l);return o&&o.default||0}return l=xy.has(l)?l:Lf(l),i.getAttribute(l)}scrapeMotionValuesFromProps(i,l,o){return Ty(i,l,o)}build(i,l,o){by(i,l,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(i,l,o,c){q8(i,l,o,c)}mount(i){this.isSVGTag=Sy(i.tagName),super.mount(i)}}const X8=Xf.length;function wy(a){if(!a)return;if(!a.isControllingVariants){const l=a.parent?wy(a.parent)||{}:{};return a.props.initial!==void 0&&(l.initial=a.props.initial),l}const i={};for(let l=0;l<X8;l++){const o=Xf[l],c=a.props[o];(Fs(c)||c===!1)&&(i[o]=c)}return i}function Ay(a,i){if(!Array.isArray(i))return!1;const l=i.length;if(l!==a.length)return!1;for(let o=0;o<l;o++)if(i[o]!==a[o])return!1;return!0}const Z8=[...Yf].reverse(),Q8=Yf.length;function K8(a){return i=>Promise.all(i.map(({animation:l,options:o})=>Y4(a,l,o)))}function J8(a){let i=K8(a),l=F1(),o=!0,c=!1;const d=p=>(v,x)=>{const S=Ya(a,x,p==="exit"?a.presenceContext?.custom:void 0);if(S){const{transition:j,transitionEnd:E,...z}=S;v={...v,...z,...E}}return v};function f(p){i=p(a)}function m(p){const{props:v}=a,x=wy(a.parent)||{},S=[],j=new Set;let E={},z=1/0;for(let L=0;L<Q8;L++){const Q=Z8[L],X=l[Q],Z=v[Q]!==void 0?v[Q]:x[Q],q=Fs(Z),P=Q===p?X.isActive:null;P===!1&&(z=L);let J=Z===x[Q]&&Z!==v[Q]&&q;if(J&&(o||c)&&a.manuallyAnimateOnMount&&(J=!1),X.protectedKeys={...E},!X.isActive&&P===null||!Z&&!X.prevProp||Io(Z)||typeof Z=="boolean")continue;if(Q==="exit"&&X.isActive&&P!==!0){X.prevResolvedValues&&(E={...E,...X.prevResolvedValues});continue}const B=F8(X.prevProp,Z);let ft=B||Q===p&&X.isActive&&!J&&q||L>z&&q,Y=!1;const rt=Array.isArray(Z)?Z:[Z];let dt=rt.reduce(d(Q),{});P===!1&&(dt={});const{prevResolvedValues:qt={}}=X,wt={...qt,...dt},yt=$=>{ft=!0,j.has($)&&(Y=!0,j.delete($)),X.needsAnimating[$]=!0;const ut=a.getValue($);ut&&(ut.liveStyle=!1)};for(const $ in wt){const ut=dt[$],K=qt[$];if(E.hasOwnProperty($))continue;let w=!1;lf(ut)&&lf(K)?w=!Ay(ut,K):w=ut!==K,w?ut!=null?yt($):j.add($):ut!==void 0&&j.has($)?yt($):X.protectedKeys[$]=!0}X.prevProp=Z,X.prevResolvedValues=dt,X.isActive&&(E={...E,...dt}),(o||c)&&a.blockInitialAnimation&&(ft=!1);const R=J&&B;ft&&(!R||Y)&&S.push(...rt.map($=>{const ut={type:Q};if(typeof $=="string"&&(o||c)&&!R&&a.manuallyAnimateOnMount&&a.parent){const{parent:K}=a,w=Ya(K,$);if(K.enteringChildren&&w){const{delayChildren:H}=w.transition||{};ut.delay=Qg(K.enteringChildren,a,H)}}return{animation:$,options:ut}}))}if(j.size){const L={};if(typeof v.initial!="boolean"){const Q=Ya(a,Array.isArray(v.initial)?v.initial[0]:v.initial);Q&&Q.transition&&(L.transition=Q.transition)}j.forEach(Q=>{const X=a.getBaseTarget(Q),Z=a.getValue(Q);Z&&(Z.liveStyle=!0),L[Q]=X??null}),S.push({animation:L})}let k=!!S.length;return o&&(v.initial===!1||v.initial===v.animate)&&!a.manuallyAnimateOnMount&&(k=!1),o=!1,c=!1,k?i(S):Promise.resolve()}function y(p,v){if(l[p].isActive===v)return Promise.resolve();a.variantChildren?.forEach(S=>S.animationState?.setActive(p,v)),l[p].isActive=v;const x=m(p);for(const S in l)l[S].protectedKeys={};return x}return{animateChanges:m,setActive:y,setAnimateFunction:f,getState:()=>l,reset:()=>{l=F1(),c=!0}}}function F8(a,i){return typeof i=="string"?i!==a:Array.isArray(i)?!Ay(i,a):!1}function La(a=!1){return{isActive:a,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function F1(){return{animate:La(!0),whileInView:La(),whileHover:La(),whileTap:La(),whileDrag:La(),whileFocus:La(),exit:La()}}function pf(a,i){a.min=i.min,a.max=i.max}function an(a,i){pf(a.x,i.x),pf(a.y,i.y)}function P1(a,i){a.translate=i.translate,a.scale=i.scale,a.originPoint=i.originPoint,a.origin=i.origin}const Ey=1e-4,P8=1-Ey,$8=1+Ey,jy=.01,W8=0-jy,I8=0+jy;function ye(a){return a.max-a.min}function t6(a,i,l){return Math.abs(a-i)<=l}function $1(a,i,l,o=.5){a.origin=o,a.originPoint=Gt(i.min,i.max,a.origin),a.scale=ye(l)/ye(i),a.translate=Gt(l.min,l.max,a.origin)-a.originPoint,(a.scale>=P8&&a.scale<=$8||isNaN(a.scale))&&(a.scale=1),(a.translate>=W8&&a.translate<=I8||isNaN(a.translate))&&(a.translate=0)}function Hs(a,i,l,o){$1(a.x,i.x,l.x,o?o.originX:void 0),$1(a.y,i.y,l.y,o?o.originY:void 0)}function W1(a,i,l,o=0){const c=o?Gt(l.min,l.max,o):l.min;a.min=c+i.min,a.max=a.min+ye(i)}function e6(a,i,l,o){W1(a.x,i.x,l.x,o?.x),W1(a.y,i.y,l.y,o?.y)}function I1(a,i,l,o=0){const c=o?Gt(l.min,l.max,o):l.min;a.min=i.min-c,a.max=a.min+ye(i)}function Fo(a,i,l,o){I1(a.x,i.x,l.x,o?.x),I1(a.y,i.y,l.y,o?.y)}function tp(a,i,l,o,c){return a-=i,a=Jo(a,1/l,o),c!==void 0&&(a=Jo(a,1/c,o)),a}function n6(a,i=0,l=1,o=.5,c,d=a,f=a){if(yn.test(i)&&(i=parseFloat(i),i=Gt(f.min,f.max,i/100)-f.min),typeof i!="number")return;let m=Gt(d.min,d.max,o);a===d&&(m-=i),a.min=tp(a.min,i,l,m,c),a.max=tp(a.max,i,l,m,c)}function ep(a,i,[l,o,c],d,f){n6(a,i[l],i[o],i[c],i.scale,d,f)}const a6=["x","scaleX","originX"],i6=["y","scaleY","originY"];function np(a,i,l,o){ep(a.x,i,a6,l?l.x:void 0,o?o.x:void 0),ep(a.y,i,i6,l?l.y:void 0,o?o.y:void 0)}function ap(a){return a.translate===0&&a.scale===1}function Cy(a){return ap(a.x)&&ap(a.y)}function ip(a,i){return a.min===i.min&&a.max===i.max}function s6(a,i){return ip(a.x,i.x)&&ip(a.y,i.y)}function sp(a,i){return Math.round(a.min)===Math.round(i.min)&&Math.round(a.max)===Math.round(i.max)}function My(a,i){return sp(a.x,i.x)&&sp(a.y,i.y)}function lp(a){return ye(a.x)/ye(a.y)}function op(a,i){return a.translate===i.translate&&a.scale===i.scale&&a.originPoint===i.originPoint}function mn(a){return[a("x"),a("y")]}function l6(a,i,l){let o="";const c=a.x.translate/i.x,d=a.y.translate/i.y,f=l?.z||0;if((c||d||f)&&(o=`translate3d(${c}px, ${d}px, ${f}px) `),(i.x!==1||i.y!==1)&&(o+=`scale(${1/i.x}, ${1/i.y}) `),l){const{transformPerspective:p,rotate:v,rotateX:x,rotateY:S,skewX:j,skewY:E}=l;p&&(o=`perspective(${p}px) ${o}`),v&&(o+=`rotate(${v}deg) `),x&&(o+=`rotateX(${x}deg) `),S&&(o+=`rotateY(${S}deg) `),j&&(o+=`skewX(${j}deg) `),E&&(o+=`skewY(${E}deg) `)}const m=a.x.scale*i.x,y=a.y.scale*i.y;return(m!==1||y!==1)&&(o+=`scale(${m}, ${y})`),o||"none"}const zy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],o6=zy.length,rp=a=>typeof a=="string"?parseFloat(a):a,up=a=>typeof a=="number"||at.test(a);function r6(a,i,l,o,c,d){c?(a.opacity=Gt(0,l.opacity??1,u6(o)),a.opacityExit=Gt(i.opacity??1,0,c6(o))):d&&(a.opacity=Gt(i.opacity??1,l.opacity??1,o));for(let f=0;f<o6;f++){const m=zy[f];let y=cp(i,m),p=cp(l,m);if(y===void 0&&p===void 0)continue;y||(y=0),p||(p=0),y===0||p===0||up(y)===up(p)?(a[m]=Math.max(Gt(rp(y),rp(p),o),0),(yn.test(p)||yn.test(y))&&(a[m]+="%")):a[m]=p}(i.rotate||l.rotate)&&(a.rotate=Gt(i.rotate||0,l.rotate||0,o))}function cp(a,i){return a[i]!==void 0?a[i]:a.borderRadius}const u6=Ny(0,.5,xg),c6=Ny(.5,.95,Pe);function Ny(a,i,l){return o=>o<a?0:o>i?1:l(Ks(a,i,o))}function f6(a,i,l){const o=he(a)?a:Bi(a);return o.start(_f("",o,i,l)),o.animation}function Ps(a,i,l,o={passive:!0}){return a.addEventListener(i,l,o),()=>a.removeEventListener(i,l)}const d6=(a,i)=>a.depth-i.depth;class h6{constructor(){this.children=[],this.isDirty=!1}add(i){wf(this.children,i),this.isDirty=!0}remove(i){qo(this.children,i),this.isDirty=!0}forEach(i){this.isDirty&&this.children.sort(d6),this.isDirty=!1,this.children.forEach(i)}}function m6(a,i){const l=ge.now(),o=({timestamp:c})=>{const d=c-l;d>=i&&(ga(o),a(d-i))};return Lt.setup(o,!0),()=>ga(o)}function _o(a){return he(a)?a.get():a}class p6{constructor(){this.members=[]}add(i){wf(this.members,i);for(let l=this.members.length-1;l>=0;l--){const o=this.members[l];if(o===i||o===this.lead||o===this.prevLead)continue;const c=o.instance;(!c||c.isConnected===!1)&&!o.snapshot&&(qo(this.members,o),o.unmount())}i.scheduleRender()}remove(i){if(qo(this.members,i),i===this.prevLead&&(this.prevLead=void 0),i===this.lead){const l=this.members[this.members.length-1];l&&this.promote(l)}}relegate(i){for(let l=this.members.indexOf(i)-1;l>=0;l--){const o=this.members[l];if(o.isPresent!==!1&&o.instance?.isConnected!==!1)return this.promote(o),!0}return!1}promote(i,l){const o=this.lead;if(i!==o&&(this.prevLead=o,this.lead=i,i.show(),o)){o.updateSnapshot(),i.scheduleRender();const{layoutDependency:c}=o.options,{layoutDependency:d}=i.options;(c===void 0||c!==d)&&(i.resumeFrom=o,l&&(o.preserveOpacity=!0),o.snapshot&&(i.snapshot=o.snapshot,i.snapshot.latestValues=o.animationValues||o.latestValues),i.root?.isUpdating&&(i.isLayoutDirty=!0)),i.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(i=>{i.options.onExitComplete?.(),i.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(i=>i.instance&&i.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Bo={hasAnimatedSinceResize:!0,hasEverUpdated:!1},kc=["","X","Y","Z"],g6=1e3;let y6=0;function _c(a,i,l,o){const{latestValues:c}=i;c[a]&&(l[a]=c[a],i.setStaticValue(a,0),o&&(o[a]=0))}function Dy(a){if(a.hasCheckedOptimisedAppear=!0,a.root===a)return;const{visualElement:i}=a.options;if(!i)return;const l=$g(i);if(window.MotionHasOptimisedAnimation(l,"transform")){const{layout:c,layoutId:d}=a.options;window.MotionCancelOptimisedAnimation(l,"transform",Lt,!(c||d))}const{parent:o}=a;o&&!o.hasCheckedOptimisedAppear&&Dy(o)}function Ry({attachResizeListener:a,defaultParent:i,measureScroll:l,checkIsScrollRoot:o,resetTransform:c}){return class{constructor(f={},m=i?.()){this.id=y6++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(x6),this.nodes.forEach(j6),this.nodes.forEach(C6),this.nodes.forEach(S6)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=f,this.root=m?m.root||m:this,this.path=m?[...m.path,m]:[],this.parent=m,this.depth=m?m.depth+1:0;for(let y=0;y<this.path.length;y++)this.path[y].shouldResetTransform=!0;this.root===this&&(this.nodes=new h6)}addEventListener(f,m){return this.eventHandlers.has(f)||this.eventHandlers.set(f,new Ef),this.eventHandlers.get(f).add(m)}notifyListeners(f,...m){const y=this.eventHandlers.get(f);y&&y.notify(...m)}hasListeners(f){return this.eventHandlers.has(f)}mount(f){if(this.instance)return;this.isSVG=qf(f)&&!b8(f),this.instance=f;const{layoutId:m,layout:y,visualElement:p}=this.options;if(p&&!p.current&&p.mount(f),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(y||m)&&(this.isLayoutDirty=!0),a){let v,x=0;const S=()=>this.root.updateBlockedByResize=!1;Lt.read(()=>{x=window.innerWidth}),a(f,()=>{const j=window.innerWidth;j!==x&&(x=j,this.root.updateBlockedByResize=!0,v&&v(),v=m6(S,250),Bo.hasAnimatedSinceResize&&(Bo.hasAnimatedSinceResize=!1,this.nodes.forEach(hp)))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&p&&(m||y)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x,hasRelativeLayoutChanged:S,layout:j})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||p.getDefaultTransition()||R6,{onLayoutAnimationStart:z,onLayoutAnimationComplete:k}=p.getProps(),L=!this.targetLayout||!My(this.targetLayout,j),Q=!x&&S;if(this.options.layoutRoot||this.resumeFrom||Q||x&&(L||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const X={...kf(E,"layout"),onPlay:z,onComplete:k};(p.shouldReduceMotion||this.options.layoutRoot)&&(X.delay=0,X.type=!1),this.startAnimation(X),this.setAnimationOrigin(v,Q)}else x||hp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=j})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const f=this.getStack();f&&f.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ga(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(M6),this.animationId++)}getTransformTemplate(){const{visualElement:f}=this.options;return f&&f.getProps().transformTemplate}willUpdate(f=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dy(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const x=this.path[v];x.shouldResetTransform=!0,(typeof x.latestValues.x=="string"||typeof x.latestValues.y=="string")&&(x.isLayoutDirty=!0),x.updateScroll("snapshot"),x.options.layoutRoot&&x.willUpdate(!1)}const{layoutId:m,layout:y}=this.options;if(m===void 0&&!y)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),f&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const y=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),y&&this.nodes.forEach(w6),this.nodes.forEach(fp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(dp);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(A6),this.nodes.forEach(E6),this.nodes.forEach(v6),this.nodes.forEach(b6)):this.nodes.forEach(dp),this.clearAllSnapshots();const m=ge.now();de.delta=vn(0,1e3/60,m-de.timestamp),de.timestamp=m,de.isProcessing=!0,Cc.update.process(de),Cc.preRender.process(de),Cc.render.process(de),de.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(T6),this.sharedNodes.forEach(z6)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ye(this.snapshot.measuredBox.x)&&!ye(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let y=0;y<this.path.length;y++)this.path[y].updateScroll();const f=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=ae()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:m}=this.options;m&&m.notify("LayoutMeasure",this.layout.layoutBox,f?f.layoutBox:void 0)}updateScroll(f="measure"){let m=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===f&&(m=!1),m&&this.instance){const y=o(this.instance);this.scroll={animationId:this.root.animationId,phase:f,isRoot:y,offset:l(this.instance),wasRoot:this.scroll?this.scroll.isRoot:y}}}resetTransform(){if(!c)return;const f=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,m=this.projectionDelta&&!Cy(this.projectionDelta),y=this.getTransformTemplate(),p=y?y(this.latestValues,""):void 0,v=p!==this.prevTransformTemplateValue;f&&this.instance&&(m||Ua(this.latestValues)||v)&&(c(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(f=!0){const m=this.measurePageBox();let y=this.removeElementScroll(m);return f&&(y=this.removeTransform(y)),V6(y),{animationId:this.root.animationId,measuredBox:m,layoutBox:y,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:f}=this.options;if(!f)return ae();const m=f.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(O6))){const{scroll:p}=this.root;p&&(pn(m.x,p.offset.x),pn(m.y,p.offset.y))}return m}removeElementScroll(f){const m=ae();if(an(m,f),this.scroll?.wasRoot)return m;for(let y=0;y<this.path.length;y++){const p=this.path[y],{scroll:v,options:x}=p;p!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&an(m,f),pn(m.x,v.offset.x),pn(m.y,v.offset.y))}return m}applyTransform(f,m=!1,y){const p=y||ae();an(p,f);for(let v=0;v<this.path.length;v++){const x=this.path[v];!m&&x.options.layoutScroll&&x.scroll&&x!==x.root&&(pn(p.x,-x.scroll.offset.x),pn(p.y,-x.scroll.offset.y)),Ua(x.latestValues)&&ko(p,x.latestValues,x.layout?.layoutBox)}return Ua(this.latestValues)&&ko(p,this.latestValues,this.layout?.layoutBox),p}removeTransform(f){const m=ae();an(m,f);for(let y=0;y<this.path.length;y++){const p=this.path[y];if(!Ua(p.latestValues))continue;let v;p.instance&&(df(p.latestValues)&&p.updateSnapshot(),v=ae(),an(v,p.measurePageBox())),np(m,p.latestValues,p.snapshot?.layoutBox,v)}return Ua(this.latestValues)&&np(m,this.latestValues),m}setTargetDelta(f){this.targetDelta=f,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(f){this.options={...this.options,...f,crossfade:f.crossfade!==void 0?f.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==de.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(f=!1){const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const y=!!this.resumingFrom||this!==m;if(!(f||y&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:x}=this.options;if(!this.layout||!(v||x))return;this.resolvedRelativeTargetAt=de.timestamp;const S=this.getClosestProjectingParent();S&&this.linkedParentVersion!==S.layoutVersion&&!S.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&S&&S.layout?this.createRelativeTarget(S,this.layout.layoutBox,S.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ae(),this.targetWithTransforms=ae()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),e6(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):an(this.target,this.layout.layoutBox),py(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&S&&!!S.resumingFrom==!!this.resumingFrom&&!S.options.layoutScroll&&S.target&&this.animationProgress!==1?this.createRelativeTarget(S,this.target,S.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||df(this.parent.latestValues)||my(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(f,m,y){this.relativeParent=f,this.linkedParentVersion=f.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ae(),this.relativeTargetOrigin=ae(),Fo(this.relativeTargetOrigin,m,y,this.options.layoutAnchor||void 0),an(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const f=this.getLead(),m=!!this.resumingFrom||this!==f;let y=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(y=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(y=!1),this.resolvedRelativeTargetAt===de.timestamp&&(y=!1),y)return;const{layout:p,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||v))return;an(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,S=this.treeScale.y;N8(this.layoutCorrected,this.treeScale,this.path,m),f.layout&&!f.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(f.target=f.layout.layoutBox,f.targetWithTransforms=ae());const{target:j}=f;if(!j){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(P1(this.prevProjectionDelta.x,this.projectionDelta.x),P1(this.prevProjectionDelta.y,this.projectionDelta.y)),Hs(this.projectionDelta,this.layoutCorrected,j,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==S||!op(this.projectionDelta.x,this.prevProjectionDelta.x)||!op(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",j))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(f=!0){if(this.options.visualElement?.scheduleRender(),f){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ki(),this.projectionDelta=ki(),this.projectionDeltaWithTransform=ki()}setAnimationOrigin(f,m=!1){const y=this.snapshot,p=y?y.latestValues:{},v={...this.latestValues},x=ki();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!m;const S=ae(),j=y?y.source:void 0,E=this.layout?this.layout.source:void 0,z=j!==E,k=this.getStack(),L=!k||k.members.length<=1,Q=!!(z&&!L&&this.options.crossfade===!0&&!this.path.some(D6));this.animationProgress=0;let X;this.mixTargetDelta=Z=>{const q=Z/1e3;mp(x.x,f.x,q),mp(x.y,f.y,q),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fo(S,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),N6(this.relativeTarget,this.relativeTargetOrigin,S,q),X&&s6(this.relativeTarget,X)&&(this.isProjectionDirty=!1),X||(X=ae()),an(X,this.relativeTarget)),z&&(this.animationValues=v,r6(v,p,this.latestValues,q,Q,L)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=q},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(f){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(ga(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Lt.update(()=>{Bo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Bi(0)),this.motionValue.jump(0,!1),this.currentAnimation=f6(this.motionValue,[0,1e3],{...f,velocity:0,isSync:!0,onUpdate:m=>{this.mixTargetDelta(m),f.onUpdate&&f.onUpdate(m)},onStop:()=>{},onComplete:()=>{f.onComplete&&f.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const f=this.getStack();f&&f.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(g6),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const f=this.getLead();let{targetWithTransforms:m,target:y,layout:p,latestValues:v}=f;if(!(!m||!y||!p)){if(this!==f&&this.layout&&p&&Vy(this.options.animationType,this.layout.layoutBox,p.layoutBox)){y=this.target||ae();const x=ye(this.layout.layoutBox.x);y.x.min=f.target.x.min,y.x.max=y.x.min+x;const S=ye(this.layout.layoutBox.y);y.y.min=f.target.y.min,y.y.max=y.y.min+S}an(m,y),ko(m,v),Hs(this.projectionDeltaWithTransform,this.layoutCorrected,m,v)}}registerSharedNode(f,m){this.sharedNodes.has(f)||this.sharedNodes.set(f,new p6),this.sharedNodes.get(f).add(m);const p=m.options.initialPromotionConfig;m.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(m):void 0})}isLead(){const f=this.getStack();return f?f.lead===this:!0}getLead(){const{layoutId:f}=this.options;return f?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:f}=this.options;return f?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:f}=this.options;if(f)return this.root.sharedNodes.get(f)}promote({needsReset:f,transition:m,preserveFollowOpacity:y}={}){const p=this.getStack();p&&p.promote(this,y),f&&(this.projectionDelta=void 0,this.needsReset=!0),m&&this.setOptions({transition:m})}relegate(){const f=this.getStack();return f?f.relegate(this):!1}resetSkewAndRotation(){const{visualElement:f}=this.options;if(!f)return;let m=!1;const{latestValues:y}=f;if((y.z||y.rotate||y.rotateX||y.rotateY||y.rotateZ||y.skewX||y.skewY)&&(m=!0),!m)return;const p={};y.z&&_c("z",f,p,this.animationValues);for(let v=0;v<kc.length;v++)_c(`rotate${kc[v]}`,f,p,this.animationValues),_c(`skew${kc[v]}`,f,p,this.animationValues);f.render();for(const v in p)f.setStaticValue(v,p[v]),this.animationValues&&(this.animationValues[v]=p[v]);f.scheduleRender()}applyProjectionStyles(f,m){if(!this.instance||this.isSVG)return;if(!this.isVisible){f.visibility="hidden";return}const y=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,f.visibility="",f.opacity="",f.pointerEvents=_o(m?.pointerEvents)||"",f.transform=y?y(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(f.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,f.pointerEvents=_o(m?.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(f.transform=y?y({},""):"none",this.hasProjected=!1);return}f.visibility="";const v=p.animationValues||p.latestValues;this.applyTransformsToTarget();let x=l6(this.projectionDeltaWithTransform,this.treeScale,v);y&&(x=y(v,x)),f.transform=x;const{x:S,y:j}=this.projectionDelta;f.transformOrigin=`${S.origin*100}% ${j.origin*100}% 0`,p.animationValues?f.opacity=p===this?v.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:v.opacityExit:f.opacity=p===this?v.opacity!==void 0?v.opacity:"":v.opacityExit!==void 0?v.opacityExit:0;for(const E in mf){if(v[E]===void 0)continue;const{correct:z,applyTo:k,isCSSVariable:L}=mf[E],Q=x==="none"?v[E]:z(v[E],p);if(k){const X=k.length;for(let Z=0;Z<X;Z++)f[k[Z]]=Q}else L?this.options.visualElement.renderState.vars[E]=Q:f[E]=Q}this.options.layoutId&&(f.pointerEvents=p===this?_o(m?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(f=>f.currentAnimation?.stop()),this.root.nodes.forEach(fp),this.root.sharedNodes.clear()}}}function v6(a){a.updateLayout()}function b6(a){const i=a.resumeFrom?.snapshot||a.snapshot;if(a.isLead()&&a.layout&&i&&a.hasListeners("didUpdate")){const{layoutBox:l,measuredBox:o}=a.layout,{animationType:c}=a.options,d=i.source!==a.layout.source;if(c==="size")mn(v=>{const x=d?i.measuredBox[v]:i.layoutBox[v],S=ye(x);x.min=l[v].min,x.max=x.min+S});else if(c==="x"||c==="y"){const v=c==="x"?"y":"x";pf(d?i.measuredBox[v]:i.layoutBox[v],l[v])}else Vy(c,i.layoutBox,l)&&mn(v=>{const x=d?i.measuredBox[v]:i.layoutBox[v],S=ye(l[v]);x.max=x.min+S,a.relativeTarget&&!a.currentAnimation&&(a.isProjectionDirty=!0,a.relativeTarget[v].max=a.relativeTarget[v].min+S)});const f=ki();Hs(f,l,i.layoutBox);const m=ki();d?Hs(m,a.applyTransform(o,!0),i.measuredBox):Hs(m,l,i.layoutBox);const y=!Cy(f);let p=!1;if(!a.resumeFrom){const v=a.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:S}=v;if(x&&S){const j=a.options.layoutAnchor||void 0,E=ae();Fo(E,i.layoutBox,x.layoutBox,j);const z=ae();Fo(z,l,S.layoutBox,j),My(E,z)||(p=!0),v.options.layoutRoot&&(a.relativeTarget=z,a.relativeTargetOrigin=E,a.relativeParent=v)}}}a.notifyListeners("didUpdate",{layout:l,snapshot:i,delta:m,layoutDelta:f,hasLayoutChanged:y,hasRelativeLayoutChanged:p})}else if(a.isLead()){const{onExitComplete:l}=a.options;l&&l()}a.options.transition=void 0}function x6(a){a.parent&&(a.isProjecting()||(a.isProjectionDirty=a.parent.isProjectionDirty),a.isSharedProjectionDirty||(a.isSharedProjectionDirty=!!(a.isProjectionDirty||a.parent.isProjectionDirty||a.parent.isSharedProjectionDirty)),a.isTransformDirty||(a.isTransformDirty=a.parent.isTransformDirty))}function S6(a){a.isProjectionDirty=a.isSharedProjectionDirty=a.isTransformDirty=!1}function T6(a){a.clearSnapshot()}function fp(a){a.clearMeasurements()}function w6(a){a.isLayoutDirty=!0,a.updateLayout()}function dp(a){a.isLayoutDirty=!1}function A6(a){a.isAnimationBlocked&&a.layout&&!a.isLayoutDirty&&(a.snapshot=a.layout,a.isLayoutDirty=!0)}function E6(a){const{visualElement:i}=a.options;i&&i.getProps().onBeforeLayoutMeasure&&i.notify("BeforeLayoutMeasure"),a.resetTransform()}function hp(a){a.finishAnimation(),a.targetDelta=a.relativeTarget=a.target=void 0,a.isProjectionDirty=!0}function j6(a){a.resolveTargetDelta()}function C6(a){a.calcProjection()}function M6(a){a.resetSkewAndRotation()}function z6(a){a.removeLeadSnapshot()}function mp(a,i,l){a.translate=Gt(i.translate,0,l),a.scale=Gt(i.scale,1,l),a.origin=i.origin,a.originPoint=i.originPoint}function pp(a,i,l,o){a.min=Gt(i.min,l.min,o),a.max=Gt(i.max,l.max,o)}function N6(a,i,l,o){pp(a.x,i.x,l.x,o),pp(a.y,i.y,l.y,o)}function D6(a){return a.animationValues&&a.animationValues.opacityExit!==void 0}const R6={duration:.45,ease:[.4,0,.1,1]},gp=a=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(a),yp=gp("applewebkit/")&&!gp("chrome/")?Math.round:Pe;function vp(a){a.min=yp(a.min),a.max=yp(a.max)}function V6(a){vp(a.x),vp(a.y)}function Vy(a,i,l){return a==="position"||a==="preserve-aspect"&&!t6(lp(i),lp(l),.2)}function O6(a){return a!==a.root&&a.scroll?.wasRoot}const k6=Ry({attachResizeListener:(a,i)=>Ps(a,"resize",i),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Bc={current:void 0},Oy=Ry({measureScroll:a=>({x:a.scrollLeft,y:a.scrollTop}),defaultParent:()=>{if(!Bc.current){const a=new k6({});a.mount(window),a.setOptions({layoutScroll:!0}),Bc.current=a}return Bc.current},resetTransform:(a,i)=>{a.style.transform=i!==void 0?i:"none"},checkIsScrollRoot:a=>window.getComputedStyle(a).position==="fixed"}),ky=O.createContext({transformPagePoint:a=>a,isStatic:!1,reducedMotion:"never"});function _6(a=!0){const i=O.useContext(Tf);if(i===null)return[!0,null];const{isPresent:l,onExitComplete:o,register:c}=i,d=O.useId();O.useEffect(()=>{if(a)return c(d)},[a]);const f=O.useCallback(()=>a&&o&&o(d),[d,o,a]);return!l&&o?[!1,f]:[!0]}const _y=O.createContext({strict:!1}),bp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let xp=!1;function B6(){if(xp)return;const a={};for(const i in bp)a[i]={isEnabled:l=>bp[i].some(o=>!!l[o])};fy(a),xp=!0}function By(){return B6(),j8()}function L6(a){const i=By();for(const l in a)i[l]={...i[l],...a[l]};fy(i)}const U6=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Po(a){return a.startsWith("while")||a.startsWith("drag")&&a!=="draggable"||a.startsWith("layout")||a.startsWith("onTap")||a.startsWith("onPan")||a.startsWith("onLayout")||U6.has(a)}let Ly=a=>!Po(a);function H6(a){typeof a=="function"&&(Ly=i=>i.startsWith("on")?!Po(i):a(i))}try{H6(require("@emotion/is-prop-valid").default)}catch{}function G6(a,i,l){const o={};for(const c in a)c==="values"&&typeof a.values=="object"||he(a[c])||(Ly(c)||l===!0&&Po(c)||!i&&!Po(c)||a.draggable&&c.startsWith("onDrag"))&&(o[c]=a[c]);return o}const er=O.createContext({});function q6(a,i){if(tr(a)){const{initial:l,animate:o}=a;return{initial:l===!1||Fs(l)?l:void 0,animate:Fs(o)?o:void 0}}return a.inherit!==!1?i:{}}function Y6(a){const{initial:i,animate:l}=q6(a,O.useContext(er));return O.useMemo(()=>({initial:i,animate:l}),[Sp(i),Sp(l)])}function Sp(a){return Array.isArray(a)?a.join(" "):a}const Kf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uy(a,i,l){for(const o in i)!he(i[o])&&!vy(o,l)&&(a[o]=i[o])}function X6({transformTemplate:a},i){return O.useMemo(()=>{const l=Kf();return Zf(l,i,a),Object.assign({},l.vars,l.style)},[i])}function Z6(a,i){const l=a.style||{},o={};return Uy(o,l,a),Object.assign(o,X6(a,i)),o}function Q6(a,i){const l={},o=Z6(a,i);return a.drag&&a.dragListener!==!1&&(l.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=a.drag===!0?"none":`pan-${a.drag==="x"?"y":"x"}`),a.tabIndex===void 0&&(a.onTap||a.onTapStart||a.whileTap)&&(l.tabIndex=0),l.style=o,l}const Hy=()=>({...Kf(),attrs:{}});function K6(a,i,l,o){const c=O.useMemo(()=>{const d=Hy();return by(d,i,Sy(o),a.transformTemplate,a.style),{...d.attrs,style:{...d.style}}},[i]);if(a.style){const d={};Uy(d,a.style,a),c.style={...d,...c.style}}return c}const J6=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Jf(a){return typeof a!="string"||a.includes("-")?!1:!!(J6.indexOf(a)>-1||/[A-Z]/u.test(a))}function F6(a,i,l,{latestValues:o},c,d=!1,f){const y=(f??Jf(a)?K6:Q6)(i,o,c,a),p=G6(i,typeof a=="string",d),v=a!==O.Fragment?{...p,...y,ref:l}:{},{children:x}=i,S=O.useMemo(()=>he(x)?x.get():x,[x]);return O.createElement(a,{...v,children:S})}function P6({scrapeMotionValuesFromProps:a,createRenderState:i},l,o,c){return{latestValues:$6(l,o,c,a),renderState:i()}}function $6(a,i,l,o){const c={},d=o(a,{});for(const S in d)c[S]=_o(d[S]);let{initial:f,animate:m}=a;const y=tr(a),p=uy(a);i&&p&&!y&&a.inherit!==!1&&(f===void 0&&(f=i.initial),m===void 0&&(m=i.animate));let v=l?l.initial===!1:!1;v=v||f===!1;const x=v?m:f;if(x&&typeof x!="boolean"&&!Io(x)){const S=Array.isArray(x)?x:[x];for(let j=0;j<S.length;j++){const E=Bf(a,S[j]);if(E){const{transitionEnd:z,transition:k,...L}=E;for(const Q in L){let X=L[Q];if(Array.isArray(X)){const Z=v?X.length-1:0;X=X[Z]}X!==null&&(c[Q]=X)}for(const Q in z)c[Q]=z[Q]}}}return c}const Gy=a=>(i,l)=>{const o=O.useContext(er),c=O.useContext(Tf),d=()=>P6(a,i,o,c);return l?d():Jx(d)},W6=Gy({scrapeMotionValuesFromProps:Qf,createRenderState:Kf}),I6=Gy({scrapeMotionValuesFromProps:Ty,createRenderState:Hy}),t7=Symbol.for("motionComponentSymbol");function e7(a,i,l){const o=O.useRef(l);O.useInsertionEffect(()=>{o.current=l});const c=O.useRef(null);return O.useCallback(d=>{d&&a.onMount?.(d);const f=o.current;if(typeof f=="function")if(d){const m=f(d);typeof m=="function"&&(c.current=m)}else c.current?(c.current(),c.current=null):f(d);else f&&(f.current=d);i&&(d?i.mount(d):i.unmount())},[i])}const qy=O.createContext({});function Di(a){return a&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,"current")}function n7(a,i,l,o,c,d){const{visualElement:f}=O.useContext(er),m=O.useContext(_y),y=O.useContext(Tf),p=O.useContext(ky),v=p.reducedMotion,x=p.skipAnimations,S=O.useRef(null),j=O.useRef(!1);o=o||m.renderer,!S.current&&o&&(S.current=o(a,{visualState:i,parent:f,props:l,presenceContext:y,blockInitialAnimation:y?y.initial===!1:!1,reducedMotionConfig:v,skipAnimations:x,isSVG:d}),j.current&&S.current&&(S.current.manuallyAnimateOnMount=!0));const E=S.current,z=O.useContext(qy);E&&!E.projection&&c&&(E.type==="html"||E.type==="svg")&&a7(S.current,l,c,z);const k=O.useRef(!1);O.useInsertionEffect(()=>{E&&k.current&&E.update(l,y)});const L=l[Pg],Q=O.useRef(!!L&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(L)&&window.MotionHasOptimisedAnimation?.(L));return Px(()=>{j.current=!0,E&&(k.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),Q.current&&E.animationState&&E.animationState.animateChanges())}),O.useEffect(()=>{E&&(!Q.current&&E.animationState&&E.animationState.animateChanges(),Q.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(L)}),Q.current=!1),E.enteringChildren=void 0)}),E}function a7(a,i,l,o){const{layoutId:c,layout:d,drag:f,dragConstraints:m,layoutScroll:y,layoutRoot:p,layoutAnchor:v,layoutCrossfade:x}=i;a.projection=new l(a.latestValues,i["data-framer-portal-id"]?void 0:Yy(a.parent)),a.projection.setOptions({layoutId:c,layout:d,alwaysMeasureLayout:!!f||m&&Di(m),visualElement:a,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,crossfade:x,layoutScroll:y,layoutRoot:p,layoutAnchor:v})}function Yy(a){if(a)return a.options.allowProjection!==!1?a.projection:Yy(a.parent)}function Lc(a,{forwardMotionProps:i=!1,type:l}={},o,c){o&&L6(o);const d=l?l==="svg":Jf(a),f=d?I6:W6;function m(p,v){let x;const S={...O.useContext(ky),...p,layoutId:i7(p)},{isStatic:j}=S,E=Y6(p),z=f(p,j);if(!j&&typeof window<"u"){s7();const k=l7(S);x=k.MeasureLayout,E.visualElement=n7(a,z,S,c,k.ProjectionNode,d)}return g.jsxs(er.Provider,{value:E,children:[x&&E.visualElement?g.jsx(x,{visualElement:E.visualElement,...S}):null,F6(a,p,e7(z,E.visualElement,v),z,j,i,d)]})}m.displayName=`motion.${typeof a=="string"?a:`create(${a.displayName??a.name??""})`}`;const y=O.forwardRef(m);return y[t7]=a,y}function i7({layoutId:a}){const i=O.useContext(rg).id;return i&&a!==void 0?i+"-"+a:a}function s7(a,i){O.useContext(_y).strict}function l7(a){const i=By(),{drag:l,layout:o}=i;if(!l&&!o)return{};const c={...l,...o};return{MeasureLayout:l?.isEnabled(a)||o?.isEnabled(a)?c.MeasureLayout:void 0,ProjectionNode:c.ProjectionNode}}function o7(a,i){if(typeof Proxy>"u")return Lc;const l=new Map,o=(d,f)=>Lc(d,f,a,i),c=(d,f)=>o(d,f);return new Proxy(c,{get:(d,f)=>f==="create"?o:(l.has(f)||l.set(f,Lc(f,void 0,a,i)),l.get(f))})}const r7=(a,i)=>i.isSVG??Jf(a)?new Y8(i):new B8(i,{allowProjection:a!==O.Fragment});class u7 extends va{constructor(i){super(i),i.animationState||(i.animationState=J8(i))}updateAnimationControlsSubscription(){const{animate:i}=this.node.getProps();Io(i)&&(this.unmountControls=i.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:i}=this.node.getProps(),{animate:l}=this.node.prevProps||{};i!==l&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let c7=0;class f7 extends va{constructor(){super(...arguments),this.id=c7++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:i,onExitComplete:l}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||i===o)return;if(i&&o===!1){if(this.isExitComplete){const{initial:d,custom:f}=this.node.getProps();if(typeof d=="string"){const m=Ya(this.node,d,f);if(m){const{transition:y,transitionEnd:p,...v}=m;for(const x in v)this.node.getValue(x)?.jump(v[x])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const c=this.node.animationState.setActive("exit",!i);l&&!i&&c.then(()=>{this.isExitComplete=!0,l(this.id)})}mount(){const{register:i,onExitComplete:l}=this.node.presenceContext||{};l&&l(this.id),i&&(this.unmount=i(this.id))}unmount(){}}const d7={animation:{Feature:u7},exit:{Feature:f7}};function al(a){return{point:{x:a.pageX,y:a.pageY}}}const h7=a=>i=>Gf(i)&&a(i,al(i));function Gs(a,i,l,o){return Ps(a,i,h7(l),o)}const Xy=({current:a})=>a?a.ownerDocument.defaultView:null,Tp=(a,i)=>Math.abs(a-i);function m7(a,i){const l=Tp(a.x,i.x),o=Tp(a.y,i.y);return Math.sqrt(l**2+o**2)}const wp=new Set(["auto","scroll"]);class Zy{constructor(i,l,{transformPagePoint:o,contextWindow:c=window,dragSnapToOrigin:d=!1,distanceThreshold:f=3,element:m}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=j=>{this.handleScroll(j.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=jo(this.lastRawMoveEventInfo,this.transformPagePoint));const j=Uc(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,z=m7(j.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!z)return;const{point:k}=j,{timestamp:L}=de;this.history.push({...k,timestamp:L});const{onStart:Q,onMove:X}=this.handlers;E||(Q&&Q(this.lastMoveEvent,j),this.startEvent=this.lastMoveEvent),X&&X(this.lastMoveEvent,j)},this.handlePointerMove=(j,E)=>{this.lastMoveEvent=j,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=jo(E,this.transformPagePoint),Lt.update(this.updatePoint,!0)},this.handlePointerUp=(j,E)=>{this.end();const{onEnd:z,onSessionEnd:k,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const Q=Uc(j.type==="pointercancel"?this.lastMoveEventInfo:jo(E,this.transformPagePoint),this.history);this.startEvent&&z&&z(j,Q),k&&k(j,Q)},!Gf(i))return;this.dragSnapToOrigin=d,this.handlers=l,this.transformPagePoint=o,this.distanceThreshold=f,this.contextWindow=c||window;const y=al(i),p=jo(y,this.transformPagePoint),{point:v}=p,{timestamp:x}=de;this.history=[{...v,timestamp:x}];const{onSessionStart:S}=l;S&&S(i,Uc(p,this.history)),this.removeListeners=tl(Gs(this.contextWindow,"pointermove",this.handlePointerMove),Gs(this.contextWindow,"pointerup",this.handlePointerUp),Gs(this.contextWindow,"pointercancel",this.handlePointerUp)),m&&this.startScrollTracking(m)}startScrollTracking(i){let l=i.parentElement;for(;l;){const o=getComputedStyle(l);(wp.has(o.overflowX)||wp.has(o.overflowY))&&this.scrollPositions.set(l,{x:l.scrollLeft,y:l.scrollTop}),l=l.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(i){const l=this.scrollPositions.get(i);if(!l)return;const o=i===window,c=o?{x:window.scrollX,y:window.scrollY}:{x:i.scrollLeft,y:i.scrollTop},d={x:c.x-l.x,y:c.y-l.y};d.x===0&&d.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=d.x,this.lastMoveEventInfo.point.y+=d.y):this.history.length>0&&(this.history[0].x-=d.x,this.history[0].y-=d.y),this.scrollPositions.set(i,c),Lt.update(this.updatePoint,!0))}updateHandlers(i){this.handlers=i}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ga(this.updatePoint)}}function jo(a,i){return i?{point:i(a.point)}:a}function Ap(a,i){return{x:a.x-i.x,y:a.y-i.y}}function Uc({point:a},i){return{point:a,delta:Ap(a,Qy(i)),offset:Ap(a,p7(i)),velocity:g7(i,.1)}}function p7(a){return a[0]}function Qy(a){return a[a.length-1]}function g7(a,i){if(a.length<2)return{x:0,y:0};let l=a.length-1,o=null;const c=Qy(a);for(;l>=0&&(o=a[l],!(c.timestamp-o.timestamp>_e(i)));)l--;if(!o)return{x:0,y:0};o===a[0]&&a.length>2&&c.timestamp-o.timestamp>_e(i)*2&&(o=a[1]);const d=Fe(c.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const f={x:(c.x-o.x)/d,y:(c.y-o.y)/d};return f.x===1/0&&(f.x=0),f.y===1/0&&(f.y=0),f}function y7(a,{min:i,max:l},o){return i!==void 0&&a<i?a=o?Gt(i,a,o.min):Math.max(a,i):l!==void 0&&a>l&&(a=o?Gt(l,a,o.max):Math.min(a,l)),a}function Ep(a,i,l){return{min:i!==void 0?a.min+i:void 0,max:l!==void 0?a.max+l-(a.max-a.min):void 0}}function v7(a,{top:i,left:l,bottom:o,right:c}){return{x:Ep(a.x,l,c),y:Ep(a.y,i,o)}}function jp(a,i){let l=i.min-a.min,o=i.max-a.max;return i.max-i.min<a.max-a.min&&([l,o]=[o,l]),{min:l,max:o}}function b7(a,i){return{x:jp(a.x,i.x),y:jp(a.y,i.y)}}function x7(a,i){let l=.5;const o=ye(a),c=ye(i);return c>o?l=Ks(i.min,i.max-o,a.min):o>c&&(l=Ks(a.min,a.max-c,i.min)),vn(0,1,l)}function S7(a,i){const l={};return i.min!==void 0&&(l.min=i.min-a.min),i.max!==void 0&&(l.max=i.max-a.min),l}const gf=.35;function T7(a=gf){return a===!1?a=0:a===!0&&(a=gf),{x:Cp(a,"left","right"),y:Cp(a,"top","bottom")}}function Cp(a,i,l){return{min:Mp(a,i),max:Mp(a,l)}}function Mp(a,i){return typeof a=="number"?a:a[i]||0}const w7=new WeakMap;class A7{constructor(i){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ae(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=i}start(i,{snapToCursor:l=!1,distanceThreshold:o}={}){const{presenceContext:c}=this.visualElement;if(c&&c.isPresent===!1)return;const d=x=>{l&&this.snapToCursor(al(x).point),this.stopAnimation()},f=(x,S)=>{const{drag:j,dragPropagation:E,onDragStart:z}=this.getProps();if(j&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=n8(j),!this.openDragLock))return;this.latestPointerEvent=x,this.latestPanInfo=S,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mn(L=>{let Q=this.getAxisMotionValue(L).get()||0;if(yn.test(Q)){const{projection:X}=this.visualElement;if(X&&X.layout){const Z=X.layout.layoutBox[L];Z&&(Q=ye(Z)*(parseFloat(Q)/100))}}this.originPoint[L]=Q}),z&&Lt.update(()=>z(x,S),!1,!0),of(this.visualElement,"transform");const{animationState:k}=this.visualElement;k&&k.setActive("whileDrag",!0)},m=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S;const{dragPropagation:j,dragDirectionLock:E,onDirectionLock:z,onDrag:k}=this.getProps();if(!j&&!this.openDragLock)return;const{offset:L}=S;if(E&&this.currentDirection===null){this.currentDirection=j7(L),this.currentDirection!==null&&z&&z(this.currentDirection);return}this.updateAxis("x",S.point,L),this.updateAxis("y",S.point,L),this.visualElement.render(),k&&Lt.update(()=>k(x,S),!1,!0)},y=(x,S)=>{this.latestPointerEvent=x,this.latestPanInfo=S,this.stop(x,S),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:x}=this.getProps();(x||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:v}=this.getProps();this.panSession=new Zy(i,{onSessionStart:d,onStart:f,onMove:m,onSessionEnd:y,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:v,distanceThreshold:o,contextWindow:Xy(this.visualElement),element:this.visualElement.current})}stop(i,l){const o=i||this.latestPointerEvent,c=l||this.latestPanInfo,d=this.isDragging;if(this.cancel(),!d||!c||!o)return;const{velocity:f}=c;this.startAnimation(f);const{onDragEnd:m}=this.getProps();m&&Lt.postRender(()=>m(o,c))}cancel(){this.isDragging=!1;const{projection:i,animationState:l}=this.visualElement;i&&(i.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),l&&l.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(i,l,o){const{drag:c}=this.getProps();if(!o||!Co(i,c,this.currentDirection))return;const d=this.getAxisMotionValue(i);let f=this.originPoint[i]+o[i];this.constraints&&this.constraints[i]&&(f=y7(f,this.constraints[i],this.elastic[i])),d.set(f)}resolveConstraints(){const{dragConstraints:i,dragElastic:l}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,c=this.constraints;i&&Di(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&o?this.constraints=v7(o.layoutBox,i):this.constraints=!1,this.elastic=T7(l),c!==this.constraints&&!Di(i)&&o&&this.constraints&&!this.hasMutatedConstraints&&mn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=S7(o.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:i,onMeasureDragConstraints:l}=this.getProps();if(!i||!Di(i))return!1;const o=i.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const d=D8(o,c.root,this.visualElement.getTransformPagePoint());let f=b7(c.layout.layoutBox,d);if(l){const m=l(M8(f));this.hasMutatedConstraints=!!m,m&&(f=hy(m))}return f}startAnimation(i){const{drag:l,dragMomentum:o,dragElastic:c,dragTransition:d,dragSnapToOrigin:f,onDragTransitionEnd:m}=this.getProps(),y=this.constraints||{},p=mn(v=>{if(!Co(v,l,this.currentDirection))return;let x=y&&y[v]||{};(f===!0||f===v)&&(x={min:0,max:0});const S=c?200:1e6,j=c?40:1e7,E={type:"inertia",velocity:o?i[v]:0,bounceStiffness:S,bounceDamping:j,timeConstant:750,restDelta:1,restSpeed:10,...d,...x};return this.startAxisValueAnimation(v,E)});return Promise.all(p).then(m)}startAxisValueAnimation(i,l){const o=this.getAxisMotionValue(i);return of(this.visualElement,i),o.start(_f(i,o,0,l,this.visualElement,!1))}stopAnimation(){mn(i=>this.getAxisMotionValue(i).stop())}getAxisMotionValue(i){const l=`_drag${i.toUpperCase()}`,o=this.visualElement.getProps(),c=o[l];return c||this.visualElement.getValue(i,(o.initial?o.initial[i]:void 0)||0)}snapToCursor(i){mn(l=>{const{drag:o}=this.getProps();if(!Co(l,o,this.currentDirection))return;const{projection:c}=this.visualElement,d=this.getAxisMotionValue(l);if(c&&c.layout){const{min:f,max:m}=c.layout.layoutBox[l],y=d.get()||0;d.set(i[l]-Gt(f,m,.5)+y)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:i,dragConstraints:l}=this.getProps(),{projection:o}=this.visualElement;if(!Di(l)||!o||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};mn(f=>{const m=this.getAxisMotionValue(f);if(m&&this.constraints!==!1){const y=m.get();c[f]=x7({min:y,max:y},this.constraints[f])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),mn(f=>{if(!Co(f,i,null))return;const m=this.getAxisMotionValue(f),{min:y,max:p}=this.constraints[f];m.set(Gt(y,p,c[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;w7.set(this.visualElement,this);const i=this.visualElement.current,l=Gs(i,"pointerdown",p=>{const{drag:v,dragListener:x=!0}=this.getProps(),S=p.target,j=S!==i&&r8(S);v&&x&&!j&&this.start(p)});let o;const c=()=>{const{dragConstraints:p}=this.getProps();Di(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),o||(o=E7(i,p.current,()=>this.scalePositionWithinConstraints())))},{projection:d}=this.visualElement,f=d.addEventListener("measure",c);d&&!d.layout&&(d.root&&d.root.updateScroll(),d.updateLayout()),Lt.read(c);const m=Ps(window,"resize",()=>this.scalePositionWithinConstraints()),y=d.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:v})=>{this.isDragging&&v&&(mn(x=>{const S=this.getAxisMotionValue(x);S&&(this.originPoint[x]+=p[x].translate,S.set(S.get()+p[x].translate))}),this.visualElement.render())}));return()=>{m(),l(),f(),y&&y(),o&&o()}}getProps(){const i=this.visualElement.getProps(),{drag:l=!1,dragDirectionLock:o=!1,dragPropagation:c=!1,dragConstraints:d=!1,dragElastic:f=gf,dragMomentum:m=!0}=i;return{...i,drag:l,dragDirectionLock:o,dragPropagation:c,dragConstraints:d,dragElastic:f,dragMomentum:m}}}function zp(a){let i=!0;return()=>{if(i){i=!1;return}a()}}function E7(a,i,l){const o=L1(a,zp(l)),c=L1(i,zp(l));return()=>{o(),c()}}function Co(a,i,l){return(i===!0||i===a)&&(l===null||l===a)}function j7(a,i=10){let l=null;return Math.abs(a.y)>i?l="y":Math.abs(a.x)>i&&(l="x"),l}class C7 extends va{constructor(i){super(i),this.removeGroupControls=Pe,this.removeListeners=Pe,this.controls=new A7(i)}mount(){const{dragControls:i}=this.node.getProps();i&&(this.removeGroupControls=i.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pe}update(){const{dragControls:i}=this.node.getProps(),{dragControls:l}=this.node.prevProps||{};i!==l&&(this.removeGroupControls(),i&&(this.removeGroupControls=i.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Hc=a=>(i,l)=>{a&&Lt.update(()=>a(i,l),!1,!0)};class M7 extends va{constructor(){super(...arguments),this.removePointerDownListener=Pe}onPointerDown(i){this.session=new Zy(i,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xy(this.node)})}createPanHandlers(){const{onPanSessionStart:i,onPanStart:l,onPan:o,onPanEnd:c}=this.node.getProps();return{onSessionStart:Hc(i),onStart:Hc(l),onMove:Hc(o),onEnd:(d,f)=>{delete this.session,c&&Lt.postRender(()=>c(d,f))}}}mount(){this.removePointerDownListener=Gs(this.node.current,"pointerdown",i=>this.onPointerDown(i))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Gc=!1;class z7 extends O.Component{componentDidMount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o,layoutId:c}=this.props,{projection:d}=i;d&&(l.group&&l.group.add(d),o&&o.register&&c&&o.register(d),Gc&&d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Bo.hasEverUpdated=!0}getSnapshotBeforeUpdate(i){const{layoutDependency:l,visualElement:o,drag:c,isPresent:d}=this.props,{projection:f}=o;return f&&(f.isPresent=d,i.layoutDependency!==l&&f.setOptions({...f.options,layoutDependency:l}),Gc=!0,c||i.layoutDependency!==l||l===void 0||i.isPresent!==d?f.willUpdate():this.safeToRemove(),i.isPresent!==d&&(d?f.promote():f.relegate()||Lt.postRender(()=>{const m=f.getStack();(!m||!m.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:i,layoutAnchor:l}=this.props,{projection:o}=i;o&&(o.options.layoutAnchor=l,o.root.didUpdate(),Hf.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:i,layoutGroup:l,switchLayoutGroup:o}=this.props,{projection:c}=i;Gc=!0,c&&(c.scheduleCheckAfterUnmount(),l&&l.group&&l.group.remove(c),o&&o.deregister&&o.deregister(c))}safeToRemove(){const{safeToRemove:i}=this.props;i&&i()}render(){return null}}function Ky(a){const[i,l]=_6(),o=O.useContext(rg);return g.jsx(z7,{...a,layoutGroup:o,switchLayoutGroup:O.useContext(qy),isPresent:i,safeToRemove:l})}const N7={pan:{Feature:M7},drag:{Feature:C7,ProjectionNode:Oy,MeasureLayout:Ky}};function Np(a,i,l){const{props:o}=a;a.animationState&&o.whileHover&&a.animationState.setActive("whileHover",l==="Start");const c="onHover"+l,d=o[c];d&&Lt.postRender(()=>d(i,al(i)))}class D7 extends va{mount(){const{current:i}=this.node;i&&(this.unmount=i8(i,(l,o)=>(Np(this.node,o,"Start"),c=>Np(this.node,c,"End"))))}unmount(){}}class R7 extends va{constructor(){super(...arguments),this.isActive=!1}onFocus(){let i=!1;try{i=this.node.current.matches(":focus-visible")}catch{i=!0}!i||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=tl(Ps(this.node.current,"focus",()=>this.onFocus()),Ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Dp(a,i,l){const{props:o}=a;if(a.current instanceof HTMLButtonElement&&a.current.disabled)return;a.animationState&&o.whileTap&&a.animationState.setActive("whileTap",l==="Start");const c="onTap"+(l==="End"?"":l),d=o[c];d&&Lt.postRender(()=>d(i,al(i)))}class V7 extends va{mount(){const{current:i}=this.node;if(!i)return;const{globalTapTarget:l,propagate:o}=this.node.props;this.unmount=c8(i,(c,d)=>(Dp(this.node,d,"Start"),(f,{success:m})=>Dp(this.node,f,m?"End":"Cancel")),{useGlobalTarget:l,stopPropagation:o?.tap===!1})}unmount(){}}const yf=new WeakMap,qc=new WeakMap,O7=a=>{const i=yf.get(a.target);i&&i(a)},k7=a=>{a.forEach(O7)};function _7({root:a,...i}){const l=a||document;qc.has(l)||qc.set(l,{});const o=qc.get(l),c=JSON.stringify(i);return o[c]||(o[c]=new IntersectionObserver(k7,{root:a,...i})),o[c]}function B7(a,i,l){const o=_7(i);return yf.set(a,l),o.observe(a),()=>{yf.delete(a),o.unobserve(a)}}const L7={some:0,all:1};class U7 extends va{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:i={}}=this.node.getProps(),{root:l,margin:o,amount:c="some",once:d}=i,f={root:l?l.current:void 0,rootMargin:o,threshold:typeof c=="number"?c:L7[c]},m=y=>{const{isIntersecting:p}=y;if(this.isInView===p||(this.isInView=p,d&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),S=p?v:x;S&&S(y)};this.stopObserver=B7(this.node.current,f,m)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:i,prevProps:l}=this.node;["amount","margin","root"].some(H7(i,l))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function H7({viewport:a={}},{viewport:i={}}={}){return l=>a[l]!==i[l]}const G7={inView:{Feature:U7},tap:{Feature:V7},focus:{Feature:R7},hover:{Feature:D7}},q7={layout:{ProjectionNode:Oy,MeasureLayout:Ky}},Y7={...d7,...G7,...N7,...q7},Yc=o7(Y7,r7),Be=({label:a,children:i,variant:l="primary",size:o="medium",icon:c,onClick:d,removable:f=!1,className:m,maxWidth:y,appearance:p,onRemove:v,isLoading:x=!1})=>{const S=X7(l),j=p??(l==="outline"?"outline":"solid"),E=a??i,z=!!d,k={primary:{solid:"bg-[#11111198] text-white border border-transparent",outline:"border-2 border-[#11111198] text-[#11111198]",subtle:"bg-[#11111140] text-[#11111198] border border-transparent"},secondary:{solid:"bg-zinc-700 text-white border border-transparent",outline:"border-2 border-zinc-400 text-zinc-800 bg-white",subtle:"bg-zinc-100 text-zinc-800 border border-zinc-300"},success:{solid:"bg-emerald-600 text-white border border-transparent",outline:"border-2 border-emerald-600 text-emerald-700",subtle:"bg-emerald-100 text-emerald-700 border border-transparent"},warning:{solid:"bg-amber-500 text-white border border-transparent",outline:"border-2 border-amber-500 text-amber-700",subtle:"bg-amber-100 text-amber-700 border border-transparent"},error:{solid:"bg-destructive text-destructive-foreground border border-transparent",outline:"border-2 border-destructive text-destructive",subtle:"bg-destructive/20 text-destructive border border-transparent"}},L={small:"text-xs px-2 py-1",medium:"text-xs px-2.5 py-1",large:"text-sm px-3 py-1.5"},Q=Z=>{Z.stopPropagation(),d?.()},X=Z=>{Z.stopPropagation(),v?.()};return g.jsxs(Yc.div,{initial:{opacity:0,scale:.95,y:8,filter:"blur(8px)"},animate:{opacity:1,scale:1,y:0,filter:"blur(0px)"},transition:{duration:.32,ease:"easeInOut",type:"spring"},whileHover:{scale:z?1.04:1,backgroundColor:z&&S==="primary"?"#111111d1":void 0,transition:{duration:.2,ease:"easeInOut",type:"spring"}},onClick:Q,style:{maxWidth:y},className:bt("inline-flex max-w-full items-center gap-1.5 rounded-lg font-medium shadow-[0_0_16px_rgba(0,0,0,0.14)] backdrop-blur-sm",k[S][j],L[o],z&&"cursor-pointer",m),children:[x?g.jsx(Yc.div,{animate:{rotate:360},transition:{duration:1,ease:"linear",repeat:1/0},className:"flex-shrink-0",children:g.jsx(Yp,{className:"size-3.5"})}):c&&g.jsx("span",{className:"flex-shrink-0",children:c}),g.jsx("span",{className:"min-w-0 truncate",children:E}),f&&g.jsx(Yc.button,{initial:{opacity:0,scale:.95,filter:"blur(8px)"},animate:{opacity:1,scale:1,filter:"blur(0px)"},whileHover:{scale:1.1,opacity:1,transition:{duration:.2,ease:"easeInOut",type:"spring"}},className:"flex items-center justify-center rounded-md bg-[#11111198] p-1 opacity-70 hover:opacity-100",onClick:X,type:"button",children:g.jsx($o,{className:"size-3.5"})})]})};function X7(a){return a==="danger"?"error":a==="default"||a==="outline"?"primary":a}const Z7=Kp("rounded-lg border p-4 text-sm",{variants:{variant:{default:"border-border bg-card text-card-foreground",muted:"border-border bg-muted text-muted-foreground",destructive:"border-red-200 bg-red-50 text-red-700"}},defaultVariants:{variant:"default"}});function rn({className:a,variant:i,...l}){return g.jsx("div",{className:bt(Z7({variant:i,className:a})),...l})}function qs({className:a,...i}){return g.jsx("div",{className:bt("rounded-lg border border-border bg-card text-card-foreground",a),...i})}function Ys({className:a,...i}){return g.jsx("div",{className:bt("grid gap-1.5 p-4",a),...i})}function Xs({className:a,...i}){return g.jsx("h3",{className:bt("text-sm font-semibold tracking-tight",a),...i})}function Lo({className:a,...i}){return g.jsx("p",{className:bt("text-sm text-muted-foreground",a),...i})}function Zs({className:a,...i}){return g.jsx("div",{className:bt("p-4 pt-0",a),...i})}const Q7=[{animationDelay:"-1.2s",transform:"rotate(.0001deg) translate(146%)"},{animationDelay:"-1.1s",transform:"rotate(30deg) translate(146%)"},{animationDelay:"-1.0s",transform:"rotate(60deg) translate(146%)"},{animationDelay:"-0.9s",transform:"rotate(90deg) translate(146%)"},{animationDelay:"-0.8s",transform:"rotate(120deg) translate(146%)"},{animationDelay:"-0.7s",transform:"rotate(150deg) translate(146%)"},{animationDelay:"-0.6s",transform:"rotate(180deg) translate(146%)"},{animationDelay:"-0.5s",transform:"rotate(210deg) translate(146%)"},{animationDelay:"-0.4s",transform:"rotate(240deg) translate(146%)"},{animationDelay:"-0.3s",transform:"rotate(270deg) translate(146%)"},{animationDelay:"-0.2s",transform:"rotate(300deg) translate(146%)"},{animationDelay:"-0.1s",transform:"rotate(330deg) translate(146%)"}],K7=({size:a=20,color:i="#8f8f8f"})=>g.jsx("div",{style:{width:a,height:a},children:g.jsx("div",{className:"relative left-1/2 top-1/2",style:{width:a,height:a},children:Q7.map(l=>g.jsx("div",{className:"absolute -left-[10%] -top-[3.9%] h-[8%] w-[24%] animate-fade-spin rounded-[5px]",style:{backgroundColor:i,...l}},l.transform))})}),J7=[{tiny:"px-1.5 h-6 text-sm",small:"px-1.5 h-8 text-sm",medium:"px-2.5 h-10 text-sm",large:"px-3.5 h-12 text-base"},{tiny:"w-6 h-6 text-sm",small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-sm",large:"w-12 h-12 text-base"}],F7={primary:"bg-gray-1000 hover:bg-gray-1000-h text-background-100 fill-background-100",secondary:"bg-background-100 hover:bg-gray-alpha-200 text-gray-1000 fill-gray-1000 border border-gray-alpha-400",tertiary:"bg-none hover:bg-gray-alpha-200 text-gray-1000 fill-gray-1000",error:"bg-red-800 hover:bg-red-900 text-white fill-white",warning:"bg-amber-800 hover:bg-amber-850 text-black fill-black"},P7={square:{tiny:"rounded",small:"rounded-md",medium:"rounded-md",large:"rounded-lg"},circle:{tiny:"rounded-[100%]",small:"rounded-[100%]",medium:"rounded-[100%]",large:"rounded-[100%]"},rounded:{tiny:"rounded-[100px]",small:"rounded-[100px]",medium:"rounded-[100px]",large:"rounded-[100px]"}},Mo=({size:a="medium",type:i="primary",variant:l="styled",shape:o="square",svgOnly:c=!1,children:d,prefix:f,suffix:m,shadow:y=!1,loading:p=!1,disabled:v=!1,fullWidth:x=!1,className:S,...j})=>g.jsxs("button",{disabled:v,tabIndex:0,className:Qs("flex items-center justify-center gap-0.5 duration-150",J7[+c][a],v||p?"cursor-not-allowed border border-gray-400 bg-gray-100 text-gray-700":F7[i],P7[o][a],y&&"shadow-border-small border-none",x&&"w-full",l==="unstyled"?"h-fit bg-transparent px-0 text-gray-1000 outline-none hover:bg-transparent":"focus:shadow-focus-ring focus:outline-0",S),type:"button",...j,children:[p?g.jsx(K7,{size:a==="large"?24:16}):f,g.jsx("span",{className:Qs("relative overflow-hidden overflow-ellipsis whitespace-nowrap font-sans",a!=="tiny"&&l!=="unstyled"&&"px-1.5"),children:d}),!p&&m]}),$7=({className:a})=>g.jsx("svg",{height:"16",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"16",className:a,children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z"})}),W7=()=>g.jsx("svg",{height:"16",strokeLinejoin:"round",viewBox:"0 0 16 16",width:"16",className:"fill-gray-1000",children:g.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z"})});let Xc=null,I7=0;const te={toasts:[],listeners:new Set,add(a,i,l,o,c,d){const f=I7++,m={id:f,text:a,preserve:l,action:o,onAction:c,onUndoAction:d,type:i};if(!m.preserve){m.remaining=3e3,m.start=Date.now();const y=()=>{this.toasts=this.toasts.filter(p=>p.id!==f),this.notify()};m.timeout=setTimeout(y,m.remaining),m.pause=()=>{m.timeout&&(clearTimeout(m.timeout),m.timeout=void 0,m.remaining-=Date.now()-m.start)},m.resume=()=>{m.timeout||(m.start=Date.now(),m.timeout=setTimeout(y,m.remaining))}}this.toasts.push(m),this.notify()},remove(a){te.toasts=te.toasts.filter(i=>i.id!==a),te.notify()},subscribe(a){return te.listeners.add(a),()=>{te.listeners.delete(a)}},notify(){te.listeners.forEach(a=>a())}},tS=()=>{const[a,i]=O.useState([]),[l,o]=O.useState([]),[c,d]=O.useState(!1),f=E=>z=>{z&&E.measuredHeight==null&&(E.measuredHeight=z.getBoundingClientRect().height,te.notify())};O.useEffect(()=>(i([...te.toasts]),te.subscribe(()=>{i([...te.toasts])})),[]),O.useEffect(()=>{const E=a.filter(z=>!l.includes(z.id)).map(z=>z.id);E.length>0&&requestAnimationFrame(()=>{o(z=>[...z,...E])})},[l,a]);const y=Math.max(0,a.length-3),p=(E,z)=>{if(E===z-1)return"none";const k=z-1-E;let L=a[z-1]?.measuredHeight||63;for(let Z=z-1;Z>E;Z--)c?L+=(a[Z-1]?.measuredHeight||63)+10:L+=20;const Q=-k,X=c?1:1-.05*k;return`translate3d(0, calc(100% - ${L}px), ${Q}px) scale(${X})`},v=()=>{d(!0),te.toasts.forEach(E=>E.pause?.())},x=()=>{d(!1),te.toasts.forEach(E=>E.resume?.())},j=a.slice(y).reduce((E,z)=>E+(z.measuredHeight??63),0);return g.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[9999] w-[min(420px,calc(100vw-2rem))]",style:{height:j},children:g.jsx("div",{className:"pointer-events-auto relative w-full",style:{height:j},onMouseEnter:v,onMouseLeave:x,children:a.map((E,z)=>{const k=z>=y;return g.jsx("div",{ref:f(E),className:Qs("absolute bottom-0 right-0 h-fit rounded-xl p-4 leading-[21px] shadow-menu",{message:"bg-geist-background text-gray-1000",success:"bg-blue-700 text-contrast-fg",warning:"bg-amber-800 text-gray-1000 dark:text-gray-100",error:"bg-red-800 text-contrast-fg"}[E.type],k?"opacity-100":"opacity-0",z<y&&"pointer-events-none"),style:{width:"100%",transition:"all .35s cubic-bezier(.25,.75,.6,.98)",transform:l.includes(E.id)?p(z,a.length):"translate3d(0, 100%, 150px) scale(1)"},children:g.jsxs("div",{className:"flex flex-col items-center justify-between text-[.875rem]",children:[g.jsxs("div",{className:"flex h-full w-full items-center justify-between gap-4",children:[g.jsx("span",{children:E.text}),!E.action&&g.jsxs("div",{className:"flex gap-1",children:[E.onUndoAction&&g.jsx(Mo,{type:"tertiary",svgOnly:!0,size:"small",onClick:()=>{E.onUndoAction?.(),te.remove(E.id)},children:g.jsx(W7,{})}),g.jsx(Mo,{type:"tertiary",svgOnly:!0,size:"small",onClick:()=>te.remove(E.id),children:g.jsx($7,{className:{message:"fill-gray-1000",success:"fill-contrast-fg",warning:"fill-gray-1000 dark:fill-gray-100",error:"fill-contrast-fg"}[E.type]})})]})]}),E.action&&g.jsxs("div",{className:"flex w-full items-center justify-end gap-2",children:[g.jsx(Mo,{type:"tertiary",size:"small",onClick:()=>te.remove(E.id),children:"Dismiss"}),g.jsx(Mo,{type:"primary",size:"small",onClick:()=>{E.onAction?.(),te.remove(E.id)},children:E.action})]})]})},E.id)})})})},zo=()=>{if(Xc)return;const a=document.createElement("div");a.className="fixed bottom-4 right-4 z-[9999]",document.body.appendChild(a),Xc=Gp.createRoot(a),Xc.render(g.jsx(tS,{}))},Za=()=>({message:O.useCallback(({text:a,preserve:i,action:l,onAction:o,onUndoAction:c})=>{zo(),te.add(a,"message",i,l,o,c)},[]),success:O.useCallback(a=>{zo(),te.add(a,"success")},[]),warning:O.useCallback(a=>{zo(),te.add(a,"warning")},[]),error:O.useCallback(a=>{zo(),te.add(a,"error")},[])});function Jy({label:a}){return g.jsx(rn,{variant:"muted",className:"m-4 text-center",children:a})}function gn({className:a,type:i,...l}){return g.jsx("input",{type:i,className:bt("flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",a),...l})}function Rp({onChange:a,value:i}){return g.jsxs("label",{className:"relative block",children:[g.jsx(G3,{className:"pointer-events-none absolute left-2 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),g.jsx(gn,{"aria-label":"Search logs",className:"h-8 w-44 pl-7 text-xs",onChange:l=>a(l.target.value),placeholder:"Search logs",value:i})]})}function Vp({className:a,containerRef:i,emptyText:l,logs:o,query:c}){return g.jsx("div",{className:bt("h-full max-w-full overflow-auto font-mono text-[11px] leading-5",a),ref:i,role:"log",children:o.length?o.map((d,f)=>g.jsxs("div",{className:bt("grid min-w-max grid-cols-[168px_minmax(420px,1fr)] gap-2 border-b border-border/45 px-3 py-0.5",d.stream==="stderr"?"bg-red-50/70 text-red-800":"bg-emerald-50/35 text-zinc-800"),children:[g.jsx("span",{className:"text-muted-foreground",children:d.timestamp}),g.jsxs("span",{className:"whitespace-pre-wrap break-words",children:[d.stream==="stderr"?g.jsx("span",{className:"mr-2 rounded bg-red-100 px-1 font-semibold uppercase text-red-700",children:"stderr"}):null,nS(d.text,c)]})]},`${d.timestamp}-${d.stream}-${f}`)):g.jsx("div",{className:"p-3 text-muted-foreground",children:l})})}function eS(a){return`${a.timestamp} ${a.stream} ${a.text}`}function nS(a,i){const l=i.trim();if(!l)return a;const o=a.toLowerCase(),c=l.toLowerCase(),d=[];let f=0,m=o.indexOf(c);for(;m!==-1;){m>f&&d.push(a.slice(f,m));const y=m+l.length;d.push(g.jsx("mark",{className:"rounded bg-amber-200 px-0.5 text-amber-950",children:a.slice(m,y)},`${m}-${y}`)),f=y,m=o.indexOf(c,f)}return f<a.length&&d.push(a.slice(f)),d}function aS({ports:a}){const i=a.filter(o=>o.state==="occupied").length,l=a.filter(o=>o.state==="managed").length;return g.jsxs(qs,{className:"rounded-none border-0 border-b border-border bg-transparent",children:[g.jsxs(Ys,{className:"border-b border-border px-3 py-2",children:[g.jsxs(Xs,{className:"flex items-center gap-2",children:[g.jsx(x3,{className:"size-3.5"}),"Ports"]}),g.jsxs(Lo,{className:"text-xs",children:[l," managed, ",i," occupied by other"]})]}),g.jsx(Zs,{className:"p-0",children:a.length?g.jsx("div",{className:"divide-y divide-border",children:a.map(o=>g.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center gap-2 px-3 py-2",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"font-mono text-xs",children:[":",o.port]}),g.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:o.services.join(", ")||"Unassigned"}),o.urls[0]?g.jsx("div",{className:"truncate font-mono text-[10px] text-muted-foreground",children:o.urls[0]}):null]}),g.jsx(Fy,{port:o})]},o.port))}):g.jsx(Jy,{label:"No configured ports yet."})})]})}function Fy({compact:a,port:i}){const l=i.state==="managed"?"managed":i.state==="occupied"?"occupied by other":"available",o=i.state==="managed"?"success":i.state==="occupied"?"warning":"outline";return g.jsx(Be,{className:bt(a&&"max-w-36 truncate"),variant:o,children:l})}var Py=Hp();function Ri({className:a,...i}){return g.jsx("label",{className:bt("grid gap-1.5 text-xs font-medium text-muted-foreground",a),...i})}const $e='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>',We='</title><path d="',Ie='"/></svg>',iS={title:".NET",slug:"dotnet",get svg(){return $e+".NET"+We+this.path+Ie},path:"M24 8.77h-2.468v7.565h-1.425V8.77h-2.462V7.53H24zm-6.852 7.565h-4.821V7.53h4.63v1.24h-3.205v2.494h2.953v1.234h-2.953v2.604h3.396zm-6.708 0H8.882L4.78 9.863a2.896 2.896 0 0 1-.258-.51h-.036c.032.189.048.592.048 1.21v5.772H3.157V7.53h1.659l3.965 6.32c.167.261.275.442.323.54h.024c-.04-.233-.06-.629-.06-1.185V7.529h1.372zm-8.703-.693a.868.829 0 0 1-.869.829.868.829 0 0 1-.868-.83.868.829 0 0 1 .868-.828.868.829 0 0 1 .869.829Z",source:"https://github.com/dotnet/brand/blob/c7d0f51b8ec59531332d05fb27a5b758a7a3d689/logo/dotnet-logo.svg",hex:"512BD4",guidelines:"https://github.com/dotnet/brand/blob/c7d0f51b8ec59531332d05fb27a5b758a7a3d689/dotnet-styleGuide-2024.pdf",license:{type:"CC0-1.0",url:"https://spdx.org/licenses/CC0-1.0"}},sS={title:"Bun",slug:"bun",get svg(){return $e+"Bun"+We+this.path+Ie},path:"M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z",source:"https://bun.sh/press-kit",hex:"000000"},lS={title:"Deno",slug:"deno",get svg(){return $e+"Deno"+We+this.path+Ie},path:"M1.105 18.02A11.9 11.9 0 0 1 0 12.985q0-.698.078-1.376a12 12 0 0 1 .231-1.34A12 12 0 0 1 4.025 4.02a12 12 0 0 1 5.46-2.771 12 12 0 0 1 3.428-.23c1.452.112 2.825.477 4.077 1.05a12 12 0 0 1 2.78 1.774 12.02 12.02 0 0 1 4.053 7.078A12 12 0 0 1 24 12.985q0 .454-.036.914a12 12 0 0 1-.728 3.305 12 12 0 0 1-2.38 3.875c-1.33 1.357-3.02 1.962-4.43 1.936a4.4 4.4 0 0 1-2.724-1.024c-.99-.853-1.391-1.83-1.53-2.919a5 5 0 0 1 .128-1.518c.105-.38.37-1.116.76-1.437-.455-.197-1.04-.624-1.226-.829-.045-.05-.04-.13 0-.183a.155.155 0 0 1 .177-.053c.392.134.869.267 1.372.35.66.111 1.484.25 2.317.292 2.03.1 4.153-.813 4.812-2.627s.403-3.609-1.96-4.685-3.454-2.356-5.363-3.128c-1.247-.505-2.636-.205-4.06.582-3.838 2.121-7.277 8.822-5.69 15.032a.191.191 0 0 1-.315.19 12 12 0 0 1-1.25-1.634 12 12 0 0 1-.769-1.404M11.57 6.087c.649-.051 1.214.501 1.31 1.236.13.979-.228 1.99-1.41 2.013-1.01.02-1.315-.997-1.248-1.614.066-.616.574-1.575 1.35-1.635",source:"https://github.com/denoland/docs/blob/5dee713844c7447f80acd4093caa9d350d80bf36/static/img/logo.svg",hex:"000000",guidelines:"https://deno.com/brand",license:{type:"MIT",url:"https://spdx.org/licenses/MIT"}},oS={title:"Docker",slug:"docker",get svg(){return $e+"Docker"+We+this.path+Ie},path:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.185.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.185.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.185.185 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.185.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.082.185.185.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z",source:"https://www.docker.com/company/newsroom/media-resources",hex:"2496ED"},rS={title:"Go",slug:"go",get svg(){return $e+"Go"+We+this.path+Ie},path:"M1.811 10.231c-.047 0-.058-.023-.035-.059l.246-.315c.023-.035.081-.058.128-.058h4.172c.046 0 .058.035.035.07l-.199.303c-.023.036-.082.07-.117.07zM.047 11.306c-.047 0-.059-.023-.035-.058l.245-.316c.023-.035.082-.058.129-.058h5.328c.047 0 .07.035.058.07l-.093.28c-.012.047-.058.07-.105.07zm2.828 1.075c-.047 0-.059-.035-.035-.07l.163-.292c.023-.035.07-.07.117-.07h2.337c.047 0 .07.035.07.082l-.023.28c0 .047-.047.082-.082.082zm12.129-2.36c-.736.187-1.239.327-1.963.514-.176.046-.187.058-.34-.117-.174-.199-.303-.327-.548-.444-.737-.362-1.45-.257-2.115.175-.795.514-1.204 1.274-1.192 2.22.011.935.654 1.706 1.577 1.835.795.105 1.46-.175 1.987-.77.105-.13.198-.27.315-.434H10.47c-.245 0-.304-.152-.222-.35.152-.362.432-.97.596-1.274a.315.315 0 01.292-.187h4.253c-.023.316-.023.631-.07.947a4.983 4.983 0 01-.958 2.29c-.841 1.11-1.94 1.8-3.33 1.986-1.145.152-2.209-.07-3.143-.77-.865-.655-1.356-1.52-1.484-2.595-.152-1.274.222-2.419.993-3.424.83-1.086 1.928-1.776 3.272-2.02 1.098-.2 2.15-.07 3.096.571.62.41 1.063.97 1.356 1.648.07.105.023.164-.117.2m3.868 6.461c-1.064-.024-2.034-.328-2.852-1.029a3.665 3.665 0 01-1.262-2.255c-.21-1.32.152-2.489.947-3.529.853-1.122 1.881-1.706 3.272-1.95 1.192-.21 2.314-.095 3.33.595.923.63 1.496 1.484 1.648 2.605.198 1.578-.257 2.863-1.344 3.962-.771.783-1.718 1.273-2.805 1.495-.315.06-.63.07-.934.106zm2.78-4.72c-.011-.153-.011-.27-.034-.387-.21-1.157-1.274-1.81-2.384-1.554-1.087.245-1.788.935-2.045 2.033-.21.912.234 1.835 1.075 2.21.643.28 1.285.244 1.905-.07.923-.48 1.425-1.228 1.484-2.233z",source:"https://blog.golang.org/go-brand",hex:"00ADD8",guidelines:"https://blog.golang.org/go-brand"},uS={title:"Node.js",slug:"nodedotjs",get svg(){return $e+"Node.js"+We+this.path+Ie},path:"M11.998,24c-0.321,0-0.641-0.084-0.922-0.247l-2.936-1.737c-0.438-0.245-0.224-0.332-0.08-0.383 c0.585-0.203,0.703-0.25,1.328-0.604c0.065-0.037,0.151-0.023,0.218,0.017l2.256,1.339c0.082,0.045,0.197,0.045,0.272,0l8.795-5.076 c0.082-0.047,0.134-0.141,0.134-0.238V6.921c0-0.099-0.053-0.192-0.137-0.242l-8.791-5.072c-0.081-0.047-0.189-0.047-0.271,0 L3.075,6.68C2.99,6.729,2.936,6.825,2.936,6.921v10.15c0,0.097,0.054,0.189,0.139,0.235l2.409,1.392 c1.307,0.654,2.108-0.116,2.108-0.89V7.787c0-0.142,0.114-0.253,0.256-0.253h1.115c0.139,0,0.255,0.112,0.255,0.253v10.021 c0,1.745-0.95,2.745-2.604,2.745c-0.508,0-0.909,0-2.026-0.551L2.28,18.675c-0.57-0.329-0.922-0.945-0.922-1.604V6.921 c0-0.659,0.353-1.275,0.922-1.603l8.795-5.082c0.557-0.315,1.296-0.315,1.848,0l8.794,5.082c0.57,0.329,0.924,0.944,0.924,1.603 v10.15c0,0.659-0.354,1.273-0.924,1.604l-8.794,5.078C12.643,23.916,12.324,24,11.998,24z M19.099,13.993 c0-1.9-1.284-2.406-3.987-2.763c-2.731-0.361-3.009-0.548-3.009-1.187c0-0.528,0.235-1.233,2.258-1.233 c1.807,0,2.473,0.389,2.747,1.607c0.024,0.115,0.129,0.199,0.247,0.199h1.141c0.071,0,0.138-0.031,0.186-0.081 c0.048-0.054,0.074-0.123,0.067-0.196c-0.177-2.098-1.571-3.076-4.388-3.076c-2.508,0-4.004,1.058-4.004,2.833 c0,1.925,1.488,2.457,3.895,2.695c2.88,0.282,3.103,0.703,3.103,1.269c0,0.983-0.789,1.402-2.642,1.402 c-2.327,0-2.839-0.584-3.011-1.742c-0.02-0.124-0.126-0.215-0.253-0.215h-1.137c-0.141,0-0.254,0.112-0.254,0.253 c0,1.482,0.806,3.248,4.655,3.248C17.501,17.007,19.099,15.91,19.099,13.993z",source:"https://nodejs.org/en/about/branding",hex:"5FA04E",guidelines:"https://nodejs.org/en/about/branding"},cS={title:"npm",slug:"npm",get svg(){return $e+"npm"+We+this.path+Ie},path:"M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z",source:"https://www.npmjs.com",hex:"CB3837",guidelines:"https://docs.npmjs.com/policies/logos-and-usage"},fS={title:"pnpm",slug:"pnpm",get svg(){return $e+"pnpm"+We+this.path+Ie},path:"M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM2 2h3.5v3.5H2zm8.25 0h3.498v3.5H10.25zm8.25 0H22v3.5h-3.5zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zm2 2H22v3.5h-3.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z",source:"https://pnpm.io/logos",hex:"F69220"},dS={title:"Python",slug:"python",get svg(){return $e+"Python"+We+this.path+Ie},path:"M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z",source:"https://www.python.org/community/logos/",hex:"3776AB",guidelines:"https://www.python.org/community/logos/"},Op={title:"Rust",slug:"rust",get svg(){return $e+"Rust"+We+this.path+Ie},path:"M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z",source:"https://www.rust-lang.org",hex:"000000",guidelines:"https://www.rust-lang.org/policies/media-guide",license:{type:"CC-BY-SA-4.0",url:"https://spdx.org/licenses/CC-BY-SA-4.0"}},hS={title:"Vite",slug:"vite",get svg(){return $e+"Vite"+We+this.path+Ie},path:"M13.056 23.238a.57.57 0 0 1-1.02-.355v-5.202c0-.63-.512-1.143-1.144-1.143H5.148a.57.57 0 0 1-.464-.903l3.777-5.29c.54-.753 0-1.804-.93-1.804H.57a.574.574 0 0 1-.543-.746.6.6 0 0 1 .08-.157L5.008.78a.57.57 0 0 1 .467-.24h14.589a.57.57 0 0 1 .466.903l-3.778 5.29c-.54.755 0 1.806.93 1.806h5.745c.238 0 .424.138.513.322a.56.56 0 0 1-.063.603z",source:"https://github.com/voidzero-dev/community-design-resources/blob/55902097229cf01cf2a4ceb376f992f5cf306756/brand-assets/vite/vite-icon-color-bracketless.svg",hex:"9135FF"},mS={title:"Yarn",slug:"yarn",get svg(){return $e+"Yarn"+We+this.path+Ie},path:"M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z",source:"https://github.com/yarnpkg/assets/blob/76d30ca2aebed5b73ea8131d972218fb860bd32d/yarn-kitten-circle.svg",hex:"2C8EBB",guidelines:"https://github.com/yarnpkg/assets/tree/76d30ca2aebed5b73ea8131d972218fb860bd32d",license:{type:"CC-BY-4.0",url:"https://spdx.org/licenses/CC-BY-4.0"}};function pS(a){const i=a.toLowerCase();return/\bvite\b/.test(i)?Ee.vite:/\bcargo\s+/.test(i)?Ee.cargo:/\brustc\b/.test(i)?Ee.rust:/\bdotnet\b/.test(i)?Ee.dotnet:/\bdocker(?:\s+compose|-compose|\s+)/.test(i)?Ee.docker:/\bpython3?\b|\buvicorn\b|\bfastapi\b/.test(i)?Ee.python:/\bgo\s+(run|test|build)\b|\bair\b/.test(i)?Ee.go:/\bbun\b/.test(i)?Ee.bun:/\bdeno\b/.test(i)?Ee.deno:/\bpnpm\b/.test(i)?Ee.pnpm:/\byarn\b/.test(i)?Ee.yarn:/\bnpm\b/.test(i)?Ee.npm:/\bnode\b/.test(i)?Ee.node:Ee.generic}const Ee={bun:{kind:"bun",label:"Bun"},cargo:{kind:"cargo",label:"Cargo"},deno:{kind:"deno",label:"Deno"},dotnet:{kind:"dotnet",label:".NET"},docker:{kind:"docker",label:"Docker"},generic:{kind:"generic",label:"Process"},go:{kind:"go",label:"Go"},node:{kind:"node",label:"Node"},npm:{kind:"npm",label:"npm"},pnpm:{kind:"pnpm",label:"pnpm"},python:{kind:"python",label:"Python"},rust:{kind:"rust",label:"Rust"},vite:{kind:"vite",label:"Vite"},yarn:{kind:"yarn",label:"Yarn"}};function Ff({command:a,compact:i}){const l=pS(a),o=gS[l.kind];return g.jsx("span",{"aria-label":`${l.label} process`,className:bt("inline-flex shrink-0 items-center justify-center rounded-md border bg-white shadow-sm",i?"size-6":"size-7",o?"border-zinc-200":"border-zinc-300 bg-zinc-100 text-zinc-700"),style:o?{color:`#${o.hex}`}:void 0,title:l.label,children:o?g.jsx("svg",{"aria-hidden":"true",className:i?"size-3.5":"size-4",fill:"currentColor",role:"img",viewBox:"0 0 24 24",children:g.jsx("path",{d:o.path})}):g.jsx(Zp,{className:i?"size-3.5":"size-4"})})}const gS={bun:sS,cargo:Op,deno:lS,dotnet:iS,docker:oS,generic:null,go:rS,node:uS,npm:cS,pnpm:fS,python:dS,rust:Op,vite:hS,yarn:mS};function $y({active:a,baseUrl:i,onRefresh:l,restartAction:o,targetLabel:c}){return a?g.jsxs(g.Fragment,{children:[g.jsx(Zc,{intent:"restart",icon:g.jsx(B3,{}),label:"Restart",action:o,targetLabel:c,url:`${i}/restart`,onRefresh:l}),g.jsx(Zc,{intent:"stop",icon:g.jsx(K3,{}),label:"Stop",targetLabel:c,url:`${i}/stop`,onRefresh:l})]}):g.jsx(Zc,{intent:"start",icon:g.jsx(R3,{}),label:"Start",targetLabel:c,url:`${i}/start`,onRefresh:l})}function $s(a,i,l){const o=l instanceof Error?l.message:String(l);return`${a} failed for ${i}: ${o}`}function Zc({action:a,intent:i="neutral",icon:l,label:o,targetLabel:c,url:d,onRefresh:f}){const[m,y]=O.useState(!1),{error:p,success:v}=Za();return g.jsxs(Mt,{className:yS[i],variant:"outline",size:"sm",disabled:m,onClick:async()=>{y(!0);try{a?await a():await ln(d,{}),v(`${o} requested for ${c}.`),await f()}catch(x){p($s(o,c,x))}finally{y(!1)}},children:[l,o]})}const yS={neutral:"",restart:"border-amber-600 bg-amber-600 text-white hover:bg-amber-700",start:"border-emerald-600 bg-emerald-600 text-white hover:bg-emerald-700",stop:"border-red-600 bg-red-600 text-white hover:bg-red-700"};function vS({children:a,icon:i,onClose:l,title:o}){return O.useEffect(()=>{function c(d){d.key==="Escape"&&l()}return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l]),Py.createPortal(g.jsx("div",{className:"fixed inset-0 z-[1000] grid place-items-center bg-black/35 px-4",onMouseDown:l,children:g.jsxs("div",{"aria-modal":"true",className:"flex max-h-[min(760px,calc(100vh-2rem))] w-full max-w-lg flex-col overflow-hidden rounded-lg border border-border bg-card shadow-xl",onMouseDown:c=>c.stopPropagation(),role:"dialog",children:[g.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[g.jsx("div",{className:"flex size-8 items-center justify-center rounded-md border border-border bg-background text-foreground [&_svg]:size-4",children:i}),g.jsx("h2",{className:"min-w-0 flex-1 truncate text-sm font-semibold",children:o}),g.jsx(Mt,{"aria-label":"Close dialog",onClick:l,size:"icon",type:"button",variant:"ghost",children:g.jsx($o,{})})]}),g.jsx("div",{className:"min-h-0 overflow-auto p-4",children:a})]})}),document.body)}const bS=[{label:"npm",command:"npm run dev",description:"Node dev server"},{label:"pnpm",command:"pnpm dev",description:"pnpm dev server"},{label:"yarn",command:"yarn dev",description:"Yarn dev server"},{label:"bun",command:"bun dev",description:"Bun dev server"},{label:"Deno",command:"deno task dev",description:"Deno dev task"},{label:"Vite",badgeCommand:"vite",command:"npm run dev -- --host 127.0.0.1",description:"Vite app"},{label:"Go",command:"go run .",description:"Go app"},{label:"Rust",command:"cargo run",description:"Rust app"},{label:".NET",command:"dotnet watch run",description:".NET app"},{label:"Python",command:"python manage.py runserver",description:"Python app"},{label:"Docker",command:"docker compose up",description:"Docker Compose stack"}];function xS({cwd:a,onRefresh:i,onSaved:l}){const{error:o,success:c}=Za(),[d,f]=O.useState(""),[m,y]=O.useState(""),[p,v]=O.useState(a),[x,S]=O.useState(""),[j,E]=O.useState(""),[z,k]=O.useState(null),[L,Q]=O.useState(!1);O.useEffect(()=>{k(null)},[m,p,x]);async function X(q){q.preventDefault();try{await ln("/api/services",{name:d,command:m,cwd:p,port:x,description:j}),f(""),y(""),v(a),S(""),E(""),k(null),c(`${d} added.`),await i(),l?.()}catch(P){o($s("Add service",d||"service",P))}}async function Z(){if(!m.trim()){o("Test command failed for service: command is required.");return}Q(!0);try{k(await tx({command:m,cwd:p,port:x}))}catch(q){o($s("Test command",d||"service",q))}finally{Q(!1)}}return g.jsxs("form",{className:"grid gap-3",onSubmit:X,children:[g.jsxs("fieldset",{className:"grid gap-2",children:[g.jsx("legend",{className:"text-xs font-medium",children:"Recommended Dev Commands"}),g.jsx("div",{className:"grid grid-cols-2 gap-1.5 sm:grid-cols-4",children:bS.map(q=>g.jsxs(Mt,{className:"justify-start gap-1.5",onClick:()=>{y(q.command),E(q.description)},size:"sm",type:"button",variant:"outline",children:[g.jsx(Ff,{command:q.badgeCommand??q.command,compact:!0}),g.jsx("span",{className:"truncate",children:q.label})]},q.label))})]}),g.jsxs(Ri,{children:["Name",g.jsx(gn,{className:"h-8 text-sm",name:"name",onChange:q=>f(q.target.value),placeholder:"backend",required:!0,value:d})]}),g.jsxs(Ri,{children:["Command",g.jsx(gn,{className:"h-8 font-mono text-sm",name:"command",onChange:q=>y(q.target.value),placeholder:"npm run dev",required:!0,value:m})]}),g.jsxs(Ri,{children:["Working Directory",g.jsx(gn,{className:"h-8 font-mono text-sm",name:"cwd",onChange:q=>v(q.target.value),required:!0,value:p})]}),g.jsxs(Ri,{children:["Port",g.jsx(gn,{className:"h-8 text-sm",inputMode:"numeric",name:"port",onChange:q=>S(q.target.value),placeholder:"3001",value:x})]}),g.jsxs(Ri,{children:["Description",g.jsx(gn,{className:"h-8 text-sm",name:"description",onChange:q=>E(q.target.value),placeholder:"API server",value:j})]}),z?g.jsx(SS,{result:z}):null,g.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[g.jsxs(Mt,{disabled:L||!m.trim()||!p.trim(),onClick:Z,type:"button",variant:"outline",children:[g.jsx(Zp,{}),L?"Testing...":"Test Command"]}),g.jsx(Mt,{type:"submit",children:"Add Service"})]})]})}function SS({result:a}){const i=[...a.stdout,...a.stderr].slice(0,4);return g.jsxs(rn,{variant:a.ok?"default":"destructive",children:[g.jsx("div",{className:"font-medium",children:a.ok?"Command test passed":"Command test failed"}),g.jsx("div",{className:"mt-1 text-xs",children:a.message}),i.length?g.jsx("pre",{className:"mt-2 max-h-24 overflow-auto rounded-md bg-background/80 p-2 font-mono text-[11px] leading-4",children:i.join(`
|
|
10
10
|
`)}):null]})}function Wy({initialName:a="",initialServices:i=[],onSaved:l,onRefresh:o,originalName:c,services:d,submitLabel:f="Save Group"}){const{error:m,success:y}=Za();async function p(v){v.preventDefault();const x=v.currentTarget,S=new FormData(x),j=String(S.get("name")??""),E=S.getAll("services").map(z=>String(z)).filter(Boolean);try{await ln("/api/bundles",{name:j,originalName:c,services:E.join(",")}),x.reset(),y(`${j} group saved.`),await o(),l?.()}catch(z){m($s("Save group",j||"group",z))}}return g.jsxs("form",{className:"grid gap-2.5",onSubmit:p,children:[g.jsxs(Ri,{children:["Group name",g.jsx(gn,{className:"h-8 text-sm",defaultValue:a,name:"name",placeholder:"full-stack",required:!0})]}),g.jsxs("fieldset",{className:"grid gap-1.5",children:[g.jsx("legend",{className:"text-xs font-medium",children:"Services"}),d.length?d.map(v=>g.jsxs("label",{className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5 text-sm",children:[g.jsx("input",{className:"size-4 accent-primary",defaultChecked:i.includes(v.name),name:"services",type:"checkbox",value:v.name}),g.jsx(Ff,{command:v.command,compact:!0}),g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate text-sm font-medium",children:v.name}),g.jsx("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:v.command})]})]},v.name)):g.jsx(rn,{variant:"muted",children:"Add services before creating a group."})]}),g.jsx(Mt,{className:"h-8",disabled:!d.length,type:"submit",children:f})]})}function TS({allServices:a,group:i,onRefresh:l,ports:o,services:c,statuses:d}){const[f,m]=O.useState(!1),[y,p]=O.useState(!1),v=c.some(x=>t2(d[x.name]?.state));return g.jsxs("section",{children:[g.jsxs("div",{className:"grid gap-2 bg-muted/35 px-3 py-2 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",children:[g.jsx("div",{className:"min-w-0",children:g.jsxs("button",{className:"flex max-w-full items-start gap-2 text-left",onClick:()=>p(x=>!x),type:"button",children:[g.jsx(Ws,{className:bt("mt-0.5 size-3.5 shrink-0 text-muted-foreground transition-transform",y&&"-rotate-90")}),g.jsxs("span",{className:"min-w-0",children:[g.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Be,{appearance:"subtle",className:"shadow-none",size:"small",variant:"secondary",children:"group"}),g.jsx("span",{className:"text-sm font-medium",children:i.name}),g.jsx(Be,{variant:"secondary",children:i.services.length})]}),g.jsx("span",{className:"mt-0.5 block truncate text-xs text-muted-foreground",children:i.services.join(", ")})]})]})}),g.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[g.jsxs(Mt,{"aria-expanded":f,onClick:()=>m(x=>!x),size:"sm",type:"button",variant:"outline",children:[g.jsx(N3,{}),"Edit"]}),g.jsx($y,{active:v,baseUrl:`/api/bundles/${encodeURIComponent(i.name)}`,restartAction:async()=>{await ln(`/api/bundles/${encodeURIComponent(i.name)}/stop`,{}),await ln(`/api/bundles/${encodeURIComponent(i.name)}/start`,{})},targetLabel:`group ${i.name}`,onRefresh:l})]})]}),f?g.jsx("div",{className:"border-t border-border bg-background/65 p-3",children:g.jsx(Wy,{initialName:i.name,initialServices:i.services,onRefresh:l,onSaved:()=>m(!1),originalName:i.name,services:a,submitLabel:"Save Group"})}):null,y?null:g.jsx("div",{className:"divide-y divide-border border-t border-border bg-background/45",children:c.length?c.map(x=>g.jsx(Iy,{service:x,status:d[x.name],ports:o,onRefresh:l},x.name)):g.jsx(rn,{variant:"muted",className:"m-4",children:"This group does not match any registered services."})})]})}function Iy({service:a,status:i,ports:l,onRefresh:o}){const c=i?.state??"stopped",d=t2(c),f=i?.url??(a.port?AS(a.port):void 0),m=a.port?l.find(v=>v.port===a.port):void 0,y=ES(i?.url),p=y?l.find(v=>v.port===y):void 0;return g.jsxs("div",{className:"grid gap-2 px-3 py-2 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[g.jsx(Ff,{command:a.command}),g.jsx("span",{className:"text-sm font-medium",children:a.name}),g.jsx(jS,{state:c}),a.port?g.jsxs(Be,{variant:"outline",children:[":",a.port]}):null,m?g.jsx(Fy,{port:m,compact:!0}):null,p&&p.port!==a.port?g.jsxs(Be,{variant:"success",children:["actual :",p.port]}):null]}),g.jsx("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",children:a.command}),g.jsx("div",{className:"truncate text-[11px] text-muted-foreground",children:a.cwd})]}),g.jsxs("div",{className:"flex flex-wrap justify-end gap-1.5",children:[g.jsx(wS,{service:a,onRefresh:o}),f?g.jsxs(Mt,{onClick:()=>window.open(f,"_blank","noopener,noreferrer"),size:"sm",type:"button",variant:"outline",title:f,children:[g.jsx(Ib,{}),"Open"]}):null,g.jsx($y,{active:d,baseUrl:`/api/services/${encodeURIComponent(a.name)}`,targetLabel:a.name,onRefresh:o})]})]})}function t2(a){return a==="running"||a==="starting"}function wS({service:a,onRefresh:i}){const[l,o]=O.useState(a.port?String(a.port):""),[c,d]=O.useState(!1),{error:f,success:m}=Za(),y=l.trim()!==(a.port?String(a.port):"");O.useEffect(()=>{o(a.port?String(a.port):"")},[a.port]);async function p(v){v.preventDefault(),d(!0);try{await ln("/api/services",{name:a.name,command:a.command,cwd:a.cwd,port:l,description:a.description}),m(`Port saved for ${a.name}.`),await i()}catch(x){f($s("Save port",a.name,x))}finally{d(!1)}}return g.jsxs("form",{className:"flex items-center gap-1.5",onSubmit:p,children:[g.jsx(gn,{"aria-label":`Port for ${a.name}`,className:"h-8 w-20 font-mono text-xs",inputMode:"numeric",min:1,max:65535,onChange:v=>o(v.target.value),placeholder:"port",type:"number",value:l}),g.jsx(Mt,{"aria-label":`Save port for ${a.name}`,disabled:c||!y,className:"size-8",size:"icon",title:"Save port",type:"submit",variant:"outline",children:g.jsx(U3,{})})]})}function AS(a){return`http://127.0.0.1:${a}`}function ES(a){if(a)try{const i=new URL(a);return i.port?Number(i.port):void 0}catch{return}}function jS({state:a}){return g.jsx(Be,{variant:a==="running"?"success":a==="exited"?"danger":a==="starting"?"warning":"outline",className:bt(a==="running"&&"font-mono"),children:a})}function CS({data:a,onRefresh:i}){const l=a.config.services[0]?.name??"",[o,c]=O.useState(l),[d,f]=O.useState(a.logs),[m,y]=O.useState(""),[p,v]=O.useState(null),[x,S]=O.useState(!1),j=O.useRef(null),E=O.useRef(!0),z=O.useRef({}),{error:k,message:L,success:Q}=Za(),X=O.useMemo(()=>new Set(a.config.bundles.flatMap(Y=>Y.services)),[a.config.bundles]),Z=O.useMemo(()=>{const Y=new Map;for(const rt of a.config.bundles)for(const dt of rt.services)Y.has(dt)||Y.set(dt,rt.name);return Y},[a.config.bundles]),q=O.useMemo(()=>a.config.services.filter(Y=>!X.has(Y.name)),[a.config.services,X]),P=a.config.bundles.length>0||q.length>0,J=m.trim().toLowerCase(),B=O.useMemo(()=>J?d.filter(Y=>eS(Y).toLowerCase().includes(J)):d,[d,J]);O.useEffect(()=>{!o&&l&&c(l)},[l,o]),O.useEffect(()=>{if(!o){f([]);return}let Y=!0;return u1(o).then(rt=>{Y&&f(rt)}).catch(()=>{Y&&f([])}),()=>{Y=!1}},[o,a.runtime.services]),O.useEffect(()=>{if(!x||!o)return;let Y=!0;const rt=async()=>{try{const qt=await u1(o);Y&&f(qt)}catch{Y&&f([])}};rt();const dt=window.setInterval(rt,1e3);return()=>{Y=!1,window.clearInterval(dt)}},[o,x]),O.useEffect(()=>{const Y=j.current;if(!Y)return;function rt(){if(!Y)return;const dt=Y.scrollHeight-Y.scrollTop-Y.clientHeight;E.current=dt<40}return rt(),Y.addEventListener("scroll",rt,{passive:!0}),()=>Y.removeEventListener("scroll",rt)},[o]),O.useEffect(()=>{if(!x||!E.current)return;const Y=j.current;Y&&(Y.scrollTop=Y.scrollHeight)},[x,B]),O.useEffect(()=>{E.current=!0;const Y=j.current;Y&&(Y.scrollTop=Y.scrollHeight)},[o]),O.useEffect(()=>{const Y=Object.fromEntries(a.config.services.map(dt=>[dt.name,a.runtime.services[dt.name]?.state??"stopped"])),rt=z.current;if(Object.keys(rt).length){const dt=new Map,qt=new Map;for(const wt of a.config.services){const yt=Y[wt.name],R=rt[wt.name];if(!R||R===yt)continue;const F=a.runtime.services[wt.name],$=Z.get(wt.name);if($){const ut=dt.get($)??new Map;if(ut.set(yt,(ut.get(yt)??0)+1),dt.set($,ut),yt==="exited"){const K=qt.get($)??[];K.push(F?.exitCode),qt.set($,K)}continue}if(yt==="running")Q(`${wt.name} is running.`);else if(yt==="stopped")L({text:`${wt.name} stopped.`});else if(yt==="starting")L({text:`${wt.name} is starting.`});else if(yt==="exited"){const ut=F?.exitCode===void 0||F.exitCode===null?"":` with code ${F.exitCode}`;k(`${wt.name} exited${ut}.`)}}for(const[wt,yt]of dt)MS({exitCodes:qt.get(wt)??[],groupName:wt,showErrorToast:k,showMessageToast:L,showSuccessToast:Q,transitions:yt})}z.current=Y},[a.config.services,a.runtime.services,Z,k,L,Q]);const ft=o?J?`No log lines match "${m.trim()}".`:`No logs captured for ${o}.`:"No services registered.";return x?g.jsx("div",{className:"flex h-full min-h-0 bg-card/85",children:g.jsxs(qs,{className:"flex min-h-0 min-w-0 flex-1 flex-col rounded-none border-0 bg-transparent",children:[g.jsx(Ys,{className:"shrink-0 border-b border-border px-3 py-2",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{children:[g.jsx(Xs,{children:"Streaming Logs"}),g.jsx(Lo,{className:"text-xs",children:"Polling the selected service every second and pinned to latest output."})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Rp,{value:m,onChange:y}),g.jsx("select",{className:"h-8 max-w-72 rounded-md border border-border bg-background px-2.5 text-xs",disabled:!a.config.services.length,onChange:Y=>c(Y.target.value),value:o,children:a.config.services.map(Y=>g.jsx("option",{value:Y.name,children:Y.name},Y.name))}),g.jsxs(Mt,{"aria-pressed":x,className:"border-emerald-600 bg-emerald-50 text-emerald-700",onClick:()=>S(!1),size:"sm",type:"button",variant:"outline",children:[g.jsx(r1,{}),"Streaming"]})]})]})}),g.jsx(Zs,{className:"min-h-0 flex-1 p-0",children:g.jsx(Vp,{containerRef:j,emptyText:ft,logs:B,query:m})})]})}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden bg-card/85 xl:grid-cols-[minmax(0,1fr)_340px]",children:[g.jsxs("div",{className:"min-h-0 min-w-0 overflow-auto",children:[g.jsxs(qs,{className:"min-w-0 rounded-none border-0 border-b border-border bg-transparent",children:[g.jsx(Ys,{className:"border-b border-border px-3 py-2",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{children:[g.jsx(Xs,{children:"Services"}),g.jsx(Lo,{className:"text-xs",children:"Grouped services are nested; ungrouped services stay standalone."})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsxs(Mt,{"aria-haspopup":"dialog",onClick:()=>v("service"),size:"sm",type:"button",variant:"outline",children:[g.jsx(Ho,{}),"Add Service"]}),g.jsxs(Mt,{"aria-haspopup":"dialog",onClick:()=>v("group"),size:"sm",type:"button",variant:"outline",children:[g.jsx(o1,{}),"Create Group"]})]})]})}),g.jsx(Zs,{className:"p-0",children:P?g.jsxs("div",{className:"divide-y divide-border",children:[a.config.bundles.map(Y=>g.jsx(TS,{group:Y,onRefresh:i,ports:a.ports,allServices:a.config.services,services:a.config.services.filter(rt=>Y.services.includes(rt.name)),statuses:a.runtime.services},Y.name)),q.length?g.jsxs("div",{children:[a.config.bundles.length?g.jsx("div",{className:"bg-muted/55 px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground",children:"Ungrouped Services"}):null,g.jsx("div",{className:"divide-y divide-border",children:q.map(Y=>g.jsx(Iy,{service:Y,status:a.runtime.services[Y.name],ports:a.ports,onRefresh:i},Y.name))})]}):null]}):g.jsx(Jy,{label:"No services registered yet."})})]}),g.jsxs(qs,{className:"min-w-0 rounded-none border-0 bg-transparent",children:[g.jsx(Ys,{className:"border-b border-border px-3 py-2",children:g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{children:[g.jsx(Xs,{children:"Recent Logs"}),g.jsx(Lo,{className:"text-xs",children:"Updates with dashboard refresh. Use Stream for a full-page live view."})]}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx(Rp,{value:m,onChange:y}),g.jsx("select",{className:"h-8 max-w-72 rounded-md border border-border bg-background px-2.5 text-xs",disabled:!a.config.services.length,onChange:Y=>c(Y.target.value),value:o,children:a.config.services.map(Y=>g.jsx("option",{value:Y.name,children:Y.name},Y.name))}),g.jsxs(Mt,{"aria-pressed":x,disabled:!o,onClick:()=>S(!0),size:"sm",type:"button",variant:"outline",children:[g.jsx(r1,{}),"Stream"]})]})]})}),g.jsx(Zs,{className:"min-w-0 p-0",children:g.jsx(Vp,{className:"max-h-[320px]",containerRef:j,emptyText:ft,logs:B,query:m})})]})]}),g.jsx("div",{className:"min-h-0 overflow-auto border-l border-border",children:g.jsx(aS,{ports:a.ports})})]}),p?g.jsx(vS,{icon:p==="service"?g.jsx(Ho,{}):g.jsx(o1,{}),onClose:()=>v(null),title:p==="service"?"Add Service":"Create Group",children:p==="service"?g.jsx(xS,{cwd:a.cwd,onRefresh:i,onSaved:()=>v(null)}):g.jsx(Wy,{services:a.config.services,onRefresh:i,onSaved:()=>v(null)})}):null]})}function MS({exitCodes:a,groupName:i,showErrorToast:l,showMessageToast:o,showSuccessToast:c,transitions:d}){if(d.size===1){const[y]=d.keys();if(y==="running")c(`${i} group is running.`);else if(y==="stopped")o({text:`${i} group stopped.`});else if(y==="starting")o({text:`${i} group is starting.`});else if(y==="exited"){const p=a.filter(x=>x!=null),v=p.length?` with code ${p.join(", ")}`:"";l(`${i} group exited${v}.`)}return}const f=[...d.entries()].map(([y,p])=>`${p} ${y}`).join(", "),m=`${i} group updated: ${f}.`;d.has("exited")?l(m):o({text:m})}function zS({activeHunkIndex:a=0,diff:i}){const l=DS(i),o=O.useRef([]);return O.useEffect(()=>{o.current[a]?.scrollIntoView({block:"start",behavior:"smooth"})},[a,i]),g.jsx("div",{className:"h-full min-h-0 overflow-auto bg-white text-xs leading-6",children:g.jsx("div",{className:"min-w-max font-mono",children:l.map((c,d)=>g.jsxs("div",{className:bt("grid grid-cols-[3rem_3rem_minmax(40rem,1fr)]",c.kind==="add"&&"bg-emerald-50 text-emerald-800",c.kind==="delete"&&"bg-red-50 text-red-800",kp(l,d)&&c.hunkIndex===a&&"outline outline-1 outline-offset-[-1px] outline-primary/35"),ref:c.hunkIndex!==null&&kp(l,d)?f=>{o.current[c.hunkIndex??0]=f}:void 0,children:[g.jsx(_p,{value:c.oldLine}),g.jsx(_p,{value:c.newLine}),g.jsx("span",{className:"whitespace-pre px-2",children:c.content||" "})]},`${d}-${c.content}`))})})}function NS(a){return a.split(`
|
|
11
11
|
`).reduce((i,l)=>(l.startsWith("@@")?i.hunks+=1:l.startsWith("+")&&!l.startsWith("+++")?i.additions+=1:l.startsWith("-")&&!l.startsWith("---")&&(i.deletions+=1),i),{additions:0,deletions:0,hunks:0})}function DS(a){const i=RS(a);return i.some(l=>l.kind==="hunk")?i.filter(l=>l.kind!=="meta"&&l.kind!=="hunk"):i}function RS(a){let i=null,l=null,o=null;return a.split(`
|
|
12
|
-
`).map(c=>{if(VS(c))return i=null,l=null,o=null,{content:c,hunkIndex:o,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("@@")){const f=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(c);return f&&(i=Number(f[1]),l=Number(f[2])),o=(o??-1)+1,{content:c,hunkIndex:o,kind:"hunk",oldLine:null,newLine:null}}if(i===null||l===null)return{content:c,hunkIndex:null,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("\\ No newline"))return{content:c,hunkIndex:o,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("+")&&!c.startsWith("+++")){const f={content:c,hunkIndex:o,kind:"add",oldLine:null,newLine:l};return l+=1,f}if(c.startsWith("-")&&!c.startsWith("---")){const f={content:c,hunkIndex:o,kind:"delete",oldLine:i,newLine:null};return i+=1,f}const d={content:c,hunkIndex:o,kind:"context",oldLine:i,newLine:l};return i+=1,l+=1,d})}function kp(a,i){const l=a[i]?.hunkIndex;if(l===null)return!1;const o=a.findIndex(c=>c.hunkIndex===l&&(c.kind==="add"||c.kind==="delete"));return o!==-1?o===i:a.findIndex(c=>c.hunkIndex===l)===i}function VS(a){return a.startsWith("diff --git ")||a.startsWith("index ")||a.startsWith("--- ")||a.startsWith("+++ ")||a.startsWith("new file mode ")||a.startsWith("deleted file mode ")||a.startsWith("old mode ")||a.startsWith("new mode ")||a.startsWith("similarity index ")||a.startsWith("rename from ")||a.startsWith("rename to ")||a.startsWith("Binary files ")}function _p({value:a}){return g.jsx("span",{className:bt("select-none border-r border-border/70 px-2 text-right text-muted-foreground",a===null&&"text-transparent"),children:a??"-"})}const OS=new Set(["c","cpp","cs","go","java","js","jsx","kt","mjs","py","rs","swift","ts","tsx"]),kS=new Set([".env",".gitignore","components.json","dockerfile","package.json","tsconfig.json","vite.config.ts"]),_S=new Set(["conf","config","ini","toml","yaml","yml"]),BS=new Set(["csv","json","sql","xml"]),LS=new Set(["md","mdx","rst","txt"]),US=new Set(["gif","jpeg","jpg","png","svg","webp"]),HS=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock"]),GS=new Set(["css","less","sass","scss"]);function qS(a){const i=a.split("/").pop()?.toLowerCase()??a.toLowerCase(),l=i.includes(".")?i.split(".").pop()??"":"";return HS.has(i)||i.endsWith(".lock")?"lock":YS(i)?"test":kS.has(i)||_S.has(l)?"config":GS.has(l)?"style":US.has(l)?"image":LS.has(l)?"document":BS.has(l)?"data":OS.has(l)?"code":"generic"}function YS(a){return a.includes(".test.")||a.includes(".spec.")||a.endsWith("_test.go")}function XS({branch:a,error:i,files:l,selectedFile:o,onSelectFile:c}){const d=O.useMemo(()=>FS(l).filter(y=>y.files.length),[l]),[f,m]=O.useState({staged:!1,unstaged:!1,untracked:!1});return g.jsxs(qs,{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-none border-0 bg-transparent",children:[g.jsx(Ys,{className:"border-b border-border px-2.5 py-1.5",children:g.jsxs(Xs,{className:"flex items-center justify-between gap-2",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(Uo,{className:"size-3.5"}),g.jsx("span",{className:"truncate",children:"Changes"})]}),g.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[a?g.jsx(Be,{variant:"outline",children:a}):null,g.jsx(Be,{variant:"secondary",children:l.length})]})]})}),g.jsx(Zs,{className:"min-h-0 flex-1 overflow-auto p-0",children:d.length?d.map(y=>g.jsx(ZS,{collapsed:f[y.id],group:y,onSelectFile:c,onToggle:()=>m(p=>({...p,[y.id]:!p[y.id]})),selectedFile:o},y.id)):g.jsx(rn,{variant:"muted",className:"m-3 text-center",children:i??"No changed files."})})]})}function ZS({collapsed:a,group:i,onSelectFile:l,onToggle:o,selectedFile:c}){const d=a?Kb:Ws;return g.jsxs("section",{className:"border-b border-border last:border-b-0",children:[g.jsxs("button",{className:"flex w-full items-center justify-between gap-2 bg-muted/55 px-2.5 py-1 text-left text-[10px] font-semibold uppercase text-muted-foreground hover:bg-muted",onClick:o,type:"button",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(d,{className:"size-3.5"}),g.jsx("span",{className:"truncate",children:i.label})]}),g.jsx(Be,{className:"min-w-6 justify-center font-mono shadow-none",size:"small",variant:"outline",children:i.files.length})]}),a?null:g.jsx("div",{children:i.files.map(f=>g.jsx(QS,{active:c===f.path,file:f,group:i.id,onClick:()=>l(f.path)},f.path))})]})}function QS({active:a,file:i,group:l,onClick:o}){const c=i.path.split("/").pop()||i.path,d=i.path.split("/").slice(0,-1).join("/");return g.jsxs(Mt,{className:bt("grid h-auto w-full grid-cols-[1fr_auto] items-center gap-2 rounded-none border-b border-border px-2.5 py-1.5 text-left",a&&"bg-muted"),onClick:o,type:"button",variant:"ghost",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(JS,{path:i.path}),g.jsx("span",{className:"truncate text-[13px] font-medium",children:c})]}),d?g.jsx("span",{className:"block truncate pl-5 text-[10px] text-muted-foreground",children:d}):null]}),g.jsx("span",{className:bt("w-3.5 shrink-0 text-center font-mono text-[11px] font-semibold",l==="untracked"&&"text-amber-700",l==="staged"&&"text-emerald-700",l==="unstaged"&&"text-zinc-800"),children:KS(i,l)})]})}function KS(a,i){return i==="untracked"?"?":i==="staged"?a.index.trim():a.workingTree.trim()}function JS({path:a}){const i=qS(a),l=PS[i];return g.jsx(l,{"aria-label":`${i} file`,className:bt("size-3.5 shrink-0",$S[i])})}function FS(a){return[{id:"unstaged",label:"Changes",files:a.filter(i=>!(i.index==="?"&&i.workingTree==="?")&&i.workingTree.trim())},{id:"staged",label:"Staged Changes",files:a.filter(i=>!(i.index==="?"&&i.workingTree==="?")&&i.index.trim()&&!i.workingTree.trim())},{id:"untracked",label:"Untracked Files",files:a.filter(i=>i.index==="?"&&i.workingTree==="?")}]}const PS={code:e3,config:Z3,data:Fb,document:a3,generic:s3,image:p3,lock:v3,style:T3,test:o3},$S={code:"text-sky-600",config:"text-zinc-600",data:"text-emerald-700",document:"text-blue-700",generic:"text-muted-foreground",image:"text-fuchsia-700",lock:"text-amber-700",style:"text-rose-700",test:"text-violet-700"};function WS({activeHunkIndex:a,filePaths:i,hunkCount:l,pendingNextFilePath:o,selectedFile:c}){if(l>0&&a<l-1)return{kind:"hunk",activeHunkIndex:a+1};const d=i.findIndex(m=>m===c),f=i[d+1];return f?o===f?{kind:"file",filePath:f}:{kind:"confirm-next-file",filePath:f}:{kind:"none"}}function IS({data:a}){const[i,l]=O.useState(a.git.status?.files[0]?.path??""),[o,c]=O.useState(""),[d,f]=O.useState(null),[m,y]=O.useState(0),[p,v]=O.useState(null),x=a.git.status?.files??[],S=O.useMemo(()=>x.map(q=>q.path),[x]),j=O.useMemo(()=>NS(o),[o]);O.useEffect(()=>{const q=a.git.status?.files[0]?.path??"";l(P=>P&&a.git.status?.files.some(J=>J.path===P)?P:q)},[a.git.status?.files]),O.useEffect(()=>{if(!i){c("");return}let q=!0;return f(null),W3(i).then(P=>{q&&(c(P),y(0),v(null))}).catch(P=>{q&&f(P instanceof Error?P.message:String(P))}),()=>{q=!1}},[i]);function E(q){y(0),v(null),l(q)}function z(){const q=WS({activeHunkIndex:m,filePaths:S,hunkCount:j.hunks,pendingNextFilePath:p,selectedFile:i});q.kind==="hunk"?(v(null),y(q.activeHunkIndex)):q.kind==="confirm-next-file"?v(q.filePath):q.kind==="file"?E(q.filePath):v(null)}function k(){if(v(null),m>0){y(J=>J-1);return}const q=x.findIndex(J=>J.path===i),P=x[q-1];P&&E(P.path)}const L=x.findIndex(q=>q.path===i),Q=!!(j.hunks&&m<j.hunks-1||x[L+1]),X=!!(m>0||x[L-1]),Z=p?`End of file. Click Next again to open ${p}.`:null;return g.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 xl:grid-cols-[320px_minmax(0,1fr)]",children:[g.jsx("aside",{className:"flex min-h-0 flex-col overflow-hidden",children:g.jsx(XS,{branch:a.git.status?.branch||void 0,error:a.git.error,files:a.git.status?.files??[],selectedFile:i,onSelectFile:E})}),g.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col border-l border-border bg-white",children:[g.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:i||"Diff"}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[g.jsx("span",{children:"Long rows scroll horizontally inside the editor pane."}),j.additions||j.deletions?g.jsxs("span",{className:"flex items-center gap-1 font-mono",children:[g.jsxs("span",{className:"text-emerald-700",children:["+",j.additions]}),g.jsxs("span",{className:"text-red-700",children:["-",j.deletions]})]}):null]})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[Z?g.jsx("span",{className:"max-w-72 truncate rounded border border-amber-200 bg-amber-50 px-2 py-1 text-[11px] text-amber-900",children:Z}):null,g.jsxs(Mt,{disabled:!i||!X,onClick:k,size:"sm",type:"button",variant:"outline",children:[g.jsx(Gb,{}),"Previous"]}),g.jsxs(Mt,{disabled:!i||!Q,onClick:z,size:"sm",type:"button",variant:"outline",children:[g.jsx(Ub,{}),"Next"]})]})]}),g.jsx("div",{className:"min-h-0 min-w-0 flex-1",children:d?g.jsx("div",{className:"p-4",children:g.jsx(rn,{variant:"destructive",children:d})}):i?g.jsx(zS,{activeHunkIndex:m,diff:o||"No unstaged diff for this file."}):g.jsx("div",{className:"p-4",children:g.jsx(rn,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a changed file to inspect its diff."})})})]})]})}function t9({initialPath:a,onSelect:i,selectedPath:l}){const[o,c]=O.useState(a),[d,f]=O.useState(null),[m,y]=O.useState(null),[p,v]=O.useState(!1),x=e9(d);return O.useEffect(()=>{c(a)},[a]),O.useEffect(()=>{let S=!0;return v(!0),y(null),I3(o).then(j=>{S&&(f(j),i(j.path))}).catch(j=>{S&&y(j instanceof Error?j.message:String(j))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[o,i]),g.jsxs("div",{className:"rounded-md border border-border bg-background",children:[g.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[x?g.jsx(Mt,{"aria-label":"Open parent folder",onClick:()=>d&&c(d.parent),size:"icon",type:"button",variant:"ghost",children:g.jsx(Ws,{className:"rotate-90"})}):null,g.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:d?.path??o}),p?g.jsx(Yp,{className:"size-4 animate-spin text-muted-foreground"}):null]}),g.jsxs("div",{className:"max-h-56 overflow-auto p-1",children:[m?g.jsx(rn,{variant:"destructive",className:"m-1",children:m}):null,!m&&d?.entries.length===0?g.jsx(rn,{variant:"muted",className:"m-1 text-center",children:"No folders here."}):null,d?.entries.map(S=>g.jsxs(Mt,{className:bt("h-8 w-full justify-start rounded-sm px-2 text-left",l===S.path&&"bg-muted"),onClick:()=>c(S.path),title:S.path,type:"button",variant:"ghost",children:[g.jsx(bf,{className:"text-accent"}),g.jsx("span",{className:"truncate",children:S.name})]},S.path))]})]})}function e9(a){return!!(a&&a.parent!==a.path)}function Bp(a){return a.split(/[\\/]/).filter(Boolean).pop()??"project"}function n9({data:a,onRefresh:i}){const[l,o]=O.useState(!1),[c,d]=O.useState(a.git.cwd),[f,m]=O.useState(null),[y,p]=O.useState(!1),[v,x]=O.useState("add"),[S,j]=O.useState(a.git.cwd),E=O.useRef(null),z=a.git.selectedRepository,k=z?.name??Bp(a.git.cwd),{error:L,success:Q}=Za();O.useEffect(()=>{d(a.git.cwd),j(a.git.cwd)},[a.git.cwd]),O.useEffect(()=>{if(!l)return;function P(J){E.current&&J.target instanceof Node&&!E.current.contains(J.target)&&o(!1)}return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[l]);async function X(P){try{await ln("/api/git/select",{name:P}),o(!1),await i(),Q(`Switched to ${P}.`)}catch(J){L(J instanceof Error?J.message:String(J))}}async function Z(P){const J=P.trim();if(!a9(J)){const B="Please add an absolute path. Paths beginning with ~ are not expanded here.";return m(B),L(B),!1}try{const B=Bp(J);return await ln("/api/git/repositories",{name:B,path:J}),m(null),await i(),Q(`Added Git project ${B}.`),!0}catch(B){const ft=B instanceof Error?B.message:String(B);return m(ft),L(ft),!1}}async function q(P){P.preventDefault(),await Z(c)&&o(!1)}return g.jsxs("div",{className:"relative z-50 flex items-center gap-2",ref:E,children:[g.jsxs(Mt,{className:"max-w-[220px] justify-start gap-2 rounded-md border-border bg-card",onClick:()=>o(P=>!P),size:"sm",type:"button",variant:"outline",children:[g.jsx(bf,{className:"text-muted-foreground"}),g.jsx("span",{className:"truncate",children:k}),g.jsx(Ws,{className:bt("ml-auto transition-transform",l&&"rotate-180")})]}),g.jsx(Mt,{"aria-label":"Add Git project",onClick:()=>{x("add"),m(null),j(a.git.cwd),p(!0)},size:"sm",type:"button",variant:"outline",children:g.jsx(Ho,{})}),l?g.jsxs("div",{className:"absolute right-0 top-10 z-50 w-[min(380px,calc(100vw-2rem))] overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:[g.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[g.jsx($b,{className:"size-3.5 text-muted-foreground"}),g.jsx("div",{className:"text-xs font-semibold",children:"Git Projects"}),g.jsx(Be,{className:"ml-auto h-5 px-1.5 text-[10px]",variant:"outline",children:a.config.gitRepositories.length})]}),g.jsx("div",{className:"max-h-72 overflow-auto",children:a.config.gitRepositories.length?g.jsx("div",{className:"divide-y divide-border",children:a.config.gitRepositories.map(P=>{const J=P.name===z?.name;return g.jsxs("button",{className:bt("grid w-full grid-cols-[1fr_auto] items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-muted",J&&"bg-muted/70"),onClick:()=>{X(P.name)},type:"button",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate text-sm font-medium leading-tight",children:P.name}),g.jsx("span",{className:"block truncate font-mono text-[10px] leading-tight text-muted-foreground",children:P.path})]}),J?g.jsx(Xb,{className:"size-3.5"}):null]},P.name)})}):g.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"No saved Git projects yet."})}),g.jsxs("div",{className:"border-t border-border bg-muted/20 p-2",children:[g.jsxs("form",{className:"flex gap-1.5",onSubmit:q,children:[g.jsx(gn,{"aria-label":"Paste absolute path",className:"h-7 flex-1 px-2 font-mono text-[11px]",onChange:P=>{d(P.target.value),m(null)},placeholder:"/absolute/path",value:c}),g.jsxs(Mt,{className:"h-7 px-2 text-[11px]",size:"sm",type:"submit",children:[g.jsx(Ho,{className:"size-3"}),"Add"]}),g.jsx(Mt,{"aria-label":"Browse folders",className:"h-7 px-2",onClick:()=>{x("fill"),m(null),j(c||a.git.cwd),p(!0)},size:"sm",type:"button",variant:"outline",children:g.jsx(u3,{className:"size-3"})})]}),f?g.jsx("div",{className:"mt-1.5 truncate text-[10px] text-destructive",children:f}):null]})]}):null,y?g.jsx(i9,{confirmLabel:v==="add"?"Add Git project":"Use this folder",errorMessage:v==="add"?f:null,initialPath:v==="add"?a.git.cwd:c||a.git.cwd,selectedPath:S,title:v==="add"?"Add Git Project":"Choose Git Project Folder",onCancel:()=>p(!1),onSelect:j,onUse:async()=>{v==="add"?await Z(S)&&(p(!1),o(!1)):(d(S),m(null),p(!1))}}):null]})}function a9(a){return a.startsWith("/")}function i9({confirmLabel:a="Use this folder",errorMessage:i,initialPath:l,onCancel:o,onSelect:c,onUse:d,selectedPath:f,title:m="Choose Git Project Folder"}){return Py.createPortal(g.jsx("div",{className:"fixed inset-0 z-[1000] grid place-items-center bg-black/35 px-4",children:g.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border bg-card p-4 shadow-xl",children:[g.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[g.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg border border-border bg-background",children:g.jsx(bf,{className:"size-4"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-sm font-semibold",children:m}),g.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:f})]}),g.jsx(Mt,{"aria-label":"Close folder picker",onClick:o,size:"icon",variant:"ghost",children:g.jsx($o,{})})]}),g.jsx(t9,{initialPath:l,onSelect:c,selectedPath:f}),i?g.jsx("div",{className:"mt-3 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}):null,g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx(Mt,{onClick:o,type:"button",variant:"outline",children:"Cancel"}),g.jsx(Mt,{onClick:()=>{d()},type:"button",children:a})]})]})}),document.body)}function s9({branches:a,currentBranch:i,disabled:l,onRefresh:o}){const[c,d]=O.useState(!1),[f,m]=O.useState(""),[y,p]=O.useState(null),[v,x]=O.useState(null),[S,j]=O.useState(null),E=a.filter(Z=>!Z.remote),z=a.filter(Z=>Z.remote);async function k(Z,q){p(Z),j(null),x(null);try{await q(),await o()}catch(P){j(P instanceof Error?P.message:String(P))}finally{p(null)}}async function L(Z){await k(`switch:${Z}`,async()=>{await ln("/api/git/branches/switch",{name:Z}),d(!1)})}async function Q(){await k("fetch",async()=>{await ln("/api/git/fetch",{}),x("Fetched latest branch refs.")})}async function X(Z){Z.preventDefault();const q=f.trim();if(!q){j("Branch name is required.");return}await k("create",async()=>{await ln("/api/git/branches",{name:q}),m(""),d(!1)})}return g.jsxs("div",{className:"fixed bottom-3 right-4 z-50 flex items-end",children:[c?g.jsxs("div",{"aria-label":"Switch Git branch",className:"mb-11 w-[min(460px,calc(100vw-2rem))] rounded-lg border border-border bg-card shadow-xl",role:"dialog",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border p-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx(Uo,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"truncate text-sm font-semibold",children:i||"Branches"})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[g.jsx(Mt,{"aria-label":"Fetch branches",disabled:l||y!==null,onClick:()=>{Q()},size:"icon",title:"Fetch branches",type:"button",variant:"ghost",children:g.jsx(Xp,{className:bt(y==="fetch"&&"animate-spin")})}),g.jsx(Mt,{"aria-label":"Close branch dialog",onClick:()=>d(!1),size:"icon",type:"button",variant:"ghost",children:g.jsx($o,{})})]})]}),g.jsx("div",{className:"max-h-72 overflow-auto",children:a.length?g.jsxs(g.Fragment,{children:[g.jsx(Lp,{branches:E,busy:y!==null,disabled:l,label:"Local",onSwitch:L}),g.jsx(Lp,{branches:z,busy:y!==null,disabled:l,label:"Remote",onSwitch:L})]}):g.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No branches found."})}),g.jsxs("div",{className:"border-t border-border p-3",children:[g.jsxs("form",{className:"grid gap-2 sm:grid-cols-[1fr_auto]",onSubmit:X,children:[g.jsx(gn,{"aria-label":"New branch name",disabled:l||y!==null,onChange:Z=>{m(Z.target.value),j(null),x(null)},placeholder:"feature/new-work",value:f}),g.jsxs(Mt,{disabled:l||y!==null,type:"submit",children:[g.jsx(h3,{}),"Create"]})]}),S||v?g.jsx(rn,{className:"mt-3 px-3 py-2 text-xs",variant:S?"destructive":"muted",children:S??v}):null]})]}):null,g.jsxs(Mt,{className:"h-8 max-w-[260px] gap-2 rounded-md shadow-lg",disabled:l,onClick:()=>d(Z=>!Z),size:"sm",title:"Switch Git branch",type:"button",variant:"default",children:[g.jsx(Uo,{className:"size-4"}),g.jsx("span",{className:"truncate font-mono text-xs",children:i||"No branch"}),g.jsx(Ws,{className:bt("size-4 transition-transform",c&&"rotate-180")})]})]})}function Lp({branches:a,busy:i,disabled:l,label:o,onSwitch:c}){return g.jsxs("section",{children:[g.jsx("div",{className:"border-b border-border bg-muted/60 px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground",children:o}),a.length?a.map(d=>g.jsxs("button",{className:bt("grid w-full grid-cols-[1fr_auto] items-center gap-2 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 hover:bg-muted",d.current&&"bg-muted/70"),disabled:l||i||d.current,onClick:()=>{c(d.name)},type:"button",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate font-medium",children:d.name}),d.upstream?g.jsxs("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:["tracks ",d.upstream]}):null]}),g.jsx(Be,{variant:d.current?"success":d.remote?"outline":"secondary",children:d.current?"current":d.remote?"remote":"local"})]},`${d.remote?"remote":"local"}:${d.name}`)):g.jsxs("div",{className:"border-b border-border px-3 py-3 text-sm text-muted-foreground",children:["No ",o.toLowerCase()," branches."]})]})}function l9({className:a}){return g.jsxs("div",{className:bt("min-w-0",a),children:[g.jsxs("div",{className:"flex items-baseline gap-1.5",children:[g.jsx("div",{className:"text-sm font-semibold",children:"NoMoreIDE"}),g.jsxs("div",{className:"font-mono text-[10px] text-muted-foreground",children:["v","0.1.12"]})]}),g.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:"127.0.0.1 console"})]})}function o9(){const[a,i]=O.useState(()=>window.location.pathname.startsWith("/git")?"git":"services"),[l,o]=O.useState(null),[c,d]=O.useState(null),[f,m]=O.useState(!0),{error:y,success:p}=Za(),[v,x]=O.useState(()=>window.localStorage.getItem("nomoreide:sidebar")==="collapsed"),S=O.useCallback(async(E={})=>{E.silent||m(!0),d(null);try{o(await $3()),E.notify&&p("Dashboard refreshed.")}catch(z){const k=z instanceof Error?z.message:String(z);d(k),y(k)}finally{m(!1)}},[y,p]);O.useEffect(()=>{S()},[S]),O.useEffect(()=>{function E(){document.visibilityState==="visible"&&S({silent:!0})}const z=window.setInterval(E,5e3);return window.addEventListener("focus",E),document.addEventListener("visibilitychange",E),()=>{window.clearInterval(z),window.removeEventListener("focus",E),document.removeEventListener("visibilitychange",E)}},[a,S]),O.useEffect(()=>{const E=a==="git"?"/git":"/";window.location.pathname!==E&&window.history.pushState(null,"",E)},[a]),O.useEffect(()=>{window.localStorage.setItem("nomoreide:sidebar",v?"collapsed":"expanded")},[v]);const j=O.useMemo(()=>l?Object.values(l.runtime.services).filter(E=>E.state==="running").length:0,[l]);return g.jsxs("div",{className:"h-screen overflow-hidden",children:[g.jsxs("div",{className:"mx-auto flex h-screen max-w-[1500px]",children:[g.jsxs("aside",{className:bt("hidden h-screen shrink-0 overflow-auto border-r border-border bg-card/85 px-4 py-5 backdrop-blur transition-[width] duration-200 md:block",v?"w-[76px]":"w-64"),children:[g.jsxs("div",{className:bt("flex items-center px-2",v?"justify-center":"gap-3"),children:[g.jsx("div",{className:"flex size-9 items-center justify-center overflow-hidden rounded-md bg-primary",children:g.jsx("img",{alt:"NoMoreIDE",className:"size-full object-cover",src:P3})}),g.jsx(l9,{className:bt(v&&"hidden")}),g.jsx(Mt,{"aria-label":v?"Expand navigation":"Collapse navigation",className:bt("ml-auto",v&&"hidden"),size:"icon",variant:"ghost",onClick:()=>x(E=>!E),children:g.jsx(A3,{})})]}),g.jsx("div",{className:bt("mt-4",!v&&"hidden"),children:g.jsx(Mt,{"aria-label":"Expand navigation",className:"w-full",size:"icon",variant:"ghost",onClick:()=>x(E=>!E),children:g.jsx(j3,{})})}),g.jsxs("nav",{className:"mt-5 grid gap-1",children:[g.jsx(Up,{active:a==="services",badge:j,collapsed:v,icon:g.jsx(Y3,{}),label:"Services",onClick:()=>i("services")}),g.jsx(Up,{active:a==="git",collapsed:v,icon:g.jsx(Uo,{}),label:"Git Review",onClick:()=>i("git")})]})]}),g.jsxs("main",{className:"flex h-screen min-w-0 flex-1 flex-col px-0 py-0",children:[g.jsxs("header",{className:bt("relative z-40 flex shrink-0 flex-wrap items-center justify-between gap-3 border border-border bg-card/90 px-4 py-3 backdrop-blur","border-x-0 border-t-0 border-b"),children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(M3,{className:"size-4 text-muted-foreground md:hidden"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:a==="git"?"Git Review":"Services"}),g.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:l?.git.selectedRepository?.name??l?.git.cwd??"Local workspace"})]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[c?g.jsx(Be,{variant:"danger",children:c}):null,l&&a==="git"?g.jsx(n9,{data:l,onRefresh:S}):null,g.jsxs(Mt,{variant:"outline",size:"sm",onClick:()=>{S({notify:!0})},children:[g.jsx(Xp,{className:bt(f&&"animate-spin")}),"Refresh"]})]})]}),f&&!l?g.jsx(rn,{variant:"muted",children:"Loading NoMoreIDE state..."}):null,g.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[l&&a==="services"?g.jsx(CS,{data:l,onRefresh:S}):null,l&&a==="git"?g.jsx(IS,{data:l}):null]})]})]}),l&&a==="git"?g.jsx(s9,{branches:l.git.branches,currentBranch:l.git.status?.branch||void 0,disabled:!l.git.status,onRefresh:S}):null]})}function Up({active:a,badge:i,collapsed:l,icon:o,label:c,onClick:d}){return g.jsxs(Mt,{"aria-label":c,title:l?c:void 0,className:bt("w-full",l?"relative justify-center px-0":"justify-start"),variant:a?"default":"ghost",onClick:d,type:"button",children:[g.jsx("span",{className:bt(l&&"[&_svg]:size-4"),children:o}),g.jsx("span",{className:bt("min-w-0 flex-1 text-left",l&&"hidden"),children:c}),i!==void 0?g.jsx(Be,{appearance:i>0?"solid":"outline",className:bt("min-w-6 justify-center px-1.5 font-mono shadow-none",a?"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground":i>0?"":"border-border bg-background text-muted-foreground",l&&"absolute right-1.5 top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none shadow-none"),size:"small",variant:i>0?"success":"outline",children:i}):null]})}Gp.createRoot(document.getElementById("root")).render(g.jsx(O.StrictMode,{children:g.jsx(o9,{})}));
|
|
12
|
+
`).map(c=>{if(VS(c))return i=null,l=null,o=null,{content:c,hunkIndex:o,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("@@")){const f=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(c);return f&&(i=Number(f[1]),l=Number(f[2])),o=(o??-1)+1,{content:c,hunkIndex:o,kind:"hunk",oldLine:null,newLine:null}}if(i===null||l===null)return{content:c,hunkIndex:null,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("\\ No newline"))return{content:c,hunkIndex:o,kind:"meta",oldLine:null,newLine:null};if(c.startsWith("+")&&!c.startsWith("+++")){const f={content:c,hunkIndex:o,kind:"add",oldLine:null,newLine:l};return l+=1,f}if(c.startsWith("-")&&!c.startsWith("---")){const f={content:c,hunkIndex:o,kind:"delete",oldLine:i,newLine:null};return i+=1,f}const d={content:c,hunkIndex:o,kind:"context",oldLine:i,newLine:l};return i+=1,l+=1,d})}function kp(a,i){const l=a[i]?.hunkIndex;if(l===null)return!1;const o=a.findIndex(c=>c.hunkIndex===l&&(c.kind==="add"||c.kind==="delete"));return o!==-1?o===i:a.findIndex(c=>c.hunkIndex===l)===i}function VS(a){return a.startsWith("diff --git ")||a.startsWith("index ")||a.startsWith("--- ")||a.startsWith("+++ ")||a.startsWith("new file mode ")||a.startsWith("deleted file mode ")||a.startsWith("old mode ")||a.startsWith("new mode ")||a.startsWith("similarity index ")||a.startsWith("rename from ")||a.startsWith("rename to ")||a.startsWith("Binary files ")}function _p({value:a}){return g.jsx("span",{className:bt("select-none border-r border-border/70 px-2 text-right text-muted-foreground",a===null&&"text-transparent"),children:a??"-"})}const OS=new Set(["c","cpp","cs","go","java","js","jsx","kt","mjs","py","rs","swift","ts","tsx"]),kS=new Set([".env",".gitignore","components.json","dockerfile","package.json","tsconfig.json","vite.config.ts"]),_S=new Set(["conf","config","ini","toml","yaml","yml"]),BS=new Set(["csv","json","sql","xml"]),LS=new Set(["md","mdx","rst","txt"]),US=new Set(["gif","jpeg","jpg","png","svg","webp"]),HS=new Set(["package-lock.json","pnpm-lock.yaml","yarn.lock"]),GS=new Set(["css","less","sass","scss"]);function qS(a){const i=a.split("/").pop()?.toLowerCase()??a.toLowerCase(),l=i.includes(".")?i.split(".").pop()??"":"";return HS.has(i)||i.endsWith(".lock")?"lock":YS(i)?"test":kS.has(i)||_S.has(l)?"config":GS.has(l)?"style":US.has(l)?"image":LS.has(l)?"document":BS.has(l)?"data":OS.has(l)?"code":"generic"}function YS(a){return a.includes(".test.")||a.includes(".spec.")||a.endsWith("_test.go")}function XS({branch:a,error:i,files:l,selectedFile:o,onSelectFile:c}){const d=O.useMemo(()=>FS(l).filter(y=>y.files.length),[l]),[f,m]=O.useState({staged:!1,unstaged:!1,untracked:!1});return g.jsxs(qs,{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-none border-0 bg-transparent",children:[g.jsx(Ys,{className:"border-b border-border px-2.5 py-1.5",children:g.jsxs(Xs,{className:"flex items-center justify-between gap-2",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(Uo,{className:"size-3.5"}),g.jsx("span",{className:"truncate",children:"Changes"})]}),g.jsxs("span",{className:"flex shrink-0 items-center gap-1.5",children:[a?g.jsx(Be,{variant:"outline",children:a}):null,g.jsx(Be,{variant:"secondary",children:l.length})]})]})}),g.jsx(Zs,{className:"min-h-0 flex-1 overflow-auto p-0",children:d.length?d.map(y=>g.jsx(ZS,{collapsed:f[y.id],group:y,onSelectFile:c,onToggle:()=>m(p=>({...p,[y.id]:!p[y.id]})),selectedFile:o},y.id)):g.jsx(rn,{variant:"muted",className:"m-3 text-center",children:i??"No changed files."})})]})}function ZS({collapsed:a,group:i,onSelectFile:l,onToggle:o,selectedFile:c}){const d=a?Kb:Ws;return g.jsxs("section",{className:"border-b border-border last:border-b-0",children:[g.jsxs("button",{className:"flex w-full items-center justify-between gap-2 bg-muted/55 px-2.5 py-1 text-left text-[10px] font-semibold uppercase text-muted-foreground hover:bg-muted",onClick:o,type:"button",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(d,{className:"size-3.5"}),g.jsx("span",{className:"truncate",children:i.label})]}),g.jsx(Be,{className:"min-w-6 justify-center font-mono shadow-none",size:"small",variant:"outline",children:i.files.length})]}),a?null:g.jsx("div",{children:i.files.map(f=>g.jsx(QS,{active:c===f.path,file:f,group:i.id,onClick:()=>l(f.path)},f.path))})]})}function QS({active:a,file:i,group:l,onClick:o}){const c=i.path.split("/").pop()||i.path,d=i.path.split("/").slice(0,-1).join("/");return g.jsxs(Mt,{className:bt("grid h-auto w-full grid-cols-[1fr_auto] items-center gap-2 rounded-none border-b border-border px-2.5 py-1.5 text-left",a&&"bg-muted"),onClick:o,type:"button",variant:"ghost",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[g.jsx(JS,{path:i.path}),g.jsx("span",{className:"truncate text-[13px] font-medium",children:c})]}),d?g.jsx("span",{className:"block truncate pl-5 text-[10px] text-muted-foreground",children:d}):null]}),g.jsx("span",{className:bt("w-3.5 shrink-0 text-center font-mono text-[11px] font-semibold",l==="untracked"&&"text-amber-700",l==="staged"&&"text-emerald-700",l==="unstaged"&&"text-zinc-800"),children:KS(i,l)})]})}function KS(a,i){return i==="untracked"?"?":i==="staged"?a.index.trim():a.workingTree.trim()}function JS({path:a}){const i=qS(a),l=PS[i];return g.jsx(l,{"aria-label":`${i} file`,className:bt("size-3.5 shrink-0",$S[i])})}function FS(a){return[{id:"unstaged",label:"Changes",files:a.filter(i=>!(i.index==="?"&&i.workingTree==="?")&&i.workingTree.trim())},{id:"staged",label:"Staged Changes",files:a.filter(i=>!(i.index==="?"&&i.workingTree==="?")&&i.index.trim()&&!i.workingTree.trim())},{id:"untracked",label:"Untracked Files",files:a.filter(i=>i.index==="?"&&i.workingTree==="?")}]}const PS={code:e3,config:Z3,data:Fb,document:a3,generic:s3,image:p3,lock:v3,style:T3,test:o3},$S={code:"text-sky-600",config:"text-zinc-600",data:"text-emerald-700",document:"text-blue-700",generic:"text-muted-foreground",image:"text-fuchsia-700",lock:"text-amber-700",style:"text-rose-700",test:"text-violet-700"};function WS({activeHunkIndex:a,filePaths:i,hunkCount:l,pendingNextFilePath:o,selectedFile:c}){if(l>0&&a<l-1)return{kind:"hunk",activeHunkIndex:a+1};const d=i.findIndex(m=>m===c),f=i[d+1];return f?o===f?{kind:"file",filePath:f}:{kind:"confirm-next-file",filePath:f}:{kind:"none"}}function IS({data:a}){const[i,l]=O.useState(a.git.status?.files[0]?.path??""),[o,c]=O.useState(""),[d,f]=O.useState(null),[m,y]=O.useState(0),[p,v]=O.useState(null),x=a.git.status?.files??[],S=O.useMemo(()=>x.map(q=>q.path),[x]),j=O.useMemo(()=>NS(o),[o]);O.useEffect(()=>{const q=a.git.status?.files[0]?.path??"";l(P=>P&&a.git.status?.files.some(J=>J.path===P)?P:q)},[a.git.status?.files]),O.useEffect(()=>{if(!i){c("");return}let q=!0;return f(null),W3(i).then(P=>{q&&(c(P),y(0),v(null))}).catch(P=>{q&&f(P instanceof Error?P.message:String(P))}),()=>{q=!1}},[i]);function E(q){y(0),v(null),l(q)}function z(){const q=WS({activeHunkIndex:m,filePaths:S,hunkCount:j.hunks,pendingNextFilePath:p,selectedFile:i});q.kind==="hunk"?(v(null),y(q.activeHunkIndex)):q.kind==="confirm-next-file"?v(q.filePath):q.kind==="file"?E(q.filePath):v(null)}function k(){if(v(null),m>0){y(J=>J-1);return}const q=x.findIndex(J=>J.path===i),P=x[q-1];P&&E(P.path)}const L=x.findIndex(q=>q.path===i),Q=!!(j.hunks&&m<j.hunks-1||x[L+1]),X=!!(m>0||x[L-1]),Z=p?`End of file. Click Next again to open ${p}.`:null;return g.jsxs("div",{className:"grid h-full min-h-0 overflow-hidden border-0 bg-card/85 xl:grid-cols-[320px_minmax(0,1fr)]",children:[g.jsx("aside",{className:"flex min-h-0 flex-col overflow-hidden",children:g.jsx(XS,{branch:a.git.status?.branch||void 0,error:a.git.error,files:a.git.status?.files??[],selectedFile:i,onSelectFile:E})}),g.jsxs("section",{className:"flex min-h-0 min-w-0 flex-col border-l border-border bg-white",children:[g.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-border px-3 py-1.5",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h2",{className:"truncate text-[13px] font-semibold tracking-tight",children:i||"Diff"}),g.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",children:[g.jsx("span",{children:"Long rows scroll horizontally inside the editor pane."}),j.additions||j.deletions?g.jsxs("span",{className:"flex items-center gap-1 font-mono",children:[g.jsxs("span",{className:"text-emerald-700",children:["+",j.additions]}),g.jsxs("span",{className:"text-red-700",children:["-",j.deletions]})]}):null]})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[Z?g.jsx("span",{className:"max-w-72 truncate rounded border border-amber-200 bg-amber-50 px-2 py-1 text-[11px] text-amber-900",children:Z}):null,g.jsxs(Mt,{disabled:!i||!X,onClick:k,size:"sm",type:"button",variant:"outline",children:[g.jsx(Gb,{}),"Previous"]}),g.jsxs(Mt,{disabled:!i||!Q,onClick:z,size:"sm",type:"button",variant:"outline",children:[g.jsx(Ub,{}),"Next"]})]})]}),g.jsx("div",{className:"min-h-0 min-w-0 flex-1",children:d?g.jsx("div",{className:"p-4",children:g.jsx(rn,{variant:"destructive",children:d})}):i?g.jsx(zS,{activeHunkIndex:m,diff:o||"No unstaged diff for this file."}):g.jsx("div",{className:"p-4",children:g.jsx(rn,{variant:"muted",className:"border-dashed p-12 text-center",children:"Select a changed file to inspect its diff."})})})]})]})}function t9({initialPath:a,onSelect:i,selectedPath:l}){const[o,c]=O.useState(a),[d,f]=O.useState(null),[m,y]=O.useState(null),[p,v]=O.useState(!1),x=e9(d);return O.useEffect(()=>{c(a)},[a]),O.useEffect(()=>{let S=!0;return v(!0),y(null),I3(o).then(j=>{S&&(f(j),i(j.path))}).catch(j=>{S&&y(j instanceof Error?j.message:String(j))}).finally(()=>{S&&v(!1)}),()=>{S=!1}},[o,i]),g.jsxs("div",{className:"rounded-md border border-border bg-background",children:[g.jsxs("div",{className:"flex items-center gap-2 border-b border-border p-2",children:[x?g.jsx(Mt,{"aria-label":"Open parent folder",onClick:()=>d&&c(d.parent),size:"icon",type:"button",variant:"ghost",children:g.jsx(Ws,{className:"rotate-90"})}):null,g.jsx("div",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:d?.path??o}),p?g.jsx(Yp,{className:"size-4 animate-spin text-muted-foreground"}):null]}),g.jsxs("div",{className:"max-h-56 overflow-auto p-1",children:[m?g.jsx(rn,{variant:"destructive",className:"m-1",children:m}):null,!m&&d?.entries.length===0?g.jsx(rn,{variant:"muted",className:"m-1 text-center",children:"No folders here."}):null,d?.entries.map(S=>g.jsxs(Mt,{className:bt("h-8 w-full justify-start rounded-sm px-2 text-left",l===S.path&&"bg-muted"),onClick:()=>c(S.path),title:S.path,type:"button",variant:"ghost",children:[g.jsx(bf,{className:"text-accent"}),g.jsx("span",{className:"truncate",children:S.name})]},S.path))]})]})}function e9(a){return!!(a&&a.parent!==a.path)}function Bp(a){return a.split(/[\\/]/).filter(Boolean).pop()??"project"}function n9({data:a,onRefresh:i}){const[l,o]=O.useState(!1),[c,d]=O.useState(a.git.cwd),[f,m]=O.useState(null),[y,p]=O.useState(!1),[v,x]=O.useState("add"),[S,j]=O.useState(a.git.cwd),E=O.useRef(null),z=a.git.selectedRepository,k=z?.name??Bp(a.git.cwd),{error:L,success:Q}=Za();O.useEffect(()=>{d(a.git.cwd),j(a.git.cwd)},[a.git.cwd]),O.useEffect(()=>{if(!l)return;function P(J){E.current&&J.target instanceof Node&&!E.current.contains(J.target)&&o(!1)}return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[l]);async function X(P){try{await ln("/api/git/select",{name:P}),o(!1),await i(),Q(`Switched to ${P}.`)}catch(J){L(J instanceof Error?J.message:String(J))}}async function Z(P){const J=P.trim();if(!a9(J)){const B="Please add an absolute path. Paths beginning with ~ are not expanded here.";return m(B),L(B),!1}try{const B=Bp(J);return await ln("/api/git/repositories",{name:B,path:J}),m(null),await i(),Q(`Added Git project ${B}.`),!0}catch(B){const ft=B instanceof Error?B.message:String(B);return m(ft),L(ft),!1}}async function q(P){P.preventDefault(),await Z(c)&&o(!1)}return g.jsxs("div",{className:"relative z-50 flex items-center gap-2",ref:E,children:[g.jsxs(Mt,{className:"max-w-[220px] justify-start gap-2 rounded-md border-border bg-card",onClick:()=>o(P=>!P),size:"sm",type:"button",variant:"outline",children:[g.jsx(bf,{className:"text-muted-foreground"}),g.jsx("span",{className:"truncate",children:k}),g.jsx(Ws,{className:bt("ml-auto transition-transform",l&&"rotate-180")})]}),g.jsx(Mt,{"aria-label":"Add Git project",onClick:()=>{x("add"),m(null),j(a.git.cwd),p(!0)},size:"sm",type:"button",variant:"outline",children:g.jsx(Ho,{})}),l?g.jsxs("div",{className:"absolute right-0 top-10 z-50 w-[min(380px,calc(100vw-2rem))] overflow-hidden rounded-lg border border-border bg-card shadow-lg",children:[g.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[g.jsx($b,{className:"size-3.5 text-muted-foreground"}),g.jsx("div",{className:"text-xs font-semibold",children:"Git Projects"}),g.jsx(Be,{className:"ml-auto h-5 px-1.5 text-[10px]",variant:"outline",children:a.config.gitRepositories.length})]}),g.jsx("div",{className:"max-h-72 overflow-auto",children:a.config.gitRepositories.length?g.jsx("div",{className:"divide-y divide-border",children:a.config.gitRepositories.map(P=>{const J=P.name===z?.name;return g.jsxs("button",{className:bt("grid w-full grid-cols-[1fr_auto] items-center gap-2 px-3 py-1.5 text-left transition-colors hover:bg-muted",J&&"bg-muted/70"),onClick:()=>{X(P.name)},type:"button",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate text-sm font-medium leading-tight",children:P.name}),g.jsx("span",{className:"block truncate font-mono text-[10px] leading-tight text-muted-foreground",children:P.path})]}),J?g.jsx(Xb,{className:"size-3.5"}):null]},P.name)})}):g.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"No saved Git projects yet."})}),g.jsxs("div",{className:"border-t border-border bg-muted/20 p-2",children:[g.jsxs("form",{className:"flex gap-1.5",onSubmit:q,children:[g.jsx(gn,{"aria-label":"Paste absolute path",className:"h-7 flex-1 px-2 font-mono text-[11px]",onChange:P=>{d(P.target.value),m(null)},placeholder:"/absolute/path",value:c}),g.jsxs(Mt,{className:"h-7 px-2 text-[11px]",size:"sm",type:"submit",children:[g.jsx(Ho,{className:"size-3"}),"Add"]}),g.jsx(Mt,{"aria-label":"Browse folders",className:"h-7 px-2",onClick:()=>{x("fill"),m(null),j(c||a.git.cwd),p(!0)},size:"sm",type:"button",variant:"outline",children:g.jsx(u3,{className:"size-3"})})]}),f?g.jsx("div",{className:"mt-1.5 truncate text-[10px] text-destructive",children:f}):null]})]}):null,y?g.jsx(i9,{confirmLabel:v==="add"?"Add Git project":"Use this folder",errorMessage:v==="add"?f:null,initialPath:v==="add"?a.git.cwd:c||a.git.cwd,selectedPath:S,title:v==="add"?"Add Git Project":"Choose Git Project Folder",onCancel:()=>p(!1),onSelect:j,onUse:async()=>{v==="add"?await Z(S)&&(p(!1),o(!1)):(d(S),m(null),p(!1))}}):null]})}function a9(a){return a.startsWith("/")}function i9({confirmLabel:a="Use this folder",errorMessage:i,initialPath:l,onCancel:o,onSelect:c,onUse:d,selectedPath:f,title:m="Choose Git Project Folder"}){return Py.createPortal(g.jsx("div",{className:"fixed inset-0 z-[1000] grid place-items-center bg-black/35 px-4",children:g.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-border bg-card p-4 shadow-xl",children:[g.jsxs("div",{className:"mb-3 flex items-center gap-3",children:[g.jsx("div",{className:"flex size-8 items-center justify-center rounded-lg border border-border bg-background",children:g.jsx(bf,{className:"size-4"})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"text-sm font-semibold",children:m}),g.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:f})]}),g.jsx(Mt,{"aria-label":"Close folder picker",onClick:o,size:"icon",variant:"ghost",children:g.jsx($o,{})})]}),g.jsx(t9,{initialPath:l,onSelect:c,selectedPath:f}),i?g.jsx("div",{className:"mt-3 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:i}):null,g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx(Mt,{onClick:o,type:"button",variant:"outline",children:"Cancel"}),g.jsx(Mt,{onClick:()=>{d()},type:"button",children:a})]})]})}),document.body)}function s9({branches:a,currentBranch:i,disabled:l,onRefresh:o}){const[c,d]=O.useState(!1),[f,m]=O.useState(""),[y,p]=O.useState(null),[v,x]=O.useState(null),[S,j]=O.useState(null),E=a.filter(Z=>!Z.remote),z=a.filter(Z=>Z.remote);async function k(Z,q){p(Z),j(null),x(null);try{await q(),await o()}catch(P){j(P instanceof Error?P.message:String(P))}finally{p(null)}}async function L(Z){await k(`switch:${Z}`,async()=>{await ln("/api/git/branches/switch",{name:Z}),d(!1)})}async function Q(){await k("fetch",async()=>{await ln("/api/git/fetch",{}),x("Fetched latest branch refs.")})}async function X(Z){Z.preventDefault();const q=f.trim();if(!q){j("Branch name is required.");return}await k("create",async()=>{await ln("/api/git/branches",{name:q}),m(""),d(!1)})}return g.jsxs("div",{className:"fixed bottom-3 right-4 z-50 flex items-end",children:[c?g.jsxs("div",{"aria-label":"Switch Git branch",className:"mb-11 w-[min(460px,calc(100vw-2rem))] rounded-lg border border-border bg-card shadow-xl",role:"dialog",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border p-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx(Uo,{className:"size-4 text-muted-foreground"}),g.jsx("span",{className:"truncate text-sm font-semibold",children:i||"Branches"})]}),g.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[g.jsx(Mt,{"aria-label":"Fetch branches",disabled:l||y!==null,onClick:()=>{Q()},size:"icon",title:"Fetch branches",type:"button",variant:"ghost",children:g.jsx(Xp,{className:bt(y==="fetch"&&"animate-spin")})}),g.jsx(Mt,{"aria-label":"Close branch dialog",onClick:()=>d(!1),size:"icon",type:"button",variant:"ghost",children:g.jsx($o,{})})]})]}),g.jsx("div",{className:"max-h-72 overflow-auto",children:a.length?g.jsxs(g.Fragment,{children:[g.jsx(Lp,{branches:E,busy:y!==null,disabled:l,label:"Local",onSwitch:L}),g.jsx(Lp,{branches:z,busy:y!==null,disabled:l,label:"Remote",onSwitch:L})]}):g.jsx("div",{className:"px-3 py-6 text-center text-sm text-muted-foreground",children:"No branches found."})}),g.jsxs("div",{className:"border-t border-border p-3",children:[g.jsxs("form",{className:"grid gap-2 sm:grid-cols-[1fr_auto]",onSubmit:X,children:[g.jsx(gn,{"aria-label":"New branch name",disabled:l||y!==null,onChange:Z=>{m(Z.target.value),j(null),x(null)},placeholder:"feature/new-work",value:f}),g.jsxs(Mt,{disabled:l||y!==null,type:"submit",children:[g.jsx(h3,{}),"Create"]})]}),S||v?g.jsx(rn,{className:"mt-3 px-3 py-2 text-xs",variant:S?"destructive":"muted",children:S??v}):null]})]}):null,g.jsxs(Mt,{className:"h-8 max-w-[260px] gap-2 rounded-md shadow-lg",disabled:l,onClick:()=>d(Z=>!Z),size:"sm",title:"Switch Git branch",type:"button",variant:"default",children:[g.jsx(Uo,{className:"size-4"}),g.jsx("span",{className:"truncate font-mono text-xs",children:i||"No branch"}),g.jsx(Ws,{className:bt("size-4 transition-transform",c&&"rotate-180")})]})]})}function Lp({branches:a,busy:i,disabled:l,label:o,onSwitch:c}){return g.jsxs("section",{children:[g.jsx("div",{className:"border-b border-border bg-muted/60 px-3 py-1.5 text-[11px] font-semibold uppercase text-muted-foreground",children:o}),a.length?a.map(d=>g.jsxs("button",{className:bt("grid w-full grid-cols-[1fr_auto] items-center gap-2 border-b border-border px-3 py-2 text-left text-sm last:border-b-0 hover:bg-muted",d.current&&"bg-muted/70"),disabled:l||i||d.current,onClick:()=>{c(d.name)},type:"button",children:[g.jsxs("span",{className:"min-w-0",children:[g.jsx("span",{className:"block truncate font-medium",children:d.name}),d.upstream?g.jsxs("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:["tracks ",d.upstream]}):null]}),g.jsx(Be,{variant:d.current?"success":d.remote?"outline":"secondary",children:d.current?"current":d.remote?"remote":"local"})]},`${d.remote?"remote":"local"}:${d.name}`)):g.jsxs("div",{className:"border-b border-border px-3 py-3 text-sm text-muted-foreground",children:["No ",o.toLowerCase()," branches."]})]})}function l9({className:a}){return g.jsxs("div",{className:bt("min-w-0",a),children:[g.jsxs("div",{className:"flex items-baseline gap-1.5",children:[g.jsx("div",{className:"text-sm font-semibold",children:"NoMoreIDE"}),g.jsxs("div",{className:"font-mono text-[10px] text-muted-foreground",children:["v","0.1.13"]})]}),g.jsx("div",{className:"font-mono text-[11px] text-muted-foreground",children:"127.0.0.1 console"})]})}function o9(){const[a,i]=O.useState(()=>window.location.pathname.startsWith("/git")?"git":"services"),[l,o]=O.useState(null),[c,d]=O.useState(null),[f,m]=O.useState(!0),{error:y,success:p}=Za(),[v,x]=O.useState(()=>window.localStorage.getItem("nomoreide:sidebar")==="collapsed"),S=O.useCallback(async(E={})=>{E.silent||m(!0),d(null);try{o(await $3()),E.notify&&p("Dashboard refreshed.")}catch(z){const k=z instanceof Error?z.message:String(z);d(k),y(k)}finally{m(!1)}},[y,p]);O.useEffect(()=>{S()},[S]),O.useEffect(()=>{function E(){document.visibilityState==="visible"&&S({silent:!0})}const z=window.setInterval(E,5e3);return window.addEventListener("focus",E),document.addEventListener("visibilitychange",E),()=>{window.clearInterval(z),window.removeEventListener("focus",E),document.removeEventListener("visibilitychange",E)}},[a,S]),O.useEffect(()=>{const E=a==="git"?"/git":"/";window.location.pathname!==E&&window.history.pushState(null,"",E)},[a]),O.useEffect(()=>{window.localStorage.setItem("nomoreide:sidebar",v?"collapsed":"expanded")},[v]);const j=O.useMemo(()=>l?Object.values(l.runtime.services).filter(E=>E.state==="running").length:0,[l]);return g.jsxs("div",{className:"h-screen overflow-hidden",children:[g.jsxs("div",{className:"mx-auto flex h-screen max-w-[1500px]",children:[g.jsxs("aside",{className:bt("hidden h-screen shrink-0 overflow-auto border-r border-border bg-card/85 px-4 py-5 backdrop-blur transition-[width] duration-200 md:block",v?"w-[76px]":"w-64"),children:[g.jsxs("div",{className:bt("flex items-center px-2",v?"justify-center":"gap-3"),children:[g.jsx("div",{className:"flex size-9 items-center justify-center overflow-hidden rounded-md bg-primary",children:g.jsx("img",{alt:"NoMoreIDE",className:"size-full object-cover",src:P3})}),g.jsx(l9,{className:bt(v&&"hidden")}),g.jsx(Mt,{"aria-label":v?"Expand navigation":"Collapse navigation",className:bt("ml-auto",v&&"hidden"),size:"icon",variant:"ghost",onClick:()=>x(E=>!E),children:g.jsx(A3,{})})]}),g.jsx("div",{className:bt("mt-4",!v&&"hidden"),children:g.jsx(Mt,{"aria-label":"Expand navigation",className:"w-full",size:"icon",variant:"ghost",onClick:()=>x(E=>!E),children:g.jsx(j3,{})})}),g.jsxs("nav",{className:"mt-5 grid gap-1",children:[g.jsx(Up,{active:a==="services",badge:j,collapsed:v,icon:g.jsx(Y3,{}),label:"Services",onClick:()=>i("services")}),g.jsx(Up,{active:a==="git",collapsed:v,icon:g.jsx(Uo,{}),label:"Git Review",onClick:()=>i("git")})]})]}),g.jsxs("main",{className:"flex h-screen min-w-0 flex-1 flex-col px-0 py-0",children:[g.jsxs("header",{className:bt("relative z-40 flex shrink-0 flex-wrap items-center justify-between gap-3 border border-border bg-card/90 px-4 py-3 backdrop-blur","border-x-0 border-t-0 border-b"),children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(M3,{className:"size-4 text-muted-foreground md:hidden"}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-lg font-semibold tracking-tight",children:a==="git"?"Git Review":"Services"}),g.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:l?.git.selectedRepository?.name??l?.git.cwd??"Local workspace"})]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[c?g.jsx(Be,{variant:"danger",children:c}):null,l&&a==="git"?g.jsx(n9,{data:l,onRefresh:S}):null,g.jsxs(Mt,{variant:"outline",size:"sm",onClick:()=>{S({notify:!0})},children:[g.jsx(Xp,{className:bt(f&&"animate-spin")}),"Refresh"]})]})]}),f&&!l?g.jsx(rn,{variant:"muted",children:"Loading NoMoreIDE state..."}):null,g.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[l&&a==="services"?g.jsx(CS,{data:l,onRefresh:S}):null,l&&a==="git"?g.jsx(IS,{data:l}):null]})]})]}),l&&a==="git"?g.jsx(s9,{branches:l.git.branches,currentBranch:l.git.status?.branch||void 0,disabled:!l.git.status,onRefresh:S}):null]})}function Up({active:a,badge:i,collapsed:l,icon:o,label:c,onClick:d}){return g.jsxs(Mt,{"aria-label":c,title:l?c:void 0,className:bt("w-full",l?"relative justify-center px-0":"justify-start"),variant:a?"default":"ghost",onClick:d,type:"button",children:[g.jsx("span",{className:bt(l&&"[&_svg]:size-4"),children:o}),g.jsx("span",{className:bt("min-w-0 flex-1 text-left",l&&"hidden"),children:c}),i!==void 0?g.jsx(Be,{appearance:i>0?"solid":"outline",className:bt("min-w-6 justify-center px-1.5 font-mono shadow-none",a?"border-primary-foreground/40 bg-primary-foreground/15 text-primary-foreground":i>0?"":"border-border bg-background text-muted-foreground",l&&"absolute right-1.5 top-1.5 h-4 min-w-4 rounded-full px-1 text-[10px] leading-none shadow-none"),size:"small",variant:i>0?"success":"outline",children:i}):null]})}Gp.createRoot(document.getElementById("root")).render(g.jsx(O.StrictMode,{children:g.jsx(o9,{})}));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/assets/nomoreide-favicon-Ds7Tgj9p.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>NoMoreIDE</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BFDx6_9m.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-BboAWMBE.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/web/dashboard.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type GitStatus } from "../core/git-manager.js";
|
|
|
3
3
|
import { LogStore } from "../core/log-store.js";
|
|
4
4
|
import { type HostPortStatus } from "../core/port-utils.js";
|
|
5
5
|
import { ProcessManager } from "../core/process-manager.js";
|
|
6
|
-
import type { NoMoreIdeConfig } from "../core/types.js";
|
|
6
|
+
import type { NoMoreIdeConfig, ServiceHealth } from "../core/types.js";
|
|
7
7
|
export declare function buildDashboardPayload(options: {
|
|
8
8
|
configStore: ConfigStore;
|
|
9
9
|
cwd: string;
|
|
@@ -15,6 +15,7 @@ export declare function buildDashboardPayload(options: {
|
|
|
15
15
|
config: NoMoreIdeConfig;
|
|
16
16
|
runtime: import("../core/process-manager.js").NoMoreIdeStatus;
|
|
17
17
|
ports: PortOverview[];
|
|
18
|
+
health: Record<string, ServiceHealth>;
|
|
18
19
|
logs: import("../core/types.js").LogEntry[];
|
|
19
20
|
git: {
|
|
20
21
|
cwd: string;
|
package/dist/web/dashboard.js
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
import { GitManager } from "../core/git-manager.js";
|
|
2
2
|
import { getPortBindingStatus, } from "../core/port-utils.js";
|
|
3
|
+
import { computeServiceHealth } from "../core/service-health.js";
|
|
3
4
|
export async function buildDashboardPayload(options) {
|
|
4
5
|
const config = await options.configStore.load();
|
|
5
6
|
const firstService = config.services[0]?.name;
|
|
6
7
|
const selectedGitRepository = getSelectedGitRepository(config);
|
|
7
8
|
const gitCwd = selectedGitRepository?.path ?? options.cwd;
|
|
8
|
-
const runtime = options.manager.
|
|
9
|
+
const runtime = await options.manager.statusWithResources();
|
|
9
10
|
const [gitStatus, branches, ports] = await Promise.all([
|
|
10
11
|
readGitStatus(gitCwd),
|
|
11
12
|
readGitBranches(gitCwd),
|
|
12
13
|
buildPortOverview(config, runtime.services),
|
|
13
14
|
]);
|
|
15
|
+
const health = buildHealthOverview({
|
|
16
|
+
config,
|
|
17
|
+
logStore: options.logStore,
|
|
18
|
+
ports,
|
|
19
|
+
runtimeServices: runtime.services,
|
|
20
|
+
});
|
|
14
21
|
return {
|
|
15
22
|
ok: true,
|
|
16
23
|
cwd: options.cwd,
|
|
17
24
|
config,
|
|
18
25
|
runtime,
|
|
19
26
|
ports,
|
|
27
|
+
health,
|
|
20
28
|
logs: firstService ? options.logStore.read(firstService, 80) : [],
|
|
21
29
|
git: {
|
|
22
30
|
cwd: gitCwd,
|
|
@@ -27,6 +35,17 @@ export async function buildDashboardPayload(options) {
|
|
|
27
35
|
},
|
|
28
36
|
};
|
|
29
37
|
}
|
|
38
|
+
function buildHealthOverview(options) {
|
|
39
|
+
return Object.fromEntries(options.config.services.map((service) => [
|
|
40
|
+
service.name,
|
|
41
|
+
computeServiceHealth({
|
|
42
|
+
service,
|
|
43
|
+
status: options.runtimeServices[service.name],
|
|
44
|
+
ports: options.ports.filter((port) => port.services.includes(service.name)),
|
|
45
|
+
logs: options.logStore.read(service.name, 80),
|
|
46
|
+
}),
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
30
49
|
async function buildPortOverview(config, runtimeServices) {
|
|
31
50
|
const ports = new Map();
|
|
32
51
|
for (const service of config.services) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/web/dashboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EACL,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/web/dashboard.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EACL,oBAAoB,GAErB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAK3C;IACC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IAChD,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;IAC9C,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,qBAAqB,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC;IAC1D,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAC5D,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACrD,aAAa,CAAC,MAAM,CAAC;QACrB,eAAe,CAAC,MAAM,CAAC;QACvB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC;KAC5C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,mBAAmB,CAAC;QACjC,MAAM;QACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK;QACL,eAAe,EAAE,OAAO,CAAC,QAAQ;KAClC,CAAC,CAAC;IAEH,OAAO;QACL,EAAE,EAAE,IAAI;QACR,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM;QACN,OAAO;QACP,KAAK;QACL,MAAM;QACN,IAAI,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;QACjE,GAAG,EAAE;YACH,GAAG,EAAE,MAAM;YACX,kBAAkB,EAAE,qBAAqB,IAAI,IAAI;YACjD,MAAM,EAAE,SAAS,IAAI,IAAI;YACzB,QAAQ,EAAE,QAAQ,IAAI,EAAE;YACxB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,yBAAyB,MAAM,EAAE;SACjE;KACF,CAAC;AACJ,CAAC;AAWD,SAAS,mBAAmB,CAAC,OAK5B;IACC,OAAO,MAAM,CAAC,WAAW,CACvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;QACvC,OAAO,CAAC,IAAI;QACZ,oBAAoB,CAAC;YACnB,OAAO;YACP,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;YAC7C,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC3E,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;SAC9C,CAAC;KACH,CAAC,CACH,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,MAAuB,EACvB,eAA8C;IAE9C,MAAM,KAAK,GAAG,IAAI,GAAG,EAAwD,CAAC;IAE9E,KAAK,MAAM,OAAO,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACtC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;YAChD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;IAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,GAAG;YAAE,SAAS;QAC1B,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACxC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAChC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,CAChB,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;SACjB,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC;SACvC,GAAG,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,IAAI,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE;YACvD,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;YAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YACzC,OAAO,CACL,MAAM,EAAE,KAAK,KAAK,SAAS;gBAC3B,CAAC,OAAO,KAAK,IAAI;oBACf,CAAC,OAAO,KAAK,SAAS;wBACpB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAClB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CACnE,CAAC,CAAC,CACR,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,IAAI;YACJ,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU;YACzE,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE;YACpC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;SAC7B,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CACnB,KAAgE,EAChE,IAAY;IAEZ,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,EAAE,QAAQ,EAAE,IAAI,GAAG,EAAU,EAAE,IAAI,EAAE,IAAI,GAAG,EAAU,EAAE,CAAC;QACjE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,WAAW,CAAC,GAAuB;IAC1C,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IAC3B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,MAAgD;IAEhD,OAAO,CACL,MAAM,CAAC,eAAe,CAAC,IAAI,CACzB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,KAAK,MAAM,CAAC,qBAAqB,CACjE,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAC/B,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,aAAa,CAAC,GAAW;IACtC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,GAAW;IACxC,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,GAAW,EACX,IAAY;IAEZ,IAAI,CAAC;QACH,OAAO,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,WAAwB,EACxB,WAAmB;IAEnB,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;IACxC,OAAO,wBAAwB,CAAC,MAAM,CAAC,EAAE,IAAI,IAAI,WAAW,CAAC;AAC/D,CAAC"}
|