loki-mode 6.42.0 → 6.44.0

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.
@@ -1,116 +0,0 @@
1
- var st=e=>{throw TypeError(e)};var lt=(e,t,n)=>t.has(e)||st("Cannot "+n);var ze=(e,t,n)=>(lt(e,t,"read from private field"),n?n.call(e):t.get(e)),ct=(e,t,n)=>t.has(e)?st("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ut=(e,t,n,r)=>(lt(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);import{c as H,r as d,W as ye,j as s,a as re,d as ln,u as cn}from"./index-ABzvlaPu.js";import{T as un,E as dn}from"./TerminalOutput-jc4B3JYH.js";import{B as fn}from"./Button-DjxnqObR.js";import{C as pn,a as hn}from"./clock-BZGjjvpN.js";import{E as mn}from"./external-link-DMhX_uRl.js";/**
2
- * @license lucide-react v0.577.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const gn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],xn=H("arrow-left",gn);/**
7
- * @license lucide-react v0.577.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const vn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],yn=H("arrow-right",vn);/**
12
- * @license lucide-react v0.577.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const bn=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],wn=H("bot",bn);/**
17
- * @license lucide-react v0.577.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const jn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sn=H("chevron-down",jn);/**
22
- * @license lucide-react v0.577.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const zn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],kn=H("chevron-right",zn);/**
27
- * @license lucide-react v0.577.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Cn=[["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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],Nn=H("file-braces",Cn);/**
32
- * @license lucide-react v0.577.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const Mn=[["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"}]],ne=H("file-code-corner",Mn);/**
37
- * @license lucide-react v0.577.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const Pn=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],En=H("file-code",Pn);/**
42
- * @license lucide-react v0.577.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const Ln=[["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:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],On=H("file-plus",Ln);/**
47
- * @license lucide-react v0.577.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const Rn=[["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"}]],$n=H("file-text",Rn);/**
52
- * @license lucide-react v0.577.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const Dn=[["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:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]],In=H("file-type",Dn);/**
57
- * @license lucide-react v0.577.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const Fn=[["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"}]],Tn=H("file",Fn);/**
62
- * @license lucide-react v0.577.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const An=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],_n=H("folder-open",An);/**
67
- * @license lucide-react v0.577.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const Bn=[["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"}]],Vn=H("folder-plus",Bn);/**
72
- * @license lucide-react v0.577.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const Hn=[["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"}]],qn=H("folder",Hn);/**
77
- * @license lucide-react v0.577.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const Wn=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Gn=H("message-square",Wn);/**
82
- * @license lucide-react v0.577.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const Un=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Kn=H("rotate-cw",Un);/**
87
- * @license lucide-react v0.577.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const Xn=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Qn=H("send",Xn);/**
92
- * @license lucide-react v0.577.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const Yn=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jn=H("shield-check",Yn);/**
97
- * @license lucide-react v0.577.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const Zn=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],er=H("terminal",Zn);/**
102
- * @license lucide-react v0.577.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const tr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ye=H("x",tr);function dt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nr(e){if(Array.isArray(e))return e}function rr(e,t,n){return(t=ur(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,c,a=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return a}}function ar(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
107
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ft(Object(n),!0).forEach(function(r){rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ft(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ir(e,t){if(e==null)return{};var n,r,o=sr(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function sr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lr(e,t){return nr(e)||or(e,t)||dr(e,t)||ar()}function cr(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ur(e){var t=cr(e,"string");return typeof t=="symbol"?t:t+""}function dr(e,t){if(e){if(typeof e=="string")return dt(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dt(e,t):void 0}}function fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ht(Object(n),!0).forEach(function(r){fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,i){return i(o)},r)}}function ke(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,a=new Array(c),l=0;l<c;l++)a[l]=arguments[l];return t.apply(n,[].concat(o,a))}}}function _e(e){return{}.toString.call(e).includes("Object")}function hr(e){return!Object.keys(e).length}function Pe(e){return typeof e=="function"}function mr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function gr(e,t){return _e(t)||ie("changeType"),Object.keys(t).some(function(n){return!mr(e,n)})&&ie("changeField"),t}function xr(e){Pe(e)||ie("selectorType")}function vr(e){Pe(e)||_e(e)||ie("handlerType"),_e(e)&&Object.values(e).some(function(t){return!Pe(t)})&&ie("handlersType")}function yr(e){e||ie("initialIsRequired"),_e(e)||ie("initialType"),hr(e)&&ie("initialContent")}function br(e,t){throw new Error(e[t]||e.default)}var wr={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},ie=ke(br)(wr),Re={changes:gr,selector:xr,handler:vr,initial:yr};function jr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Re.initial(e),Re.handler(t);var n={current:e},r=ke(kr)(n,t),o=ke(zr)(n),i=ke(Re.changes)(e),c=ke(Sr)(n);function a(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(f){return f};return Re.selector(u),u(n.current)}function l(u){pr(r,o,i,c)(u)}return[a,l]}function Sr(e,t){return Pe(t)?t(e.current):t}function zr(e,t){return e.current=mt(mt({},e.current),t),t}function kr(e,t,n){return Pe(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var Cr={create:jr},Nr={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Mr(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,a=new Array(c),l=0;l<c;l++)a[l]=arguments[l];return t.apply(n,[].concat(o,a))}}}function Pr(e){return{}.toString.call(e).includes("Object")}function Er(e){return e||gt("configIsRequired"),Pr(e)||gt("configType"),e.urls?(Lr(),{paths:{vs:e.urls.monacoBase}}):e}function Lr(){console.warn($t.deprecation)}function Or(e,t){throw new Error(e[t]||e.default)}var $t={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
108
- You are using deprecated way of configuration.
109
-
110
- Instead of using
111
- monaco.config({ urls: { monacoBase: '...' } })
112
- use
113
- monaco.config({ paths: { vs: '...' } })
114
-
115
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
116
- `},gt=Mr(Or)($t),Rr={config:Er},$r=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(i,c){return c(i)},o)}};function Dt(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Dt(e[n],t[n]))}),pt(pt({},e),t)}var Dr={type:"cancelation",msg:"operation is manually canceled"};function He(e){var t=!1,n=new Promise(function(r,o){e.then(function(i){return t?o(Dr):r(i)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var Ir=["monaco"],Fr=Cr.create({config:Nr,isInitialized:!1,resolve:null,reject:null,monaco:null}),It=lr(Fr,2),Le=It[0],Be=It[1];function Tr(e){var t=Rr.config(e),n=t.monaco,r=ir(t,Ir);Be(function(o){return{config:Dt(o.config,r),monaco:n}})}function Ar(){var e=Le(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Be({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),He(qe);if(window.monaco&&window.monaco.editor)return Ft(window.monaco),e.resolve(window.monaco),He(qe);$r(_r,Vr)(Hr)}return He(qe)}function _r(e){return document.body.appendChild(e)}function Br(e){var t=document.createElement("script");return e&&(t.src=e),t}function Vr(e){var t=Le(function(r){var o=r.config,i=r.reject;return{config:o,reject:i}}),n=Br("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Hr(){var e=Le(function(n){var r=n.config,o=n.resolve,i=n.reject;return{config:r,resolve:o,reject:i}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){var r=n.m||n;Ft(r),e.resolve(r)},function(n){e.reject(n)})}function Ft(e){Le().monaco||Be({monaco:e})}function qr(){return Le(function(e){var t=e.monaco;return t})}var qe=new Promise(function(e,t){return Be({resolve:e,reject:t})}),Tt={config:Tr,init:Ar,__getMonacoInstance:qr},Wr={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},We=Wr,Gr={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Ur=Gr;function Kr({children:e}){return ye.createElement("div",{style:Ur.container},e)}var Xr=Kr,Qr=Xr;function Yr({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:i,wrapperProps:c}){return ye.createElement("section",{style:{...We.wrapper,width:e,height:t},...c},!n&&ye.createElement(Qr,null,r),ye.createElement("div",{ref:o,style:{...We.fullWidth,...!n&&We.hide},className:i}))}var Jr=Yr,At=d.memo(Jr);function Zr(e){d.useEffect(e,[])}var _t=Zr;function eo(e,t,n=!0){let r=d.useRef(!0);d.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var K=eo;function Ne(){}function xe(e,t,n,r){return to(e,r)||no(e,t,n,r)}function to(e,t){return e.editor.getModel(Bt(e,t))}function no(e,t,n,r){return e.editor.createModel(t,n,r?Bt(e,r):void 0)}function Bt(e,t){return e.Uri.parse(t)}function ro({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:i,modifiedModelPath:c,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:f="Loading...",options:x={},height:p="100%",width:M="100%",className:w,wrapperProps:h={},beforeMount:b=Ne,onMount:v=Ne}){let[m,S]=d.useState(!1),[j,g]=d.useState(!0),C=d.useRef(null),k=d.useRef(null),$=d.useRef(null),A=d.useRef(v),E=d.useRef(b),N=d.useRef(!1);_t(()=>{let z=Tt.init();return z.then(L=>(k.current=L)&&g(!1)).catch(L=>(L==null?void 0:L.type)!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>C.current?T():z.cancel()}),K(()=>{if(C.current&&k.current){let z=C.current.getOriginalEditor(),L=xe(k.current,e||"",r||n||"text",i||"");L!==z.getModel()&&z.setModel(L)}},[i],m),K(()=>{if(C.current&&k.current){let z=C.current.getModifiedEditor(),L=xe(k.current,t||"",o||n||"text",c||"");L!==z.getModel()&&z.setModel(L)}},[c],m),K(()=>{let z=C.current.getModifiedEditor();z.getOption(k.current.editor.EditorOption.readOnly)?z.setValue(t||""):t!==z.getValue()&&(z.executeEdits("",[{range:z.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),z.pushUndoStop())},[t],m),K(()=>{var z,L;(L=(z=C.current)==null?void 0:z.getModel())==null||L.original.setValue(e||"")},[e],m),K(()=>{let{original:z,modified:L}=C.current.getModel();k.current.editor.setModelLanguage(z,r||n||"text"),k.current.editor.setModelLanguage(L,o||n||"text")},[n,r,o],m),K(()=>{var z;(z=k.current)==null||z.editor.setTheme(u)},[u],m),K(()=>{var z;(z=C.current)==null||z.updateOptions(x)},[x],m);let P=d.useCallback(()=>{var V;if(!k.current)return;E.current(k.current);let z=xe(k.current,e||"",r||n||"text",i||""),L=xe(k.current,t||"",o||n||"text",c||"");(V=C.current)==null||V.setModel({original:z,modified:L})},[n,t,o,e,r,i,c]),I=d.useCallback(()=>{var z;!N.current&&$.current&&(C.current=k.current.editor.createDiffEditor($.current,{automaticLayout:!0,...x}),P(),(z=k.current)==null||z.editor.setTheme(u),S(!0),N.current=!0)},[x,u,P]);d.useEffect(()=>{m&&A.current(C.current,k.current)},[m]),d.useEffect(()=>{!j&&!m&&I()},[j,m,I]);function T(){var L,V,W,X;let z=(L=C.current)==null?void 0:L.getModel();a||((V=z==null?void 0:z.original)==null||V.dispose()),l||((W=z==null?void 0:z.modified)==null||W.dispose()),(X=C.current)==null||X.dispose()}return ye.createElement(At,{width:M,height:p,isEditorReady:m,loading:f,_ref:$,className:w,wrapperProps:h})}var oo=ro;d.memo(oo);function ao(e){let t=d.useRef();return d.useEffect(()=>{t.current=e},[e]),t.current}var io=ao,$e=new Map;function so({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:i,theme:c="light",line:a,loading:l="Loading...",options:u={},overrideServices:f={},saveViewState:x=!0,keepCurrentModel:p=!1,width:M="100%",height:w="100%",className:h,wrapperProps:b={},beforeMount:v=Ne,onMount:m=Ne,onChange:S,onValidate:j=Ne}){let[g,C]=d.useState(!1),[k,$]=d.useState(!0),A=d.useRef(null),E=d.useRef(null),N=d.useRef(null),P=d.useRef(m),I=d.useRef(v),T=d.useRef(),z=d.useRef(r),L=io(i),V=d.useRef(!1),W=d.useRef(!1);_t(()=>{let O=Tt.init();return O.then(D=>(A.current=D)&&$(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>E.current?Y():O.cancel()}),K(()=>{var D,q,te,J;let O=xe(A.current,e||r||"",t||o||"",i||n||"");O!==((D=E.current)==null?void 0:D.getModel())&&(x&&$e.set(L,(q=E.current)==null?void 0:q.saveViewState()),(te=E.current)==null||te.setModel(O),x&&((J=E.current)==null||J.restoreViewState($e.get(i))))},[i],g),K(()=>{var O;(O=E.current)==null||O.updateOptions(u)},[u],g),K(()=>{!E.current||r===void 0||(E.current.getOption(A.current.editor.EditorOption.readOnly)?E.current.setValue(r):r!==E.current.getValue()&&(W.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),E.current.pushUndoStop(),W.current=!1))},[r],g),K(()=>{var D,q;let O=(D=E.current)==null?void 0:D.getModel();O&&o&&((q=A.current)==null||q.editor.setModelLanguage(O,o))},[o],g),K(()=>{var O;a!==void 0&&((O=E.current)==null||O.revealLine(a))},[a],g),K(()=>{var O;(O=A.current)==null||O.editor.setTheme(c)},[c],g);let X=d.useCallback(()=>{var O;if(!(!N.current||!A.current)&&!V.current){I.current(A.current);let D=i||n,q=xe(A.current,r||e||"",t||o||"",D||"");E.current=(O=A.current)==null?void 0:O.editor.create(N.current,{model:q,automaticLayout:!0,...u},f),x&&E.current.restoreViewState($e.get(D)),A.current.editor.setTheme(c),a!==void 0&&E.current.revealLine(a),C(!0),V.current=!0}},[e,t,n,r,o,i,u,f,x,c,a]);d.useEffect(()=>{g&&P.current(E.current,A.current)},[g]),d.useEffect(()=>{!k&&!g&&X()},[k,g,X]),z.current=r,d.useEffect(()=>{var O,D;g&&S&&((O=T.current)==null||O.dispose(),T.current=(D=E.current)==null?void 0:D.onDidChangeModelContent(q=>{W.current||S(E.current.getValue(),q)}))},[g,S]),d.useEffect(()=>{if(g){let O=A.current.editor.onDidChangeMarkers(D=>{var te;let q=(te=E.current.getModel())==null?void 0:te.uri;if(q&&D.find(J=>J.path===q.path)){let J=A.current.editor.getModelMarkers({resource:q});j==null||j(J)}});return()=>{O==null||O.dispose()}}return()=>{}},[g,j]);function Y(){var O,D;(O=T.current)==null||O.dispose(),p?x&&$e.set(i,E.current.saveViewState()):(D=E.current.getModel())==null||D.dispose(),E.current.dispose()}return ye.createElement(At,{width:M,height:w,isEditorReady:g,loading:l,_ref:N,className:h,wrapperProps:b})}var lo=so,co=d.memo(lo),uo=co;function fo(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function po(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function ho(e){return e/100*window.innerHeight}function mo(e){return e/100*window.innerWidth}function go(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Ce({groupSize:e,panelElement:t,styleProp:n}){let r;const[o,i]=go(n);switch(i){case"%":{r=o/100*e;break}case"px":{r=o;break}case"rem":{r=po(t,o);break}case"em":{r=fo(t,o);break}case"vh":{r=ho(o);break}case"vw":{r=mo(o);break}}return r}function U(e){return parseFloat(e.toFixed(3))}function je({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,o)=>(r+=t==="horizontal"?o.element.offsetWidth:o.element.offsetHeight,r),0)}function Ue(e){const{panels:t}=e,n=je({group:e});return n===0?t.map(r=>({groupResizeBehavior:r.panelConstraints.groupResizeBehavior,collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:o,panelConstraints:i}=r;let c=0;if(i.collapsedSize!==void 0){const f=Ce({groupSize:n,panelElement:o,styleProp:i.collapsedSize});c=U(f/n*100)}let a;if(i.defaultSize!==void 0){const f=Ce({groupSize:n,panelElement:o,styleProp:i.defaultSize});a=U(f/n*100)}let l=0;if(i.minSize!==void 0){const f=Ce({groupSize:n,panelElement:o,styleProp:i.minSize});l=U(f/n*100)}let u=100;if(i.maxSize!==void 0){const f=Ce({groupSize:n,panelElement:o,styleProp:i.maxSize});u=U(f/n*100)}return{groupResizeBehavior:i.groupResizeBehavior,collapsedSize:c,collapsible:i.collapsible===!0,defaultSize:a,disabled:i.disabled,minSize:l,maxSize:u,panelId:r.id}})}function F(e,t="Assertion error"){if(!e)throw Error(t)}function Ke(e,t){return Array.from(t).sort(e==="horizontal"?xo:vo)}function xo(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function vo(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Vt(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Ht(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function yo({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let o,i=Number.MAX_VALUE;for(const c of t){const{x:a,y:l}=Ht(r,c),u=e==="horizontal"?a:l;u<i&&(i=u,o=c)}return F(o,"No rect found"),o}let De;function bo(){return De===void 0&&(typeof matchMedia=="function"?De=!!matchMedia("(pointer:coarse)").matches:De=!1),De}function qt(e){const{element:t,orientation:n,panels:r,separators:o}=e,i=Ke(n,Array.from(t.children).filter(Vt).map(w=>({element:w}))).map(({element:w})=>w),c=[];let a=!1,l=!1,u=-1,f=-1,x=0,p,M=[];{let w=-1;for(const h of i)h.hasAttribute("data-panel")&&(w++,h.ariaDisabled===null&&(x++,u===-1&&(u=w),f=w))}if(x>1){let w=-1;for(const h of i)if(h.hasAttribute("data-panel")){w++;const b=r.find(v=>v.element===h);if(b){if(p){const v=p.element.getBoundingClientRect(),m=h.getBoundingClientRect();let S;if(l){const j=n==="horizontal"?new DOMRect(v.right,v.top,0,v.height):new DOMRect(v.left,v.bottom,v.width,0),g=n==="horizontal"?new DOMRect(m.left,m.top,0,m.height):new DOMRect(m.left,m.top,m.width,0);switch(M.length){case 0:{S=[j,g];break}case 1:{const C=M[0],k=yo({orientation:n,rects:[v,m],targetRect:C.element.getBoundingClientRect()});S=[C,k===v?g:j];break}default:{S=M;break}}}else M.length?S=M:S=[n==="horizontal"?new DOMRect(v.right,m.top,m.left-v.right,m.height):new DOMRect(m.left,v.bottom,m.width,m.top-v.bottom)];for(const j of S){let g="width"in j?j:j.element.getBoundingClientRect();const C=bo()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(g.width<C){const $=C-g.width;g=new DOMRect(g.x-$/2,g.y,g.width+$,g.height)}if(g.height<C){const $=C-g.height;g=new DOMRect(g.x,g.y-$/2,g.width,g.height+$)}const k=w<=u||w>f;!a&&!k&&c.push({group:e,groupSize:je({group:e}),panels:[p,b],separator:"width"in j?void 0:j,rect:g}),a=!1}}l=!1,p=b,M=[]}}else if(h.hasAttribute("data-separator")){h.ariaDisabled!==null&&(a=!0);const b=o.find(v=>v.element===h);b?M.push(b):(p=void 0,M=[])}else l=!0}return c}var ae;class Wt{constructor(){ct(this,ae,{})}addListener(t,n){const r=ze(this,ae)[t];return r===void 0?ze(this,ae)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=ze(this,ae)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let o=!1,i=null;const c=Array.from(r);for(let a=0;a<c.length;a++){const l=c[a];try{l.call(null,n)}catch(u){i===null&&(o=!0,i=u)}}if(o)throw i}}removeAllListeners(){ut(this,ae,{})}removeListener(t,n){const r=ze(this,ae)[t];if(r!==void 0){const o=r.indexOf(n);o>=0&&r.splice(o,1)}}}ae=new WeakMap;let ee=new Map;const Gt=new Wt;function wo(e){ee=new Map(ee),ee.delete(e)}function xt(e,t){for(const[n]of ee)if(n.id===e)return n}function se(e,t){for(const[n,r]of ee)if(n.id===e)return r;if(t)throw Error(`Could not find data for Group with id ${e}`)}function pe(){return ee}function Je(e,t){return Gt.addListener("groupChange",n=>{n.group.id===e&&t(n)})}function oe(e,t){const n=ee.get(e);ee=new Map(ee),ee.set(e,t),Gt.emit("groupChange",{group:e,prev:n,next:t})}function jo(e,t,n){let r,o={x:1/0,y:1/0};for(const i of t){const c=Ht(n,i.rect);switch(e){case"horizontal":{c.x<=o.x&&(r=i,o=c);break}case"vertical":{c.y<=o.y&&(r=i,o=c);break}}}return r?{distance:o,hitRegion:r}:void 0}function So(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function zo(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:bt(e),b:bt(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();F(r,"Stacking order can only be calculated for elements with a common ancestor");const o={a:yt(vt(n.a)),b:yt(vt(n.b))};if(o.a===o.b){const i=r.childNodes,c={a:n.a.at(-1),b:n.b.at(-1)};let a=i.length;for(;a--;){const l=i[a];if(l===c.a)return 1;if(l===c.b)return-1}}return Math.sign(o.a-o.b)}const ko=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Co(e){const t=getComputedStyle(Ut(e)??e).display;return t==="flex"||t==="inline-flex"}function No(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Co(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||ko.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function vt(e){let t=e.length;for(;t--;){const n=e[t];if(F(n,"Missing node"),No(n))return n}return null}function yt(e){return e&&Number(getComputedStyle(e).zIndex)||0}function bt(e){const t=[];for(;e;)t.push(e),e=Ut(e);return t}function Ut(e){const{parentNode:t}=e;return So(t)?t.host:t}function Mo(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Po({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Vt(n)||n.contains(e)||e.contains(n))return!0;if(zo(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Mo(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function Ze(e,t){const n=[];return t.forEach((r,o)=>{if(o.disabled)return;const i=qt(o),c=jo(o.orientation,i,{x:e.clientX,y:e.clientY});c&&c.distance.x<=0&&c.distance.y<=0&&Po({groupElement:o.element,hitRegion:c.hitRegion.rect,pointerEventTarget:e.target})&&n.push(c.hitRegion)}),n}function Eo(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function G(e,t,n=0){return Math.abs(U(e)-U(t))<=n}function Z(e,t){return G(e,t)?0:e>t?1:-1}function ve({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:o=0,collapsible:i,disabled:c,maxSize:a=100,minSize:l=0}=t;if(c&&!e)return n;if(Z(r,l)<0)if(i){const u=(o+l)/2;Z(r,u)<0?r=o:r=l}else r=l;return r=Math.min(a,r),r=U(r),r}function Ee({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:o,trigger:i}){if(G(e,0))return t;const c=i==="imperative-api",a=Object.values(t),l=Object.values(o),u=[...a],[f,x]=r;F(f!=null,"Invalid first pivot index"),F(x!=null,"Invalid second pivot index");let p=0;switch(i){case"keyboard":{{const h=e<0?x:f,b=n[h];F(b,`Panel constraints not found for index ${h}`);const{collapsedSize:v=0,collapsible:m,minSize:S=0}=b;if(m){const j=a[h];if(F(j!=null,`Previous layout not found for panel index ${h}`),G(j,v)){const g=S-j;Z(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}{const h=e<0?f:x,b=n[h];F(b,`No panel constraints found for index ${h}`);const{collapsedSize:v=0,collapsible:m,minSize:S=0}=b;if(m){const j=a[h];if(F(j!=null,`Previous layout not found for panel index ${h}`),G(j,S)){const g=j-v;Z(g,Math.abs(e))>0&&(e=e<0?0-g:g)}}}break}default:{const h=e<0?x:f,b=n[h];F(b,`Panel constraints not found for index ${h}`);const v=a[h],{collapsible:m,collapsedSize:S,minSize:j}=b;if(m&&Z(v,j)<0)if(e>0){const g=j-S,C=g/2,k=v+e;Z(k,j)<0&&(e=Z(e,C)<=0?0:g)}else{const g=j-S,C=100-g/2,k=v-e;Z(k,j)<0&&(e=Z(100+e,C)>0?0:-g)}break}}{const h=e<0?1:-1;let b=e<0?x:f,v=0;for(;;){const S=a[b];F(S!=null,`Previous layout not found for panel index ${b}`);const j=ve({overrideDisabledPanels:c,panelConstraints:n[b],prevSize:S,size:100})-S;if(v+=j,b+=h,b<0||b>=n.length)break}const m=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-m:m}{let h=e<0?f:x;for(;h>=0&&h<n.length;){const b=Math.abs(e)-Math.abs(p),v=a[h];F(v!=null,`Previous layout not found for panel index ${h}`);const m=v-b,S=ve({overrideDisabledPanels:c,panelConstraints:n[h],prevSize:v,size:m});if(!G(v,S)&&(p+=v-S,u[h]=S,p.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?h--:h++}}if(Eo(l,u))return o;{const h=e<0?x:f,b=a[h];F(b!=null,`Previous layout not found for panel index ${h}`);const v=b+p,m=ve({overrideDisabledPanels:c,panelConstraints:n[h],prevSize:b,size:v});if(u[h]=m,!G(m,v)){let S=v-m,j=e<0?x:f;for(;j>=0&&j<n.length;){const g=u[j];F(g!=null,`Previous layout not found for panel index ${j}`);const C=g+S,k=ve({overrideDisabledPanels:c,panelConstraints:n[j],prevSize:g,size:C});if(G(g,k)||(S-=k-g,u[j]=k),G(S,0))break;e>0?j--:j++}}}const M=Object.values(u).reduce((h,b)=>b+h,0);if(!G(M,100,.1))return o;const w=Object.keys(o);return u.reduce((h,b,v)=>(h[w[v]]=b,h),{})}function ue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Z(e[n],t[n])!==0)return!1;return!0}function de({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],o=r.reduce((a,l)=>a+l,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(a=>`${a}%`).join(", ")}`);if(!G(o,100)&&r.length>0)for(let a=0;a<t.length;a++){const l=r[a];F(l!=null,`No layout data found for index ${a}`);const u=100/o*l;r[a]=u}let i=0;for(let a=0;a<t.length;a++){const l=n[a];F(l!=null,`No layout data found for index ${a}`);const u=r[a];F(u!=null,`No layout data found for index ${a}`);const f=ve({overrideDisabledPanels:!0,panelConstraints:t[a],prevSize:l,size:u});u!=f&&(i+=u-f,r[a]=f)}if(!G(i,0))for(let a=0;a<t.length;a++){const l=r[a];F(l!=null,`No layout data found for index ${a}`);const u=l+i,f=ve({overrideDisabledPanels:!0,panelConstraints:t[a],prevSize:l,size:u});if(l!==f&&(i-=f-l,r[a]=f,G(i,0)))break}const c=Object.keys(e);return r.reduce((a,l,u)=>(a[c[u]]=l,a),{})}function Kt({groupId:e,panelId:t}){const n=()=>{const a=pe();for(const[l,{defaultLayoutDeferred:u,derivedPanelConstraints:f,layout:x,groupSize:p,separatorToPanels:M}]of a)if(l.id===e)return{defaultLayoutDeferred:u,derivedPanelConstraints:f,group:l,groupSize:p,layout:x,separatorToPanels:M};throw Error(`Group ${e} not found`)},r=()=>{const a=n().derivedPanelConstraints.find(l=>l.panelId===t);if(a!==void 0)return a;throw Error(`Panel constraints not found for Panel ${t}`)},o=()=>{const a=n().group.panels.find(l=>l.id===t);if(a!==void 0)return a;throw Error(`Layout not found for Panel ${t}`)},i=()=>{const a=n().layout[t];if(a!==void 0)return a;throw Error(`Layout not found for Panel ${t}`)},c=a=>{const l=i();if(a===l)return;const{defaultLayoutDeferred:u,derivedPanelConstraints:f,group:x,groupSize:p,layout:M,separatorToPanels:w}=n(),h=x.panels.findIndex(S=>S.id===t),b=h===x.panels.length-1,v=Ee({delta:b?l-a:a-l,initialLayout:M,panelConstraints:f,pivotIndices:b?[h-1,h]:[h,h+1],prevLayout:M,trigger:"imperative-api"}),m=de({layout:v,panelConstraints:f});ue(M,m)||oe(x,{defaultLayoutDeferred:u,derivedPanelConstraints:f,groupSize:p,layout:m,separatorToPanels:w})};return{collapse:()=>{const{collapsible:a,collapsedSize:l}=r(),{mutableValues:u}=o(),f=i();a&&f!==l&&(u.expandToSize=f,c(l))},expand:()=>{const{collapsible:a,collapsedSize:l,minSize:u}=r(),{mutableValues:f}=o(),x=i();if(a&&x===l){let p=f.expandToSize??u;p===0&&(p=1),c(p)}},getSize:()=>{const{group:a}=n(),l=i(),{element:u}=o(),f=a.orientation==="horizontal"?u.offsetWidth:u.offsetHeight;return{asPercentage:l,inPixels:f}},isCollapsed:()=>{const{collapsible:a,collapsedSize:l}=r(),u=i();return a&&G(l,u)},resize:a=>{const{group:l}=n(),{element:u}=o(),f=je({group:l}),x=Ce({groupSize:f,panelElement:u,styleProp:a}),p=U(x/f*100);c(p)}}}function wt(e){if(e.defaultPrevented)return;const t=pe();Ze(e,t).forEach(n=>{if(n.separator){const r=n.panels.find(o=>o.panelConstraints.defaultSize!==void 0);if(r){const o=r.panelConstraints.defaultSize,i=Kt({groupId:n.group.id,panelId:r.id});i&&o!==void 0&&(i.resize(o),e.preventDefault())}}})}function Te(e){const t=pe();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function Xt({groupId:e}){const t=()=>{const n=pe();for(const[r,o]of n)if(r.id===e)return{group:r,...o};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:o,group:i,groupSize:c,layout:a,separatorToPanels:l}=t(),u=de({layout:n,panelConstraints:o});return r?a:(ue(a,u)||oe(i,{defaultLayoutDeferred:r,derivedPanelConstraints:o,groupSize:c,layout:u,separatorToPanels:l}),u)}}}function ce(e,t){const n=Te(e),r=se(n.id,!0),o=n.separators.find(f=>f.element===e);F(o,"Matching separator not found");const i=r.separatorToPanels.get(o);F(i,"Matching panels not found");const c=i.map(f=>n.panels.indexOf(f)),a=Xt({groupId:n.id}).getLayout(),l=Ee({delta:t,initialLayout:a,panelConstraints:r.derivedPanelConstraints,pivotIndices:c,prevLayout:a,trigger:"keyboard"}),u=de({layout:l,panelConstraints:r.derivedPanelConstraints});ue(a,u)||oe(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,groupSize:r.groupSize,layout:u,separatorToPanels:r.separatorToPanels})}function jt(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Te(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&ce(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&ce(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&ce(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&ce(t,-5);break}case"End":{e.preventDefault(),ce(t,100);break}case"Enter":{e.preventDefault();const r=Te(t),o=se(r.id,!0),{derivedPanelConstraints:i,layout:c,separatorToPanels:a}=o,l=r.separators.find(p=>p.element===t);F(l,"Matching separator not found");const u=a.get(l);F(u,"Matching panels not found");const f=u[0],x=i.find(p=>p.panelId===f.id);if(F(x,"Panel metadata not found"),x.collapsible){const p=c[f.id],M=x.collapsedSize===p?r.mutableState.expandedPanelSizes[f.id]??x.minSize:x.collapsedSize;ce(t,M-p)}break}case"F6":{e.preventDefault();const r=Te(t).separators.map(c=>c.element),o=Array.from(r).findIndex(c=>c===e.currentTarget);F(o!==null,"Index not found");const i=e.shiftKey?o>0?o-1:r.length-1:o+1<r.length?o+1:0;r[i].focus({preventScroll:!0});break}case"Home":{e.preventDefault(),ce(t,-100);break}}}let be={cursorFlags:0,state:"inactive"};const et=new Wt;function fe(){return be}function Lo(e){return et.addListener("change",e)}function Oo(e){const t=be,n={...be};n.cursorFlags=e,be=n,et.emit("change",{prev:t,next:n})}function we(e){const t=be;be=e,et.emit("change",{prev:t,next:e})}function St(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=pe(),n=Ze(e,t),r=new Map;let o=!1;n.forEach(i=>{i.separator&&(o||(o=!0,i.separator.element.focus({preventScroll:!0})));const c=t.get(i.group);c&&r.set(i.group,c.layout)}),we({cursorFlags:0,hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}),n.length&&e.preventDefault()}const Ro=e=>e,Ge=()=>{},Qt=1,Yt=2,Jt=4,Zt=8,zt=3,kt=12;let Ie;function Ct(){return Ie===void 0&&(Ie=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Ie=!0)),Ie}function $o({cursorFlags:e,groups:t,state:n}){let r=0,o=0;switch(n){case"active":case"hover":t.forEach(i=>{if(!i.mutableState.disableCursor)switch(i.orientation){case"horizontal":{r++;break}case"vertical":{o++;break}}})}if(!(r===0&&o===0)){switch(n){case"active":{if(e&&Ct()){const i=(e&Qt)!==0,c=(e&Yt)!==0,a=(e&Jt)!==0,l=(e&Zt)!==0;if(i)return a?"se-resize":l?"ne-resize":"e-resize";if(c)return a?"sw-resize":l?"nw-resize":"w-resize";if(a)return"s-resize";if(l)return"n-resize"}break}}return Ct()?r>0&&o>0?"move":r>0?"ew-resize":"ns-resize":r>0&&o>0?"grab":r>0?"col-resize":"row-resize"}}const Nt=new WeakMap;function tt(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=Nt.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets&&e.adoptedStyleSheets.push(n));const r=fe();switch(r.state){case"active":case"hover":{const o=$o({cursorFlags:r.cursorFlags,groups:r.hitRegions.map(c=>c.group),state:r.state}),i=`*, *:hover {cursor: ${o} !important; }`;if(t===i)return;t=i,o?n.cssRules.length===0?n.insertRule(i):n.replaceSync(i):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}Nt.set(e,{prevStyle:t,styleSheet:n})}function en({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:o,pointerDownAtPoint:i,prevCursorFlags:c}){let a=0;n.forEach(u=>{const{group:f,groupSize:x}=u,{orientation:p,panels:M}=f,{disableCursor:w}=f.mutableState;let h=0;i?p==="horizontal"?h=(t.clientX-i.x)/x*100:h=(t.clientY-i.y)/x*100:p==="horizontal"?h=t.clientX<0?-100:100:h=t.clientY<0?-100:100;const b=r.get(f),v=o.get(f);if(!b||!v)return;const{defaultLayoutDeferred:m,derivedPanelConstraints:S,groupSize:j,layout:g,separatorToPanels:C}=v;if(S&&g&&C){const k=Ee({delta:h,initialLayout:b,panelConstraints:S,pivotIndices:u.panels.map($=>M.indexOf($)),prevLayout:g,trigger:"mouse-or-touch"});if(ue(k,g)){if(h!==0&&!w)switch(p){case"horizontal":{a|=h<0?Qt:Yt;break}case"vertical":{a|=h<0?Jt:Zt;break}}}else oe(u.group,{defaultLayoutDeferred:m,derivedPanelConstraints:S,groupSize:j,layout:k,separatorToPanels:C})}});let l=0;t.movementX===0?l|=c&zt:l|=a&zt,t.movementY===0?l|=c&kt:l|=a&kt,Oo(l),tt(e)}function Mt(e){const t=pe(),n=fe();switch(n.state){case"active":en({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:t,prevCursorFlags:n.cursorFlags})}}function Pt(e){if(e.defaultPrevented)return;const t=fe(),n=pe();switch(t.state){case"active":{if(e.buttons===0){we({cursorFlags:0,state:"inactive"}),t.hitRegions.forEach(r=>{const o=se(r.group.id,!0);oe(r.group,o)});return}en({document:e.currentTarget,event:e,hitRegions:t.hitRegions,initialLayoutMap:t.initialLayoutMap,mountedGroups:n,pointerDownAtPoint:t.pointerDownAtPoint,prevCursorFlags:t.cursorFlags});break}default:{const r=Ze(e,n);r.length===0?t.state!=="inactive"&&we({cursorFlags:0,state:"inactive"}):we({cursorFlags:0,hitRegions:r,state:"hover"}),tt(e.currentTarget);break}}}function Et(e){if(e.relatedTarget instanceof HTMLIFrameElement)switch(fe().state){case"hover":we({cursorFlags:0,state:"inactive"})}}function Lt(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const t=fe();switch(t.state){case"active":we({cursorFlags:0,state:"inactive"}),t.hitRegions.length>0&&(tt(e.currentTarget),t.hitRegions.forEach(n=>{const r=se(n.group.id,!0);oe(n.group,r)}),e.preventDefault())}}function Ot(e){let t=0,n=0;const r={};for(const i of e)if(i.defaultSize!==void 0){t++;const c=U(i.defaultSize);n+=c,r[i.panelId]=c}else r[i.panelId]=void 0;const o=e.length-t;if(o!==0){const i=U((100-n)/o);for(const c of e)c.defaultSize===void 0&&(r[c.panelId]=i)}return r}function Do(e,t,n){if(!n[0])return;const r=e.panels.find(l=>l.element===t);if(!r||!r.onResize)return;const o=je({group:e}),i=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,c=r.mutableValues.prevSize,a={asPercentage:U(i/o*100),inPixels:i};r.mutableValues.prevSize=a,r.onResize(a,r.id,c)}function Io(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Fo({group:e,nextGroupSize:t,prevGroupSize:n,prevLayout:r}){if(n<=0||t<=0||n===t)return r;let o=0,i=0,c=!1;const a=new Map,l=[];for(const x of e.panels){const p=r[x.id]??0;switch(x.panelConstraints.groupResizeBehavior){case"preserve-pixel-size":{c=!0;const M=p/100*n,w=U(M/t*100);a.set(x.id,w),o+=w;break}case"preserve-relative-size":default:{l.push(x.id),i+=p;break}}}if(!c||l.length===0)return r;const u=100-o,f={...r};if(a.forEach((x,p)=>{f[p]=x}),i>0)for(const x of l){const p=r[x]??0;f[x]=U(p/i*u)}else{const x=U(u/l.length);for(const p of l)f[p]=x}return f}function To(e,t){const n=e.map(o=>o.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!r.includes(o))return!1;return!0}const me=new Map;function Ao(e){let t=!0;F(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,o=new Set,i=new n(w=>{for(const h of w){const{borderBoxSize:b,target:v}=h;if(v===e.element){if(t){const m=je({group:e});if(m===0)return;const S=se(e.id);if(!S)return;const j=Ue(e),g=S.defaultLayoutDeferred?Ot(j):S.layout,C=Fo({group:e,nextGroupSize:m,prevGroupSize:S.groupSize,prevLayout:g}),k=de({layout:C,panelConstraints:j});if(!S.defaultLayoutDeferred&&ue(S.layout,k)&&Io(S.derivedPanelConstraints,j)&&S.groupSize===m)return;oe(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:j,groupSize:m,layout:k,separatorToPanels:S.separatorToPanels})}}else Do(e,v,b)}});i.observe(e.element),e.panels.forEach(w=>{F(!r.has(w.id),`Panel ids must be unique; id "${w.id}" was used more than once`),r.add(w.id),w.onResize&&i.observe(w.element)});const c=je({group:e}),a=Ue(e),l=e.panels.map(({id:w})=>w).join(",");let u=e.mutableState.defaultLayout;u&&(To(e.panels,u)||(u=void 0));const f=e.mutableState.layouts[l]??u??Ot(a),x=de({layout:f,panelConstraints:a}),p=e.element.ownerDocument;me.set(p,(me.get(p)??0)+1);const M=new Map;return qt(e).forEach(w=>{w.separator&&M.set(w.separator,w.panels)}),oe(e,{defaultLayoutDeferred:c===0,derivedPanelConstraints:a,groupSize:c,layout:x,separatorToPanels:M}),e.separators.forEach(w=>{F(!o.has(w.id),`Separator ids must be unique; id "${w.id}" was used more than once`),o.add(w.id),w.element.addEventListener("keydown",jt)}),me.get(p)===1&&(p.addEventListener("dblclick",wt,!0),p.addEventListener("pointerdown",St,!0),p.addEventListener("pointerleave",Mt),p.addEventListener("pointermove",Pt),p.addEventListener("pointerout",Et),p.addEventListener("pointerup",Lt,!0)),function(){t=!1,me.set(p,Math.max(0,(me.get(p)??0)-1)),wo(e),e.separators.forEach(w=>{w.element.removeEventListener("keydown",jt)}),me.get(p)||(p.removeEventListener("dblclick",wt,!0),p.removeEventListener("pointerdown",St,!0),p.removeEventListener("pointerleave",Mt),p.removeEventListener("pointermove",Pt),p.removeEventListener("pointerout",Et),p.removeEventListener("pointerup",Lt,!0)),i.disconnect()}}function _o(){const[e,t]=d.useState({}),n=d.useCallback(()=>t({}),[]);return[e,n]}function nt(e){const t=d.useId();return`${e??t}`}const he=typeof window<"u"?d.useLayoutEffect:d.useEffect;function Me(e){const t=d.useRef(e);return he(()=>{t.current=e},[e]),d.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function rt(...e){return Me(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function ot(e){const t=d.useRef({...e});return he(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const tn=d.createContext(null);function Bo(e,t){const n=d.useRef({getLayout:()=>({}),setLayout:Ro});d.useImperativeHandle(t,()=>n.current,[]),he(()=>{Object.assign(n.current,Xt({groupId:e}))})}function Xe({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:o,elementRef:i,groupRef:c,id:a,onLayoutChange:l,onLayoutChanged:u,orientation:f="horizontal",resizeTargetMinimumSize:x={coarse:20,fine:10},style:p,...M}){const w=d.useRef({onLayoutChange:{},onLayoutChanged:{}}),h=Me(N=>{ue(w.current.onLayoutChange,N)||(w.current.onLayoutChange=N,l==null||l(N))}),b=Me(N=>{ue(w.current.onLayoutChanged,N)||(w.current.onLayoutChanged=N,u==null||u(N))}),v=nt(a),m=d.useRef(null),[S,j]=_o(),g=d.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:x,separators:[]}),C=rt(m,i);Bo(v,c);const k=Me((N,P)=>{const I=fe(),T=xt(N),z=se(N);if(z){let L=!1;switch(I.state){case"active":{L=I.hitRegions.some(V=>V.group===T);break}}return{flexGrow:z.layout[P]??1,pointerEvents:L?"none":void 0}}return{flexGrow:(n==null?void 0:n[P])??1}}),$=ot({defaultLayout:n,disableCursor:r}),A=d.useMemo(()=>({get disableCursor(){return!!$.disableCursor},getPanelStyles:k,id:v,orientation:f,registerPanel:N=>{const P=g.current;return P.panels=Ke(f,[...P.panels,N]),j(),()=>{P.panels=P.panels.filter(I=>I!==N),j()}},registerSeparator:N=>{const P=g.current;return P.separators=Ke(f,[...P.separators,N]),j(),()=>{P.separators=P.separators.filter(I=>I!==N),j()}},togglePanelDisabled:(N,P)=>{const I=g.current.panels.find(L=>L.id===N);I&&(I.panelConstraints.disabled=P);const T=xt(v),z=se(v);T&&z&&oe(T,{...z,derivedPanelConstraints:Ue(T)})},toggleSeparatorDisabled:(N,P)=>{const I=g.current.separators.find(T=>T.id===N);I&&(I.disabled=P)}}),[k,v,j,f,$]),E=d.useRef(null);return he(()=>{const N=m.current;if(N===null)return;const P=g.current;let I;if($.defaultLayout!==void 0&&Object.keys($.defaultLayout).length===P.panels.length){I={};for(const Y of P.panels){const O=$.defaultLayout[Y.id];O!==void 0&&(I[Y.id]=O)}}const T={disabled:!!o,element:N,id:v,mutableState:{defaultLayout:I,disableCursor:!!$.disableCursor,expandedPanelSizes:g.current.lastExpandedPanelSizes,layouts:g.current.layouts},orientation:f,panels:P.panels,resizeTargetMinimumSize:P.resizeTargetMinimumSize,separators:P.separators};E.current=T;const z=Ao(T),{defaultLayoutDeferred:L,derivedPanelConstraints:V,layout:W}=se(T.id,!0);!L&&V.length>0&&(h(W),b(W));const X=Je(v,Y=>{const{defaultLayoutDeferred:O,derivedPanelConstraints:D,layout:q}=Y.next;if(O||D.length===0)return;const te=T.panels.map(({id:Q})=>Q).join(",");T.mutableState.layouts[te]=q,D.forEach(Q=>{if(Q.collapsible){const{layout:Se}=Y.prev??{};if(Se){const Oe=G(Q.collapsedSize,q[Q.panelId]),Ve=G(Q.collapsedSize,Se[Q.panelId]);Oe&&!Ve&&(T.mutableState.expandedPanelSizes[Q.panelId]=Se[Q.panelId])}}});const J=fe().state!=="active";h(q),J&&b(q)});return()=>{E.current=null,z(),X()}},[o,v,b,h,f,S,$]),d.useEffect(()=>{const N=E.current;N&&(N.mutableState.defaultLayout=n,N.mutableState.disableCursor=!!r)}),s.jsx(tn.Provider,{value:A,children:s.jsx("div",{...M,className:t,"data-group":!0,"data-testid":v,id:v,ref:C,style:{height:"100%",width:"100%",overflow:"hidden",...p,display:"flex",flexDirection:f==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:f==="horizontal"?"pan-y":"pan-x"},children:e})})}Xe.displayName="Group";function at(){const e=d.useContext(tn);return F(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Vo(e,t){const{id:n}=at(),r=d.useRef({collapse:Ge,expand:Ge,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Ge});d.useImperativeHandle(t,()=>r.current,[]),he(()=>{Object.assign(r.current,Kt({groupId:n,panelId:e}))})}function ge({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:o,disabled:i,elementRef:c,groupResizeBehavior:a="preserve-relative-size",id:l,maxSize:u="100%",minSize:f="0%",onResize:x,panelRef:p,style:M,...w}){const h=!!l,b=nt(l),v=ot({disabled:i}),m=d.useRef(null),S=rt(m,c),{getPanelStyles:j,id:g,orientation:C,registerPanel:k,togglePanelDisabled:$}=at(),A=x!==null,E=Me((P,I,T)=>{x==null||x(P,l,T)});he(()=>{const P=m.current;if(P!==null){const I={element:P,id:b,idIsStable:h,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:A?E:void 0,panelConstraints:{groupResizeBehavior:a,collapsedSize:n,collapsible:r,defaultSize:o,disabled:v.disabled,maxSize:u,minSize:f}};return k(I)}},[a,n,r,o,A,b,h,u,f,E,k,v]),d.useEffect(()=>{$(b,!!i)},[i,b,$]),Vo(b,p);const N=d.useSyncExternalStore(P=>Je(g,P),()=>JSON.stringify(j(g,b)),()=>JSON.stringify(j(g,b)));return s.jsx("div",{...w,"aria-disabled":i||void 0,"data-panel":!0,"data-testid":b,id:b,ref:S,style:{...Ho,display:"flex",flexBasis:0,flexShrink:1,overflow:"visible",...JSON.parse(N)},children:s.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,overflow:"auto",...M,touchAction:C==="horizontal"?"pan-y":"pan-x"},children:e})})}ge.displayName="Panel";const Ho={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function qo({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let o,i;const c=e[n],a=t.find(l=>l.panelId===n);if(a){const l=a.maxSize,u=a.collapsible?a.collapsedSize:a.minSize,f=[r,r+1];i=de({layout:Ee({delta:u-c,initialLayout:e,panelConstraints:t,pivotIndices:f,prevLayout:e}),panelConstraints:t})[n],o=de({layout:Ee({delta:l-c,initialLayout:e,panelConstraints:t,pivotIndices:f,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:o,valueMin:i,valueNow:c}}function Ae({children:e,className:t,disabled:n,elementRef:r,id:o,style:i,...c}){const a=nt(o),l=ot({disabled:n}),[u,f]=d.useState({}),[x,p]=d.useState("inactive"),M=d.useRef(null),w=rt(M,r),{disableCursor:h,id:b,orientation:v,registerSeparator:m,toggleSeparatorDisabled:S}=at(),j=v==="horizontal"?"vertical":"horizontal";he(()=>{const C=M.current;if(C!==null){const k={disabled:l.disabled,element:C,id:a},$=m(k),A=Lo(N=>{p(N.next.state!=="inactive"&&N.next.hitRegions.some(P=>P.separator===k)?N.next.state:"inactive")}),E=Je(b,N=>{const{derivedPanelConstraints:P,layout:I,separatorToPanels:T}=N.next,z=T.get(k);if(z){const L=z[0],V=z.indexOf(L);f(qo({layout:I,panelConstraints:P,panelId:L.id,panelIndex:V}))}});return()=>{A(),E(),$()}}},[b,a,m,l]),d.useEffect(()=>{S(a,!!n)},[n,a,S]);let g;return n&&!h&&(g="not-allowed"),s.jsx("div",{...c,"aria-controls":u.valueControls,"aria-disabled":n||void 0,"aria-orientation":j,"aria-valuemax":u.valueMax,"aria-valuemin":u.valueMin,"aria-valuenow":u.valueNow,children:e,className:t,"data-separator":n?"disabled":x,"data-testid":a,id:a,ref:w,role:"separator",style:{flexBasis:"auto",cursor:g,...i,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}Ae.displayName="Separator";const Wo={ghost:"hover:bg-[#F8F4F0] text-[#36342E]",subtle:"hover:bg-[#ECEAE3] text-[#6B6960]"},Go={sm:"w-7 h-7",md:"w-8 h-8"},Uo={sm:14,md:16};function Fe({icon:e,label:t,size:n="md",variant:r="ghost",onClick:o,className:i="",disabled:c=!1,title:a}){return s.jsx("button",{type:"button","aria-label":t,title:a,disabled:c,onClick:o,className:["inline-flex items-center justify-center rounded-btn transition-colors",Wo[r],Go[n],c?"opacity-40 cursor-not-allowed":"",i].filter(Boolean).join(" "),children:s.jsx(e,{size:Uo[n]})})}function Ko({sessionId:e}){const[t,n]=d.useState([]),[r,o]=d.useState(""),[i,c]=d.useState("quick"),[a,l]=d.useState(!1),u=d.useRef(null),f=d.useRef(null);d.useEffect(()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight)},[t]);const x=async()=>{var w;const p=r.trim();if(!p||a)return;const M={role:"user",content:p,timestamp:new Date().toISOString()};n(h=>[...h,M]),o(""),l(!0);try{const h=await re.chatMessage(e,p,i),b={role:"system",content:h.output||"Done.",timestamp:new Date().toISOString(),filesChanged:h.files_changed};n(v=>[...v,b])}catch(h){const b={role:"system",content:`Error: ${h instanceof Error?h.message:"Request failed"}`,timestamp:new Date().toISOString()};n(v=>[...v,b])}finally{l(!1),(w=f.current)==null||w.focus()}};return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{ref:u,className:"flex-1 overflow-y-auto p-3 space-y-3 terminal-scroll",children:[t.length===0&&s.jsx("div",{className:"text-xs text-muted text-center py-8",children:"Send a message to iterate on your project."}),t.map((p,M)=>s.jsx("div",{className:`flex ${p.role==="user"?"justify-end":"justify-start"}`,children:s.jsxs("div",{className:`max-w-[80%] rounded-lg px-3 py-2 text-xs ${p.role==="user"?"bg-primary/10 text-ink":"bg-hover text-ink"}`,children:[s.jsx("p",{className:"whitespace-pre-wrap",children:p.content}),p.filesChanged&&p.filesChanged.length>0&&s.jsxs("div",{className:"mt-2 pt-2 border-t border-border",children:[s.jsx("span",{className:"text-[10px] text-muted font-semibold uppercase",children:"Files changed:"}),s.jsx("ul",{className:"mt-1 space-y-0.5",children:p.filesChanged.map((w,h)=>s.jsx("li",{className:"text-[10px] font-mono text-muted",children:w},h))})]})]})},M)),a&&s.jsx("div",{className:"flex justify-start",children:s.jsxs("div",{className:"bg-hover text-ink rounded-lg px-3 py-2 text-xs",children:["Building",s.jsx("span",{className:"animate-pulse",children:"..."})]})})]}),s.jsxs("div",{className:"border-t border-border p-2 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[s.jsx("button",{onClick:()=>c("quick"),className:`text-[10px] font-semibold px-2 py-0.5 rounded-btn transition-colors ${i==="quick"?"bg-primary text-white":"text-muted hover:text-ink"}`,children:"Quick"}),s.jsx("button",{onClick:()=>c("standard"),className:`text-[10px] font-semibold px-2 py-0.5 rounded-btn transition-colors ${i==="standard"?"bg-primary text-white":"text-muted hover:text-ink"}`,children:"Standard"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{ref:f,type:"text",value:r,onChange:p=>o(p.target.value),onKeyDown:p=>{p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),x())},placeholder:"Ask AI to modify your project...",className:"flex-1 px-3 py-1.5 text-xs bg-card border border-border rounded-btn outline-none focus:border-primary transition-colors",disabled:a}),s.jsx(fn,{size:"sm",icon:Qn,onClick:x,disabled:a||!r.trim(),"aria-label":"Send message",children:"Send"})]})]})]})}const Rt=[{id:"build",label:"Build Log",icon:er},{id:"agents",label:"Agents",icon:wn},{id:"quality",label:"Quality",icon:Jn},{id:"chat",label:"AI Chat",icon:Gn}];function Xo({status:e}){switch(e){case"pass":return s.jsx(hn,{size:12,className:"text-success"});case"fail":return s.jsx(Ye,{size:12,className:"text-danger"});default:return s.jsx(pn,{size:12,className:"text-muted"})}}function Qo({agents:e}){return!e||e.length===0?s.jsx("div",{className:"p-4 text-xs text-muted",children:"No agents running."}):s.jsx("div",{className:"p-2 space-y-1 overflow-y-auto terminal-scroll",children:e.map(t=>s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-btn bg-hover text-xs",children:[s.jsx("span",{className:"font-semibold text-ink truncate",children:t.name}),s.jsx("span",{className:"text-[10px] font-mono text-muted-accessible px-1.5 py-0.5 rounded-btn bg-card",children:t.type}),s.jsx("span",{className:`text-[10px] font-semibold ${t.status==="running"?"text-success":"text-muted"}`,children:t.status}),s.jsx("span",{className:"ml-auto text-[10px] text-muted-accessible font-mono truncate max-w-[200px]",children:t.task})]},t.id))})}function Yo({checklist:e}){return!e||!e.items||e.items.length===0?s.jsx("div",{className:"p-4 text-xs text-muted",children:"No quality gate data available."}):s.jsxs("div",{className:"p-2 space-y-1 overflow-y-auto terminal-scroll",children:[s.jsxs("div",{className:"flex items-center gap-3 px-3 py-1 text-[10px] text-muted-accessible font-semibold uppercase",children:[s.jsx("span",{children:"Gate"}),s.jsxs("span",{className:"ml-auto",children:[e.passed,"/",e.total," passed"]})]}),e.items.map(t=>s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 rounded-btn hover:bg-hover text-xs",children:[s.jsx(Xo,{status:t.status}),s.jsx("span",{className:"text-ink",children:t.label}),t.details&&s.jsx("span",{className:"ml-auto text-[10px] text-muted-accessible truncate max-w-[200px]",children:t.details})]},t.id))]})}function Jo({logs:e,logsLoading:t,agents:n,checklist:r,sessionId:o,subscribe:i}){var l;const[c,a]=d.useState("build");return s.jsxs("div",{className:"h-full flex flex-col bg-card",children:[s.jsx("div",{role:"tablist",className:"flex items-center border-b border-border px-2 flex-shrink-0",children:Rt.map(u=>{const f=u.icon,x=c===u.id;return s.jsxs("button",{role:"tab","aria-selected":x,onClick:()=>a(u.id),className:`flex items-center gap-1.5 px-3 py-2 text-xs font-medium transition-colors border-b-2 ${x?"border-primary text-primary":"border-transparent text-muted hover:text-ink"}`,children:[s.jsx(f,{size:14}),u.label]},u.id)})}),s.jsxs("div",{role:"tabpanel","aria-label":(l=Rt.find(u=>u.id===c))==null?void 0:l.label,className:"flex-1 min-h-0 overflow-hidden",children:[c==="build"&&s.jsx(un,{logs:e,loading:t,subscribe:i}),c==="agents"&&s.jsx(Qo,{agents:n}),c==="quality"&&s.jsx(Yo,{checklist:r}),c==="chat"&&s.jsx(Ko,{sessionId:o})]})]})}function Qe(e,t,n){var i;if(t==="directory")return n?s.jsx(_n,{size:14}):s.jsx(qn,{size:14});const r=((i=e.split(".").pop())==null?void 0:i.toLowerCase())||"";return{js:s.jsx(ne,{size:14,className:"text-yellow-600"}),ts:s.jsx(ne,{size:14,className:"text-blue-500"}),tsx:s.jsx(ne,{size:14,className:"text-blue-400"}),jsx:s.jsx(ne,{size:14,className:"text-yellow-500"}),py:s.jsx(ne,{size:14,className:"text-green-600"}),html:s.jsx(En,{size:14,className:"text-orange-500"}),css:s.jsx(In,{size:14,className:"text-purple-500"}),json:s.jsx(Nn,{size:14,className:"text-green-500"}),md:s.jsx($n,{size:14,className:"text-muted"}),go:s.jsx(ne,{size:14,className:"text-cyan-600"}),rs:s.jsx(ne,{size:14,className:"text-orange-600"}),rb:s.jsx(ne,{size:14,className:"text-red-500"}),sh:s.jsx(ne,{size:14,className:"text-green-600"})}[r]||s.jsx(Tn,{size:14})}function Zo(e){var o;const t=((o=e.split(".").pop())==null?void 0:o.toLowerCase())||"",n={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",html:"html",htm:"html",css:"css",scss:"scss",less:"less",json:"json",md:"markdown",go:"go",rs:"rust",sh:"shell",bash:"shell",yml:"yaml",yaml:"yaml",xml:"xml",svg:"xml",sql:"sql",java:"java",kt:"kotlin",rb:"ruby",dockerfile:"dockerfile"},r=e.toLowerCase();return r==="dockerfile"?"dockerfile":r==="makefile"?"makefile":n[t]||"plaintext"}function nn(e){for(const t of e)if(t.type==="file"&&t.name.endsWith(".html")||t.children&&nn(t.children))return!0;return!1}function rn(e,t){for(const n of e){if(n.path===t)return n.size;if(n.children){const r=rn(n.children,t);if(r!==void 0)return r}}}function on(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function an({nodes:e,selectedPath:t,onSelect:n,onDelete:r,depth:o=0}){const[i,c]=d.useState(()=>{const a=new Set;return o<2&&e.filter(l=>l.type==="directory").forEach(l=>a.add(l.path)),a});return s.jsx("div",{role:o===0?"tree":"group",children:e.map(a=>{const l=a.type==="directory",u=i.has(a.path),f=a.path===t;return s.jsxs("div",{className:"group/file",children:[s.jsxs("button",{role:"treeitem","aria-label":a.name,"aria-selected":f,...l?{"aria-expanded":u}:{},onClick:()=>{l?c(x=>{const p=new Set(x);return p.has(a.path)?p.delete(a.path):p.add(a.path),p}):n(a.path,a.name)},className:`w-full text-left flex items-center gap-1.5 px-2 py-1 text-xs font-mono rounded transition-colors ${f?"bg-primary/10 text-primary":"text-ink/70 hover:bg-hover"}`,style:{paddingLeft:`${o*14+8}px`},children:[l?s.jsx("span",{className:"w-3 flex items-center justify-center flex-shrink-0 text-muted",children:u?s.jsx(Sn,{size:12}):s.jsx(kn,{size:12})}):s.jsx("span",{className:"w-3 flex-shrink-0"}),s.jsx("span",{className:`w-5 flex items-center justify-center flex-shrink-0 ${l?"text-primary":""}`,children:Qe(a.name,a.type,u)}),s.jsxs("span",{className:"truncate",children:[a.name,l?"/":""]}),!l&&a.size!=null&&a.size>0&&s.jsx("span",{className:"text-[10px] text-muted/40 ml-auto flex-shrink-0",children:on(a.size)}),!l&&r&&s.jsx("span",{role:"button",tabIndex:-1,onClick:x=>{x.stopPropagation(),r(a.path,a.name)},onKeyDown:x=>{x.key==="Enter"&&(x.stopPropagation(),r(a.path,a.name))},className:"text-muted/30 hover:text-danger ml-1 flex-shrink-0 opacity-0 group-hover/file:opacity-100 transition-opacity cursor-pointer",title:"Delete file",children:s.jsx(Ye,{size:12})})]}),l&&u&&a.children&&s.jsx(an,{nodes:a.children,selectedPath:t,onSelect:n,onDelete:r,depth:o+1})]},a.path)})})}function sn(e,t=""){const n=[];for(const r of e)r.type==="file"&&n.push({path:r.path,name:r.name}),r.children&&n.push(...sn(r.children,r.path+"/"));return n}function ea({session:e,onClose:t}){var it;const[n,r]=d.useState(null),[o,i]=d.useState(""),[c,a]=d.useState(null),[l,u]=d.useState(null),[f,x]=d.useState(!1),[p,M]=d.useState(!1),[w,h]=d.useState(!1),[b,v]=d.useState(!1),[m,S]=d.useState(e),j=d.useRef(null),[g,C]=d.useState([]),[k,$]=d.useState(!1),[A,E]=d.useState(""),N=d.useRef(null),P=d.useRef(null),[I,T]=d.useState(0),z=nn(m.files),L=`/api/sessions/${encodeURIComponent(m.id)}/preview/index.html`,V=d.useCallback(async()=>{try{const y=await re.getSessionDetail(m.id);S(y)}catch{}},[m.id]),W=d.useCallback(async(y,R)=>{w&&n&&l!==null&&C(B=>B.map(le=>le.path===n?{...le,content:l,modified:!0}:le));const _=g.find(B=>B.path===y);if(_){r(y),i(R),a(_.content),u(_.content),h(_.modified);return}r(y),i(R),x(!0),h(!1);try{const B=m.id?await re.getSessionFileContent(m.id,y):await re.getFileContent(y);a(B.content),u(B.content),C(le=>[...le,{path:y,name:R,content:B.content,modified:!1}])}catch{a("[Error loading file]"),u("[Error loading file]")}finally{x(!1)}},[m.id,w,n,l,g]),X=d.useCallback(async()=>{var y;if(!(!n||l===null||!m.id)){v(!0);try{await re.saveSessionFile(m.id,n,l),a(l),h(!1),C(_=>_.map(B=>B.path===n?{...B,content:l,modified:!1}:B));const R=((y=n.split(".").pop())==null?void 0:y.toLowerCase())||"";["html","css","js","jsx","ts","tsx"].includes(R)&&T(_=>_+1)}catch(R){const _=R instanceof Error?R.message:"Unknown error";window.alert(`Save failed: ${_}`)}finally{v(!1)}}},[n,l,m.id]),Y=d.useCallback(y=>{const R=g.find(_=>_.path===y);if(!(R!=null&&R.modified&&!window.confirm("Unsaved changes. Close anyway?"))&&(C(_=>_.filter(B=>B.path!==y)),n===y)){const _=g.filter(B=>B.path!==y);if(_.length>0){const B=_[_.length-1];r(B.path),i(B.name),a(B.content),u(B.content),h(B.modified)}else r(null),i(""),a(null),u(null),h(!1)}},[g,n]);d.useEffect(()=>{const y=R=>{(R.metaKey||R.ctrlKey)&&R.key==="s"&&(R.preventDefault(),w&&n&&X()),(R.metaKey||R.ctrlKey)&&R.key==="p"&&(R.preventDefault(),$(_=>!_),E("")),R.key==="Escape"&&k&&$(!1)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[w,n,X,k]),d.useEffect(()=>{k&&N.current&&N.current.focus()},[k]);const O=sn(m.files),D=A?O.filter(y=>y.path.toLowerCase().includes(A.toLowerCase())):O;d.useEffect(()=>{const y=m.files.find(R=>R.name==="index.html"&&R.type==="file");y&&(W(y.path,y.name),M(!0))},[]);const q=d.useCallback(y=>{y!==void 0&&(u(y),h(y!==c))},[c]),te=d.useCallback(y=>{j.current=y},[]),J=d.useCallback(async()=>{const y=window.prompt("New file name (e.g. src/utils.ts):");if(!(!y||!y.trim()))try{await re.createSessionFile(m.id,y.trim()),await V()}catch(R){const _=R instanceof Error?R.message:"Unknown error";window.alert(`Create file failed: ${_}`)}},[m.id,V]),Q=d.useCallback(async()=>{const y=window.prompt("New folder name (e.g. src/components):");if(!(!y||!y.trim()))try{await re.createSessionDirectory(m.id,y.trim()),await V()}catch(R){const _=R instanceof Error?R.message:"Unknown error";window.alert(`Create folder failed: ${_}`)}},[m.id,V]),Se=d.useCallback(async(y,R)=>{if(window.confirm(`Delete "${R}"?`))try{await re.deleteSessionFile(m.id,y),n===y&&(r(null),i(""),a(null),u(null),h(!1)),await V()}catch(B){const le=B instanceof Error?B.message:"Unknown error";window.alert(`Delete failed: ${le}`)}},[m.id,n,V]),Oe=n?rn(m.files,n):void 0,Ve=((it=o.split(".").pop())==null?void 0:it.toUpperCase())||"";return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"bg-card px-3 py-2 flex items-center gap-3 flex-shrink-0 border-b border-border",children:[s.jsx("button",{onClick:()=>{w&&!window.confirm("Unsaved changes. Discard?")||t()},className:"text-xs font-medium px-3 py-1.5 rounded-btn border border-border text-muted hover:text-ink hover:bg-hover transition-colors",children:"Back"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h2",{className:"text-sm font-bold text-ink truncate",children:m.id}),s.jsx("p",{className:"text-[10px] font-mono text-muted-accessible truncate",children:m.path})]}),s.jsx("span",{className:`text-[10px] font-semibold px-2 py-0.5 rounded-full ${m.status==="completed"||m.status==="completion_promise_fulfilled"?"bg-success/10 text-success":"bg-muted/10 text-muted"}`,children:m.status}),z&&s.jsx("button",{onClick:()=>M(!p),className:`text-xs font-medium px-3 py-1.5 rounded-btn border transition-colors ${p?"border-primary/40 bg-primary/10 text-primary":"border-border text-muted hover:text-ink hover:bg-hover"}`,children:p?"Hide Preview":"Preview"})]}),s.jsx("div",{className:"flex-1 min-h-0",children:s.jsxs(Xe,{orientation:"vertical",children:[s.jsx(ge,{defaultSize:70,minSize:40,children:s.jsxs(Xe,{orientation:"horizontal",className:"h-full",children:[s.jsx(ge,{defaultSize:20,minSize:15,children:s.jsxs("div",{className:"h-full flex flex-col border-r border-border bg-card",children:[s.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center gap-2",children:[s.jsx("span",{className:"text-[10px] text-muted-accessible uppercase tracking-wider font-semibold flex-1",children:"Files"}),s.jsxs("button",{onClick:J,title:"New File",className:"flex items-center gap-1 text-[10px] text-muted-accessible hover:text-primary px-1.5 py-0.5 rounded border border-border hover:border-primary/30 transition-colors",children:[s.jsx(On,{size:12})," New"]}),s.jsxs("button",{onClick:Q,title:"New Folder",className:"flex items-center gap-1 text-[10px] text-muted-accessible hover:text-primary px-1.5 py-0.5 rounded border border-border hover:border-primary/30 transition-colors",children:[s.jsx(Vn,{size:12})," New"]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto terminal-scroll",children:m.files.length>0?s.jsx(an,{nodes:m.files,selectedPath:n,onSelect:W,onDelete:Se}):s.jsx("div",{className:"p-4 text-xs text-muted",children:"No files"})})]})}),s.jsx(Ae,{className:"w-1 bg-border hover:bg-primary/30 transition-colors cursor-col-resize"}),s.jsx(ge,{defaultSize:p?50:80,minSize:25,children:s.jsxs("div",{className:"h-full flex flex-col min-w-0",children:[g.length>0&&s.jsx("div",{className:"flex items-center border-b border-border bg-hover overflow-x-auto flex-shrink-0",children:g.map(y=>s.jsxs("button",{onClick:()=>W(y.path,y.name),className:`flex items-center gap-1.5 px-3 py-1.5 text-[11px] font-mono border-r border-border whitespace-nowrap transition-colors ${y.path===n?"bg-card text-ink":"text-muted hover:text-ink hover:bg-card"}`,children:[s.jsx("span",{className:"w-4 flex items-center justify-center",children:Qe(y.name,"file")}),y.name,y.modified&&s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),s.jsx("span",{role:"button",tabIndex:-1,onClick:R=>{R.stopPropagation(),Y(y.path)},onKeyDown:R=>{R.key==="Enter"&&(R.stopPropagation(),Y(y.path))},className:"text-muted/30 hover:text-danger ml-1 cursor-pointer",children:s.jsx(Ye,{size:12})})]},y.path))}),n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"px-4 py-1.5 border-b border-border flex items-center gap-2 flex-shrink-0 bg-hover",children:[s.jsx("span",{className:"text-xs font-mono text-ink/60 truncate",children:n}),b&&s.jsx("span",{className:"text-[10px] text-primary animate-pulse flex-shrink-0",children:"Saving..."}),s.jsx("span",{className:"ml-auto text-[10px] text-muted/50 font-mono",children:Oe!=null?on(Oe):""}),s.jsx("span",{className:"text-[10px] text-muted/40 font-mono uppercase",children:Ve}),w&&s.jsx("button",{onClick:X,className:"text-[10px] font-medium px-2 py-0.5 rounded border border-primary/40 bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:"Save"})]}),s.jsx("div",{className:"flex-1 min-h-0",children:f?s.jsx("div",{className:"text-muted text-xs animate-pulse p-4",children:"Loading..."}):s.jsx(uo,{value:l??"",language:Zo(o),theme:"vs",onChange:q,onMount:te,options:{minimap:{enabled:!1},fontSize:13,lineNumbers:"on",wordWrap:"on",scrollBeyondLastLine:!1,automaticLayout:!0,padding:{top:8},renderLineHighlight:"line",smoothScrolling:!0,cursorBlinking:"smooth",folding:!0,bracketPairColorization:{enabled:!0}}})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted text-sm",children:"Select a file to view its contents"})]})}),p&&s.jsxs(s.Fragment,{children:[s.jsx(Ae,{className:"w-1 bg-border hover:bg-primary/30 transition-colors cursor-col-resize"}),s.jsx(ge,{defaultSize:30,minSize:20,collapsible:!0,children:s.jsxs("div",{className:"h-full flex flex-col border-l border-border",children:[s.jsxs("div",{className:"px-3 py-1.5 border-b border-border flex items-center gap-2 bg-hover",children:[s.jsx(Fe,{icon:xn,label:"Back",size:"sm",onClick:()=>{}}),s.jsx(Fe,{icon:yn,label:"Forward",size:"sm",onClick:()=>{}}),s.jsx(Fe,{icon:Kn,label:"Refresh",size:"sm",onClick:()=>T(y=>y+1)}),s.jsx("input",{value:L,readOnly:!0,className:"flex-1 px-3 py-1 text-xs font-mono bg-card border border-border rounded-btn"}),s.jsx(Fe,{icon:mn,label:"Open in new tab",size:"sm",onClick:()=>window.open(L,"_blank")})]}),s.jsx("div",{className:"flex-1 bg-white",children:s.jsx("iframe",{ref:P,src:L,title:"Project Preview",className:"w-full h-full border-0",sandbox:"allow-scripts allow-same-origin allow-forms allow-popups"},I)})]})})]})]})}),s.jsx(Ae,{className:"h-1 bg-border hover:bg-primary/30 cursor-row-resize"}),s.jsx(ge,{defaultSize:30,minSize:15,collapsible:!0,children:s.jsx(Jo,{logs:null,logsLoading:!1,agents:null,checklist:null,sessionId:e.id})})]})}),k&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh]",role:"dialog","aria-modal":"true","aria-label":"Quick open file search",onClick:()=>$(!1),children:s.jsxs("div",{className:"bg-card rounded-card shadow-2xl border border-border w-full max-w-lg",onClick:y=>y.stopPropagation(),children:[s.jsx("input",{ref:N,type:"text",value:A,onChange:y=>E(y.target.value),placeholder:"Search files by name...",className:"w-full px-4 py-3 text-sm font-mono border-b border-border outline-none rounded-t-card bg-transparent",onKeyDown:y=>{y.key==="Enter"&&D.length>0&&(W(D[0].path,D[0].name),$(!1)),y.key==="Escape"&&$(!1)}}),s.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[D.slice(0,20).map(y=>s.jsxs("button",{onClick:()=>{W(y.path,y.name),$(!1)},className:"w-full text-left px-4 py-2 text-xs font-mono hover:bg-primary/5 flex items-center gap-2",children:[s.jsx("span",{className:"w-5 flex items-center justify-center",children:Qe(y.name,"file")}),s.jsx("span",{className:"text-ink",children:y.name}),s.jsx("span",{className:"text-muted/40 ml-auto truncate text-[10px]",children:y.path})]},y.path)),D.length===0&&s.jsx("div",{className:"px-4 py-3 text-xs text-muted",children:"No matching files"})]})]})})]})}function sa(){const{sessionId:e}=ln(),t=cn(),[n,r]=d.useState(null),[o,i]=d.useState(!0),[c,a]=d.useState(null);return d.useEffect(()=>{e&&(i(!0),a(null),re.getSessionDetail(e).then(l=>{r(l),i(!1)}).catch(l=>{a(l instanceof Error?l.message:"Failed to load session"),i(!1)}))},[e]),o?s.jsx("div",{className:"h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-muted animate-pulse text-sm",children:"Loading project..."}),s.jsx("div",{className:"text-[10px] font-mono text-muted/50 mt-2",children:e})]})}):c||!n?s.jsx("div",{className:"h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-danger text-sm font-medium",children:"Project not found"}),s.jsx("p",{className:"text-xs text-muted mt-1",children:c||`Session ${e} does not exist`}),s.jsx("button",{onClick:()=>t("/"),className:"mt-4 px-4 py-2 rounded-btn text-sm font-semibold border border-primary/30 text-primary hover:bg-primary/5 transition-all",children:"Back to Home"})]})}):s.jsx("div",{className:"h-screen bg-background flex flex-col",children:s.jsx("div",{className:"flex-1 min-h-0",children:s.jsx(dn,{name:"ProjectWorkspace",children:s.jsx(ea,{session:n,onClose:()=>t("/")})})})})}export{sa as default};
@@ -1,16 +0,0 @@
1
- import{c as f,r as c,j as e}from"./index-ABzvlaPu.js";/**
2
- * @license lucide-react v0.577.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const j=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],v=f("arrow-down",j);/**
7
- * @license lucide-react v0.577.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const y=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],N=f("lock",y);/**
12
- * @license lucide-react v0.577.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const E=[["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"}]],L=f("radio",E);class M extends c.Component{constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,d){console.error(`[${this.props.name||"Component"}] render error:`,r,d)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:e.jsxs("div",{className:"card p-4 rounded-card text-center",children:[e.jsx("p",{className:"text-sm text-danger font-medium",children:"Something went wrong"}),e.jsx("p",{className:"text-xs text-muted mt-1",children:((r=this.state.error)==null?void 0:r.message)||"Unknown error"}),e.jsx("button",{onClick:()=>this.setState({hasError:!1,error:null}),className:"mt-2 px-3 py-1 text-xs font-medium rounded-btn border border-primary/20 text-primary hover:bg-primary/5 transition-colors",children:"Retry"})]}):this.props.children}}const S={info:"text-info",error:"text-danger",warning:"text-warning",debug:"text-muted",critical:"text-danger font-bold"};function T(n){if(!n)return"";if(n.includes("T")||n.includes("-"))try{return new Date(n).toLocaleTimeString("en-US",{hour12:!1})}catch{return n}return n}function _({logs:n,loading:r,subscribe:d}){const a=c.useRef(null),[i,h]=c.useState(!1),[g,k]=c.useState([]);c.useEffect(()=>d?d("log",o=>{const l=o;l!=null&&l.line&&k(u=>{const s=[...u,{message:l.line,timestamp:l.timestamp||""}];return s.length>500?s.slice(-500):s})}):void 0,[d]);const m=(()=>{const t=g.map(s=>{let x="info";const p=s.message.toLowerCase();return p.includes("error")||p.includes("fail")?x="error":p.includes("warn")?x="warning":p.includes("debug")&&(x="debug"),{timestamp:s.timestamp,level:x,message:s.message,source:"ws"}}),o=n||[];if(t.length===0)return o;if(o.length===0)return t;const l=new Set(t.map(s=>s.message));return[...o.filter(s=>!l.has(s.message)),...t]})();c.useEffect(()=>{!i&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[m,i]);const b=()=>{if(!a.current)return;const{scrollTop:t,scrollHeight:o,clientHeight:l}=a.current,u=o-t-l<50;h(!u)},w=()=>{var t;h(!1),(t=a.current)==null||t.scrollTo({top:a.current.scrollHeight,behavior:"smooth"})};return e.jsxs("div",{className:"card p-0 overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border flex-shrink-0",children:[e.jsx("h3",{className:"text-sm font-semibold text-ink uppercase tracking-wider",children:"Terminal"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-mono text-xs text-muted",children:[m.length," lines"]}),e.jsxs("button",{onClick:i?w:()=>h(!0),className:`flex items-center gap-1.5 text-xs font-medium px-2.5 py-1 rounded-lg border transition-colors ${i?"border-warning/40 text-warning bg-warning/5 hover:bg-warning/10":"border-primary/20 text-primary hover:bg-primary/5"}`,title:i?"Scroll locked -- click to resume auto-scroll":"Auto-scrolling -- click to lock",children:[i?e.jsx(N,{size:12}):e.jsx(L,{size:12}),i?"Locked":"Live"]}),i&&e.jsxs("button",{onClick:w,className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary transition-colors font-medium",children:[e.jsx(v,{size:12}),"Jump to bottom"]})]})]}),e.jsxs("div",{ref:a,onScroll:b,className:"flex-1 overflow-y-auto terminal-scroll bg-ink/[0.03] p-4 font-mono text-xs leading-relaxed",children:[r&&!n&&g.length===0&&e.jsx("div",{className:"text-muted animate-pulse",children:"Connecting to log stream..."}),m.length===0&&!r&&e.jsxs("div",{className:"text-muted/60",children:[e.jsx("p",{children:"No log output yet."}),e.jsx("p",{className:"mt-1",children:"Start a build to see terminal output here."})]}),m.map((t,o)=>e.jsxs("div",{className:"flex gap-2 hover:bg-hover rounded px-1 -mx-1",children:[e.jsx("span",{className:"text-muted/40 flex-shrink-0 select-none w-16 text-right",children:T(t.timestamp)}),e.jsx("span",{className:`flex-shrink-0 w-12 text-right uppercase text-[10px] font-semibold ${S[t.level]||"text-muted"}`,children:t.level}),e.jsx("span",{className:`flex-1 break-all ${t.level==="error"||t.level==="critical"?"text-danger":"text-ink/80"}`,children:t.message})]},o)),m.length>0&&e.jsx("div",{className:"terminal-cursor mt-1"})]})]})}export{M as E,_ as T};
@@ -1 +0,0 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,Cascadia Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.terminal-scroll::-webkit-scrollbar{width:6px}.terminal-scroll::-webkit-scrollbar-track{background:transparent}.terminal-scroll::-webkit-scrollbar-thumb{background:#553de933;border-radius:3px}.terminal-scroll::-webkit-scrollbar-thumb:hover{background:#553de959}.card{background:#fff;border:1px solid #ECEAE3;border-radius:5px;box-shadow:0 1px 3px #0000000f}.card:hover,.card-hover:hover{box-shadow:0 5px 10px #00000014}.pattern-nodes{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.04;pointer-events:none;background-image:radial-gradient(circle at 10% 20%,#553DE9 1px,transparent 1px),radial-gradient(circle at 30% 60%,#553DE9 1px,transparent 1px),radial-gradient(circle at 50% 40%,#553DE9 1px,transparent 1px),radial-gradient(circle at 70% 80%,#553DE9 1px,transparent 1px),radial-gradient(circle at 90% 30%,#553DE9 1px,transparent 1px);background-size:200px 200px}*:focus-visible{outline:2px solid #553DE9;outline-offset:2px}::-moz-selection{background:#e8e4fd;color:#201515}::selection{background:#e8e4fd;color:#201515}@media(prefers-reduced-motion:reduce){.phase-active{animation:none}}@keyframes phase-pulse{0%,to{opacity:1}50%{opacity:.5}}.phase-active{animation:phase-pulse 2s ease-in-out infinite}@keyframes cursor-blink{0%,to{opacity:1}50%{opacity:0}}.terminal-cursor:after{content:"";display:inline-block;width:8px;height:16px;background:#553de9;animation:cursor-blink 1s step-end infinite;margin-left:2px;vertical-align:text-bottom}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.left-3{left:.75rem}.right-0{right:0}.top-1\/2{top:50%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-5{grid-column:span 5 / span 5}.col-span-6{grid-column:span 6 / span 6}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.contents{display:contents}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-28{height:7rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-40{max-height:10rem}.max-h-64{max-height:16rem}.max-h-\[400px\]{max-height:400px}.min-h-0{min-height:0px}.min-h-\[280px\]{min-height:280px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-28{width:7rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[160px\]{min-width:160px}.max-w-3xl{max-width:48rem}.max-w-\[1400px\]{max-width:1400px}.max-w-\[1920px\]{max-width:1920px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[80\%\]{max-width:80%}.max-w-\[800px\]{max-width:800px}.max-w-lg{max-width:32rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[3px\]{border-radius:3px}.rounded-\[5px\]{border-radius:5px}.rounded-btn{border-radius:4px}.rounded-card{border-radius:5px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-t-card{border-top-left-radius:5px;border-top-right-radius:5px}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-\[\#553DE9\]{--tw-border-opacity: 1;border-color:rgb(85 61 233 / var(--tw-border-opacity, 1))}.border-\[\#553DE9\]\/30{border-color:#553de94d}.border-\[\#C45B5B\]\/20{border-color:#c45b5b33}.border-\[\#ECEAE3\],.border-border{--tw-border-opacity: 1;border-color:rgb(236 234 227 / var(--tw-border-opacity, 1))}.border-border-light{--tw-border-opacity: 1;border-color:rgb(197 192 177 / var(--tw-border-opacity, 1))}.border-border\/50{border-color:#eceae380}.border-danger\/20{border-color:#c45b5b33}.border-muted\/20{border-color:#93908433}.border-primary{--tw-border-opacity: 1;border-color:rgb(85 61 233 / var(--tw-border-opacity, 1))}.border-primary\/20{border-color:#553de933}.border-primary\/30{border-color:#553de94d}.border-primary\/40{border-color:#553de966}.border-success\/20{border-color:#1fc5a833}.border-transparent{border-color:transparent}.border-warning\/10{border-color:#d4a03c1a}.border-warning\/20{border-color:#d4a03c33}.border-warning\/30{border-color:#d4a03c4d}.border-warning\/40{border-color:#d4a03c66}.border-t-transparent{border-top-color:transparent}.bg-\[\#1FC5A8\]{--tw-bg-opacity: 1;background-color:rgb(31 197 168 / var(--tw-bg-opacity, 1))}.bg-\[\#1FC5A8\]\/10{background-color:#1fc5a81a}.bg-\[\#553DE9\]{--tw-bg-opacity: 1;background-color:rgb(85 61 233 / var(--tw-bg-opacity, 1))}.bg-\[\#553DE9\]\/10{background-color:#553de91a}.bg-\[\#C45B5B\]{--tw-bg-opacity: 1;background-color:rgb(196 91 91 / var(--tw-bg-opacity, 1))}.bg-\[\#C45B5B\]\/10{background-color:#c45b5b1a}.bg-\[\#D4A03C\]\/10{background-color:#d4a03c1a}.bg-\[\#F8F4F0\]{--tw-bg-opacity: 1;background-color:rgb(248 244 240 / var(--tw-bg-opacity, 1))}.bg-\[\#FAF9F6\]{--tw-bg-opacity: 1;background-color:rgb(250 249 246 / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:rgb(255 254 251 / var(--tw-bg-opacity, 1))}.bg-black\/30{background-color:#0000004d}.bg-black\/5{background-color:#0000000d}.bg-border{--tw-bg-opacity: 1;background-color:rgb(236 234 227 / var(--tw-bg-opacity, 1))}.bg-border\/30{background-color:#eceae34d}.bg-card{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-current{background-color:currentColor}.bg-danger{--tw-bg-opacity: 1;background-color:rgb(196 91 91 / var(--tw-bg-opacity, 1))}.bg-danger\/10{background-color:#c45b5b1a}.bg-hover{--tw-bg-opacity: 1;background-color:rgb(248 244 240 / var(--tw-bg-opacity, 1))}.bg-info{--tw-bg-opacity: 1;background-color:rgb(47 113 227 / var(--tw-bg-opacity, 1))}.bg-ink\/\[0\.03\]{background-color:#20151508}.bg-muted{--tw-bg-opacity: 1;background-color:rgb(147 144 132 / var(--tw-bg-opacity, 1))}.bg-muted\/10{background-color:#9390841a}.bg-muted\/30{background-color:#9390844d}.bg-muted\/40{background-color:#93908466}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(85 61 233 / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:#553de91a}.bg-success{--tw-bg-opacity: 1;background-color:rgb(31 197 168 / var(--tw-bg-opacity, 1))}.bg-success\/10{background-color:#1fc5a81a}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:rgb(212 160 60 / var(--tw-bg-opacity, 1))}.bg-warning\/10{background-color:#d4a03c1a}.bg-warning\/5{background-color:#d4a03c0d}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.fill-ink{fill:#201515}.fill-primary{fill:#553de9}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2\.5{padding-bottom:.625rem}.pl-9{padding-left:2.25rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-\[20vh\]{padding-top:20vh}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-heading{font-family:DM Serif Display,Georgia,Times New Roman,serif}.font-mono{font-family:JetBrains Mono,Fira Code,Cascadia Code,monospace}.font-sans{font-family:Inter,system-ui,-apple-system,sans-serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-h1{font-size:2.5rem;line-height:1;letter-spacing:-.01em}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.text-\[\#1FC5A8\]{--tw-text-opacity: 1;color:rgb(31 197 168 / var(--tw-text-opacity, 1))}.text-\[\#36342E\]{--tw-text-opacity: 1;color:rgb(54 52 46 / var(--tw-text-opacity, 1))}.text-\[\#553DE9\]{--tw-text-opacity: 1;color:rgb(85 61 233 / var(--tw-text-opacity, 1))}.text-\[\#6B6960\]{--tw-text-opacity: 1;color:rgb(107 105 96 / var(--tw-text-opacity, 1))}.text-\[\#939084\]{--tw-text-opacity: 1;color:rgb(147 144 132 / var(--tw-text-opacity, 1))}.text-\[\#C45B5B\]{--tw-text-opacity: 1;color:rgb(196 91 91 / var(--tw-text-opacity, 1))}.text-\[\#D4A03C\]{--tw-text-opacity: 1;color:rgb(212 160 60 / var(--tw-text-opacity, 1))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity, 1))}.text-danger{--tw-text-opacity: 1;color:rgb(196 91 91 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-info{--tw-text-opacity: 1;color:rgb(47 113 227 / var(--tw-text-opacity, 1))}.text-ink{--tw-text-opacity: 1;color:rgb(32 21 21 / var(--tw-text-opacity, 1))}.text-ink\/60{color:#20151599}.text-ink\/70{color:#201515b3}.text-ink\/80{color:#201515cc}.text-muted{--tw-text-opacity: 1;color:rgb(147 144 132 / var(--tw-text-opacity, 1))}.text-muted-accessible{--tw-text-opacity: 1;color:rgb(107 105 96 / var(--tw-text-opacity, 1))}.text-muted\/30{color:#9390844d}.text-muted\/40{color:#93908466}.text-muted\/50{color:#93908480}.text-muted\/60{color:#93908499}.text-orange-500{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(85 61 233 / var(--tw-text-opacity, 1))}.text-primary\/60{color:#553de999}.text-purple-500{--tw-text-opacity: 1;color:rgb(168 85 247 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-success{--tw-text-opacity: 1;color:rgb(31 197 168 / var(--tw-text-opacity, 1))}.text-warning{--tw-text-opacity: 1;color:rgb(212 160 60 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-button{--tw-shadow: 0 1px 3px rgba(0,0,0,.08);--tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card{--tw-shadow: 0 1px 3px rgba(0,0,0,.06);--tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-card-hover{--tw-shadow: 0 5px 10px rgba(0,0,0,.08);--tw-shadow-colored: 0 5px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#553DE9\]\/20{--tw-shadow-color: rgb(85 61 233 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-card{--tw-shadow-color: #FFFFFF;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-\[\#553DE9\]{--tw-ring-opacity: 1;--tw-ring-color: rgb(85 61 233 / var(--tw-ring-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.placeholder\:text-\[\#939084\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(147 144 132 / var(--tw-text-opacity, 1))}.placeholder\:text-\[\#939084\]::placeholder{--tw-text-opacity: 1;color:rgb(147 144 132 / var(--tw-text-opacity, 1))}.placeholder\:text-primary\/60::-moz-placeholder{color:#553de999}.placeholder\:text-primary\/60::placeholder{color:#553de999}.hover\:border-primary\/30:hover{border-color:#553de94d}.hover\:bg-\[\#4432c4\]:hover{--tw-bg-opacity: 1;background-color:rgb(68 50 196 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#553DE9\]\/5:hover{background-color:#553de90d}.hover\:bg-\[\#553DE9\]\/90:hover{background-color:#553de9e6}.hover\:bg-\[\#C45B5B\]\/20:hover{background-color:#c45b5b33}.hover\:bg-\[\#E8E4FD\]:hover{--tw-bg-opacity: 1;background-color:rgb(232 228 253 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#ECEAE3\]:hover{--tw-bg-opacity: 1;background-color:rgb(236 234 227 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#F8F4F0\]:hover{--tw-bg-opacity: 1;background-color:rgb(248 244 240 / var(--tw-bg-opacity, 1))}.hover\:bg-card:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-danger\/10:hover{background-color:#c45b5b1a}.hover\:bg-danger\/20:hover{background-color:#c45b5b33}.hover\:bg-hover:hover{--tw-bg-opacity: 1;background-color:rgb(248 244 240 / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/20:hover{background-color:#553de933}.hover\:bg-primary\/30:hover{background-color:#553de94d}.hover\:bg-primary\/5:hover{background-color:#553de90d}.hover\:bg-primary\/90:hover{background-color:#553de9e6}.hover\:bg-warning\/10:hover{background-color:#d4a03c1a}.hover\:text-\[\#36342E\]:hover{--tw-text-opacity: 1;color:rgb(54 52 46 / var(--tw-text-opacity, 1))}.hover\:text-danger:hover{--tw-text-opacity: 1;color:rgb(196 91 91 / var(--tw-text-opacity, 1))}.hover\:text-ink:hover{--tw-text-opacity: 1;color:rgb(32 21 21 / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:rgb(85 61 233 / var(--tw-text-opacity, 1))}.hover\:text-primary\/80:hover{color:#553de9cc}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-card-hover:hover{--tw-shadow: 0 5px 10px rgba(0,0,0,.08);--tw-shadow-colored: 0 5px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:absolute:focus{position:absolute}.focus\:left-2:focus{left:.5rem}.focus\:top-2:focus{top:.5rem}.focus\:z-50:focus{z-index:50}.focus\:rounded-\[3px\]:focus{border-radius:3px}.focus\:border-\[\#553DE9\]:focus{--tw-border-opacity: 1;border-color:rgb(85 61 233 / var(--tw-border-opacity, 1))}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(85 61 233 / var(--tw-border-opacity, 1))}.focus\:border-primary\/30:focus{border-color:#553de94d}.focus\:bg-white:focus{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.focus\:px-4:focus{padding-left:1rem;padding-right:1rem}.focus\:py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:text-\[\#553DE9\]:focus{--tw-text-opacity: 1;color:rgb(85 61 233 / var(--tw-text-opacity, 1))}.focus\:shadow-card:focus{--tw-shadow: 0 1px 3px rgba(0,0,0,.06);--tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-shadow-color: #FFFFFF;--tw-shadow: var(--tw-shadow-colored)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[\#553DE9\]\/20:focus{--tw-ring-color: rgb(85 61 233 / .2)}.focus\:ring-primary\/20:focus{--tw-ring-color: rgb(85 61 233 / .2)}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-primary{--tw-text-opacity: 1;color:rgb(85 61 233 / var(--tw-text-opacity, 1))}.group\/file:hover .group-hover\/file\:opacity-100{opacity:1}@media(prefers-reduced-motion:reduce){.motion-reduce\:animate-none{animation:none}}@media(min-width:768px){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:1024px){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}