bit-office 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5247 -1840
- package/dist/index.js.map +1 -1
- package/dist/web/404.html +60 -50
- package/dist/web/_next/static/chunks/262.c930af897fc1ae41.js +1 -0
- package/dist/web/_next/static/chunks/27.d81804d60bc0f4f0.js +1 -0
- package/dist/web/_next/static/chunks/276-7203e26618727a54.js +1 -0
- package/dist/web/_next/static/chunks/29.5e4e3e30b02d00ad.js +1 -0
- package/dist/web/_next/static/chunks/290.247befe60cb2d28d.js +1 -0
- package/dist/web/_next/static/chunks/293.e3a551b691c61d55.js +1 -0
- package/dist/web/_next/static/chunks/297.2c14111a5babdc3f.js +1 -0
- package/dist/web/_next/static/chunks/336.8eafff71d277c552.js +1 -0
- package/dist/web/_next/static/chunks/337.98f156e48f146063.js +1 -0
- package/dist/web/_next/static/chunks/363.e8a82fede2ce0268.js +1 -0
- package/dist/web/_next/static/chunks/368.17f62d3909ec67e9.js +1 -0
- package/dist/web/_next/static/chunks/484.9bea1cffd0a0c25d.js +1 -0
- package/dist/web/_next/static/chunks/606.64076fb5c9a76eb8.js +1 -0
- package/dist/web/_next/static/chunks/611.a9c4df24fea6fe06.js +1 -0
- package/dist/web/_next/static/chunks/689-57cf7e431c713dac.js +1 -0
- package/dist/web/_next/static/chunks/729.f8f9847d2d765724.js +1 -0
- package/dist/web/_next/static/chunks/73.84b7325688d17248.js +1 -0
- package/dist/web/_next/static/chunks/757.704acf1f09ac05cb.js +1 -0
- package/dist/web/_next/static/chunks/767-52fa35b605461336.js +1 -0
- package/dist/web/_next/static/chunks/794.4c6f7ebfcb65fff9.js +1 -0
- package/dist/web/_next/static/chunks/810.39f7a3b8c687a8e4.js +1 -0
- package/dist/web/_next/static/chunks/849.04bc4b508495ab91.js +1 -0
- package/dist/web/_next/static/chunks/853.0c23af6158d43fda.js +1 -0
- package/dist/web/_next/static/chunks/88.219a7fc3735b6d2b.js +1 -0
- package/dist/web/_next/static/chunks/880.0799bc27d833d679.js +1 -0
- package/dist/web/_next/static/chunks/883.9832cb2358508994.js +1 -0
- package/dist/web/_next/static/chunks/895.b20c839956b4d7fa.js +1 -0
- package/dist/web/_next/static/chunks/913.d5d32ae6956a650a.js +1 -0
- package/dist/web/_next/static/chunks/955.8d32a077607d5dd4.js +1 -0
- package/dist/web/_next/static/chunks/999.59e64ccb62c7e043.js +1 -0
- package/dist/web/_next/static/chunks/app/_not-found/page-fc90e6f750996b0a.js +1 -0
- package/dist/web/_next/static/chunks/app/join/{page-7e3ac640395d940a.js → page-98fb24f2e87aa173.js} +1 -1
- package/dist/web/_next/static/chunks/app/layout-a57e585fdbd6e50f.js +1 -0
- package/dist/web/_next/static/chunks/app/not-found-fc90e6f750996b0a.js +1 -0
- package/dist/web/_next/static/chunks/app/office/page-21b29ce2f5b4492f.js +1 -0
- package/dist/web/_next/static/chunks/app/pair/page-67f86e4adcdf34ea.js +1 -0
- package/dist/web/_next/static/chunks/webpack-dcd361e024700880.js +1 -0
- package/dist/web/_next/static/css/c62e12508f039ceb.css +3 -0
- package/dist/web/index.html +60 -50
- package/dist/web/index.txt +73 -65
- package/dist/web/join.html +60 -50
- package/dist/web/join.txt +74 -66
- package/dist/web/manifest.json +1 -1
- package/dist/web/office.html +61 -50
- package/dist/web/office.txt +74 -66
- package/dist/web/offices/cute-whimsical.jpeg +0 -0
- package/dist/web/offices/cute-whimsical.zip +0 -0
- package/dist/web/offices/cyberpunk.jpeg +0 -0
- package/dist/web/offices/cyberpunk.zip +0 -0
- package/dist/web/offices/darkLegend.jpeg +0 -0
- package/dist/web/offices/darkLegend.zip +0 -0
- package/dist/web/offices/easternFantasy.jpeg +0 -0
- package/dist/web/offices/easternFantasy.zip +0 -0
- package/dist/web/offices/gothic.jpeg +0 -0
- package/dist/web/offices/gothic.zip +0 -0
- package/dist/web/offices/historical.jpeg +0 -0
- package/dist/web/offices/historical.zip +0 -0
- package/dist/web/offices/index.json +26 -25
- package/dist/web/offices/modern-cozy.jpeg +0 -0
- package/dist/web/offices/modern-cozy.jpg +0 -0
- package/dist/web/offices/modern-cozy.zip +0 -0
- package/dist/web/offices/mythological.jpeg +0 -0
- package/dist/web/offices/mythological.zip +0 -0
- package/dist/web/offices/nostalgic.jpeg +0 -0
- package/dist/web/offices/nostalgic.zip +0 -0
- package/dist/web/offices/postApocalyptic.jpeg +0 -0
- package/dist/web/offices/postApocalyptic.zip +0 -0
- package/dist/web/offices/sifi.jpeg +0 -0
- package/dist/web/offices/sifi.zip +0 -0
- package/dist/web/offices/westernFantasy.jpeg +0 -0
- package/dist/web/offices/westernFantasy.zip +0 -0
- package/dist/web/pair.html +60 -50
- package/dist/web/pair.txt +74 -66
- package/dist/web/sw.js +1 -1
- package/dist/web/workbox-a92c5218.js +1 -0
- package/package.json +2 -2
- package/dist/web/_next/static/chunks/29.a4a95a903c8b8e7b.js +0 -1
- package/dist/web/_next/static/chunks/290.345f536a557e23ec.js +0 -1
- package/dist/web/_next/static/chunks/336.033a979c6c5fe642.js +0 -1
- package/dist/web/_next/static/chunks/368.61fa3954c03d8818.js +0 -1
- package/dist/web/_next/static/chunks/632.d16ffbb5e23a43f2.js +0 -1
- package/dist/web/_next/static/chunks/757.a611f4691f6b1582.js +0 -1
- package/dist/web/_next/static/chunks/810.44213c6355518b0b.js +0 -1
- package/dist/web/_next/static/chunks/880.614e72604eb723a3.js +0 -1
- package/dist/web/_next/static/chunks/989-6be071435f8fdadf.js +0 -1
- package/dist/web/_next/static/chunks/app/_not-found/page-182ed2c105839b2a.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-72c65340fbaef4c0.js +0 -1
- package/dist/web/_next/static/chunks/app/office/page-358079be75bf327f.js +0 -1
- package/dist/web/_next/static/chunks/app/pair/page-c47333f71aa3f4ef.js +0 -1
- package/dist/web/_next/static/chunks/webpack-1c3347ded5c6a52b.js +0 -1
- package/dist/web/offices/Nostalgic.jpeg +0 -0
- package/dist/web/offices/Nostalgic.zip +0 -0
- package/dist/web/offices/modernCozy.jpeg +0 -0
- package/dist/web/offices/modernCozy.zip +0 -0
- package/dist/web/workbox-5194662c.js +0 -1
- /package/dist/web/_next/static/{0Clbb0V7-cqhwpr3pjKk1 → a77xldHdc_0TOGcqwFr4L}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{0Clbb0V7-cqhwpr3pjKk1 → a77xldHdc_0TOGcqwFr4L}/_ssgManifest.js +0 -0
- /package/dist/web/_next/static/chunks/{325ca9c7-f84e7e4973790fdf.js → 325ca9c7.f84e7e4973790fdf.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[729],{9729:(e,t,n)=>{n.r(t),n.d(t,{default:()=>i});var l=n(206),a=n(1406),c=n(4932);function i(e){let{open:t,onClose:n,actions:i=[],currentTheme:r,onThemeChange:s,onOpenSettings:o,onOpenHistory:u,onHire:p}=e,[h,m]=(0,a.useState)(""),[d,g]=(0,a.useState)(0),f=(0,a.useRef)(null),v=(0,a.useRef)(null),b=(0,a.useMemo)(()=>{let e=[];o&&e.push({id:"settings",label:"Settings",icon:"⚙",group:"Navigation",action:()=>{o(),n()}}),u&&e.push({id:"history",label:"Project History",icon:"◶",group:"Navigation",action:()=>{u(),n()}}),p&&e.push({id:"hire",label:"Hire Team",icon:"+",group:"Actions",action:()=>{p(),n()}});let t=Object.entries(c.aD).map(e=>{let[t,l]=e;return{id:"theme:".concat(t),label:l.name,icon:r===t?"●":"○",hint:r===t?"active":void 0,group:"Themes",action:()=>{s?s(t):(0,c.c8)(t),n()}}});return[...e,...i.map(e=>({...e,action:()=>{e.action(),n()}})),...t]},[i,r,s,o,u,p,n]),k=(0,a.useMemo)(()=>{if(!h.trim())return b;let e=h.toLowerCase();return b.filter(t=>{var n;return t.label.toLowerCase().includes(e)||(null==(n=t.group)?void 0:n.toLowerCase().includes(e))||t.id.toLowerCase().includes(e)})},[b,h]);(0,a.useEffect)(()=>{t&&(m(""),g(0),setTimeout(()=>{var e;return null==(e=f.current)?void 0:e.focus()},50))},[t]),(0,a.useEffect)(()=>{g(e=>Math.min(e,Math.max(0,k.length-1)))},[k.length]),(0,a.useEffect)(()=>{var e;let t=v.current;if(!t)return;let n=t.children[d];null==n||null==(e=n.scrollIntoView)||e.call(n,{block:"nearest"})},[d]);let N=(0,a.useCallback)(e=>{let t=k[e];t&&t.action()},[k]),x=(0,a.useCallback)(e=>{"ArrowDown"===e.key?(e.preventDefault(),g(e=>(e+1)%Math.max(1,k.length))):"ArrowUp"===e.key?(e.preventDefault(),g(e=>(e-1+k.length)%Math.max(1,k.length))):"Enter"===e.key?(e.preventDefault(),N(d)):"Escape"===e.key&&(e.preventDefault(),n())},[k.length,d,N,n]);if(!t)return null;let C="";return(0,l.jsx)("div",{className:"cp-backdrop",onClick:n,children:(0,l.jsxs)("div",{className:"cp-container",onClick:e=>e.stopPropagation(),children:[(0,l.jsx)("input",{ref:f,className:"cp-input",value:h,onChange:e=>m(e.target.value),onKeyDown:x,placeholder:"Type a command...",spellCheck:!1,autoComplete:"off"}),(0,l.jsxs)("div",{ref:v,className:"cp-list",children:[0===k.length&&(0,l.jsx)("div",{className:"cp-empty",children:"No matching commands"}),k.map((e,t)=>{let n=e.group&&e.group!==C;return e.group&&(C=e.group),(0,l.jsxs)("div",{children:[n&&(0,l.jsx)("div",{className:"cp-group-label",children:e.group}),(0,l.jsxs)("button",{className:"cp-item".concat(t===d?" cp-item-active":""),onClick:()=>N(t),onMouseEnter:()=>g(t),children:[e.icon&&(0,l.jsx)("span",{className:"cp-item-icon",children:e.icon}),(0,l.jsx)("span",{className:"cp-item-label",children:e.label}),e.hint&&(0,l.jsx)("span",{className:"cp-item-hint",children:e.hint})]})]},e.id)})]})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73],{73:(e,t,l)=>{l.r(t),l.d(t,{default:()=>f});var r=l(206),i=l(1406),n=l(2988);let f=function(e){let{palette:t,zoom:l=3,ready:f}=e,u=(0,i.useRef)(null);return(0,i.useEffect)(()=>{var e,r;let i=u.current;if(!i)return;let f=(0,n.Cr)(t);if(!f)return;let h=f.length,a=null!=(r=null==(e=f[0])?void 0:e.length)?r:0;i.width=a*l,i.height=h*l;let c=i.getContext("2d");if(c){c.clearRect(0,0,i.width,i.height);for(let e=0;e<h;e++)for(let t=0;t<a;t++){let r=f[e][t];r&&(c.fillStyle=r,c.fillRect(t*l,e*l,l,l))}}},[t,l,f]),(0,r.jsx)("canvas",{ref:u,style:{width:16*l,height:32*l,imageRendering:"pixelated"}})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[757],{3757:(t,e,a)=>{a.r(e),a.d(e,{default:()=>n});var s=a(206),i=a(786),l=a(8163);function o(t){let{label:e,tip:a,className:i,onClick:o}=t;return(0,s.jsxs)(l.m_,{children:[(0,s.jsx)(l.k$,{asChild:!0,children:(0,s.jsx)("button",{className:i,onClick:o,children:e})}),(0,s.jsx)(l.ZI,{side:"top",children:a})]})}function n(t){let{editMode:e,onToggleEditMode:a,onOpenSettings:l,onOpenHistory:n,onOpenOfficeSwitcher:d,onToggleTest:r,testActive:b,showEditorControls:c=!0}=t;return(0,s.jsxs)("div",{className:"btb",children:[d&&(0,s.jsx)(o,{label:"Office",tip:"Switch office appearance",className:"btb-btn",onClick:d}),c&&(0,s.jsx)(o,{label:"Layout",tip:"Edit office layout",className:e?"btb-btn btb-btn-active":"btb-btn",onClick:a}),n&&(0,s.jsx)(o,{label:"History",tip:"Project history",className:"btb-btn",onClick:n}),(0,s.jsx)(o,{label:"Settings",tip:"Settings \xb7 Web UI v".concat(i.h),className:"btb-btn",onClick:l}),r&&(0,s.jsx)(o,{label:b?"Clear Test":"Test",tip:"Fill all work seats with test characters",className:b?"btb-btn btb-btn-danger":"btb-btn",onClick:r})]})}},8163:(t,e,a)=>{a.d(e,{TooltipProvider:()=>n,ZI:()=>b,k$:()=>r,m_:()=>d});var s=a(206),i=a(1406),l=a(3767),o=a(9385);let n=l.Kq,d=l.bL,r=l.l9,b=i.forwardRef((t,e)=>{let{className:a,sideOffset:i=4,...n}=t;return(0,s.jsx)(l.ZL,{children:(0,s.jsx)(l.UC,{ref:e,sideOffset:i,className:(0,o.cn)("z-[50000] overflow-hidden","px-2.5 py-1.5","bg-term-panel border border-border shadow-lg","font-mono text-[11px] text-foreground","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",a),...n})})});b.displayName=l.UC.displayName}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[767],{3767:(e,t,n)=>{let r;n.d(t,{UC:()=>tR,ZL:()=>tb,Kq:()=>tx,bL:()=>tw,l9:()=>tv});var o=n(1406),i=n(3403),l=n(6967),a=n(7576),s=n(7902),u=n(2806);let c=["top","right","bottom","left"],f=Math.min,d=Math.max,p=Math.round,h=Math.floor,m=e=>({x:e,y:e}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function y(e,t){return"function"==typeof e?e(t):e}function x(e){return e.split("-")[0]}function w(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function b(e){return"y"===e?"height":"width"}function R(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function C(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let T=["left","right"],A=["right","left"],E=["top","bottom"],L=["bottom","top"];function O(e){let t=x(e);return g[t]+e.slice(t.length)}function P(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function k(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function S(e,t,n){let r,{reference:o,floating:i}=e,l=R(t),a=v(R(t)),s=b(a),u=x(t),c="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;switch(u){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(w(t)){case"start":r[a]-=p*(n&&c?-1:1);break;case"end":r[a]+=p*(n&&c?-1:1)}return r}async function j(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=y(t,e),h=P(p),m=a[d?"floating"===f?"reference":"floating":f],g=k(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:s})),x="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await (null==i.isElement?void 0:i.isElement(w))&&await (null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:w,strategy:s}):x);return{top:(g.top-b.top+h.top)/v.y,bottom:(b.bottom-g.bottom+h.bottom)/v.y,left:(g.left-b.left+h.left)/v.x,right:(b.right-g.right+h.right)/v.x}}let D=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:j},s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=S(u,r,s),d=r,p=0,h={};for(let n=0;n<i.length;n++){let m=i[n];if(!m)continue;let{name:g,fn:y}=m,{x:x,y:w,data:v,reset:b}=await y({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=x?x:c,f=null!=w?w:f,h[g]={...h[g],...v},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:c,y:f}=S(u,d,s)),n=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:h}};function H(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function M(e){return c.some(t=>e[t]>=0)}let N=new Set(["left","top"]);async function F(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=x(n),a=w(n),s="y"===R(n),u=N.has(l)?-1:1,c=i&&s?-1:1,f=y(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),s?{x:p*c,y:d*u}:{x:d*u,y:p*c}}function _(){return"undefined"!=typeof window}function W(e){return I(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function z(e){var t;return null==(t=(I(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function I(e){return!!_()&&(e instanceof Node||e instanceof B(e).Node)}function V(e){return!!_()&&(e instanceof Element||e instanceof B(e).Element)}function K(e){return!!_()&&(e instanceof HTMLElement||e instanceof B(e).HTMLElement)}function Y(e){return!!_()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof B(e).ShadowRoot)}function X(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function G(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let $=/transform|translate|scale|rotate|perspective|filter/,q=/paint|layout|strict|content/,Z=e=>!!e&&"none"!==e;function U(e){let t=V(e)?ee(e):e;return Z(t.transform)||Z(t.translate)||Z(t.scale)||Z(t.rotate)||Z(t.perspective)||!J()&&(Z(t.backdropFilter)||Z(t.filter))||$.test(t.willChange||"")||q.test(t.contain||"")}function J(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function Q(e){return/^(html|body|#document)$/.test(W(e))}function ee(e){return B(e).getComputedStyle(e)}function et(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function en(e){if("html"===W(e))return e;let t=e.assignedSlot||e.parentNode||Y(e)&&e.host||z(e);return Y(t)?t.host:t}function er(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=en(t);return Q(n)?t.ownerDocument?t.ownerDocument.body:t.body:K(n)&&X(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=B(o);if(!i)return t.concat(o,er(o,[],n));{let e=eo(l);return t.concat(l,l.visualViewport||[],X(o)?o:[],e&&n?er(e):[])}}function eo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ei(e){let t=ee(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=K(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,a=p(n)!==i||p(r)!==l;return a&&(n=i,r=l),{width:n,height:r,$:a}}function el(e){return V(e)?e:e.contextElement}function ea(e){let t=el(e);if(!K(t))return m(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ei(t),l=(i?p(n.width):n.width)/r,a=(i?p(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}let es=m(0);function eu(e){let t=B(e);return J()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:es}function ec(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=el(e),a=m(1);t&&(r?V(r)&&(a=ea(r)):a=ea(e));let s=(void 0===(o=n)&&(o=!1),r&&(!o||r===B(l))&&o)?eu(l):m(0),u=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(l){let e=B(l),t=r&&V(r)?B(r):r,n=e,o=eo(n);for(;o&&r&&t!==n;){let e=ea(o),t=o.getBoundingClientRect(),r=ee(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,f*=e.x,d*=e.y,u+=i,c+=l,o=eo(n=B(o))}}return k({width:f,height:d,x:u,y:c})}function ef(e,t){let n=et(e).scrollLeft;return t?t.left+n:ec(z(e)).left+n}function ed(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ef(e,n),y:n.top+t.scrollTop}}function ep(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=B(e),r=z(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;let e=J();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}let u=ef(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,l=Math.abs(r.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else u<=25&&(i+=u);return{width:i,height:l,x:a,y:s}}(e,n);else if("document"===t)r=function(e){let t=z(e),n=et(e),r=e.ownerDocument.body,o=d(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=d(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),l=-n.scrollLeft+ef(e),a=-n.scrollTop;return"rtl"===ee(r).direction&&(l+=d(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(z(e));else if(V(t))r=function(e,t){let n=ec(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=K(e)?ea(e):m(1),l=e.clientWidth*i.x,a=e.clientHeight*i.y;return{width:l,height:a,x:o*i.x,y:r*i.y}}(t,n);else{let n=eu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return k(r)}function eh(e){return"static"===ee(e).position}function em(e,t){if(!K(e)||"fixed"===ee(e).position)return null;if(t)return t(e);let n=e.offsetParent;return z(e)===n&&(n=n.ownerDocument.body),n}function eg(e,t){var n;let r=B(e);if(G(e))return r;if(!K(e)){let t=en(e);for(;t&&!Q(t);){if(V(t)&&!eh(t))return t;t=en(t)}return r}let o=em(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(W(n)))&&eh(o);)o=em(o,t);return o&&Q(o)&&eh(o)&&!U(o)?r:o||function(e){let t=en(e);for(;K(t)&&!Q(t);){if(U(t))return t;if(G(t))break;t=en(t)}return null}(e)||r}let ey=async function(e){let t=this.getOffsetParent||eg,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=K(t),o=z(t),i="fixed"===n,l=ec(e,!0,i,t),a={scrollLeft:0,scrollTop:0},s=m(0);if(r||!r&&!i)if(("body"!==W(t)||X(o))&&(a=et(t)),r){let e=ec(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=ef(o));i&&!r&&o&&(s.x=ef(o));let u=!o||r||i?m(0):ed(o,a);return{x:l.left+a.scrollLeft-s.x-u.x,y:l.top+a.scrollTop-s.y-u.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ex={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=z(r),a=!!t&&G(t.floating);if(r===l||a&&i)return n;let s={scrollLeft:0,scrollTop:0},u=m(1),c=m(0),f=K(r);if((f||!f&&!i)&&(("body"!==W(r)||X(l))&&(s=et(r)),f)){let e=ec(r);u=ea(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let d=!l||f||i?m(0):ed(l,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-s.scrollTop*u.y+c.y+d.y}},getDocumentElement:z,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[..."clippingAncestors"===n?G(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=er(e,[],!1).filter(e=>V(e)&&"body"!==W(e)),o=null,i="fixed"===ee(e).position,l=i?en(e):e;for(;V(l)&&!Q(l);){let t=ee(l),n=U(l);n||"fixed"!==t.position||(o=null),(i?n||o:!(!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||X(l)&&!n&&function e(t,n){let r=en(t);return!(r===n||!V(r)||Q(r))&&("fixed"===ee(r).position||e(r,n))}(e,l)))?o=t:r=r.filter(e=>e!==l),l=en(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=ep(t,i[0],o),a=l.top,s=l.right,u=l.bottom,c=l.left;for(let e=1;e<i.length;e++){let n=ep(t,i[e],o);a=d(n.top,a),s=f(n.right,s),u=f(n.bottom,u),c=d(n.left,c)}return{width:s-c,height:u-a,x:c,y:a}},getOffsetParent:eg,getElementRects:ey,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ei(e);return{width:t,height:n}},getScale:ea,isElement:V,isRTL:function(e){return"rtl"===ee(e).direction}};function ew(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ev=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:l,elements:a,middlewareData:s}=t,{element:u,padding:c=0}=y(e,t)||{};if(null==u)return{};let p=P(c),h={x:n,y:r},m=v(R(o)),g=b(m),x=await l.getDimensions(u),C="y"===m,T=C?"clientHeight":"clientWidth",A=i.reference[g]+i.reference[m]-h[m]-i.floating[g],E=h[m]-i.reference[m],L=await (null==l.getOffsetParent?void 0:l.getOffsetParent(u)),O=L?L[T]:0;O&&await (null==l.isElement?void 0:l.isElement(L))||(O=a.floating[T]||i.floating[g]);let k=O/2-x[g]/2-1,S=f(p[C?"top":"left"],k),j=f(p[C?"bottom":"right"],k),D=O-x[g]-j,H=O/2-x[g]/2+(A/2-E/2),M=d(S,f(H,D)),N=!s.arrow&&null!=w(o)&&H!==M&&i.reference[g]/2-(H<S?S:j)-x[g]/2<0,F=N?H<S?H-S:H-D:0;return{[m]:h[m]+F,data:{[m]:M,centerOffset:H-M-F,...N&&{alignmentOffset:F}},reset:N}}});var eb=n(7995),eR="undefined"!=typeof document?o.useLayoutEffect:function(){};function eC(e,t){let n,r,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eC(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!eC(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eT(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eA(e,t){let n=eT(e);return Math.round(t*n)/n}function eE(e){let t=o.useRef(e);return eR(()=>{t.current=e}),t}var eL=n(5692),eO=n(206),eP=o.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eO.jsx)(eL.sG.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eO.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eP.displayName="Arrow";var ek=n(2870),eS=n(5762),ej="Popper",[eD,eH]=(0,a.A)(ej),[eM,eN]=eD(ej),eF=e=>{let{__scopePopper:t,children:n}=e,[r,i]=o.useState(null);return(0,eO.jsx)(eM,{scope:t,anchor:r,onAnchorChange:i,children:n})};eF.displayName=ej;var e_="PopperAnchor",eW=o.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=eN(e_,n),s=o.useRef(null),u=(0,l.s)(t,s),c=o.useRef(null);return o.useEffect(()=>{let e=c.current;c.current=(null==r?void 0:r.current)||s.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,eO.jsx)(eL.sG.div,{...i,ref:u})});eW.displayName=e_;var eB="PopperContent",[ez,eI]=eD(eB),eV=o.forwardRef((e,t)=>{var n,r,i,a,s,u,c,p;let{__scopePopper:m,side:g="bottom",sideOffset:P=0,align:k="center",alignOffset:S=0,arrowPadding:j=0,avoidCollisions:_=!0,collisionBoundary:W=[],collisionPadding:B=0,sticky:I="partial",hideWhenDetached:V=!1,updatePositionStrategy:K="optimized",onPlaced:Y,...X}=e,G=eN(eB,m),[$,q]=o.useState(null),Z=(0,l.s)(t,e=>q(e)),[U,J]=o.useState(null),Q=function(e){let[t,n]=o.useState(void 0);return(0,eS.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(U),ee=null!=(c=null==Q?void 0:Q.width)?c:0,et=null!=(p=null==Q?void 0:Q.height)?p:0,en="number"==typeof B?B:{top:0,right:0,bottom:0,left:0,...B},eo=Array.isArray(W)?W:[W],ei=eo.length>0,ea={padding:en,boundary:eo.filter(eG),altBoundary:ei},{refs:es,floatingStyles:eu,placement:ef,isPositioned:ed,middlewareData:ep}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[f,d]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=o.useState(r);eC(p,r)||h(r);let[m,g]=o.useState(null),[y,x]=o.useState(null),w=o.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),v=o.useCallback(e=>{e!==T.current&&(T.current=e,x(e))},[]),b=l||m,R=a||y,C=o.useRef(null),T=o.useRef(null),A=o.useRef(f),E=null!=u,L=eE(u),O=eE(i),P=eE(c),k=o.useCallback(()=>{if(!C.current||!T.current)return;let e={placement:t,strategy:n,middleware:p};O.current&&(e.platform=O.current),((e,t,n)=>{let r=new Map,o={platform:ex,...n},i={...o.platform,_c:r};return D(e,t,{...o,platform:i})})(C.current,T.current,e).then(e=>{let t={...e,isPositioned:!1!==P.current};S.current&&!eC(A.current,t)&&(A.current=t,eb.flushSync(()=>{d(t)}))})},[p,t,n,O,P]);eR(()=>{!1===c&&A.current.isPositioned&&(A.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let S=o.useRef(!1);eR(()=>(S.current=!0,()=>{S.current=!1}),[]),eR(()=>{if(b&&(C.current=b),R&&(T.current=R),b&&R){if(L.current)return L.current(b,R,k);k()}},[b,R,k,L,E]);let j=o.useMemo(()=>({reference:C,floating:T,setReference:w,setFloating:v}),[w,v]),H=o.useMemo(()=>({reference:b,floating:R}),[b,R]),M=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!H.floating)return e;let t=eA(H.floating,f.x),r=eA(H.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...eT(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,H.floating,f.x,f.y]);return o.useMemo(()=>({...f,update:k,refs:j,elements:H,floatingStyles:M}),[f,k,j,H,M])}({strategy:"fixed",placement:g+("center"!==k?"-"+k:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,c=el(e),p=i||l?[...c?er(c):[],...t?er(t):[]]:[];p.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let m=c&&s?function(e,t){let n,r=null,o=z(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),i();let u=e.getBoundingClientRect(),{left:c,top:p,width:m,height:g}=u;if(a||t(),!m||!g)return;let y=h(p),x=h(o.clientWidth-(c+m)),w={rootMargin:-y+"px "+-x+"px "+-h(o.clientHeight-(p+g))+"px "+-h(c)+"px",threshold:d(0,f(1,s))||1},v=!0;function b(t){let r=t[0].intersectionRatio;if(r!==s){if(!v)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||ew(u,e.getBoundingClientRect())||l(),v=!1}try{r=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,w)}r.observe(e)}(!0),i}(c,n):null,g=-1,y=null;a&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),c&&!u&&y.observe(c),t&&y.observe(t));let x=u?ec(e):null;return u&&function t(){let r=ec(e);x&&!ew(x,r)&&n(),x=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;p.forEach(e=>{i&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,u&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===K})},elements:{reference:G.anchor},middleware:[((e,t)=>{let n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:l,middlewareData:a}=t,s=await F(t,e);return l===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:l}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:P+et,alignmentAxis:S}),_&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=y(e,t),c={x:n,y:r},p=await i.detectOverflow(t,u),h=R(x(o)),m=v(h),g=c[m],w=c[h];if(l){let e="y"===m?"top":"left",t="y"===m?"bottom":"right",n=g+p[e],r=g-p[t];g=d(n,f(g,r))}if(a){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=w+p[e],r=w-p[t];w=d(n,f(w,r))}let b=s.fn({...t,[m]:g,[h]:w});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:l,[h]:a}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:!0,crossAxis:!1,limiter:"partial"===I?((e,t)=>({fn:function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:a=0,mainAxis:s=!0,crossAxis:u=!0}=y(e,t),c={x:n,y:r},f=R(o),d=v(f),p=c[d],h=c[f],m=y(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var w,b;let e="y"===d?"width":"height",t=N.has(x(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(w=l.offset)?void 0:w[f])||0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(b=l.offset)?void 0:b[f])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}}(e).fn,options:[e,t]}))():void 0,...ea}),_&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,o,i,l;let{placement:a,middlewareData:s,rects:u,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:k=!0,...S}=y(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};let j=x(a),D=R(c),H=x(c)===c,M=await (null==f.isRTL?void 0:f.isRTL(d.floating)),N=m||(H||!k?[O(c)]:function(e){let t=O(e);return[C(e),t,C(t)]}(c)),F="none"!==P;!m&&F&&N.push(...function(e,t,n,r){let o=w(e),i=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?A:T;return t?T:A;case"left":case"right":return t?E:L;default:return[]}}(x(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(C)))),i}(c,k,P,M));let _=[c,...N],W=await f.detectOverflow(t,S),B=[],z=(null==(r=s.flip)?void 0:r.overflows)||[];if(p&&B.push(W[j]),h){let e=function(e,t,n){void 0===n&&(n=!1);let r=w(e),o=v(R(e)),i=b(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=O(l)),[l,O(l)]}(a,u,M);B.push(W[e[0]],W[e[1]])}if(z=[...z,{placement:a,overflows:B}],!B.every(e=>e<=0)){let e=((null==(o=s.flip)?void 0:o.index)||0)+1,t=_[e];if(t&&("alignment"!==h||D===R(t)||z.every(e=>R(e.placement)!==D||e.overflows[0]>0)))return{data:{index:e,overflows:z},reset:{placement:t}};let n=null==(i=z.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(g){case"bestFit":{let e=null==(l=z.filter(e=>{if(F){let t=R(e.placement);return t===D||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=c}if(a!==n)return{reset:{placement:n}}}return{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...ea}),((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let o,i,{placement:l,rects:a,platform:s,elements:u}=t,{apply:c=()=>{},...p}=y(e,t),h=await s.detectOverflow(t,p),m=x(l),g=w(l),v="y"===R(l),{width:b,height:C}=a.floating;"top"===m||"bottom"===m?(o=m,i=g===(await (null==s.isRTL?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(i=m,o="end"===g?"top":"bottom");let T=C-h.top-h.bottom,A=b-h.left-h.right,E=f(C-h[o],T),L=f(b-h[i],A),O=!t.middlewareData.shift,P=E,k=L;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=A),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(P=T),O&&!g){let e=d(h.left,0),t=d(h.right,0),n=d(h.top,0),r=d(h.bottom,0);v?k=b-2*(0!==e||0!==t?e+t:d(h.left,h.right)):P=C-2*(0!==n||0!==r?n+r:d(h.top,h.bottom))}await c({...t,availableWidth:k,availableHeight:P});let S=await s.getDimensions(u.floating);return b!==S.width||C!==S.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...ea,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),U&&((e,t)=>{let n=(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?ev({element:n.current,padding:r}).fn(t):{}:n?ev({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}})({element:U,padding:j}),e$({arrowWidth:ee,arrowHeight:et}),V&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=y(e,t);switch(o){case"referenceHidden":{let e=H(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:M(e)}}}case"escaped":{let e=H(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:M(e)}}}default:return{}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({strategy:"referenceHidden",...ea})]}),[eh,em]=eq(ef),eg=(0,ek.c)(Y);(0,eS.N)(()=>{ed&&(null==eg||eg())},[ed,eg]);let ey=null==(n=ep.arrow)?void 0:n.x,eP=null==(r=ep.arrow)?void 0:r.y,ej=(null==(i=ep.arrow)?void 0:i.centerOffset)!==0,[eD,eH]=o.useState();return(0,eS.N)(()=>{$&&eH(window.getComputedStyle($).zIndex)},[$]),(0,eO.jsx)("div",{ref:es.setFloating,"data-radix-popper-content-wrapper":"",style:{...eu,transform:ed?eu.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eD,"--radix-popper-transform-origin":[null==(a=ep.transformOrigin)?void 0:a.x,null==(s=ep.transformOrigin)?void 0:s.y].join(" "),...(null==(u=ep.hide)?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eO.jsx)(ez,{scope:m,placedSide:eh,onArrowChange:J,arrowX:ey,arrowY:eP,shouldHideArrow:ej,children:(0,eO.jsx)(eL.sG.div,{"data-side":eh,"data-align":em,...X,ref:Z,style:{...X.style,animation:ed?void 0:"none"}})})})});eV.displayName=eB;var eK="PopperArrow",eY={top:"bottom",right:"left",bottom:"top",left:"right"},eX=o.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=eI(eK,n),i=eY[o.placedSide];return(0,eO.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eO.jsx)(eP,{...r,ref:t,style:{...r.style,display:"block"}})})});function eG(e){return null!==e}eX.displayName=eK;var e$=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:s,middlewareData:u}=t,c=(null==(n=u.arrow)?void 0:n.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[p,h]=eq(a),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!=(i=null==(r=u.arrow)?void 0:r.x)?i:0)+f/2,y=(null!=(l=null==(o=u.arrow)?void 0:o.y)?l:0)+d/2,x="",w="";return"bottom"===p?(x=c?m:"".concat(g,"px"),w="".concat(-d,"px")):"top"===p?(x=c?m:"".concat(g,"px"),w="".concat(s.floating.height+d,"px")):"right"===p?(x="".concat(-d,"px"),w=c?m:"".concat(y,"px")):"left"===p&&(x="".concat(s.floating.width+d,"px"),w=c?m:"".concat(y,"px")),{data:{x,y:w}}}});function eq(e){let[t,n="center"]=e.split("-");return[t,n]}var eZ=n(708),eU=n(6938),eJ=n(6209),eQ=n(8782),e0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),e1=o.forwardRef((e,t)=>(0,eO.jsx)(eL.sG.span,{...e,ref:t,style:{...e0,...e.style}}));e1.displayName="VisuallyHidden";var[e2,e5]=(0,a.A)("Tooltip",[eH]),e7=eH(),e6="TooltipProvider",e9="tooltip.open",[e3,e8]=e2(e6),e4=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:l}=e,a=o.useRef(!0),s=o.useRef(!1),u=o.useRef(0);return o.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,eO.jsx)(e3,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:o.useCallback(()=>{window.clearTimeout(u.current),a.current=!1},[]),onClose:o.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:o.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:l})};e4.displayName=e6;var te="Tooltip",[tt,tn]=e2(te),tr=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:l,disableHoverableContent:a,delayDuration:s}=e,c=e8(te,e.__scopeTooltip),f=e7(t),[d,p]=o.useState(null),h=(0,u.B)(),m=o.useRef(0),g=null!=a?a:c.disableHoverableContent,y=null!=s?s:c.delayDuration,x=o.useRef(!1),[w,v]=(0,eQ.i)({prop:r,defaultProp:null!=i&&i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(e9))):c.onClose(),null==l||l(e)},caller:te}),b=o.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),R=o.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x.current=!1,v(!0)},[v]),C=o.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v(!1)},[v]),T=o.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{x.current=!0,v(!0),m.current=0},y)},[y,v]);return o.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,eO.jsx)(eF,{...f,children:(0,eO.jsx)(tt,{scope:t,contentId:h,open:w,stateAttribute:b,trigger:d,onTriggerChange:p,onTriggerEnter:o.useCallback(()=>{c.isOpenDelayedRef.current?T():R()},[c.isOpenDelayedRef,T,R]),onTriggerLeave:o.useCallback(()=>{g?C():(window.clearTimeout(m.current),m.current=0)},[C,g]),onOpen:R,onClose:C,disableHoverableContent:g,children:n})})};tr.displayName=te;var to="TooltipTrigger",ti=o.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,a=tn(to,n),s=e8(to,n),u=e7(n),c=o.useRef(null),f=(0,l.s)(t,c,a.onTriggerChange),d=o.useRef(!1),p=o.useRef(!1),h=o.useCallback(()=>d.current=!1,[]);return o.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),(0,eO.jsx)(eW,{asChild:!0,...u,children:(0,eO.jsx)(eL.sG.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:f,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(p.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),p.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{a.open&&a.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{d.current||a.onOpen()}),onBlur:(0,i.mK)(e.onBlur,a.onClose),onClick:(0,i.mK)(e.onClick,a.onClose)})})});ti.displayName=to;var tl="TooltipPortal",[ta,ts]=e2(tl,{forceMount:void 0}),tu=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=tn(tl,t);return(0,eO.jsx)(ta,{scope:t,forceMount:n,children:(0,eO.jsx)(eU.C,{present:n||i.open,children:(0,eO.jsx)(eZ.Z,{asChild:!0,container:o,children:r})})})};tu.displayName=tl;var tc="TooltipContent",tf=o.forwardRef((e,t)=>{let n=ts(tc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=tn(tc,e.__scopeTooltip);return(0,eO.jsx)(eU.C,{present:r||l.open,children:l.disableHoverableContent?(0,eO.jsx)(tg,{side:o,...i,ref:t}):(0,eO.jsx)(td,{side:o,...i,ref:t})})}),td=o.forwardRef((e,t)=>{let n=tn(tc,e.__scopeTooltip),r=e8(tc,e.__scopeTooltip),i=o.useRef(null),a=(0,l.s)(t,i),[s,u]=o.useState(null),{trigger:c,onClose:f}=n,d=i.current,{onPointerInTransitChange:p}=r,h=o.useCallback(()=>{u(null),p(!1)},[p]),m=o.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());u(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),...function(e){let{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())])),p(!0)},[p]);return o.useEffect(()=>()=>h(),[h]),o.useEffect(()=>{if(c&&d){let e=e=>m(e,d),t=e=>m(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[c,d,m,h]),o.useEffect(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==d?void 0:d.contains(t)),o=!function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let l=t[e],a=t[i],s=l.x,u=l.y,c=a.x,f=a.y;u>r!=f>r&&n<(c-s)*(r-u)/(f-u)+s&&(o=!o)}return o}(n,s);r?h():o&&(h(),f())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,d,s,f,h]),(0,eO.jsx)(tg,{...e,ref:a})}),[tp,th]=e2(te,{isInside:!1}),tm=(0,eJ.Dc)("TooltipContent"),tg=o.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:a,...u}=e,c=tn(tc,n),f=e7(n),{onClose:d}=c;return o.useEffect(()=>(document.addEventListener(e9,d),()=>document.removeEventListener(e9,d)),[d]),o.useEffect(()=>{if(c.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(c.trigger))&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,d]),(0,eO.jsx)(s.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,eO.jsxs)(eV,{"data-state":c.stateAttribute,...f,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,eO.jsx)(tm,{children:r}),(0,eO.jsx)(tp,{scope:n,isInside:!0,children:(0,eO.jsx)(e1,{id:c.contentId,role:"tooltip",children:i||r})})]})})});tf.displayName=tc;var ty="TooltipArrow";o.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,o=e7(n);return th(ty,n).isInside?null:(0,eO.jsx)(eX,{...o,...r,ref:t})}).displayName=ty;var tx=e4,tw=tr,tv=ti,tb=tu,tR=tf}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,794],{73:(e,t,l)=>{l.r(t),l.d(t,{default:()=>a});var r=l(206),n=l(1406),o=l(2988);let a=function(e){let{palette:t,zoom:l=3,ready:a}=e,s=(0,n.useRef)(null);return(0,n.useEffect)(()=>{var e,r;let n=s.current;if(!n)return;let a=(0,o.Cr)(t);if(!a)return;let i=a.length,d=null!=(r=null==(e=a[0])?void 0:e.length)?r:0;n.width=d*l,n.height=i*l;let c=n.getContext("2d");if(c){c.clearRect(0,0,n.width,n.height);for(let e=0;e<i;e++)for(let t=0;t<d;t++){let r=a[e][t];r&&(c.fillStyle=r,c.fillRect(t*l,e*l,l,l))}}},[t,l,a]),(0,r.jsx)("canvas",{ref:s,style:{width:16*l,height:32*l,imageRendering:"pixelated"}})}},5091:(e,t,l)=>{l.d(t,{Ay:()=>i});var r=l(206),n=l(73),o=l(6740),a=l(4932);let s={delegation:{bg:a.nY,border:a.KE,label:"Delegated"},result:{bg:a.nY,border:a.$C,label:"Result"},status:{bg:a.nY,border:a.O2,label:"Status"}},i=function(e){var t,l,a;let{msg:i,agents:d,assetsReady:c,maxChars:u=150,shadow:g,expandable:f=!1}=e,h=null!=(t=s[i.messageType])?t:s.status,m=d.get(i.fromAgentId),p=i.toAgentId?d.get(i.toAgentId):void 0,x=null!=(l=i.message)?l:"";return(0,r.jsxs)("div",{style:{padding:"8px 10px",backgroundColor:h.bg,borderLeft:"2px solid ".concat(h.border),border:"1px solid ".concat(h.border,"40"),boxShadow:g?"0 2px 12px rgba(0,0,0,0.5)":void 0},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(null==m?void 0:m.palette)!==void 0&&(0,r.jsx)(n.default,{palette:m.palette,zoom:1,ready:c}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:null!=(a=i.fromAgentName)?a:i.fromAgentId}),i.toAgentName&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{fontSize:11,color:"#6a5848"},children:"→"}),(null==p?void 0:p.palette)!==void 0&&(0,r.jsx)(n.default,{palette:p.palette,zoom:1,ready:c}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:i.toAgentName})]}),(0,r.jsx)("span",{style:{marginLeft:"auto",fontSize:9,padding:"1px 4px",backgroundColor:h.border+"20",color:h.border,border:"1px solid ".concat(h.border,"40"),fontFamily:"monospace"},children:h.label})]}),f?(0,r.jsx)(o.A,{text:x,maxChars:u,maxHeight:80}):(0,r.jsxs)("div",{style:{fontSize:12,color:"#b09878",wordBreak:"break-word",maxHeight:80,overflow:"hidden",fontFamily:"monospace"},children:[x.slice(0,u),x.length>u?"...":""]})]})}},6740:(e,t,l)=>{l.d(t,{A:()=>o});var r=l(206),n=l(1406);let o=function(e){let{text:t,maxChars:l=300,maxHeight:o=120}=e,[a,s]=(0,n.useState)(!1),i=t.length>l;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{fontSize:12,color:"#b09878",wordBreak:"break-word",maxHeight:a?"none":o,overflow:"hidden",fontFamily:"monospace"},children:[a?t:t.slice(0,l),!a&&i?"...":""]}),i&&(0,r.jsx)("div",{style:{fontSize:10,color:"#6a8aaa",cursor:"pointer",marginTop:2,fontFamily:"monospace"},onClick:()=>s(!a),children:a?"▲ Collapse":"▼ Show more"})]})}},8794:(e,t,l)=>{l.r(t),l.d(t,{default:()=>a});var r=l(206),n=l(1406),o=l(5091);let a=function(e){let{messages:t,agents:l,assetsReady:a}=e,[s,i]=(0,n.useState)(null),[d,c]=(0,n.useState)(!1),u=(0,n.useRef)(t.length),g=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(t.length>u.current){let e=t[t.length-1];e&&e.fromAgentId&&(g.current&&clearTimeout(g.current),i(e),c(!0),g.current=setTimeout(()=>{c(!1),g.current=setTimeout(()=>i(null),400)},5e3))}u.current=t.length},[t.length,t]),(0,n.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]),s)?(0,r.jsx)("div",{style:{position:"absolute",top:0,right:0,zIndex:20,width:300,maxWidth:"40vw",transform:d?"translateX(0)":"translateX(calc(100% + 16px))",opacity:+!!d,transition:"transform 0.35s ease, opacity 0.35s ease",pointerEvents:"none"},children:(0,r.jsx)(o.Ay,{msg:s,agents:l,assetsReady:a,maxChars:120,shadow:!0})}):null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[810],{5702:(e,l,t)=>{t.d(l,{Y:()=>n,k:()=>a});let i=new Map,r=new WeakMap;function n(e){let l=r.get(e);if(l)return l;let t=e.length,i=e[0].length,n=[];for(let e=0;e<t+2;e++)n.push(Array(i+2).fill(""));for(let l=0;l<t;l++)for(let t=0;t<i;t++){if(""===e[l][t])continue;let i=l+1,r=t+1;""===n[i-1][r]&&(n[i-1][r]="#FFFFFF"),""===n[i+1][r]&&(n[i+1][r]="#FFFFFF"),""===n[i][r-1]&&(n[i][r-1]="#FFFFFF"),""===n[i][r+1]&&(n[i][r+1]="#FFFFFF")}for(let l=0;l<t;l++)for(let t=0;t<i;t++)""!==e[l][t]&&(n[l+1][t+1]="");return r.set(e,n),n}function a(e,l){let t=Math.round(100*l)/100,r=i.get(t);r||(r=new WeakMap,i.set(t,r));let n=r.get(e);if(n)return n;let a=e.length,o=e[0].length,s=document.createElement("canvas");s.width=o*t,s.height=a*t;let d=s.getContext("2d");d.imageSmoothingEnabled=!1;for(let l=0;l<a;l++)for(let i=0;i<o;i++){let r=e[l][i];""!==r&&(d.fillStyle=r,d.fillRect(i*t,l*t,t,t))}return r.set(e,s),s}},9810:(e,l,t)=>{t.r(l),t.d(l,{default:()=>f});var i=t(206),r=t(1406),n=t(5195),a=t(9892),o=t(5702),s=t(4777);let d={padding:"3px 8px",fontSize:"13px",background:"rgba(255, 255, 255, 0.08)",color:"rgba(255, 255, 255, 0.7)",border:"2px solid transparent",borderRadius:0,cursor:"pointer"},c={...d,background:"rgba(90, 140, 255, 0.25)",color:"rgba(255, 255, 255, 0.9)",border:"2px solid #5a8cff"},x={padding:"2px 6px",fontSize:"12px",background:"transparent",color:"rgba(255, 255, 255, 0.5)",border:"2px solid transparent",borderRadius:0,cursor:"pointer"},p={...x,background:"rgba(255, 255, 255, 0.08)",color:"rgba(255, 255, 255, 0.8)",border:"2px solid #5a8cff"};function h(e){let{patternIndex:l,color:t,selected:n,onClick:a}=e,d=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let e=d.current;if(!e)return;let i=e.getContext("2d");if(!i)return;if(e.width=32,e.height=32,i.imageSmoothingEnabled=!1,!(0,s.$0)()){i.fillStyle="#444",i.fillRect(0,0,32,32);return}let r=(0,s.To)(l,t),n=(0,o.k)(r,2);i.drawImage(n,0,0)},[l,t]),(0,i.jsx)("button",{onClick:a,title:"Floor ".concat(l),style:{width:32,height:32,padding:0,border:n?"2px solid #5a8cff":"2px solid #4a4a6a",borderRadius:0,cursor:"pointer",overflow:"hidden",flexShrink:0,background:"#2A2A3A"},children:(0,i.jsx)("canvas",{ref:d,style:{width:32,height:32,display:"block"}})})}function u(e){let{label:l,value:t,min:r,max:n,onChange:a}=e;return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,i.jsx)("span",{style:{fontSize:"11px",color:"#999",width:14,textAlign:"right",flexShrink:0},children:l}),(0,i.jsx)("input",{type:"range",min:r,max:n,value:t,onChange:e=>a(Number(e.target.value)),style:{flex:1,height:12,accentColor:"rgba(90, 140, 255, 0.8)"}}),(0,i.jsx)("span",{style:{fontSize:"11px",color:"#999",width:28,textAlign:"right",flexShrink:0},children:t})]})}let g={h:0,s:0,b:0,c:0};function f(e){let{activeTool:l,selectedTileType:t,selectedFurnitureType:f,selectedFurnitureUid:b,selectedFurnitureColor:m,floorColor:y,wallColor:j,onToolChange:C,onTileTypeChange:v,onFloorColorChange:k,onWallColorChange:F,onSelectedFurnitureColorChange:w,onFurnitureTypeChange:E}=e,[R,S]=(0,r.useState)("desks"),[I,A]=(0,r.useState)(!1),[P,V]=(0,r.useState)(!1),[_,N]=(0,r.useState)(!1),T=(0,r.useCallback)((e,l)=>{k({...y,[e]:l})},[y,k]),z=(0,r.useCallback)((e,l)=>{F({...j,[e]:l})},[j,F]),D=null!=m?m:g,U=(0,r.useCallback)((e,l)=>{w({...D,[e]:l})},[D,w]),W=(0,a.Zl)(R),L=Array.from({length:(0,s.QQ)()},(e,l)=>l+1),B=l===n.VF.TILE_PAINT||l===n.VF.EYEDROPPER,M=l===n.VF.WALL_PAINT,H=l===n.VF.ERASE,Y=l===n.VF.FURNITURE_PLACE||l===n.VF.FURNITURE_PICK;return(0,i.jsxs)("div",{style:{position:"absolute",bottom:68,left:10,zIndex:50,background:"#1e1e2e",border:"2px solid #4a4a6a",borderRadius:0,padding:"6px 8px",display:"flex",flexDirection:"column-reverse",gap:6,boxShadow:"2px 2px 0px #0a0a14",maxWidth:"calc(100vw - 20px)"},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:[(0,i.jsx)("button",{style:B?c:d,onClick:()=>C(n.VF.TILE_PAINT),title:"Paint floor tiles",children:"Floor"}),(0,i.jsx)("button",{style:M?c:d,onClick:()=>C(n.VF.WALL_PAINT),title:"Paint walls",children:"Wall"}),(0,i.jsx)("button",{style:H?c:d,onClick:()=>C(n.VF.ERASE),title:"Erase tiles to void",children:"Erase"}),(0,i.jsx)("button",{style:Y?c:d,onClick:()=>C(n.VF.FURNITURE_PLACE),title:"Place furniture",children:"Furniture"})]}),B&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:6},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,i.jsx)("button",{style:I?c:d,onClick:()=>A(e=>!e),title:"Adjust floor color",children:"Color"}),(0,i.jsx)("button",{style:l===n.VF.EYEDROPPER?c:d,onClick:()=>C(n.VF.EYEDROPPER),title:"Pick floor pattern + color from existing tile",children:"Pick"})]}),I&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"1px solid var(--term-border)",borderRadius:0},children:[(0,i.jsx)(u,{label:"H",value:y.h,min:0,max:360,onChange:e=>T("h",e)}),(0,i.jsx)(u,{label:"S",value:y.s,min:0,max:100,onChange:e=>T("s",e)}),(0,i.jsx)(u,{label:"B",value:y.b,min:-100,max:100,onChange:e=>T("b",e)}),(0,i.jsx)(u,{label:"C",value:y.c,min:-100,max:100,onChange:e=>T("c",e)})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,overflowX:"auto",flexWrap:"nowrap",paddingBottom:2},children:L.map(e=>(0,i.jsx)(h,{patternIndex:e,color:y,selected:t===e,onClick:()=>v(e)},e))})]}),M&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:6},children:[(0,i.jsx)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:(0,i.jsx)("button",{style:P?c:d,onClick:()=>V(e=>!e),title:"Adjust wall color",children:"Color"})}),P&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"1px solid var(--term-border)",borderRadius:0},children:[(0,i.jsx)(u,{label:"H",value:j.h,min:0,max:360,onChange:e=>z("h",e)}),(0,i.jsx)(u,{label:"S",value:j.s,min:0,max:100,onChange:e=>z("s",e)}),(0,i.jsx)(u,{label:"B",value:j.b,min:-100,max:100,onChange:e=>z("b",e)}),(0,i.jsx)(u,{label:"C",value:j.c,min:-100,max:100,onChange:e=>z("c",e)})]})]}),Y&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:4},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:2,flexWrap:"wrap",alignItems:"center"},children:[(0,a.Ze)().map(e=>(0,i.jsx)("button",{style:R===e.id?p:x,onClick:()=>S(e.id),children:e.label},e.id)),(0,i.jsx)("div",{style:{width:1,height:14,background:"rgba(255,255,255,0.15)",margin:"0 2px",flexShrink:0}}),(0,i.jsx)("button",{style:l===n.VF.FURNITURE_PICK?c:d,onClick:()=>C(n.VF.FURNITURE_PICK),title:"Pick furniture type from placed item",children:"Pick"})]}),(0,i.jsx)("div",{style:{display:"flex",gap:4,overflowX:"auto",flexWrap:"nowrap",paddingBottom:2},children:W.map(e=>{let l=(0,o.k)(e.sprite,2),t=f===e.type;return(0,i.jsx)("button",{onClick:()=>E(e.type),title:e.label,style:{width:36,height:36,background:"#2A2A3A",border:t?"2px solid #5a8cff":"2px solid #4a4a6a",borderRadius:0,cursor:"pointer",padding:0,display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",flexShrink:0},children:(0,i.jsx)("canvas",{ref:e=>{if(!e)return;let t=e.getContext("2d");if(!t)return;let i=.85*Math.min(36/l.width,36/l.height);e.width=36,e.height=36,t.imageSmoothingEnabled=!1,t.clearRect(0,0,36,36);let r=l.width*i,n=l.height*i;t.drawImage(l,(36-r)/2,(36-n)/2,r,n)},style:{width:36,height:36}})},e.type)})})]}),b&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column-reverse",gap:3},children:[(0,i.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,i.jsx)("button",{style:_?c:d,onClick:()=>N(e=>!e),title:"Adjust selected furniture color",children:"Color"}),m&&(0,i.jsx)("button",{style:{...d,fontSize:"11px",padding:"2px 6px"},onClick:()=>w(null),title:"Remove color (restore original)",children:"Clear"})]}),_&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,padding:"4px 6px",background:"#181828",border:"1px solid var(--term-border)",borderRadius:0},children:[D.colorize?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u,{label:"H",value:D.h,min:0,max:360,onChange:e=>U("h",e)}),(0,i.jsx)(u,{label:"S",value:D.s,min:0,max:100,onChange:e=>U("s",e)})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(u,{label:"H",value:D.h,min:-180,max:180,onChange:e=>U("h",e)}),(0,i.jsx)(u,{label:"S",value:D.s,min:-100,max:100,onChange:e=>U("s",e)})]}),(0,i.jsx)(u,{label:"B",value:D.b,min:-100,max:100,onChange:e=>U("b",e)}),(0,i.jsx)(u,{label:"C",value:D.c,min:-100,max:100,onChange:e=>U("c",e)}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:"11px",color:"#999",cursor:"pointer"},children:[(0,i.jsx)("input",{type:"checkbox",checked:!!D.colorize,onChange:e=>w({...D,colorize:e.target.checked||void 0}),style:{accentColor:"rgba(90, 140, 255, 0.8)"}}),"Colorize"]})]})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[849],{849:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});var a=n(206),s=n(1406);function i(){let[e,t]=(0,s.useState)("");return(0,s.useEffect)(()=>{let e=setInterval(()=>{t(e=>e.length>=3?"":e+".")},400);return()=>clearInterval(e)},[]),(0,a.jsx)(a.Fragment,{children:e})}let r=function(e){let{visible:t}=e,[n,r]=(0,s.useState)(0),[o,l]=(0,s.useState)(!1),[c,u]=(0,s.useState)(1),[d,f]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{r(Math.floor(6*Math.random())),l(!0)},[]),(0,s.useEffect)(()=>{t&&(r(Math.floor(6*Math.random())),u(1),f(!1))},[t]),(0,s.useEffect)(()=>{if(!t&&o){let e=setTimeout(()=>u(0),50),t=setTimeout(()=>f(!0),700);return()=>{clearTimeout(e),clearTimeout(t)}}},[t,o]),d||!o)?null:(0,a.jsxs)("div",{className:"absolute inset-0 z-50 bg-[#0e0c1a] flex flex-col items-center justify-center gap-4 transition-opacity duration-[600ms] ease-out",style:{opacity:c,pointerEvents:t?"auto":"none"},children:[(0,a.jsx)("style",{children:"\n @keyframes loading-walk-sprite {\n 0% { background-position-x: 0px; }\n 25% { background-position-x: -64px; }\n 50% { background-position-x: -128px; }\n 75% { background-position-x: -64px; }\n 100% { background-position-x: 0px; }\n }\n @keyframes loading-walk-move {\n 0% { transform: translateX(-60px) scaleX(1); }\n 45% { transform: translateX(60px) scaleX(1); }\n 50% { transform: translateX(60px) scaleX(-1); }\n 95% { transform: translateX(-60px) scaleX(-1); }\n 100% { transform: translateX(-60px) scaleX(1); }\n }\n "}),(0,a.jsx)("div",{style:{position:"relative",width:64,height:128},children:(0,a.jsx)("div",{style:{width:64,height:128,backgroundImage:"url(".concat("/assets/characters/char_".concat(n,".png"),")"),backgroundSize:"448px 384px",backgroundPositionY:"-256px",imageRendering:"pixelated",animation:"loading-walk-sprite 0.5s steps(1) infinite, loading-walk-move 3s linear infinite"}})}),(0,a.jsxs)("div",{className:"font-mono text-[13px] text-muted-foreground tracking-wide",children:["Loading office",(0,a.jsx)("span",{className:"inline-block w-6 text-left",children:(0,a.jsx)(i,{})})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[853],{6853:(e,t,n)=>{n.r(t),n.d(t,{default:()=>v});var r=n(206),o=n(1406);function l(e){let{msgCount:t,frozen:n=!1,key:r="",forcePin:l=!1}=e,s=(0,o.useRef)(null),a=(0,o.useRef)(!0),i=(0,o.useRef)(!1),d=(0,o.useRef)(0),c=()=>{var e,t;return null!=(t=null==(e=s.current)?void 0:e.parentElement)?t:null},p=()=>{let e=s.current;e&&(e.scrollIntoView({block:"end",behavior:"instant"}),a.current=!0)},x=()=>{!n&&a.current&&(d.current||(d.current=requestAnimationFrame(()=>{d.current=0,a.current&&!n&&p()})))},u=(0,o.useRef)(l);(0,o.useLayoutEffect)(()=>{l&&!u.current&&(a.current=!0),u.current=l},[l]),(0,o.useLayoutEffect)(()=>{!n&&a.current&&p()},[r,t,n]),(0,o.useEffect)(()=>{let e=c();if(!e)return;let t=0,r=()=>{i.current||n||(cancelAnimationFrame(t),t=requestAnimationFrame(()=>{a.current=e.scrollHeight-e.scrollTop-e.clientHeight<=80}))};return e.addEventListener("scroll",r,{passive:!0}),()=>{e.removeEventListener("scroll",r),cancelAnimationFrame(t)}},[r,n]),(0,o.useEffect)(()=>{let e=c();if(!e)return;let t=new ResizeObserver(()=>{n||(i.current=!0,x(),requestAnimationFrame(()=>{i.current=!1}))});return t.observe(e),()=>{t.disconnect(),i.current=!1}},[r,n]),(0,o.useEffect)(()=>{let e=c();if(!e)return;let t=new MutationObserver(()=>{n||x()});return t.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>t.disconnect()},[r,n]),(0,o.useEffect)(()=>{let e=()=>{!n&&a.current&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{a.current&&!n&&p()})})},t=()=>{"visible"===document.visibilityState&&e()};return document.addEventListener("visibilitychange",t),window.addEventListener("focus",e),()=>{document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",e)}},[r,n]);let m=(0,o.useRef)(n);return(0,o.useEffect)(()=>{let e=m.current;m.current=n,e&&!n&&(a.current=!0,requestAnimationFrame(()=>p()))},[n]),(0,o.useEffect)(()=>()=>{d.current&&(cancelAnimationFrame(d.current),d.current=0)},[]),s}var s=n(7821),a=n(4932),i=n(7877),d=n(7580),c=n(370),p=n(9362);function x(e){let{message:t,hint:n,className:o}=e,l=["te",o].filter(Boolean).join(" ");return(0,r.jsxs)("div",{className:l,children:[(0,r.jsx)("span",{className:"te-msg",children:t}),n&&(0,r.jsx)("span",{className:"te-hint",children:n})]})}n(1310),(0,n(8688).F)("inline-flex items-center gap-1 px-1.5 py-px font-mono text-[10px] font-medium tracking-wide whitespace-nowrap leading-snug border",{variants:{variant:{green:"text-sem-green bg-sem-green/8 border-sem-green/25",yellow:"text-sem-yellow bg-sem-yellow/8 border-sem-yellow/25",red:"text-sem-red bg-sem-red/8 border-sem-red/25",blue:"text-sem-blue bg-sem-blue/8 border-sem-blue/25",purple:"text-sem-purple bg-sem-purple/8 border-sem-purple/25",dim:"text-term-green-dim bg-term-green-dim/8 border-term-green-dim/20"}},defaultVariants:{variant:"dim"}});var u=n(8163),m=n(9385);let g=(0,n(5282).default)(()=>Promise.resolve().then(n.bind(n,7580)),{loadableGenerated:{webpack:()=>[7580]},ssr:!1});function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if(!e)return;let n=getComputedStyle(e),r=parseInt(n.lineHeight)||20,o=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),l=parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),s=r*t;e.style.height="0";let a=e.scrollHeight,i="border-box"===n.boxSizing,d=i?a+l:a-o,c=Math.max(i?r+o+l:r,Math.min(d,s+(i?o+l:0)));e.style.height=c+"px",e.style.overflowY=(i?d-o-l:d)>s?"auto":"hidden"}function h(e){let{onLoadMore:t}=e,n=(0,o.useRef)(null),l=(0,o.useRef)(t);return l.current=t,(0,o.useEffect)(()=>{var e;let t=n.current;if(!t)return;let r=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting&&l.current()},{threshold:0,root:null!=(e=t.closest("[data-scrollbar]"))?e:t.parentElement,rootMargin:"100px 0px 0px 0px"});return r.observe(t),()=>r.disconnect()},[]),(0,r.jsx)("div",{ref:n,style:{height:1,flexShrink:0}})}let b=(0,o.memo)(function(e){var t;let{visibleMessages:n,hasMoreMessages:o,messages:l,name:s,agentId:i,onPreview:d,onReview:c,isTeamLead:p,isTeamMember:u,teamPhase:m,detectedBackends:f,onLoadMore:b,busy:y,pendingApproval:v,lastLogLine:j,chatEndRef:w,isOwner:k,onApproval:S}=e;return(0,r.jsxs)(r.Fragment,{children:[p&&(()=>{if(!m)return null;let e={create:{color:a.KE,icon:"\uD83D\uDCAC",hint:"Chat with your team lead to define the project"},design:{color:a.O2,icon:"\uD83D\uDCCB",hint:"Review the plan — approve it or give feedback"},execute:{color:a.O2,icon:"⚡",hint:"Team is building your project"},complete:{color:a.$C,icon:"✓",hint:"Review results — give feedback or end project"}}[m];return e?(0,r.jsxs)("div",{style:{padding:"6px 10px",marginBottom:8,borderLeft:"2px solid ".concat(a.Y0),display:"flex",alignItems:"center",gap:6,fontSize:a.Z8,fontFamily:a.Rw},children:[(0,r.jsx)("span",{style:{color:a.Y0,textTransform:"uppercase",letterSpacing:"0.05em"},children:m}),(0,r.jsx)("span",{style:{color:a.Y0},children:e.hint})]}):null})(),0===l.length&&(0,r.jsx)(x,{message:u?"managed by Team Lead":"no messages yet",hint:u?void 0:"send a message to get started"}),o&&(0,r.jsx)(h,{onLoadMore:b}),n.map(e=>(0,r.jsx)(g,{msg:e,agentName:s,onPreview:d,onReview:c,isTeamLead:p,isTeamMember:u,teamPhase:p?m:null,detectedBackends:f},e.id)),v&&(0,r.jsxs)("div",{style:{marginBottom:8,padding:12,borderLeft:"2px solid ".concat(a.O2),fontSize:a.Z8,fontFamily:a.Rw},children:[(0,r.jsx)("div",{style:{color:a.O2,marginBottom:6},children:v.title}),(0,r.jsx)("div",{style:{color:a.lR,marginBottom:10,lineHeight:1.65},children:v.summary}),k&&(0,r.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,r.jsx)("button",{className:"term-btn",onClick:()=>S(v.approvalId,"yes"),style:{flex:1,padding:"6px",border:"1px solid ".concat(a.Y0),backgroundColor:"transparent",color:a.$C,cursor:"pointer",fontSize:a.Z8,fontFamily:a.Rw},children:"approve"}),(0,r.jsx)("button",{className:"term-btn",onClick:()=>S(v.approvalId,"no"),style:{flex:1,padding:"6px",border:"1px solid ".concat(a.Y0),backgroundColor:"transparent",color:a.v_,cursor:"pointer",fontSize:a.Z8,fontFamily:a.Rw},children:"reject"})]})]}),y&&!v&&l.length>0&&(null==(t=l[l.length-1])?void 0:t.text)&&(()=>{var e,t,n;let o=j||(null==(n=l[l.length-1])||null==(t=n.text)||null==(e=t.split("\n").filter(Boolean).pop())?void 0:e.slice(0,60))||null;return(0,r.jsxs)("div",{style:{padding:"4px 0",display:"flex",alignItems:"center",gap:6},children:[(0,r.jsx)("span",{style:{color:a.Y0},className:"working-dots",children:(0,r.jsx)("span",{className:"working-dots-mid"})}),o&&(0,r.jsx)("span",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw},children:o.slice(0,60)})]})})(),(0,r.jsx)("div",{ref:w})]})});function y(e){let{onApplyReviewFixes:t,onDismissReview:n}=e,[l,s]=(0,o.useState)(""),a=(0,o.useRef)(null);return(0,o.useEffect)(()=>{setTimeout(()=>{var e;return null==(e=a.current)?void 0:e.focus()},100)},[]),(0,r.jsxs)("div",{className:"px-3 py-2 bg-term-panel font-mono shrink-0 shadow-[0_-3px_6px_-2px_rgba(0,0,0,0.35),inset_0_1px_0_rgba(255,255,255,0.03)]",children:[(0,r.jsx)("div",{className:"flex gap-2 items-center mb-2",children:(0,r.jsx)(p.A,{ref:a,type:"text",value:l,onChange:e=>s(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&t&&(e.preventDefault(),t(l||void 0))},placeholder:"Add feedback for the fix...",style:{flex:1}})}),(0,r.jsxs)("div",{className:"flex gap-2 justify-center",children:[t&&(0,r.jsx)(c.A,{variant:"success",onClick:()=>t(l||void 0),style:{padding:"6px 18px"},children:"apply fixes"}),n&&(0,r.jsx)(c.A,{variant:"dim",onClick:n,style:{padding:"6px 18px"},children:"dismiss"})]})]})}let v=(0,o.memo)(function(e){var t,n,c,p,v,j,w;let{agentId:k,name:S,role:R,backend:C,status:N,cwd:F,workDir:z,messages:T,visibleMessages:D,hasMoreMessages:M,tokenUsage:_,isTeamLead:Z,isTeamMember:E,isExternal:L,teamId:I,teamPhase:O,pendingApproval:H,awaitingApproval:Y,lastLogLine:A,busy:B,pid:$,isOwner:P,isCollaborator:U,isSpectator:W,prompt:K,onPromptChange:q,pendingImages:V,onPendingImagesChange:G,suggestions:J,suggestText:X,onSuggestTextChange:Q,onSubmit:ee,onCancel:et,onFire:en,onApproval:er,onApprovePlan:eo,onEndProject:el,onSuggest:es,onPreview:ea,onLoadMore:ei,onPasteImage:ed,onPasteText:ec,onDropImage:ep,onQuickApprove:ex,onReview:eu,detectedBackends:em,autoMerge:eg,pendingMerge:ef,lastMergeCommit:eh,lastMergeMessage:eb,undoCount:ey,onMerge:ev,onRevert:ej,onUndoMerge:ew,reviewerOverlay:ek,onReviewerLoadMore:eS,onApplyReviewFixes:eR,onDismissReview:eC,scrollFrozen:eN,hideInfoRole:eF,inlineAvatar:ez}=e,eT=(0,s.DY)(),eD=null!=(v=eT[N])?v:eT.idle;(ef||(null!=ey?ey:0)>0||eg)&&console.log("[Undo] ".concat(k,": busy=").concat(B," isOwner=").concat(P," teamId=").concat(I," isTeamMember=").concat(E," pendingMerge=").concat(ef," undoCount=").concat(ey," awaitingApproval=").concat(Y," onUndoMerge=").concat(!!ew));let eM=(0,o.useRef)(K),e_=""!==eM.current&&""===K;eM.current=K;let eZ=l({msgCount:T.length,frozen:eN,key:k,forcePin:e_}),eE=(0,o.useRef)(null);(0,o.useEffect)(()=>{!K&&eE.current&&(eE.current.style.height="auto")},[K]);let[eL,eI]=(0,o.useState)(!1),eO=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=eO.current;if(!e)return;let t=0,n=()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>{eI(e.scrollHeight-e.scrollTop-e.clientHeight>120)})};return e.addEventListener("scroll",n,{passive:!0}),()=>{e.removeEventListener("scroll",n),cancelAnimationFrame(t)}},[k]);let eH=(0,o.useCallback)(()=>{var e;null==(e=eZ.current)||e.scrollIntoView({block:"end",behavior:"smooth"}),eI(!1)},[eZ]),eY=l({msgCount:null!=(j=null==ek?void 0:ek.messages.length)?j:0,frozen:!1,key:null!=(w=null==ek?void 0:ek.agentId)?w:""});return(0,r.jsxs)("div",{className:"flex flex-col flex-1 min-h-0 relative",children:[(0,r.jsxs)("div",{className:(0,m.cn)("term-info-bar flex items-center gap-2 px-3 py-2 bg-term-panel font-mono text-term shrink-0","working"===N?"ap-status-working":"waiting_approval"===N?"ap-status-waiting":"done"===N?"ap-status-done":"error"===N?"ap-status-error":"ap-status-idle"),style:{borderBottom:"1px solid ".concat(a.JH),boxShadow:"0 2px 6px -1px rgba(0,0,0,0.45), inset 0 -1px 0 rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.03)"},children:[ez&&(()=>{var e,t,n;let o=ez.AvatarComponent,l=C?null!=(n=null==(e=s.GN.find(e=>e.id===C))?void 0:e.name)?n:C:null,i=null==R||null==(t=R.split("—")[0])?void 0:t.trim();return(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)("div",{className:"relative w-[24px] h-[28px] overflow-hidden rounded-sm shrink-0",style:{border:"1px solid ".concat(a.JH)},children:(0,r.jsx)("div",{className:"-mt-px",children:(0,r.jsx)(o,{palette:ez.palette,zoom:1.5,ready:ez.assetsReady})})}),(0,r.jsx)("span",{className:"text-[13px] text-term-text-bright font-medium tracking-tight shrink-0",children:ez.name}),ez.isTeamLead&&(0,r.jsx)("span",{className:"text-[9px] font-mono font-bold text-sem-yellow px-[3px] leading-[15px] rounded-sm shrink-0",style:{border:"1px solid ".concat(a.O2,"40")},children:"LEAD"}),l&&(0,r.jsx)("span",{className:"text-[11px] text-term-text opacity-60 shrink-0 tracking-wide",children:l}),i&&(0,r.jsx)("span",{className:"text-[11px] text-term-text opacity-45 shrink-0 tracking-wide hidden sm:inline",children:i})]})})(),!eF&&!ez&&(0,r.jsx)("span",{className:"text-term-text-bright shrink-0 tracking-tight",children:null==R||null==(t=R.split("—")[0])?void 0:t.trim()}),(F||z)&&(()=>{var e;let t=null!=(e=null!=F?F:z)?e:"",n=t.replace(/^\/Users\/[^/]+/,"~");return(0,r.jsxs)(u.m_,{children:[(0,r.jsx)(u.k$,{asChild:!0,children:(0,r.jsx)("span",{className:"term-path-scroll",style:{color:a.lR,flexShrink:1,minWidth:0,opacity:.5,overflow:"hidden",whiteSpace:"nowrap",direction:"rtl",textAlign:"left",fontSize:a.Z8-1},children:(0,r.jsx)("bdi",{children:n})})}),(0,r.jsx)(u.ZI,{side:"bottom",className:"max-w-xs break-all",children:t})]})})(),(0,r.jsx)("span",{className:"flex-1"}),(0,r.jsxs)(u.m_,{children:[(0,r.jsx)(u.k$,{asChild:!0,children:(0,r.jsx)("span",{className:"shrink-0 w-[7px] h-[7px] rounded-full",style:{backgroundColor:eD.color,boxShadow:B?"0 0 6px ".concat(eD.color,"60"):"none",animation:B?"px-pulse-gold 1.5s ease infinite":"none"}})}),(0,r.jsx)(u.ZI,{side:"bottom",children:eD.label})]}),_.inputTokens>0&&(0,r.jsx)(d.TokenBadge,{inputTokens:_.inputTokens,outputTokens:_.outputTokens}),!I&&P&&(0,r.jsxs)(u.m_,{children:[(0,r.jsx)(u.k$,{asChild:!0,children:(0,r.jsx)("button",{className:"tdx",onClick:e=>{e.stopPropagation(),en(k)},"aria-label":"Fire agent",children:"✕"})}),(0,r.jsx)(u.ZI,{side:"bottom",children:"Fire agent"})]})]}),L&&(0,r.jsxs)("div",{className:"flex-1 flex flex-col bg-background min-h-0 overflow-hidden",children:[(0,r.jsxs)("div",{className:"px-3 py-2 bg-term-panel shrink-0 shadow-[0_3px_6px_-2px_rgba(0,0,0,0.45),inset_0_-1px_0_rgba(0,0,0,0.5),inset_0_1px_0_rgba(255,255,255,0.03)]",children:[(0,r.jsx)("div",{className:"font-mono text-term text-muted-foreground mb-1 tracking-wide",children:"EXTERNAL PROCESS"}),(0,r.jsxs)("div",{className:"flex gap-3 font-mono text-term text-muted-foreground flex-wrap",children:[(0,r.jsx)("span",{children:null!=C?C:"unknown"}),(0,r.jsxs)("span",{children:["PID ",null!=$?$:"—"]}),(0,r.jsx)("span",{className:"term-path-scroll max-w-[300px]",title:null!=F?F:void 0,children:null!=F?F:"—"})]})]}),(0,r.jsxs)("div",{"data-scrollbar":!0,className:"crt-screen flex-1 overflow-y-auto px-2.5 py-2 flex flex-col min-h-0",children:[0===T.length&&(0,r.jsx)(x,{message:"waiting for output"}),M&&(0,r.jsx)(h,{onLoadMore:ei}),D.map(e=>(0,r.jsx)(g,{msg:e,agentName:S},e.id)),(0,r.jsx)("div",{ref:eZ})]}),(0,r.jsx)("div",{className:"px-3 py-1.5 bg-muted font-mono text-term text-muted-foreground text-center shrink-0",children:"Read-only — this process is running externally"})]}),ek&&ek.busy&&(0,r.jsxs)("div",{style:{position:"absolute",bottom:0,left:0,right:0,zIndex:20,minHeight:80,maxHeight:"40%",display:"flex",flexDirection:"column",background:"color-mix(in srgb, ".concat(a.cO," 6%, ").concat(a.gc,")"),borderTop:"1.5px solid ".concat(a.cO,"30"),boxShadow:"0 -4px 12px -2px rgba(0,0,0,0.5), inset 0 1px 0 ".concat(a.cO,"12"),fontFamily:a.Rw,fontSize:a.Z8,animation:"review-overlay-in 0.3s ease-out"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"8px 12px",boxShadow:"0 2px 4px -1px rgba(0,0,0,0.3), inset 0 -1px 0 ".concat(a.cO,"18"),flexShrink:0},children:[(0,r.jsx)("span",{style:{color:a.cO,fontSize:9,fontWeight:600,padding:"1px 6px",borderRadius:3,background:"".concat(a.cO,"18"),letterSpacing:"0.04em",textTransform:"uppercase"},children:"REVIEW"}),(0,r.jsx)("span",{style:{color:a.oj},children:(null==(c=ek.role)||null==(n=c.split("—")[0])?void 0:n.trim())||ek.name}),(0,r.jsx)("span",{className:"working-dots",style:{color:a.cO},children:(0,r.jsx)("span",{className:"working-dots-mid"})}),(0,r.jsx)("span",{style:{flex:1}}),ek.tokenUsage.inputTokens>0&&(0,r.jsx)(d.TokenBadge,{inputTokens:ek.tokenUsage.inputTokens,outputTokens:ek.tokenUsage.outputTokens}),eC&&(0,r.jsx)("button",{onClick:eC,style:{padding:"2px 8px",border:"1px solid ".concat(a.KD),backgroundColor:"transparent",color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,cursor:"pointer",flexShrink:0,lineHeight:1},onMouseEnter:e=>{e.currentTarget.style.color=a.lR},onMouseLeave:e=>{e.currentTarget.style.color=a.Y0},children:"\xd7"})]}),ek.visibleMessages.length>0&&(0,r.jsxs)("div",{"data-scrollbar":!0,style:{flex:1,overflowY:"auto",padding:"8px 12px",minHeight:0,maxHeight:120,backgroundColor:"color-mix(in srgb, ".concat(a.cO," 3%, ").concat(a.lr,")")},children:[ek.visibleMessages.filter(e=>"user"!==e.role&&e.text).map(e=>(0,r.jsx)("div",{style:{fontSize:a.Z8,color:a.Y0,lineHeight:1.65,fontFamily:a.Rw,marginBottom:4,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.text.length>300?e.text.slice(-300):e.text},e.id)),(0,r.jsx)("div",{ref:eY})]}),0===ek.visibleMessages.length&&(0,r.jsx)("div",{style:{padding:"8px 12px",color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw},children:(null==(p=ek.lastLogLine)?void 0:p.slice(0,80))||"Reviewing code changes..."})]}),ek&&!ek.busy&&(0,r.jsxs)("div",{style:{position:"absolute",bottom:0,left:0,right:0,zIndex:20,height:"65%",minHeight:200,display:"flex",flexDirection:"column",backgroundColor:"color-mix(in srgb, ".concat(a.cO," 3%, ").concat(a.lr,")"),borderTop:"1.5px solid ".concat(a.cO,"30"),boxShadow:"0 -4px 12px -2px rgba(0,0,0,0.5), inset 0 1px 0 ".concat(a.cO,"12"),animation:"review-slide-up 0.25s ease-out"},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 14px",background:"color-mix(in srgb, ".concat(a.cO," 6%, ").concat(a.gc,")"),boxShadow:"0 3px 6px -2px rgba(0,0,0,0.4), inset 0 -1px 0 ".concat(a.cO,"18, inset 0 1px 0 rgba(255,255,255,0.03)"),fontSize:a.Z8,fontFamily:a.Rw,flexShrink:0},children:[(0,r.jsx)("span",{style:{color:a.cO,fontSize:9,fontWeight:600,padding:"1px 6px",borderRadius:3,background:"".concat(a.cO,"18"),letterSpacing:"0.04em",textTransform:"uppercase"},children:"REVIEW"}),(0,r.jsx)("span",{style:{color:"error"===ek.status?a.v_:a.$C},children:"error"===ek.status?"error":"done"}),(0,r.jsx)("span",{style:{color:a.oj},children:ek.name}),(0,r.jsx)("span",{style:{flex:1}}),ek.tokenUsage.inputTokens>0&&(0,r.jsx)(d.TokenBadge,{inputTokens:ek.tokenUsage.inputTokens,outputTokens:ek.tokenUsage.outputTokens})]}),(0,r.jsxs)("div",{"data-scrollbar":!0,className:"term-dotgrid term-chat-area",style:{flex:1,overflowY:"auto",padding:"10px 14px",display:"flex",flexDirection:"column",minHeight:0,backgroundColor:"color-mix(in srgb, ".concat(a.cO," 3%, ").concat(a.lr,")")},children:[(()=>{let e=ek.visibleMessages.filter(e=>"user"!==e.role&&e.text);return e.length>0?e.map(e=>(0,r.jsx)(g,{msg:e,agentName:ek.name},e.id)):ek.reviewResultText?(0,r.jsx)("div",{style:{color:"error"===ek.status?a.v_:a.lR,fontSize:a.Z8,fontFamily:a.Rw,padding:"10px 0",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.7},children:ek.reviewResultText}):(0,r.jsx)("div",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,padding:"10px 0"},children:"(No review content)"})})(),(0,r.jsx)("div",{ref:eY})]}),(0,r.jsx)(y,{onApplyReviewFixes:eR,onDismissReview:eC})]}),!L&&(0,r.jsxs)("div",{onPaste:ed,onDragOver:e=>{var t,n;(null==(n=e.dataTransfer)||null==(t=n.types)?void 0:t.includes("Files"))&&(e.preventDefault(),e.currentTarget.style.outline="2px solid ".concat(a.O2,"60"))},onDragLeave:e=>{e.currentTarget.style.outline="none"},onDrop:e=>{e.currentTarget.style.outline="none",ep(e)},className:"crt-screen flex-1 flex flex-col bg-background min-h-0 overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative flex-1 min-h-0 flex flex-col",children:[(0,r.jsx)("div",{ref:eO,"data-scrollbar":!0,className:"term-dotgrid term-chat-area flex-1 overflow-y-auto px-3.5 pt-3.5 pb-2.5 flex flex-col min-h-0",children:(0,r.jsx)(b,{visibleMessages:D,hasMoreMessages:M,messages:T,name:S,agentId:k,onPreview:ea,onReview:ek||eC?void 0:eu,isTeamLead:Z,isTeamMember:E,teamPhase:O,detectedBackends:em,onLoadMore:ei,busy:B,pendingApproval:H,lastLogLine:A,chatEndRef:eZ,isOwner:P,onApproval:er})}),(0,r.jsxs)("div",{className:"scroll-pill".concat(eL?" visible":""),onClick:eH,role:"button","aria-label":"Scroll to bottom",children:[(0,r.jsx)("span",{className:"scroll-pill-arrow",children:"↓"}),"new messages"]}),!B&&P&&!I&&!E&&!ef&&(null!=ey?ey:0)>0&&ew&&(0,r.jsxs)("button",{className:"term-btn",onClick:ew,style:{position:"absolute",bottom:8,right:14,display:"inline-flex",alignItems:"center",gap:5,padding:"4px 12px",border:"1px solid ".concat(a.v_,"40"),backgroundColor:a.lr,color:a.v_,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,zIndex:2,borderRadius:3,opacity:.85},children:[(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M2 6l4-4 4 4"}),(0,r.jsx)("path",{d:"M6 2v8a4 4 0 0 0 4 4h2"})]}),"Undo (",ey,")"]})]}),!W&&J.length>0&&(0,r.jsxs)("div",{"data-scrollbar":!0,style:{padding:"6px 10px",backgroundColor:a.lr,maxHeight:120,overflowY:"auto",boxShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 -2px 4px rgba(0,0,0,0.2)"},children:[(0,r.jsx)("div",{style:{fontSize:a.Z8,color:a.Y0,fontFamily:a.Rw,marginBottom:4,letterSpacing:"0.05em"},children:"SUGGESTIONS"}),J.slice(-10).map((e,t)=>(0,r.jsxs)("div",{style:{fontSize:a.Z8,color:a.lR,marginBottom:2,lineHeight:1.65,fontFamily:a.Rw},children:[(0,r.jsxs)("span",{style:{color:a.Y0},children:[e.author,":"]})," ",e.text]},t))]}),V.length>0&&(0,r.jsxs)("div",{style:{padding:"6px 10px",backgroundColor:a.lr,display:"flex",gap:6,flexWrap:"wrap",alignItems:"center",boxShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 -2px 4px rgba(0,0,0,0.2)"},children:[V.map((e,t)=>(0,r.jsxs)("div",{style:{position:"relative",display:"inline-block"},children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,style:{height:48,borderRadius:4,border:"1px solid ".concat(a.JH)}}),(0,r.jsx)("button",{onClick:()=>G(V.filter((e,n)=>n!==t)),style:{position:"absolute",top:-4,right:-4,width:16,height:16,borderRadius:"50%",border:"none",backgroundColor:a.v_,color:"#fff",fontSize:10,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0,lineHeight:1},children:"\xd7"})]},t)),(0,r.jsxs)("span",{style:{fontSize:a.Z8,color:a.Y0,fontFamily:a.Rw},children:[V.length," image",V.length>1?"s":""," attached"]})]}),(()=>{let e=Z?O:null;return W?(0,r.jsx)("div",{className:"px-2.5 py-2 bg-muted shrink-0 font-mono text-term text-muted-foreground text-center shadow-[0_-3px_6px_-2px_rgba(0,0,0,0.35),inset_0_1px_0_rgba(255,255,255,0.03)]",children:"Watching — read-only mode"}):U?(0,r.jsx)("div",{style:{padding:"8px 10px",background:a.gc,flexShrink:0,boxShadow:"0 -3px 6px -2px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03)"},children:(0,r.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,r.jsx)("textarea",{rows:1,value:X,onChange:e=>{Q(e.target.value),f(e.currentTarget)},onKeyDown:e=>(0,i.$$)(e)&&(e.preventDefault(),es()),placeholder:"Share an idea...",maxLength:500,style:{flex:1,padding:"6px 10px",border:"1px solid ".concat(a.KD),backgroundColor:a.lr,color:a.lR,fontSize:a.Z8,outline:"none",resize:"none",lineHeight:"20px",fontFamily:a.Rw}}),(0,r.jsx)("button",{onClick:es,disabled:!X.trim(),style:{padding:"6px 14px",border:"1px solid ".concat(a.Y0),backgroundColor:"transparent",color:X.trim()?a.lR:a.Y0,fontSize:a.Z8,cursor:X.trim()?"pointer":"default",fontFamily:a.Rw},children:"suggest"})]})}):(0,r.jsx)("div",{className:"term-input-area px-3 py-2 bg-term-panel shrink-0",children:E?(0,r.jsx)("div",{className:"text-center text-muted-foreground font-mono text-term py-2",children:"Tasks are assigned by the Team Lead"}):"execute"===e?(0,r.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:0},children:[(0,r.jsxs)("div",{className:"term-input-well",children:[(0,r.jsx)("span",{style:{color:B?a.Y0:a.DM,fontSize:a.Z8,fontFamily:a.Rw,padding:"6px 0 6px 8px",flexShrink:0,textShadow:"none"},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{if("Escape"===e.key&&B)return void et();(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:B?"esc stop \xb7 type to continue":"",style:{flex:1,padding:"6px 5px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,fontWeight:400,caretColor:a.DM,resize:"none",lineHeight:"20px"}})]}),!B&&(0,r.jsx)("span",{onClick:el,style:{padding:"2px 8px 4px",color:a.Y0,fontSize:12,cursor:"pointer",fontFamily:a.Rw},children:"close project"})]}):"design"!==e||B?"complete"!==e||B?B||!P||I||E||!ef?Y&&!B?(0,r.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",padding:"4px 0"},children:[(0,r.jsx)("button",{className:"term-btn",onClick:ex,style:{padding:"5px 14px",border:"1px solid ".concat(a.DM,"60"),backgroundColor:"transparent",color:a.DM,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,flexShrink:0},children:"approve"}),(0,r.jsxs)("div",{className:"term-input-well",style:{flex:1},children:[(0,r.jsx)("span",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,padding:"0 0 0 6px"},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:"or give feedback...",style:{flex:1,padding:"5px 6px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,caretColor:a.DM,resize:"none",lineHeight:"20px"}})]})]}):(0,r.jsxs)("div",{className:"term-input-well",children:[(0,r.jsx)("span",{style:{color:B?a.Y0:a.DM,fontSize:a.Z8,fontFamily:a.Rw,padding:"6px 0 6px 8px",flexShrink:0,textShadow:"none"},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{if("Escape"===e.key&&B)return void et();(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:B?"esc stop \xb7 type to continue":"",style:{flex:1,padding:"6px 5px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,fontWeight:400,caretColor:a.DM,resize:"none",lineHeight:"20px"},autoFocus:!0})]}):(0,r.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",padding:"4px 0"},children:[!eg&&ev&&(0,r.jsxs)("button",{className:"term-btn",onClick:ev,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"5px 14px",border:"1px solid ".concat(a.DM,"60"),backgroundColor:"transparent",color:a.DM,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,flexShrink:0},children:[(0,r.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M12 3v6M4 3v10M4 13l4-4 4 0"})}),"Merge"]}),!eg&&ej&&(0,r.jsxs)("button",{className:"term-btn",onClick:ej,style:{display:"inline-flex",alignItems:"center",gap:5,padding:"5px 14px",border:"1px solid ".concat(a.O2,"40"),backgroundColor:"transparent",color:a.O2,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,flexShrink:0},children:[(0,r.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M2 6l4-4 4 4"}),(0,r.jsx)("path",{d:"M6 2v8a4 4 0 0 0 4 4h2"})]}),"Revert"]}),(0,r.jsxs)("div",{className:"term-input-well",style:{flex:1,display:"flex",alignItems:"center"},children:[(0,r.jsx)("span",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,padding:"0 0 0 8px",flexShrink:0},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:"send a new task...",style:{flex:1,padding:"5px 6px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,caretColor:a.DM,resize:"none",lineHeight:"20px"}})]})]}):(0,r.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",padding:"4px 0"},children:[(0,r.jsxs)("div",{className:"term-input-well",style:{flex:1},children:[(0,r.jsx)("span",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,padding:"0 0 0 6px"},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:"request changes...",style:{flex:1,padding:"5px 6px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,caretColor:a.DM,resize:"none",lineHeight:"20px"}})]}),(0,r.jsx)("button",{onClick:el,style:{padding:"5px 14px",border:"1px solid ".concat(a.O2,"40"),backgroundColor:"transparent",color:a.O2,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,flexShrink:0},children:"Close Project"})]}):(0,r.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",padding:"4px 0"},children:[(0,r.jsx)("button",{className:"term-btn",onClick:eo,style:{padding:"5px 14px",border:"1px solid ".concat(a.DM,"60"),backgroundColor:"transparent",color:a.DM,fontSize:a.Z8,cursor:"pointer",fontFamily:a.Rw,flexShrink:0},children:"approve"}),(0,r.jsxs)("div",{className:"term-input-well",style:{flex:1},children:[(0,r.jsx)("span",{style:{color:a.Y0,fontSize:a.Z8,fontFamily:a.Rw,padding:"0 0 0 6px"},children:">"}),(0,r.jsx)("textarea",{ref:eE,rows:1,className:"term-input",value:K,onPaste:ec,onChange:e=>{q(e.target.value),f(e.currentTarget)},onKeyDown:e=>{(0,i.$$)(e)&&(e.preventDefault(),ee())},placeholder:"or give feedback...",style:{flex:1,padding:"5px 6px",border:"none",backgroundColor:"transparent",color:a.oj,fontSize:a.Z8,outline:"none",fontFamily:a.Rw,caretColor:a.DM,resize:"none",lineHeight:"20px"}})]})]})})})()]})]})})},8163:(e,t,n)=>{n.d(t,{TooltipProvider:()=>a,ZI:()=>c,k$:()=>d,m_:()=>i});var r=n(206),o=n(1406),l=n(3767),s=n(9385);let a=l.Kq,i=l.bL,d=l.l9,c=o.forwardRef((e,t)=>{let{className:n,sideOffset:o=4,...a}=e;return(0,r.jsx)(l.ZL,{children:(0,r.jsx)(l.UC,{ref:t,sideOffset:o,className:(0,s.cn)("z-[50000] overflow-hidden","px-2.5 py-1.5","bg-term-panel border border-border shadow-lg","font-mono text-[11px] text-foreground","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",n),...a})})});c.displayName=l.UC.displayName},9362:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(206),o=n(1406),l=n(9385);let s=o.forwardRef((e,t)=>{let{className:n,type:o,...s}=e;return(0,r.jsx)("input",{type:o,className:(0,l.cn)("flex w-full px-2.5 py-1.5","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...s})});s.displayName="Input",o.forwardRef((e,t)=>{let{className:n,...o}=e;return(0,r.jsx)("textarea",{className:(0,l.cn)("flex w-full px-2.5 py-1.5 resize-none","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...o})}).displayName="Textarea";let a=(0,o.forwardRef)(function(e,t){let{inline:n,className:o,...a}=e;return(0,r.jsx)(s,{ref:t,className:(0,l.cn)(n&&"border-none bg-transparent text-term-text-bright caret-accent px-1.5 py-1.5 focus:border-none focus:shadow-none",o),...a})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[88],{4088:(e,n,t)=>{t.r(n),t.d(n,{connectToAbly:()=>r,disconnectAbly:()=>h,sendCommand:()=>d});var c=t(9984),o=t(7334),a=t(138),l=t(5149);let i=null,s=null;async function r(e,n){(i=new c.Realtime({authCallback:async(t,c)=>{try{let t=(0,l.getGatewayHttpUrl)(),o=await fetch("".concat(t,"/ably/token"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({machineId:e,sessionToken:n})});if(!o.ok)throw Error("Token request failed");let a=await o.json();c(null,a)}catch(e){c(e instanceof Error?e.message:String(e),null)}}})).connection.on("connected",()=>{a.hK.getState().setConnected(!0),i.channels.get("machine:".concat(e,":commands")).publish("PING",{type:"PING"})}),i.connection.on("disconnected",()=>{a.hK.getState().setConnected(!1)}),i.channels.get("machine:".concat(e,":events")).subscribe(e=>{try{let n=o.Cq.parse(e.data);a.hK.getState().handleEvent(n)}catch(e){console.error("[Web] Invalid event:",e)}}),s=i.channels.get("machine:".concat(e,":commands"))}function d(e){if(!s)throw Error("Not connected");console.log("[Web] Sending command:",e.type,e),s.publish(e.type,e).then(()=>console.log("[Web] Command published OK"),e=>console.error("[Web] Command publish failed:",e))}function h(){if(!i)return;let e=i.connection.state;"connected"===e||"disconnected"===e||"suspended"===e?i.close():("connecting"===e||"initialized"===e)&&(i.connection.once("connected",()=>null==i?void 0:i.close()),i.connection.once("failed",()=>{})),i=null,s=null}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[880],{2880:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var a=r(206),l=r(1406);let n={A:[28,34,34,62,34,34,34],B:[60,34,34,60,34,34,60],C:[28,34,32,32,32,34,28],D:[60,34,34,34,34,34,60],E:[62,32,32,60,32,32,62],F:[62,32,32,60,32,32,32],G:[28,34,32,46,34,34,28],H:[34,34,34,62,34,34,34],I:[28,8,8,8,8,8,28],J:[14,4,4,4,4,36,24],K:[34,36,40,48,40,36,34],L:[32,32,32,32,32,32,62],M:[34,54,42,42,34,34,34],N:[34,50,42,38,34,34,34],O:[28,34,34,34,34,34,28],P:[60,34,34,60,32,32,32],Q:[28,34,34,34,42,36,26],R:[60,34,34,60,40,36,34],S:[28,34,32,28,2,34,28],T:[62,8,8,8,8,8,8],U:[34,34,34,34,34,34,28],V:[34,34,34,34,20,20,8],W:[34,34,34,42,42,54,34],X:[34,34,20,8,20,34,34],Y:[34,34,20,8,8,8,8],Z:[62,2,4,8,16,32,62]," ":[0,0,0,0,0,0,0],0:[28,34,38,42,50,34,28],1:[8,24,8,8,8,8,28],2:[28,34,2,12,16,32,62],3:[28,34,2,12,2,34,28],4:[4,12,20,36,62,4,4],5:[62,32,60,2,2,34,28],6:[28,32,60,34,34,34,28],7:[62,2,4,8,16,16,16],8:[28,34,34,28,34,34,28],9:[28,34,34,30,2,2,28],".":[0,0,0,0,0,8,8],"!":[8,8,8,8,8,0,8],"-":[0,0,0,28,0,0,0],">":[16,8,4,2,4,8,16]},o=[{text:"> SYSTEM INIT...",color:"#22c55e",delay:0},{text:"> LOADING NEURAL CORE",color:"#22c55e",delay:600},{text:"> OPEN OFFICE ENGINE V1.0",color:"#818cf8",delay:1200},{text:"> OFFICE MODE READY",color:"#f97316",delay:1800}];function i(e){let{onComplete:t}=e,r=(0,l.useRef)(null),[i,c]=(0,l.useState)("boot"),[f,d]=(0,l.useState)(0),[s,h]=(0,l.useState)(!1),u=(0,l.useRef)(Date.now()),m=(0,l.useRef)([]),E=(0,l.useRef)(0),w=(0,l.useRef)(0),y=(0,l.useCallback)(e=>{let t="アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン";m.current=Array.from({length:Math.floor(e/14)},(e,r)=>({x:14*r,y:-500*Math.random(),speed:1+3*Math.random(),chars:Array.from({length:20},()=>t[Math.floor(Math.random()*t.length)]),opacity:.3+.7*Math.random()}))},[]),g=(0,l.useCallback)((e,t,r,a,l,o)=>{e.fillStyle=o;let i=6*l,c=r-t.length*i/2;for(let r=0;r<t.length;r++){let o=n[t[r].toUpperCase()];if(o)for(let t=0;t<7;t++)for(let n=0;n<6;n++)o[t]&1<<5-n&&e.fillRect(c+r*i+n*l,a+t*l,l,l)}},[]);return(0,l.useEffect)(()=>{let e=[];return o.forEach((t,r)=>{e.push(setTimeout(()=>d(r+1),t.delay))}),e.push(setTimeout(()=>c("title"),2800)),e.push(setTimeout(()=>{c("ready"),h(!0)},4200)),()=>e.forEach(clearTimeout)},[]),(0,l.useEffect)(()=>{if(!s)return;let e=setInterval(()=>h(e=>!e),500);return()=>clearInterval(e)},[s]),(0,l.useEffect)(()=>{let e=r.current;if(!e)return;let t=e.getContext("2d"),a=()=>{e.width=window.innerWidth,e.height=window.innerHeight,y(e.width)};a(),window.addEventListener("resize",a);let l=()=>{let{width:r,height:a}=e,n=Date.now()-u.current;t.fillStyle="rgba(10, 10, 20, 0.15)",t.fillRect(0,0,r,a),m.current.forEach(e=>{e.y+=e.speed,e.y>a+300&&(e.y=-300*Math.random()),e.chars.forEach((r,l)=>{let n=e.y+16*l;n<0||n>a||(t.font="14px monospace",t.fillStyle=0===l?"rgba(180, 255, 180, ".concat(e.opacity,")"):"rgba(0, 180, 80, ".concat(e.opacity*(1-l/e.chars.length),")"),t.fillText(r,e.x,n))})});for(let e=0;e<a;e+=3)t.fillStyle="rgba(0, 0, 0, 0.08)",t.fillRect(0,e,r,1);if(.02>Math.random()&&(w.current=8),w.current>0){let e=4+20*Math.random(),l=Math.random()*a,n=(Math.random()-.5)*40,o=t.getImageData(0,l,r,e);t.putImageData(o,n,l),w.current--}if(n<3e3){t.font="16px monospace";for(let e=0;e<f;e++){let r=o[e];t.fillStyle=r.color;let l=n-r.delay,i=Math.min(r.text.length,Math.floor(l/30));if(t.fillText(r.text.slice(0,i),40,a/2-60+28*e),e===f-1&&i<r.text.length&&Math.floor(n/200)%2==0){let l=40+t.measureText(r.text.slice(0,i)).width;t.fillRect(l+2,a/2-74+28*e,10,18)}}}if(n>2800){let e=Math.min(1,(n-2800)/800),l=t.createRadialGradient(r/2,a/2-30,0,r/2,a/2-30,200);l.addColorStop(0,"rgba(79, 70, 229, ".concat(.3*e,")")),l.addColorStop(1,"rgba(79, 70, 229, 0)"),t.fillStyle=l,t.fillRect(0,0,r,a);let o=Math.min(4,r/120);g(t,"OPEN",r/2,a/2-40,o,"rgba(255, 255, 255, ".concat(e,")")),g(t,"OFFICE",r/2,a/2+10,o,"rgba(249, 115, 22, ".concat(e,")")),t.strokeStyle="rgba(79, 70, 229, ".concat(.6*e,")"),t.lineWidth=2;let i=Math.min(280,r-80);if(t.beginPath(),t.moveTo(r/2-i/2,a/2+55),t.lineTo(r/2+i/2,a/2+55),t.stroke(),n>3400){let e=Math.min(1,(n-3400)/600);t.font="13px monospace",t.fillStyle="rgba(170, 170, 170, ".concat(e,")"),t.textAlign="center",t.fillText("CONTROL YOUR AI AGENTS",r/2,a/2+76),t.textAlign="start"}}n>4200&&Math.floor(n/500)%2==0&&g(t,"PRESS START",r/2,a/2+110,2,"#22c55e");let i=t.createRadialGradient(r/2,a/2,.3*a,r/2,a/2,.8*a);i.addColorStop(0,"rgba(0,0,0,0)"),i.addColorStop(1,"rgba(0,0,0,0.5)"),t.fillStyle=i,t.fillRect(0,0,r,a),E.current=requestAnimationFrame(l)};return E.current=requestAnimationFrame(l),()=>{cancelAnimationFrame(E.current),window.removeEventListener("resize",a)}},[f,y,g]),(0,l.useEffect)(()=>{if("ready"!==i)return;let e=()=>t();return window.addEventListener("click",e),window.addEventListener("keydown",e),window.addEventListener("touchstart",e),()=>{window.removeEventListener("click",e),window.removeEventListener("keydown",e),window.removeEventListener("touchstart",e)}},[i,t]),(0,a.jsx)("canvas",{ref:r,style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:9999,cursor:"ready"===i?"pointer":"default"}})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,883],{73:(e,t,l)=>{l.r(t),l.d(t,{default:()=>a});var r=l(206),n=l(1406),o=l(2988);let a=function(e){let{palette:t,zoom:l=3,ready:a}=e,i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{var e,r;let n=i.current;if(!n)return;let a=(0,o.Cr)(t);if(!a)return;let s=a.length,d=null!=(r=null==(e=a[0])?void 0:e.length)?r:0;n.width=d*l,n.height=s*l;let c=n.getContext("2d");if(c){c.clearRect(0,0,n.width,n.height);for(let e=0;e<s;e++)for(let t=0;t<d;t++){let r=a[e][t];r&&(c.fillStyle=r,c.fillRect(t*l,e*l,l,l))}}},[t,l,a]),(0,r.jsx)("canvas",{ref:i,style:{width:16*l,height:32*l,imageRendering:"pixelated"}})}},883:(e,t,l)=>{l.r(t),l.d(t,{default:()=>d});var r=l(206),n=l(1406),o=l(73),a=l(6740),i=l(4932);let s={delegation:{bg:i.nY,border:i.KE,label:"Delegated"},result:{bg:i.nY,border:i.$C,label:"Result"},status:{bg:i.nY,border:i.O2,label:"Status"},warning:{bg:i.nY,border:i.v_,label:"Warning"}},d=function(e){let{messages:t,agents:l,assetsReady:i}=e,d=(0,n.useRef)(null),c=(0,n.useRef)(!0);return((0,n.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{c.current=e.scrollHeight-e.scrollTop-e.clientHeight<=80};return e.addEventListener("scroll",t,{passive:!0}),()=>e.removeEventListener("scroll",t)},[]),(0,n.useLayoutEffect)(()=>{let e=d.current;if(e&&c.current){let t=e.scrollHeight-e.clientHeight;t>0&&(e.scrollTop=t)}},[t.length]),(0,n.useEffect)(()=>{let e=d.current;if(!e)return;let t=0,l=new MutationObserver(()=>{t||(t=requestAnimationFrame(()=>{if(t=0,c.current){let t=e.scrollHeight-e.clientHeight;t>0&&(e.scrollTop=t)}}))});return l.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>l.disconnect()},[]),0===t.length)?(0,r.jsx)("div",{style:{textAlign:"center",color:"#5a4838",padding:30,fontSize:12,fontFamily:"monospace"},children:"No team activity yet. Hire a team and send a task to the Team Lead."}):(0,r.jsx)("div",{ref:d,"data-scrollbar":!0,style:{flex:1,overflowY:"auto",padding:"10px 12px",display:"flex",flexDirection:"column",gap:6},children:t.map((e,t)=>{var n,d,c,u;if(!e||!e.fromAgentId)return null;let f=null!=(n=s[e.messageType])?n:s.status,g=l.get(e.fromAgentId),p=e.toAgentId?l.get(e.toAgentId):void 0,h=null!=(d=e.message)?d:"";return(0,r.jsxs)("div",{style:{padding:"8px 10px",backgroundColor:f.bg,borderLeft:"2px solid ".concat(f.border),border:"1px solid ".concat(f.border,"40")},children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(null==g?void 0:g.palette)!==void 0&&(0,r.jsx)(o.default,{palette:g.palette,zoom:1,ready:i}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:null!=(c=e.fromAgentName)?c:e.fromAgentId}),e.toAgentName&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{fontSize:11,color:"#6a5848"},children:"→"}),(null==p?void 0:p.palette)!==void 0&&(0,r.jsx)(o.default,{palette:p.palette,zoom:1,ready:i}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:e.toAgentName})]}),(0,r.jsx)("span",{style:{marginLeft:"auto",fontSize:9,padding:"1px 4px",backgroundColor:f.border+"20",color:f.border,border:"1px solid ".concat(f.border,"40"),fontFamily:"monospace"},children:f.label})]}),(0,r.jsx)(a.A,{text:h,maxChars:300,maxHeight:120}),(0,r.jsx)("div",{style:{fontSize:10,color:"#5a4838",marginTop:4,fontFamily:"monospace"},children:new Date(e.timestamp).toLocaleTimeString()})]},null!=(u=e.id)?u:"tc-".concat(t))})})}},6740:(e,t,l)=>{l.d(t,{A:()=>o});var r=l(206),n=l(1406);let o=function(e){let{text:t,maxChars:l=300,maxHeight:o=120}=e,[a,i]=(0,n.useState)(!1),s=t.length>l;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{style:{fontSize:12,color:"#b09878",wordBreak:"break-word",maxHeight:a?"none":o,overflow:"hidden",fontFamily:"monospace"},children:[a?t:t.slice(0,l),!a&&s?"...":""]}),s&&(0,r.jsx)("div",{style:{fontSize:10,color:"#6a8aaa",cursor:"pointer",marginTop:2,fontFamily:"monospace"},onClick:()=>i(!a),children:a?"▲ Collapse":"▼ Show more"})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,895],{73:(e,t,n)=>{n.r(t),n.d(t,{default:()=>a});var l=n(206),r=n(1406),o=n(2988);let a=function(e){let{palette:t,zoom:n=3,ready:a}=e,i=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var e,l;let r=i.current;if(!r)return;let a=(0,o.Cr)(t);if(!a)return;let s=a.length,d=null!=(l=null==(e=a[0])?void 0:e.length)?l:0;r.width=d*n,r.height=s*n;let c=r.getContext("2d");if(c){c.clearRect(0,0,r.width,r.height);for(let e=0;e<s;e++)for(let t=0;t<d;t++){let l=a[e][t];l&&(c.fillStyle=l,c.fillRect(t*n,e*n,n,n))}}},[t,n,a]),(0,l.jsx)("canvas",{ref:i,style:{width:16*n,height:32*n,imageRendering:"pixelated"}})}},5895:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var l=n(206),r=n(1406),o=n(2001),a=n(7821),i=n(4932),s=n(73),d=n(7877),c=n(1310),p=n(370),m=n(9362),u=n(138);let x="#e5c07b";function f(e){let{value:t,onSelect:n}=e,[o,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),p=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let u=o.toLowerCase(),x=u?a.YY.map(e=>({...e,subcategories:e.subcategories.map(t=>({...t,agents:t.agents.filter(t=>t.name.toLowerCase().includes(u)||t.desc.toLowerCase().includes(u)||e.label.toLowerCase().includes(u))})).filter(e=>e.agents.length>0)})).filter(e=>e.subcategories.length>0):a.YY;return(0,l.jsxs)("div",{ref:p,style:{position:"relative"},children:[(0,l.jsx)(m.A,{value:d?o:t,onChange:e=>{s(e.target.value),d||c(!0)},onFocus:()=>{c(!0),s("")},placeholder:"Search roles..."}),d&&(0,l.jsxs)("div",{"data-scrollbar":!0,style:{position:"absolute",top:"100%",left:0,right:0,zIndex:200,maxHeight:250,overflowY:"auto",backgroundColor:i.lr,border:"1px solid ".concat(i.KD),borderTop:"none"},children:[x.map(e=>e.subcategories.map(r=>(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{style:{padding:"4px 10px",fontSize:10,color:i.Y0,fontFamily:"var(--font-mono)",textTransform:"uppercase",letterSpacing:"0.05em",backgroundColor:i.lr,position:"sticky",top:0},children:e.subcategories.length>1&&"_root"!==r.name?"".concat(e.label," > ").concat(r.label):e.label}),r.agents.map(e=>(0,l.jsx)("div",{onClick:()=>{n(e.name),c(!1),s("")},style:{padding:"5px 10px",fontSize:13,fontFamily:"var(--font-mono)",color:e.name===t?i.DM:i.lR,cursor:"pointer",backgroundColor:e.name===t?"".concat(i.DM,"18"):"transparent"},onMouseEnter:n=>{e.name!==t&&(n.currentTarget.style.backgroundColor=i.nY)},onMouseLeave:n=>{e.name!==t&&(n.currentTarget.style.backgroundColor="transparent")},children:e.name},e.name))]},"".concat(e.category,"/").concat(r.name)))),0===x.length&&(0,l.jsxs)("div",{onClick:()=>{n(o.trim()),c(!1),s("")},style:{padding:"8px 10px",fontSize:13,fontFamily:"var(--font-mono)",color:i.Y0,cursor:"pointer"},children:['Use custom: "',o.trim(),'"']})]})]})}function g(e){let{onSave:t,onCancel:n}=e,[o,a]=(0,r.useState)(""),[i,s]=(0,r.useState)("");return(0,l.jsxs)("div",{style:{border:"1px solid ".concat(x,"40"),backgroundColor:"".concat(x,"08"),padding:10,marginTop:6},children:[(0,l.jsx)("div",{style:{fontSize:11,color:x,marginBottom:6,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"NEW SKILL FILE"}),(0,l.jsx)(m.A,{value:o,onChange:e=>a(e.target.value),placeholder:"Skill name (e.g. tdd, react-patterns)",style:{marginBottom:6}}),(0,l.jsx)("textarea",{className:"ti ti-textarea",value:i,onChange:e=>s(e.target.value),placeholder:"# Skill Title\n\nPaste or type skill content in Markdown...",rows:5,style:{resize:"vertical",marginBottom:6,width:"100%",boxSizing:"border-box"}}),(0,l.jsxs)("div",{style:{display:"flex",gap:6,justifyContent:"flex-end"},children:[(0,l.jsx)(p.A,{variant:"dim",onClick:n,style:{padding:"4px 10px",fontSize:12},children:"Cancel"}),(0,l.jsx)(p.A,{variant:"primary",onClick:()=>{let e=o.trim().toLowerCase().replace(/[^a-z0-9_-]/g,"-").replace(/^-|-$/g,"");e&&i.trim()&&t(e,i)},disabled:!o.trim()||!i.trim(),style:{padding:"4px 10px",fontSize:12},children:"Save Skill"})]})]})}let h=function(e){var t,n,x,h;let{onSave:y,onClose:v,assetsReady:b,editAgent:j,sendCommand:S}=e,[C,k]=(0,r.useState)(null!=(t=null==j?void 0:j.palette)?t:Math.floor(6*Math.random())),[w,A]=(0,r.useState)(null!=(n=null==j?void 0:j.name)?n:(()=>{let e=["Alex","Sam","Max","Leo","Mia","Kai","Zoe","Eli","Ava","Jay","Rio","Ash","Sky","Kit","Noa","Rex","Ivy","Ace","Ren","Jax"];return e[Math.floor(Math.random()*e.length)]})()),[z,L]=(0,r.useState)(()=>{if(!(null==j?void 0:j.role))return 0;let e=a.os.indexOf(j.role);return e>=0?e:-1}),[N,M]=(0,r.useState)(()=>(null==j?void 0:j.role)?a.os.indexOf(j.role)>=0?"":j.role:""),[F,Y]=(0,r.useState)(()=>{var e,t;return new Set((null==j?void 0:j.skills)?j.skills.split(",").map(e=>e.trim()).filter(Boolean):null!=(t=null==(e=a.yh[a.os[0]])?void 0:e.slice(0,4))?t:[])}),[D,E]=(0,r.useState)(""),I=(0,u.hK)(e=>e.availableSkills),[R,B]=(0,r.useState)(()=>{var e;return new Set(null!=(e=null==j?void 0:j.skillFiles)?e:[])}),[K,T]=(0,r.useState)(!1);(0,r.useEffect)(()=>{null==S||S({type:"LIST_SKILLS"})},[S]);let W=z>=0?a.os[z]:N.trim(),_=z>=0&&null!=(x=a.yh[a.os[z]])?x:[],O=e=>{Y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},H=()=>{let e=D.trim();e&&!F.has(e)&&(Y(t=>new Set(t).add(e)),E(""))},P=e=>{B(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[U,$]=(0,r.useState)(()=>{if(!j)return 0;let e=a.eU.findIndex(e=>e.value===j.personality);return e>=0?e:4}),[J,V]=(0,r.useState)(null!=(h=null==j?void 0:j.personality)?h:""),Z=U<4?a.eU[U].value:J;return(0,l.jsxs)(c.A,{open:!0,onClose:v,maxWidth:520,zIndex:110,title:j?"Edit Agent":"Create Agent",footer:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.A,{variant:"primary",onClick:()=>{var e,t;if(!w.trim())return;let n=j?j.id:(w.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||"agent")+"-".concat((0,o.Ak)(4)),l=Array.from(R);y({id:n,name:w.trim(),role:W,skills:Array.from(F).join(", "),personality:Z,palette:C,isBuiltin:null!=(e=null==j?void 0:j.isBuiltin)&&e,teamRole:null!=(t=null==j?void 0:j.teamRole)?t:"dev",...l.length>0?{skillFiles:l}:{}})},disabled:!w.trim(),style:{flex:1,padding:"9px",fontWeight:700},children:j?"Save":"Create"}),(0,l.jsx)(p.A,{variant:"dim",onClick:v,style:{padding:"9px 16px"},children:"Cancel"})]}),children:[(0,l.jsxs)("div",{className:"flex gap-4 mb-3 items-start",children:[(0,l.jsxs)("div",{className:"shrink-0",children:[(0,l.jsx)("div",{className:"text-term text-muted-foreground font-mono tracking-wide mb-1",children:"AVATAR"}),(0,l.jsx)("div",{className:"flex gap-1",children:[0,1,2,3,4,5].map(e=>(0,l.jsx)("button",{onClick:()=>k(e),style:{padding:3,border:C===e?"2px solid ".concat(i.DM):"2px solid ".concat(i.KD),backgroundColor:C===e?"".concat(i.DM,"18"):"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,l.jsx)(s.default,{palette:e,zoom:2,ready:b})},e))})]}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"text-term text-muted-foreground font-mono tracking-wide mb-1",children:"NAME"}),(0,l.jsx)(m.A,{value:w,onChange:e=>A(e.target.value),placeholder:"Agent name"})]})]}),(0,l.jsxs)("div",{style:{marginBottom:8,position:"relative"},children:[(0,l.jsx)("div",{className:"text-term text-muted-foreground font-mono tracking-wide mb-1",children:"ROLE"}),(0,l.jsx)(f,{value:W,onSelect:e=>{let t=a.os.indexOf(e);if(t>=0){var n;if(L(t),t>=0){let e=a.os[t],l=null!=(n=a.yh[e])?n:[];l.some(e=>F.has(e))||Y(new Set(l.slice(0,4)))}}else L(-1),M(e)}}),a.P5.get(W)&&(0,l.jsx)("div",{style:{fontSize:11,color:i.Y0,marginTop:4,fontFamily:"var(--font-mono)",lineHeight:1.4},children:a.P5.get(W)})]}),(0,l.jsxs)("div",{style:{marginBottom:8},children:[(0,l.jsx)("div",{style:{fontSize:12,color:i.Y0,marginBottom:4,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"SKILLS"}),_.length>0&&(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:5,marginBottom:8},children:_.map(e=>{let t=F.has(e);return(0,l.jsx)("button",{onClick:()=>O(e),style:{padding:"4px 10px",fontSize:13,fontFamily:"var(--font-mono)",border:t?"1px solid ".concat(i.DM,"80"):"1px solid ".concat(i.KD),backgroundColor:t?"".concat(i.DM,"18"):"transparent",color:t?i.DM:i.Y0,cursor:"pointer"},children:e},e)})}),(()=>{let e=Array.from(F).filter(e=>!_.includes(e));return 0===e.length?null:(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:5,marginBottom:8},children:e.map(e=>(0,l.jsxs)("span",{style:{padding:"4px 10px",fontSize:13,fontFamily:"var(--font-mono)",border:"1px solid ".concat(i.KE,"60"),backgroundColor:i.nY,color:i.KE,display:"flex",alignItems:"center",gap:4},children:[e,(0,l.jsx)("span",{onClick:()=>O(e),style:{cursor:"pointer",fontSize:15,lineHeight:1,color:"".concat(i.KE,"80")},children:"\xd7"})]},e))})})(),(0,l.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,l.jsx)(m.A,{value:D,onChange:e=>E(e.target.value),onKeyDown:e=>{(0,d.$$)(e)&&(e.preventDefault(),H())},placeholder:"Add custom skill...",style:{flex:1}}),(0,l.jsx)(p.A,{variant:"dim",onClick:H,style:{padding:"5px 12px",fontSize:15,fontWeight:700},children:"+"})]})]}),(0,l.jsxs)("div",{style:{marginBottom:8},children:[(0,l.jsxs)("div",{style:{fontSize:12,color:i.Y0,marginBottom:4,fontFamily:"var(--font-mono)",letterSpacing:"0.05em",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,l.jsx)("span",{children:"SKILL FILES"}),(0,l.jsx)("span",{style:{fontSize:10,color:i.Y0,fontWeight:400},children:".md instructions auto-loaded by AI"})]}),I.length>0&&(0,l.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:3,marginBottom:6},children:I.map(e=>{let t=R.has(e.name);return(0,l.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",cursor:"pointer",fontSize:13,fontFamily:"var(--font-mono)",color:t?i.lR:i.Y0,backgroundColor:t?"".concat(i.DM,"0c"):"transparent",border:"1px solid ".concat(t?i.DM+"30":"transparent")},children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:()=>P(e.name),style:{accentColor:i.DM,cursor:"pointer"}}),(0,l.jsx)("span",{style:{flex:1},children:e.title}),e.isFolder&&(0,l.jsx)("span",{style:{fontSize:10,color:i.Y0,opacity:.6},title:"Folder with multiple files",children:"[dir]"})]},e.name)})}),(()=>{let e=new Set(I.map(e=>e.name)),t=Array.from(R).filter(t=>!e.has(t));return 0===t.length?null:(0,l.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:6},children:t.map(e=>(0,l.jsxs)("span",{style:{padding:"2px 8px",fontSize:12,fontFamily:"var(--font-mono)",border:"1px solid ".concat(i.KD),color:i.Y0,opacity:.5,display:"flex",alignItems:"center",gap:4},children:[e,(0,l.jsx)("span",{onClick:()=>P(e),style:{cursor:"pointer",fontSize:14,lineHeight:1},children:"\xd7"})]},e))})})(),0===I.length&&!K&&(0,l.jsx)("div",{style:{fontSize:12,color:i.Y0,fontFamily:"var(--font-mono)",marginBottom:4,opacity:.7},children:"No skill files yet."}),K?(0,l.jsx)(g,{onSave:(e,t)=>{null==S||S({type:"SAVE_SKILL",name:e,content:t}),B(t=>new Set(t).add(e)),T(!1)},onCancel:()=>T(!1)}):(0,l.jsx)(p.A,{variant:"dim",onClick:()=>T(!0),style:{padding:"4px 10px",fontSize:12,width:"100%"},children:"+ Create Skill File"})]}),(0,l.jsxs)("div",{style:{marginBottom:10},children:[(0,l.jsx)("div",{className:"text-term text-muted-foreground font-mono tracking-wide mb-1",children:"PERSONALITY"}),(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-1",children:[a.eU.map((e,t)=>(0,l.jsxs)("label",{className:"flex items-center gap-1.5 px-1.5 py-1 cursor-pointer font-mono text-[13px]",style:{color:U===t?i.lR:i.Y0},children:[(0,l.jsx)("input",{type:"radio",name:"personality",checked:U===t,onChange:()=>$(t),style:{accentColor:i.DM,cursor:"pointer"}}),e.label]},t)),(0,l.jsxs)("label",{className:"flex items-center gap-1.5 px-1.5 py-1 cursor-pointer font-mono text-[13px]",style:{color:4===U?i.lR:i.Y0},children:[(0,l.jsx)("input",{type:"radio",name:"personality",checked:4===U,onChange:()=>$(4),style:{accentColor:i.DM,cursor:"pointer"}}),"Custom"]})]}),4===U&&(0,l.jsx)("textarea",{className:"ti ti-textarea mt-1.5",value:J,onChange:e=>V(e.target.value),placeholder:"Describe the personality...",rows:2,style:{resize:"vertical"}})]})]})}},9362:(e,t,n)=>{n.d(t,{A:()=>i});var l=n(206),r=n(1406),o=n(9385);let a=r.forwardRef((e,t)=>{let{className:n,type:r,...a}=e;return(0,l.jsx)("input",{type:r,className:(0,o.cn)("flex w-full px-2.5 py-1.5","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...a})});a.displayName="Input",r.forwardRef((e,t)=>{let{className:n,...r}=e;return(0,l.jsx)("textarea",{className:(0,o.cn)("flex w-full px-2.5 py-1.5 resize-none","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",n),ref:t,...r})}).displayName="Textarea";let i=(0,r.forwardRef)(function(e,t){let{inline:n,className:r,...i}=e;return(0,l.jsx)(a,{ref:t,className:(0,o.cn)(n&&"border-none bg-transparent text-term-text-bright caret-accent px-1.5 py-1.5 focus:border-none focus:shadow-none",r),...i})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[913],{6913:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var i=n(206),r=n(1406),o=n(4932),l=n(7821),s=n(1310),a=n(370);function c(e){let{label:t,icon:n,value:l,onChange:s}=e,[a,c]=(0,r.useState)(0);return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,height:28},children:[(0,i.jsxs)("span",{style:{width:110,fontSize:"var(--font-size-base)",color:o.Y0,fontFamily:"var(--font-mono)"},children:[n," ",t]}),(0,i.jsx)("div",{style:{display:"flex",gap:3},onMouseLeave:()=>c(0),children:[1,2,3,4,5].map(e=>(0,i.jsx)("span",{onClick:()=>s(e===l?0:e),onMouseEnter:()=>c(e),style:{cursor:"pointer",fontSize:16,lineHeight:1,color:e<=(a||l)?o.O2:"rgba(255,255,255,0.15)",transition:"color 0.1s"},children:"★"},e))}),l>0&&(0,i.jsxs)("span",{style:{fontSize:11,color:"rgba(255,255,255,0.3)",fontFamily:"var(--font-mono)"},children:[l,"/5"]})]})}function d(e){let{onSubmit:t,onSkip:n,initialRatings:o}=e,[d,u]=(0,r.useState)(null!=o?o:{}),p=Object.values(d).some(e=>e&&e>0);return(0,i.jsx)(s.A,{open:!0,onClose:n,maxWidth:340,title:"Rate this project",footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.A,{variant:"dim",onClick:n,style:{padding:"8px 18px"},children:"Skip"}),(0,i.jsx)(a.A,{variant:"success",onClick:()=>{p&&t(Object.fromEntries(Object.entries(d).filter(e=>{let[,t]=e;return t&&t>0})))},disabled:!p,style:{padding:"8px 18px"},children:"Submit"})]}),children:(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:l.OG.map(e=>{var t;return(0,i.jsx)(c,{label:e.label,icon:e.icon,value:null!=(t=d[e.key])?t:0,onChange:t=>u(n=>({...n,[e.key]:t}))},e.key)})})})}let u=function(e){let{url:t,onClose:n,savedRatings:l,submitted:s,onRate:a}=e,[c,u]=(0,r.useState)("loading"),[p,f]=(0,r.useState)(!1),[x,h]=(0,r.useState)(!1),y=(0,r.useRef)("tauri:"===window.location.protocol),[m,g]=(0,r.useState)(!1),b=(0,r.useRef)(!1),j=(0,r.useRef)(0),v=(0,r.useCallback)(()=>{b.current=!0},[]);return(0,r.useEffect)(()=>{if(!y.current||"ready"!==c||b.current)return;let e=setTimeout(()=>{if(!b.current){if(j.current++,j.current>=15){b.current=!0;return}g(!1),setTimeout(()=>g(!0),200)}},2e3);return()=>clearTimeout(e)},[c,m]),(0,r.useEffect)(()=>{if(y.current){b.current=!1,j.current=0,u("loading");let e=setTimeout(()=>{u("ready"),g(!0)},1500);return()=>clearTimeout(e)}u("loading");let e=!1,n=0,i=()=>{e||(n++,fetch(t,{mode:"no-cors"}).then(()=>{e||u("ready")}).catch(()=>{!e&&n<30?setTimeout(i,500):e||u("ready")}))},r=setTimeout(i,800);return()=>{e=!0,clearTimeout(r)}},[t]),(0,i.jsxs)("div",{style:{position:"fixed",inset:0,zIndex:9999,backgroundColor:"rgba(0,0,0,0.85)",display:"flex",flexDirection:"column"},children:[(0,i.jsxs)("div",{style:{height:40,display:"flex",alignItems:"center",padding:"0 12px",backgroundColor:o.lr,gap:8},children:[(0,i.jsx)("span",{style:{flex:1,color:"#888",fontSize:14,fontFamily:"monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t}),(0,i.jsx)("button",{onClick:()=>f(!0),style:{background:s?"".concat(o.$C,"18"):"none",border:s?"1px solid ".concat(o.$C,"30"):"1px solid ".concat(o.O2,"30"),color:s?o.$C:o.O2,fontSize:11,cursor:"pointer",padding:"2px 10px",fontFamily:"monospace"},children:s?"Rated ✓":"★ Rate"}),(0,i.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",style:{color:"#e8b040",fontSize:12,textDecoration:"none",padding:"2px 8px",border:"1px solid #3d2d10",fontFamily:"monospace"},children:"Open in tab"}),(0,i.jsx)("button",{onClick:()=>{h(!0)},style:{background:"none",border:"1px solid #444",color:"#aaa",fontSize:17,cursor:"pointer",borderRadius:6,width:28,height:28,display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]}),(0,i.jsxs)("div",{style:{flex:1,position:"relative"},children:["loading"===c&&(0,i.jsxs)("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:16},children:[(0,i.jsx)("div",{style:{width:32,height:32,border:"3px solid #333",borderTopColor:"#818cf8",borderRadius:"50%",animation:"preview-spin 0.8s linear infinite"}}),(0,i.jsx)("div",{style:{color:"#888",fontSize:15},children:"Starting server..."}),(0,i.jsx)("style",{children:"@keyframes preview-spin { to { transform: rotate(360deg); } }"})]}),"ready"===c&&(!y.current||m)&&(0,i.jsx)("iframe",{src:t,onLoad:y.current?v:void 0,style:{width:"100%",height:"100%",border:"none",...x||p?{pointerEvents:"none",visibility:"hidden"}:{}}})]}),(p||x)&&(0,i.jsx)(d,{initialRatings:l,onSubmit:e=>{a(e),f(!1),x&&n()},onSkip:()=>{f(!1),x&&n()}})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293,484,955],{5293:(e,i,t)=>{var n,s,l,a,r;function o(e,i,t,n){if("a"===t&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof i?e!==i||!n:!i.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:i.get(e)}function u(e,i,t,n,s){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!s)throw TypeError("Private accessor was defined without a setter");if("function"==typeof i?e!==i||!s:!i.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?s.call(e,t):s?s.value=t:i.set(e,t),t}t.r(i),t.d(i,{Channel:()=>w,PluginListener:()=>d,Resource:()=>y,SERIALIZE_TO_IPC_FN:()=>c,addPluginListener:()=>b,checkPermissions:()=>p,convertFileSrc:()=>g,invoke:()=>v,isTauri:()=>k,requestPermissions:()=>_,transformCallback:()=>h}),"function"==typeof SuppressedError&&SuppressedError;let c="__TAURI_TO_IPC_KEY__";function h(e,i=!1){return window.__TAURI_INTERNALS__.transformCallback(e,i)}class w{constructor(e){n.set(this,void 0),s.set(this,0),l.set(this,[]),a.set(this,void 0),u(this,n,e||(()=>{}),"f"),this.id=h(e=>{let i=e.index;if("end"in e)return void(i==o(this,s,"f")?this.cleanupCallback():u(this,a,i,"f"));let t=e.message;if(i==o(this,s,"f")){for(o(this,n,"f").call(this,t),u(this,s,o(this,s,"f")+1,"f");o(this,s,"f")in o(this,l,"f");){let e=o(this,l,"f")[o(this,s,"f")];o(this,n,"f").call(this,e),delete o(this,l,"f")[o(this,s,"f")],u(this,s,o(this,s,"f")+1,"f")}o(this,s,"f")===o(this,a,"f")&&this.cleanupCallback()}else o(this,l,"f")[i]=t})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){u(this,n,e,"f")}get onmessage(){return o(this,n,"f")}[(n=new WeakMap,s=new WeakMap,l=new WeakMap,a=new WeakMap,c)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[c]()}}class d{constructor(e,i,t){this.plugin=e,this.event=i,this.channelId=t}async unregister(){return v(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function b(e,i,t){let n=new w(t);try{return await v(`plugin:${e}|register_listener`,{event:i,handler:n}),new d(e,i,n.id)}catch{return await v(`plugin:${e}|registerListener`,{event:i,handler:n}),new d(e,i,n.id)}}async function p(e){return v(`plugin:${e}|check_permissions`)}async function _(e){return v(`plugin:${e}|request_permissions`)}async function v(e,i={},t){return window.__TAURI_INTERNALS__.invoke(e,i,t)}function g(e,i="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,i)}class y{get rid(){return o(this,r,"f")}constructor(e){r.set(this,void 0),u(this,r,e,"f")}async close(){return v("plugin:resources|close",{rid:this.rid})}}function k(){return!!(globalThis||window).isTauri}r=new WeakMap},7955:(e,i,t)=>{t.r(i),t.d(i,{Webview:()=>D,getAllWebviews:()=>A,getCurrentWebview:()=>I});var n,s,l,a,r,o,u=t(5293);class c{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new h(this.width*e,this.height*e)}[u.SERIALIZE_TO_IPC_FN](){return{width:this.width,height:this.height}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}class h{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new c(this.width/e,this.height/e)}[u.SERIALIZE_TO_IPC_FN](){return{width:this.width,height:this.height}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}class w{constructor(e){this.size=e}toLogical(e){return this.size instanceof c?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof h?this.size:this.size.toPhysical(e)}[u.SERIALIZE_TO_IPC_FN](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}class d{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new b(this.x*e,this.y*e)}[u.SERIALIZE_TO_IPC_FN](){return{x:this.x,y:this.y}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}class b{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new d(this.x/e,this.y/e)}[u.SERIALIZE_TO_IPC_FN](){return{x:this.x,y:this.y}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}class p{constructor(e){this.position=e}toLogical(e){return this.position instanceof d?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof b?this.position:this.position.toPhysical(e)}[u.SERIALIZE_TO_IPC_FN](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[u.SERIALIZE_TO_IPC_FN]()}}var _=t(9484);class v extends u.Resource{constructor(e){super(e)}static async new(e,i,t){return(0,u.invoke)("plugin:image|new",{rgba:g(e),width:i,height:t}).then(e=>new v(e))}static async fromBytes(e){return(0,u.invoke)("plugin:image|from_bytes",{bytes:g(e)}).then(e=>new v(e))}static async fromPath(e){return(0,u.invoke)("plugin:image|from_path",{path:e}).then(e=>new v(e))}async rgba(){return(0,u.invoke)("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return(0,u.invoke)("plugin:image|size",{rid:this.rid})}}function g(e){return null==e?null:"string"==typeof e?e:e instanceof v?e.rid:e}!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(n||(n={}));class y{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function k(){return new E(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function f(){return(0,u.invoke)("plugin:window|get_all_windows").then(e=>e.map(e=>new E(e,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(s||(s={}));let m=["tauri://created","tauri://error"];class E{constructor(e,i={}){var t;this.label=e,this.listeners=Object.create(null),(null==i?void 0:i.skip)||(0,u.invoke)("plugin:window|create",{options:{...i,parent:"string"==typeof i.parent?i.parent:null==(t=i.parent)?void 0:t.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var i;return null!=(i=(await f()).find(i=>i.label===e))?i:null}static getCurrent(){return k()}static async getAll(){return f()}static async getFocusedWindow(){for(let e of(await f()))if(await e.isFocused())return e;return null}async listen(e,i){return this._handleTauriEvent(e,i)?()=>{let t=this.listeners[e];t.splice(t.indexOf(i),1)}:(0,_.listen)(e,i,{target:{kind:"Window",label:this.label}})}async once(e,i){return this._handleTauriEvent(e,i)?()=>{let t=this.listeners[e];t.splice(t.indexOf(i),1)}:(0,_.Oo)(e,i,{target:{kind:"Window",label:this.label}})}async emit(e,i){if(m.includes(e)){for(let t of this.listeners[e]||[])t({event:e,id:-1,payload:i});return}return(0,_.Ic)(e,i)}async emitTo(e,i,t){if(m.includes(i)){for(let e of this.listeners[i]||[])e({event:i,id:-1,payload:t});return}return(0,_.D4)(e,i,t)}_handleTauriEvent(e,i){return!!m.includes(e)&&(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0)}async scaleFactor(){return(0,u.invoke)("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return(0,u.invoke)("plugin:window|inner_position",{label:this.label}).then(e=>new b(e))}async outerPosition(){return(0,u.invoke)("plugin:window|outer_position",{label:this.label}).then(e=>new b(e))}async innerSize(){return(0,u.invoke)("plugin:window|inner_size",{label:this.label}).then(e=>new h(e))}async outerSize(){return(0,u.invoke)("plugin:window|outer_size",{label:this.label}).then(e=>new h(e))}async isFullscreen(){return(0,u.invoke)("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return(0,u.invoke)("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return(0,u.invoke)("plugin:window|is_maximized",{label:this.label})}async isFocused(){return(0,u.invoke)("plugin:window|is_focused",{label:this.label})}async isDecorated(){return(0,u.invoke)("plugin:window|is_decorated",{label:this.label})}async isResizable(){return(0,u.invoke)("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return(0,u.invoke)("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return(0,u.invoke)("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return(0,u.invoke)("plugin:window|is_closable",{label:this.label})}async isVisible(){return(0,u.invoke)("plugin:window|is_visible",{label:this.label})}async title(){return(0,u.invoke)("plugin:window|title",{label:this.label})}async theme(){return(0,u.invoke)("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return(0,u.invoke)("plugin:window|is_always_on_top",{label:this.label})}async center(){return(0,u.invoke)("plugin:window|center",{label:this.label})}async requestUserAttention(e){let i=null;return e&&(i=e===n.Critical?{type:"Critical"}:{type:"Informational"}),(0,u.invoke)("plugin:window|request_user_attention",{label:this.label,value:i})}async setResizable(e){return(0,u.invoke)("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return(0,u.invoke)("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return(0,u.invoke)("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return(0,u.invoke)("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return(0,u.invoke)("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return(0,u.invoke)("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return(0,u.invoke)("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return(0,u.invoke)("plugin:window|maximize",{label:this.label})}async unmaximize(){return(0,u.invoke)("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return(0,u.invoke)("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return(0,u.invoke)("plugin:window|minimize",{label:this.label})}async unminimize(){return(0,u.invoke)("plugin:window|unminimize",{label:this.label})}async show(){return(0,u.invoke)("plugin:window|show",{label:this.label})}async hide(){return(0,u.invoke)("plugin:window|hide",{label:this.label})}async close(){return(0,u.invoke)("plugin:window|close",{label:this.label})}async destroy(){return(0,u.invoke)("plugin:window|destroy",{label:this.label})}async setDecorations(e){return(0,u.invoke)("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return(0,u.invoke)("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return(0,u.invoke)("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return(0,u.invoke)("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return(0,u.invoke)("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return(0,u.invoke)("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return(0,u.invoke)("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return(0,u.invoke)("plugin:window|set_size",{label:this.label,value:e instanceof w?e:new w(e)})}async setMinSize(e){return(0,u.invoke)("plugin:window|set_min_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setMaxSize(e){return(0,u.invoke)("plugin:window|set_max_size",{label:this.label,value:e instanceof w?e:e?new w(e):null})}async setSizeConstraints(e){function i(e){return e?{Logical:e}:null}return(0,u.invoke)("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:i(null==e?void 0:e.minWidth),minHeight:i(null==e?void 0:e.minHeight),maxWidth:i(null==e?void 0:e.maxWidth),maxHeight:i(null==e?void 0:e.maxHeight)}})}async setPosition(e){return(0,u.invoke)("plugin:window|set_position",{label:this.label,value:e instanceof p?e:new p(e)})}async setFullscreen(e){return(0,u.invoke)("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return(0,u.invoke)("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return(0,u.invoke)("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return(0,u.invoke)("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return(0,u.invoke)("plugin:window|set_icon",{label:this.label,value:g(e)})}async setSkipTaskbar(e){return(0,u.invoke)("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return(0,u.invoke)("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return(0,u.invoke)("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return(0,u.invoke)("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return(0,u.invoke)("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return(0,u.invoke)("plugin:window|set_cursor_position",{label:this.label,value:e instanceof p?e:new p(e)})}async setIgnoreCursorEvents(e){return(0,u.invoke)("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return(0,u.invoke)("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return(0,u.invoke)("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return(0,u.invoke)("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return(0,u.invoke)("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return(0,u.invoke)("plugin:window|set_overlay_icon",{label:this.label,value:e?g(e):void 0})}async setProgressBar(e){return(0,u.invoke)("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return(0,u.invoke)("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return(0,u.invoke)("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return(0,u.invoke)("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(_.es.WINDOW_RESIZED,i=>{i.payload=new h(i.payload),e(i)})}async onMoved(e){return this.listen(_.es.WINDOW_MOVED,i=>{i.payload=new b(i.payload),e(i)})}async onCloseRequested(e){return this.listen(_.es.WINDOW_CLOSE_REQUESTED,async i=>{let t=new y(i);await e(t),t.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let i=await this.listen(_.es.DRAG_ENTER,i=>{e({...i,payload:{type:"enter",paths:i.payload.paths,position:new b(i.payload.position)}})}),t=await this.listen(_.es.DRAG_OVER,i=>{e({...i,payload:{type:"over",position:new b(i.payload.position)}})}),n=await this.listen(_.es.DRAG_DROP,i=>{e({...i,payload:{type:"drop",paths:i.payload.paths,position:new b(i.payload.position)}})}),s=await this.listen(_.es.DRAG_LEAVE,i=>{e({...i,payload:{type:"leave"}})});return()=>{i(),n(),t(),s()}}async onFocusChanged(e){let i=await this.listen(_.es.WINDOW_FOCUS,i=>{e({...i,payload:!0})}),t=await this.listen(_.es.WINDOW_BLUR,i=>{e({...i,payload:!1})});return()=>{i(),t()}}async onScaleChanged(e){return this.listen(_.es.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(_.es.WINDOW_THEME_CHANGED,e)}}function I(){return new D(k(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function A(){return(0,u.invoke)("plugin:webview|get_all_webviews").then(e=>e.map(e=>new D(new E(e.windowLabel,{skip:!0}),e.label,{skip:!0})))}!function(e){e.Disabled="disabled",e.Throttle="throttle",e.Suspend="suspend"}(l||(l={})),function(e){e.Default="default",e.FluentOverlay="fluentOverlay"}(a||(a={})),function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(r||(r={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(o||(o={}));let T=["tauri://created","tauri://error"];class D{constructor(e,i,t){this.window=e,this.label=i,this.listeners=Object.create(null),(null==t?void 0:t.skip)||(0,u.invoke)("plugin:webview|create_webview",{windowLabel:e.label,options:{...t,label:i}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var i;return null!=(i=(await A()).find(i=>i.label===e))?i:null}static getCurrent(){return I()}static async getAll(){return A()}async listen(e,i){return this._handleTauriEvent(e,i)?()=>{let t=this.listeners[e];t.splice(t.indexOf(i),1)}:(0,_.listen)(e,i,{target:{kind:"Webview",label:this.label}})}async once(e,i){return this._handleTauriEvent(e,i)?()=>{let t=this.listeners[e];t.splice(t.indexOf(i),1)}:(0,_.Oo)(e,i,{target:{kind:"Webview",label:this.label}})}async emit(e,i){if(T.includes(e)){for(let t of this.listeners[e]||[])t({event:e,id:-1,payload:i});return}return(0,_.Ic)(e,i)}async emitTo(e,i,t){if(T.includes(i)){for(let e of this.listeners[i]||[])e({event:i,id:-1,payload:t});return}return(0,_.D4)(e,i,t)}_handleTauriEvent(e,i){return!!T.includes(e)&&(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0)}async position(){return(0,u.invoke)("plugin:webview|webview_position",{label:this.label}).then(e=>new b(e))}async size(){return(0,u.invoke)("plugin:webview|webview_size",{label:this.label}).then(e=>new h(e))}async close(){return(0,u.invoke)("plugin:webview|webview_close",{label:this.label})}async setSize(e){return(0,u.invoke)("plugin:webview|set_webview_size",{label:this.label,value:e instanceof w?e:new w(e)})}async setPosition(e){return(0,u.invoke)("plugin:webview|set_webview_position",{label:this.label,value:e instanceof p?e:new p(e)})}async setFocus(){return(0,u.invoke)("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(e){return(0,u.invoke)("plugin:webview|set_webview_auto_resize",{label:this.label,value:e})}async hide(){return(0,u.invoke)("plugin:webview|webview_hide",{label:this.label})}async show(){return(0,u.invoke)("plugin:webview|webview_show",{label:this.label})}async setZoom(e){return(0,u.invoke)("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return(0,u.invoke)("plugin:webview|reparent",{label:this.label,window:"string"==typeof e?e:e.label})}async clearAllBrowsingData(){return(0,u.invoke)("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(e){return(0,u.invoke)("plugin:webview|set_webview_background_color",{color:e})}async onDragDropEvent(e){let i=await this.listen(_.es.DRAG_ENTER,i=>{e({...i,payload:{type:"enter",paths:i.payload.paths,position:new b(i.payload.position)}})}),t=await this.listen(_.es.DRAG_OVER,i=>{e({...i,payload:{type:"over",position:new b(i.payload.position)}})}),n=await this.listen(_.es.DRAG_DROP,i=>{e({...i,payload:{type:"drop",paths:i.payload.paths,position:new b(i.payload.position)}})}),s=await this.listen(_.es.DRAG_LEAVE,i=>{e({...i,payload:{type:"leave"}})});return()=>{i(),n(),t(),s()}}}},9484:(e,i,t)=>{t.d(i,{D4:()=>u,Ic:()=>o,Oo:()=>r,es:()=>n,listen:()=>a});var n,s=t(5293);async function l(e,i){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,i),await (0,s.invoke)("plugin:event|unlisten",{event:e,eventId:i})}async function a(e,i,t){var n;let a="string"==typeof(null==t?void 0:t.target)?{kind:"AnyLabel",label:t.target}:null!=(n=null==t?void 0:t.target)?n:{kind:"Any"};return(0,s.invoke)("plugin:event|listen",{event:e,target:a,handler:(0,s.transformCallback)(i)}).then(i=>async()=>l(e,i))}async function r(e,i,t){return a(e,t=>{l(e,t.id),i(t)},t)}async function o(e,i){await (0,s.invoke)("plugin:event|emit",{event:e,payload:i})}async function u(e,i,t){await (0,s.invoke)("plugin:event|emit_to",{target:"string"==typeof e?{kind:"AnyLabel",label:e}:e,event:i,payload:t})}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(n||(n={}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,999],{73:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var o=l(206),r=l(1406),n=l(2988);let i=function(e){let{palette:t,zoom:l=3,ready:i}=e,a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var e,o;let r=a.current;if(!r)return;let i=(0,n.Cr)(t);if(!i)return;let d=i.length,s=null!=(o=null==(e=i[0])?void 0:e.length)?o:0;r.width=s*l,r.height=d*l;let c=r.getContext("2d");if(c){c.clearRect(0,0,r.width,r.height);for(let e=0;e<d;e++)for(let t=0;t<s;t++){let o=i[e][t];o&&(c.fillStyle=o,c.fillRect(t*l,e*l,l,l))}}},[t,l,i]),(0,o.jsx)("canvas",{ref:a,style:{width:16*l,height:32*l,imageRendering:"pixelated"}})}},7999:(e,t,l)=>{l.r(t),l.d(t,{default:()=>x});var o=l(206),r=l(1406),n=l(2001),i=l(5192),a=l(138),d=l(7821),s=l(4932),c=l(73),p=l(1310),f=l(370),u=l(9362);let x=function(e){var t,l;let{agentDefs:x,onCreateTeam:m,onClose:g,assetsReady:h,detectedBackends:y}=e,v=x.find(e=>"leader"===e.teamRole),b=x.find(e=>"reviewer"===e.teamRole),j=x.filter(e=>"dev"===e.teamRole),[k,w]=(0,r.useState)(null!=(l=null==(t=j[0])?void 0:t.id)?l:""),[C,S]=(0,r.useState)({}),[E,R]=(0,r.useState)(""),z=[];return v&&z.push({def:v,label:"LEAD"}),b&&z.push({def:b,label:"REVIEWER"}),(0,o.jsxs)(p.A,{open:!0,onClose:g,maxWidth:540,zIndex:100,title:"Hire Team",footer:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.A,{variant:"primary",onClick:()=>{if(!v)return;let e=[];k&&e.push(k),b&&e.push(b.id),m(v.id,e,C,E||void 0)},disabled:!v,style:{flex:1,padding:"9px",fontWeight:700},children:"Create Team"}),(0,o.jsx)(f.A,{variant:"dim",onClick:g,style:{padding:"9px 16px"},children:"Cancel"})]}),children:[(0,o.jsxs)("div",{style:{marginBottom:12},children:[(0,o.jsx)("div",{style:{fontSize:12,color:s.Y0,marginBottom:5,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"PROJECT DIRECTORY"}),(0,o.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,o.jsx)(u.A,{type:"text",value:E,onChange:e=>R(e.target.value),placeholder:"Paste path or click Browse",style:{flex:1}}),(0,o.jsx)(f.A,{variant:"dim",onClick:()=>{let e=(0,n.Ak)(6);a.sX.set(e,e=>R(e)),(0,i.S8)({type:"PICK_FOLDER",requestId:e})},children:"Browse"})]}),(0,o.jsx)("div",{style:{fontSize:10,color:s.Y0,marginTop:3,fontFamily:"var(--font-mono)",opacity:.7},children:"Empty = default workspace"})]}),(0,o.jsx)("div",{style:{fontSize:12,color:s.Y0,marginBottom:6,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"SELECT TEAM MEMBERS"}),(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:12},children:[z.map(e=>{var t;let{def:l,label:r}=e;return(0,o.jsxs)("div",{title:l.skills?"Skills: ".concat(l.skills):void 0,style:{display:"flex",alignItems:"center",gap:8,padding:"7px 10px",border:"1px solid ".concat(s.O2,"70"),backgroundColor:s.nY,textAlign:"left"},children:[(0,o.jsx)(c.default,{palette:l.palette,zoom:2,ready:h}),(0,o.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,o.jsxs)("div",{style:{fontSize:15,fontWeight:700,color:s.oj},children:[l.name," ",(0,o.jsx)("span",{style:{color:s.O2,fontSize:11,fontFamily:"var(--font-mono)"},children:r})]}),(0,o.jsx)("div",{style:{fontSize:13,color:s.Y0},children:l.role})]}),(0,o.jsx)("select",{value:null!=(t=C[l.id])?t:"claude",onClick:e=>e.stopPropagation(),onChange:e=>S(t=>({...t,[l.id]:e.target.value})),style:{padding:"3px 6px",border:"1px solid ".concat(s.KD),backgroundColor:s.lr,color:s.Y0,fontSize:12,cursor:"pointer",fontFamily:"var(--font-mono)"},children:d.GN.map(e=>(0,o.jsxs)("option",{value:e.id,children:[e.name,y&&y.length>0&&!y.includes(e.id)?" (?)":""]},e.id))})]},l.id)}),(0,o.jsx)("div",{style:{fontSize:12,color:s.Y0,marginTop:4,marginBottom:4,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"DEV AGENT (pick 1)"}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:5},children:j.map(e=>{var t;let l=k===e.id;return(0,o.jsxs)("button",{onClick:()=>w(e.id),title:e.skills?"Skills: ".concat(e.skills):void 0,style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"12px 6px 10px",border:l?"1px solid ".concat(s.DM,"60"):"1px solid ".concat(s.KD),backgroundColor:l?"".concat(s.DM,"0a"):"transparent",cursor:"pointer",textAlign:"center",opacity:l?1:.5,transition:"opacity 0.15s, border-color 0.15s, background-color 0.15s"},children:[(0,o.jsx)(c.default,{palette:e.palette,zoom:2,ready:h}),(0,o.jsx)("div",{style:{fontSize:14,fontWeight:700,color:s.oj,marginTop:6,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,o.jsx)("div",{style:{fontSize:12,color:s.Y0,marginTop:2,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.role}),(0,o.jsx)("select",{value:null!=(t=C[e.id])?t:"claude",onClick:t=>{t.stopPropagation(),w(e.id)},onChange:t=>{w(e.id),S(l=>({...l,[e.id]:t.target.value}))},style:{marginTop:6,padding:"3px 6px",border:"1px solid ".concat(s.KD),backgroundColor:s.lr,color:s.Y0,fontSize:12,cursor:"pointer",fontFamily:"var(--font-mono)"},children:d.GN.map(e=>(0,o.jsxs)("option",{value:e.id,children:[e.name,y&&y.length>0&&!y.includes(e.id)?" (?)":""]},e.id))})]},e.id)})})]})]})}},9362:(e,t,l)=>{l.d(t,{A:()=>a});var o=l(206),r=l(1406),n=l(9385);let i=r.forwardRef((e,t)=>{let{className:l,type:r,...i}=e;return(0,o.jsx)("input",{type:r,className:(0,n.cn)("flex w-full px-2.5 py-1.5","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",l),ref:t,...i})});i.displayName="Input",r.forwardRef((e,t)=>{let{className:l,...r}=e;return(0,o.jsx)("textarea",{className:(0,n.cn)("flex w-full px-2.5 py-1.5 resize-none","border border-border bg-background text-foreground","font-mono text-term leading-5","outline-none transition-colors duration-fast","placeholder:text-term-green-dim placeholder:opacity-50","focus:border-term-green-dim","disabled:cursor-not-allowed disabled:opacity-50",l),ref:t,...r})}).displayName="Textarea";let a=(0,r.forwardRef)(function(e,t){let{inline:l,className:r,...a}=e;return(0,o.jsx)(i,{ref:t,className:(0,n.cn)(l&&"border-none bg-transparent text-term-text-bright caret-accent px-1.5 py-1.5 focus:border-none focus:shadow-none",r),...a})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[345,492],{1593:()=>{}},_=>{_.O(0,[235,388,358],()=>_(_.s=1593)),_N_E=_.O()}]);
|
package/dist/web/_next/static/chunks/app/join/{page-7e3ac640395d940a.js → page-98fb24f2e87aa173.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[335],{4717:(e,n,t)=>{"use strict";var i=t(4121);t.o(i,"useRouter")&&t.d(n,{useRouter:function(){return i.useRouter}}),t.o(i,"useSearchParams")&&t.d(n,{useSearchParams:function(){return i.useSearchParams}})},8695:(e,n,t)=>{Promise.resolve().then(t.bind(t,9540))},9540:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>a});var i=t(206),r=t(1406),s=t(4717);function o(){let e=(0,s.useRouter)(),n=(0,s.useSearchParams)(),[o,a]=(0,r.useState)(""),[l,c]=(0,r.useState)("Joining...");async function u(i){try{let s=n.get("gateway"),o=s?s.includes("://")?s:"http://".concat(s):window.location.origin;c("Validating share link...");let l=await fetch("".concat(o,"/share/validate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})}),u=await l.json();if(!l.ok){var r;a(null!=(r=u.error)?r:"Invalid share link");return}let{saveConnection:d}=await t.e(149).then(t.bind(t,5149));d({mode:u.hasAbly?"ably":"ws",machineId:u.machineId,wsUrl:u.wsUrl,role:u.role,sessionToken:u.sessionToken}),e.push("/office")}catch(e){a("Cannot reach gateway. The share link may be invalid.")}}return(0,r.useEffect)(()=>{let e=n.get("token");if(!e)return void a("Missing share token in URL.");u(e)},[n]),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:24},children:[(0,i.jsx)("h1",{style:{fontSize:28,marginBottom:8},children:"
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[335],{4717:(e,n,t)=>{"use strict";var i=t(4121);t.o(i,"useRouter")&&t.d(n,{useRouter:function(){return i.useRouter}}),t.o(i,"useSearchParams")&&t.d(n,{useSearchParams:function(){return i.useSearchParams}})},8695:(e,n,t)=>{Promise.resolve().then(t.bind(t,9540))},9540:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>a});var i=t(206),r=t(1406),s=t(4717);function o(){let e=(0,s.useRouter)(),n=(0,s.useSearchParams)(),[o,a]=(0,r.useState)(""),[l,c]=(0,r.useState)("Joining...");async function u(i){try{let s=n.get("gateway"),o=s?s.includes("://")?s:"http://".concat(s):window.location.origin;c("Validating share link...");let l=await fetch("".concat(o,"/share/validate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})}),u=await l.json();if(!l.ok){var r;a(null!=(r=u.error)?r:"Invalid share link");return}let{saveConnection:d}=await t.e(149).then(t.bind(t,5149));d({mode:u.hasAbly?"ably":"ws",machineId:u.machineId,wsUrl:u.wsUrl,role:u.role,sessionToken:u.sessionToken}),e.push("/office")}catch(e){a("Cannot reach gateway. The share link may be invalid.")}}return(0,r.useEffect)(()=>{let e=n.get("token");if(!e)return void a("Missing share token in URL.");u(e)},[n]),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:24},children:[(0,i.jsx)("h1",{style:{fontSize:28,marginBottom:8},children:"Open Office"}),!o&&(0,i.jsx)("p",{style:{color:"#666",fontSize:14},children:l}),o&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{style:{color:"#ef4444",fontSize:14,marginTop:16},children:o}),(0,i.jsx)("button",{onClick:()=>e.push("/pair"),style:{marginTop:24,padding:"12px 24px",borderRadius:8,border:"none",backgroundColor:"#4f46e5",color:"#fff",fontSize:16,cursor:"pointer"},children:"Go to Pair Page"})]})]})}function a(){return(0,i.jsx)(r.Suspense,{fallback:(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:24},children:[(0,i.jsx)("h1",{style:{fontSize:28,marginBottom:8},children:"Open Office"}),(0,i.jsx)("p",{style:{color:"#666",fontSize:14},children:"Loading..."})]}),children:(0,i.jsx)(o,{})})}}},e=>{e.O(0,[235,388,358],()=>e(e.s=8695)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{3131:()=>{},7452:(e,t,o)=>{Promise.resolve().then(o.bind(o,8163)),Promise.resolve().then(o.t.bind(o,3131,23)),Promise.resolve().then(o.t.bind(o,8027,23))},8027:()=>{},8163:(e,t,o)=>{"use strict";o.d(t,{TooltipProvider:()=>i,ZI:()=>f,k$:()=>l,m_:()=>n});var r=o(206),a=o(1406),d=o(3767),s=o(9385);let i=d.Kq,n=d.bL,l=d.l9,f=a.forwardRef((e,t)=>{let{className:o,sideOffset:a=4,...i}=e;return(0,r.jsx)(d.ZL,{children:(0,r.jsx)(d.UC,{ref:t,sideOffset:a,className:(0,s.cn)("z-[50000] overflow-hidden","px-2.5 py-1.5","bg-term-panel border border-border shadow-lg","font-mono text-[11px] text-foreground","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",o),...i})})});f.displayName=d.UC.displayName},9385:(e,t,o)=>{"use strict";o.d(t,{cn:()=>d});var r=o(5230),a=o(2501);function d(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,a.QP)((0,r.$)(t))}}},e=>{e.O(0,[573,767,276,235,388,358],()=>e(e.s=7452)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[345,492],{1593:()=>{}},_=>{_.O(0,[235,388,358],()=>_(_.s=1593)),_N_E=_.O()}]);
|