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
package/dist/web/404.html
CHANGED
|
@@ -1,55 +1,65 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
--px-bg-chat: #1a1530;
|
|
7
|
-
--px-border: #3d2e54;
|
|
8
|
-
--px-border-warm: #5a3d14;
|
|
9
|
-
--px-gold: #e8b040;
|
|
10
|
-
--px-gold-dim: #a87820;
|
|
11
|
-
--px-text: #eddcb8;
|
|
12
|
-
--px-text-muted: #9a8a68;
|
|
13
|
-
--px-text-dim: #6a5a48;
|
|
14
|
-
--px-amber: #e0900a;
|
|
15
|
-
--px-amber-bg: rgba(232, 176, 64, 0.14);
|
|
16
|
-
}
|
|
17
|
-
* {
|
|
18
|
-
scrollbar-width: thin;
|
|
19
|
-
scrollbar-color: #5a3d14 #1a1530;
|
|
20
|
-
}
|
|
21
|
-
*::-webkit-scrollbar {
|
|
22
|
-
width: 4px;
|
|
23
|
-
height: 4px;
|
|
24
|
-
}
|
|
25
|
-
*::-webkit-scrollbar-track {
|
|
26
|
-
background: transparent;
|
|
27
|
-
}
|
|
28
|
-
*::-webkit-scrollbar-thumb {
|
|
29
|
-
background: #3d2d10;
|
|
30
|
-
border-radius: 0;
|
|
31
|
-
}
|
|
32
|
-
*::-webkit-scrollbar-thumb:hover {
|
|
33
|
-
background: #e8b040;
|
|
34
|
-
}
|
|
35
|
-
*::-webkit-scrollbar-corner {
|
|
36
|
-
background: transparent;
|
|
37
|
-
}
|
|
38
|
-
.px-font {
|
|
39
|
-
font-family: 'Press Start 2P', monospace;
|
|
40
|
-
}
|
|
41
|
-
@keyframes px-blink {
|
|
42
|
-
0%, 49% { opacity: 1; }
|
|
43
|
-
50%, 100% { opacity: 0; }
|
|
44
|
-
}
|
|
45
|
-
@keyframes px-pulse-gold {
|
|
46
|
-
0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,48,0); }
|
|
47
|
-
50% { box-shadow: 0 0 8px 2px rgba(200,155,48,0.25); }
|
|
48
|
-
}
|
|
49
|
-
</style><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script>
|
|
1
|
+
<!DOCTYPE html><!--a77xldHdc_0TOGcqwFr4L--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/c62e12508f039ceb.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-dcd361e024700880.js"/><script src="/_next/static/chunks/4d67e943-e6a0fd3b5c397505.js" async=""></script><script src="/_next/static/chunks/388-5a04e93e2531cfb7.js" async=""></script><script src="/_next/static/chunks/main-app-baad86574bd560af.js" async=""></script><script src="/_next/static/chunks/767-52fa35b605461336.js" async=""></script><script src="/_next/static/chunks/276-7203e26618727a54.js" async=""></script><script src="/_next/static/chunks/app/layout-a57e585fdbd6e50f.js" async=""></script><meta name="theme-color" content="#1a1530"/><link rel="preconnect" href="https://fonts.googleapis.com"/><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous"/><meta name="robots" content="noindex"/><title>Open Office</title><meta name="description" content="Control your AI agents from anywhere"/><link rel="manifest" href="/manifest.json"/><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400&family=Press+Start+2P&display=swap" rel="stylesheet"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body style="margin:0;background-color:#16122a;color:#eddcb8;font-family:system-ui, sans-serif"><div hidden=""><!--$--><!--/$--></div><div style="display:flex;align-items:center;justify-content:center;min-height:100vh"><h1 style="font-family:JetBrains Mono, monospace;font-size:1.2rem">404 — Not Found</h1></div><!--$--><!--/$--><script>
|
|
2
|
+
document.addEventListener('visibilitychange', function() {
|
|
3
|
+
document.body.classList.toggle('term-paused', document.hidden);
|
|
4
|
+
});
|
|
5
|
+
</script><script>
|
|
50
6
|
if ('serviceWorker' in navigator && location.hostname === 'localhost') {
|
|
51
7
|
navigator.serviceWorker.getRegistrations().then(function(regs) {
|
|
52
8
|
for (var r of regs) r.unregister();
|
|
53
9
|
});
|
|
54
10
|
}
|
|
55
|
-
</script><script
|
|
11
|
+
</script><script>
|
|
12
|
+
(function() {
|
|
13
|
+
var attached = new WeakSet();
|
|
14
|
+
var timers = new WeakMap();
|
|
15
|
+
function addScrollbar(el) {
|
|
16
|
+
if (attached.has(el)) return;
|
|
17
|
+
var cs = getComputedStyle(el);
|
|
18
|
+
var ov = cs.overflowY;
|
|
19
|
+
if (ov !== 'auto' && ov !== 'scroll') return;
|
|
20
|
+
if (cs.position === 'static') el.style.position = 'relative';
|
|
21
|
+
var track = document.createElement('div');
|
|
22
|
+
track.className = 'custom-scrollbar';
|
|
23
|
+
var thumb = document.createElement('div');
|
|
24
|
+
thumb.className = 'custom-scrollbar-thumb';
|
|
25
|
+
track.appendChild(thumb);
|
|
26
|
+
el.appendChild(track);
|
|
27
|
+
attached.add(el);
|
|
28
|
+
function update() {
|
|
29
|
+
var sh = el.scrollHeight, ch = el.clientHeight;
|
|
30
|
+
if (sh <= ch) { track.classList.remove('visible'); return; }
|
|
31
|
+
var ratio = ch / sh;
|
|
32
|
+
var thumbH = Math.max(20, ratio * ch);
|
|
33
|
+
var scrollRatio = el.scrollTop / (sh - ch);
|
|
34
|
+
var thumbTop = scrollRatio * (ch - thumbH);
|
|
35
|
+
thumb.style.height = thumbH + 'px';
|
|
36
|
+
thumb.style.top = (el.scrollTop + thumbTop) + 'px';
|
|
37
|
+
track.classList.add('visible');
|
|
38
|
+
clearTimeout(timers.get(el));
|
|
39
|
+
timers.set(el, setTimeout(function() { track.classList.remove('visible'); }, 1200));
|
|
40
|
+
}
|
|
41
|
+
el.addEventListener('scroll', update, { passive: true });
|
|
42
|
+
new ResizeObserver(update).observe(el);
|
|
43
|
+
// Observe subtree content changes (e.g. streaming chat messages)
|
|
44
|
+
var contentTimer = 0;
|
|
45
|
+
new MutationObserver(function() {
|
|
46
|
+
if (contentTimer) return;
|
|
47
|
+
contentTimer = setTimeout(function() { contentTimer = 0; update(); }, 150);
|
|
48
|
+
}).observe(el, { childList: true, subtree: true, characterData: true });
|
|
49
|
+
update();
|
|
50
|
+
}
|
|
51
|
+
function scan() {
|
|
52
|
+
document.querySelectorAll('[data-scrollbar]').forEach(function(el) {
|
|
53
|
+
addScrollbar(el);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
var scanTimer = 0;
|
|
57
|
+
var mo = new MutationObserver(function() {
|
|
58
|
+
if (scanTimer) return;
|
|
59
|
+
scanTimer = setTimeout(function() { scanTimer = 0; scan(); }, 300);
|
|
60
|
+
});
|
|
61
|
+
mo.observe(document.body, { childList: true, subtree: true });
|
|
62
|
+
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', scan);
|
|
63
|
+
else scan();
|
|
64
|
+
})();
|
|
65
|
+
</script><script src="/_next/static/chunks/webpack-dcd361e024700880.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[8163,[\"767\",\"static/chunks/767-52fa35b605461336.js\",\"276\",\"static/chunks/276-7203e26618727a54.js\",\"177\",\"static/chunks/app/layout-a57e585fdbd6e50f.js\"],\"TooltipProvider\"]\n3:I[9653,[],\"\"]\n4:I[1329,[],\"\"]\n9:I[5719,[],\"\"]\n:HL[\"/_next/static/css/c62e12508f039ceb.css\",\"style\"]\n5:Tb25,"])</script><script>self.__next_f.push([1,"\n (function() {\n var attached = new WeakSet();\n var timers = new WeakMap();\n function addScrollbar(el) {\n if (attached.has(el)) return;\n var cs = getComputedStyle(el);\n var ov = cs.overflowY;\n if (ov !== 'auto' \u0026\u0026 ov !== 'scroll') return;\n if (cs.position === 'static') el.style.position = 'relative';\n var track = document.createElement('div');\n track.className = 'custom-scrollbar';\n var thumb = document.createElement('div');\n thumb.className = 'custom-scrollbar-thumb';\n track.appendChild(thumb);\n el.appendChild(track);\n attached.add(el);\n function update() {\n var sh = el.scrollHeight, ch = el.clientHeight;\n if (sh \u003c= ch) { track.classList.remove('visible'); return; }\n var ratio = ch / sh;\n var thumbH = Math.max(20, ratio * ch);\n var scrollRatio = el.scrollTop / (sh - ch);\n var thumbTop = scrollRatio * (ch - thumbH);\n thumb.style.height = thumbH + 'px';\n thumb.style.top = (el.scrollTop + thumbTop) + 'px';\n track.classList.add('visible');\n clearTimeout(timers.get(el));\n timers.set(el, setTimeout(function() { track.classList.remove('visible'); }, 1200));\n }\n el.addEventListener('scroll', update, { passive: true });\n new ResizeObserver(update).observe(el);\n // Observe subtree content changes (e.g. streaming chat messages)\n var contentTimer = 0;\n new MutationObserver(function() {\n if (contentTimer) return;\n contentTimer = setTimeout(function() { contentTimer = 0; update(); }, 150);\n }).observe(el, { childList: true, subtree: true, characterData: true });\n update();\n }\n function scan() {\n document.querySelectorAll('[data-scrollbar]').forEach(function(el) {\n addScrollbar(el);\n });\n }\n var scanTimer = 0;\n var mo = new MutationObserver(function() {\n if (scanTimer) return;\n scanTimer = setTimeout(function() { scanTimer = 0; scan(); }, 300);\n });\n mo.observe(document.body, { childList: true, subtree: true });\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', scan);\n else scan();\n })();\n "])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"a77xldHdc_0TOGcqwFr4L\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/c62e12508f039ceb.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"meta\",null,{\"name\":\"theme-color\",\"content\":\"#1a1530\"}],[\"$\",\"meta\",null,{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.googleapis.com\"}],[\"$\",\"link\",null,{\"rel\":\"preconnect\",\"href\":\"https://fonts.gstatic.com\",\"crossOrigin\":\"anonymous\"}],[\"$\",\"link\",null,{\"href\":\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400\u0026family=Press+Start+2P\u0026display=swap\",\"rel\":\"stylesheet\"}]]}],[\"$\",\"body\",null,{\"style\":{\"margin\":0,\"backgroundColor\":\"#16122a\",\"color\":\"#eddcb8\",\"fontFamily\":\"system-ui, sans-serif\"},\"children\":[[\"$\",\"$L2\",null,{\"delayDuration\":300,\"skipDelayDuration\":100,\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"div\",null,{\"style\":{\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"minHeight\":\"100vh\"},\"children\":[\"$\",\"h1\",null,{\"style\":{\"fontFamily\":\"JetBrains Mono, monospace\",\"fontSize\":\"1.2rem\"},\"children\":\"404 — Not Found\"}]}],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n document.addEventListener('visibilitychange', function() {\\n document.body.classList.toggle('term-paused', document.hidden);\\n });\\n \"}}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n if ('serviceWorker' in navigator \u0026\u0026 location.hostname === 'localhost') {\\n navigator.serviceWorker.getRegistrations().then(function(regs) {\\n for (var r of regs) r.unregister();\\n });\\n }\\n \"}}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$5\"}}]]}]]}]]}],{\"children\":[\"/_not-found\",\"$L6\",{\"children\":[\"__PAGE__\",\"$L7\",{},null,false]},null,false]},null,false],\"$L8\",false]],\"m\":\"$undefined\",\"G\":[\"$9\",[]],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"a:I[9096,[],\"OutletBoundary\"]\nc:I[913,[],\"AsyncMetadataOutlet\"]\ne:I[9096,[],\"ViewportBoundary\"]\n10:I[9096,[],\"MetadataBoundary\"]\n11:\"$Sreact.suspense\"\n6:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n7:[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"div\",null,{\"style\":{\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"minHeight\":\"100vh\"},\"children\":[\"$\",\"h1\",null,{\"style\":{\"fontFamily\":\"JetBrains Mono, monospace\",\"fontSize\":\"1.2rem\"},\"children\":\"404 — Not Found\"}]}],null,[\"$\",\"$La\",null,{\"children\":[\"$Lb\",[\"$\",\"$Lc\",null,{\"promise\":\"$@d\"}]]}]]}]\n8:[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[[\"$\",\"$Le\",null,{\"children\":\"$Lf\"}],null],[\"$\",\"$L10\",null,{\"children\":[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$11\",null,{\"fallback\":null,\"children\":\"$L12\"}]}]}]]}]\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\nb:null\n"])</script><script>self.__next_f.push([1,"d:{\"metadata\":[[\"$\",\"title\",\"0\",{\"children\":\"Open Office\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Control your AI agents from anywhere\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}]],\"error\":null,\"digest\":\"$undefined\"}\n"])</script><script>self.__next_f.push([1,"12:\"$d:metadata\"\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,262],{73:(e,t,o)=>{o.r(t),o.d(t,{default:()=>n});var i=o(206),r=o(1406),l=o(2988);let n=function(e){let{palette:t,zoom:o=3,ready:n}=e,a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{var e,i;let r=a.current;if(!r)return;let n=(0,l.Cr)(t);if(!n)return;let s=n.length,d=null!=(i=null==(e=n[0])?void 0:e.length)?i:0;r.width=d*o,r.height=s*o;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 i=n[e][t];i&&(c.fillStyle=i,c.fillRect(t*o,e*o,o,o))}}},[t,o,n]),(0,i.jsx)("canvas",{ref:a,style:{width:16*o,height:32*o,imageRendering:"pixelated"}})}},262:(e,t,o)=>{o.r(t),o.d(t,{default:()=>m});var i=o(206),r=o(1406),l=o(2001),n=o(5192),a=o(138),s=o(7821),d=o(4932),c=o(73),p=o(1310),f=o(370),x=o(9362);let m=function(e){let{agentDefs:t,onHire:o,onCreate:m,onEdit:g,onDelete:u,onClose:h,assetsReady:y,detectedBackends:v}=e,[b,j]=(0,r.useState)("claude"),[w,S]=(0,r.useState)(null),[k,C]=(0,r.useState)(""),z=t.filter(e=>e.isBuiltin&&"leader"!==e.teamRole),R=t.filter(e=>!e.isBuiltin&&"leader"!==e.teamRole);return(0,i.jsxs)(p.A,{open:!0,onClose:h,maxWidth:520,zIndex:100,title:"Hire Team",footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.A,{variant:"primary",onClick:m,style:{flex:1,padding:"9px"},children:"+ Create New"}),(0,i.jsx)(f.A,{variant:"dim",onClick:h,style:{padding:"9px 16px"},children:"Cancel"})]}),children:[(0,i.jsxs)("div",{style:{marginBottom:12},children:[(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginBottom:5,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"AI BACKEND"}),(0,i.jsx)("div",{style:{display:"flex",gap:4},children:s.GN.map(e=>{let t=!v||0===v.length||v.includes(e.id),o=b===e.id;return(0,i.jsxs)("button",{onClick:()=>j(e.id),style:{flex:1,padding:"6px 4px",fontSize:13,fontWeight:600,border:o?"1px solid ".concat(d.DM):"1px solid ".concat(d.KD),backgroundColor:o?d.DM+"20":"transparent",color:o?d.DM:d.Y0,cursor:"pointer",fontFamily:"var(--font-mono)",opacity:t?1:.7},children:[(0,i.jsx)("span",{style:{display:"inline-block",width:5,height:5,borderRadius:"50%",backgroundColor:t?d.$C:d.O2,marginRight:4,verticalAlign:"middle"}}),e.name]},e.id)})})]}),(0,i.jsxs)("div",{style:{marginBottom:12},children:[(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginBottom:5,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"WORKING DIRECTORY"}),(0,i.jsxs)("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[(0,i.jsx)(x.A,{type:"text",value:k,onChange:e=>C(e.target.value),placeholder:"Paste path or click Browse",style:{flex:1}}),(0,i.jsx)(f.A,{variant:"dim",onClick:()=>{let e=(0,l.Ak)(6);a.sX.set(e,e=>C(e)),(0,n.S8)({type:"PICK_FOLDER",requestId:e})},children:"Browse"})]}),(0,i.jsx)("div",{style:{fontSize:10,color:d.Y0,marginTop:3,fontFamily:"var(--font-mono)",opacity:.7},children:"Empty = default workspace"})]}),(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginBottom:5,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"BUILT-IN AGENTS"}),(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:5,marginBottom:10},children:z.map(e=>(0,i.jsxs)("button",{onClick:()=>o(e,b,k||void 0),onMouseEnter:()=>S(e.id),onMouseLeave:()=>S(null),title:e.skills?"Skills: ".concat(e.skills):void 0,style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"12px 6px 10px",position:"relative",border:"1px solid ".concat(d.KD),backgroundColor:"transparent",cursor:"pointer",textAlign:"center",transition:"border-color 0.15s"},children:[(0,i.jsx)(c.default,{palette:e.palette,zoom:2,ready:y}),(0,i.jsx)("div",{style:{fontSize:14,fontWeight:700,color:d.oj,marginTop:6,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginTop:2,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.role}),w===e.id&&(0,i.jsx)("span",{onClick:t=>{t.stopPropagation(),g(e)},style:{position:"absolute",top:4,right:4,fontSize:15,color:d.Y0,cursor:"pointer",padding:"2px 4px"},title:"Edit",children:"✎"})]},e.id))}),R.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginBottom:5,fontFamily:"var(--font-mono)",letterSpacing:"0.05em"},children:"MY AGENTS"}),(0,i.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:5,marginBottom:10},children:R.map(e=>(0,i.jsxs)("button",{onClick:()=>o(e,b,k||void 0),onMouseEnter:()=>S(e.id),onMouseLeave:()=>S(null),title:e.skills?"Skills: ".concat(e.skills):void 0,style:{display:"flex",flexDirection:"column",alignItems:"center",padding:"12px 6px 10px",position:"relative",border:"1px solid ".concat(d.KD),backgroundColor:"transparent",cursor:"pointer",textAlign:"center",transition:"border-color 0.15s"},children:[(0,i.jsx)(c.default,{palette:e.palette,zoom:2,ready:y}),(0,i.jsx)("div",{style:{fontSize:14,fontWeight:700,color:d.oj,marginTop:6,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,i.jsx)("div",{style:{fontSize:12,color:d.Y0,marginTop:2,width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.role}),w===e.id&&(0,i.jsxs)("span",{style:{position:"absolute",top:4,right:4,display:"flex",gap:2,alignItems:"center"},children:[(0,i.jsx)("span",{onClick:t=>{t.stopPropagation(),g(e)},style:{fontSize:15,color:d.Y0,cursor:"pointer",padding:"2px 4px"},title:"Edit",children:"✎"}),(0,i.jsx)("span",{onClick:t=>{t.stopPropagation(),u(e.id)},style:{fontSize:16,color:d.v_,cursor:"pointer",padding:"2px 4px",fontWeight:700},title:"Delete",children:"\xd7"})]})]},e.id))})]})]})}},9362:(e,t,o)=>{o.d(t,{A:()=>a});var i=o(206),r=o(1406),l=o(9385);let n=r.forwardRef((e,t)=>{let{className:o,type:r,...n}=e;return(0,i.jsx)("input",{type:r,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",o),ref:t,...n})});n.displayName="Input",r.forwardRef((e,t)=>{let{className:o,...r}=e;return(0,i.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",o),ref:t,...r})}).displayName="Textarea";let a=(0,r.forwardRef)(function(e,t){let{inline:o,className:r,...a}=e;return(0,i.jsx)(n,{ref:t,className:(0,l.cn)(o&&"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
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[27],{3027:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,loadDefaultOffice:()=>h});var a=n(206),i=n(1406),r=n(5712),o=n.n(r),l=n(5195),c=n(9892);function s(e){return new Promise((t,n)=>{let a=URL.createObjectURL(e),i=new Image;i.onload=()=>{URL.revokeObjectURL(a),t(i)},i.onerror=()=>{URL.revokeObjectURL(a),n(Error("Failed to load image from blob"))},i.src=a})}function d(e){var t;let n=(null==(t=e.split(".").pop())?void 0:t.toLowerCase())||"png";return"jpg"===n||"jpeg"===n?"image/jpeg":"webp"===n?"image/webp":"image/png"}function u(e){return 0===e?l.nb.WALL:8===e?l.nb.VOID:e>=1&&e<=7?e:l.nb.FLOOR_1}async function f(e){let t=await o().loadAsync(e),n=t.file("room.json");if(!n)return alert("Invalid room zip: missing room.json"),null;let a=JSON.parse(await n.async("text"));if(!a.cols||!a.rows||!a.tiles)return alert("Invalid room.json: missing cols/rows/tiles"),null;let i=null;if(a.backgroundFile){let e=t.file(a.backgroundFile);if(e){let t=new Blob([await e.async("arraybuffer")],{type:d(a.backgroundFile)});i=await s(t)}}let r=new Map;if(a.tileset){for(let e of a.tileset){if(!e.file)continue;let n=t.file(e.file);if(!n)continue;let a=new Blob([await n.async("arraybuffer")],{type:d(e.file)}),i=await s(a),o=function(e,t,n){let a=document.createElement("canvas");a.width=t,a.height=n;let i=a.getContext("2d");i.imageSmoothingEnabled=!1;let r=Math.min(t/e.naturalWidth,n/e.naturalHeight),o=Math.round(e.naturalWidth*r),l=Math.round(e.naturalHeight*r),c=Math.round((t-o)/2);i.drawImage(e,c,n-l,o,l);let{data:s}=i.getImageData(0,0,t,n),d=[];for(let e=0;e<n;e++){let n=[];for(let a=0;a<t;a++){let i=(e*t+a)*4,r=s[i],o=s[i+1],l=s[i+2];s[i+3]<128?n.push(""):n.push("#".concat(r.toString(16).padStart(2,"0")).concat(o.toString(16).padStart(2,"0")).concat(l.toString(16).padStart(2,"0")).toUpperCase())}d.push(n)}return d}(i,e.gridW*l.dn,e.gridH*l.dn);r.set("room-".concat(e.id),{sprite:o,footprintW:e.gridW,footprintH:e.gridH,label:e.name,tag:e.tag})}r.size>0&&(0,c.F$)(r)}let f=a.tiles.map(u),p={h:35,s:30,b:15,c:0},g=f.map(e=>e===l.nb.WALL||e===l.nb.VOID?null:p),b=(a.furniture||[]).map(e=>({uid:e.uid,type:"room-".concat(e.tileId),col:e.col,row:e.row}));if(a.objects){let e=["front","right","back","left"];for(let t of new Set(a.objects.map(e=>e.type))){let n=(0,c.Um)(t);if(n)for(let a of e){let e="".concat(t,"-").concat(a);if((0,c.Um)(e))continue;let i={...n,type:e,orientation:a,footprintW:1,footprintH:1};c.hS.push(i)}}for(let e of a.objects){var m;let t=function(e){switch(e%360){case 0:default:return"front";case 90:return"right";case 180:return"back";case 270:return"left"}}(null!=(m=e.rotation)?m:0),n="".concat(e.type,"-").concat(t);b.push({uid:e.id,type:n,col:e.col,row:e.row})}}return{layout:{version:1,cols:a.cols,rows:a.rows,tiles:f,furniture:b,tileColors:g},backgroundImage:i}}async function p(e){let t=await fetch(e);return t.ok?f(new File([new Blob([await t.arrayBuffer()],{type:"application/zip"})],e.split("/").pop()||"room.zip",{type:"application/zip"})):(console.error("[roomZipLoader] Failed to fetch ".concat(e,": ").concat(t.status)),null)}let g="/offices";async function b(e){try{let t=await fetch(e);if(!t.ok)return null;let n=await t.arrayBuffer(),a=await o().loadAsync(n),i=a.file("room.json");if(!i)return null;let r=JSON.parse(await i.async("text")).backgroundFile;if(!r)return null;let l=a.file(r);if(!l)return null;let c=new Blob([await l.async("arraybuffer")],{type:"image/png"});return URL.createObjectURL(c)}catch(e){return null}}function m(e){let{isOpen:t,onClose:n,onSelect:r,currentOfficeId:o}=e,[l,c]=(0,i.useState)([]),[s,d]=(0,i.useState)(!1),[u,f]=(0,i.useState)(null),[m,h]=(0,i.useState)(null);(0,i.useEffect)(()=>{if(!t)return;let e=!1;return(async()=>{try{let t=await fetch("".concat(g,"/index.json")),n=await t.json();if(e)return;c(n.map(e=>({...e})));let a=n.map(async e=>{if(e.thumbnail)return{id:e.id,url:"".concat(g,"/").concat(e.thumbnail)};let t=await b("".concat(g,"/").concat(e.file));return{id:e.id,url:t}}),i=await Promise.all(a);if(e)return;c(e=>e.map(e=>{let t=i.find(t=>t.id===e.id);return(null==t?void 0:t.url)?{...e,thumbUrl:t.url}:e}))}catch(e){console.error("[OfficeSwitcher] Failed to load index:",e)}})(),()=>{e=!0}},[t]);let y=(0,i.useCallback)(async e=>{if(!s){d(!0),f(e.id);try{let t=await p("".concat(g,"/").concat(e.file));if(t){try{localStorage.setItem("office-selected-id",e.id)}catch(e){}r(t.layout,t.backgroundImage),n()}}catch(e){console.error("[OfficeSwitcher] Failed to load office:",e)}finally{d(!1),f(null)}}},[s,r,n]);return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{onClick:n,style:{position:"fixed",inset:0,background:"rgba(0, 0, 0, 0.6)",zIndex:99}}),(0,a.jsxs)("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:100,background:"rgba(20, 20, 25, 0.92)",backdropFilter:"blur(16px)",border:"1px solid rgba(255, 255, 255, 0.1)",borderRadius:12,padding:0,boxShadow:"0 8px 32px rgba(0, 0, 0, 0.4)",width:480,maxWidth:"90vw",maxHeight:"80vh",display:"flex",flexDirection:"column"},children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderBottom:"1px solid rgba(255, 255, 255, 0.08)"},children:[(0,a.jsx)("span",{style:{fontSize:"15px",color:"rgba(255, 255, 255, 0.9)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:"Switch Office"}),(0,a.jsx)("button",{onClick:n,onMouseEnter:()=>h("close"),onMouseLeave:()=>h(null),style:{background:"close"===m?"rgba(255, 255, 255, 0.08)":"transparent",border:"none",color:"rgba(255, 255, 255, 0.6)",fontSize:"15px",cursor:"pointer",padding:"0 4px",lineHeight:1},children:"X"})]}),(0,a.jsx)("div",{"data-scrollbar":!0,style:{overflowY:"auto",flex:1,minHeight:0},children:(0,a.jsxs)("div",{style:{padding:"12px",display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"8px"},children:[0===l.length&&(0,a.jsx)("div",{style:{color:"rgba(255,255,255,0.4)",fontSize:13,padding:20,textAlign:"center",gridColumn:"1 / -1"},children:"Loading..."}),l.map(e=>{let t=o===e.id,n=u===e.id,i=m===e.id,r=e.thumbUrl||(e.thumbnail?"".concat(g,"/").concat(e.thumbnail):void 0);return(0,a.jsxs)("button",{onClick:()=>y(e),onMouseEnter:()=>h(e.id),onMouseLeave:()=>h(null),disabled:s,style:{display:"flex",flexDirection:"column",background:i&&!t?"rgba(255, 255, 255, 0.06)":"transparent",border:t?"2px solid rgba(130, 160, 255, 0.6)":"2px solid rgba(255, 255, 255, 0.08)",borderRadius:8,padding:0,cursor:s?"wait":"pointer",overflow:"hidden",opacity:s&&!n?.5:1},children:[(0,a.jsxs)("div",{style:{width:"100%",aspectRatio:"1",position:"relative",background:"#0a0a14",flexShrink:0},children:[r&&(0,a.jsx)("img",{src:r,alt:e.name,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",imageRendering:"pixelated"}}),n&&(0,a.jsx)("div",{style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",color:"rgba(160, 185, 255, 0.9)",fontSize:13,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},children:"Loading..."})]}),(0,a.jsx)("div",{style:{padding:"5px 4px",fontSize:11,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',color:t?"rgba(160, 185, 255, 0.9)":"rgba(255, 255, 255, 0.6)",textAlign:"center",width:"100%"},children:e.name})]},e.id)})]})})]})]}):null}async function h(){try{let e=await fetch("".concat(g,"/index.json"));if(!e.ok)return null;let t=await e.json(),n=null;try{n=localStorage.getItem("office-selected-id")}catch(e){}let a=t.find(e=>e.id===n)||t[0];if(!a)return null;let i=await p("".concat(g,"/").concat(a.file));if(!i)return null;return{layout:i.layout,backgroundImage:i.backgroundImage,officeId:a.id}}catch(e){return console.error("[loadDefaultOffice] Failed:",e),null}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{708:(e,r,t)=>{t.d(r,{Z:()=>i});var o=t(1406),n=t(7995),l=t(5692),s=t(5762),a=t(206),i=o.forwardRef((e,r)=>{var t,i;let{container:d,...c}=e,[u,m]=o.useState(!1);(0,s.N)(()=>m(!0),[]);let p=d||u&&(null==(i=globalThis)||null==(t=i.document)?void 0:t.body);return p?n.createPortal((0,a.jsx)(l.sG.div,{...c,ref:r}),p):null});i.displayName="Portal"},2501:(e,r,t)=>{t.d(r,{QP:()=>em});let o=(e=new Map,r=null,t)=>({nextPart:e,validators:r,classGroupId:t}),n=[],l=(e,r,t)=>{if(0==e.length-r)return t.classGroupId;let o=e[r],n=t.nextPart.get(o);if(n){let t=l(e,r+1,n);if(t)return t}let s=t.validators;if(null===s)return;let a=0===r?e.join("-"):e.slice(r).join("-"),i=s.length;for(let e=0;e<i;e++){let r=s[e];if(r.validator(a))return r.classGroupId}},s=(e,r)=>{let t=o();for(let o in e)a(e[o],t,o,r);return t},a=(e,r,t,o)=>{let n=e.length;for(let l=0;l<n;l++)i(e[l],r,t,o)},i=(e,r,t,o)=>"string"==typeof e?void d(e,r,t):"function"==typeof e?void c(e,r,t,o):void u(e,r,t,o),d=(e,r,t)=>{(""===e?r:m(r,e)).classGroupId=t},c=(e,r,t,o)=>{if(p(e))return void a(e(o),r,t,o);null===r.validators&&(r.validators=[]),r.validators.push({classGroupId:t,validator:e})},u=(e,r,t,o)=>{let n=Object.entries(e),l=n.length;for(let e=0;e<l;e++){let[l,s]=n[e];a(s,m(r,l),t,o)}},m=(e,r)=>{let t=e,n=r.split("-"),l=n.length;for(let e=0;e<l;e++){let r=n[e],l=t.nextPart.get(r);l||(l=o(),t.nextPart.set(r,l)),t=l}return t},p=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,f=[],b=(e,r,t,o,n)=>({modifiers:e,hasImportantModifier:r,baseClassName:t,maybePostfixModifierPosition:o,isExternal:n}),g=/\s+/,h=e=>{let r;if("string"==typeof e)return e;let t="";for(let o=0;o<e.length;o++)e[o]&&(r=h(e[o]))&&(t&&(t+=" "),t+=r);return t},v=[],w=e=>{let r=r=>r[e]||v;return r.isThemeGetter=!0,r},y=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k=/^\((?:(\w[\w-]*):)?(.+)\)$/i,x=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,z=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,C=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,O=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>x.test(e),P=e=>!!e&&!Number.isNaN(Number(e)),S=e=>!!e&&Number.isInteger(Number(e)),T=e=>e.endsWith("%")&&P(e.slice(0,-1)),D=e=>E.test(e),L=()=>!0,R=e=>z.test(e)&&!N.test(e),M=()=>!1,$=e=>C.test(e),_=e=>O.test(e),I=e=>!A(e)&&!Z(e),W=e=>et(e,es,M),A=e=>y.test(e),G=e=>et(e,ea,R),U=e=>et(e,ei,P),F=e=>et(e,ec,L),B=e=>et(e,ed,M),V=e=>et(e,en,M),q=e=>et(e,el,_),K=e=>et(e,eu,$),Z=e=>k.test(e),Q=e=>eo(e,ea),X=e=>eo(e,ed),Y=e=>eo(e,en),H=e=>eo(e,es),J=e=>eo(e,el),ee=e=>eo(e,eu,!0),er=e=>eo(e,ec,!0),et=(e,r,t)=>{let o=y.exec(e);return!!o&&(o[1]?r(o[1]):t(o[2]))},eo=(e,r,t=!1)=>{let o=k.exec(e);return!!o&&(o[1]?r(o[1]):t)},en=e=>"position"===e||"percentage"===e,el=e=>"image"===e||"url"===e,es=e=>"length"===e||"size"===e||"bg-size"===e,ea=e=>"length"===e,ei=e=>"number"===e,ed=e=>"family-name"===e,ec=e=>"number"===e||"weight"===e,eu=e=>"shadow"===e;Symbol.toStringTag;let em=((e,...r)=>{let t,o,a,i,d=e=>{let r=o(e);if(r)return r;let n=((e,r)=>{let{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:l}=r,s=[],a=e.trim().split(g),i="";for(let e=a.length-1;e>=0;e-=1){let r=a[e],{isExternal:d,modifiers:c,hasImportantModifier:u,baseClassName:m,maybePostfixModifierPosition:p}=t(r);if(d){i=r+(i.length>0?" "+i:i);continue}let f=!!p,b=o(f?m.substring(0,p):m);if(!b){if(!f||!(b=o(m))){i=r+(i.length>0?" "+i:i);continue}f=!1}let g=0===c.length?"":1===c.length?c[0]:l(c).join(":"),h=u?g+"!":g,v=h+b;if(s.indexOf(v)>-1)continue;s.push(v);let w=n(b,f);for(let e=0;e<w.length;++e){let r=w[e];s.push(h+r)}i=r+(i.length>0?" "+i:i)}return i})(e,t);return a(e,n),n};return i=c=>(o=(t=(e=>({cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let r=0,t=Object.create(null),o=Object.create(null),n=(n,l)=>{t[n]=l,++r>e&&(r=0,o=t,t=Object.create(null))};return{get(e){let r=t[e];return void 0!==r?r:void 0!==(r=o[e])?(n(e,r),r):void 0},set(e,r){e in t?t[e]=r:n(e,r)}}})(e.cacheSize),parseClassName:(e=>{let{prefix:r,experimentalParseClassName:t}=e,o=e=>{let r,t=[],o=0,n=0,l=0,s=e.length;for(let a=0;a<s;a++){let s=e[a];if(0===o&&0===n){if(":"===s){t.push(e.slice(l,a)),l=a+1;continue}if("/"===s){r=a;continue}}"["===s?o++:"]"===s?o--:"("===s?n++:")"===s&&n--}let a=0===t.length?e:e.slice(l),i=a,d=!1;return a.endsWith("!")?(i=a.slice(0,-1),d=!0):a.startsWith("!")&&(i=a.slice(1),d=!0),b(t,d,i,r&&r>l?r-l:void 0)};if(r){let e=r+":",t=o;o=r=>r.startsWith(e)?t(r.slice(e.length)):b(f,!1,r,void 0,!0)}if(t){let e=o;o=r=>t({className:r,parseClassName:e})}return o})(e),sortModifiers:(e=>{let r=new Map;return e.orderSensitiveModifiers.forEach((e,t)=>{r.set(e,1e6+t)}),e=>{let t=[],o=[];for(let n=0;n<e.length;n++){let l=e[n],s="["===l[0],a=r.has(l);s||a?(o.length>0&&(o.sort(),t.push(...o),o=[]),t.push(l)):o.push(l)}return o.length>0&&(o.sort(),t.push(...o)),t}})(e),...(e=>{let r=(e=>{let{theme:r,classGroups:t}=e;return s(t,r)})(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return(e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{let r=e.slice(1,-1),t=r.indexOf(":"),o=r.slice(0,t);return o?"arbitrary.."+o:void 0})())(e);let t=e.split("-"),o=+(""===t[0]&&t.length>1);return l(t,o,r)},getConflictingClassGroupIds:(e,r)=>{if(r){let r=o[e],l=t[e];return r?l?((e,r)=>{let t=Array(e.length+r.length);for(let r=0;r<e.length;r++)t[r]=e[r];for(let o=0;o<r.length;o++)t[e.length+o]=r[o];return t})(l,r):r:l||n}return t[e]||n}}})(e)}))(r.reduce((e,r)=>r(e),e()))).cache.get,a=t.cache.set,i=d,d(c)),(...e)=>i(((...e)=>{let r,t,o=0,n="";for(;o<e.length;)(r=e[o++])&&(t=h(r))&&(n&&(n+=" "),n+=t);return n})(...e))})(()=>{let e=w("color"),r=w("font"),t=w("text"),o=w("font-weight"),n=w("tracking"),l=w("leading"),s=w("breakpoint"),a=w("container"),i=w("spacing"),d=w("radius"),c=w("shadow"),u=w("inset-shadow"),m=w("text-shadow"),p=w("drop-shadow"),f=w("blur"),b=w("perspective"),g=w("aspect"),h=w("ease"),v=w("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],x=()=>[...k(),Z,A],E=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],N=()=>[Z,A,i],C=()=>[j,"full","auto",...N()],O=()=>[S,"none","subgrid",Z,A],R=()=>["auto",{span:["full",S,Z,A]},S,Z,A],M=()=>[S,"auto",Z,A],$=()=>["auto","min","max","fr",Z,A],_=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],et=()=>["start","end","center","stretch","center-safe","end-safe"],eo=()=>["auto",...N()],en=()=>[j,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],el=()=>[j,"screen","full","dvw","lvw","svw","min","max","fit",...N()],es=()=>[j,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],ea=()=>[e,Z,A],ei=()=>[...k(),Y,V,{position:[Z,A]}],ed=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ec=()=>["auto","cover","contain",H,W,{size:[Z,A]}],eu=()=>[T,Q,G],em=()=>["","none","full",d,Z,A],ep=()=>["",P,Q,G],ef=()=>["solid","dashed","dotted","double"],eb=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eg=()=>[P,T,Y,V],eh=()=>["","none",f,Z,A],ev=()=>["none",P,Z,A],ew=()=>["none",P,Z,A],ey=()=>[P,Z,A],ek=()=>[j,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[D],breakpoint:[D],color:[L],container:[D],"drop-shadow":[D],ease:["in","out","in-out"],font:[I],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[D],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[D],shadow:[D],spacing:["px",P],text:[D],"text-shadow":[D],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",j,A,Z,g]}],container:["container"],columns:[{columns:[P,A,Z,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:x()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{"inset-s":C(),start:C()}],end:[{"inset-e":C(),end:C()}],"inset-bs":[{"inset-bs":C()}],"inset-be":[{"inset-be":C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[S,"auto",Z,A]}],basis:[{basis:[j,"full","auto",a,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[P,j,"auto","initial","none",A]}],grow:[{grow:["",P,Z,A]}],shrink:[{shrink:["",P,Z,A]}],order:[{order:[S,"first","last","none",Z,A]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[..._(),"normal"]}],"justify-items":[{"justify-items":[...et(),"normal"]}],"justify-self":[{"justify-self":["auto",...et()]}],"align-content":[{content:["normal",..._()]}],"align-items":[{items:[...et(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...et(),{baseline:["","last"]}]}],"place-content":[{"place-content":_()}],"place-items":[{"place-items":[...et(),"baseline"]}],"place-self":[{"place-self":["auto",...et()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:eo()}],mx:[{mx:eo()}],my:[{my:eo()}],ms:[{ms:eo()}],me:[{me:eo()}],mbs:[{mbs:eo()}],mbe:[{mbe:eo()}],mt:[{mt:eo()}],mr:[{mr:eo()}],mb:[{mb:eo()}],ml:[{ml:eo()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:en()}],"inline-size":[{inline:["auto",...el()]}],"min-inline-size":[{"min-inline":["auto",...el()]}],"max-inline-size":[{"max-inline":["none",...el()]}],"block-size":[{block:["auto",...es()]}],"min-block-size":[{"min-block":["auto",...es()]}],"max-block-size":[{"max-block":["none",...es()]}],w:[{w:[a,"screen",...en()]}],"min-w":[{"min-w":[a,"screen","none",...en()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...en()]}],h:[{h:["screen","lh",...en()]}],"min-h":[{"min-h":["screen","lh","none",...en()]}],"max-h":[{"max-h":["screen","lh",...en()]}],"font-size":[{text:["base",t,Q,G]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,er,F]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",T,A]}],"font-family":[{font:[X,B,r]}],"font-features":[{"font-features":[A]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,Z,A]}],"line-clamp":[{"line-clamp":[P,"none",Z,U]}],leading:[{leading:[l,...N()]}],"list-image":[{"list-image":["none",Z,A]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ea()}],"text-color":[{text:ea()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ef(),"wavy"]}],"text-decoration-thickness":[{decoration:[P,"from-font","auto",Z,G]}],"text-decoration-color":[{decoration:ea()}],"underline-offset":[{"underline-offset":[P,"auto",Z,A]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ei()}],"bg-repeat":[{bg:ed()}],"bg-size":[{bg:ec()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},S,Z,A],radial:["",Z,A],conic:[S,Z,A]},J,q]}],"bg-color":[{bg:ea()}],"gradient-from-pos":[{from:eu()}],"gradient-via-pos":[{via:eu()}],"gradient-to-pos":[{to:eu()}],"gradient-from":[{from:ea()}],"gradient-via":[{via:ea()}],"gradient-to":[{to:ea()}],rounded:[{rounded:em()}],"rounded-s":[{"rounded-s":em()}],"rounded-e":[{"rounded-e":em()}],"rounded-t":[{"rounded-t":em()}],"rounded-r":[{"rounded-r":em()}],"rounded-b":[{"rounded-b":em()}],"rounded-l":[{"rounded-l":em()}],"rounded-ss":[{"rounded-ss":em()}],"rounded-se":[{"rounded-se":em()}],"rounded-ee":[{"rounded-ee":em()}],"rounded-es":[{"rounded-es":em()}],"rounded-tl":[{"rounded-tl":em()}],"rounded-tr":[{"rounded-tr":em()}],"rounded-br":[{"rounded-br":em()}],"rounded-bl":[{"rounded-bl":em()}],"border-w":[{border:ep()}],"border-w-x":[{"border-x":ep()}],"border-w-y":[{"border-y":ep()}],"border-w-s":[{"border-s":ep()}],"border-w-e":[{"border-e":ep()}],"border-w-bs":[{"border-bs":ep()}],"border-w-be":[{"border-be":ep()}],"border-w-t":[{"border-t":ep()}],"border-w-r":[{"border-r":ep()}],"border-w-b":[{"border-b":ep()}],"border-w-l":[{"border-l":ep()}],"divide-x":[{"divide-x":ep()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ep()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ef(),"hidden","none"]}],"divide-style":[{divide:[...ef(),"hidden","none"]}],"border-color":[{border:ea()}],"border-color-x":[{"border-x":ea()}],"border-color-y":[{"border-y":ea()}],"border-color-s":[{"border-s":ea()}],"border-color-e":[{"border-e":ea()}],"border-color-bs":[{"border-bs":ea()}],"border-color-be":[{"border-be":ea()}],"border-color-t":[{"border-t":ea()}],"border-color-r":[{"border-r":ea()}],"border-color-b":[{"border-b":ea()}],"border-color-l":[{"border-l":ea()}],"divide-color":[{divide:ea()}],"outline-style":[{outline:[...ef(),"none","hidden"]}],"outline-offset":[{"outline-offset":[P,Z,A]}],"outline-w":[{outline:["",P,Q,G]}],"outline-color":[{outline:ea()}],shadow:[{shadow:["","none",c,ee,K]}],"shadow-color":[{shadow:ea()}],"inset-shadow":[{"inset-shadow":["none",u,ee,K]}],"inset-shadow-color":[{"inset-shadow":ea()}],"ring-w":[{ring:ep()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ea()}],"ring-offset-w":[{"ring-offset":[P,G]}],"ring-offset-color":[{"ring-offset":ea()}],"inset-ring-w":[{"inset-ring":ep()}],"inset-ring-color":[{"inset-ring":ea()}],"text-shadow":[{"text-shadow":["none",m,ee,K]}],"text-shadow-color":[{"text-shadow":ea()}],opacity:[{opacity:[P,Z,A]}],"mix-blend":[{"mix-blend":[...eb(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":eb()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[P]}],"mask-image-linear-from-pos":[{"mask-linear-from":eg()}],"mask-image-linear-to-pos":[{"mask-linear-to":eg()}],"mask-image-linear-from-color":[{"mask-linear-from":ea()}],"mask-image-linear-to-color":[{"mask-linear-to":ea()}],"mask-image-t-from-pos":[{"mask-t-from":eg()}],"mask-image-t-to-pos":[{"mask-t-to":eg()}],"mask-image-t-from-color":[{"mask-t-from":ea()}],"mask-image-t-to-color":[{"mask-t-to":ea()}],"mask-image-r-from-pos":[{"mask-r-from":eg()}],"mask-image-r-to-pos":[{"mask-r-to":eg()}],"mask-image-r-from-color":[{"mask-r-from":ea()}],"mask-image-r-to-color":[{"mask-r-to":ea()}],"mask-image-b-from-pos":[{"mask-b-from":eg()}],"mask-image-b-to-pos":[{"mask-b-to":eg()}],"mask-image-b-from-color":[{"mask-b-from":ea()}],"mask-image-b-to-color":[{"mask-b-to":ea()}],"mask-image-l-from-pos":[{"mask-l-from":eg()}],"mask-image-l-to-pos":[{"mask-l-to":eg()}],"mask-image-l-from-color":[{"mask-l-from":ea()}],"mask-image-l-to-color":[{"mask-l-to":ea()}],"mask-image-x-from-pos":[{"mask-x-from":eg()}],"mask-image-x-to-pos":[{"mask-x-to":eg()}],"mask-image-x-from-color":[{"mask-x-from":ea()}],"mask-image-x-to-color":[{"mask-x-to":ea()}],"mask-image-y-from-pos":[{"mask-y-from":eg()}],"mask-image-y-to-pos":[{"mask-y-to":eg()}],"mask-image-y-from-color":[{"mask-y-from":ea()}],"mask-image-y-to-color":[{"mask-y-to":ea()}],"mask-image-radial":[{"mask-radial":[Z,A]}],"mask-image-radial-from-pos":[{"mask-radial-from":eg()}],"mask-image-radial-to-pos":[{"mask-radial-to":eg()}],"mask-image-radial-from-color":[{"mask-radial-from":ea()}],"mask-image-radial-to-color":[{"mask-radial-to":ea()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[P]}],"mask-image-conic-from-pos":[{"mask-conic-from":eg()}],"mask-image-conic-to-pos":[{"mask-conic-to":eg()}],"mask-image-conic-from-color":[{"mask-conic-from":ea()}],"mask-image-conic-to-color":[{"mask-conic-to":ea()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ei()}],"mask-repeat":[{mask:ed()}],"mask-size":[{mask:ec()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,A]}],filter:[{filter:["","none",Z,A]}],blur:[{blur:eh()}],brightness:[{brightness:[P,Z,A]}],contrast:[{contrast:[P,Z,A]}],"drop-shadow":[{"drop-shadow":["","none",p,ee,K]}],"drop-shadow-color":[{"drop-shadow":ea()}],grayscale:[{grayscale:["",P,Z,A]}],"hue-rotate":[{"hue-rotate":[P,Z,A]}],invert:[{invert:["",P,Z,A]}],saturate:[{saturate:[P,Z,A]}],sepia:[{sepia:["",P,Z,A]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,A]}],"backdrop-blur":[{"backdrop-blur":eh()}],"backdrop-brightness":[{"backdrop-brightness":[P,Z,A]}],"backdrop-contrast":[{"backdrop-contrast":[P,Z,A]}],"backdrop-grayscale":[{"backdrop-grayscale":["",P,Z,A]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[P,Z,A]}],"backdrop-invert":[{"backdrop-invert":["",P,Z,A]}],"backdrop-opacity":[{"backdrop-opacity":[P,Z,A]}],"backdrop-saturate":[{"backdrop-saturate":[P,Z,A]}],"backdrop-sepia":[{"backdrop-sepia":["",P,Z,A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,A]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[P,"initial",Z,A]}],ease:[{ease:["linear","initial",h,Z,A]}],delay:[{delay:[P,Z,A]}],animate:[{animate:["none",v,Z,A]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Z,A]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ev()}],"rotate-x":[{"rotate-x":ev()}],"rotate-y":[{"rotate-y":ev()}],"rotate-z":[{"rotate-z":ev()}],scale:[{scale:ew()}],"scale-x":[{"scale-x":ew()}],"scale-y":[{"scale-y":ew()}],"scale-z":[{"scale-z":ew()}],"scale-3d":["scale-3d"],skew:[{skew:ey()}],"skew-x":[{"skew-x":ey()}],"skew-y":[{"skew-y":ey()}],transform:[{transform:[Z,A,"","none","gpu","cpu"]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ek()}],"translate-x":[{"translate-x":ek()}],"translate-y":[{"translate-y":ek()}],"translate-z":[{"translate-z":ek()}],"translate-none":["translate-none"],accent:[{accent:ea()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ea()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,A]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,A]}],fill:[{fill:["none",...ea()]}],"stroke-w":[{stroke:[P,Q,G,U]}],stroke:[{stroke:["none",...ea()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})},2806:(e,r,t)=>{t.d(r,{B:()=>i});var o,n=t(1406),l=t(5762),s=(o||(o=t.t(n,2)))[" useId ".trim().toString()]||(()=>void 0),a=0;function i(e){let[r,t]=n.useState(s());return(0,l.N)(()=>{e||t(e=>e??String(a++))},[e]),e||(r?`radix-${r}`:"")}},2870:(e,r,t)=>{t.d(r,{c:()=>n});var o=t(1406);function n(e){let r=o.useRef(e);return o.useEffect(()=>{r.current=e}),o.useMemo(()=>(...e)=>r.current?.(...e),[])}},3403:(e,r,t)=>{function o(e,r,{checkForDefaultPrevented:t=!0}={}){return function(o){if(e?.(o),!1===t||!o.defaultPrevented)return r?.(o)}}t.d(r,{mK:()=>o}),"undefined"!=typeof window&&window.document&&window.document.createElement},5230:(e,r,t)=>{t.d(r,{$:()=>o});function o(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=function e(r){var t,o,n="";if("string"==typeof r||"number"==typeof r)n+=r;else if("object"==typeof r)if(Array.isArray(r)){var l=r.length;for(t=0;t<l;t++)r[t]&&(o=e(r[t]))&&(n&&(n+=" "),n+=o)}else for(o in r)r[o]&&(n&&(n+=" "),n+=o);return n}(e))&&(o&&(o+=" "),o+=r);return o}},5692:(e,r,t)=>{t.d(r,{hO:()=>i,sG:()=>a});var o=t(1406),n=t(7995),l=t(6209),s=t(206),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{let t=(0,l.TL)(`Primitive.${r}`),n=o.forwardRef((e,o)=>{let{asChild:n,...l}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,s.jsx)(n?t:r,{...l,ref:o})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});function i(e,r){e&&n.flushSync(()=>e.dispatchEvent(r))}},5762:(e,r,t)=>{t.d(r,{N:()=>n});var o=t(1406),n=globalThis?.document?o.useLayoutEffect:()=>{}},6209:(e,r,t)=>{t.d(r,{Dc:()=>i,TL:()=>s});var o=t(1406),n=t(6967),l=t(206);function s(e){let r=function(e){let r=o.forwardRef((e,r)=>{let{children:t,...l}=e;if(o.isValidElement(t)){var s;let e,a,i=(s=t,(a=(e=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.ref:(a=(e=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?s.props.ref:s.props.ref||s.ref),d=function(e,r){let t={...r};for(let o in r){let n=e[o],l=r[o];/^on[A-Z]/.test(o)?n&&l?t[o]=(...e)=>{let r=l(...e);return n(...e),r}:n&&(t[o]=n):"style"===o?t[o]={...n,...l}:"className"===o&&(t[o]=[n,l].filter(Boolean).join(" "))}return{...e,...t}}(l,t.props);return t.type!==o.Fragment&&(d.ref=r?(0,n.t)(r,i):i),o.cloneElement(t,d)}return o.Children.count(t)>1?o.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}(e),t=o.forwardRef((e,t)=>{let{children:n,...s}=e,a=o.Children.toArray(n),i=a.find(d);if(i){let e=i.props.children,n=a.map(r=>r!==i?r:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,l.jsx)(r,{...s,ref:t,children:o.isValidElement(e)?o.cloneElement(e,void 0,n):null})}return(0,l.jsx)(r,{...s,ref:t,children:n})});return t.displayName=`${e}.Slot`,t}var a=Symbol("radix.slottable");function i(e){let r=({children:e})=>(0,l.jsx)(l.Fragment,{children:e});return r.displayName=`${e}.Slottable`,r.__radixId=a,r}function d(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===a}},6938:(e,r,t)=>{t.d(r,{C:()=>s});var o=t(1406),n=t(6967),l=t(5762),s=e=>{let{present:r,children:t}=e,s=function(e){var r,t;let[n,s]=o.useState(),i=o.useRef(null),d=o.useRef(e),c=o.useRef("none"),[u,m]=(r=e?"mounted":"unmounted",t={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},o.useReducer((e,r)=>{let o=t[e][r];return null!=o?o:e},r));return o.useEffect(()=>{let e=a(i.current);c.current="mounted"===u?e:"none"},[u]),(0,l.N)(()=>{let r=i.current,t=d.current;if(t!==e){let o=c.current,n=a(r);e?m("MOUNT"):"none"===n||(null==r?void 0:r.display)==="none"?m("UNMOUNT"):t&&o!==n?m("ANIMATION_OUT"):m("UNMOUNT"),d.current=e}},[e,m]),(0,l.N)(()=>{if(n){var e;let r,t=null!=(e=n.ownerDocument.defaultView)?e:window,o=e=>{let o=a(i.current).includes(CSS.escape(e.animationName));if(e.target===n&&o&&(m("ANIMATION_END"),!d.current)){let e=n.style.animationFillMode;n.style.animationFillMode="forwards",r=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=e)})}},l=e=>{e.target===n&&(c.current=a(i.current))};return n.addEventListener("animationstart",l),n.addEventListener("animationcancel",o),n.addEventListener("animationend",o),()=>{t.clearTimeout(r),n.removeEventListener("animationstart",l),n.removeEventListener("animationcancel",o),n.removeEventListener("animationend",o)}}m("ANIMATION_END")},[n,m]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:o.useCallback(e=>{i.current=e?getComputedStyle(e):null,s(e)},[])}}(r),i="function"==typeof t?t({present:s.isPresent}):o.Children.only(t),d=(0,n.s)(s.ref,function(e){var r,t;let o=null==(r=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:r.get,n=o&&"isReactWarning"in o&&o.isReactWarning;return n?e.ref:(n=(o=null==(t=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:t.get)&&"isReactWarning"in o&&o.isReactWarning)?e.props.ref:e.props.ref||e.ref}(i));return"function"==typeof t||s.isPresent?o.cloneElement(i,{ref:d}):null};function a(e){return(null==e?void 0:e.animationName)||"none"}s.displayName="Presence"},6967:(e,r,t)=>{t.d(r,{s:()=>s,t:()=>l});var o=t(1406);function n(e,r){if("function"==typeof e)return e(r);null!=e&&(e.current=r)}function l(...e){return r=>{let t=!1,o=e.map(e=>{let o=n(e,r);return t||"function"!=typeof o||(t=!0),o});if(t)return()=>{for(let r=0;r<o.length;r++){let t=o[r];"function"==typeof t?t():n(e[r],null)}}}}function s(...e){return o.useCallback(l(...e),e)}},7576:(e,r,t)=>{t.d(r,{A:()=>s,q:()=>l});var o=t(1406),n=t(206);function l(e,r){let t=o.createContext(r),l=e=>{let{children:r,...l}=e,s=o.useMemo(()=>l,Object.values(l));return(0,n.jsx)(t.Provider,{value:s,children:r})};return l.displayName=e+"Provider",[l,function(n){let l=o.useContext(t);if(l)return l;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${e}\``)}]}function s(e,r=[]){let t=[],l=()=>{let r=t.map(e=>o.createContext(e));return function(t){let n=t?.[e]||r;return o.useMemo(()=>({[`__scope${e}`]:{...t,[e]:n}}),[t,n])}};return l.scopeName=e,[function(r,l){let s=o.createContext(l),a=t.length;t=[...t,l];let i=r=>{let{scope:t,children:l,...i}=r,d=t?.[e]?.[a]||s,c=o.useMemo(()=>i,Object.values(i));return(0,n.jsx)(d.Provider,{value:c,children:l})};return i.displayName=r+"Provider",[i,function(t,n){let i=n?.[e]?.[a]||s,d=o.useContext(i);if(d)return d;if(void 0!==l)return l;throw Error(`\`${t}\` must be used within \`${r}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let t=()=>{let t=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let n=t.reduce((r,{useScope:t,scopeName:o})=>{let n=t(e)[`__scope${o}`];return{...r,...n}},{});return o.useMemo(()=>({[`__scope${r.scopeName}`]:n}),[n])}};return t.scopeName=r.scopeName,t}(l,...r)]}},7902:(e,r,t)=>{t.d(r,{qW:()=>m});var o,n=t(1406),l=t(3403),s=t(5692),a=t(6967),i=t(2870),d=t(206),c="dismissableLayer.update",u=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=n.forwardRef((e,r)=>{var t,m;let{disableOutsidePointerEvents:b=!1,onEscapeKeyDown:g,onPointerDownOutside:h,onFocusOutside:v,onInteractOutside:w,onDismiss:y,...k}=e,x=n.useContext(u),[E,z]=n.useState(null),N=null!=(m=null==E?void 0:E.ownerDocument)?m:null==(t=globalThis)?void 0:t.document,[,C]=n.useState({}),O=(0,a.s)(r,e=>z(e)),j=Array.from(x.layers),[P]=[...x.layersWithOutsidePointerEventsDisabled].slice(-1),S=j.indexOf(P),T=E?j.indexOf(E):-1,D=x.layersWithOutsidePointerEventsDisabled.size>0,L=T>=S,R=function(e){var r;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(r=globalThis)?void 0:r.document,o=(0,i.c)(e),l=n.useRef(!1),s=n.useRef(()=>{});return n.useEffect(()=>{let e=e=>{if(e.target&&!l.current){let r=function(){f("dismissableLayer.pointerDownOutside",o,n,{discrete:!0})},n={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",s.current),s.current=r,t.addEventListener("click",s.current,{once:!0})):r()}else t.removeEventListener("click",s.current);l.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",s.current)}},[t,o]),{onPointerDownCapture:()=>l.current=!0}}(e=>{let r=e.target,t=[...x.branches].some(e=>e.contains(r));L&&!t&&(null==h||h(e),null==w||w(e),e.defaultPrevented||null==y||y())},N),M=function(e){var r;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(r=globalThis)?void 0:r.document,o=(0,i.c)(e),l=n.useRef(!1);return n.useEffect(()=>{let e=e=>{e.target&&!l.current&&f("dismissableLayer.focusOutside",o,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,o]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}(e=>{let r=e.target;![...x.branches].some(e=>e.contains(r))&&(null==v||v(e),null==w||w(e),e.defaultPrevented||null==y||y())},N);return!function(e,r=globalThis?.document){let t=(0,i.c)(e);n.useEffect(()=>{let e=e=>{"Escape"===e.key&&t(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})},[t,r])}(e=>{T===x.layers.size-1&&(null==g||g(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},N),n.useEffect(()=>{if(E)return b&&(0===x.layersWithOutsidePointerEventsDisabled.size&&(o=N.body.style.pointerEvents,N.body.style.pointerEvents="none"),x.layersWithOutsidePointerEventsDisabled.add(E)),x.layers.add(E),p(),()=>{b&&1===x.layersWithOutsidePointerEventsDisabled.size&&(N.body.style.pointerEvents=o)}},[E,N,b,x]),n.useEffect(()=>()=>{E&&(x.layers.delete(E),x.layersWithOutsidePointerEventsDisabled.delete(E),p())},[E,x]),n.useEffect(()=>{let e=()=>C({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,d.jsx)(s.sG.div,{...k,ref:O,style:{pointerEvents:D?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,l.mK)(e.onFocusCapture,M.onFocusCapture),onBlurCapture:(0,l.mK)(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:(0,l.mK)(e.onPointerDownCapture,R.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function f(e,r,t,o){let{discrete:n}=o,l=t.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});r&&l.addEventListener(e,r,{once:!0}),n?(0,s.hO)(l,a):l.dispatchEvent(a)}m.displayName="DismissableLayer",n.forwardRef((e,r)=>{let t=n.useContext(u),o=n.useRef(null),l=(0,a.s)(r,o);return n.useEffect(()=>{let e=o.current;if(e)return t.branches.add(e),()=>{t.branches.delete(e)}},[t.branches]),(0,d.jsx)(s.sG.div,{...e,ref:l})}).displayName="DismissableLayerBranch"},8782:(e,r,t)=>{t.d(r,{i:()=>a});var o,n=t(1406),l=t(5762),s=(o||(o=t.t(n,2)))[" useInsertionEffect ".trim().toString()]||l.N;function a({prop:e,defaultProp:r,onChange:t=()=>{},caller:o}){let[l,a,i]=function({defaultProp:e,onChange:r}){let[t,o]=n.useState(e),l=n.useRef(t),a=n.useRef(r);return s(()=>{a.current=r},[r]),n.useEffect(()=>{l.current!==t&&(a.current?.(t),l.current=t)},[t,l]),[t,o,a]}({defaultProp:r,onChange:t}),d=void 0!==e,c=d?e:l;{let r=n.useRef(void 0!==e);n.useEffect(()=>{let e=r.current;if(e!==d){let r=d?"controlled":"uncontrolled";console.warn(`${o} is changing from ${e?"controlled":"uncontrolled"} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=d},[d,o])}return[c,n.useCallback(r=>{if(d){let t="function"==typeof r?r(e):r;t!==e&&i.current?.(t)}else a(r)},[d,e,a,i])]}Symbol("RADIX:SYNC_STATE")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29],{6029:(e,t,n)=>{n.r(t),n.d(t,{default:()=>x});var l=n(206),s=n(1406),r=n(9385),a=n(5192),o=n(138),i=n(786),d=n(1310),c=n(370),u=n(9362);function m(e){let{label:t,hint:n,children:s}=e;return(0,l.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,l.jsxs)("label",{className:"text-term text-muted-foreground shrink-0 w-[100px] text-right",children:[t,n&&(0,l.jsx)("span",{className:"block text-[10px] opacity-50 mt-0.5",children:n})]}),(0,l.jsx)("div",{className:"flex-1 min-w-0",children:s})]})}function x(e){let{isOpen:t,onClose:n,soundEnabled:x,onSoundEnabledChange:p}=e,[g,f]=(0,s.useState)(!1),[h,b]=(0,s.useState)(null),[j,N]=(0,s.useState)(""),[v,S]=(0,s.useState)(""),[k,y]=(0,s.useState)(!1),[w,C]=(0,s.useState)(null),[A,T]=(0,s.useState)(!1),[E,D]=(0,s.useState)(!1),[F,I]=(0,s.useState)(!0),[U,_]=(0,s.useState)(!0),[R,G]=(0,s.useState)(""),[B,O]=(0,s.useState)(""),[z,V]=(0,s.useState)(!1),[W,K]=(0,s.useState)(!1),[Z,H]=(0,s.useState)(null),[J,M]=(0,s.useState)(!1),P=(0,o.hK)(e=>e.agencyAgentsResult),L=(0,o.hK)(e=>e.configData),Y=(0,o.hK)(e=>e.configResult);(0,s.useEffect)(()=>{t&&(0,a.S8)({type:"GET_CONFIG"})},[t]),(0,s.useEffect)(()=>{if(L){var e,t,n,l,s,r,a,o,i;N(null!=(t=L.telegramBotToken)?t:""),S(null!=(n=null==(e=L.telegramAllowedUsers)?void 0:e.join(", "))?n:""),T(null!=(l=L.telegramConnected)&&l),I(null==(s=L.worktreeEnabled)||s),_(null==(r=L.autoMergeEnabled)||r),G(null!=(a=L.tunnelToken)?a:""),O(null!=(o=L.tunnelBaseUrl)?o:""),V(null!=(i=L.tunnelRunning)&&i)}},[L]),(0,s.useEffect)(()=>{if(Y&&k){y(!1),C(Y.message),void 0!==Y.telegramConnected&&T(Y.telegramConnected);let e=setTimeout(()=>C(null),5e3);return()=>clearTimeout(e)}if(Y&&W){K(!1),void 0!==Y.tunnelRunning&&V(Y.tunnelRunning),H(Y.tunnelRunning?"Tunnel started":"Tunnel not running");let e=setTimeout(()=>H(null),5e3);return()=>clearTimeout(e)}},[Y]),(0,s.useEffect)(()=>{if(P&&g){f(!1),b(P.success?"Updated".concat(P.count?" (".concat(P.count," agents)"):""):"Failed: ".concat(P.message));let e=setTimeout(()=>b(null),5e3);return()=>clearTimeout(e)}},[P]);let $=e=>(0,r.cn)("w-3.5 h-3.5 border-2 border-muted-foreground rounded-sm shrink-0","flex items-center justify-center text-[11px] leading-none",e?"bg-accent text-background":"bg-transparent"),q="flex items-center justify-between w-full px-3 py-2 text-term text-foreground bg-transparent border-none cursor-pointer text-left font-mono transition-colors duration-fast hover:bg-white/5";return(0,l.jsxs)(d.A,{open:t,onClose:n,maxWidth:520,zIndex:100,title:"Settings",children:[(0,l.jsxs)("div",{className:"border-b border-term-border-dim pb-3 mb-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 mb-3",children:[(0,l.jsx)("span",{className:(0,r.cn)("inline-block w-2 h-2 rounded-full shrink-0",A?"bg-sem-green":"bg-muted-foreground")}),(0,l.jsxs)("span",{className:"text-[13px] text-foreground font-medium",children:["Telegram ",A?"(connected)":"(disconnected)"]})]}),(0,l.jsx)(m,{label:"Bot Token",children:(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsx)(u.A,{type:E?"text":"password",value:j,onChange:e=>N(e.target.value),placeholder:"123456:ABC-DEF...",className:"flex-1",onFocus:()=>{j.includes("...")&&N("")}}),(0,l.jsx)(c.A,{variant:"dim",size:"sm",onClick:()=>D(!E),title:E?"Hide":"Show",children:E?"\uD83D\uDE48":"\uD83D\uDC41"})]})}),(0,l.jsx)(m,{label:"Allowed IDs",hint:"comma-sep, empty=all",children:(0,l.jsx)(u.A,{type:"text",value:v,onChange:e=>S(e.target.value),placeholder:"123456789, 987654321"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-[112px]",children:[(0,l.jsx)(c.A,{variant:"primary",onClick:()=>{y(!0),C(null);let e=v.split(",").map(e=>e.trim()).filter(Boolean);(0,a.S8)({type:"SAVE_CONFIG",telegramBotToken:j.includes("...")?void 0:j,telegramAllowedUsers:e})},disabled:k,children:k?"Saving...":"Save & Connect"}),w&&(0,l.jsx)("span",{className:(0,r.cn)("text-term",w.includes("Failed")||w.includes("not")?"text-sem-red":"text-sem-green"),children:w})]})]}),(0,l.jsxs)("div",{className:"border-b border-term-border-dim pb-3 mb-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5 mb-3",children:[(0,l.jsx)("span",{className:(0,r.cn)("inline-block w-2 h-2 rounded-full shrink-0",z?"bg-sem-green":"bg-muted-foreground")}),(0,l.jsxs)("span",{className:"text-[13px] text-foreground font-medium",children:["Tunnel ",z?"(running)":"(stopped)"]})]}),(0,l.jsx)(m,{label:"Token",children:(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsx)(u.A,{type:J?"text":"password",value:R,onChange:e=>G(e.target.value),placeholder:"eyJ...",className:"flex-1",onFocus:()=>{R.includes("...")&&G("")}}),(0,l.jsx)(c.A,{variant:"dim",size:"sm",onClick:()=>M(!J),title:J?"Hide":"Show",children:J?"\uD83D\uDE48":"\uD83D\uDC41"})]})}),(0,l.jsx)(m,{label:"Public URL",children:(0,l.jsx)(u.A,{type:"text",value:B,onChange:e=>O(e.target.value),placeholder:"https://office.example.com"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-[112px]",children:[(0,l.jsx)(c.A,{variant:"primary",onClick:()=>{K(!0),H(null),(0,a.S8)({type:"SAVE_CONFIG",tunnelToken:R.includes("...")?void 0:R,tunnelBaseUrl:B})},disabled:W,children:W?"Saving...":"Save & Start"}),Z&&(0,l.jsx)("span",{className:(0,r.cn)("text-term",Z.includes("not")||Z.includes("Failed")?"text-sem-red":"text-sem-green"),children:Z})]})]}),(0,l.jsxs)("div",{className:"mb-1",children:[(0,l.jsxs)("button",{onClick:()=>{let e=!F;I(e),(0,a.S8)({type:"SAVE_CONFIG",worktreeEnabled:e})},className:q,title:"Each agent works in its own git worktree branch, merged on completion",children:[(0,l.jsx)("span",{children:"Agent Isolation"}),(0,l.jsx)("span",{className:$(F),children:F?"✓":""})]}),(0,l.jsxs)("button",{onClick:()=>{let e=!U;_(e),(0,a.S8)({type:"SAVE_CONFIG",autoMergeEnabled:e})},className:q,title:"Auto-merge agent changes to main on task completion. Turn off to review before merging.",children:[(0,l.jsx)("span",{children:"Auto-merge"}),(0,l.jsx)("span",{className:$(U),children:U?"✓":""})]}),(0,l.jsxs)("button",{onClick:()=>{let e=!x;p(e),localStorage.setItem("office-sound-enabled",JSON.stringify(e))},className:q,children:[(0,l.jsx)("span",{children:"Sound Notifications"}),(0,l.jsx)("span",{className:$(x),children:x?"✓":""})]})]}),(0,l.jsx)("div",{className:"border-t border-term-border-dim pt-2",children:(0,l.jsxs)("button",{onClick:()=>{f(!0),b(null),(0,a.S8)({type:"UPDATE_AGENCY_AGENTS"})},disabled:g,className:(0,r.cn)(q,g&&"opacity-50"),children:[(0,l.jsx)("span",{children:g?"Updating Agents...":null!=h?h:"Update Agency Agents"}),h&&(0,l.jsx)("span",{className:(0,r.cn)("text-[11px]",h.startsWith("Failed")?"text-sem-red":"text-sem-green"),children:h.startsWith("Failed")?"✗":"✓"})]})}),(0,l.jsxs)("div",{className:"border-t border-term-border-dim mt-1 pt-2 text-[11px] text-muted-foreground font-mono leading-snug select-text",title:"From monorepo root package.json at build time",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"opacity-75",children:"Web UI"})," ",(0,l.jsxs)("span",{className:"text-foreground",children:["v",i.h]})]}),i.Z?(0,l.jsxs)("div",{className:"mt-0.5 text-[10px] opacity-90",children:["build ",i.Z.replace("T"," ").replace(/\.\d{3}Z$/," UTC")]}):null]})]})}},9362:(e,t,n)=>{n.d(t,{A:()=>o});var l=n(206),s=n(1406),r=n(9385);let a=s.forwardRef((e,t)=>{let{className:n,type:s,...a}=e;return(0,l.jsx)("input",{type:s,className:(0,r.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",s.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,l.jsx)("textarea",{className:(0,r.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,...s})}).displayName="Textarea";let o=(0,s.forwardRef)(function(e,t){let{inline:n,className:s,...o}=e;return(0,l.jsx)(a,{ref:t,className:(0,r.cn)(n&&"border-none bg-transparent text-term-text-bright caret-accent px-1.5 py-1.5 focus:border-none focus:shadow-none",s),...o})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[290],{8163:(e,t,r)=>{r.d(t,{TooltipProvider:()=>n,ZI:()=>c,k$:()=>a,m_:()=>d});var o=r(206),s=r(1406),i=r(3767),l=r(9385);let n=i.Kq,d=i.bL,a=i.l9,c=s.forwardRef((e,t)=>{let{className:r,sideOffset:s=4,...n}=e;return(0,o.jsx)(i.ZL,{children:(0,o.jsx)(i.UC,{ref:t,sideOffset:s,className:(0,l.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",r),...n})})});c.displayName=i.UC.displayName},9290:(e,t,r)=>{r.r(t),r.d(t,{default:()=>d});var o=r(206),s=r(1406),i=r(2243),l=r(8163),n=r(9385);function d(e){let{zoom:t,onZoomChange:r}=e,[d,a]=(0,s.useState)(!1),[c,u]=(0,s.useState)(!1),h=(0,s.useRef)(null),x=(0,s.useRef)(null),f=(0,s.useRef)(t),b=t<=i.DH,m=t>=i.ZV;(0,s.useEffect)(()=>{if(t!==f.current)return f.current=t,h.current&&clearTimeout(h.current),x.current&&clearTimeout(x.current),a(!0),u(!1),x.current=setTimeout(()=>{u(!0)},1200),h.current=setTimeout(()=>{a(!1),u(!1)},1800),()=>{h.current&&clearTimeout(h.current),x.current&&clearTimeout(x.current)}},[t]);let p=(0,n.cn)("w-9 h-9 p-0 flex items-center justify-center","bg-[rgba(20,20,25,0.85)] backdrop-blur-xl","text-white/80 border border-white/10 rounded-lg","cursor-pointer shadow-lg","transition-colors duration-fast","hover:bg-white/[0.12]","disabled:opacity-40 disabled:cursor-default disabled:hover:bg-[rgba(20,20,25,0.85)]");return(0,o.jsxs)(o.Fragment,{children:[d&&(0,o.jsxs)("div",{className:(0,n.cn)("absolute top-2.5 left-1/2 -translate-x-1/2 z-50","bg-[rgba(20,20,25,0.85)] backdrop-blur-xl","border border-white/10 rounded-lg","px-3 py-1 shadow-lg","text-[15px] text-white/80","select-none pointer-events-none","transition-opacity duration-500 ease-out"),style:{opacity:+!c},children:[t,"x"]}),(0,o.jsxs)("div",{className:"absolute top-2 left-2 z-50 flex flex-col gap-1",children:[(0,o.jsxs)(l.m_,{children:[(0,o.jsx)(l.k$,{asChild:!0,children:(0,o.jsx)("button",{className:p,onClick:()=>r(t+1),disabled:m,children:(0,o.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[(0,o.jsx)("line",{x1:"9",y1:"3",x2:"9",y2:"15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,o.jsx)("line",{x1:"3",y1:"9",x2:"15",y2:"9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),(0,o.jsx)(l.ZI,{side:"right",children:"Zoom in (Ctrl+Scroll)"})]}),(0,o.jsxs)(l.m_,{children:[(0,o.jsx)(l.k$,{asChild:!0,children:(0,o.jsx)("button",{className:p,onClick:()=>r(t-1),disabled:b,children:(0,o.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:(0,o.jsx)("line",{x1:"3",y1:"9",x2:"15",y2:"9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})})}),(0,o.jsx)(l.ZI,{side:"right",children:"Zoom out (Ctrl+Scroll)"})]})]})]})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293],{5293:(e,t,i)=>{var s,r,n,a,o;function c(e,t,i,s){if("a"===i&&!s)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!s:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?s:"a"===i?s.call(e):s?s.value:t.get(e)}function h(e,t,i,s,r){if("m"===s)throw TypeError("Private method is not writable");if("a"===s&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?r.call(e,i):r?r.value=i:t.set(e,i),i}i.r(t),i.d(t,{Channel:()=>f,PluginListener:()=>_,Resource:()=>k,SERIALIZE_TO_IPC_FN:()=>l,addPluginListener:()=>d,checkPermissions:()=>p,convertFileSrc:()=>v,invoke:()=>g,isTauri:()=>T,requestPermissions:()=>w,transformCallback:()=>u}),"function"==typeof SuppressedError&&SuppressedError;let l="__TAURI_TO_IPC_KEY__";function u(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class f{constructor(e){s.set(this,void 0),r.set(this,0),n.set(this,[]),a.set(this,void 0),h(this,s,e||(()=>{}),"f"),this.id=u(e=>{let t=e.index;if("end"in e)return void(t==c(this,r,"f")?this.cleanupCallback():h(this,a,t,"f"));let i=e.message;if(t==c(this,r,"f")){for(c(this,s,"f").call(this,i),h(this,r,c(this,r,"f")+1,"f");c(this,r,"f")in c(this,n,"f");){let e=c(this,n,"f")[c(this,r,"f")];c(this,s,"f").call(this,e),delete c(this,n,"f")[c(this,r,"f")],h(this,r,c(this,r,"f")+1,"f")}c(this,r,"f")===c(this,a,"f")&&this.cleanupCallback()}else c(this,n,"f")[t]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){h(this,s,e,"f")}get onmessage(){return c(this,s,"f")}[(s=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class _{constructor(e,t,i){this.plugin=e,this.event=t,this.channelId=i}async unregister(){return g(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function d(e,t,i){let s=new f(i);try{return await g(`plugin:${e}|register_listener`,{event:t,handler:s}),new _(e,t,s.id)}catch{return await g(`plugin:${e}|registerListener`,{event:t,handler:s}),new _(e,t,s.id)}}async function p(e){return g(`plugin:${e}|check_permissions`)}async function w(e){return g(`plugin:${e}|request_permissions`)}async function g(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function v(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class k{get rid(){return c(this,o,"f")}constructor(e){o.set(this,void 0),h(this,o,e,"f")}async close(){return g("plugin:resources|close",{rid:this.rid})}}function T(){return!!(globalThis||window).isTauri}o=new WeakMap}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73,297],{73:(e,t,l)=>{l.r(t),l.d(t,{default:()=>a});var r=l(206),o=l(1406),n=l(2988);let a=function(e){let{palette:t,zoom:l=3,ready:a}=e,i=(0,o.useRef)(null);return(0,o.useEffect)(()=>{var e,r;let o=i.current;if(!o)return;let a=(0,n.Cr)(t);if(!a)return;let s=a.length,d=null!=(r=null==(e=a[0])?void 0:e.length)?r:0;o.width=d*l,o.height=s*l;let c=o.getContext("2d");if(c){c.clearRect(0,0,o.width,o.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"}})}},3297:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var r=l(206),o=l(1406),n=l(4932),a=l(5091);let i=function(e){let{messages:t,agents:l,assetsReady:i,onClear:s}=e,[d,c]=(0,o.useState)(!0),p=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(d)return;let e=p.current;if(!e)return;let t=e.parentElement;t&&(t.scrollTop=t.scrollHeight)},[t.length,d]),(0,r.jsxs)("div",{style:{borderTop:"1px solid #152515",padding:"6px 0"},children:[(0,r.jsxs)("div",{onClick:()=>c(!d),style:{padding:"4px 12px 6px",fontSize:10,color:"#6a5848",fontFamily:"monospace",letterSpacing:"0.05em",textTransform:"uppercase",cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[(0,r.jsx)("span",{style:{width:10,textAlign:"center"},children:d?"▶":"▼"}),"Activity (",t.length,")",s&&(0,r.jsx)("span",{onClick:e=>{e.stopPropagation(),s()},style:{marginLeft:"auto",fontSize:9,padding:"1px 5px",color:n.Y0,border:"1px solid ".concat(n.JH,"80"),cursor:"pointer"},onMouseEnter:e=>{e.currentTarget.style.color=n.v_,e.currentTarget.style.borderColor="".concat(n.v_,"80")},onMouseLeave:e=>{e.currentTarget.style.color=n.Y0,e.currentTarget.style.borderColor="".concat(n.JH,"80")},children:"CLEAR"})]}),!d&&(0,r.jsxs)("div",{"data-scrollbar":!0,style:{overflowY:"auto",maxHeight:"30vh",padding:"0 8px",display:"flex",flexDirection:"column",gap:4},children:[t.map((e,t)=>{var o;return e&&e.fromAgentId?(0,r.jsx)(a.Ay,{msg:e,agents:l,assetsReady:i,expandable:!0},null!=(o=e.id)?o:"tc-".concat(t)):null}),(0,r.jsx)("div",{ref:p})]})]})}},5091:(e,t,l)=>{l.d(t,{Ay:()=>s});var r=l(206),o=l(73),n=l(6740),a=l(4932);let i={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"}},s=function(e){var t,l,a;let{msg:s,agents:d,assetsReady:c,maxChars:p=150,shadow:g,expandable:u=!1}=e,f=null!=(t=i[s.messageType])?t:i.status,x=d.get(s.fromAgentId),h=s.toAgentId?d.get(s.toAgentId):void 0,m=null!=(l=s.message)?l:"";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"),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==x?void 0:x.palette)!==void 0&&(0,r.jsx)(o.default,{palette:x.palette,zoom:1,ready:c}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:null!=(a=s.fromAgentName)?a:s.fromAgentId}),s.toAgentName&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{fontSize:11,color:"#6a5848"},children:"→"}),(null==h?void 0:h.palette)!==void 0&&(0,r.jsx)(o.default,{palette:h.palette,zoom:1,ready:c}),(0,r.jsx)("span",{style:{fontSize:12,fontWeight:700,color:"#eddcb8"},children:s.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})]}),u?(0,r.jsx)(n.A,{text:m,maxChars:p,maxHeight:80}):(0,r.jsxs)("div",{style:{fontSize:12,color:"#b09878",wordBreak:"break-word",maxHeight:80,overflow:"hidden",fontFamily:"monospace"},children:[m.slice(0,p),m.length>p?"...":""]})]})}},6740:(e,t,l)=>{l.d(t,{A:()=>n});var r=l(206),o=l(1406);let n=function(e){let{text:t,maxChars:l=300,maxHeight:n=120}=e,[a,i]=(0,o.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":n,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([[336],{336:(e,t,n)=>{n.r(t),n.d(t,{default:()=>u});var a=n(206),r=n(1406),s=n(138),o=n(5192),l=n(9385),c=n(1310),i=n(370);function d(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"k":String(e)}function m(e){return!!e&&!!(e.entryFile||e.previewCmd)}function p(e){let{events:t,name:n,preview:r,onBack:s,onPreview:o}=e,c=[];for(let e of t){var d,p,u,x;switch(e.type){case"TEAM_CHAT":c.push({id:"tc-".concat(e.timestamp,"-").concat(e.fromAgentId),agent:e.fromAgentId,text:e.message,timestamp:e.timestamp,type:e.messageType});break;case"TASK_DONE":(null==(d=e.result)?void 0:d.summary)&&c.push({id:"done-".concat(e.taskId),agent:e.agentId,text:e.result.summary,timestamp:null!=(p=e.timestamp)?p:0,type:"result"});break;case"TASK_DELEGATED":c.push({id:"del-".concat(e.taskId),agent:e.fromAgentId,text:"Delegated to ".concat(e.toAgentId,": ").concat(e.prompt.slice(0,200)),timestamp:null!=(u=e.timestamp)?u:0,type:"delegation"});break;case"TEAM_PHASE":c.push({id:"phase-".concat(e.teamId,"-").concat(e.phase),agent:e.leadAgentId,text:"Phase: ".concat(e.phase),timestamp:null!=(x=e.timestamp)?x:0,type:"phase"})}}let g={delegation:{twBorder:"border-l-sem-blue/20",twBg:"bg-sem-blue/[0.04]",label:"DELEGATE",twLabel:"text-sem-blue"},result:{twBorder:"border-l-sem-green/20",twBg:"bg-sem-green/[0.04]",label:"DONE",twLabel:"text-sem-green"},phase:{twBorder:"border-l-sem-yellow/20",twBg:"bg-sem-yellow/[0.04]",label:"PHASE",twLabel:"text-sem-yellow"},status:{twBorder:"border-l-border",twBg:"bg-muted/20",label:"STATUS",twLabel:"text-muted-foreground"}};return(0,a.jsxs)("div",{className:"flex flex-col h-full -m-4",children:[(0,a.jsxs)("div",{className:"px-4 py-3 border-b border-border flex items-center gap-2.5 shrink-0",children:[(0,a.jsx)(i.A,{variant:"dim",size:"sm",onClick:s,children:"Back"}),(0,a.jsx)("span",{className:"text-accent font-mono text-term font-semibold tracking-wide flex-1 truncate",children:n}),m(r)&&o&&(0,a.jsx)(i.A,{variant:"success",size:"sm",onClick:()=>o(r),children:"Preview"})]}),(0,a.jsxs)("div",{className:"flex-1 overflow-auto px-3 py-2",children:[0===c.length&&(0,a.jsx)("div",{className:"text-muted-foreground font-mono text-term text-center py-10",children:"No messages in this project"}),c.map(e=>{var t;let n=null!=(t=g[e.type])?t:g.status;return(0,a.jsxs)("div",{className:(0,l.cn)("mb-1.5 px-2.5 py-2 border-l-2",n.twBorder,n.twBg),children:[(0,a.jsxs)("div",{className:"flex gap-2 items-center mb-0.5",children:[(0,a.jsx)("span",{className:(0,l.cn)("text-[9px] font-bold tracking-widest font-mono uppercase",n.twLabel),children:n.label}),(0,a.jsx)("span",{className:"text-foreground text-[11px] font-semibold font-mono",children:e.agent.replace(/^agent-/,"").split("-")[0]})]}),(0,a.jsx)("div",{className:"text-foreground text-term leading-normal font-mono whitespace-pre-wrap break-words",children:e.text.slice(0,800)})]},e.id)})]})]})}function u(e){let{isOpen:t,onClose:n,onPreview:u}=e,{projectList:x,viewingProjectId:g,viewingProjectEvents:h,viewingProjectName:f,clearViewingProject:b}=(0,s.hK)(),[w,v]=(0,r.useState)(!1),j=g?x.find(e=>e.id===g):null;if((0,r.useEffect)(()=>{t&&!w&&((0,o.S8)({type:"LIST_PROJECTS"}),v(!0)),t||(v(!1),b())},[t]),!t)return null;let k=(e,t)=>{let a=e=>(null==e?void 0:e.replace(/\*\*/g,"").replace(/`/g,"").replace(/^_+|_+$/g,"").trim())||void 0,r=a(e.previewCmd),s=a(e.entryFile),l=e.projectDir;r&&e.previewPort?(0,o.S8)({type:"SERVE_PREVIEW",previewCmd:r,previewPort:e.previewPort,cwd:l}):r?(0,o.S8)({type:"SERVE_PREVIEW",previewCmd:r,cwd:l}):s&&l&&(0,o.S8)({type:"SERVE_PREVIEW",filePath:l+"/"+s}),null==u||u(e,t),n()};return(0,a.jsx)(c.A,{open:t,onClose:n,maxWidth:600,title:"Project History",className:"h-[70vh]",children:g&&h.length>0?(0,a.jsx)(p,{events:h,name:null!=f?f:"Project",preview:null==j?void 0:j.preview,onBack:b,onPreview:e=>k(e,null==j?void 0:j.ratings)}):(0,a.jsx)("div",{children:0===x.length?(0,a.jsxs)("div",{className:"text-muted-foreground font-mono text-term text-center py-10 leading-relaxed",children:["No archived projects yet.",(0,a.jsx)("br",{}),"Projects are saved when you click End Project."]}):x.map((e,t)=>(0,a.jsx)("div",{className:(0,l.cn)("px-4 py-3 cursor-pointer transition-colors hover:bg-accent/[0.04]",t<x.length-1&&"border-b border-term-border-dim"),children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsxs)("button",{onClick:()=>(0,o.S8)({type:"LOAD_PROJECT",projectId:e.id}),className:"flex-1 text-left bg-transparent border-none cursor-pointer p-0",children:[(0,a.jsx)("div",{className:"text-term-text-bright text-term font-semibold font-mono mb-1",children:e.name}),(0,a.jsxs)("div",{className:"flex gap-3 items-center flex-wrap",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground",children:function(e){let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"Just now";if(t<60)return"".concat(t,"m ago");let n=Math.floor(t/60);if(n<24)return"".concat(n,"h ago");let a=Math.floor(n/24);if(a<7)return"".concat(a,"d ago");let r=new Date(e),s=e=>String(e).padStart(2,"0");return"".concat(r.getFullYear(),"-").concat(s(r.getMonth()+1),"-").concat(s(r.getDate())," ").concat(s(r.getHours()),":").concat(s(r.getMinutes()))}(e.endedAt)}),(0,a.jsx)("span",{className:"text-[10px] font-mono text-accent opacity-60",children:function(e,t){let n=Math.floor((t-e)/6e4);if(n<1)return"<1m";if(n<60)return"".concat(n,"m");let a=Math.floor(n/60);return"".concat(a,"h ").concat(n%60,"m")}(e.startedAt,e.endedAt)}),(0,a.jsxs)("span",{className:"text-[10px] font-mono text-sem-blue/50",children:[e.agentNames.length," agent",1!==e.agentNames.length?"s":""]}),e.tokenUsage&&(e.tokenUsage.inputTokens>0||e.tokenUsage.outputTokens>0)&&(0,a.jsxs)("span",{className:"text-[10px] font-mono text-sem-green opacity-60",title:"Input: ".concat(e.tokenUsage.inputTokens.toLocaleString()," / Output: ").concat(e.tokenUsage.outputTokens.toLocaleString()),children:["↑",d(e.tokenUsage.inputTokens)," ","↓",d(e.tokenUsage.outputTokens)]})]}),(0,a.jsx)("div",{className:"text-[10px] font-mono text-muted-foreground mt-1 opacity-70 truncate",children:e.agentNames.join(" / ")}),e.ratings&&Object.keys(e.ratings).length>0&&(0,a.jsx)("div",{className:"flex gap-2 mt-1 flex-wrap",children:Object.entries(e.ratings).map(e=>{let[t,n]=e,r=Math.min(5,Math.max(0,Math.round(n)));return(0,a.jsxs)("span",{className:"text-[9px] font-mono text-accent/70",children:[t.slice(0,4)," ","★".repeat(r),"☆".repeat(5-r)]},t)})})]}),m(e.preview)&&(0,a.jsx)(i.A,{variant:"success",size:"sm",onClick:t=>{t.stopPropagation(),k(e.preview,e.ratings)},className:"shrink-0 mt-0.5",children:"Preview"})]})},e.id))})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[337],{3337:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(206),a=n(1406),o=n(5282),l=n(4932),s=n(9385);let i=(0,o.default)(()=>Promise.all([n.e(767),n.e(853)]).then(n.bind(n,6853)),{loadableGenerated:{webpack:()=>[6853]},ssr:!1}),c=(0,o.default)(()=>n.e(73).then(n.bind(n,73)),{loadableGenerated:{webpack:()=>[73]},ssr:!1}),u=(0,a.memo)(function(e){let{agentId:t,data:n,meta:o,assetsReady:l,panePrompts:s,onPanePromptChange:u,isOwner:d,isCollaborator:m,isSpectator:g,panePendingImages:p,onPanePendingImagesChange:v,suggestions:h,suggestText:x,onSuggestTextChange:b,onSubmit:f,onCancel:M,onFire:k,onApproval:C,onApprovePlan:w,onQuickApprove:y,onEndProject:A,onSuggest:E,onPreview:T,onReview:j,detectedBackends:N,onLoadMore:P,onPasteImage:L,onPasteText:R,onDropImage:I,reviewerOverlay:S,onReviewerLoadMore:D,onApplyReviewFixes:X,onDismissReview:_,autoMerge:F,pendingMerge:H,lastMergeCommit:U,lastMergeMessage:W,undoCount:z,onMerge:Y,onRevert:O,onUndoMerge:B,scrollFrozen:G}=e,Q=(0,a.useRef)(t);Q.current=t;let K=(0,a.useCallback)(e=>u(Q.current,e),[u]),q=(0,a.useCallback)(e=>v(Q.current,e),[v]),J=(0,a.useCallback)(()=>f(Q.current),[f]),V=(0,a.useCallback)(()=>M(Q.current),[M]),Z=(0,a.useCallback)(()=>w(Q.current),[w]),$=(0,a.useCallback)(()=>y(Q.current),[y]),ee=(0,a.useCallback)(()=>A(Q.current),[A]),et=(0,a.useCallback)(()=>P(Q.current),[P]),en=(0,a.useCallback)(e=>L(Q.current,e),[L]),er=(0,a.useCallback)(e=>R(Q.current,e),[R]),ea=(0,a.useCallback)(e=>I(Q.current,e),[I]),eo=(0,a.useCallback)(j?(e,t)=>j(Q.current,e,t):void 0,[j]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i,{agentId:t,name:n.name,role:n.role,backend:n.backend,status:n.status,cwd:n.cwd,workDir:n.workDir,messages:n.messages,visibleMessages:n.visibleMessages,hasMoreMessages:n.hasMoreMessages,tokenUsage:n.tokenUsage,isTeamLead:n.isTeamLead,isTeamMember:n.isTeamMember,isExternal:n.isExternal,teamId:n.teamId,teamPhase:n.teamPhase,pendingApproval:n.pendingApproval,awaitingApproval:n.awaitingApproval,lastLogLine:n.lastLogLine,busy:n.busy,pid:n.pid,isOwner:d,isCollaborator:m,isSpectator:g,prompt:s.get(t)||"",onPromptChange:K,pendingImages:p.get(t)||[],onPendingImagesChange:q,suggestions:h,suggestText:x,onSuggestTextChange:b,onSubmit:J,onCancel:V,onFire:k,onApproval:C,onApprovePlan:Z,onQuickApprove:$,onEndProject:ee,onSuggest:E,onPreview:T,onReview:eo,detectedBackends:N,onLoadMore:et,onPasteImage:en,onPasteText:er,onDropImage:ea,reviewerOverlay:S,onReviewerLoadMore:D,onApplyReviewFixes:X,onDismissReview:_,autoMerge:n.autoMerge,pendingMerge:n.pendingMerge,lastMergeCommit:n.lastMergeCommit,lastMergeMessage:n.lastMergeMessage,undoCount:n.undoCount,onMerge:Y?()=>Y(t):void 0,onRevert:O?()=>O(t):void 0,onUndoMerge:B?()=>B(t):void 0,scrollFrozen:G,hideInfoRole:!!o,inlineAvatar:o?{name:o.name,palette:o.palette,isTeamLead:o.isTeamLead,assetsReady:null!=l&&l,AvatarComponent:c}:null})})}),d=(0,a.memo)(function(e){var t,n,o;let{openPanes:i,getAgentData:c,paneOffset:d,onPaneOffsetChange:m,panePrompts:g,onPanePromptChange:p,isOwner:v,isCollaborator:h,isSpectator:x,panePendingImages:b,onPanePendingImagesChange:f,suggestions:M,suggestText:k,onSuggestTextChange:C,onSubmit:w,onCancel:y,onFire:A,onApproval:E,onApprovePlan:T,onQuickApprove:j,onEndProject:N,onSuggest:P,onPreview:L,onReview:R,onLoadMore:I,onPasteImage:S,onPasteText:D,onDropImage:X,reviewOverlay:_,getReviewerData:F,onReviewerLoadMore:H,onApplyReviewFixes:U,onDismissReview:W,detectedBackends:z,scrollFrozen:Y,agentMeta:O,assetsReady:B,showHireButton:G,hireLabel:Q="hire",onHire:K,showTeamControls:q,teamBusy:J,onMerge:V,onRevert:Z,onUndoMerge:$,onStopTeam:ee,onFireTeam:et}=e,[en,er]=(0,a.useState)(0),[ea,eo]=(0,a.useState)(null),el=(0,a.useRef)(null),[es,ei]=(0,a.useState)([]),ec=(0,a.useRef)(null),eu=Math.ceil(i.length/3),ed=[];for(let e=0;e<i.length;e+=3)ed.push(i.slice(e,e+3));let em=Math.max(0,Math.min(en,eu-1));em!==en&&(er(em),m(3*em)),(0,a.useEffect)(()=>{let e=setTimeout(()=>{document.activeElement instanceof HTMLElement&&("INPUT"===document.activeElement.tagName||"TEXTAREA"===document.activeElement.tagName)&&document.activeElement.blur()},50);return()=>clearTimeout(e)},[en]);let eg=(0,a.useCallback)(e=>{let t=Math.max(0,Math.min(e,eu-1));er(e=>e===t?e:(eo(t>e?"left":"right"),t)),m(3*t)},[eu,m]);(0,a.useEffect)(()=>{let e=e=>{var t;let n=null==(t=e.target)?void 0:t.tagName;"INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n&&(eu<=1||("ArrowLeft"===e.key?(e.preventDefault(),eg(en-1)):"ArrowRight"===e.key&&(e.preventDefault(),eg(en+1))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[en,eu,eg]);let ep=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=el.current;if(!e||eu<=1)return;let t=t=>{let n=t.target;for(;n&&n!==e;){if("TEXTAREA"===n.tagName||"INPUT"===n.tagName)return;let{overflowY:e}=getComputedStyle(n);if(("auto"===e||"scroll"===e)&&n.scrollHeight>n.clientHeight)return;n=n.parentElement}let r=Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:t.deltaY;!(30>Math.abs(r))&&(ep.current||(ep.current=!0,setTimeout(()=>{ep.current=!1},400),r>0?eg(en+1):eg(en-1)))};return e.addEventListener("wheel",t,{passive:!0}),()=>e.removeEventListener("wheel",t)},[en,eu,eg]);let ev=(0,a.useRef)(null),eh=(0,a.useCallback)(e=>{ev.current={startX:e.touches[0].clientX,startY:e.touches[0].clientY}},[]),ex=(0,a.useCallback)(e=>{if(!ev.current||eu<=1)return;let t=e.changedTouches[0].clientX-ev.current.startX,n=e.changedTouches[0].clientY-ev.current.startY;ev.current=null,50>Math.abs(t)||Math.abs(t)<Math.abs(n)||(t<0?eg(en+1):eg(en-1))},[en,eu,eg]),eb=(0,a.useCallback)((e,t)=>{var n,r;t.preventDefault();let a=el.current;if(!a)return;let o=a.getBoundingClientRect().width,l=Math.min(null!=(r=null==(n=ed[en])?void 0:n.length)?r:0,3),s=es.length===l?[...es]:Array(l).fill(1/l);ec.current={index:e,startX:t.clientX,startWidths:s,containerW:o};let i=e=>{let t=ec.current;if(!t)return;let n=(e.clientX-t.startX)/t.containerW,r=[...t.startWidths],a=t.startWidths[t.index]+n,o=t.startWidths[t.index+1]-n;a>=.15&&o>=.15&&(r[t.index]=a,r[t.index+1]=o,ei(r))},c=()=>{ec.current=null,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",c),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",i),document.addEventListener("mouseup",c)},[en,ed,es]),ef=(0,a.useRef)(0),eM=null!=(n=null==(t=ed[en])?void 0:t.length)?n:0;eM!==ef.current&&(ef.current=eM,es.length!==eM&&ei(Array(eM).fill(1/Math.max(1,eM))));let ek=en>=eu-1&&q;if(0===i.length)return(0,r.jsx)("div",{className:"flex flex-1 items-center justify-center font-mono text-term text-muted-foreground min-h-0",children:G&&K?(0,r.jsxs)("button",{onClick:K,title:"Hire",className:"flex items-center justify-center gap-2 px-6 py-4 h-[60px] cursor-pointer text-sm font-mono font-medium tracking-wide rounded-lg transition-all duration-200 hover:bg-accent/[0.15] hover:border-accent/[0.56] hover:text-accent",style:{border:"1px solid ".concat(l.DM,"50"),backgroundColor:"".concat(l.DM,"12"),color:"".concat(l.DM,"cc")},children:[(0,r.jsx)("span",{className:"text-[15px] leading-none",children:"+"})," ",Q]}):"No agents active"});let eC=es.length===eM?es:Array(eM).fill(1/Math.max(1,eM)),ew=null!=(o=ed[en])?o:[];return(0,r.jsxs)("div",{className:"flex flex-col flex-1 min-h-0",children:[(0,r.jsxs)("div",{ref:el,onTouchStart:eh,onTouchEnd:ex,className:(0,s.cn)("flex flex-1 min-h-0","left"===ea?"mpv-slide-left":"right"===ea?"mpv-slide-right":"mpv-page-fade"),children:[ew.map((e,t)=>{var n;let a=c(e);if(!a)return null;let o=null==O?void 0:O.find(t=>t.agentId===e),s=null!=eC[t]?"".concat(eC[t]," 1 0%"):"1 1 0%";return(0,r.jsxs)("div",{className:"contents",children:[t>0&&(0,r.jsx)("div",{className:"pane-resize".concat((null==(n=ec.current)?void 0:n.index)===t-1?" pane-resize-active":""),onMouseDown:e=>eb(t-1,e)}),(0,r.jsxs)("div",{style:{flex:s,minWidth:0,display:"flex",flexDirection:"column",position:"relative",...0===t?{borderLeft:"1px solid ".concat(l.KD),boxShadow:"-1px 0 0 rgba(0,0,0,0.4), inset 1px 0 0 rgba(255,255,255,0.03)"}:{}},children:[G&&K&&en===ed.length-1&&t===ew.length-1&&(0,r.jsxs)("button",{onClick:K,title:"Hire","aria-label":"Hire",className:"mpv-hire-float",children:[(0,r.jsx)("span",{style:{fontSize:13,lineHeight:"1"},children:"+"})," ",Q]}),(0,r.jsx)(u,{agentId:e,data:a,meta:o,assetsReady:B,panePrompts:g,onPanePromptChange:p,isOwner:v,isCollaborator:h,isSpectator:x,panePendingImages:b,onPanePendingImagesChange:f,suggestions:M,suggestText:k,onSuggestTextChange:C,onSubmit:w,onCancel:y,onFire:A,onApproval:E,onApprovePlan:T,onQuickApprove:j,onEndProject:N,onSuggest:P,onPreview:L,onReview:R,detectedBackends:z,onLoadMore:I,onPasteImage:S,onPasteText:D,onDropImage:X,reviewerOverlay:(null==_?void 0:_.sourceAgentId)===e&&F?F(_.reviewerAgentId):null,onReviewerLoadMore:(null==_?void 0:_.sourceAgentId)===e&&H?()=>H(_.reviewerAgentId):void 0,onApplyReviewFixes:(null==_?void 0:_.sourceAgentId)===e?U:void 0,onDismissReview:(null==_?void 0:_.sourceAgentId)===e?W:void 0,autoMerge:a.autoMerge,pendingMerge:a.pendingMerge,lastMergeCommit:a.lastMergeCommit,lastMergeMessage:a.lastMergeMessage,onMerge:V?()=>V(e):void 0,onRevert:Z?()=>Z(e):void 0,onUndoMerge:$?()=>$(e):void 0,scrollFrozen:Y})]})]},e)}),ek&&(0,r.jsxs)("div",{className:(0,s.cn)("flex flex-col items-center justify-center gap-2 px-4 min-w-[60px] shrink-0",ew.length>0&&"border-l border-term-border-dim"),children:[q&&J&&ee&&(0,r.jsx)("button",{onClick:ee,title:"Stop Team Work",className:"px-3 py-1.5 border border-muted-foreground cursor-pointer bg-transparent text-sem-yellow font-mono text-term",children:"stop"}),q&&et&&(0,r.jsx)("button",{onClick:et,title:"Fire Team",className:"px-3 py-1.5 border border-muted-foreground cursor-pointer bg-transparent text-muted-foreground font-mono text-term transition-colors duration-150 hover:text-sem-red",children:"fire"})]})]},en),(0,r.jsx)("div",{className:"term-info-bar flex justify-center items-center px-3 py-1.5 font-mono text-[11px] text-muted-foreground bg-term-panel shrink-0 relative gap-2 border-t border-term-border-dim shadow-[0_-3px_8px_-2px_rgba(0,0,0,0.5),inset_0_1px_0_rgba(255,255,255,0.04)]",children:eu>1&&(0,r.jsx)("div",{className:"mpv-dots",children:Array.from({length:eu},(e,t)=>(0,r.jsx)("button",{className:"mpv-dot".concat(en===t?" mpv-dot-active":""),onClick:()=>eg(t),"aria-label":"Page ".concat(t+1)},t))})})]})})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293,363],{4363:(i,n,e)=>{e.r(n),e.d(n,{Importance:()=>a,Schedule:()=>s,ScheduleEvery:()=>t,Visibility:()=>r,active:()=>v,cancel:()=>d,cancelAll:()=>w,channels:()=>k,createChannel:()=>g,isPermissionGranted:()=>c,onAction:()=>N,onNotificationReceived:()=>m,pending:()=>h,registerActionTypes:()=>f,removeActive:()=>p,removeAllActive:()=>_,removeChannel:()=>y,requestPermission:()=>u,sendNotification:()=>l});var t,a,r,o=e(5293);!function(i){i.Year="year",i.Month="month",i.TwoWeeks="twoWeeks",i.Week="week",i.Day="day",i.Hour="hour",i.Minute="minute",i.Second="second"}(t||(t={}));class s{static at(i,n=!1,e=!1){return{at:{date:i,repeating:n,allowWhileIdle:e},interval:void 0,every:void 0}}static interval(i,n=!1){return{at:void 0,interval:{interval:i,allowWhileIdle:n},every:void 0}}static every(i,n,e=!1){return{at:void 0,interval:void 0,every:{interval:i,count:n,allowWhileIdle:e}}}}async function c(){return"default"!==window.Notification.permission?await Promise.resolve("granted"===window.Notification.permission):await (0,o.invoke)("plugin:notification|is_permission_granted")}async function u(){return await window.Notification.requestPermission()}function l(i){"string"==typeof i?new window.Notification(i):new window.Notification(i.title,i)}async function f(i){await (0,o.invoke)("plugin:notification|register_action_types",{types:i})}async function h(){return await (0,o.invoke)("plugin:notification|get_pending")}async function d(i){await (0,o.invoke)("plugin:notification|cancel",{notifications:i})}async function w(){await (0,o.invoke)("plugin:notification|cancel")}async function v(){return await (0,o.invoke)("plugin:notification|get_active")}async function p(i){await (0,o.invoke)("plugin:notification|remove_active",{notifications:i})}async function _(){await (0,o.invoke)("plugin:notification|remove_active")}async function g(i){await (0,o.invoke)("plugin:notification|create_channel",{...i})}async function y(i){await (0,o.invoke)("plugin:notification|delete_channel",{id:i})}async function k(){return await (0,o.invoke)("plugin:notification|listChannels")}async function m(i){return await (0,o.addPluginListener)("notification","notification",i)}async function N(i){return await (0,o.addPluginListener)("notification","actionPerformed",i)}!function(i){i[i.None=0]="None",i[i.Min=1]="Min",i[i.Low=2]="Low",i[i.Default=3]="Default",i[i.High=4]="High"}(a||(a={})),function(i){i[i.Secret=-1]="Secret",i[i.Private=0]="Private",i[i.Public=1]="Public"}(r||(r={}))},5293:(i,n,e)=>{var t,a,r,o,s;function c(i,n,e,t){if("a"===e&&!t)throw TypeError("Private accessor was defined without a getter");if("function"==typeof n?i!==n||!t:!n.has(i))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?t:"a"===e?t.call(i):t?t.value:n.get(i)}function u(i,n,e,t,a){if("m"===t)throw TypeError("Private method is not writable");if("a"===t&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof n?i!==n||!a:!n.has(i))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===t?a.call(i,e):a?a.value=e:n.set(i,e),e}e.r(n),e.d(n,{Channel:()=>h,PluginListener:()=>d,Resource:()=>y,SERIALIZE_TO_IPC_FN:()=>l,addPluginListener:()=>w,checkPermissions:()=>v,convertFileSrc:()=>g,invoke:()=>_,isTauri:()=>k,requestPermissions:()=>p,transformCallback:()=>f}),"function"==typeof SuppressedError&&SuppressedError;let l="__TAURI_TO_IPC_KEY__";function f(i,n=!1){return window.__TAURI_INTERNALS__.transformCallback(i,n)}class h{constructor(i){t.set(this,void 0),a.set(this,0),r.set(this,[]),o.set(this,void 0),u(this,t,i||(()=>{}),"f"),this.id=f(i=>{let n=i.index;if("end"in i)return void(n==c(this,a,"f")?this.cleanupCallback():u(this,o,n,"f"));let e=i.message;if(n==c(this,a,"f")){for(c(this,t,"f").call(this,e),u(this,a,c(this,a,"f")+1,"f");c(this,a,"f")in c(this,r,"f");){let i=c(this,r,"f")[c(this,a,"f")];c(this,t,"f").call(this,i),delete c(this,r,"f")[c(this,a,"f")],u(this,a,c(this,a,"f")+1,"f")}c(this,a,"f")===c(this,o,"f")&&this.cleanupCallback()}else c(this,r,"f")[n]=e})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(i){u(this,t,i,"f")}get onmessage(){return c(this,t,"f")}[(t=new WeakMap,a=new WeakMap,r=new WeakMap,o=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class d{constructor(i,n,e){this.plugin=i,this.event=n,this.channelId=e}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function w(i,n,e){let t=new h(e);try{return await _(`plugin:${i}|register_listener`,{event:n,handler:t}),new d(i,n,t.id)}catch{return await _(`plugin:${i}|registerListener`,{event:n,handler:t}),new d(i,n,t.id)}}async function v(i){return _(`plugin:${i}|check_permissions`)}async function p(i){return _(`plugin:${i}|request_permissions`)}async function _(i,n={},e){return window.__TAURI_INTERNALS__.invoke(i,n,e)}function g(i,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(i,n)}class y{get rid(){return c(this,s,"f")}constructor(i){s.set(this,void 0),u(this,s,i,"f")}async close(){return _("plugin:resources|close",{rid:this.rid})}}function k(){return!!(globalThis||window).isTauri}s=new WeakMap}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[368],{368:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var l=r(206),i=r(1406),a=r(5195);function n(e,t,r,l){let i=r.length,n=i>0?r[0].length:0;if(t<0||t>=i||e<0||e>=n)return!1;let s=r[t][e];return!(s===a.nb.WALL||s===a.nb.VOID||l.has("".concat(e,",").concat(t)))}function s(e,t){let r=e.length,l=r>0?e[0].length:0,i=[];for(let a=0;a<r;a++)for(let r=0;r<l;r++)n(r,a,e,t)&&i.push({col:r,row:a});return i}let o=[{dc:0,dr:-1},{dc:0,dr:1},{dc:-1,dr:0},{dc:1,dr:0}];function c(e,t,r,l,i,a){if(e===r&&t===l||!n(r,l,i,a))return[];let s=t<<10|e,c=l<<10|r,h=new Set;h.add(s);let u=new Map,d=[e,t],f=0;for(;f<d.length;){let e=d[f++],t=d[f++],r=t<<10|e;if(r===c){let e=[],t=c;for(;t!==s;)e.push({col:1023&t,row:t>>10}),t=u.get(t);return e.reverse(),e}for(let l of o){let s=e+l.dc,o=t+l.dr,c=o<<10|s;!h.has(c)&&n(s,o,i,a)&&(h.add(c),u.set(c,r),d.push(s,o))}}return[]}var h=r(2243);let u=new Set(["Read","Grep","Glob","WebFetch","WebSearch"]);function d(e,t){return{x:e*a.dn+a.dn/2,y:t*a.dn+a.dn/2}}function f(e,t,r,l){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,n=arguments.length>5?arguments[5]:void 0,s=l?l.seatCol:1,o=l?l.seatRow:1,c=d(s,o),u=null!=n?n:l?a.Lp.TYPE:a.Lp.IDLE;return{id:e,state:u,dir:l?l.facingDir:a.OP.DOWN,x:c.x,y:c.y,tileCol:s,tileRow:o,path:[],moveProgress:0,currentTool:null,palette:t,hueShift:i,frame:0,frameTimer:0,wanderTimer:u===a.Lp.IDLE?g(h.wj,h.k8):0,wanderCount:0,wanderLimit:m(h.Rb,h.he),isActive:u===a.Lp.TYPE,seatId:r,bubbleType:null,bubbleTimer:0,speechText:null,speechTimer:0,seatTimer:0,isSubagent:!1,parentAgentId:null,matrixEffect:null,matrixEffectTimer:0,matrixEffectSeeds:[],isExternal:!1,label:null,labelColor:null}}function g(e,t){return e+Math.random()*(t-e)}function m(e,t){return e+Math.floor(Math.random()*(t-e+1))}let b=Array(101),p=Array(101),w=Array(101);for(let e=0;e<101;e++){let t=(e/100).toFixed(2);b[e]="rgba(0,255,65,".concat(t,")"),p[e]="rgba(0,170,40,".concat(t,")"),w[e]="rgba(0,85,20,".concat(t,")")}function T(e){return b[Math.round(100*Math.min(1,Math.max(0,e)))]}function y(e,t){return e<h.Wn?T(t):e<h.WJ?p[Math.round(100*Math.min(1,Math.max(0,t)))]:w[Math.round(100*Math.min(1,Math.max(0,t)))]}function I(e,t,r){return(7*e+13*t+31*Math.floor(r*h.vU)&255)<h.gB}function C(){let e=[];for(let t=0;t<h.W3;t++)e.push(Math.random());return e}var x=r(9631),v=r(9892);class S{markDirty(){var e;this.dirty=!0,null==(e=this.onDirty)||e.call(this)}computeCharacterScale(){let e=Math.max(h.wh,h.YK),t=Math.max(this.layout.cols,this.layout.rows);return t<=e?1:Math.pow(t/e,.75)}setBackgroundImage(e){this.backgroundImage=e,this.markDirty()}setLayout(e){for(let t of(this.layout=e,this.tileMap=(0,x.MB)(e),this.characterScale=this.computeCharacterScale(),this.seats=(0,x.CW)(e.furniture),this.blockedTiles=(0,x.AI)(e.furniture),this.furniture=(0,x.Co)(e.furniture),this.walkableTiles=s(this.tileMap,this.blockedTiles),this.characters.values())){if(t.seatId){let e=this.seats.get(t.seatId);if(e)e.assigned=!0;else{t.seatId=null;let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,t.seatId=e)}}if(t.seatId){let e=this.seats.get(t.seatId);t.tileCol=e.seatCol,t.tileRow=e.seatRow,t.dir=e.facingDir}else if(this.walkableTiles.length>0){let e=this.walkableTiles[Math.floor(Math.random()*this.walkableTiles.length)];t.tileCol=e.col,t.tileRow=e.row}t.x=t.tileCol*a.dn+a.dn/2,t.y=t.tileRow*a.dn+a.dn/2,t.path=[],t.moveProgress=0}this.rebuildFurnitureInstances(),this.markDirty()}addCharacter(e,t,r,l,i,n){if(this.agentIdToCharId.has(e))return;let s=this.nextCharId++;this.agentIdToCharId.set(e,s),this.charIdToAgentId.set(s,e);let{palette:o,hueShift:c}=void 0!==r?{palette:r,hueShift:0}:this.pickDiversePalette(),h=this.walkableTiles.length>0?this.walkableTiles[Math.floor(Math.random()*this.walkableTiles.length)]:{col:1,row:1},u=f(s,o,null,null,c,a.Lp.IDLE);u.x=h.col*a.dn+a.dn/2,u.y=h.row*a.dn+a.dn/2,u.tileCol=h.col,u.tileRow=h.row,l&&(u.isExternal=!0),i&&(u.label=i),n&&(u.labelColor=n),u.matrixEffect="spawn",u.matrixEffectTimer=0,u.matrixEffectSeeds=C(),this.characters.set(s,u),this._charListDirty=!0,this.markDirty()}removeCharacter(e){let t=this.agentIdToCharId.get(e);if(void 0===t)return;let r=this.characters.get(t);if(r&&"despawn"!==r.matrixEffect){if(r.seatId){let e=this.seats.get(r.seatId);e&&(e.assigned=!1)}this.selectedCharId===t&&(this.selectedCharId=null),r.matrixEffect="despawn",r.matrixEffectTimer=0,r.matrixEffectSeeds=C(),r.bubbleType=null,this.markDirty()}}updateCharacterStatus(e,t,r){let l=this.agentIdToCharId.get(e);if(void 0===l)return;let i=this.characters.get(l);if(!i)return;this.markDirty();let a=i.isActive,n="working"===t||"waiting_approval"===t;if(i.isActive=n,r&&!i.seatId){if(i.restSeatId){let e=this.seats.get(i.restSeatId);e&&(e.assigned=!1),i.restSeatId=null,i.seatTimer=0}let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,i.seatId=e),this.rebuildFurnitureInstances()}if(!n&&a){if(r);else{if(i.seatId){let e=this.seats.get(i.seatId);e&&(e.assigned=!1),i.seatId=null}i.seatTimer=-1,i.path=[],i.moveProgress=0}this.rebuildFurnitureInstances()}else if(n&&!a){if(!i.seatId){if(i.restSeatId){let e=this.seats.get(i.restSeatId);e&&(e.assigned=!1),i.restSeatId=null,i.seatTimer=0}let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,i.seatId=e)}this.rebuildFurnitureInstances()}}selectCharacter(e){let t=this.selectedCharId;if(null===e)this.selectedCharId=null;else{let t=this.agentIdToCharId.get(e);this.selectedCharId=null!=t?t:null}this.selectedCharId!==t&&this.markDirty()}showBubble(e,t){let r=this.agentIdToCharId.get(e);if(void 0===r)return;let l=this.characters.get(r);l&&("permission"===t||"working"===t?(l.bubbleType=t,l.bubbleTimer=0):(l.bubbleType="waiting",l.bubbleTimer=h.WK),this.markDirty())}clearBubble(e){let t=this.agentIdToCharId.get(e);if(void 0===t)return;let r=this.characters.get(t);r&&("permission"===r.bubbleType||"working"===r.bubbleType?(r.bubbleType=null,r.bubbleTimer=0):"waiting"===r.bubbleType&&(r.bubbleTimer=Math.min(r.bubbleTimer,h.M_)),this.markDirty())}showSpeechBubble(e,t){let r=this.agentIdToCharId.get(e);if(void 0===r)return;let l=this.characters.get(r);l&&(l.speechText=t.length>h.lO?t.slice(0,h.lO)+"...":t,l.speechTimer=h.Jk,this.markDirty())}getCharacters(){return this._charListDirty&&(this._cachedChars=Array.from(this.characters.values()),this._charListDirty=!1),this._cachedChars}getLayout(){return this.layout}getSelectedCharId(){return this.selectedCharId}getHoveredCharId(){return this.hoveredCharId}getAgentId(e){var t;return null!=(t=this.charIdToAgentId.get(e))?t:null}getAgentAtPixel(e,t){let r=this.characterScale,l=this.getCharacters(),i=null,n=-1/0;for(let o of l){if("despawn"===o.matrixEffect)continue;let l=o.state===a.Lp.TYPE?h.iE:0,c=o.y+l,u=o.x-h.Ns*r,d=o.x+h.Ns*r,f=c-h.o3*r;if(e>=u&&e<=d&&t>=f&&t<=c&&o.y>n){var s;n=o.y,i=null!=(s=this.charIdToAgentId.get(o.id))?s:null}}return i}setHoveredCharAtPixel(e,t){let r=this.hoveredCharId,l=this.characterScale,i=this.getCharacters(),n=null,s=-1/0;for(let r of i){if("despawn"===r.matrixEffect)continue;let i=r.state===a.Lp.TYPE?h.iE:0,o=r.y+i,c=r.x-h.Ns*l,u=r.x+h.Ns*l,d=o-h.o3*l;e>=c&&e<=u&&t>=d&&t<=o&&r.y>s&&(s=r.y,n=r.id)}this.hoveredCharId=n,this.hoveredCharId!==r&&this.markDirty()}update(e){this.needsTick=!1;let t=[];for(let r of this.characters.values()){let l=r.x,i=r.y,n=r.state,s=r.frame,o=r.dir,u=r.bubbleType,f=r.speechText,b=r.matrixEffect,p=r.matrixEffectTimer;if(r.matrixEffect){r.matrixEffectTimer+=e,r.matrixEffectTimer>=a.Pz&&("spawn"===r.matrixEffect?(r.matrixEffect=null,r.matrixEffectTimer=0,r.matrixEffectSeeds=[]):t.push(r.id)),this.dirty=!0;continue}if(r.isActive&&!r.seatId&&r.state===a.Lp.IDLE){let e=this.findFreeSeat();e&&(this.seats.get(e).assigned=!0,r.seatId=e)}this.withOwnSeatUnblocked(r,()=>(function(e,t,r,l,i,n){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7?arguments[7]:void 0;switch(e.frameTimer+=t,e.state){case a.Lp.TYPE:if(e.frameTimer>=h.S3&&(e.frameTimer-=h.S3,e.frame=(e.frame+1)%2),!e.isActive){if(e.seatTimer>0){e.seatTimer-=t;break}e.seatTimer=0,e.state=a.Lp.IDLE,e.frame=0,e.frameTimer=0,e.wanderTimer=g(h.wj,h.k8),e.wanderCount=0,e.wanderLimit=m(h.Rb,h.he)}break;case a.Lp.IDLE:if(e.frame=0,e.seatTimer<0&&(e.seatTimer=0),e.isActive){if(e.restSeatId){let t=l.get(e.restSeatId);t&&(t.assigned=!1),e.restSeatId=null,e.seatTimer=0}if(!e.seatId)break;let t=l.get(e.seatId);if(t){let r=c(e.tileCol,e.tileRow,t.seatCol,t.seatRow,i,n);r.length>0?(e.path=r,e.moveProgress=0,e.state=a.Lp.WALK):(e.state=a.Lp.TYPE,e.dir=t.facingDir),e.frame=0,e.frameTimer=0}break}if(e.restSeatId&&e.seatTimer>0){if(e.seatTimer-=t,e.seatTimer<=0){e.seatTimer=0;let t=l.get(e.restSeatId);t&&(t.assigned=!1),e.restSeatId=null,e.wanderTimer=g(h.wj,h.k8)}break}if(e.wanderTimer-=t,e.wanderTimer<=0){if(e.wanderCount>=e.wanderLimit&&e.seatId){let t=e.restSeatId?l.get(e.restSeatId):null;t&&(t.assigned=!1),e.restSeatId=null;let r=l.get(e.seatId);if(r){let t=c(e.tileCol,e.tileRow,r.seatCol,r.seatRow,i,n);if(t.length>0){e.path=t,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0;break}}}if(o&&!e.restSeatId&&.3>Math.random()){let t=o();if(t){let r=l.get(t);if(r){let l="".concat(r.seatCol,",").concat(r.seatRow),s=n.has(l);s&&n.delete(l);let o=c(e.tileCol,e.tileRow,r.seatCol,r.seatRow,i,n);if(s&&n.add(l),o.length>0){r.assigned=!0,e.restSeatId=t,e.path=o,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0,e.wanderCount++;break}}}}if(r.length>0){let t=r[Math.floor(Math.random()*r.length)],l=c(e.tileCol,e.tileRow,t.col,t.row,i,n);l.length>0&&(e.path=l,e.moveProgress=0,e.state=a.Lp.WALK,e.frame=0,e.frameTimer=0,e.wanderCount++)}e.wanderTimer=g(h.wj,h.k8)}break;case a.Lp.WALK:{if(e.frameTimer>=h.lY&&(e.frameTimer-=h.lY,e.frame=(e.frame+1)%4),0===e.path.length){let t=d(e.tileCol,e.tileRow);if(e.x=t.x,e.y=t.y,e.isActive)if(e.seatId){let t=l.get(e.seatId);t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow?(e.state=a.Lp.TYPE,e.dir=t.facingDir):e.state=a.Lp.IDLE}else e.state=a.Lp.IDLE;else{if(e.restSeatId){let t=l.get(e.restSeatId);if(t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow){e.state=a.Lp.IDLE,e.dir=t.facingDir,e.seatTimer=g(h.Ot,h.Ww),e.frame=0,e.frameTimer=0;break}}if(e.seatId){let t=l.get(e.seatId);if(t&&e.tileCol===t.seatCol&&e.tileRow===t.seatRow){e.state=a.Lp.TYPE,e.dir=t.facingDir,e.seatTimer<0?e.seatTimer=0:e.seatTimer=g(h.Ot,h.Ww),e.wanderCount=0,e.wanderLimit=m(h.Rb,h.he),e.frame=0,e.frameTimer=0;break}}e.state=a.Lp.IDLE,e.wanderTimer=g(h.wj,h.k8)}e.frame=0,e.frameTimer=0;break}let r=e.path[0];e.dir=function(e,t,r,l){let i=r-e;return i>0?a.OP.RIGHT:i<0?a.OP.LEFT:l-t>0?a.OP.DOWN:a.OP.UP}(e.tileCol,e.tileRow,r.col,r.row),e.moveProgress+=h.XE/a.dn*t*s;let o=d(e.tileCol,e.tileRow),u=d(r.col,r.row),f=Math.min(e.moveProgress,1);if(e.x=o.x+(u.x-o.x)*f,e.y=o.y+(u.y-o.y)*f,e.moveProgress>=1&&(e.tileCol=r.col,e.tileRow=r.row,e.x=u.x,e.y=u.y,e.path.shift(),e.moveProgress=0),e.isActive&&e.seatId){let t=l.get(e.seatId);if(t){let r=e.path[e.path.length-1];if(!r||r.col!==t.seatCol||r.row!==t.seatRow){let r=c(e.tileCol,e.tileRow,t.seatCol,t.seatRow,i,n);r.length>0&&(e.path=r,e.moveProgress=0)}}}}}})(r,e,this.walkableTiles,this.seats,this.tileMap,this.blockedTiles,this.characterScale,()=>this.findFreeRestSeat())),"waiting"===r.bubbleType&&(r.bubbleTimer-=e,r.bubbleTimer<=0&&(r.bubbleType=null,r.bubbleTimer=0)),r.speechText&&(r.speechTimer-=e,r.speechTimer<=0&&(r.speechText=null,r.speechTimer=0)),(r.x!==l||r.y!==i||r.state!==n||r.frame!==s||r.dir!==o||r.bubbleType!==u||r.speechText!==f||r.matrixEffect!==b||r.matrixEffectTimer!==p)&&(this.dirty=!0),!this.needsTick&&(r.state===a.Lp.IDLE&&(r.wanderTimer>0||r.seatTimer>0)||r.state===a.Lp.TYPE&&!r.isActive&&r.seatTimer>0||"waiting"===r.bubbleType&&r.bubbleTimer>0||r.speechText&&r.speechTimer>0)&&(this.needsTick=!0)}for(let e of(t.length>0&&(this.dirty=!0,this._charListDirty=!0),t)){let t=this.charIdToAgentId.get(e);this.characters.delete(e),t&&(this.agentIdToCharId.delete(t),this.charIdToAgentId.delete(e))}}spawnTestCharacters(){this.clearTestCharacters();let e=0;for(let[t,r]of this.seats){if(r.isRest||r.assigned)continue;let l="__test_".concat(e),i=this.nextCharId++;this.agentIdToCharId.set(l,i),this.charIdToAgentId.set(i,l);let n=e%h.ic;r.assigned=!0;let s=f(i,n,t,r,0,a.Lp.TYPE);s.isActive=!0,this.characters.set(i,s),e++}this._charListDirty=!0,this.rebuildFurnitureInstances()}clearTestCharacters(){let e=[];for(let[t,r]of this.agentIdToCharId){if(!t.startsWith("__test_"))continue;let l=this.characters.get(r);if(null==l?void 0:l.seatId){let e=this.seats.get(l.seatId);e&&(e.assigned=!1)}this.characters.delete(r),this.charIdToAgentId.delete(r),e.push(t)}for(let t of e)this.agentIdToCharId.delete(t);e.length>0&&(this._charListDirty=!0,this.rebuildFurnitureInstances())}hasTestCharacters(){for(let e of this.agentIdToCharId.keys())if(e.startsWith("__test_"))return!0;return!1}findFreeSeat(){for(let[e,t]of this.seats)if(!t.assigned&&!t.isRest)return e;return null}findFreeRestSeat(){let e=[...this.seats.entries()].filter(e=>{let[,t]=e;return t.isRest&&!t.assigned});if(0===e.length)return null;let[t]=e[Math.floor(Math.random()*e.length)];return t}pickDiversePalette(){let e=Array(h.ic).fill(0);for(let t of this.characters.values())!t.isSubagent&&e[t.palette]++;let t=Math.min(...e),r=[];for(let l=0;l<h.ic;l++)e[l]===t&&r.push(l);let l=r[Math.floor(Math.random()*r.length)],i=0;return t>0&&(i=h.qt+Math.floor(Math.random()*h.p7)),{palette:l,hueShift:i}}ownSeatKey(e){if(!e.seatId)return null;let t=this.seats.get(e.seatId);return t?"".concat(t.seatCol,",").concat(t.seatRow):null}withOwnSeatUnblocked(e,t){let r=this.ownSeatKey(e),l=e.restSeatId?(()=>{let t=this.seats.get(e.restSeatId);return t?"".concat(t.seatCol,",").concat(t.seatRow):null})():null;r&&this.blockedTiles.delete(r),l&&this.blockedTiles.delete(l);let i=t();return r&&this.blockedTiles.add(r),l&&this.blockedTiles.add(l),i}rebuildFurnitureInstances(){let e=new Set;for(let t of this.characters.values()){if(!t.isActive||!t.seatId)continue;let r=this.seats.get(t.seatId);if(!r)continue;let l=r.facingDir===a.OP.RIGHT?1:r.facingDir===a.OP.LEFT?-1:0,i=r.facingDir===a.OP.DOWN?1:r.facingDir===a.OP.UP?-1:0;for(let t=1;t<=h.Xo;t++)e.add("".concat(r.seatCol+l*t,",").concat(r.seatRow+i*t));for(let t=1;t<=h.ou;t++){let a=r.seatCol+l*t,n=r.seatRow+i*t;0!==l?(e.add("".concat(a,",").concat(n-1)),e.add("".concat(a,",").concat(n+1))):(e.add("".concat(a-1,",").concat(n)),e.add("".concat(a+1,",").concat(n)))}}if(0===e.size){this.furniture=(0,x.Co)(this.layout.furniture);return}let t=this.layout.furniture.map(t=>{let r=(0,v.Um)(t.type);if(!r)return t;for(let l=0;l<r.footprintH;l++)for(let i=0;i<r.footprintW;i++)if(e.has("".concat(t.col+i,",").concat(t.row+l))){let e=(0,v.xr)(t.type);if(e!==t.type)return{...t,type:e};return t}return t});this.furniture=(0,x.Co)(t)}constructor(e){this.backgroundImage=null,this.characters=new Map,this.selectedCharId=null,this.hoveredCharId=null,this.characterScale=1,this.dirty=!0,this.needsTick=!1,this.onDirty=null,this._cachedChars=[],this._charListDirty=!0,this.agentIdToCharId=new Map,this.charIdToAgentId=new Map,this.nextCharId=1,this.layout=e||(0,x.kr)(),this.tileMap=(0,x.MB)(this.layout),this.seats=(0,x.CW)(this.layout.furniture),this.blockedTiles=(0,x.AI)(this.layout.furniture),this.furniture=(0,x.Co)(this.layout.furniture),this.walkableTiles=s(this.tileMap,this.blockedTiles),this.characterScale=this.computeCharacterScale()}}var k=r(5702),M=r(2988),R=r(4777),E=r(5055);let L=new Map;function A(e,t,r){let l="".concat(r,"|").concat(t),i=L.get(l);if(void 0!==i)return i;if(e.font=r,i=Math.ceil(e.measureText(t).width),L.size>=200){let e=100;for(let t of L.keys()){if(e--<=0)break;L.delete(t)}}return L.set(l,i),i}var P=r(4932),D=r(4296),F=r(1204);class Y{wake(){var e;null==(e=this.wakeLoop)||e.call(this)}addAgent(e,t){this.officeState.addCharacter(e,t.name,t.palette,t.isExternal,t.label,t.labelColor),this.wake()}removeAgent(e){this.officeState.removeCharacter(e),this.wake()}updateAgent(e,t,r,l){this.officeState.updateCharacterStatus(e,t,l),r?this.officeState.showBubble(e,r):this.officeState.clearBubble(e),this.wake()}showSpeechBubble(e,t){this.officeState.showSpeechBubble(e,t),this.wake()}selectAgent(e){this.officeState.selectCharacter(e),this.wake()}dispose(){var e;null==(e=this.stopLoop)||e.call(this),this.stopLoop=null,this.wakeLoop=null}getOfficeState(){return this.officeState}constructor(e,t,r){this.officeState=e,this.stopLoop=t,this.wakeLoop=null!=r?r:null}}function B(e){let{onAdapterReady:t,onAgentClick:r,editMode:n,editorRef:s,onTileClick:o,onTileRightClick:c,onGhostMove:d,onDragStart:f,onDragMove:g,onDragEnd:m,onDeleteBtnClick:b,onRotateBtnClick:p,officeStateRef:w,onAssetsLoaded:C,zoomRef:x,panRef:L}=e,B=(0,i.useRef)(null),[W,X]=(0,i.useState)(!1),_=(0,i.useRef)(r);_.current=r;let O=(0,i.useRef)(C);O.current=C;let U=(0,i.useRef)(n);U.current=n;let z=(0,i.useRef)(!1),H=(0,i.useRef)({x:0,y:0,panX:0,panY:0}),N=(0,i.useRef)({offsetX:0,offsetY:0}),V=(0,i.useRef)(null),j=(0,i.useRef)(null),q=(0,i.useCallback)((e,t)=>{let r=w.current;if(!r)return 4;let l=r.layout.cols*h.dn,i=r.layout.rows*h.dn;return Math.max(h.DH,Math.min(e/l,t/i))},[w]),K=(0,i.useCallback)(()=>{let e=B.current;if(!e)return;let t=e.parentElement;if(!t)return;let r=window.devicePixelRatio||1,l=t.clientWidth,i=t.clientHeight;e.width=l*r,e.height=i*r,e.style.width="".concat(l,"px"),e.style.height="".concat(i,"px");let a=e.getContext("2d");a&&a.scale(r,r),x.current=q(l,i),L.current={x:0,y:0}},[q,x,L]);(0,i.useEffect)(()=>{let e=!1;return(0,D.F)().then(t=>{e||((0,v.ar)(t.tilesetSprites),X(!0))}).catch(t=>{console.warn("[PixelOfficeScene] Asset loading failed, using fallbacks:",t),e||X(!0)}),()=>{e=!0}},[]),(0,i.useEffect)(()=>{var e;let r,l,i,n,o,c;if(!W)return;let d=B.current;if(!d)return;let f=new S;w.current=f,null==(e=O.current)||e.call(O),K();let g=new ResizeObserver(()=>K());d.parentElement&&g.observe(d.parentElement);let m=window.devicePixelRatio||1,{stop:b,wake:p}=function(e,t){let r=e.getContext("2d");r.imageSmoothingEnabled=!1;let l=0,i=0,a=!1,n=!0,s=0,o=!1,c=new ResizeObserver(()=>{n=!0,d()});c.observe(e);let u=e=>{if(a)return;o=!1;let c=0===l?0:Math.min((e-l)/1e3,h.O9);if(l=e,t.update(c),n||!t.isDirty||t.isDirty()?(s=0,n=!1,r.imageSmoothingEnabled=!1,t.render(r)):s++,s>=10){var d;if(null==(d=t.needsTick)?void 0:d.call(t)){i=requestAnimationFrame(u);return}o=!0,l=0;return}i=requestAnimationFrame(u)};function d(){if(!a){if(!o){s=0;return}o=!1,s=0,i=requestAnimationFrame(u)}}return i=requestAnimationFrame(u),{stop:()=>{a=!0,cancelAnimationFrame(i),c.disconnect()},wake:d}}(d,{update:e=>{f.update(e)},isDirty:(r=0,l=0,i=0,n=-1,o=-1,c=null,()=>{let e=x.current,t=L.current.x,a=L.current.y,h=e!==r||t!==l||a!==i;if(r=e,l=t,i=a,f.dirty||h)return f.dirty=!1,!0;if(U.current){let e=s.current,t=e.ghostCol!==n||e.ghostRow!==o,r=e.selectedFurnitureUid!==c;return n=e.ghostCol,o=e.ghostRow,c=e.selectedFurnitureUid,t||r}return!1}),needsTick:()=>f.needsTick,render:e=>{let t,r=d.width/m,l=d.height/m,i=x.current,n=L.current,o=s.current;if(U.current){let e=null;if(o.activeTool===a.VF.FURNITURE_PLACE&&o.selectedFurnitureType){let t=(0,v.Um)(o.selectedFurnitureType);t&&(e=t.sprite)}if(o.dragUid){let t=f.layout.furniture.find(e=>e.uid===o.dragUid);if(t){let r=(0,v.Um)(t.type);r&&(e=r.sprite)}}let r=!1,l=0,i=0,n=1,s=1,h=!1;if(o.selectedFurnitureUid){let e=f.layout.furniture.find(e=>e.uid===o.selectedFurnitureUid);if(e){var c,g;let t=(0,v.Um)(e.type);r=!0,l=e.col,i=e.row,n=null!=(c=null==t?void 0:t.footprintW)?c:1,s=null!=(g=null==t?void 0:t.footprintH)?g:1,h=(0,v.ZZ)(e.type)}}t={showGrid:!0,ghostSprite:e,ghostCol:o.ghostCol,ghostRow:o.ghostRow,ghostValid:o.ghostValid,hasSelection:r,selectedCol:l,selectedRow:i,selectedW:n,selectedH:s,isRotatable:h,deleteButtonBounds:null,rotateButtonBounds:null,showGhostBorder:!0,ghostBorderHoverCol:o.ghostCol,ghostBorderHoverRow:o.ghostRow}}N.current=function(e,t,r,l,i,n,s,o,c,d,f,g,m,b,p,w,C){let x=null!=C?C:1;e.clearRect(0,0,t,r);let v=null!=m?m:l.length>0?l[0].length:0,S=null!=b?b:l.length,L=v*a.dn*s,P=S*a.dn*s,D=Math.floor((t-L)/2)+Math.round(o),F=Math.floor((r-P)/2)+Math.round(c);w&&(e.save(),e.imageSmoothingEnabled=!1,e.drawImage(w,D,F,L,P),e.restore()),w||function(e,t,r,l,i,n,s){let o=a.dn*i,c=(0,R.$0)(),u=t.length,d=u>0?t[0].length:0,f=null!=s?s:d;for(let s=0;s<u;s++)for(let u=0;u<d;u++){var g;let d=t[s][u];if(d===a.nb.VOID)continue;if(d===a.nb.WALL||!c){if(d===a.nb.WALL){let t=s*f+u,r=null==n?void 0:n[t];e.fillStyle=r?(0,E.og)(r):R.ty}else e.fillStyle=h.q3;e.fillRect(r+u*o,l+s*o,o,o);continue}let m=s*f+u,b=null!=(g=null==n?void 0:n[m])?g:{h:0,s:0,b:0,c:0},p=(0,R.To)(d,b),w=(0,k.k)(p,i);e.drawImage(w,r+u*o,l+s*o)}}(e,l,D,F,s,g,m);let Y=!w&&(0,E.BN)()?(0,E.vb)(l,g,m):[];return!function(e,t,r,l,i,n,s,o){let c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:1,d=[],f=n*c;for(let e of t){let t=(0,k.k)(e.sprite,n),r=l+e.x*n,a=i+e.y*n;d.push({zY:e.zY,draw:e=>{e.drawImage(t,r,a)}})}for(let e of r){let t=(0,M.Ih)(e.palette,e.hueShift),r=function(e,t){switch(e.state){case a.Lp.TYPE:var r;if((r=e.currentTool)&&u.has(r))return t.reading[e.dir][e.frame%2];return t.typing[e.dir][e.frame%2];case a.Lp.WALK:return t.walk[e.dir][e.frame%4];case a.Lp.IDLE:default:return t.walk[e.dir][1]}}(e,t),c=(0,k.k)(r,f),g=e.state===a.Lp.TYPE?h.iE:0,m=Math.round(l+e.x*n-c.width/2),b=Math.round(i+(e.y+g)*n-c.height),p=e.y+a.dn/2+h.Sg;if(e.matrixEffect){let t=e;d.push({zY:p,draw:e=>{!function(e,t,r,l,i,n){let s=t.matrixEffectTimer/a.Pz,o="spawn"===t.matrixEffect,c=t.matrixEffectTimer,u=h.wN+h.M1;for(let a=0;a<h.W3;a++){var d,f;let g=Math.max(0,Math.min(1,(s-(null!=(d=t.matrixEffectSeeds[a])?d:0)*h.hI)/(1-h.hI)))*u;for(let t=0;t<h.wN;t++){let s=null==(f=r[t])?void 0:f[a],u=s&&""!==s,d=g-t,m=l+a*n,b=i+t*n;if(o)if(d<0)continue;else if(d<1)e.fillStyle=h.zw,e.fillRect(m,b,n,n);else if(d<h.M1){let r=d/h.M1;if(u){e.fillStyle=s,e.fillRect(m,b,n,n);let l=(1-r)*h.Nd;I(a,t,c)&&(e.fillStyle=T(l),e.fillRect(m,b,n,n))}else if(I(a,t,c)){let t=(1-r)*h.gi;e.fillStyle=y(r,t),e.fillRect(m,b,n,n)}}else u&&(e.fillStyle=s,e.fillRect(m,b,n,n));else if(d<0)u&&(e.fillStyle=s,e.fillRect(m,b,n,n));else if(d<1)e.fillStyle=h.zw,e.fillRect(m,b,n,n);else if(d<h.M1&&I(a,t,c)){let t=d/h.M1,r=(1-t)*h.gi;e.fillStyle=y(t,r),e.fillRect(m,b,n,n)}}}}(e,t,r,m,b,f)}});continue}let w=null!==s&&e.id===s,C=null!==o&&e.id===o;if(w||C){let e=w?h.O1:h.y9,t=(0,k.Y)(r),l=(0,k.k)(t,f),i=m-f,a=b-f;d.push({zY:p-h.F2,draw:t=>{t.save(),t.globalAlpha=e,t.drawImage(l,i,a),t.restore()}})}d.push({zY:p,draw:e=>{e.drawImage(c,m,b)}})}for(let t of(d.sort((e,t)=>e.zY-t.zY),d))t.draw(e)}(e,Y.length>0?[...Y,...i]:i,n,D,F,s,d,f,x),!function(e,t,r,l,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n,o=Math.max(1,Math.round(s));for(let u of t){var c;if(!u.label||"despawn"===u.matrixEffect)continue;let t=Math.max(6,Math.round(3.5*s)),d="bold ".concat(t,"px monospace"),f=A(e,u.label,d);e.save(),e.imageSmoothingEnabled=!1,e.font=d;let g=2*o,m=+o,b=f+2*g,p=t+2*m,w=u.state===a.Lp.TYPE?h.PA:0,T=Math.round(r+u.x*i-b/2),y=Math.round(l+(u.y+w-26*n)*i-p),I=null!=(c=u.labelColor)?c:"#8a7a6a";e.fillStyle="#222",e.fillRect(T-o,y,b+2*o,p+o),e.fillRect(T,y-o,b,p+2*o),e.fillStyle=I,e.fillRect(T,y,b,p),e.fillStyle="#fff",e.textBaseline="top",e.fillText(u.label,T+g,y+m),e.restore()}}(e,n,D,F,s,x),!function(e,t,r,l,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n;for(let o of t){if(!o.bubbleType)continue;let t="permission"===o.bubbleType?M.$D:"working"===o.bubbleType?M.j9:M.VQ,c=1;"waiting"===o.bubbleType&&o.bubbleTimer<h.v3&&(c=o.bubbleTimer/h.v3);let u=(0,k.k)(t,s),d=o.state===a.Lp.TYPE?h.PA:0,f=Math.round(r+o.x*i-u.width/2),g=Math.round(l+(o.y+d-h.$L*n)*i-u.height-i);e.save(),c<1&&(e.globalAlpha=c),e.drawImage(u,f,g),e.restore()}}(e,n,D,F,s,x),!function(e,t,r,l,i){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=i*n,o=Math.max(1,Math.round(s));for(let c of t){if(!c.speechText)continue;let t=1;if(c.speechTimer<h.nW&&(t=Math.max(0,c.speechTimer/h.nW)),t<=0)continue;let u=Math.max(7,Math.round(4.5*s)),d="".concat(u,"px monospace"),f=A(e,c.speechText,d);e.save(),e.imageSmoothingEnabled=!1,e.font=d;let g=3*o,m=2*o,b=f+2*g,p=u+2*m,w=3*o,T=c.state===a.Lp.TYPE?h.PA:0,y=Math.round(r+c.x*i-b/2),I=Math.round(l+(c.y+T-h.$L*n)*i-p-w-4*o);t<1&&(e.globalAlpha=t),e.fillStyle="#333",e.fillRect(y-o,I,b+2*o,p+o),e.fillRect(y,I-o,b,p+2*o),e.fillStyle="#fff",e.fillRect(y,I,b,p);let C=Math.round(y+b/2);e.fillStyle="#333",e.fillRect(C-2*o,I+p,4*o,o),e.fillRect(C-o,I+p+o,2*o,o),e.fillRect(C,I+p+2*o,o,o),e.fillStyle="#fff",e.fillRect(C-o,I+p,2*o,o),e.fillRect(C,I+p+o,o,o),e.fillStyle="#222",e.textBaseline="top",e.fillText(c.speechText,y+g,I+m),e.restore()}}(e,n,D,F,s,x),p&&(p.showGrid&&function(e,t,r,l,i,n,s){let o=a.dn*l;e.strokeStyle=h.AL,e.lineWidth=1,e.beginPath();for(let l=0;l<=i;l++){let i=t+l*o+.5;e.moveTo(i,r),e.lineTo(i,r+n*o)}for(let l=0;l<=n;l++){let a=r+l*o+.5;e.moveTo(t,a),e.lineTo(t+i*o,a)}if(e.stroke(),s){e.save(),e.strokeStyle=h.fJ,e.lineWidth=1,e.setLineDash(h.i);for(let l=0;l<n;l++)for(let n=0;n<i;n++){var c;(null==(c=s[l])?void 0:c[n])===a.nb.VOID&&e.strokeRect(t+n*o+.5,r+l*o+.5,o-1,o-1)}e.restore()}}(e,D,F,s,v,S,l),p.showGhostBorder&&function(e,t,r,l,i,n,s,o){let c=a.dn*l;e.save();let u=[];for(let e=-1;e<=i;e++)u.push({c:e,r:-1}),u.push({c:e,r:n});for(let e=0;e<n;e++)u.push({c:-1,r:e}),u.push({c:i,r:e});for(let{c:l,r:i}of u){let a=t+l*c,n=r+i*c,u=l===s&&i===o;u&&(e.fillStyle=h.Mo,e.fillRect(a,n,c,c)),e.strokeStyle=u?h.pr:h.gD,e.lineWidth=1,e.setLineDash(h.i),e.strokeRect(a+.5,n+.5,c-1,c-1)}e.restore()}(e,D,F,s,v,S,p.ghostBorderHoverCol,p.ghostBorderHoverRow),p.ghostSprite&&p.ghostCol>=0&&function(e,t,r,l,i,n,s,o){let c=(0,k.k)(t,o),u=n+r*a.dn*o,d=s+l*a.dn*o;e.save(),e.globalAlpha=h.qD,e.drawImage(c,u,d),e.globalAlpha=h.W7,e.fillStyle=i?h.TE:h.oj,e.fillRect(u,d,c.width,c.height),e.restore()}(e,p.ghostSprite,p.ghostCol,p.ghostRow,p.ghostValid,D,F,s),p.hasSelection?(!function(e,t,r,l,i,n,s,o){let c=a.dn*o;e.save(),e.strokeStyle=h.Ii,e.lineWidth=2,e.setLineDash(h.n6),e.strokeRect(n+t*c+1,s+r*c+1,l*c-2,i*c-2),e.restore()}(e,p.selectedCol,p.selectedRow,p.selectedW,p.selectedH,D,F,s),p.deleteButtonBounds=function(e,t,r,l,i,n,s,o){let c=a.dn*o,u=n+(t+l)*c+1,d=s+r*c-1,f=Math.max(h.l0,o*h.YX);e.save(),e.beginPath(),e.arc(u,d,f,0,2*Math.PI),e.fillStyle=h.Zz,e.fill(),e.strokeStyle="#fff",e.lineWidth=Math.max(h.SS,o*h.zY),e.lineCap="round";let g=f*h.R_;return e.beginPath(),e.moveTo(u-g,d-g),e.lineTo(u+g,d+g),e.moveTo(u+g,d-g),e.lineTo(u-g,d+g),e.stroke(),e.restore(),{cx:u,cy:d,radius:f}}(e,p.selectedCol,p.selectedRow,p.selectedW,p.selectedH,D,F,s),p.isRotatable?p.rotateButtonBounds=function(e,t,r,l,i,n,s,o){let c=a.dn*o,u=Math.max(h.l0,o*h.YX),d=n+t*c-1,f=s+r*c-1;e.save(),e.beginPath(),e.arc(d,f,u,0,2*Math.PI),e.fillStyle=h.BD,e.fill(),e.strokeStyle="#fff",e.lineWidth=Math.max(h.SS,o*h.zY),e.lineCap="round";let g=u*h.R_;e.beginPath(),e.arc(d,f,g,-(.8*Math.PI),.7*Math.PI),e.stroke();let m=.7*Math.PI,b=d+g*Math.cos(m),p=f+g*Math.sin(m),w=.35*u;return e.beginPath(),e.moveTo(b+.6*w,p-.3*w),e.lineTo(b,p),e.lineTo(b+.7*w,p+.5*w),e.stroke(),e.restore(),{cx:d,cy:f,radius:u}}(e,p.selectedCol,p.selectedRow,p.selectedW,p.selectedH,D,F,s):p.rotateButtonBounds=null):(p.deleteButtonBounds=null,p.rotateButtonBounds=null)),{offsetX:D,offsetY:F}}(e,r,l,f.tileMap,f.furniture,f.getCharacters(),i,n.x,n.y,f.getSelectedCharId(),f.getHoveredCharId(),f.layout.tileColors,f.layout.cols,f.layout.rows,t,f.backgroundImage,f.characterScale),V.current=null!=t?t:null}});j.current=p,f.onDirty=p;let C=new Y(f,b,p);return t(C),()=>{C.dispose(),w.current=null,g.disconnect()}},[W,K,w,x,L,s,t]);let G=(0,i.useCallback)((e,t)=>{let r=B.current;if(!r)return{x:0,y:0};let l=r.getBoundingClientRect(),i=x.current,{offsetX:a,offsetY:n}=N.current;return{x:(e-l.left-a)/i,y:(t-l.top-n)/i}},[x]),Z=(0,i.useCallback)((e,t)=>({col:Math.floor(e/h.dn),row:Math.floor(t/h.dn)}),[]),$=(0,i.useCallback)((e,t)=>{let r=G(e,t);return Z(r.x,r.y)},[G,Z]),J=(0,i.useCallback)(e=>{if(z.current=!0,H.current={x:e.clientX,y:e.clientY,panX:L.current.x,panY:L.current.y},U.current&&s.current.selectedFurnitureUid){var t;let r=$(e.clientX,e.clientY),l=null==(t=w.current)?void 0:t.layout;if(l){let e=(0,F.iH)(l,r.col,r.row);e&&e.uid===s.current.selectedFurnitureUid&&(null==f||f(r.col,r.row))}}},[L,s,w,$,f]),Q=(0,i.useCallback)(e=>{var t,r;let l=w.current;if(l&&!U.current){let t=G(e.clientX,e.clientY);l.setHoveredCharAtPixel(t.x,t.y),l.dirty&&(null==(r=j.current)||r.call(j))}if(U.current){let t=$(e.clientX,e.clientY);s.current.dragUid?null==g||g(t.col,t.row):null==d||d(t.col,t.row)}if(!z.current||!h.eR||s.current.dragUid)return;let i=e.clientX-H.current.x,a=e.clientY-H.current.y;L.current={x:H.current.panX+i,y:H.current.panY+a},null==(t=j.current)||t.call(j)},[G,$,w,L,s,g,d]),ee=(0,i.useCallback)(e=>{let t=z.current;if(z.current=!1,s.current.dragUid){let t=$(e.clientX,e.clientY);null==m||m(t.col,t.row);return}let r=Math.abs(e.clientX-H.current.x),l=Math.abs(e.clientY-H.current.y);if(t&&(r>5||l>5))return;let i=w.current;if(!i)return;if(U.current){let t=V.current;if(t){let r=B.current;if(r){let l=r.getBoundingClientRect(),i=e.clientX-l.left,a=e.clientY-l.top;if(t.deleteButtonBounds){let{cx:e,cy:r,radius:l}=t.deleteButtonBounds;if(Math.sqrt((i-e)**2+(a-r)**2)<=l){null==b||b();return}}if(t.rotateButtonBounds){let{cx:e,cy:r,radius:l}=t.rotateButtonBounds;if(Math.sqrt((i-e)**2+(a-r)**2)<=l){null==p||p();return}}}}let r=$(e.clientX,e.clientY);null==o||o(r.col,r.row);return}let a=G(e.clientX,e.clientY),n=i.getAgentAtPixel(a.x,a.y);n&&_.current(n)},[G,$,w,s,o,m,b,p]),et=(0,i.useCallback)(e=>{if(!U.current)return;e.preventDefault();let t=$(e.clientX,e.clientY);null==c||c(t.col,t.row)},[$,c]),er=(0,i.useCallback)(e=>{},[]),el=(0,i.useRef)([]),ei=(0,i.useRef)(0),ea=(0,i.useCallback)(e=>{if(el.current=Array.from(e.touches),2===e.touches.length){let t=e.touches[0].clientX-e.touches[1].clientX,r=e.touches[0].clientY-e.touches[1].clientY;ei.current=Math.sqrt(t*t+r*r)}else 1===e.touches.length&&(z.current=!0,H.current={x:e.touches[0].clientX,y:e.touches[0].clientY,panX:L.current.x,panY:L.current.y})},[L]),en=(0,i.useCallback)(e=>{var t,r;if(2===e.touches.length){let r=e.touches[0].clientX-e.touches[1].clientX,l=e.touches[0].clientY-e.touches[1].clientY,i=Math.sqrt(r*r+l*l),a=i-ei.current;Math.abs(a)>20&&(x.current=Math.max(h.DH,Math.min(h.ZV,x.current+(a>0?1:-1))),ei.current=i,null==(t=j.current)||t.call(j))}else if(1===e.touches.length&&z.current&&h.eR){let t=e.touches[0].clientX-H.current.x,l=e.touches[0].clientY-H.current.y;L.current={x:H.current.panX+t,y:H.current.panY+l},null==(r=j.current)||r.call(j)}},[x,L]),es=(0,i.useCallback)(e=>{if(0===e.touches.length&&1===el.current.length){let e=el.current[0],t=Math.abs(e.clientX-H.current.x),r=Math.abs(e.clientY-H.current.y);if(t<10&&r<10)if(U.current){let t=$(e.clientX,e.clientY);null==o||o(t.col,t.row)}else{let t=w.current;if(t){let r=G(e.clientX,e.clientY),l=t.getAgentAtPixel(r.x,r.y);l&&_.current(l)}}}z.current=!1,el.current=Array.from(e.touches)},[G,$,w,o]),eo=n?s.current.activeTool===a.VF.ERASE?"crosshair":s.current.activeTool===a.VF.EYEDROPPER?"copy":s.current.activeTool===a.VF.FURNITURE_PLACE?"cell":s.current.dragUid?"grabbing":"default":"grab";return(0,l.jsxs)("div",{style:{width:"100%",height:"100%",overflow:"hidden",backgroundColor:P.lr},children:[!W&&(0,l.jsx)("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#6b7280",fontSize:14,fontFamily:"system-ui, sans-serif",zIndex:10},children:"Loading office..."}),(0,l.jsx)("canvas",{ref:B,onPointerDown:J,onPointerMove:Q,onPointerUp:ee,onContextMenu:et,onWheel:er,onTouchStart:ea,onTouchMove:en,onTouchEnd:es,style:{display:"block",width:"100%",height:"100%",touchAction:"none",cursor:eo}})]})}},5702:(e,t,r)=>{r.d(t,{Y:()=>a,k:()=>n});let l=new Map,i=new WeakMap;function a(e){let t=i.get(e);if(t)return t;let r=e.length,l=e[0].length,a=[];for(let e=0;e<r+2;e++)a.push(Array(l+2).fill(""));for(let t=0;t<r;t++)for(let r=0;r<l;r++){if(""===e[t][r])continue;let l=t+1,i=r+1;""===a[l-1][i]&&(a[l-1][i]="#FFFFFF"),""===a[l+1][i]&&(a[l+1][i]="#FFFFFF"),""===a[l][i-1]&&(a[l][i-1]="#FFFFFF"),""===a[l][i+1]&&(a[l][i+1]="#FFFFFF")}for(let t=0;t<r;t++)for(let r=0;r<l;r++)""!==e[t][r]&&(a[t+1][r+1]="");return i.set(e,a),a}function n(e,t){let r=Math.round(100*t)/100,i=l.get(r);i||(i=new WeakMap,l.set(r,i));let a=i.get(e);if(a)return a;let n=e.length,s=e[0].length,o=document.createElement("canvas");o.width=s*r,o.height=n*r;let c=o.getContext("2d");c.imageSmoothingEnabled=!1;for(let t=0;t<n;t++)for(let l=0;l<s;l++){let i=e[t][l];""!==i&&(c.fillStyle=i,c.fillRect(l*r,t*r,r,r))}return i.set(e,o),o}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[293,484],{5293:(e,t,i)=>{var n,r,s,a,o;function u(e,t,i,n){if("a"===i&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}function c(e,t,i,n,r){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!r)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?r.call(e,i):r?r.value=i:t.set(e,i),i}i.r(t),i.d(t,{Channel:()=>_,PluginListener:()=>f,Resource:()=>v,SERIALIZE_TO_IPC_FN:()=>l,addPluginListener:()=>d,checkPermissions:()=>E,convertFileSrc:()=>g,invoke:()=>p,isTauri:()=>I,requestPermissions:()=>w,transformCallback:()=>h}),"function"==typeof SuppressedError&&SuppressedError;let l="__TAURI_TO_IPC_KEY__";function h(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}class _{constructor(e){n.set(this,void 0),r.set(this,0),s.set(this,[]),a.set(this,void 0),c(this,n,e||(()=>{}),"f"),this.id=h(e=>{let t=e.index;if("end"in e)return void(t==u(this,r,"f")?this.cleanupCallback():c(this,a,t,"f"));let i=e.message;if(t==u(this,r,"f")){for(u(this,n,"f").call(this,i),c(this,r,u(this,r,"f")+1,"f");u(this,r,"f")in u(this,s,"f");){let e=u(this,s,"f")[u(this,r,"f")];u(this,n,"f").call(this,e),delete u(this,s,"f")[u(this,r,"f")],c(this,r,u(this,r,"f")+1,"f")}u(this,r,"f")===u(this,a,"f")&&this.cleanupCallback()}else u(this,s,"f")[t]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){c(this,n,e,"f")}get onmessage(){return u(this,n,"f")}[(n=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,l)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[l]()}}class f{constructor(e,t,i){this.plugin=e,this.event=t,this.channelId=i}async unregister(){return p(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function d(e,t,i){let n=new _(i);try{return await p(`plugin:${e}|register_listener`,{event:t,handler:n}),new f(e,t,n.id)}catch{return await p(`plugin:${e}|registerListener`,{event:t,handler:n}),new f(e,t,n.id)}}async function E(e){return p(`plugin:${e}|check_permissions`)}async function w(e){return p(`plugin:${e}|request_permissions`)}async function p(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}function g(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}class v{get rid(){return u(this,o,"f")}constructor(e){o.set(this,void 0),c(this,o,e,"f")}async close(){return p("plugin:resources|close",{rid:this.rid})}}function I(){return!!(globalThis||window).isTauri}o=new WeakMap},9484:(e,t,i)=>{i.d(t,{D4:()=>c,Ic:()=>u,Oo:()=>o,es:()=>n,listen:()=>a});var n,r=i(5293);async function s(e,t){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,t),await (0,r.invoke)("plugin:event|unlisten",{event:e,eventId:t})}async function a(e,t,i){var n;let a="string"==typeof(null==i?void 0:i.target)?{kind:"AnyLabel",label:i.target}:null!=(n=null==i?void 0:i.target)?n:{kind:"Any"};return(0,r.invoke)("plugin:event|listen",{event:e,target:a,handler:(0,r.transformCallback)(t)}).then(t=>async()=>s(e,t))}async function o(e,t,i){return a(e,i=>{s(e,i.id),t(i)},i)}async function u(e,t){await (0,r.invoke)("plugin:event|emit",{event:e,payload:t})}async function c(e,t,i){await (0,r.invoke)("plugin:event|emit_to",{target:"string"==typeof e?{kind:"AnyLabel",label:e}:e,event:t,payload:i})}!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([[606],{606:(e,t,a)=>{a.r(t),a.d(t,{ConfettiOverlay:()=>d,default:()=>c});var n=a(206),r=a(1406),o=a(5192),l=a(7877),i=a(1310),s=a(370);function d(){let e=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t,a=e.current;if(!a)return;let n=a.getContext("2d");if(!n)return;a.width=window.innerWidth,a.height=window.innerHeight;let r=["#ff6b6b","#feca57","#48dbfb","#ff9ff3","#54a0ff","#5f27cd","#01a3a4","#ff5e57","#0abde3","#10ac84"],o=[],l=a.width,i=a.height;for(let e=0;e<120;e++)o.push({x:Math.random()*l,y:-Math.random()*i*.8,vx:(Math.random()-.5)*2,vy:1.5+3*Math.random(),w:6+8*Math.random(),h:4+6*Math.random(),rot:Math.random()*Math.PI*2,rotSpeed:(Math.random()-.5)*.15,color:r[Math.floor(Math.random()*r.length)],alpha:1});let s=performance.now(),d=e=>{let a=e-s,r=a>2200?Math.max(0,1-(a-2200)/800):1;for(let t of(n.clearRect(0,0,l,i),o))t.x+=t.vx+.5*Math.sin(.002*e+t.rot),t.y+=t.vy,t.rot+=t.rotSpeed,t.x<-20&&(t.x=l+20),t.x>l+20&&(t.x=-20),t.y>i+20&&(t.y=-10,t.x=Math.random()*l),n.save(),n.translate(t.x,t.y),n.rotate(t.rot),n.globalAlpha=r,n.fillStyle=t.color,n.fillRect(-t.w/2,-t.h/2,t.w,t.h),n.restore();a<3e3&&(t=requestAnimationFrame(d))};return t=requestAnimationFrame(d),()=>cancelAnimationFrame(t)},[]),(0,n.jsx)("canvas",{ref:e,className:"fixed inset-0 z-[10000] pointer-events-none"})}let c=function(e){let{previewUrl:t,previewPath:a,onPreview:r,onDismiss:d,previewCmd:c,previewPort:h,projectDir:x,entryFile:f}=e,m={previewUrl:t,previewCmd:c,previewPort:h,previewPath:a,entryFile:f},u=(0,l.P9)(m),p=!u&&(0,l.iv)({previewPath:a,previewCmd:c,previewPort:h,projectDir:x,entryFile:f});return(0,n.jsx)(i.A,{open:!0,onClose:d,maxWidth:420,zIndex:9999,footer:(0,n.jsxs)(n.Fragment,{children:[u&&(0,n.jsxs)(s.A,{variant:"success",onClick:()=>{let e=(0,l.iv)({previewPath:a,previewCmd:c,previewPort:h,projectDir:x,entryFile:f});e&&(0,o.S8)(e);let t=(0,l.vG)(m);t&&r(t)},style:{padding:"9px 20px"},children:["▶"," Preview"]}),p&&(0,n.jsxs)(s.A,{onClick:()=>{let e=(0,l.iv)({previewPath:a,previewCmd:c,previewPort:h,projectDir:x,entryFile:f});e&&(0,o.S8)(e),d()},style:{padding:"9px 20px",borderColor:"var(--term-sem-blue)",color:"var(--term-sem-blue)"},children:["▶"," Launch"]}),(0,n.jsx)(s.A,{variant:"dim",onClick:d,style:{padding:"9px 20px"},children:"OK"})]}),children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"text-[34px] mb-2.5 text-accent",children:"★"}),(0,n.jsx)("div",{className:"px-font text-accent text-sm mb-2.5 tracking-wide",children:"Mission Complete!"}),(0,n.jsx)("div",{className:"text-muted-foreground text-sm leading-[1.7] font-mono",children:"Your task has been completed successfully. Ready for the next mission whenever you are."})]})})}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[611],{3611:(e,n,t)=>{t.r(n),t.d(n,{default:()=>l});var c=t(1406),s=t(5192);function l(){return(0,c.useEffect)(()=>{let e=!0;return Promise.all([t.e(284),t.e(88)]).then(t.bind(t,4088)).then(n=>{e&&(0,s.J0)({connect:n.connectToAbly,send:n.sendCommand,disconnect:n.disconnectAbly})}),()=>{e=!1}},[]),null}}}]);
|