profclaw 0.0.1-beta.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -38
- package/CONTRIBUTING.md +3 -5
- package/README.md +128 -63
- package/dist/chat/execution/tools/index.d.ts +1 -1
- package/dist/chat/execution/tools/index.js +41 -2
- package/dist/chat/providers/slack/index.d.ts +2 -2
- package/dist/cli/commands/models.js +39 -26
- package/dist/cli/commands/onboard.js +64 -79
- package/dist/cli/commands/setup.js +293 -90
- package/dist/cli/index.js +0 -6
- package/dist/cli/providers.d.ts +15 -0
- package/dist/cli/providers.js +41 -0
- package/dist/core/deployment.js +2 -0
- package/dist/providers/ai-sdk.js +26 -6
- package/dist/routes/channels.d.ts +12 -0
- package/dist/routes/channels.js +166 -0
- package/dist/server/route-loader.js +1 -0
- package/dist/server.js +115 -109
- package/package.json +1 -1
- package/skills/git-workflow/SKILL.md +3 -3
- package/ui/dist/assets/{ActivityView-DIPQSJ_d.js → ActivityView-BeshZXmE.js} +1 -1
- package/ui/dist/assets/{AgentList-CqyaYrcq.js → AgentList-QVHeldPi.js} +1 -1
- package/ui/dist/assets/{AnalyticsDashboard-C-mjuGHT.js → AnalyticsDashboard-C9R97dXE.js} +1 -1
- package/ui/dist/assets/{AreaChart-CfYWmbtr.js → AreaChart-B73gaiVQ.js} +1 -1
- package/ui/dist/assets/{CartesianChart-BaQ3It0c.js → CartesianChart-CXYL2R-A.js} +1 -1
- package/ui/dist/assets/{ChatView-DxxQy6pl.js → ChatView-qjZErlrp.js} +1 -1
- package/ui/dist/assets/{CostsDashboard-CDBBcGkg.js → CostsDashboard-O4DCLy1i.js} +1 -1
- package/ui/dist/assets/{EstimateSelect-CDjf5qKl.js → EstimateSelect-1hQf4Osk.js} +1 -1
- package/ui/dist/assets/{FloatingChatbot-CZHjvJIe.js → FloatingChatbot-BZBzrJxd.js} +1 -1
- package/ui/dist/assets/{InviteCodeManagement-DTm-IPTm.js → InviteCodeManagement-LEoGqYeA.js} +1 -1
- package/ui/dist/assets/{ProjectDetail-DlYUcOss.js → ProjectDetail--gPfvATB.js} +1 -1
- package/ui/dist/assets/{ProjectIcon-BMRpnM04.js → ProjectIcon-Chd_ofsw.js} +1 -1
- package/ui/dist/assets/{ProjectList-D85TN0i0.js → ProjectList-BvUfVB6c.js} +1 -1
- package/ui/dist/assets/{Settings-CgPqzUvj.js → Settings-1kaf7VHE.js} +1 -1
- package/ui/dist/assets/{StatusIndicator-yig0uZEA.js → StatusIndicator-pRfkNcdV.js} +1 -1
- package/ui/dist/assets/{SummaryDetail-CwLAfHgJ.js → SummaryDetail-DV3AmONk.js} +1 -1
- package/ui/dist/assets/{SummaryList-BvS5Idnu.js → SummaryList-B6kXiTxL.js} +1 -1
- package/ui/dist/assets/{TaskDetail-zarC1fOt.js → TaskDetail-CV6CzbOS.js} +1 -1
- package/ui/dist/assets/{TaskList-CyJq3ANE.js → TaskList-DL7brQKd.js} +1 -1
- package/ui/dist/assets/{TicketBoard-BlWr3-iH.js → TicketBoard-CrkkFj7C.js} +1 -1
- package/ui/dist/assets/{TicketDetail-DmqWKj2W.js → TicketDetail-hnnYclpD.js} +1 -1
- package/ui/dist/assets/{TicketList-Scj4pMWa.js → TicketList-CsDAyQCL.js} +1 -1
- package/ui/dist/assets/{UserManagement-BH7uG7dw.js → UserManagement-BGFQyTSr.js} +1 -1
- package/ui/dist/assets/{ViewSwitcher-3HzZUdWn.js → ViewSwitcher-CnL0OqA8.js} +1 -1
- package/ui/dist/assets/{alert-dialog-DWPb2IfQ.js → alert-dialog-SKM6Gjz4.js} +1 -1
- package/ui/dist/assets/{archive-CGck7gxR.js → archive-BsLa7brF.js} +1 -1
- package/ui/dist/assets/{badge-DEmc3Z_l.js → badge-CVHH1a-v.js} +1 -1
- package/ui/dist/assets/{brain-CfFdLVqb.js → brain-6o_RHVpe.js} +1 -1
- package/ui/dist/assets/{bug-DqSGPUUE.js → bug-CmZI7jqM.js} +1 -1
- package/ui/dist/assets/{calendar-BuZ4zbPW.js → calendar-Bf0t2B82.js} +1 -1
- package/ui/dist/assets/{chevron-up-DcJ4LL_N.js → chevron-up-CoUsOvZj.js} +1 -1
- package/ui/dist/assets/{circle-x-C78PNZjF.js → circle-x-Dgw11LgT.js} +1 -1
- package/ui/dist/assets/{constants-DhDjZe4P.js → constants-Q5Zivl-a.js} +1 -1
- package/ui/dist/assets/{cpu-Ck6AoG8c.js → cpu-DiPMQICV.js} +1 -1
- package/ui/dist/assets/{database-CA2w8Lvt.js → database-BwTfupDi.js} +1 -1
- package/ui/dist/assets/{dialog-BOdGWhgE.js → dialog-BUqN9Psj.js} +1 -1
- package/ui/dist/assets/{ellipsis-FhHKRbfl.js → ellipsis-UJx4Xnf6.js} +1 -1
- package/ui/dist/assets/{ellipsis-vertical-CO0UqE4-.js → ellipsis-vertical-DoULYEKn.js} +1 -1
- package/ui/dist/assets/{file-code-ChnhYYj1.js → file-code-B2UrJLwi.js} +1 -1
- package/ui/dist/assets/{folder-open-CHwA1-ve.js → folder-open-BJi577JH.js} +1 -1
- package/ui/dist/assets/{funnel-ByEjRFNB.js → funnel-PkaD_HSR.js} +1 -1
- package/ui/dist/assets/{git-branch-GTOPQgU4.js → git-branch-C_K30am0.js} +1 -1
- package/ui/dist/assets/{git-commit-horizontal-F5M84Kut.js → git-commit-horizontal-IT6ecxWQ.js} +1 -1
- package/ui/dist/assets/{globe-CQWfr7hT.js → globe-f-jjCa_g.js} +1 -1
- package/ui/dist/assets/{hash-nKC9gtLg.js → hash-DNEv8Elo.js} +1 -1
- package/ui/dist/assets/{history-DfFSA9xJ.js → history-BQSBo_1Q.js} +1 -1
- package/ui/dist/assets/{index-DHGvP9mp.js → index-BUmnwPQr.js} +1 -1
- package/ui/dist/assets/{index-Z4-RtZcs.js → index-BfF5G4Cw.js} +1 -1
- package/ui/dist/assets/{index-DeI8lKRR.js → index-C8N375c2.js} +1 -1
- package/ui/dist/assets/index-CuxnqVVz.css +1 -0
- package/ui/dist/assets/{index-Ca3vk7Gq.js → index-CzMM3QOk.js} +1 -1
- package/ui/dist/assets/{index--JkIxVXb.js → index-lJlNPFVJ.js} +3 -3
- package/ui/dist/assets/{index-a4Fxq0Hb.js → index-nS3EErDg.js} +1 -1
- package/ui/dist/assets/{layers-DFeLExSa.js → layers-jFqVrWMD.js} +1 -1
- package/ui/dist/assets/{layout-dashboard-WmgjMhWF.js → layout-dashboard-CcKt1hXw.js} +1 -1
- package/ui/dist/assets/{lightbulb-Bo8hEr7B.js → lightbulb-Jhp7FvbU.js} +1 -1
- package/ui/dist/assets/{link-2-YqrpQXBH.js → link-2-DdO7ostF.js} +1 -1
- package/ui/dist/assets/{markdown-renderer-Croje6Xe.js → markdown-renderer-n1ToC4XQ.js} +1 -1
- package/ui/dist/assets/{message-square-CD0H5hot.js → message-square-CBgH65X7.js} +1 -1
- package/ui/dist/assets/{pencil-DpFnj5dn.js → pencil-CYXCEPQh.js} +1 -1
- package/ui/dist/assets/{play-DVgea_jT.js → play-d1ONaH0-.js} +1 -1
- package/ui/dist/assets/{popover-JXecfWG5.js → popover-CrmZgoWu.js} +1 -1
- package/ui/dist/assets/{progress-C1ghf1Fu.js → progress-uv4SPkL5.js} +1 -1
- package/ui/dist/assets/{rocket-BFxPYGx9.js → rocket-DhvUetsk.js} +1 -1
- package/ui/dist/assets/{select-MADP8m6Q.js → select-CeQ8AHGy.js} +1 -1
- package/ui/dist/assets/{send-eYnW_7n-.js → send-P0r5D7td.js} +1 -1
- package/ui/dist/assets/{server-CPMaysH8.js → server-CVHTZB72.js} +1 -1
- package/ui/dist/assets/{settings-2-scXUOuE_.js → settings-2-ocj5uHGx.js} +1 -1
- package/ui/dist/assets/{sheet-r6NSOxi-.js → sheet-DuQExSho.js} +1 -1
- package/ui/dist/assets/{shield-check-PEr7nmVw.js → shield-check-DfVdE34l.js} +1 -1
- package/ui/dist/assets/{shield-off-CLtXio62.js → shield-off-8l0J6R-8.js} +1 -1
- package/ui/dist/assets/{skeleton-C9oEzNlU.js → skeleton-TFiFJ3nB.js} +1 -1
- package/ui/dist/assets/{smartphone-DusFfY0U.js → smartphone-77_g3SQn.js} +1 -1
- package/ui/dist/assets/{square-e1yxB2eR.js → square-Ckzsr3Rn.js} +1 -1
- package/ui/dist/assets/{switch-tNs0n-kz.js → switch-CAePkd6k.js} +1 -1
- package/ui/dist/assets/{table-CXxtLicg.js → table-ZjAZ7hkt.js} +1 -1
- package/ui/dist/assets/{tag-tAwMmQ9G.js → tag-C35mgoEv.js} +1 -1
- package/ui/dist/assets/{textarea-BjiEeIWh.js → textarea-DsVPnSgR.js} +1 -1
- package/ui/dist/assets/{timer-Vel1N3RP.js → timer-DHJBS2w1.js} +1 -1
- package/ui/dist/assets/{tooltip-ZMwtfr1J.js → tooltip-BYmQ331W.js} +1 -1
- package/ui/dist/assets/{trash-2-eM-CNwsZ.js → trash-2-keO5tKPE.js} +1 -1
- package/ui/dist/assets/{trending-up-BGafmjRo.js → trending-up-BBv8KbrY.js} +1 -1
- package/ui/dist/assets/{wand-sparkles-DPvcd9Pi.js → wand-sparkles-BusQ52ZK.js} +1 -1
- package/ui/dist/assets/{wrench-B8s3zYVV.js → wrench-02YaOSiK.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/dist/chat/auto-reply.d.ts +0 -90
- package/dist/chat/auto-reply.js +0 -272
- package/dist/chat/execution/pty.d.ts +0 -92
- package/dist/chat/execution/pty.js +0 -285
- package/dist/chat/execution/tools/glinr-ops.d.ts +0 -202
- package/dist/chat/execution/tools/glinr-ops.js +0 -694
- package/dist/cli/commands/browser.d.ts +0 -3
- package/dist/cli/commands/browser.js +0 -138
- package/dist/cli/commands/canvas.d.ts +0 -3
- package/dist/cli/commands/canvas.js +0 -155
- package/dist/cli/commands/nodes.d.ts +0 -3
- package/dist/cli/commands/nodes.js +0 -193
- package/dist/diagnostics/exporters.d.ts +0 -21
- package/dist/diagnostics/exporters.js +0 -138
- package/dist/diagnostics/index.d.ts +0 -10
- package/dist/diagnostics/index.js +0 -9
- package/dist/diagnostics/middleware.d.ts +0 -12
- package/dist/diagnostics/middleware.js +0 -58
- package/dist/diagnostics/tracer.d.ts +0 -133
- package/dist/diagnostics/tracer.js +0 -257
- package/dist/discovery/index.d.ts +0 -8
- package/dist/discovery/index.js +0 -7
- package/dist/discovery/mdns.d.ts +0 -40
- package/dist/discovery/mdns.js +0 -249
- package/dist/plugins/registry.d.ts +0 -122
- package/dist/plugins/registry.js +0 -352
- package/dist/plugins/sandbox.d.ts +0 -77
- package/dist/plugins/sandbox.js +0 -287
- package/dist/plugins/search/brave.d.ts +0 -9
- package/dist/plugins/search/brave.js +0 -157
- package/dist/plugins/search/duckduckgo.d.ts +0 -9
- package/dist/plugins/search/duckduckgo.js +0 -171
- package/dist/plugins/search/index.d.ts +0 -13
- package/dist/plugins/search/index.js +0 -23
- package/dist/plugins/search/searxng.d.ts +0 -9
- package/dist/plugins/search/searxng.js +0 -170
- package/dist/plugins/search/serper.d.ts +0 -9
- package/dist/plugins/search/serper.js +0 -135
- package/dist/plugins/search/tavily.d.ts +0 -9
- package/dist/plugins/search/tavily.js +0 -146
- package/dist/providers/adapters/anthropic.d.ts +0 -26
- package/dist/providers/adapters/anthropic.js +0 -306
- package/dist/providers/adapters/base.d.ts +0 -53
- package/dist/providers/adapters/base.js +0 -99
- package/dist/providers/adapters/ollama.d.ts +0 -30
- package/dist/providers/adapters/ollama.js +0 -292
- package/dist/utils/ai-cache.d.ts +0 -72
- package/dist/utils/ai-cache.js +0 -204
- package/dist/utils/file-lock.d.ts +0 -85
- package/dist/utils/file-lock.js +0 -204
- package/ui/dist/assets/index-WclMPci1.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FloatingChatbot-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FloatingChatbot-BZBzrJxd.js","assets/markdown-renderer-n1ToC4XQ.js","assets/defineProperty-CoXUr7_6.js","assets/cpu-DiPMQICV.js","assets/trash-2-keO5tKPE.js","assets/send-P0r5D7td.js","assets/message-square-CBgH65X7.js","assets/layout-dashboard-CcKt1hXw.js","assets/brain-6o_RHVpe.js","assets/wrench-02YaOSiK.js","assets/circle-x-Dgw11LgT.js","assets/AnalyticsDashboard-C9R97dXE.js","assets/badge-CVHH1a-v.js","assets/CartesianChart-CXYL2R-A.js","assets/AreaChart-B73gaiVQ.js","assets/trending-up-BBv8KbrY.js","assets/git-branch-C_K30am0.js","assets/TaskList-DL7brQKd.js","assets/select-CeQ8AHGy.js","assets/chevron-up-CoUsOvZj.js","assets/table-ZjAZ7hkt.js","assets/dialog-BUqN9Psj.js","assets/textarea-DsVPnSgR.js","assets/play-d1ONaH0-.js","assets/funnel-PkaD_HSR.js","assets/ellipsis-UJx4Xnf6.js","assets/TaskDetail-CV6CzbOS.js","assets/StatusIndicator-pRfkNcdV.js","assets/hash-DNEv8Elo.js","assets/square-Ckzsr3Rn.js","assets/calendar-Bf0t2B82.js","assets/history-BQSBo_1Q.js","assets/SummaryList-B6kXiTxL.js","assets/SummaryDetail-DV3AmONk.js","assets/skeleton-TFiFJ3nB.js","assets/file-code-B2UrJLwi.js","assets/link-2-DdO7ostF.js","assets/lightbulb-Jhp7FvbU.js","assets/AgentList-QVHeldPi.js","assets/shield-check-DfVdE34l.js","assets/Settings-1kaf7VHE.js","assets/switch-CAePkd6k.js","assets/constants-Q5Zivl-a.js","assets/settings-2-ocj5uHGx.js","assets/tag-C35mgoEv.js","assets/smartphone-77_g3SQn.js","assets/database-BwTfupDi.js","assets/globe-f-jjCa_g.js","assets/timer-DHJBS2w1.js","assets/pencil-CYXCEPQh.js","assets/alert-dialog-SKM6Gjz4.js","assets/bug-CmZI7jqM.js","assets/git-commit-horizontal-IT6ecxWQ.js","assets/tooltip-BYmQ331W.js","assets/server-CVHTZB72.js","assets/shield-off-8l0J6R-8.js","assets/CostsDashboard-O4DCLy1i.js","assets/index-nS3EErDg.js","assets/index-BUmnwPQr.js","assets/index-BfF5G4Cw.js","assets/progress-uv4SPkL5.js","assets/TicketList-CsDAyQCL.js","assets/popover-CrmZgoWu.js","assets/ViewSwitcher-CnL0OqA8.js","assets/EstimateSelect-1hQf4Osk.js","assets/wand-sparkles-BusQ52ZK.js","assets/folder-open-BJi577JH.js","assets/layers-jFqVrWMD.js","assets/TicketDetail-hnnYclpD.js","assets/ellipsis-vertical-DoULYEKn.js","assets/TicketBoard-CrkkFj7C.js","assets/element-adapter-DL0DQilL.js","assets/ChatView-qjZErlrp.js","assets/rocket-DhvUetsk.js","assets/sheet-DuQExSho.js","assets/ProjectList-BvUfVB6c.js","assets/ProjectIcon-Chd_ofsw.js","assets/archive-BsLa7brF.js","assets/ProjectDetail--gPfvATB.js","assets/ProjectDetail-D1-0B2xV.css","assets/index-C8N375c2.js","assets/ActivityView-BeshZXmE.js","assets/UserManagement-BGFQyTSr.js","assets/InviteCodeManagement-LEoGqYeA.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function J5(e,a){for(var s=0;s<a.length;s++){const i=a[s];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in e)){const u=Object.getOwnPropertyDescriptor(i,c);u&&Object.defineProperty(e,c,u.get?u:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function s(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(c){if(c.ep)return;c.ep=!0;const u=s(c);fetch(c.href,u)}})();var eM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vf={exports:{}},zl={};var Cg;function W5(){if(Cg)return zl;Cg=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function s(i,c,u){var f=null;if(u!==void 0&&(f=""+u),c.key!==void 0&&(f=""+c.key),"key"in c){u={};for(var m in c)m!=="key"&&(u[m]=c[m])}else u=c;return c=u.ref,{$$typeof:e,type:i,key:f,ref:c!==void 0?c:null,props:u}}return zl.Fragment=a,zl.jsx=s,zl.jsxs=s,zl}var Ag;function e4(){return Ag||(Ag=1,Vf.exports=W5()),Vf.exports}var o=e4(),If={exports:{}},Ue={};var Rg;function t4(){if(Rg)return Ue;Rg=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.iterator;function S(T){return T===null||typeof T!="object"?null:(T=w&&T[w]||T["@@iterator"],typeof T=="function"?T:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,A={};function R(T,O,q){this.props=T,this.context=O,this.refs=A,this.updater=q||N}R.prototype.isReactComponent={},R.prototype.setState=function(T,O){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,O,"setState")},R.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function M(){}M.prototype=R.prototype;function _(T,O,q){this.props=T,this.context=O,this.refs=A,this.updater=q||N}var U=_.prototype=new M;U.constructor=_,j(U,R.prototype),U.isPureReactComponent=!0;var H=Array.isArray;function P(){}var E={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function J(T,O,q){var Z=q.ref;return{$$typeof:e,type:T,key:O,ref:Z!==void 0?Z:null,props:q}}function oe(T,O){return J(T.type,O,T.props)}function ae(T){return typeof T=="object"&&T!==null&&T.$$typeof===e}function fe(T){var O={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(q){return O[q]})}var ge=/\/+/g;function pe(T,O){return typeof T=="object"&&T!==null&&T.key!=null?fe(""+T.key):O.toString(36)}function ve(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(P,P):(T.status="pending",T.then(function(O){T.status==="pending"&&(T.status="fulfilled",T.value=O)},function(O){T.status==="pending"&&(T.status="rejected",T.reason=O)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function L(T,O,q,Z,ee){var ue=typeof T;(ue==="undefined"||ue==="boolean")&&(T=null);var le=!1;if(T===null)le=!0;else switch(ue){case"bigint":case"string":case"number":le=!0;break;case"object":switch(T.$$typeof){case e:case a:le=!0;break;case x:return le=T._init,L(le(T._payload),O,q,Z,ee)}}if(le)return ee=ee(T),le=Z===""?"."+pe(T,0):Z,H(ee)?(q="",le!=null&&(q=le.replace(ge,"$&/")+"/"),L(ee,O,q,"",function(gt){return gt})):ee!=null&&(ae(ee)&&(ee=oe(ee,q+(ee.key==null||T&&T.key===ee.key?"":(""+ee.key).replace(ge,"$&/")+"/")+le)),O.push(ee)),1;le=0;var we=Z===""?".":Z+":";if(H(T))for(var _e=0;_e<T.length;_e++)Z=T[_e],ue=we+pe(Z,_e),le+=L(Z,O,q,ue,ee);else if(_e=S(T),typeof _e=="function")for(T=_e.call(T),_e=0;!(Z=T.next()).done;)Z=Z.value,ue=we+pe(Z,_e++),le+=L(Z,O,q,ue,ee);else if(ue==="object"){if(typeof T.then=="function")return L(ve(T),O,q,Z,ee);throw O=String(T),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return le}function W(T,O,q){if(T==null)return T;var Z=[],ee=0;return L(T,Z,"","",function(ue){return O.call(q,ue,ee++)}),Z}function G(T){if(T._status===-1){var O=T._result;O=O(),O.then(function(q){(T._status===0||T._status===-1)&&(T._status=1,T._result=q)},function(q){(T._status===0||T._status===-1)&&(T._status=2,T._result=q)}),T._status===-1&&(T._status=0,T._result=O)}if(T._status===1)return T._result.default;throw T._result}var F=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},ce={map:W,forEach:function(T,O,q){W(T,function(){O.apply(this,arguments)},q)},count:function(T){var O=0;return W(T,function(){O++}),O},toArray:function(T){return W(T,function(O){return O})||[]},only:function(T){if(!ae(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ue.Activity=g,Ue.Children=ce,Ue.Component=R,Ue.Fragment=s,Ue.Profiler=c,Ue.PureComponent=_,Ue.StrictMode=i,Ue.Suspense=v,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(T){return E.H.useMemoCache(T)}},Ue.cache=function(T){return function(){return T.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(T,O,q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Z=j({},T.props),ee=T.key;if(O!=null)for(ue in O.key!==void 0&&(ee=""+O.key),O)!z.call(O,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&O.ref===void 0||(Z[ue]=O[ue]);var ue=arguments.length-2;if(ue===1)Z.children=q;else if(1<ue){for(var le=Array(ue),we=0;we<ue;we++)le[we]=arguments[we+2];Z.children=le}return J(T.type,ee,Z)},Ue.createContext=function(T){return T={$$typeof:f,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:u,_context:T},T},Ue.createElement=function(T,O,q){var Z,ee={},ue=null;if(O!=null)for(Z in O.key!==void 0&&(ue=""+O.key),O)z.call(O,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=O[Z]);var le=arguments.length-2;if(le===1)ee.children=q;else if(1<le){for(var we=Array(le),_e=0;_e<le;_e++)we[_e]=arguments[_e+2];ee.children=we}if(T&&T.defaultProps)for(Z in le=T.defaultProps,le)ee[Z]===void 0&&(ee[Z]=le[Z]);return J(T,ue,ee)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(T){return{$$typeof:m,render:T}},Ue.isValidElement=ae,Ue.lazy=function(T){return{$$typeof:x,_payload:{_status:-1,_result:T},_init:G}},Ue.memo=function(T,O){return{$$typeof:p,type:T,compare:O===void 0?null:O}},Ue.startTransition=function(T){var O=E.T,q={};E.T=q;try{var Z=T(),ee=E.S;ee!==null&&ee(q,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(P,F)}catch(ue){F(ue)}finally{O!==null&&q.types!==null&&(O.types=q.types),E.T=O}},Ue.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Ue.use=function(T){return E.H.use(T)},Ue.useActionState=function(T,O,q){return E.H.useActionState(T,O,q)},Ue.useCallback=function(T,O){return E.H.useCallback(T,O)},Ue.useContext=function(T){return E.H.useContext(T)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(T,O){return E.H.useDeferredValue(T,O)},Ue.useEffect=function(T,O){return E.H.useEffect(T,O)},Ue.useEffectEvent=function(T){return E.H.useEffectEvent(T)},Ue.useId=function(){return E.H.useId()},Ue.useImperativeHandle=function(T,O,q){return E.H.useImperativeHandle(T,O,q)},Ue.useInsertionEffect=function(T,O){return E.H.useInsertionEffect(T,O)},Ue.useLayoutEffect=function(T,O){return E.H.useLayoutEffect(T,O)},Ue.useMemo=function(T,O){return E.H.useMemo(T,O)},Ue.useOptimistic=function(T,O){return E.H.useOptimistic(T,O)},Ue.useReducer=function(T,O,q){return E.H.useReducer(T,O,q)},Ue.useRef=function(T){return E.H.useRef(T)},Ue.useState=function(T){return E.H.useState(T)},Ue.useSyncExternalStore=function(T,O,q){return E.H.useSyncExternalStore(T,O,q)},Ue.useTransition=function(){return E.H.useTransition()},Ue.version="19.2.4",Ue}var Tg;function Kh(){return Tg||(Tg=1,If.exports=t4()),If.exports}var y=Kh();const he=yy(y),xu=J5({__proto__:null,default:he},[y]);var Yf={exports:{}},Ul={},Kf={exports:{}},Qf={};var Mg;function n4(){return Mg||(Mg=1,(function(e){function a(L,W){var G=L.length;L.push(W);e:for(;0<G;){var F=G-1>>>1,ce=L[F];if(0<c(ce,W))L[F]=W,L[G]=ce,G=F;else break e}}function s(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var W=L[0],G=L.pop();if(G!==W){L[0]=G;e:for(var F=0,ce=L.length,T=ce>>>1;F<T;){var O=2*(F+1)-1,q=L[O],Z=O+1,ee=L[Z];if(0>c(q,G))Z<ce&&0>c(ee,q)?(L[F]=ee,L[Z]=G,F=Z):(L[F]=q,L[O]=G,F=O);else if(Z<ce&&0>c(ee,G))L[F]=ee,L[Z]=G,F=Z;else break e}}return W}function c(L,W){var G=L.sortIndex-W.sortIndex;return G!==0?G:L.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var f=Date,m=f.now();e.unstable_now=function(){return f.now()-m}}var v=[],p=[],x=1,g=null,w=3,S=!1,N=!1,j=!1,A=!1,R=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function U(L){for(var W=s(p);W!==null;){if(W.callback===null)i(p);else if(W.startTime<=L)i(p),W.sortIndex=W.expirationTime,a(v,W);else break;W=s(p)}}function H(L){if(j=!1,U(L),!N)if(s(v)!==null)N=!0,P||(P=!0,fe());else{var W=s(p);W!==null&&ve(H,W.startTime-L)}}var P=!1,E=-1,z=5,J=-1;function oe(){return A?!0:!(e.unstable_now()-J<z)}function ae(){if(A=!1,P){var L=e.unstable_now();J=L;var W=!0;try{e:{N=!1,j&&(j=!1,M(E),E=-1),S=!0;var G=w;try{t:{for(U(L),g=s(v);g!==null&&!(g.expirationTime>L&&oe());){var F=g.callback;if(typeof F=="function"){g.callback=null,w=g.priorityLevel;var ce=F(g.expirationTime<=L);if(L=e.unstable_now(),typeof ce=="function"){g.callback=ce,U(L),W=!0;break t}g===s(v)&&i(v),U(L)}else i(v);g=s(v)}if(g!==null)W=!0;else{var T=s(p);T!==null&&ve(H,T.startTime-L),W=!1}}break e}finally{g=null,w=G,S=!1}W=void 0}}finally{W?fe():P=!1}}}var fe;if(typeof _=="function")fe=function(){_(ae)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,pe=ge.port2;ge.port1.onmessage=ae,fe=function(){pe.postMessage(null)}}else fe=function(){R(ae,0)};function ve(L,W){E=R(function(){L(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(L){switch(w){case 1:case 2:case 3:var W=3;break;default:W=w}var G=w;w=W;try{return L()}finally{w=G}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(L,W){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var G=w;w=L;try{return W()}finally{w=G}},e.unstable_scheduleCallback=function(L,W,G){var F=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?F+G:F):G=F,L){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=G+ce,L={id:x++,callback:W,priorityLevel:L,startTime:G,expirationTime:ce,sortIndex:-1},G>F?(L.sortIndex=G,a(p,L),s(v)===null&&L===s(p)&&(j?(M(E),E=-1):j=!0,ve(H,G-F))):(L.sortIndex=ce,a(v,L),N||S||(N=!0,P||(P=!0,fe()))),L},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(L){var W=w;return function(){var G=w;w=W;try{return L.apply(this,arguments)}finally{w=G}}}})(Qf)),Qf}var kg;function a4(){return kg||(kg=1,Kf.exports=n4()),Kf.exports}var Xf={exports:{}},on={};var Og;function r4(){if(Og)return on;Og=1;var e=Kh();function a(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(a(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},c=Symbol.for("react.portal");function u(v,p,x){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:g==null?null:""+g,children:v,containerInfo:p,implementation:x}}var f=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return on.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,on.createPortal=function(v,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return u(v,p,null,x)},on.flushSync=function(v){var p=f.T,x=i.p;try{if(f.T=null,i.p=2,v)return v()}finally{f.T=p,i.p=x,i.d.f()}},on.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(v,p))},on.prefetchDNS=function(v){typeof v=="string"&&i.d.D(v)},on.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var x=p.as,g=m(x,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?i.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:S}):x==="script"&&i.d.X(v,{crossOrigin:g,integrity:w,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},on.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);i.d.M(v,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(v)},on.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,g=m(x,p.crossOrigin);i.d.L(v,x,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},on.preloadModule=function(v,p){if(typeof v=="string")if(p){var x=m(p.as,p.crossOrigin);i.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(v)},on.requestFormReset=function(v){i.d.r(v)},on.unstable_batchedUpdates=function(v,p){return v(p)},on.useFormState=function(v,p,x){return f.H.useFormState(v,p,x)},on.useFormStatus=function(){return f.H.useHostTransitionStatus()},on.version="19.2.4",on}var _g;function xy(){if(_g)return Xf.exports;_g=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Xf.exports=r4(),Xf.exports}var Dg;function s4(){if(Dg)return Ul;Dg=1;var e=a4(),a=Kh(),s=xy();function i(t){var n="https://react.dev/errors/"+t;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var n=t,r=t;if(t.alternate)for(;n.return;)n=n.return;else{t=n;do n=t,(n.flags&4098)!==0&&(r=n.return),t=n.return;while(t)}return n.tag===3?r:null}function f(t){if(t.tag===13){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function m(t){if(t.tag===31){var n=t.memoizedState;if(n===null&&(t=t.alternate,t!==null&&(n=t.memoizedState)),n!==null)return n.dehydrated}return null}function v(t){if(u(t)!==t)throw Error(i(188))}function p(t){var n=t.alternate;if(!n){if(n=u(t),n===null)throw Error(i(188));return n!==t?null:t}for(var r=t,l=n;;){var d=r.return;if(d===null)break;var h=d.alternate;if(h===null){if(l=d.return,l!==null){r=l;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===r)return v(d),t;if(h===l)return v(d),n;h=h.sibling}throw Error(i(188))}if(r.return!==l.return)r=d,l=h;else{for(var b=!1,C=d.child;C;){if(C===r){b=!0,r=d,l=h;break}if(C===l){b=!0,l=d,r=h;break}C=C.sibling}if(!b){for(C=h.child;C;){if(C===r){b=!0,r=h,l=d;break}if(C===l){b=!0,l=h,r=d;break}C=C.sibling}if(!b)throw Error(i(189))}}if(r.alternate!==l)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?t:n}function x(t){var n=t.tag;if(n===5||n===26||n===27||n===6)return t;for(t=t.child;t!==null;){if(n=x(t),n!==null)return n;t=t.sibling}return null}var g=Object.assign,w=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),_=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function fe(t){return t===null||typeof t!="object"?null:(t=ae&&t[ae]||t["@@iterator"],typeof t=="function"?t:null)}var ge=Symbol.for("react.client.reference");function pe(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ge?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case j:return"Fragment";case R:return"Profiler";case A:return"StrictMode";case H:return"Suspense";case P:return"SuspenseList";case J:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case N:return"Portal";case _:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case U:var n=t.render;return t=t.displayName,t||(t=n.displayName||n.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case E:return n=t.displayName||null,n!==null?n:pe(t.type)||"Memo";case z:n=t._payload,t=t._init;try{return pe(t(n))}catch{}}return null}var ve=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},F=[],ce=-1;function T(t){return{current:t}}function O(t){0>ce||(t.current=F[ce],F[ce]=null,ce--)}function q(t,n){ce++,F[ce]=t.current,t.current=n}var Z=T(null),ee=T(null),ue=T(null),le=T(null);function we(t,n){switch(q(ue,n),q(ee,t),q(Z,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?Qv(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=Qv(n),t=Xv(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}O(Z),q(Z,t)}function _e(){O(Z),O(ee),O(ue)}function gt(t){t.memoizedState!==null&&q(le,t);var n=Z.current,r=Xv(n,t.type);n!==r&&(q(ee,t),q(Z,r))}function Qt(t){ee.current===t&&(O(Z),O(ee)),le.current===t&&(O(le),Ol._currentValue=G)}var Je,rn;function pn(t){if(Je===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);Je=n&&n[1]||"",rn=-1<r.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Je+t+rn}var is=!1;function vn(t,n){if(!t||is)return"";is=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(te){var Q=te}Reflect.construct(t,[],se)}else{try{se.call()}catch(te){Q=te}t.call(se.prototype)}}else{try{throw Error()}catch(te){Q=te}(se=t())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(te){if(te&&Q&&typeof te.stack=="string")return[te.stack,Q.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),b=h[0],C=h[1];if(b&&C){var D=b.split(`
|
|
@@ -56,7 +56,7 @@ Please change the parent <Route path="${M}"> to <Route path="${M==="/"?"*":`${M}
|
|
|
56
56
|
If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
57
57
|
|
|
58
58
|
For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},FA="DialogDescriptionWarning",VA=({contentRef:e,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Nb(FA).contentName}}.`;return y.useEffect(()=>{const c=e.current?.getAttribute("aria-describedby");a&&c&&(document.getElementById(a)||console.warn(i))},[i,e,a]),null},IA=db,lM=hb,YA=pb,KA=vb,QA=gb,oM=xb,cM=wb,uM=jb,ql='[cmdk-group=""]',xh='[cmdk-group-items=""]',XA='[cmdk-group-heading=""]',Cb='[cmdk-item=""]',oy=`${Cb}:not([aria-disabled="true"])`,Fh="cmdk-item-select",Oi="data-value",ZA=(e,a,s)=>zA(e,a,s),Ab=y.createContext(void 0),yo=()=>y.useContext(Ab),Rb=y.createContext(void 0),$m=()=>y.useContext(Rb),Tb=y.createContext(void 0),Mb=y.forwardRef((e,a)=>{let s=_i(()=>{var O,q;return{search:"",value:(q=(O=e.value)!=null?O:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=_i(()=>new Set),c=_i(()=>new Map),u=_i(()=>new Map),f=_i(()=>new Set),m=kb(e),{label:v,children:p,value:x,onValueChange:g,filter:w,shouldFilter:S,loop:N,disablePointerSelection:j=!1,vimBindings:A=!0,...R}=e,M=ra(),_=ra(),U=ra(),H=y.useRef(null),P=oR();Hs(()=>{if(x!==void 0){let O=x.trim();s.current.value=O,E.emit()}},[x]),Hs(()=>{P(6,ge)},[]);let E=y.useMemo(()=>({subscribe:O=>(f.current.add(O),()=>f.current.delete(O)),snapshot:()=>s.current,setState:(O,q,Z)=>{var ee,ue,le,we;if(!Object.is(s.current[O],q)){if(s.current[O]=q,O==="search")fe(),oe(),P(1,ae);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let _e=document.getElementById(U);_e?_e.focus():(ee=document.getElementById(M))==null||ee.focus()}if(P(7,()=>{var _e;s.current.selectedItemId=(_e=pe())==null?void 0:_e.id,E.emit()}),Z||P(5,ge),((ue=m.current)==null?void 0:ue.value)!==void 0){let _e=q??"";(we=(le=m.current).onValueChange)==null||we.call(le,_e);return}}E.emit()}},emit:()=>{f.current.forEach(O=>O())}}),[]),z=y.useMemo(()=>({value:(O,q,Z)=>{var ee;q!==((ee=u.current.get(O))==null?void 0:ee.value)&&(u.current.set(O,{value:q,keywords:Z}),s.current.filtered.items.set(O,J(q,Z)),P(2,()=>{oe(),E.emit()}))},item:(O,q)=>(i.current.add(O),q&&(c.current.has(q)?c.current.get(q).add(O):c.current.set(q,new Set([O]))),P(3,()=>{fe(),oe(),s.current.value||ae(),E.emit()}),()=>{u.current.delete(O),i.current.delete(O),s.current.filtered.items.delete(O);let Z=pe();P(4,()=>{fe(),Z?.getAttribute("id")===O&&ae(),E.emit()})}),group:O=>(c.current.has(O)||c.current.set(O,new Set),()=>{u.current.delete(O),c.current.delete(O)}),filter:()=>m.current.shouldFilter,label:v||e["aria-label"],getDisablePointerSelection:()=>m.current.disablePointerSelection,listId:M,inputId:U,labelId:_,listInnerRef:H}),[]);function J(O,q){var Z,ee;let ue=(ee=(Z=m.current)==null?void 0:Z.filter)!=null?ee:ZA;return O?ue(O,s.current.search,q):0}function oe(){if(!s.current.search||m.current.shouldFilter===!1)return;let O=s.current.filtered.items,q=[];s.current.filtered.groups.forEach(ee=>{let ue=c.current.get(ee),le=0;ue.forEach(we=>{let _e=O.get(we);le=Math.max(_e,le)}),q.push([ee,le])});let Z=H.current;ve().sort((ee,ue)=>{var le,we;let _e=ee.getAttribute("id"),gt=ue.getAttribute("id");return((le=O.get(gt))!=null?le:0)-((we=O.get(_e))!=null?we:0)}).forEach(ee=>{let ue=ee.closest(xh);ue?ue.appendChild(ee.parentElement===ue?ee:ee.closest(`${xh} > *`)):Z.appendChild(ee.parentElement===Z?ee:ee.closest(`${xh} > *`))}),q.sort((ee,ue)=>ue[1]-ee[1]).forEach(ee=>{var ue;let le=(ue=H.current)==null?void 0:ue.querySelector(`${ql}[${Oi}="${encodeURIComponent(ee[0])}"]`);le?.parentElement.appendChild(le)})}function ae(){let O=ve().find(Z=>Z.getAttribute("aria-disabled")!=="true"),q=O?.getAttribute(Oi);E.setState("value",q||void 0)}function fe(){var O,q,Z,ee;if(!s.current.search||m.current.shouldFilter===!1){s.current.filtered.count=i.current.size;return}s.current.filtered.groups=new Set;let ue=0;for(let le of i.current){let we=(q=(O=u.current.get(le))==null?void 0:O.value)!=null?q:"",_e=(ee=(Z=u.current.get(le))==null?void 0:Z.keywords)!=null?ee:[],gt=J(we,_e);s.current.filtered.items.set(le,gt),gt>0&&ue++}for(let[le,we]of c.current)for(let _e of we)if(s.current.filtered.items.get(_e)>0){s.current.filtered.groups.add(le);break}s.current.filtered.count=ue}function ge(){var O,q,Z;let ee=pe();ee&&(((O=ee.parentElement)==null?void 0:O.firstChild)===ee&&((Z=(q=ee.closest(ql))==null?void 0:q.querySelector(XA))==null||Z.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function pe(){var O;return(O=H.current)==null?void 0:O.querySelector(`${Cb}[aria-selected="true"]`)}function ve(){var O;return Array.from(((O=H.current)==null?void 0:O.querySelectorAll(oy))||[])}function L(O){let q=ve()[O];q&&E.setState("value",q.getAttribute(Oi))}function W(O){var q;let Z=pe(),ee=ve(),ue=ee.findIndex(we=>we===Z),le=ee[ue+O];(q=m.current)!=null&&q.loop&&(le=ue+O<0?ee[ee.length-1]:ue+O===ee.length?ee[0]:ee[ue+O]),le&&E.setState("value",le.getAttribute(Oi))}function G(O){let q=pe(),Z=q?.closest(ql),ee;for(;Z&&!ee;)Z=O>0?iR(Z,ql):lR(Z,ql),ee=Z?.querySelector(oy);ee?E.setState("value",ee.getAttribute(Oi)):W(O)}let F=()=>L(ve().length-1),ce=O=>{O.preventDefault(),O.metaKey?F():O.altKey?G(1):W(1)},T=O=>{O.preventDefault(),O.metaKey?L(0):O.altKey?G(-1):W(-1)};return y.createElement(xr.div,{ref:a,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:O=>{var q;(q=R.onKeyDown)==null||q.call(R,O);let Z=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||Z))switch(O.key){case"n":case"j":{A&&O.ctrlKey&&ce(O);break}case"ArrowDown":{ce(O);break}case"p":case"k":{A&&O.ctrlKey&&T(O);break}case"ArrowUp":{T(O);break}case"Home":{O.preventDefault(),L(0);break}case"End":{O.preventDefault(),F();break}case"Enter":{O.preventDefault();let ee=pe();if(ee){let ue=new Event(Fh);ee.dispatchEvent(ue)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:z.inputId,id:z.labelId,style:uR},v),Uu(e,O=>y.createElement(Rb.Provider,{value:E},y.createElement(Ab.Provider,{value:z},O))))}),JA=y.forwardRef((e,a)=>{var s,i;let c=ra(),u=y.useRef(null),f=y.useContext(Tb),m=yo(),v=kb(e),p=(i=(s=v.current)==null?void 0:s.forceMount)!=null?i:f?.forceMount;Hs(()=>{if(!p)return m.item(c,f?.id)},[p]);let x=Ob(c,u,[e.value,e.children,u],e.keywords),g=$m(),w=as(P=>P.value&&P.value===x.current),S=as(P=>p||m.filter()===!1?!0:P.search?P.filtered.items.get(c)>0:!0);y.useEffect(()=>{let P=u.current;if(!(!P||e.disabled))return P.addEventListener(Fh,N),()=>P.removeEventListener(Fh,N)},[S,e.onSelect,e.disabled]);function N(){var P,E;j(),(E=(P=v.current).onSelect)==null||E.call(P,x.current)}function j(){g.setState("value",x.current,!0)}if(!S)return null;let{disabled:A,value:R,onSelect:M,forceMount:_,keywords:U,...H}=e;return y.createElement(xr.div,{ref:Ua(u,a),...H,id:c,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!w,"data-disabled":!!A,"data-selected":!!w,onPointerMove:A||m.getDisablePointerSelection()?void 0:j,onClick:A?void 0:N},e.children)}),WA=y.forwardRef((e,a)=>{let{heading:s,children:i,forceMount:c,...u}=e,f=ra(),m=y.useRef(null),v=y.useRef(null),p=ra(),x=yo(),g=as(S=>c||x.filter()===!1?!0:S.search?S.filtered.groups.has(f):!0);Hs(()=>x.group(f),[]),Ob(f,m,[e.value,e.heading,v]);let w=y.useMemo(()=>({id:f,forceMount:c}),[c]);return y.createElement(xr.div,{ref:Ua(m,a),...u,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},s&&y.createElement("div",{ref:v,"cmdk-group-heading":"","aria-hidden":!0,id:p},s),Uu(e,S=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?p:void 0},y.createElement(Tb.Provider,{value:w},S))))}),eR=y.forwardRef((e,a)=>{let{alwaysRender:s,...i}=e,c=y.useRef(null),u=as(f=>!f.search);return!s&&!u?null:y.createElement(xr.div,{ref:Ua(c,a),...i,"cmdk-separator":"",role:"separator"})}),tR=y.forwardRef((e,a)=>{let{onValueChange:s,...i}=e,c=e.value!=null,u=$m(),f=as(p=>p.search),m=as(p=>p.selectedItemId),v=yo();return y.useEffect(()=>{e.value!=null&&u.setState("search",e.value)},[e.value]),y.createElement(xr.input,{ref:a,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":v.listId,"aria-labelledby":v.labelId,"aria-activedescendant":m,id:v.inputId,type:"text",value:c?e.value:f,onChange:p=>{c||u.setState("search",p.target.value),s?.(p.target.value)}})}),nR=y.forwardRef((e,a)=>{let{children:s,label:i="Suggestions",...c}=e,u=y.useRef(null),f=y.useRef(null),m=as(p=>p.selectedItemId),v=yo();return y.useEffect(()=>{if(f.current&&u.current){let p=f.current,x=u.current,g,w=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let S=p.offsetHeight;x.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return w.observe(p),()=>{cancelAnimationFrame(g),w.unobserve(p)}}},[]),y.createElement(xr.div,{ref:Ua(u,a),...c,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":m,"aria-label":i,id:v.listId},Uu(e,p=>y.createElement("div",{ref:Ua(f,v.listInnerRef),"cmdk-list-sizer":""},p)))}),aR=y.forwardRef((e,a)=>{let{open:s,onOpenChange:i,overlayClassName:c,contentClassName:u,container:f,...m}=e;return y.createElement(IA,{open:s,onOpenChange:i},y.createElement(YA,{container:f},y.createElement(KA,{"cmdk-overlay":"",className:c}),y.createElement(QA,{"aria-label":e.label,"cmdk-dialog":"",className:u},y.createElement(Mb,{ref:a,...m}))))}),rR=y.forwardRef((e,a)=>as(s=>s.filtered.count===0)?y.createElement(xr.div,{ref:a,...e,"cmdk-empty":"",role:"presentation"}):null),sR=y.forwardRef((e,a)=>{let{progress:s,children:i,label:c="Loading...",...u}=e;return y.createElement(xr.div,{ref:a,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":c},Uu(e,f=>y.createElement("div",{"aria-hidden":!0},f)))}),Ma=Object.assign(Mb,{List:nR,Item:JA,Input:tR,Group:WA,Separator:eR,Dialog:aR,Empty:rR,Loading:sR});function iR(e,a){let s=e.nextElementSibling;for(;s;){if(s.matches(a))return s;s=s.nextElementSibling}}function lR(e,a){let s=e.previousElementSibling;for(;s;){if(s.matches(a))return s;s=s.previousElementSibling}}function kb(e){let a=y.useRef(e);return Hs(()=>{a.current=e}),a}var Hs=typeof window>"u"?y.useEffect:y.useLayoutEffect;function _i(e){let a=y.useRef();return a.current===void 0&&(a.current=e()),a}function as(e){let a=$m(),s=()=>e(a.snapshot());return y.useSyncExternalStore(a.subscribe,s,s)}function Ob(e,a,s,i=[]){let c=y.useRef(),u=yo();return Hs(()=>{var f;let m=(()=>{var p;for(let x of s){if(typeof x=="string")return x.trim();if(typeof x=="object"&&"current"in x)return x.current?(p=x.current.textContent)==null?void 0:p.trim():c.current}})(),v=i.map(p=>p.trim());u.value(e,m,v),(f=a.current)==null||f.setAttribute(Oi,m),c.current=m}),c}var oR=()=>{let[e,a]=y.useState(),s=_i(()=>new Map);return Hs(()=>{s.current.forEach(i=>i()),s.current=new Map},[e]),(i,c)=>{s.current.set(i,c),a({})}};function cR(e){let a=e.type;return typeof a=="function"?a(e.props):"render"in a?a.render(e.props):e}function Uu({asChild:e,children:a},s){return e&&y.isValidElement(a)?y.cloneElement(cR(a),{ref:a.ref},s(a.props.children)):s(a)}var uR={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};let Vh={},_b;function bh(e={}){Vh={animate:!0,allowClose:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...e}}function je(e){return e?Vh[e]:Vh}function dR(e){_b=e}function Bn(){return _b}let gu={};function Fc(e,a){gu[e]=a}function Ds(e){var a;(a=gu[e])==null||a.call(gu)}function fR(){gu={}}function Vc(e,a,s,i){return(e/=i/2)<1?s/2*e*e+a:-s/2*(--e*(e-2)-1)+a}function Db(e){const a='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(s=>{const i=s.matches(a),c=Array.from(s.querySelectorAll(a));return[...i?[s]:[],...c]}).filter(s=>getComputedStyle(s).pointerEvents!=="none"&&pR(s))}function Lb(e){if(!e||mR(e))return;const a=je("smoothScroll"),s=e.offsetHeight>window.innerHeight;e.scrollIntoView({behavior:!a||hR(e)?"auto":"smooth",inline:"center",block:s?"start":"center"})}function hR(e){if(!e||!e.parentElement)return;const a=e.parentElement;return a.scrollHeight>a.clientHeight}function mR(e){const a=e.getBoundingClientRect();return a.top>=0&&a.left>=0&&a.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&a.right<=(window.innerWidth||document.documentElement.clientWidth)}function pR(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}let yu={};function Kt(e,a){yu[e]=a}function Re(e){return e?yu[e]:yu}function cy(){yu={}}function vR(e,a,s,i){let c=Re("__activeStagePosition");const u=c||s.getBoundingClientRect(),f=i.getBoundingClientRect(),m=Vc(e,u.x,f.x-u.x,a),v=Vc(e,u.y,f.y-u.y,a),p=Vc(e,u.width,f.width-u.width,a),x=Vc(e,u.height,f.height-u.height,a);c={x:m,y:v,width:p,height:x},Ub(c),Kt("__activeStagePosition",c)}function zb(e){if(!e)return;const a=e.getBoundingClientRect(),s={x:a.x,y:a.y,width:a.width,height:a.height};Kt("__activeStagePosition",s),Ub(s)}function gR(){const e=Re("__activeStagePosition"),a=Re("__overlaySvg");if(!e)return;if(!a){console.warn("No stage svg found.");return}const s=window.innerWidth,i=window.innerHeight;a.setAttribute("viewBox",`0 0 ${s} ${i}`)}function yR(e){const a=xR(e);document.body.appendChild(a),Hb(a,s=>{s.target.tagName==="path"&&Ds("overlayClick")}),Kt("__overlaySvg",a)}function Ub(e){const a=Re("__overlaySvg");if(!a){yR(e);return}const s=a.firstElementChild;if(s?.tagName!=="path")throw new Error("no path element found in stage svg");s.setAttribute("d",Pb(e))}function xR(e){const a=window.innerWidth,s=window.innerHeight,i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("driver-overlay","driver-overlay-animated"),i.setAttribute("viewBox",`0 0 ${a} ${s}`),i.setAttribute("xmlSpace","preserve"),i.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),i.setAttribute("version","1.1"),i.setAttribute("preserveAspectRatio","xMinYMin slice"),i.style.fillRule="evenodd",i.style.clipRule="evenodd",i.style.strokeLinejoin="round",i.style.strokeMiterlimit="2",i.style.zIndex="10000",i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%";const c=document.createElementNS("http://www.w3.org/2000/svg","path");return c.setAttribute("d",Pb(e)),c.style.fill=je("overlayColor")||"rgb(0,0,0)",c.style.opacity=`${je("overlayOpacity")}`,c.style.pointerEvents="auto",c.style.cursor="auto",i.appendChild(c),i}function Pb(e){const a=window.innerWidth,s=window.innerHeight,i=je("stagePadding")||0,c=je("stageRadius")||0,u=e.width+i*2,f=e.height+i*2,m=Math.min(c,u/2,f/2),v=Math.floor(Math.max(m,0)),p=e.x-i+v,x=e.y-i,g=u-v*2,w=f-v*2;return`M${a},0L0,0L0,${s}L${a},${s}L${a},0Z
|
|
59
|
-
M${p},${x} h${g} a${v},${v} 0 0 1 ${v},${v} v${w} a${v},${v} 0 0 1 -${v},${v} h-${g} a${v},${v} 0 0 1 -${v},-${v} v-${w} a${v},${v} 0 0 1 ${v},-${v} z`}function bR(){const e=Re("__overlaySvg");e&&e.remove()}function wR(){const e=document.getElementById("driver-dummy-element");if(e)return e;let a=document.createElement("div");return a.id="driver-dummy-element",a.style.width="0",a.style.height="0",a.style.pointerEvents="none",a.style.opacity="0",a.style.position="fixed",a.style.top="50%",a.style.left="50%",document.body.appendChild(a),a}function uy(e){const{element:a}=e;let s=typeof a=="function"?a():typeof a=="string"?document.querySelector(a):a;s||(s=wR()),jR(s,e)}function SR(){const e=Re("__activeElement"),a=Re("__activeStep");e&&(zb(e),gR(),qb(e,a))}function jR(e,a){var s;const i=Date.now(),c=Re("__activeStep"),u=Re("__activeElement")||e,f=!u||u===e,m=e.id==="driver-dummy-element",v=u.id==="driver-dummy-element",p=je("animate"),x=a.onHighlightStarted||je("onHighlightStarted"),g=a?.onHighlighted||je("onHighlighted"),w=c?.onDeselected||je("onDeselected"),S=je(),N=Re();!f&&w&&w(v?void 0:u,c,{config:S,state:N,driver:Bn()}),x&&x(m?void 0:e,a,{config:S,state:N,driver:Bn()});const j=!f&&p;let A=!1;RR(),Kt("previousStep",c),Kt("previousElement",u),Kt("activeStep",a),Kt("activeElement",e);const R=()=>{if(Re("__transitionCallback")!==R)return;const M=Date.now()-i,_=400-M<=400/2;a.popover&&_&&!A&&j&&(dy(e,a),A=!0),je("animate")&&M<400?vR(M,400,u,e):(zb(e),g&&g(m?void 0:e,a,{config:je(),state:Re(),driver:Bn()}),Kt("__transitionCallback",void 0),Kt("__previousStep",c),Kt("__previousElement",u),Kt("__activeStep",a),Kt("__activeElement",e)),window.requestAnimationFrame(R)};Kt("__transitionCallback",R),window.requestAnimationFrame(R),Lb(e),!j&&a.popover&&dy(e,a),u.classList.remove("driver-active-element","driver-no-interaction"),u.removeAttribute("aria-haspopup"),u.removeAttribute("aria-expanded"),u.removeAttribute("aria-controls"),((s=a.disableActiveInteraction)!=null?s:je("disableActiveInteraction"))&&e.classList.add("driver-no-interaction"),e.classList.add("driver-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","driver-popover-content")}function ER(){var e;(e=document.getElementById("driver-dummy-element"))==null||e.remove(),document.querySelectorAll(".driver-active-element").forEach(a=>{a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls")})}function io(){const e=Re("__resizeTimeout");e&&window.cancelAnimationFrame(e),Kt("__resizeTimeout",window.requestAnimationFrame(SR))}function NR(e){var a;if(!Re("isInitialized")||!(e.key==="Tab"||e.keyCode===9))return;const s=Re("__activeElement"),i=(a=Re("popover"))==null?void 0:a.wrapper,c=Db([...i?[i]:[],...s?[s]:[]]),u=c[0],f=c[c.length-1];if(e.preventDefault(),e.shiftKey){const m=c[c.indexOf(document.activeElement)-1]||f;m?.focus()}else{const m=c[c.indexOf(document.activeElement)+1]||u;m?.focus()}}function Bb(e){var a;((a=je("allowKeyboardControl"))==null||a)&&(e.key==="Escape"?Ds("escapePress"):e.key==="ArrowRight"?Ds("arrowRightPress"):e.key==="ArrowLeft"&&Ds("arrowLeftPress"))}function Hb(e,a,s){const i=(c,u)=>{const f=c.target;e.contains(f)&&((!s||s(f))&&(c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation()),u?.(c))};document.addEventListener("pointerdown",i,!0),document.addEventListener("mousedown",i,!0),document.addEventListener("pointerup",i,!0),document.addEventListener("mouseup",i,!0),document.addEventListener("click",c=>{i(c,a)},!0)}function CR(){window.addEventListener("keyup",Bb,!1),window.addEventListener("keydown",NR,!1),window.addEventListener("resize",io),window.addEventListener("scroll",io)}function AR(){window.removeEventListener("keyup",Bb),window.removeEventListener("resize",io),window.removeEventListener("scroll",io)}function RR(){const e=Re("popover");e&&(e.wrapper.style.display="none")}function dy(e,a){var s,i;let c=Re("popover");c&&document.body.removeChild(c.wrapper),c=MR(),document.body.appendChild(c.wrapper);const{title:u,description:f,showButtons:m,disableButtons:v,showProgress:p,nextBtnText:x=je("nextBtnText")||"Next →",prevBtnText:g=je("prevBtnText")||"← Previous",progressText:w=je("progressText")||"{current} of {total}"}=a.popover||{};c.nextButton.innerHTML=x,c.previousButton.innerHTML=g,c.progress.innerHTML=w,u?(c.title.innerHTML=u,c.title.style.display="block"):c.title.style.display="none",f?(c.description.innerHTML=f,c.description.style.display="block"):c.description.style.display="none";const S=m||je("showButtons"),N=p||je("showProgress")||!1,j=S?.includes("next")||S?.includes("previous")||N;c.closeButton.style.display=S.includes("close")?"block":"none",j?(c.footer.style.display="flex",c.progress.style.display=N?"block":"none",c.nextButton.style.display=S.includes("next")?"block":"none",c.previousButton.style.display=S.includes("previous")?"block":"none"):c.footer.style.display="none";const A=v||je("disableButtons")||[];A!=null&&A.includes("next")&&(c.nextButton.disabled=!0,c.nextButton.classList.add("driver-popover-btn-disabled")),A!=null&&A.includes("previous")&&(c.previousButton.disabled=!0,c.previousButton.classList.add("driver-popover-btn-disabled")),A!=null&&A.includes("close")&&(c.closeButton.disabled=!0,c.closeButton.classList.add("driver-popover-btn-disabled"));const R=c.wrapper;R.style.display="block",R.style.left="",R.style.top="",R.style.bottom="",R.style.right="",R.id="driver-popover-content",R.setAttribute("role","dialog"),R.setAttribute("aria-labelledby","driver-popover-title"),R.setAttribute("aria-describedby","driver-popover-description");const M=c.arrow;M.className="driver-popover-arrow";const _=((s=a.popover)==null?void 0:s.popoverClass)||je("popoverClass")||"";R.className=`driver-popover ${_}`.trim(),Hb(c.wrapper,E=>{var z,J,oe;const ae=E.target,fe=((z=a.popover)==null?void 0:z.onNextClick)||je("onNextClick"),ge=((J=a.popover)==null?void 0:J.onPrevClick)||je("onPrevClick"),pe=((oe=a.popover)==null?void 0:oe.onCloseClick)||je("onCloseClick");if(ae.closest(".driver-popover-next-btn"))return fe?fe(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("nextClick");if(ae.closest(".driver-popover-prev-btn"))return ge?ge(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("prevClick");if(ae.closest(".driver-popover-close-btn"))return pe?pe(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("closeClick")},E=>!(c!=null&&c.description.contains(E))&&!(c!=null&&c.title.contains(E))&&typeof E.className=="string"&&E.className.includes("driver-popover")),Kt("popover",c);const U=((i=a.popover)==null?void 0:i.onPopoverRender)||je("onPopoverRender");U&&U(c,{config:je(),state:Re(),driver:Bn()}),qb(e,a),Lb(R);const H=e.classList.contains("driver-dummy-element"),P=Db([R,...H?[]:[e]]);P.length>0&&P[0].focus()}function $b(){const e=Re("popover");if(!(e!=null&&e.wrapper))return;const a=e.wrapper.getBoundingClientRect(),s=je("stagePadding")||0,i=je("popoverOffset")||0;return{width:a.width+s+i,height:a.height+s+i,realWidth:a.width,realHeight:a.height}}function fy(e,a){const{elementDimensions:s,popoverDimensions:i,popoverPadding:c,popoverArrowDimensions:u}=a;return e==="start"?Math.max(Math.min(s.top-c,window.innerHeight-i.realHeight-u.width),u.width):e==="end"?Math.max(Math.min(s.top-i?.realHeight+s.height+c,window.innerHeight-i?.realHeight-u.width),u.width):e==="center"?Math.max(Math.min(s.top+s.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-u.width),u.width):0}function hy(e,a){const{elementDimensions:s,popoverDimensions:i,popoverPadding:c,popoverArrowDimensions:u}=a;return e==="start"?Math.max(Math.min(s.left-c,window.innerWidth-i.realWidth-u.width),u.width):e==="end"?Math.max(Math.min(s.left-i?.realWidth+s.width+c,window.innerWidth-i?.realWidth-u.width),u.width):e==="center"?Math.max(Math.min(s.left+s.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-u.width),u.width):0}function qb(e,a){const s=Re("popover");if(!s)return;const{align:i="start",side:c="left"}=a?.popover||{},u=i,f=e.id==="driver-dummy-element"?"over":c,m=je("stagePadding")||0,v=$b(),p=s.arrow.getBoundingClientRect(),x=e.getBoundingClientRect(),g=x.top-v.height;let w=g>=0;const S=window.innerHeight-(x.bottom+v.height);let N=S>=0;const j=x.left-v.width;let A=j>=0;const R=window.innerWidth-(x.right+v.width);let M=R>=0;const _=!w&&!N&&!A&&!M;let U=f;if(f==="top"&&w?M=A=N=!1:f==="bottom"&&N?M=A=w=!1:f==="left"&&A?M=w=N=!1:f==="right"&&M&&(A=w=N=!1),f==="over"){const H=window.innerWidth/2-v.realWidth/2,P=window.innerHeight/2-v.realHeight/2;s.wrapper.style.left=`${H}px`,s.wrapper.style.right="auto",s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto"}else if(_){const H=window.innerWidth/2-v?.realWidth/2,P=10;s.wrapper.style.left=`${H}px`,s.wrapper.style.right="auto",s.wrapper.style.bottom=`${P}px`,s.wrapper.style.top="auto"}else if(A){const H=Math.min(j,window.innerWidth-v?.realWidth-p.width),P=fy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.left=`${H}px`,s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.right="auto",U="left"}else if(M){const H=Math.min(R,window.innerWidth-v?.realWidth-p.width),P=fy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.right=`${H}px`,s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.left="auto",U="right"}else if(w){const H=Math.min(g,window.innerHeight-v.realHeight-p.width);let P=hy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.top=`${H}px`,s.wrapper.style.left=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.right="auto",U="top"}else if(N){const H=Math.min(S,window.innerHeight-v?.realHeight-p.width);let P=hy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.left=`${P}px`,s.wrapper.style.bottom=`${H}px`,s.wrapper.style.top="auto",s.wrapper.style.right="auto",U="bottom"}_?s.arrow.classList.add("driver-popover-arrow-none"):TR(u,U,e)}function TR(e,a,s){const i=Re("popover");if(!i)return;const c=s.getBoundingClientRect(),u=$b(),f=i.arrow,m=u.width,v=window.innerWidth,p=c.width,x=c.left,g=u.height,w=window.innerHeight,S=c.top,N=c.height;f.className="driver-popover-arrow";let j=a,A=e;if(a==="top"?(x+p<=0?(j="right",A="end"):x+p-m<=0&&(j="top",A="start"),x>=v?(j="left",A="end"):x+m>=v&&(j="top",A="end")):a==="bottom"?(x+p<=0?(j="right",A="start"):x+p-m<=0&&(j="bottom",A="start"),x>=v?(j="left",A="start"):x+m>=v&&(j="bottom",A="end")):a==="left"?(S+N<=0?(j="bottom",A="end"):S+N-g<=0&&(j="left",A="start"),S>=w?(j="top",A="end"):S+g>=w&&(j="left",A="end")):a==="right"&&(S+N<=0?(j="bottom",A="start"):S+N-g<=0&&(j="right",A="start"),S>=w?(j="top",A="start"):S+g>=w&&(j="right",A="end")),!j)f.classList.add("driver-popover-arrow-none");else{f.classList.add(`driver-popover-arrow-side-${j}`),f.classList.add(`driver-popover-arrow-align-${A}`);const R=s.getBoundingClientRect(),M=f.getBoundingClientRect(),_=je("stagePadding")||0,U=R.left-_<window.innerWidth&&R.right+_>0&&R.top-_<window.innerHeight&&R.bottom+_>0;a==="bottom"&&U&&(M.x>R.x&&M.x+M.width<R.x+R.width?i.wrapper.style.transform="translateY(0)":(f.classList.remove(`driver-popover-arrow-align-${A}`),f.classList.add("driver-popover-arrow-none"),i.wrapper.style.transform=`translateY(-${_/2}px)`))}}function MR(){const e=document.createElement("div");e.classList.add("driver-popover");const a=document.createElement("div");a.classList.add("driver-popover-arrow");const s=document.createElement("header");s.id="driver-popover-title",s.classList.add("driver-popover-title"),s.style.display="none",s.innerText="Popover Title";const i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";const c=document.createElement("button");c.type="button",c.classList.add("driver-popover-close-btn"),c.setAttribute("aria-label","Close"),c.innerHTML="×";const u=document.createElement("footer");u.classList.add("driver-popover-footer");const f=document.createElement("span");f.classList.add("driver-popover-progress-text"),f.innerText="";const m=document.createElement("span");m.classList.add("driver-popover-navigation-btns");const v=document.createElement("button");v.type="button",v.classList.add("driver-popover-prev-btn"),v.innerHTML="← Previous";const p=document.createElement("button");return p.type="button",p.classList.add("driver-popover-next-btn"),p.innerHTML="Next →",m.appendChild(v),m.appendChild(p),u.appendChild(f),u.appendChild(m),e.appendChild(c),e.appendChild(a),e.appendChild(s),e.appendChild(i),e.appendChild(u),{wrapper:e,arrow:a,title:s,description:i,footer:u,previousButton:v,nextButton:p,closeButton:c,footerButtons:m,progress:f}}function kR(){var e;const a=Re("popover");a&&((e=a.wrapper.parentElement)==null||e.removeChild(a.wrapper))}function OR(e={}){bh(e);function a(){je("allowClose")&&x()}function s(){const w=je("overlayClickBehavior");if(je("allowClose")&&w==="close"){x();return}if(typeof w=="function"){const S=Re("__activeStep"),N=Re("__activeElement");w(N,S,{config:je(),state:Re(),driver:Bn()});return}w==="nextStep"&&i()}function i(){const w=Re("activeIndex"),S=je("steps")||[];if(typeof w>"u")return;const N=w+1;S[N]?p(N):x()}function c(){const w=Re("activeIndex"),S=je("steps")||[];if(typeof w>"u")return;const N=w-1;S[N]?p(N):x()}function u(w){(je("steps")||[])[w]?p(w):x()}function f(){var w;if(Re("__transitionCallback"))return;const S=Re("activeIndex"),N=Re("__activeStep"),j=Re("__activeElement");if(typeof S>"u"||typeof N>"u"||typeof Re("activeIndex")>"u")return;const A=((w=N.popover)==null?void 0:w.onPrevClick)||je("onPrevClick");if(A)return A(j,N,{config:je(),state:Re(),driver:Bn()});c()}function m(){var w;if(Re("__transitionCallback"))return;const S=Re("activeIndex"),N=Re("__activeStep"),j=Re("__activeElement");if(typeof S>"u"||typeof N>"u")return;const A=((w=N.popover)==null?void 0:w.onNextClick)||je("onNextClick");if(A)return A(j,N,{config:je(),state:Re(),driver:Bn()});i()}function v(){Re("isInitialized")||(Kt("isInitialized",!0),document.body.classList.add("driver-active",je("animate")?"driver-fade":"driver-simple"),CR(),Fc("overlayClick",s),Fc("escapePress",a),Fc("arrowLeftPress",f),Fc("arrowRightPress",m))}function p(w=0){var S,N,j,A,R,M,_,U;const H=je("steps");if(!H){console.error("No steps to drive through"),x();return}if(!H[w]){x();return}Kt("__activeOnDestroyed",document.activeElement),Kt("activeIndex",w);const P=H[w],E=H[w+1],z=H[w-1],J=((S=P.popover)==null?void 0:S.doneBtnText)||je("doneBtnText")||"Done",oe=je("allowClose"),ae=typeof((N=P.popover)==null?void 0:N.showProgress)<"u"?(j=P.popover)==null?void 0:j.showProgress:je("showProgress"),fe=(((A=P.popover)==null?void 0:A.progressText)||je("progressText")||"{{current}} of {{total}}").replace("{{current}}",`${w+1}`).replace("{{total}}",`${H.length}`),ge=((R=P.popover)==null?void 0:R.showButtons)||je("showButtons"),pe=["next","previous",...oe?["close"]:[]].filter(G=>!(ge!=null&&ge.length)||ge.includes(G)),ve=((M=P.popover)==null?void 0:M.onNextClick)||je("onNextClick"),L=((_=P.popover)==null?void 0:_.onPrevClick)||je("onPrevClick"),W=((U=P.popover)==null?void 0:U.onCloseClick)||je("onCloseClick");uy({...P,popover:{showButtons:pe,nextBtnText:E?void 0:J,disableButtons:[...z?[]:["previous"]],showProgress:ae,progressText:fe,onNextClick:ve||(()=>{E?p(w+1):x()}),onPrevClick:L||(()=>{p(w-1)}),onCloseClick:W||(()=>{x()}),...P?.popover||{}}})}function x(w=!0){const S=Re("__activeElement"),N=Re("__activeStep"),j=Re("__activeOnDestroyed"),A=je("onDestroyStarted");if(w&&A){const _=!S||S?.id==="driver-dummy-element";A(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()});return}const R=N?.onDeselected||je("onDeselected"),M=je("onDestroyed");if(document.body.classList.remove("driver-active","driver-fade","driver-simple"),AR(),kR(),ER(),bR(),fR(),cy(),S&&N){const _=S.id==="driver-dummy-element";R&&R(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()}),M&&M(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()})}j&&j.focus()}const g={isActive:()=>Re("isInitialized")||!1,refresh:io,drive:(w=0)=>{v(),p(w)},setConfig:bh,setSteps:w=>{cy(),bh({...je(),steps:w})},getConfig:je,getState:Re,getActiveIndex:()=>Re("activeIndex"),isFirstStep:()=>Re("activeIndex")===0,isLastStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&S===w.length-1},getActiveStep:()=>Re("activeStep"),getActiveElement:()=>Re("activeElement"),getPreviousElement:()=>Re("previousElement"),getPreviousStep:()=>Re("previousStep"),moveNext:i,movePrevious:c,moveTo:u,hasNextStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&!!w[S+1]},hasPreviousStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&!!w[S-1]},highlight:w=>{v(),uy({...w,popover:w.popover?{showButtons:[],showProgress:!1,progressText:"",...w.popover}:void 0})},destroy:()=>{x(!1)}};return dR(g),g}const Jc="profclaw-onboarding-completed",_R=[{popover:{title:"Welcome to profClaw",description:"Your AI agent orchestration hub. Let me give you a quick tour of the key features.",side:"bottom",align:"center"}},{element:'[data-tour="sidebar-nav"]',popover:{title:"Navigation",description:"Access Dashboard, Tasks, Summaries, Costs, Agents, and Settings. Everything you need is one click away.",side:"right",align:"start"}},{element:'[data-tour="command-palette"]',popover:{title:"Quick Actions",description:"Press ⌘K (or Ctrl+K) anytime to search, navigate, or perform actions instantly.",side:"bottom",align:"end"}},{element:'[data-tour="theme-toggle"]',popover:{title:"Theme Preferences",description:"Switch between Light, Dark, and Midnight themes. Your preference is saved automatically.",side:"left",align:"center"}},{popover:{title:"You're Ready!",description:"Create tasks manually or connect webhooks from GitHub, Jira, or Linear. Your AI agents are standing by.",side:"bottom",align:"center"}}];function Gb(){const[e,a]=y.useState(()=>typeof window>"u"?!0:localStorage.getItem(Jc)==="true"),s=y.useCallback(()=>{const c=OR({showProgress:!0,animate:!0,smoothScroll:!0,allowClose:!0,stagePadding:12,stageRadius:20,steps:_R,nextBtnText:"Next →",prevBtnText:"← Back",doneBtnText:"Get Started",progressText:"{{current}} of {{total}}",onDestroyStarted:()=>{localStorage.setItem(Jc,"true"),a(!0),c.destroy(),fetch("/api/auth/me",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({onboardingCompleted:!0})}).catch(()=>{})}});c.drive()},[]),i=y.useCallback(()=>{localStorage.removeItem(Jc),a(!1)},[]);return{hasCompleted:e,startTour:s,resetTour:i}}function DR(){const{hasCompleted:e,startTour:a}=Gb(),{isAuthenticated:s,user:i}=br();return y.useEffect(()=>{if(!s||e)return;if(i?.onboardingCompleted){localStorage.setItem(Jc,"true");return}const c=setTimeout(()=>{a()},1500);return()=>clearTimeout(c)},[e,a,s,i?.onboardingCompleted]),null}const Ih="open-command-palette";function Yh(){window.dispatchEvent(new CustomEvent(Ih))}function LR(){const[e,a]=y.useState(!1),s=oa(),{theme:i,setTheme:c}=lo(),{resetTour:u,startTour:f}=Gb();y.useEffect(()=>{const v=x=>{x.key==="k"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),x.stopPropagation(),a(g=>!g)),x.key==="Escape"&&e&&(x.preventDefault(),a(!1))},p=()=>a(!0);return window.addEventListener("keydown",v,!0),window.addEventListener(Ih,p),()=>{window.removeEventListener("keydown",v,!0),window.removeEventListener(Ih,p)}},[e]);const m=y.useCallback(v=>{a(!1),v()},[]);return e?o.jsx("button",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4 backdrop-blur-md bg-black/20 dark:bg-black/60 animate-in fade-in duration-300 w-full h-full border-none cursor-default",onClick:()=>a(!1),"aria-label":"Close command palette",children:o.jsx("div",{className:"w-full max-w-2xl overflow-hidden glass-heavy rounded-[32px] shadow-[0_32px_128px_-16px_rgba(0,0,0,0.5)] border border-white/10 animate-in zoom-in-95 duration-300",onClick:v=>v.stopPropagation(),children:o.jsxs(Ma,{className:"flex flex-col h-full bg-transparent",children:[o.jsxs("div",{className:"flex items-center px-6 border-b border-white/5",children:[o.jsx(iu,{className:"h-5 w-5 text-muted-foreground mr-3"}),o.jsx(Ma.Input,{autoFocus:!0,placeholder:"Type a command or search...",className:"flex-1 h-20 bg-transparent outline-none text-lg placeholder:text-muted-foreground/50"}),o.jsx("div",{className:"hidden sm:flex items-center gap-1.5 px-2 py-1 rounded-lg bg-white/5 border border-white/5",children:o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground",children:"ESC"})})]}),o.jsxs(Ma.List,{className:"max-h-[60vh] sm:max-h-[450px] overflow-y-auto p-3 scrollbar-none [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:[o.jsx(Ma.Empty,{className:"py-16 text-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-3 opacity-40",children:[o.jsx(iu,{className:"h-10 w-10"}),o.jsx("p",{className:"text-sm font-medium",children:"No results found for your search"})]})}),o.jsx(Ma.Group,{heading:"General",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1 mt-2",children:[o.jsx(Nn,{onSelect:()=>m(()=>s("/")),icon:Zr,children:"Chat"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/tasks")),icon:pm,children:"Tasks"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/analytics")),icon:hm,children:"Analytics"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/summaries")),icon:_x,children:"Summaries"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/costs")),icon:Mx,children:"Costs"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/agents")),icon:fm,children:"Agents"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/settings")),icon:qs,children:"Settings"})]})}),o.jsx(Ma.Separator,{className:"h-px bg-white/5 mx-3 my-2"}),o.jsx(Ma.Group,{heading:"Quick Actions",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"space-y-1 mt-2",children:[o.jsx(Nn,{onSelect:()=>m(()=>{}),icon:_E,children:"Create New Task"}),o.jsx(Nn,{onSelect:()=>m(()=>{u(),setTimeout(()=>f(),100)}),icon:UE,children:"Start Onboarding Tour"}),o.jsx(Nn,{onSelect:()=>m(()=>c(i==="light"?"dark":"light")),icon:i==="light"?Kl:ou,children:i==="light"?"Switch to Dark Blue":"Switch to Light Mode"}),o.jsx(Nn,{onSelect:()=>m(()=>c("midnight")),icon:Zr,children:"Switch to Midnight Black"})]})}),o.jsx(Ma.Group,{heading:"Voice",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsx("div",{className:"space-y-1 mt-2",children:o.jsx(Nn,{onSelect:()=>m(()=>{window.dispatchEvent(new CustomEvent("profclaw:talk-mode-toggle"))}),icon:D8,children:"Toggle Talk Mode"})})}),o.jsx(Ma.Group,{heading:"Diagnostics",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"space-y-1 mt-2",children:[o.jsx(Nn,{icon:Lx,children:"Open Debug Terminal"}),o.jsx(Nn,{icon:M8,children:"System Health Report"})]})})]}),o.jsxs("footer",{className:"flex items-center justify-between px-6 py-4 border-t border-white/5 bg-white/[0.03] backdrop-blur-md",children:[o.jsxs("div",{className:"flex gap-6 items-center",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-white/20 bg-white/10 text-[10px] font-bold font-sans",children:"↵"}),o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-tighter",children:"Enter"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("kbd",{className:"flex h-5 w-8 items-center justify-center rounded border border-white/20 bg-white/10 text-[10px] font-bold font-sans",children:"↑↓"}),o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-tighter",children:"Navigate"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[o.jsx(Zr,{className:"h-3 w-3"}),o.jsx("span",{className:"text-[9px] font-bold uppercase tracking-[0.2em]",children:"profClaw INTELLIGENCE"})]})]})]})})}):null}function Nn({children:e,icon:a,onSelect:s}){return o.jsxs(Ma.Item,{onSelect:s,className:"flex items-center gap-3 px-4 py-3.5 rounded-2xl cursor-default select-none aria-selected:bg-primary/10 dark:aria-selected:bg-white/10 aria-selected:text-foreground transition-all duration-200 group",children:[o.jsx("div",{className:"h-9 w-9 rounded-[12px] glass-heavy flex items-center justify-center border-white/5 group-aria-selected:border-primary/30 dark:group-aria-selected:border-white/20 group-aria-selected:scale-110 transition-transform",children:o.jsx(a,{className:"h-[18px] w-[18px] text-muted-foreground group-aria-selected:text-primary dark:group-aria-selected:text-blue-400 group-aria-selected:drop-shadow-[0_0_8px_rgba(96,165,250,0.5)] transition-all"})}),o.jsx("span",{className:"text-[14px] font-medium tracking-tight",children:e})]})}const zR=Object.freeze(Object.defineProperty({__proto__:null,CommandPalette:LR,openCommandPalette:Yh},Symbol.toStringTag,{value:"Module"}));function UR(e){const s=Date.now()-e,i=Math.floor(s/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const u=Math.floor(c/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function PR({type:e}){switch(e){case"success":return o.jsx(V8,{className:"h-4 w-4 text-green-400"});case"error":return o.jsx(Us,{className:"h-4 w-4 text-red-400"});case"warning":return o.jsx(to,{className:"h-4 w-4 text-amber-400"});default:return o.jsx(Tx,{className:"h-4 w-4 text-blue-400"})}}function BR(){const e=oa(),a=oo(),{data:s}=pr({queryKey:["notifications"],queryFn:()=>zi.notifications.list({limit:20}),refetchInterval:3e4}),i=s?.notifications??[],c=s?.unreadCount??0,u=hr({mutationFn:()=>zi.notifications.markAllRead(),onSuccess:()=>{a.invalidateQueries({queryKey:["notifications"]})}}),f=hr({mutationFn:m=>zi.notifications.markRead(m),onSuccess:()=>{a.invalidateQueries({queryKey:["notifications"]})}});return o.jsxs(_u,{children:[o.jsx(Du,{asChild:!0,children:o.jsxs(dt,{variant:"ghost",size:"icon",className:"relative rounded-full hover-lift transition-liquid","aria-label":"Notifications",children:[o.jsx(ru,{className:"h-5 w-5 text-muted-foreground"}),c>0&&o.jsxs("span",{className:"absolute top-2 right-2 flex h-2.5 w-2.5",children:[o.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),o.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"})]})]})}),o.jsxs(Lu,{align:"end",className:"w-[320px] glass-heavy rounded-3xl p-0 overflow-hidden shadow-2xl border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/5 bg-white/[0.02]",children:[o.jsx(Ql,{className:"p-0 text-sm font-bold uppercase tracking-widest",children:"Notifications"}),c>0&&o.jsx("button",{onClick:()=>u.mutate(),className:"text-[10px] font-bold text-primary hover:underline uppercase tracking-tight",children:"Mark all read"})]}),o.jsx("div",{className:"max-h-[400px] overflow-y-auto scrollbar-none",children:i.length>0?i.map((m,v)=>o.jsxs(y.Fragment,{children:[o.jsxs(un,{className:"flex flex-col items-start gap-1 p-5 cursor-default focus:bg-white/5 transition-colors group",onClick:()=>{m.read||f.mutate(m.id)},children:[o.jsxs("div",{className:"flex w-full items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(PR,{type:m.type}),o.jsx("span",{className:de("text-[13px] font-bold",!m.read&&"text-foreground"),children:m.title})]}),o.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:UR(m.createdAt)})]}),m.description&&o.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed pr-4",children:m.description}),!m.read&&o.jsx("div",{className:"absolute top-5 right-2 h-1.5 w-1.5 rounded-full bg-primary"})]}),v<i.length-1&&o.jsx(Oa,{className:"bg-white/5 m-0"})]},m.id)):o.jsxs("div",{className:"py-12 text-center",children:[o.jsx(ru,{className:"h-10 w-10 mx-auto text-muted-foreground opacity-20 mb-3"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"No new notifications"})]})}),o.jsx("div",{className:"px-5 py-3 border-t border-white/5 bg-white/[0.02] text-center",children:o.jsx("button",{onClick:()=>e("/activity"),className:"text-[11px] font-bold text-muted-foreground hover:text-foreground transition-colors uppercase tracking-widest",children:"View All Activity"})})]})]})}const HR=y.lazy(()=>vt(()=>Promise.resolve().then(()=>zR),[]).then(e=>({default:e.CommandPalette}))),$R=y.lazy(()=>vt(()=>import("./FloatingChatbot-CZHjvJIe.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.FloatingChatbot}))),Fb=[{id:"home",label:"Home",items:[{name:"Chat",href:"/",icon:Zr,shortcut:"⌘1"}]},{id:"ai-studio",label:"AI Studio",items:[{name:"Agents",href:"/agents",icon:fm,shortcut:"⌘2"},{name:"Gateway",href:"/gateway",icon:vm}]},{id:"scrum",label:"Scrum",items:[{name:"Projects",href:"/projects",icon:dE,shortcut:"⌘3"},{name:"Tickets",href:"/tickets",icon:VE,shortcut:"⌘4"},{name:"Tasks",href:"/tasks",icon:pm,shortcut:"⌘5",hasBadge:"pending"},{name:"Failed",href:"/failed",icon:to,hasBadge:"dlq"}]},{id:"insights",label:"Insights",items:[{name:"Analytics",href:"/analytics",icon:hm,shortcut:"⌘6"},{name:"Activity",href:"/activity",icon:ru},{name:"Summaries",href:"/summaries",icon:_x,shortcut:"⌘7"},{name:"Costs",href:"/costs",icon:Mx,shortcut:"⌘8"}]},{id:"automation",label:"Automation",items:[{name:"Cron Jobs",href:"/cron",icon:Tx},{name:"Webhooks",href:"/webhooks",icon:ZE}]},{id:"settings",label:"Settings",items:[{name:"Settings",href:"/settings",icon:qs,shortcut:"⌘0"}]}],Mi={id:"admin",label:"Admin",items:[{name:"Users",href:"/admin/users",icon:zx},{name:"Invite Codes",href:"/admin/invite-codes",icon:mm}]},qR=Fb.flatMap(e=>e.items),GR=[{name:"Chat",href:"/",icon:Zr},{name:"Tasks",href:"/tasks",icon:pm},{name:"Analytics",href:"/analytics",icon:hm},{name:"Agents",href:"/agents",icon:fm}];function my({label:e,collapsed:a,isOpen:s,onToggle:i,itemCount:c}){const u=c>1;return a?o.jsx("div",{className:"flex justify-center py-1.5",children:o.jsx("div",{className:"h-px w-5 bg-[var(--border)]/40"})}):u?o.jsxs("button",{onClick:i,"aria-expanded":s,"aria-label":`${s?"Collapse":"Expand"} ${e} group`,className:"group flex items-center w-full px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]/50 hover:text-[var(--muted-foreground)]/80 transition-colors",children:[o.jsx(Ax,{className:de("h-3 w-3 mr-1 transition-transform duration-200 opacity-60",!s&&"-rotate-90"),"aria-hidden":"true"}),o.jsx("span",{className:"nav-group-label",children:e})]}):o.jsx("div",{className:"px-3 py-1.5",children:o.jsx("span",{className:"nav-group-label",children:e})})}function py({item:e,isActive:a,collapsed:s,onClick:i,badge:c}){return o.jsxs(Ft,{to:e.href,onClick:i,"aria-label":s?e.name:void 0,className:de("group relative flex items-center rounded-xl transition-all duration-300",s?"justify-center h-10 w-10 mx-auto":"gap-3 px-3 py-2.5 mx-1",a?"bg-[#0a0a0b] text-white shadow-lg shadow-black/20 nav-item-active":"text-[var(--muted-foreground)]/70 hover:nav-item-hover hover:text-[var(--foreground)]"),children:[o.jsxs("div",{className:"relative flex items-center justify-center",children:[o.jsx(e.icon,{className:de("shrink-0 transition-all duration-200",s?"h-[18px] w-[18px]":"h-4 w-4",a?"text-white":"text-[var(--muted-foreground)]/70 group-hover:text-[var(--foreground)]")}),c!==void 0&&c>0&&o.jsx("span",{className:de("absolute -top-1 -right-1 flex items-center justify-center rounded-full text-[8px] font-bold","h-3.5 min-w-3.5 px-0.5","bg-[var(--destructive)] text-white"),children:c>99?"99+":c})]}),!s&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",children:e.name}),e.shortcut&&o.jsx("kbd",{className:"hidden lg:inline-flex h-5 items-center gap-0.5 rounded bg-[var(--muted)]/60 px-1.5 text-[10px] font-mono text-[var(--muted-foreground)]/70 opacity-0 group-hover:opacity-100 transition-opacity",children:e.shortcut})]}),s&&o.jsxs("div",{className:"pointer-events-none absolute left-full ml-2 opacity-0 group-hover:opacity-100 flex items-center gap-2 px-2.5 py-1.5 rounded-lg bg-[var(--popover)] text-[12px] font-medium text-[var(--foreground)] border border-[var(--border)] whitespace-nowrap shadow-lg z-[100] transition-all duration-150",children:[o.jsx("span",{children:e.name}),c!==void 0&&c>0&&o.jsx("span",{className:"flex items-center justify-center h-4 min-w-4 px-1 rounded-full bg-[var(--destructive)] text-white text-[9px] font-bold",children:c}),e.shortcut&&o.jsx("kbd",{className:"text-[10px] text-[var(--muted-foreground)]",children:e.shortcut})]})]})}function At({children:e}){const a=la(),s=oa(),{user:i,logout:c}=br(),{resolvedTheme:u}=lo(),[f,m]=y.useState(!1),[v,p]=y.useState(()=>localStorage.getItem("sidebar-collapsed")==="true"),[x,g]=y.useState(!1),[w,S]=y.useState(!1),N=y.useRef([]),j=y.useRef(0),[A,R]=y.useState(()=>{const E=localStorage.getItem("sidebar-groups");return E?JSON.parse(E):{home:!0,"ai-studio":!0,scrum:!0,insights:!0,automation:!0,settings:!0,admin:!0}}),M=E=>{R(z=>{const J={...z,[E]:!z[E]};return localStorage.setItem("sidebar-groups",JSON.stringify(J)),J})};y.useEffect(()=>{const E=a.pathname+a.search;N.current.length===0?(N.current=[E],j.current=0):E!==N.current[j.current]&&(j.current<N.current.length-1&&E===N.current[j.current+1]?j.current++:j.current>0&&E===N.current[j.current-1]?j.current--:(N.current=N.current.slice(0,j.current+1),N.current.push(E),j.current=N.current.length-1)),S(j.current<N.current.length-1)},[a]);const{data:_}=pr({queryKey:["stats"],queryFn:zi.stats.get,refetchInterval:3e4,staleTime:25e3}),{data:U}=pr({queryKey:["dlq","stats"],queryFn:zi.dlq.stats,refetchInterval:3e4,staleTime:25e3});y.useEffect(()=>{localStorage.setItem("sidebar-collapsed",v.toString())},[v]),y.useEffect(()=>{const E=()=>{g(window.scrollY>10)};return window.addEventListener("scroll",E,{passive:!0}),()=>window.removeEventListener("scroll",E)},[]),y.useEffect(()=>{const E=z=>{if((z.metaKey||z.ctrlKey)&&!z.shiftKey&&!z.altKey){const J={1:"/",2:"/agents",3:"/projects",4:"/tickets",5:"/tasks",6:"/analytics",7:"/summaries",8:"/costs",0:"/settings"};J[z.key]&&(z.preventDefault(),s(J[z.key]))}};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[s]);const H=y.useMemo(()=>{const E=a.pathname;if(E.startsWith("/projects/")&&E!=="/projects")return{name:"Project Details",parent:"Projects",parentHref:"/projects"};if(E.startsWith("/tickets/")&&E!=="/tickets")return{name:"Ticket Details",parent:"Tickets",parentHref:"/tickets"};if(E.startsWith("/tasks/")&&E!=="/tasks")return{name:"Task Details",parent:"Tasks",parentHref:"/tasks"};if(E.startsWith("/summaries/")&&E!=="/summaries")return{name:"Summary Details",parent:"Summaries",parentHref:"/summaries"};const z=qR.find(J=>J.href===E||J.href!=="/"&&E.startsWith(J.href));return z?{name:z.name}:{name:"Chat"}},[a.pathname]),P=window.history.length>1;return o.jsxs("div",{className:"flex min-h-screen bg-background",children:[o.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded-lg focus:shadow-lg focus:outline-none",children:"Skip to main content"}),o.jsx(y.Suspense,{fallback:null,children:o.jsx(HR,{})}),f&&o.jsx("button",{className:"fixed inset-0 z-40 bg-black/40 backdrop-blur-sm lg:hidden w-full h-full border-none cursor-default",onClick:()=>m(!1),"aria-label":"Close sidebar"}),o.jsx("aside",{className:de("global-sidebar fixed inset-y-0 left-0 z-50 p-2 transition-all duration-300 ease-out",v?"w-[72px]":"w-64",f?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:o.jsxs("div",{className:"glass h-full rounded-2xl flex flex-col overflow-hidden",children:[o.jsxs("div",{className:de("flex items-center flex-shrink-0 transition-all h-14",v?"justify-center px-2":"justify-between px-3"),children:[o.jsx(Ft,{to:"/",className:"flex items-center group/logo","aria-label":"profClaw Home",children:v?o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl glass-heavy shadow-lg shadow-primary/5 transition-transform group-hover/logo:scale-105",children:o.jsx(Ba,{className:"h-7 w-7 text-primary","aria-hidden":"true"})}):o.jsx("img",{src:u==="light"?"/brand/profclaw-wordmark-light.svg":"/brand/profclaw-wordmark-dark.svg",alt:"profClaw",className:"h-10 transition-transform group-hover/logo:scale-[1.02]"})}),!v&&o.jsx(dt,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg text-[var(--muted-foreground)] hover:text-[var(--foreground)]",onClick:()=>{window.innerWidth<1024?m(!1):p(!0)},"aria-label":window.innerWidth<1024?"Close sidebar":"Collapse sidebar",children:window.innerWidth<1024?o.jsx(cu,{className:"h-4 w-4"}):o.jsx(TE,{className:"h-4 w-4"})})]}),o.jsx("div",{className:de("px-2 pb-2",v&&"px-1.5"),children:o.jsxs("button",{onClick:Yh,"aria-label":"Search",className:de("flex items-center w-full rounded-lg text-[var(--muted-foreground)] bg-[var(--muted)]/40 hover:bg-[var(--muted)]/60 border border-transparent hover:border-[var(--border)]/50 transition-all",v?"justify-center h-9 w-9 mx-auto":"gap-2 px-2.5 py-2"),children:[o.jsx(iu,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),!v&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"flex-1 text-left text-[12px]",children:"Search..."}),o.jsxs("kbd",{className:"hidden sm:flex items-center gap-0.5 text-[10px] opacity-50 font-mono","aria-hidden":"true",children:[o.jsx(Q8,{className:"h-2.5 w-2.5"}),"K"]})]})]})}),o.jsxs("nav",{className:de("flex flex-col flex-1 overflow-y-auto py-1",v?"px-1.5":"px-2"),"data-tour":"sidebar-nav",children:[Fb.map((E,z)=>o.jsxs("div",{className:de(z>0&&"mt-1"),children:[o.jsx(my,{label:E.label,collapsed:v,isOpen:A[E.id]??!0,onToggle:()=>M(E.id),itemCount:E.items.length}),(A[E.id]??!0)&&o.jsx("div",{className:"space-y-0.5",children:E.items.map(J=>{const oe=J.href==="/"?a.pathname==="/":a.pathname===J.href||a.pathname.startsWith(J.href+"/");let ae;return J.hasBadge==="pending"&&(ae=_?.pending),J.hasBadge==="dlq"&&(ae=U?.total),o.jsx(py,{item:J,isActive:oe,collapsed:v,onClick:()=>m(!1),badge:ae},J.href)})})]},E.id)),i?.role==="admin"&&o.jsxs("div",{className:"mt-1",children:[o.jsx(my,{label:Mi.label,collapsed:v,isOpen:A[Mi.id]??!0,onToggle:()=>M(Mi.id),itemCount:Mi.items.length}),(A[Mi.id]??!0)&&o.jsx("div",{className:"space-y-0.5",children:Mi.items.map(E=>o.jsx(py,{item:E,isActive:a.pathname===E.href,collapsed:v,onClick:()=>m(!1)},E.href))})]})]}),o.jsx("div",{className:de("flex-shrink-0 border-t border-[var(--border)]/30",v?"p-1.5":"p-2"),children:v?o.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[o.jsxs("button",{onClick:()=>s("/settings/profile"),className:"relative group","aria-label":`View ${i?.name||"User"} profile settings`,children:[i?.avatarUrl?o.jsx("img",{src:i.avatarUrl,alt:i.name||"User avatar",className:"h-8 w-8 rounded-lg ring-1 ring-[var(--border)]/50"}):o.jsx("div",{className:"h-8 w-8 rounded-lg bg-gradient-to-br from-[var(--primary)] to-indigo-500 flex items-center justify-center text-xs font-semibold text-white",children:i?.name?.charAt(0).toUpperCase()||"U"}),o.jsx("div",{className:"pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 px-2 py-1 rounded-lg bg-[var(--popover)] text-[11px] font-medium text-[var(--foreground)] border border-[var(--border)] whitespace-nowrap shadow-lg z-[100] transition-all",children:i?.name||"Profile"})]}),o.jsx(dt,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-[var(--muted-foreground)]",onClick:()=>p(!1),title:"Expand sidebar",children:o.jsx(kE,{className:"h-4 w-4"})})]}):o.jsxs(_u,{children:[o.jsx(Du,{asChild:!0,children:o.jsxs("button",{className:"flex items-center gap-2.5 w-full px-2 py-2 rounded-lg hover:bg-[var(--muted)]/50 transition-colors","aria-label":`Open user menu for ${i?.name||"User"}`,children:[i?.avatarUrl?o.jsx("img",{src:i.avatarUrl,alt:i.name||"User avatar",className:"h-8 w-8 rounded-lg ring-1 ring-[var(--border)]/50"}):o.jsx("div",{className:"h-8 w-8 rounded-lg bg-gradient-to-br from-[var(--primary)] to-indigo-500 flex items-center justify-center text-xs font-semibold text-white",children:i?.name?.charAt(0).toUpperCase()||"U"}),o.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[o.jsx("p",{className:"text-[13px] font-medium truncate",children:i?.name||"User"}),o.jsx("p",{className:"text-[10px] text-[var(--muted-foreground)] truncate",children:i?.email||"user@example.com"})]}),o.jsx(Ax,{className:"h-4 w-4 text-[var(--muted-foreground)] shrink-0","aria-hidden":"true"})]})}),o.jsxs(Lu,{align:"end",side:"top",className:"w-56",children:[o.jsxs(un,{onClick:()=>s("/settings/profile"),children:[o.jsx(qs,{className:"h-4 w-4 mr-2"}),"Settings"]}),o.jsxs(un,{onClick:()=>s("/costs"),children:[o.jsx(kx,{className:"h-4 w-4 mr-2"}),"Billing & Costs"]}),o.jsx(Oa,{}),o.jsxs("div",{className:"px-2 py-1.5 flex items-center justify-between",children:[o.jsx("span",{className:"text-[12px] text-[var(--muted-foreground)]",children:"Theme"}),o.jsx(sy,{})]}),o.jsx(Oa,{}),o.jsxs(un,{onClick:c,className:"text-[var(--destructive)]",children:[o.jsx(Dx,{className:"h-4 w-4 mr-2"}),"Log out"]})]})]})})]})}),o.jsxs("div",{className:de("global-content flex flex-1 flex-col transition-all duration-300",v?"lg:pl-[88px]":"lg:pl-[272px]"),children:[o.jsx("header",{className:de("global-header sticky top-0 z-40 mx-3 mt-3 mb-0 transition-all duration-300",x&&"mt-0"),children:o.jsxs("div",{className:de("flex h-14 items-center justify-between px-4 transition-all duration-300",x?"glass-heavy rounded-none rounded-b-2xl shadow-xl shadow-black/5":"glass rounded-2xl"),children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(dt,{variant:"ghost",size:"icon",className:"lg:hidden rounded-full",onClick:()=>m(!0),"aria-label":"Open sidebar",children:o.jsx(EE,{className:"h-5 w-5"})}),o.jsxs("div",{className:"hidden md:flex items-center gap-0.5 px-1 py-1 rounded-lg bg-black/5 dark:bg-white/5",children:[o.jsx("button",{onClick:()=>P&&s(-1),disabled:!P,className:de("p-1.5 px-2 rounded-md transition-colors",P?"hover:bg-white/10 text-[var(--muted-foreground)] hover:text-[var(--foreground)]":"text-[var(--muted-foreground)]/30 cursor-not-allowed"),title:"Go back","aria-label":"Go back",children:o.jsx(Rx,{className:"h-3.5 w-3.5"})}),o.jsx("div",{className:"w-[1px] h-3 bg-[var(--border)]"}),o.jsx("button",{onClick:()=>w&&s(1),disabled:!w,className:de("p-1.5 px-2 rounded-md transition-colors",w?"hover:bg-white/10 text-[var(--muted-foreground)] hover:text-[var(--foreground)]":"text-[var(--muted-foreground)]/30 cursor-not-allowed"),title:"Go forward","aria-label":"Go forward",children:o.jsx(su,{className:"h-3.5 w-3.5"})})]}),o.jsxs("div",{className:"flex flex-col text-left",children:[H.parent?o.jsx(o.Fragment,{children:o.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[o.jsx(Ft,{to:H.parentHref,className:"text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:H.parent}),o.jsx(su,{className:"h-3 w-3 text-[var(--muted-foreground)]/50"}),o.jsx("span",{className:"font-semibold",children:H.name})]})}):o.jsx("h1",{className:"text-[13px] font-semibold tracking-tight leading-tight",children:H.name}),o.jsxs("div",{className:"hidden sm:flex items-center gap-2 mt-0.5",children:[o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-primary shadow-[0_0_10px_var(--primary-glow)] animate-pulse"}),o.jsx("span",{className:"text-[9px] text-muted-foreground font-black uppercase tracking-widest opacity-80",children:"Orchestrator Active"})]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"hidden md:flex items-center gap-0.5 px-1 py-1 rounded-lg bg-black/5 dark:bg-white/5 mr-2",children:GR.map(E=>{const z=a.pathname===E.href||E.href!=="/"&&a.pathname.startsWith(E.href);return o.jsxs(Ft,{to:E.href,title:E.name,className:de("p-2 rounded-xl transition-all relative group",z?"bg-primary text-primary-foreground shadow-[0_0_20px_-5px_var(--primary-glow)] scale-110":"text-muted-foreground hover:bg-primary/15 hover:text-primary hover:scale-105"),children:[o.jsx(E.icon,{className:de("h-4.5 w-4.5 transition-transform group-active:scale-90",z&&"stroke-[2.5px]")}),o.jsx("div",{className:"absolute top-full mt-3 left-1/2 -translate-x-1/2 hidden group-hover:flex items-center px-2.5 py-1.5 rounded-xl glass-heavy text-[9px] font-black uppercase tracking-widest text-foreground shadow-2xl z-50",children:E.name})]},E.href)})}),o.jsx("div",{className:"hidden sm:block h-8 w-[1px] bg-[var(--border)] mx-1"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs("button",{className:"p-2 hover:bg-white/5 rounded-full transition-colors group relative",onClick:Yh,"data-tour":"command-palette","aria-label":"Search",children:[o.jsx(iu,{className:"h-4 w-4 text-[var(--muted-foreground)]","aria-hidden":"true"}),o.jsxs("div",{className:"absolute top-full mt-2 right-0 hidden group-hover:flex items-center gap-1.5 px-2 py-1 rounded-lg bg-black/90 text-[9px] font-bold text-white border border-white/10 whitespace-nowrap shadow-xl z-50",children:[o.jsx("span",{className:"opacity-50",children:"⌘"}),o.jsx("span",{children:"K"})]})]}),o.jsx(BR,{}),o.jsx("div",{"data-tour":"theme-toggle",children:o.jsx(sy,{})}),o.jsx(EA,{})]})]})]})}),o.jsx("main",{id:"main-content",className:"flex-1 p-4 sm:p-6 outline-none",tabIndex:-1,children:e}),o.jsx(y.Suspense,{fallback:null,children:o.jsx($R,{})})]})]})}function FR(){return o.jsxs("div",{className:"animate-pulse space-y-6 p-2",children:[o.jsx("div",{className:"h-8 w-48 rounded-lg bg-muted/60"}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"h-4 w-full rounded bg-muted/40"}),o.jsx("div",{className:"h-4 w-3/4 rounded bg-muted/40"}),o.jsx("div",{className:"h-4 w-1/2 rounded bg-muted/40"})]}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6},(e,a)=>o.jsx("div",{className:"h-32 rounded-xl bg-muted/30"},a))})]})}const vy=[{id:"welcome",title:"Welcome"},{id:"github",title:"GitHub OAuth"},{id:"admin",title:"Admin Account"},{id:"complete",title:"Complete"}],ks=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains a number",test:e=>/\d/.test(e)},{label:"Contains a letter",test:e=>/[a-zA-Z]/.test(e)}];function VR(){const e=oa(),[a,s]=y.useState(0),[i,c]=y.useState(!1),[u,f]=y.useState(!1),[m,v]=y.useState(null),[p,x]=y.useState(""),[g,w]=y.useState(""),[S,N]=y.useState(""),[j,A]=y.useState(""),[R,M]=y.useState(""),[_,U]=y.useState([]),[H,P]=y.useState(!1),{data:E,refetch:z}=pr({queryKey:["setup","status"],queryFn:async()=>{const F=await fetch("/api/setup/status");if(!F.ok)throw new Error("Failed to check setup status");return F.json()}}),[J,oe]=y.useState(null),[ae,fe]=y.useState(null),ge=hr({mutationFn:async F=>{oe(null),fe(null);const T=await(await fetch("/api/setup/github-oauth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})).json();if(!T.valid)throw oe(T.error||"Invalid credentials"),fe(T.hint||null),new Error(T.error||"Invalid credentials");T.warning&&Dt.warning(T.warning);const O=await fetch("/api/setup/github-oauth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),q=await O.json();if(!O.ok){if(O.status===403&&q.error?.includes("already configured"))return{alreadyConfigured:!0};throw new Error(q.error||"Failed to save GitHub OAuth config")}return q},onSuccess:F=>{oe(null),fe(null),F?.alreadyConfigured?Dt.info("GitHub OAuth is already configured"):Dt.success("GitHub OAuth configured successfully!"),z(),s(2)},onError:F=>{J||Dt.error(F instanceof Error?F.message:"Failed to configure")}}),pe=hr({mutationFn:async F=>{const ce=await fetch("/api/setup/admin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(!ce.ok){const T=await ce.json();throw new Error(T.error||"Failed to create admin")}return ce.json()},onSuccess:F=>{Dt.success("Admin account created!"),F.recoveryCodes&&U(F.recoveryCodes),F.session?.token&&localStorage.setItem("profclaw_session",F.session.token),z(),s(3)},onError:F=>{Dt.error(F instanceof Error?F.message:"Failed to create admin")}}),ve=typeof window<"u"?`${window.location.origin}/api/auth/github/callback`:"http://localhost:3000/api/auth/github/callback",L=async(F,ce)=>{await navigator.clipboard.writeText(F),v(ce),setTimeout(()=>v(null),2e3),Dt.success("Copied to clipboard")},W=E?.configured||E?.providers?.github;y.useEffect(()=>{if(!E)return;if(_.length>0&&!H){a!==3&&s(3);return}if(E.ready&&(H||_.length===0)){e("/");return}let F=0;a===0&&(F=1),(E.configured||E.providers?.github)&&(F=2),(E.configured||E.providers?.github)&&E.hasAdmin&&(F=3),F>a&&s(F)},[E,e,a,_,H]);const G=()=>{switch(a){case 0:return o.jsxs("div",{className:"space-y-6 text-center py-8",children:[o.jsx("div",{className:"mx-auto w-24 h-24 rounded-[2rem] glass-heavy shadow-2xl flex items-center justify-center transition-transform hover:scale-110",children:o.jsx(Zr,{className:"h-12 w-12 text-[var(--primary)]"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Welcome to profClaw"}),o.jsx("p",{className:"text-[var(--muted-foreground)] max-w-sm mx-auto",children:"Let's get you set up in just a few minutes. We'll configure authentication so you can start managing tasks with AI."})]}),o.jsxs("div",{className:"flex items-center justify-center gap-6 pt-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--muted-foreground)]",children:[o.jsx(lu,{className:"h-4 w-4 text-green-500"}),o.jsx("span",{children:"Secure setup"})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--muted-foreground)]",children:[o.jsx(qs,{className:"h-4 w-4 text-[var(--primary)]"}),o.jsx("span",{children:"2-3 minutes"})]})]}),o.jsxs(dt,{onClick:()=>s(1),className:"mt-4 h-11 px-8 gap-2",children:["Get Started ",o.jsx(ga,{className:"h-4 w-4"})]})]});case 1:return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-[var(--primary)]/10 flex items-center justify-center",children:o.jsx(eo,{className:"h-6 w-6 text-[var(--primary)]"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Configure GitHub OAuth"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Create a GitHub OAuth App to enable sign-in"})]})]}),W&&o.jsxs("div",{className:"flex items-center justify-between gap-4 glass-heavy bg-green-500/5 rounded-[2rem] p-6 shadow-2xl shadow-green-500/5 transition-all hover:shadow-green-500/10",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-2xl bg-green-500/20 flex items-center justify-center shadow-inner",children:o.jsx(Lh,{className:"h-6 w-6 text-green-500 shrink-0"})}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-green-600 dark:text-green-400",children:"GitHub Configured"}),o.jsx("p",{className:"text-[var(--muted-foreground)] font-medium",children:"You're all set! Skip to admin creation."})]})]}),o.jsxs(dt,{onClick:()=>s(2),variant:"black",size:"sm",className:"shrink-0 gap-1.5",children:["Skip ",o.jsx(ga,{className:"h-3.5 w-3.5"})]})]}),o.jsxs("div",{className:"space-y-6 glass-heavy rounded-[2rem] p-6 shadow-xl",children:[o.jsxs("h3",{className:"font-black uppercase tracking-widest text-[10px] flex items-center gap-4 px-1 text-[var(--muted-foreground)]",children:[o.jsx("span",{className:"h-7 w-7 rounded-full field-recessed flex items-center justify-center text-[var(--primary)] text-xs font-black shadow-sm",children:"1"}),"Step One: Create GitHub OAuth App"]}),o.jsxs("div",{className:"space-y-4 ml-9 text-sm",children:[o.jsxs("p",{className:"text-[var(--muted-foreground)] leading-relaxed",children:["Go to"," ",o.jsxs("a",{href:"https://github.com/settings/developers",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--primary)] hover:underline inline-flex items-center gap-1 font-bold",children:["GitHub Developer Settings",o.jsx(Ox,{className:"h-3 w-3"})]})," ","and click ",o.jsx("strong",{className:"text-[var(--foreground)]",children:'"New OAuth App"'})]}),o.jsxs("div",{className:"space-y-1 field-recessed p-1 shadow-inner overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Application name"}),o.jsx("code",{className:"text-xs font-bold text-[var(--foreground)] px-2 opacity-80",children:"profClaw Task Manager"})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Homepage URL"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("code",{className:"text-[11px] font-bold opacity-70",children:window.location.origin}),o.jsx("button",{onClick:()=>L(window.location.origin,"homepage"),className:"p-2 glass hover:bg-primary/20 rounded-xl transition-all active:scale-90",children:m==="homepage"?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-50"})})]})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Callback URL"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("code",{className:"text-[11px] font-bold opacity-70 max-w-[200px] truncate",children:ve}),o.jsx("button",{onClick:()=>L(ve,"callback"),className:"p-2 glass hover:bg-primary/20 rounded-xl transition-all active:scale-90",children:m==="callback"?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-50"})})]})]})]}),o.jsxs("p",{className:"text-[var(--muted-foreground)]",children:["Click ",o.jsx("strong",{children:'"Register application"'})," then copy the Client ID and generate a Client Secret."]})]})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("h3",{className:"font-black uppercase tracking-widest text-[10px] flex items-center gap-4 px-1 text-[var(--muted-foreground)]",children:[o.jsx("span",{className:"h-7 w-7 rounded-full glass-heavy shadow-inner flex items-center justify-center text-[var(--primary)] text-xs font-black",children:"2"}),"Step Two: Enter your credentials"]}),o.jsxs("div",{className:"space-y-4 ml-9",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"clientId",className:"premium-label",children:"Client ID"}),o.jsx(aa,{id:"clientId",placeholder:"20 character hex string",value:p,onChange:F=>{x(F.target.value),oe(null)},className:de(J&&"shadow-xl shadow-red-500/20")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"clientSecret",className:"premium-label",children:"Client Secret"}),o.jsxs("div",{className:"relative",children:[o.jsx(aa,{id:"clientSecret",type:i?"text":"password",placeholder:"40 character hex string",value:g,onChange:F=>{w(F.target.value),oe(null)},className:de(J&&"shadow-xl shadow-red-500/20")}),o.jsx("button",{type:"button",onClick:()=>c(!i),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--primary)] transition-colors p-1",children:i?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]}),J&&o.jsxs("div",{className:"flex items-start gap-4 glass-heavy bg-destructive/5 rounded-2xl p-5 shadow-inner",children:[o.jsx(to,{className:"h-6 w-6 text-red-500 shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-red-600 dark:text-red-400",children:"Configuration Error"}),o.jsx("p",{className:"font-bold text-red-500/80 mt-1",children:J}),ae&&o.jsx("p",{className:"text-[var(--muted-foreground)] mt-2 font-medium opacity-70",children:ae})]})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-8 mt-4 border-t border-white/5 dark:border-white/5",children:[o.jsxs(dt,{variant:"ghost",onClick:()=>s(0),className:"gap-2",children:[o.jsx(_1,{className:"h-4 w-4"})," Back"]}),o.jsx(dt,{variant:"black",onClick:()=>ge.mutate({clientId:p,clientSecret:g}),disabled:!p||!g||ge.isPending,className:"gap-2",children:ge.isPending?o.jsx(Pa,{className:"h-4 w-4 animate-spin"}):o.jsxs(o.Fragment,{children:["Save & Continue ",o.jsx(ga,{className:"h-4 w-4"})]})})]})]});case 2:return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-[var(--primary)]/10 flex items-center justify-center",children:o.jsx(lu,{className:"h-6 w-6 text-[var(--primary)]"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Create Admin Account"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Set up your administrator account"})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminName",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Full Name"}),o.jsx(aa,{id:"adminName",placeholder:"John Doe",value:R,onChange:F=>M(F.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminEmail",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Email"}),o.jsx(aa,{id:"adminEmail",type:"email",placeholder:"admin@profclaw.ai",value:S,onChange:F=>N(F.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminPassword",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx(aa,{id:"adminPassword",type:u?"text":"password",placeholder:"••••••••",value:j,onChange:F=>A(F.target.value)}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--primary)] transition-colors",children:u?o.jsx(Jr,{className:"h-5 w-5"}):o.jsx(Wr,{className:"h-5 w-5"})})]}),j.length>0&&o.jsxs("div",{className:"space-y-2 mt-3",children:[o.jsx("div",{className:"h-1.5 bg-[var(--muted)] rounded-full overflow-hidden",children:o.jsx("div",{className:de("h-full transition-all duration-300 rounded-full",ks.filter(F=>F.test(j)).length<2&&"bg-red-500",ks.filter(F=>F.test(j)).length===2&&"bg-yellow-500",ks.filter(F=>F.test(j)).length===3&&"bg-green-500"),style:{width:`${ks.filter(F=>F.test(j)).length/ks.length*100}%`}})}),o.jsx("div",{className:"grid grid-cols-1 gap-1",children:ks.map((F,ce)=>{const T=F.test(j);return o.jsxs("div",{className:de("flex items-center gap-2 text-xs transition-all",T?"text-green-600":"text-[var(--muted-foreground)]"),children:[o.jsx("div",{className:de("h-4 w-4 rounded-full flex items-center justify-center transition-all",T?"bg-green-500/20":"bg-[var(--muted)]"),children:o.jsx(Bt,{className:de("h-2.5 w-2.5",T?"opacity-100":"opacity-0")})}),F.label]},ce)})})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-8 mt-4 border-t border-white/5 dark:border-white/5",children:[o.jsxs(dt,{variant:"ghost",onClick:()=>s(1),className:"gap-2",children:[o.jsx(_1,{className:"h-4 w-4"})," Back"]}),o.jsx(dt,{variant:"black",onClick:()=>pe.mutate({email:S,password:j,name:R}),disabled:!S||!j||!R||!ks.every(F=>F.test(j))||pe.isPending,className:"gap-2",children:pe.isPending?o.jsx(Pa,{className:"h-4 w-4 animate-spin"}):o.jsxs(o.Fragment,{children:["Create Account ",o.jsx(ga,{className:"h-4 w-4"})]})})]})]});case 3:return o.jsx("div",{className:"space-y-6 py-4",children:_.length>0&&!H?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-amber-500/10 flex items-center justify-center",children:o.jsx(pE,{className:"h-6 w-6 text-amber-500"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Save Your Recovery Codes"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Store these codes in a safe place"})]})]}),o.jsxs("div",{className:"flex items-start gap-4 glass-heavy bg-amber-500/5 rounded-[2rem] p-6 shadow-xl",children:[o.jsx(to,{className:"h-7 w-7 text-amber-500 shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-amber-600 dark:text-amber-400",children:"Single Opportunity - Read Carefuly"}),o.jsx("p",{className:"font-bold text-amber-500/80 mt-1",children:"These codes will only be shown once!"}),o.jsx("p",{className:"text-[var(--muted-foreground)] mt-3 font-medium opacity-70 leading-relaxed text-xs",children:"If you lose your password, you'll need these codes to recover your account. Save them in a secure password manager or write them down."})]})]}),o.jsx("div",{className:"glass-heavy rounded-[2rem] p-6 shadow-inner",children:o.jsx("div",{className:"grid grid-cols-2 gap-3",children:_.map((F,ce)=>o.jsxs("div",{className:"flex items-center justify-between glass-heavy rounded-xl px-4 py-3 shadow-sm hover:shadow-md transition-all group",children:[o.jsx("span",{className:"font-black text-[13px] tracking-widest opacity-80",children:F}),o.jsx("button",{onClick:()=>L(F,`code-${ce}`),className:"p-1.5 glass hover:bg-primary/20 rounded-lg transition-all active:scale-90",children:m===`code-${ce}`?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-30 group-hover:opacity-100 transition-opacity"})})]},ce))})}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[o.jsxs(dt,{variant:"outline",className:"flex-1 gap-2",onClick:()=>L(_.join(`
|
|
59
|
+
M${p},${x} h${g} a${v},${v} 0 0 1 ${v},${v} v${w} a${v},${v} 0 0 1 -${v},${v} h-${g} a${v},${v} 0 0 1 -${v},-${v} v-${w} a${v},${v} 0 0 1 ${v},-${v} z`}function bR(){const e=Re("__overlaySvg");e&&e.remove()}function wR(){const e=document.getElementById("driver-dummy-element");if(e)return e;let a=document.createElement("div");return a.id="driver-dummy-element",a.style.width="0",a.style.height="0",a.style.pointerEvents="none",a.style.opacity="0",a.style.position="fixed",a.style.top="50%",a.style.left="50%",document.body.appendChild(a),a}function uy(e){const{element:a}=e;let s=typeof a=="function"?a():typeof a=="string"?document.querySelector(a):a;s||(s=wR()),jR(s,e)}function SR(){const e=Re("__activeElement"),a=Re("__activeStep");e&&(zb(e),gR(),qb(e,a))}function jR(e,a){var s;const i=Date.now(),c=Re("__activeStep"),u=Re("__activeElement")||e,f=!u||u===e,m=e.id==="driver-dummy-element",v=u.id==="driver-dummy-element",p=je("animate"),x=a.onHighlightStarted||je("onHighlightStarted"),g=a?.onHighlighted||je("onHighlighted"),w=c?.onDeselected||je("onDeselected"),S=je(),N=Re();!f&&w&&w(v?void 0:u,c,{config:S,state:N,driver:Bn()}),x&&x(m?void 0:e,a,{config:S,state:N,driver:Bn()});const j=!f&&p;let A=!1;RR(),Kt("previousStep",c),Kt("previousElement",u),Kt("activeStep",a),Kt("activeElement",e);const R=()=>{if(Re("__transitionCallback")!==R)return;const M=Date.now()-i,_=400-M<=400/2;a.popover&&_&&!A&&j&&(dy(e,a),A=!0),je("animate")&&M<400?vR(M,400,u,e):(zb(e),g&&g(m?void 0:e,a,{config:je(),state:Re(),driver:Bn()}),Kt("__transitionCallback",void 0),Kt("__previousStep",c),Kt("__previousElement",u),Kt("__activeStep",a),Kt("__activeElement",e)),window.requestAnimationFrame(R)};Kt("__transitionCallback",R),window.requestAnimationFrame(R),Lb(e),!j&&a.popover&&dy(e,a),u.classList.remove("driver-active-element","driver-no-interaction"),u.removeAttribute("aria-haspopup"),u.removeAttribute("aria-expanded"),u.removeAttribute("aria-controls"),((s=a.disableActiveInteraction)!=null?s:je("disableActiveInteraction"))&&e.classList.add("driver-no-interaction"),e.classList.add("driver-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","driver-popover-content")}function ER(){var e;(e=document.getElementById("driver-dummy-element"))==null||e.remove(),document.querySelectorAll(".driver-active-element").forEach(a=>{a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls")})}function io(){const e=Re("__resizeTimeout");e&&window.cancelAnimationFrame(e),Kt("__resizeTimeout",window.requestAnimationFrame(SR))}function NR(e){var a;if(!Re("isInitialized")||!(e.key==="Tab"||e.keyCode===9))return;const s=Re("__activeElement"),i=(a=Re("popover"))==null?void 0:a.wrapper,c=Db([...i?[i]:[],...s?[s]:[]]),u=c[0],f=c[c.length-1];if(e.preventDefault(),e.shiftKey){const m=c[c.indexOf(document.activeElement)-1]||f;m?.focus()}else{const m=c[c.indexOf(document.activeElement)+1]||u;m?.focus()}}function Bb(e){var a;((a=je("allowKeyboardControl"))==null||a)&&(e.key==="Escape"?Ds("escapePress"):e.key==="ArrowRight"?Ds("arrowRightPress"):e.key==="ArrowLeft"&&Ds("arrowLeftPress"))}function Hb(e,a,s){const i=(c,u)=>{const f=c.target;e.contains(f)&&((!s||s(f))&&(c.preventDefault(),c.stopPropagation(),c.stopImmediatePropagation()),u?.(c))};document.addEventListener("pointerdown",i,!0),document.addEventListener("mousedown",i,!0),document.addEventListener("pointerup",i,!0),document.addEventListener("mouseup",i,!0),document.addEventListener("click",c=>{i(c,a)},!0)}function CR(){window.addEventListener("keyup",Bb,!1),window.addEventListener("keydown",NR,!1),window.addEventListener("resize",io),window.addEventListener("scroll",io)}function AR(){window.removeEventListener("keyup",Bb),window.removeEventListener("resize",io),window.removeEventListener("scroll",io)}function RR(){const e=Re("popover");e&&(e.wrapper.style.display="none")}function dy(e,a){var s,i;let c=Re("popover");c&&document.body.removeChild(c.wrapper),c=MR(),document.body.appendChild(c.wrapper);const{title:u,description:f,showButtons:m,disableButtons:v,showProgress:p,nextBtnText:x=je("nextBtnText")||"Next →",prevBtnText:g=je("prevBtnText")||"← Previous",progressText:w=je("progressText")||"{current} of {total}"}=a.popover||{};c.nextButton.innerHTML=x,c.previousButton.innerHTML=g,c.progress.innerHTML=w,u?(c.title.innerHTML=u,c.title.style.display="block"):c.title.style.display="none",f?(c.description.innerHTML=f,c.description.style.display="block"):c.description.style.display="none";const S=m||je("showButtons"),N=p||je("showProgress")||!1,j=S?.includes("next")||S?.includes("previous")||N;c.closeButton.style.display=S.includes("close")?"block":"none",j?(c.footer.style.display="flex",c.progress.style.display=N?"block":"none",c.nextButton.style.display=S.includes("next")?"block":"none",c.previousButton.style.display=S.includes("previous")?"block":"none"):c.footer.style.display="none";const A=v||je("disableButtons")||[];A!=null&&A.includes("next")&&(c.nextButton.disabled=!0,c.nextButton.classList.add("driver-popover-btn-disabled")),A!=null&&A.includes("previous")&&(c.previousButton.disabled=!0,c.previousButton.classList.add("driver-popover-btn-disabled")),A!=null&&A.includes("close")&&(c.closeButton.disabled=!0,c.closeButton.classList.add("driver-popover-btn-disabled"));const R=c.wrapper;R.style.display="block",R.style.left="",R.style.top="",R.style.bottom="",R.style.right="",R.id="driver-popover-content",R.setAttribute("role","dialog"),R.setAttribute("aria-labelledby","driver-popover-title"),R.setAttribute("aria-describedby","driver-popover-description");const M=c.arrow;M.className="driver-popover-arrow";const _=((s=a.popover)==null?void 0:s.popoverClass)||je("popoverClass")||"";R.className=`driver-popover ${_}`.trim(),Hb(c.wrapper,E=>{var z,J,oe;const ae=E.target,fe=((z=a.popover)==null?void 0:z.onNextClick)||je("onNextClick"),ge=((J=a.popover)==null?void 0:J.onPrevClick)||je("onPrevClick"),pe=((oe=a.popover)==null?void 0:oe.onCloseClick)||je("onCloseClick");if(ae.closest(".driver-popover-next-btn"))return fe?fe(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("nextClick");if(ae.closest(".driver-popover-prev-btn"))return ge?ge(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("prevClick");if(ae.closest(".driver-popover-close-btn"))return pe?pe(e,a,{config:je(),state:Re(),driver:Bn()}):Ds("closeClick")},E=>!(c!=null&&c.description.contains(E))&&!(c!=null&&c.title.contains(E))&&typeof E.className=="string"&&E.className.includes("driver-popover")),Kt("popover",c);const U=((i=a.popover)==null?void 0:i.onPopoverRender)||je("onPopoverRender");U&&U(c,{config:je(),state:Re(),driver:Bn()}),qb(e,a),Lb(R);const H=e.classList.contains("driver-dummy-element"),P=Db([R,...H?[]:[e]]);P.length>0&&P[0].focus()}function $b(){const e=Re("popover");if(!(e!=null&&e.wrapper))return;const a=e.wrapper.getBoundingClientRect(),s=je("stagePadding")||0,i=je("popoverOffset")||0;return{width:a.width+s+i,height:a.height+s+i,realWidth:a.width,realHeight:a.height}}function fy(e,a){const{elementDimensions:s,popoverDimensions:i,popoverPadding:c,popoverArrowDimensions:u}=a;return e==="start"?Math.max(Math.min(s.top-c,window.innerHeight-i.realHeight-u.width),u.width):e==="end"?Math.max(Math.min(s.top-i?.realHeight+s.height+c,window.innerHeight-i?.realHeight-u.width),u.width):e==="center"?Math.max(Math.min(s.top+s.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-u.width),u.width):0}function hy(e,a){const{elementDimensions:s,popoverDimensions:i,popoverPadding:c,popoverArrowDimensions:u}=a;return e==="start"?Math.max(Math.min(s.left-c,window.innerWidth-i.realWidth-u.width),u.width):e==="end"?Math.max(Math.min(s.left-i?.realWidth+s.width+c,window.innerWidth-i?.realWidth-u.width),u.width):e==="center"?Math.max(Math.min(s.left+s.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-u.width),u.width):0}function qb(e,a){const s=Re("popover");if(!s)return;const{align:i="start",side:c="left"}=a?.popover||{},u=i,f=e.id==="driver-dummy-element"?"over":c,m=je("stagePadding")||0,v=$b(),p=s.arrow.getBoundingClientRect(),x=e.getBoundingClientRect(),g=x.top-v.height;let w=g>=0;const S=window.innerHeight-(x.bottom+v.height);let N=S>=0;const j=x.left-v.width;let A=j>=0;const R=window.innerWidth-(x.right+v.width);let M=R>=0;const _=!w&&!N&&!A&&!M;let U=f;if(f==="top"&&w?M=A=N=!1:f==="bottom"&&N?M=A=w=!1:f==="left"&&A?M=w=N=!1:f==="right"&&M&&(A=w=N=!1),f==="over"){const H=window.innerWidth/2-v.realWidth/2,P=window.innerHeight/2-v.realHeight/2;s.wrapper.style.left=`${H}px`,s.wrapper.style.right="auto",s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto"}else if(_){const H=window.innerWidth/2-v?.realWidth/2,P=10;s.wrapper.style.left=`${H}px`,s.wrapper.style.right="auto",s.wrapper.style.bottom=`${P}px`,s.wrapper.style.top="auto"}else if(A){const H=Math.min(j,window.innerWidth-v?.realWidth-p.width),P=fy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.left=`${H}px`,s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.right="auto",U="left"}else if(M){const H=Math.min(R,window.innerWidth-v?.realWidth-p.width),P=fy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.right=`${H}px`,s.wrapper.style.top=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.left="auto",U="right"}else if(w){const H=Math.min(g,window.innerHeight-v.realHeight-p.width);let P=hy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.top=`${H}px`,s.wrapper.style.left=`${P}px`,s.wrapper.style.bottom="auto",s.wrapper.style.right="auto",U="top"}else if(N){const H=Math.min(S,window.innerHeight-v?.realHeight-p.width);let P=hy(u,{elementDimensions:x,popoverDimensions:v,popoverPadding:m,popoverArrowDimensions:p});s.wrapper.style.left=`${P}px`,s.wrapper.style.bottom=`${H}px`,s.wrapper.style.top="auto",s.wrapper.style.right="auto",U="bottom"}_?s.arrow.classList.add("driver-popover-arrow-none"):TR(u,U,e)}function TR(e,a,s){const i=Re("popover");if(!i)return;const c=s.getBoundingClientRect(),u=$b(),f=i.arrow,m=u.width,v=window.innerWidth,p=c.width,x=c.left,g=u.height,w=window.innerHeight,S=c.top,N=c.height;f.className="driver-popover-arrow";let j=a,A=e;if(a==="top"?(x+p<=0?(j="right",A="end"):x+p-m<=0&&(j="top",A="start"),x>=v?(j="left",A="end"):x+m>=v&&(j="top",A="end")):a==="bottom"?(x+p<=0?(j="right",A="start"):x+p-m<=0&&(j="bottom",A="start"),x>=v?(j="left",A="start"):x+m>=v&&(j="bottom",A="end")):a==="left"?(S+N<=0?(j="bottom",A="end"):S+N-g<=0&&(j="left",A="start"),S>=w?(j="top",A="end"):S+g>=w&&(j="left",A="end")):a==="right"&&(S+N<=0?(j="bottom",A="start"):S+N-g<=0&&(j="right",A="start"),S>=w?(j="top",A="start"):S+g>=w&&(j="right",A="end")),!j)f.classList.add("driver-popover-arrow-none");else{f.classList.add(`driver-popover-arrow-side-${j}`),f.classList.add(`driver-popover-arrow-align-${A}`);const R=s.getBoundingClientRect(),M=f.getBoundingClientRect(),_=je("stagePadding")||0,U=R.left-_<window.innerWidth&&R.right+_>0&&R.top-_<window.innerHeight&&R.bottom+_>0;a==="bottom"&&U&&(M.x>R.x&&M.x+M.width<R.x+R.width?i.wrapper.style.transform="translateY(0)":(f.classList.remove(`driver-popover-arrow-align-${A}`),f.classList.add("driver-popover-arrow-none"),i.wrapper.style.transform=`translateY(-${_/2}px)`))}}function MR(){const e=document.createElement("div");e.classList.add("driver-popover");const a=document.createElement("div");a.classList.add("driver-popover-arrow");const s=document.createElement("header");s.id="driver-popover-title",s.classList.add("driver-popover-title"),s.style.display="none",s.innerText="Popover Title";const i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";const c=document.createElement("button");c.type="button",c.classList.add("driver-popover-close-btn"),c.setAttribute("aria-label","Close"),c.innerHTML="×";const u=document.createElement("footer");u.classList.add("driver-popover-footer");const f=document.createElement("span");f.classList.add("driver-popover-progress-text"),f.innerText="";const m=document.createElement("span");m.classList.add("driver-popover-navigation-btns");const v=document.createElement("button");v.type="button",v.classList.add("driver-popover-prev-btn"),v.innerHTML="← Previous";const p=document.createElement("button");return p.type="button",p.classList.add("driver-popover-next-btn"),p.innerHTML="Next →",m.appendChild(v),m.appendChild(p),u.appendChild(f),u.appendChild(m),e.appendChild(c),e.appendChild(a),e.appendChild(s),e.appendChild(i),e.appendChild(u),{wrapper:e,arrow:a,title:s,description:i,footer:u,previousButton:v,nextButton:p,closeButton:c,footerButtons:m,progress:f}}function kR(){var e;const a=Re("popover");a&&((e=a.wrapper.parentElement)==null||e.removeChild(a.wrapper))}function OR(e={}){bh(e);function a(){je("allowClose")&&x()}function s(){const w=je("overlayClickBehavior");if(je("allowClose")&&w==="close"){x();return}if(typeof w=="function"){const S=Re("__activeStep"),N=Re("__activeElement");w(N,S,{config:je(),state:Re(),driver:Bn()});return}w==="nextStep"&&i()}function i(){const w=Re("activeIndex"),S=je("steps")||[];if(typeof w>"u")return;const N=w+1;S[N]?p(N):x()}function c(){const w=Re("activeIndex"),S=je("steps")||[];if(typeof w>"u")return;const N=w-1;S[N]?p(N):x()}function u(w){(je("steps")||[])[w]?p(w):x()}function f(){var w;if(Re("__transitionCallback"))return;const S=Re("activeIndex"),N=Re("__activeStep"),j=Re("__activeElement");if(typeof S>"u"||typeof N>"u"||typeof Re("activeIndex")>"u")return;const A=((w=N.popover)==null?void 0:w.onPrevClick)||je("onPrevClick");if(A)return A(j,N,{config:je(),state:Re(),driver:Bn()});c()}function m(){var w;if(Re("__transitionCallback"))return;const S=Re("activeIndex"),N=Re("__activeStep"),j=Re("__activeElement");if(typeof S>"u"||typeof N>"u")return;const A=((w=N.popover)==null?void 0:w.onNextClick)||je("onNextClick");if(A)return A(j,N,{config:je(),state:Re(),driver:Bn()});i()}function v(){Re("isInitialized")||(Kt("isInitialized",!0),document.body.classList.add("driver-active",je("animate")?"driver-fade":"driver-simple"),CR(),Fc("overlayClick",s),Fc("escapePress",a),Fc("arrowLeftPress",f),Fc("arrowRightPress",m))}function p(w=0){var S,N,j,A,R,M,_,U;const H=je("steps");if(!H){console.error("No steps to drive through"),x();return}if(!H[w]){x();return}Kt("__activeOnDestroyed",document.activeElement),Kt("activeIndex",w);const P=H[w],E=H[w+1],z=H[w-1],J=((S=P.popover)==null?void 0:S.doneBtnText)||je("doneBtnText")||"Done",oe=je("allowClose"),ae=typeof((N=P.popover)==null?void 0:N.showProgress)<"u"?(j=P.popover)==null?void 0:j.showProgress:je("showProgress"),fe=(((A=P.popover)==null?void 0:A.progressText)||je("progressText")||"{{current}} of {{total}}").replace("{{current}}",`${w+1}`).replace("{{total}}",`${H.length}`),ge=((R=P.popover)==null?void 0:R.showButtons)||je("showButtons"),pe=["next","previous",...oe?["close"]:[]].filter(G=>!(ge!=null&&ge.length)||ge.includes(G)),ve=((M=P.popover)==null?void 0:M.onNextClick)||je("onNextClick"),L=((_=P.popover)==null?void 0:_.onPrevClick)||je("onPrevClick"),W=((U=P.popover)==null?void 0:U.onCloseClick)||je("onCloseClick");uy({...P,popover:{showButtons:pe,nextBtnText:E?void 0:J,disableButtons:[...z?[]:["previous"]],showProgress:ae,progressText:fe,onNextClick:ve||(()=>{E?p(w+1):x()}),onPrevClick:L||(()=>{p(w-1)}),onCloseClick:W||(()=>{x()}),...P?.popover||{}}})}function x(w=!0){const S=Re("__activeElement"),N=Re("__activeStep"),j=Re("__activeOnDestroyed"),A=je("onDestroyStarted");if(w&&A){const _=!S||S?.id==="driver-dummy-element";A(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()});return}const R=N?.onDeselected||je("onDeselected"),M=je("onDestroyed");if(document.body.classList.remove("driver-active","driver-fade","driver-simple"),AR(),kR(),ER(),bR(),fR(),cy(),S&&N){const _=S.id==="driver-dummy-element";R&&R(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()}),M&&M(_?void 0:S,N,{config:je(),state:Re(),driver:Bn()})}j&&j.focus()}const g={isActive:()=>Re("isInitialized")||!1,refresh:io,drive:(w=0)=>{v(),p(w)},setConfig:bh,setSteps:w=>{cy(),bh({...je(),steps:w})},getConfig:je,getState:Re,getActiveIndex:()=>Re("activeIndex"),isFirstStep:()=>Re("activeIndex")===0,isLastStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&S===w.length-1},getActiveStep:()=>Re("activeStep"),getActiveElement:()=>Re("activeElement"),getPreviousElement:()=>Re("previousElement"),getPreviousStep:()=>Re("previousStep"),moveNext:i,movePrevious:c,moveTo:u,hasNextStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&!!w[S+1]},hasPreviousStep:()=>{const w=je("steps")||[],S=Re("activeIndex");return S!==void 0&&!!w[S-1]},highlight:w=>{v(),uy({...w,popover:w.popover?{showButtons:[],showProgress:!1,progressText:"",...w.popover}:void 0})},destroy:()=>{x(!1)}};return dR(g),g}const Jc="profclaw-onboarding-completed",_R=[{popover:{title:"Welcome to profClaw",description:"Your AI agent orchestration hub. Let me give you a quick tour of the key features.",side:"bottom",align:"center"}},{element:'[data-tour="sidebar-nav"]',popover:{title:"Navigation",description:"Access Dashboard, Tasks, Summaries, Costs, Agents, and Settings. Everything you need is one click away.",side:"right",align:"start"}},{element:'[data-tour="command-palette"]',popover:{title:"Quick Actions",description:"Press ⌘K (or Ctrl+K) anytime to search, navigate, or perform actions instantly.",side:"bottom",align:"end"}},{element:'[data-tour="theme-toggle"]',popover:{title:"Theme Preferences",description:"Switch between Light, Dark, and Midnight themes. Your preference is saved automatically.",side:"left",align:"center"}},{popover:{title:"You're Ready!",description:"Create tasks manually or connect webhooks from GitHub, Jira, or Linear. Your AI agents are standing by.",side:"bottom",align:"center"}}];function Gb(){const[e,a]=y.useState(()=>typeof window>"u"?!0:localStorage.getItem(Jc)==="true"),s=y.useCallback(()=>{const c=OR({showProgress:!0,animate:!0,smoothScroll:!0,allowClose:!0,stagePadding:12,stageRadius:20,steps:_R,nextBtnText:"Next →",prevBtnText:"← Back",doneBtnText:"Get Started",progressText:"{{current}} of {{total}}",onDestroyStarted:()=>{localStorage.setItem(Jc,"true"),a(!0),c.destroy(),fetch("/api/auth/me",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({onboardingCompleted:!0})}).catch(()=>{})}});c.drive()},[]),i=y.useCallback(()=>{localStorage.removeItem(Jc),a(!1)},[]);return{hasCompleted:e,startTour:s,resetTour:i}}function DR(){const{hasCompleted:e,startTour:a}=Gb(),{isAuthenticated:s,user:i}=br();return y.useEffect(()=>{if(!s||e)return;if(i?.onboardingCompleted){localStorage.setItem(Jc,"true");return}const c=setTimeout(()=>{a()},1500);return()=>clearTimeout(c)},[e,a,s,i?.onboardingCompleted]),null}const Ih="open-command-palette";function Yh(){window.dispatchEvent(new CustomEvent(Ih))}function LR(){const[e,a]=y.useState(!1),s=oa(),{theme:i,setTheme:c}=lo(),{resetTour:u,startTour:f}=Gb();y.useEffect(()=>{const v=x=>{x.key==="k"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),x.stopPropagation(),a(g=>!g)),x.key==="Escape"&&e&&(x.preventDefault(),a(!1))},p=()=>a(!0);return window.addEventListener("keydown",v,!0),window.addEventListener(Ih,p),()=>{window.removeEventListener("keydown",v,!0),window.removeEventListener(Ih,p)}},[e]);const m=y.useCallback(v=>{a(!1),v()},[]);return e?o.jsx("button",{className:"fixed inset-0 z-[100] flex items-start justify-center pt-[10vh] sm:pt-[15vh] px-4 backdrop-blur-md bg-black/20 dark:bg-black/60 animate-in fade-in duration-300 w-full h-full border-none cursor-default",onClick:()=>a(!1),"aria-label":"Close command palette",children:o.jsx("div",{className:"w-full max-w-2xl overflow-hidden glass-heavy rounded-[32px] shadow-[0_32px_128px_-16px_rgba(0,0,0,0.5)] border border-white/10 animate-in zoom-in-95 duration-300",onClick:v=>v.stopPropagation(),children:o.jsxs(Ma,{className:"flex flex-col h-full bg-transparent",children:[o.jsxs("div",{className:"flex items-center px-6 border-b border-white/5",children:[o.jsx(iu,{className:"h-5 w-5 text-muted-foreground mr-3"}),o.jsx(Ma.Input,{autoFocus:!0,placeholder:"Type a command or search...",className:"flex-1 h-20 bg-transparent outline-none text-lg placeholder:text-muted-foreground/50"}),o.jsx("div",{className:"hidden sm:flex items-center gap-1.5 px-2 py-1 rounded-lg bg-white/5 border border-white/5",children:o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground",children:"ESC"})})]}),o.jsxs(Ma.List,{className:"max-h-[60vh] sm:max-h-[450px] overflow-y-auto p-3 scrollbar-none [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",children:[o.jsx(Ma.Empty,{className:"py-16 text-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-3 opacity-40",children:[o.jsx(iu,{className:"h-10 w-10"}),o.jsx("p",{className:"text-sm font-medium",children:"No results found for your search"})]})}),o.jsx(Ma.Group,{heading:"General",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-1 mt-2",children:[o.jsx(Nn,{onSelect:()=>m(()=>s("/")),icon:Zr,children:"Chat"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/tasks")),icon:pm,children:"Tasks"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/analytics")),icon:hm,children:"Analytics"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/summaries")),icon:_x,children:"Summaries"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/costs")),icon:Mx,children:"Costs"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/agents")),icon:fm,children:"Agents"}),o.jsx(Nn,{onSelect:()=>m(()=>s("/settings")),icon:qs,children:"Settings"})]})}),o.jsx(Ma.Separator,{className:"h-px bg-white/5 mx-3 my-2"}),o.jsx(Ma.Group,{heading:"Quick Actions",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"space-y-1 mt-2",children:[o.jsx(Nn,{onSelect:()=>m(()=>{}),icon:_E,children:"Create New Task"}),o.jsx(Nn,{onSelect:()=>m(()=>{u(),setTimeout(()=>f(),100)}),icon:UE,children:"Start Onboarding Tour"}),o.jsx(Nn,{onSelect:()=>m(()=>c(i==="light"?"dark":"light")),icon:i==="light"?Kl:ou,children:i==="light"?"Switch to Dark Blue":"Switch to Light Mode"}),o.jsx(Nn,{onSelect:()=>m(()=>c("midnight")),icon:Zr,children:"Switch to Midnight Black"})]})}),o.jsx(Ma.Group,{heading:"Voice",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsx("div",{className:"space-y-1 mt-2",children:o.jsx(Nn,{onSelect:()=>m(()=>{window.dispatchEvent(new CustomEvent("profclaw:talk-mode-toggle"))}),icon:D8,children:"Toggle Talk Mode"})})}),o.jsx(Ma.Group,{heading:"Diagnostics",className:"px-3 py-4 text-[11px] font-bold uppercase tracking-widest text-muted-foreground/60",children:o.jsxs("div",{className:"space-y-1 mt-2",children:[o.jsx(Nn,{icon:Lx,children:"Open Debug Terminal"}),o.jsx(Nn,{icon:M8,children:"System Health Report"})]})})]}),o.jsxs("footer",{className:"flex items-center justify-between px-6 py-4 border-t border-white/5 bg-white/[0.03] backdrop-blur-md",children:[o.jsxs("div",{className:"flex gap-6 items-center",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-white/20 bg-white/10 text-[10px] font-bold font-sans",children:"↵"}),o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-tighter",children:"Enter"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("kbd",{className:"flex h-5 w-8 items-center justify-center rounded border border-white/20 bg-white/10 text-[10px] font-bold font-sans",children:"↑↓"}),o.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-tighter",children:"Navigate"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-primary",children:[o.jsx(Zr,{className:"h-3 w-3"}),o.jsx("span",{className:"text-[9px] font-bold uppercase tracking-[0.2em]",children:"profClaw INTELLIGENCE"})]})]})]})})}):null}function Nn({children:e,icon:a,onSelect:s}){return o.jsxs(Ma.Item,{onSelect:s,className:"flex items-center gap-3 px-4 py-3.5 rounded-2xl cursor-default select-none aria-selected:bg-primary/10 dark:aria-selected:bg-white/10 aria-selected:text-foreground transition-all duration-200 group",children:[o.jsx("div",{className:"h-9 w-9 rounded-[12px] glass-heavy flex items-center justify-center border-white/5 group-aria-selected:border-primary/30 dark:group-aria-selected:border-white/20 group-aria-selected:scale-110 transition-transform",children:o.jsx(a,{className:"h-[18px] w-[18px] text-muted-foreground group-aria-selected:text-primary dark:group-aria-selected:text-blue-400 group-aria-selected:drop-shadow-[0_0_8px_rgba(96,165,250,0.5)] transition-all"})}),o.jsx("span",{className:"text-[14px] font-medium tracking-tight",children:e})]})}const zR=Object.freeze(Object.defineProperty({__proto__:null,CommandPalette:LR,openCommandPalette:Yh},Symbol.toStringTag,{value:"Module"}));function UR(e){const s=Date.now()-e,i=Math.floor(s/1e3);if(i<60)return"just now";const c=Math.floor(i/60);if(c<60)return`${c}m ago`;const u=Math.floor(c/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function PR({type:e}){switch(e){case"success":return o.jsx(V8,{className:"h-4 w-4 text-green-400"});case"error":return o.jsx(Us,{className:"h-4 w-4 text-red-400"});case"warning":return o.jsx(to,{className:"h-4 w-4 text-amber-400"});default:return o.jsx(Tx,{className:"h-4 w-4 text-blue-400"})}}function BR(){const e=oa(),a=oo(),{data:s}=pr({queryKey:["notifications"],queryFn:()=>zi.notifications.list({limit:20}),refetchInterval:3e4}),i=s?.notifications??[],c=s?.unreadCount??0,u=hr({mutationFn:()=>zi.notifications.markAllRead(),onSuccess:()=>{a.invalidateQueries({queryKey:["notifications"]})}}),f=hr({mutationFn:m=>zi.notifications.markRead(m),onSuccess:()=>{a.invalidateQueries({queryKey:["notifications"]})}});return o.jsxs(_u,{children:[o.jsx(Du,{asChild:!0,children:o.jsxs(dt,{variant:"ghost",size:"icon",className:"relative rounded-full hover-lift transition-liquid","aria-label":"Notifications",children:[o.jsx(ru,{className:"h-5 w-5 text-muted-foreground"}),c>0&&o.jsxs("span",{className:"absolute top-2 right-2 flex h-2.5 w-2.5",children:[o.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-red-400 opacity-75"}),o.jsx("span",{className:"relative inline-flex rounded-full h-2.5 w-2.5 bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"})]})]})}),o.jsxs(Lu,{align:"end",className:"w-[320px] glass-heavy rounded-3xl p-0 overflow-hidden shadow-2xl border-white/10",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/5 bg-white/[0.02]",children:[o.jsx(Ql,{className:"p-0 text-sm font-bold uppercase tracking-widest",children:"Notifications"}),c>0&&o.jsx("button",{onClick:()=>u.mutate(),className:"text-[10px] font-bold text-primary hover:underline uppercase tracking-tight",children:"Mark all read"})]}),o.jsx("div",{className:"max-h-[400px] overflow-y-auto scrollbar-none",children:i.length>0?i.map((m,v)=>o.jsxs(y.Fragment,{children:[o.jsxs(un,{className:"flex flex-col items-start gap-1 p-5 cursor-default focus:bg-white/5 transition-colors group",onClick:()=>{m.read||f.mutate(m.id)},children:[o.jsxs("div",{className:"flex w-full items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(PR,{type:m.type}),o.jsx("span",{className:de("text-[13px] font-bold",!m.read&&"text-foreground"),children:m.title})]}),o.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:UR(m.createdAt)})]}),m.description&&o.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed pr-4",children:m.description}),!m.read&&o.jsx("div",{className:"absolute top-5 right-2 h-1.5 w-1.5 rounded-full bg-primary"})]}),v<i.length-1&&o.jsx(Oa,{className:"bg-white/5 m-0"})]},m.id)):o.jsxs("div",{className:"py-12 text-center",children:[o.jsx(ru,{className:"h-10 w-10 mx-auto text-muted-foreground opacity-20 mb-3"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"No new notifications"})]})}),o.jsx("div",{className:"px-5 py-3 border-t border-white/5 bg-white/[0.02] text-center",children:o.jsx("button",{onClick:()=>e("/activity"),className:"text-[11px] font-bold text-muted-foreground hover:text-foreground transition-colors uppercase tracking-widest",children:"View All Activity"})})]})]})}const HR=y.lazy(()=>vt(()=>Promise.resolve().then(()=>zR),[]).then(e=>({default:e.CommandPalette}))),$R=y.lazy(()=>vt(()=>import("./FloatingChatbot-BZBzrJxd.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.FloatingChatbot}))),Fb=[{id:"home",label:"Home",items:[{name:"Chat",href:"/",icon:Zr,shortcut:"⌘1"}]},{id:"ai-studio",label:"AI Studio",items:[{name:"Agents",href:"/agents",icon:fm,shortcut:"⌘2"},{name:"Gateway",href:"/gateway",icon:vm}]},{id:"scrum",label:"Scrum",items:[{name:"Projects",href:"/projects",icon:dE,shortcut:"⌘3"},{name:"Tickets",href:"/tickets",icon:VE,shortcut:"⌘4"},{name:"Tasks",href:"/tasks",icon:pm,shortcut:"⌘5",hasBadge:"pending"},{name:"Failed",href:"/failed",icon:to,hasBadge:"dlq"}]},{id:"insights",label:"Insights",items:[{name:"Analytics",href:"/analytics",icon:hm,shortcut:"⌘6"},{name:"Activity",href:"/activity",icon:ru},{name:"Summaries",href:"/summaries",icon:_x,shortcut:"⌘7"},{name:"Costs",href:"/costs",icon:Mx,shortcut:"⌘8"}]},{id:"automation",label:"Automation",items:[{name:"Cron Jobs",href:"/cron",icon:Tx},{name:"Webhooks",href:"/webhooks",icon:ZE}]},{id:"settings",label:"Settings",items:[{name:"Settings",href:"/settings",icon:qs,shortcut:"⌘0"}]}],Mi={id:"admin",label:"Admin",items:[{name:"Users",href:"/admin/users",icon:zx},{name:"Invite Codes",href:"/admin/invite-codes",icon:mm}]},qR=Fb.flatMap(e=>e.items),GR=[{name:"Chat",href:"/",icon:Zr},{name:"Tasks",href:"/tasks",icon:pm},{name:"Analytics",href:"/analytics",icon:hm},{name:"Agents",href:"/agents",icon:fm}];function my({label:e,collapsed:a,isOpen:s,onToggle:i,itemCount:c}){const u=c>1;return a?o.jsx("div",{className:"flex justify-center py-1.5",children:o.jsx("div",{className:"h-px w-5 bg-[var(--border)]/40"})}):u?o.jsxs("button",{onClick:i,"aria-expanded":s,"aria-label":`${s?"Collapse":"Expand"} ${e} group`,className:"group flex items-center w-full px-3 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[var(--muted-foreground)]/50 hover:text-[var(--muted-foreground)]/80 transition-colors",children:[o.jsx(Ax,{className:de("h-3 w-3 mr-1 transition-transform duration-200 opacity-60",!s&&"-rotate-90"),"aria-hidden":"true"}),o.jsx("span",{className:"nav-group-label",children:e})]}):o.jsx("div",{className:"px-3 py-1.5",children:o.jsx("span",{className:"nav-group-label",children:e})})}function py({item:e,isActive:a,collapsed:s,onClick:i,badge:c}){return o.jsxs(Ft,{to:e.href,onClick:i,"aria-label":s?e.name:void 0,className:de("group relative flex items-center rounded-xl transition-all duration-300",s?"justify-center h-10 w-10 mx-auto":"gap-3 px-3 py-2.5 mx-1",a?"bg-[#0a0a0b] text-white shadow-lg shadow-black/20 nav-item-active":"text-[var(--muted-foreground)]/70 hover:nav-item-hover hover:text-[var(--foreground)]"),children:[o.jsxs("div",{className:"relative flex items-center justify-center",children:[o.jsx(e.icon,{className:de("shrink-0 transition-all duration-200",s?"h-[18px] w-[18px]":"h-4 w-4",a?"text-white":"text-[var(--muted-foreground)]/70 group-hover:text-[var(--foreground)]")}),c!==void 0&&c>0&&o.jsx("span",{className:de("absolute -top-1 -right-1 flex items-center justify-center rounded-full text-[8px] font-bold","h-3.5 min-w-3.5 px-0.5","bg-[var(--destructive)] text-white"),children:c>99?"99+":c})]}),!s&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-[13px] font-medium flex-1 truncate",children:e.name}),e.shortcut&&o.jsx("kbd",{className:"hidden lg:inline-flex h-5 items-center gap-0.5 rounded bg-[var(--muted)]/60 px-1.5 text-[10px] font-mono text-[var(--muted-foreground)]/70 opacity-0 group-hover:opacity-100 transition-opacity",children:e.shortcut})]}),s&&o.jsxs("div",{className:"pointer-events-none absolute left-full ml-2 opacity-0 group-hover:opacity-100 flex items-center gap-2 px-2.5 py-1.5 rounded-lg bg-[var(--popover)] text-[12px] font-medium text-[var(--foreground)] border border-[var(--border)] whitespace-nowrap shadow-lg z-[100] transition-all duration-150",children:[o.jsx("span",{children:e.name}),c!==void 0&&c>0&&o.jsx("span",{className:"flex items-center justify-center h-4 min-w-4 px-1 rounded-full bg-[var(--destructive)] text-white text-[9px] font-bold",children:c}),e.shortcut&&o.jsx("kbd",{className:"text-[10px] text-[var(--muted-foreground)]",children:e.shortcut})]})]})}function At({children:e}){const a=la(),s=oa(),{user:i,logout:c}=br(),{resolvedTheme:u}=lo(),[f,m]=y.useState(!1),[v,p]=y.useState(()=>localStorage.getItem("sidebar-collapsed")==="true"),[x,g]=y.useState(!1),[w,S]=y.useState(!1),N=y.useRef([]),j=y.useRef(0),[A,R]=y.useState(()=>{const E=localStorage.getItem("sidebar-groups");return E?JSON.parse(E):{home:!0,"ai-studio":!0,scrum:!0,insights:!0,automation:!0,settings:!0,admin:!0}}),M=E=>{R(z=>{const J={...z,[E]:!z[E]};return localStorage.setItem("sidebar-groups",JSON.stringify(J)),J})};y.useEffect(()=>{const E=a.pathname+a.search;N.current.length===0?(N.current=[E],j.current=0):E!==N.current[j.current]&&(j.current<N.current.length-1&&E===N.current[j.current+1]?j.current++:j.current>0&&E===N.current[j.current-1]?j.current--:(N.current=N.current.slice(0,j.current+1),N.current.push(E),j.current=N.current.length-1)),S(j.current<N.current.length-1)},[a]);const{data:_}=pr({queryKey:["stats"],queryFn:zi.stats.get,refetchInterval:3e4,staleTime:25e3}),{data:U}=pr({queryKey:["dlq","stats"],queryFn:zi.dlq.stats,refetchInterval:3e4,staleTime:25e3});y.useEffect(()=>{localStorage.setItem("sidebar-collapsed",v.toString())},[v]),y.useEffect(()=>{const E=()=>{g(window.scrollY>10)};return window.addEventListener("scroll",E,{passive:!0}),()=>window.removeEventListener("scroll",E)},[]),y.useEffect(()=>{const E=z=>{if((z.metaKey||z.ctrlKey)&&!z.shiftKey&&!z.altKey){const J={1:"/",2:"/agents",3:"/projects",4:"/tickets",5:"/tasks",6:"/analytics",7:"/summaries",8:"/costs",0:"/settings"};J[z.key]&&(z.preventDefault(),s(J[z.key]))}};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[s]);const H=y.useMemo(()=>{const E=a.pathname;if(E.startsWith("/projects/")&&E!=="/projects")return{name:"Project Details",parent:"Projects",parentHref:"/projects"};if(E.startsWith("/tickets/")&&E!=="/tickets")return{name:"Ticket Details",parent:"Tickets",parentHref:"/tickets"};if(E.startsWith("/tasks/")&&E!=="/tasks")return{name:"Task Details",parent:"Tasks",parentHref:"/tasks"};if(E.startsWith("/summaries/")&&E!=="/summaries")return{name:"Summary Details",parent:"Summaries",parentHref:"/summaries"};const z=qR.find(J=>J.href===E||J.href!=="/"&&E.startsWith(J.href));return z?{name:z.name}:{name:"Chat"}},[a.pathname]),P=window.history.length>1;return o.jsxs("div",{className:"flex min-h-screen bg-background",children:[o.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-primary focus:text-white focus:rounded-lg focus:shadow-lg focus:outline-none",children:"Skip to main content"}),o.jsx(y.Suspense,{fallback:null,children:o.jsx(HR,{})}),f&&o.jsx("button",{className:"fixed inset-0 z-40 bg-black/40 backdrop-blur-sm lg:hidden w-full h-full border-none cursor-default",onClick:()=>m(!1),"aria-label":"Close sidebar"}),o.jsx("aside",{className:de("global-sidebar fixed inset-y-0 left-0 z-50 p-2 transition-all duration-300 ease-out",v?"w-[72px]":"w-64",f?"translate-x-0":"-translate-x-full lg:translate-x-0"),children:o.jsxs("div",{className:"glass h-full rounded-2xl flex flex-col overflow-hidden",children:[o.jsxs("div",{className:de("flex items-center flex-shrink-0 transition-all h-14",v?"justify-center px-2":"justify-between px-3"),children:[o.jsx(Ft,{to:"/",className:"flex items-center group/logo","aria-label":"profClaw Home",children:v?o.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-xl glass-heavy shadow-lg shadow-primary/5 transition-transform group-hover/logo:scale-105",children:o.jsx(Ba,{className:"h-7 w-7 text-primary","aria-hidden":"true"})}):o.jsx("img",{src:u==="light"?"/brand/profclaw-wordmark-light.svg":"/brand/profclaw-wordmark-dark.svg",alt:"profClaw",className:"h-10 transition-transform group-hover/logo:scale-[1.02]"})}),!v&&o.jsx(dt,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg text-[var(--muted-foreground)] hover:text-[var(--foreground)]",onClick:()=>{window.innerWidth<1024?m(!1):p(!0)},"aria-label":window.innerWidth<1024?"Close sidebar":"Collapse sidebar",children:window.innerWidth<1024?o.jsx(cu,{className:"h-4 w-4"}):o.jsx(TE,{className:"h-4 w-4"})})]}),o.jsx("div",{className:de("px-2 pb-2",v&&"px-1.5"),children:o.jsxs("button",{onClick:Yh,"aria-label":"Search",className:de("flex items-center w-full rounded-lg text-[var(--muted-foreground)] bg-[var(--muted)]/40 hover:bg-[var(--muted)]/60 border border-transparent hover:border-[var(--border)]/50 transition-all",v?"justify-center h-9 w-9 mx-auto":"gap-2 px-2.5 py-2"),children:[o.jsx(iu,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),!v&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"flex-1 text-left text-[12px]",children:"Search..."}),o.jsxs("kbd",{className:"hidden sm:flex items-center gap-0.5 text-[10px] opacity-50 font-mono","aria-hidden":"true",children:[o.jsx(Q8,{className:"h-2.5 w-2.5"}),"K"]})]})]})}),o.jsxs("nav",{className:de("flex flex-col flex-1 overflow-y-auto py-1",v?"px-1.5":"px-2"),"data-tour":"sidebar-nav",children:[Fb.map((E,z)=>o.jsxs("div",{className:de(z>0&&"mt-1"),children:[o.jsx(my,{label:E.label,collapsed:v,isOpen:A[E.id]??!0,onToggle:()=>M(E.id),itemCount:E.items.length}),(A[E.id]??!0)&&o.jsx("div",{className:"space-y-0.5",children:E.items.map(J=>{const oe=J.href==="/"?a.pathname==="/":a.pathname===J.href||a.pathname.startsWith(J.href+"/");let ae;return J.hasBadge==="pending"&&(ae=_?.pending),J.hasBadge==="dlq"&&(ae=U?.total),o.jsx(py,{item:J,isActive:oe,collapsed:v,onClick:()=>m(!1),badge:ae},J.href)})})]},E.id)),i?.role==="admin"&&o.jsxs("div",{className:"mt-1",children:[o.jsx(my,{label:Mi.label,collapsed:v,isOpen:A[Mi.id]??!0,onToggle:()=>M(Mi.id),itemCount:Mi.items.length}),(A[Mi.id]??!0)&&o.jsx("div",{className:"space-y-0.5",children:Mi.items.map(E=>o.jsx(py,{item:E,isActive:a.pathname===E.href,collapsed:v,onClick:()=>m(!1)},E.href))})]})]}),o.jsx("div",{className:de("flex-shrink-0 border-t border-[var(--border)]/30",v?"p-1.5":"p-2"),children:v?o.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[o.jsxs("button",{onClick:()=>s("/settings/profile"),className:"relative group","aria-label":`View ${i?.name||"User"} profile settings`,children:[i?.avatarUrl?o.jsx("img",{src:i.avatarUrl,alt:i.name||"User avatar",className:"h-8 w-8 rounded-lg ring-1 ring-[var(--border)]/50"}):o.jsx("div",{className:"h-8 w-8 rounded-lg bg-gradient-to-br from-[var(--primary)] to-indigo-500 flex items-center justify-center text-xs font-semibold text-white",children:i?.name?.charAt(0).toUpperCase()||"U"}),o.jsx("div",{className:"pointer-events-none absolute left-full ml-2 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 px-2 py-1 rounded-lg bg-[var(--popover)] text-[11px] font-medium text-[var(--foreground)] border border-[var(--border)] whitespace-nowrap shadow-lg z-[100] transition-all",children:i?.name||"Profile"})]}),o.jsx(dt,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg text-[var(--muted-foreground)]",onClick:()=>p(!1),title:"Expand sidebar",children:o.jsx(kE,{className:"h-4 w-4"})})]}):o.jsxs(_u,{children:[o.jsx(Du,{asChild:!0,children:o.jsxs("button",{className:"flex items-center gap-2.5 w-full px-2 py-2 rounded-lg hover:bg-[var(--muted)]/50 transition-colors","aria-label":`Open user menu for ${i?.name||"User"}`,children:[i?.avatarUrl?o.jsx("img",{src:i.avatarUrl,alt:i.name||"User avatar",className:"h-8 w-8 rounded-lg ring-1 ring-[var(--border)]/50"}):o.jsx("div",{className:"h-8 w-8 rounded-lg bg-gradient-to-br from-[var(--primary)] to-indigo-500 flex items-center justify-center text-xs font-semibold text-white",children:i?.name?.charAt(0).toUpperCase()||"U"}),o.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[o.jsx("p",{className:"text-[13px] font-medium truncate",children:i?.name||"User"}),o.jsx("p",{className:"text-[10px] text-[var(--muted-foreground)] truncate",children:i?.email||"user@example.com"})]}),o.jsx(Ax,{className:"h-4 w-4 text-[var(--muted-foreground)] shrink-0","aria-hidden":"true"})]})}),o.jsxs(Lu,{align:"end",side:"top",className:"w-56",children:[o.jsxs(un,{onClick:()=>s("/settings/profile"),children:[o.jsx(qs,{className:"h-4 w-4 mr-2"}),"Settings"]}),o.jsxs(un,{onClick:()=>s("/costs"),children:[o.jsx(kx,{className:"h-4 w-4 mr-2"}),"Billing & Costs"]}),o.jsx(Oa,{}),o.jsxs("div",{className:"px-2 py-1.5 flex items-center justify-between",children:[o.jsx("span",{className:"text-[12px] text-[var(--muted-foreground)]",children:"Theme"}),o.jsx(sy,{})]}),o.jsx(Oa,{}),o.jsxs(un,{onClick:c,className:"text-[var(--destructive)]",children:[o.jsx(Dx,{className:"h-4 w-4 mr-2"}),"Log out"]})]})]})})]})}),o.jsxs("div",{className:de("global-content flex flex-1 flex-col transition-all duration-300",v?"lg:pl-[88px]":"lg:pl-[272px]"),children:[o.jsx("header",{className:de("global-header sticky top-0 z-40 mx-3 mt-3 mb-0 transition-all duration-300",x&&"mt-0"),children:o.jsxs("div",{className:de("flex h-14 items-center justify-between px-4 transition-all duration-300",x?"glass-heavy rounded-none rounded-b-2xl shadow-xl shadow-black/5":"glass rounded-2xl"),children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(dt,{variant:"ghost",size:"icon",className:"lg:hidden rounded-full",onClick:()=>m(!0),"aria-label":"Open sidebar",children:o.jsx(EE,{className:"h-5 w-5"})}),o.jsxs("div",{className:"hidden md:flex items-center gap-0.5 px-1 py-1 rounded-lg bg-black/5 dark:bg-white/5",children:[o.jsx("button",{onClick:()=>P&&s(-1),disabled:!P,className:de("p-1.5 px-2 rounded-md transition-colors",P?"hover:bg-white/10 text-[var(--muted-foreground)] hover:text-[var(--foreground)]":"text-[var(--muted-foreground)]/30 cursor-not-allowed"),title:"Go back","aria-label":"Go back",children:o.jsx(Rx,{className:"h-3.5 w-3.5"})}),o.jsx("div",{className:"w-[1px] h-3 bg-[var(--border)]"}),o.jsx("button",{onClick:()=>w&&s(1),disabled:!w,className:de("p-1.5 px-2 rounded-md transition-colors",w?"hover:bg-white/10 text-[var(--muted-foreground)] hover:text-[var(--foreground)]":"text-[var(--muted-foreground)]/30 cursor-not-allowed"),title:"Go forward","aria-label":"Go forward",children:o.jsx(su,{className:"h-3.5 w-3.5"})})]}),o.jsxs("div",{className:"flex flex-col text-left",children:[H.parent?o.jsx(o.Fragment,{children:o.jsxs("div",{className:"flex items-center gap-1.5 text-[11px]",children:[o.jsx(Ft,{to:H.parentHref,className:"text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:H.parent}),o.jsx(su,{className:"h-3 w-3 text-[var(--muted-foreground)]/50"}),o.jsx("span",{className:"font-semibold",children:H.name})]})}):o.jsx("h1",{className:"text-[13px] font-semibold tracking-tight leading-tight",children:H.name}),o.jsxs("div",{className:"hidden sm:flex items-center gap-2 mt-0.5",children:[o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-primary shadow-[0_0_10px_var(--primary-glow)] animate-pulse"}),o.jsx("span",{className:"text-[9px] text-muted-foreground font-black uppercase tracking-widest opacity-80",children:"Orchestrator Active"})]})]})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"hidden md:flex items-center gap-0.5 px-1 py-1 rounded-lg bg-black/5 dark:bg-white/5 mr-2",children:GR.map(E=>{const z=a.pathname===E.href||E.href!=="/"&&a.pathname.startsWith(E.href);return o.jsxs(Ft,{to:E.href,title:E.name,className:de("p-2 rounded-xl transition-all relative group",z?"bg-primary text-primary-foreground shadow-[0_0_20px_-5px_var(--primary-glow)] scale-110":"text-muted-foreground hover:bg-primary/15 hover:text-primary hover:scale-105"),children:[o.jsx(E.icon,{className:de("h-4.5 w-4.5 transition-transform group-active:scale-90",z&&"stroke-[2.5px]")}),o.jsx("div",{className:"absolute top-full mt-3 left-1/2 -translate-x-1/2 hidden group-hover:flex items-center px-2.5 py-1.5 rounded-xl glass-heavy text-[9px] font-black uppercase tracking-widest text-foreground shadow-2xl z-50",children:E.name})]},E.href)})}),o.jsx("div",{className:"hidden sm:block h-8 w-[1px] bg-[var(--border)] mx-1"}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs("button",{className:"p-2 hover:bg-white/5 rounded-full transition-colors group relative",onClick:Yh,"data-tour":"command-palette","aria-label":"Search",children:[o.jsx(iu,{className:"h-4 w-4 text-[var(--muted-foreground)]","aria-hidden":"true"}),o.jsxs("div",{className:"absolute top-full mt-2 right-0 hidden group-hover:flex items-center gap-1.5 px-2 py-1 rounded-lg bg-black/90 text-[9px] font-bold text-white border border-white/10 whitespace-nowrap shadow-xl z-50",children:[o.jsx("span",{className:"opacity-50",children:"⌘"}),o.jsx("span",{children:"K"})]})]}),o.jsx(BR,{}),o.jsx("div",{"data-tour":"theme-toggle",children:o.jsx(sy,{})}),o.jsx(EA,{})]})]})]})}),o.jsx("main",{id:"main-content",className:"flex-1 p-4 sm:p-6 outline-none",tabIndex:-1,children:e}),o.jsx(y.Suspense,{fallback:null,children:o.jsx($R,{})})]})]})}function FR(){return o.jsxs("div",{className:"animate-pulse space-y-6 p-2",children:[o.jsx("div",{className:"h-8 w-48 rounded-lg bg-muted/60"}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"h-4 w-full rounded bg-muted/40"}),o.jsx("div",{className:"h-4 w-3/4 rounded bg-muted/40"}),o.jsx("div",{className:"h-4 w-1/2 rounded bg-muted/40"})]}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:6},(e,a)=>o.jsx("div",{className:"h-32 rounded-xl bg-muted/30"},a))})]})}const vy=[{id:"welcome",title:"Welcome"},{id:"github",title:"GitHub OAuth"},{id:"admin",title:"Admin Account"},{id:"complete",title:"Complete"}],ks=[{label:"At least 8 characters",test:e=>e.length>=8},{label:"Contains a number",test:e=>/\d/.test(e)},{label:"Contains a letter",test:e=>/[a-zA-Z]/.test(e)}];function VR(){const e=oa(),[a,s]=y.useState(0),[i,c]=y.useState(!1),[u,f]=y.useState(!1),[m,v]=y.useState(null),[p,x]=y.useState(""),[g,w]=y.useState(""),[S,N]=y.useState(""),[j,A]=y.useState(""),[R,M]=y.useState(""),[_,U]=y.useState([]),[H,P]=y.useState(!1),{data:E,refetch:z}=pr({queryKey:["setup","status"],queryFn:async()=>{const F=await fetch("/api/setup/status");if(!F.ok)throw new Error("Failed to check setup status");return F.json()}}),[J,oe]=y.useState(null),[ae,fe]=y.useState(null),ge=hr({mutationFn:async F=>{oe(null),fe(null);const T=await(await fetch("/api/setup/github-oauth/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)})).json();if(!T.valid)throw oe(T.error||"Invalid credentials"),fe(T.hint||null),new Error(T.error||"Invalid credentials");T.warning&&Dt.warning(T.warning);const O=await fetch("/api/setup/github-oauth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),q=await O.json();if(!O.ok){if(O.status===403&&q.error?.includes("already configured"))return{alreadyConfigured:!0};throw new Error(q.error||"Failed to save GitHub OAuth config")}return q},onSuccess:F=>{oe(null),fe(null),F?.alreadyConfigured?Dt.info("GitHub OAuth is already configured"):Dt.success("GitHub OAuth configured successfully!"),z(),s(2)},onError:F=>{J||Dt.error(F instanceof Error?F.message:"Failed to configure")}}),pe=hr({mutationFn:async F=>{const ce=await fetch("/api/setup/admin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)});if(!ce.ok){const T=await ce.json();throw new Error(T.error||"Failed to create admin")}return ce.json()},onSuccess:F=>{Dt.success("Admin account created!"),F.recoveryCodes&&U(F.recoveryCodes),F.session?.token&&localStorage.setItem("profclaw_session",F.session.token),z(),s(3)},onError:F=>{Dt.error(F instanceof Error?F.message:"Failed to create admin")}}),ve=typeof window<"u"?`${window.location.origin}/api/auth/github/callback`:"http://localhost:3000/api/auth/github/callback",L=async(F,ce)=>{await navigator.clipboard.writeText(F),v(ce),setTimeout(()=>v(null),2e3),Dt.success("Copied to clipboard")},W=E?.configured||E?.providers?.github;y.useEffect(()=>{if(!E)return;if(_.length>0&&!H){a!==3&&s(3);return}if(E.ready&&(H||_.length===0)){e("/");return}let F=0;a===0&&(F=1),(E.configured||E.providers?.github)&&(F=2),(E.configured||E.providers?.github)&&E.hasAdmin&&(F=3),F>a&&s(F)},[E,e,a,_,H]);const G=()=>{switch(a){case 0:return o.jsxs("div",{className:"space-y-6 text-center py-8",children:[o.jsx("div",{className:"mx-auto w-24 h-24 rounded-[2rem] glass-heavy shadow-2xl flex items-center justify-center transition-transform hover:scale-110",children:o.jsx(Zr,{className:"h-12 w-12 text-[var(--primary)]"})}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Welcome to profClaw"}),o.jsx("p",{className:"text-[var(--muted-foreground)] max-w-sm mx-auto",children:"Let's get you set up in just a few minutes. We'll configure authentication so you can start managing tasks with AI."})]}),o.jsxs("div",{className:"flex items-center justify-center gap-6 pt-2",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--muted-foreground)]",children:[o.jsx(lu,{className:"h-4 w-4 text-green-500"}),o.jsx("span",{children:"Secure setup"})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-[var(--muted-foreground)]",children:[o.jsx(qs,{className:"h-4 w-4 text-[var(--primary)]"}),o.jsx("span",{children:"2-3 minutes"})]})]}),o.jsxs(dt,{onClick:()=>s(1),className:"mt-4 h-11 px-8 gap-2",children:["Get Started ",o.jsx(ga,{className:"h-4 w-4"})]})]});case 1:return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-[var(--primary)]/10 flex items-center justify-center",children:o.jsx(eo,{className:"h-6 w-6 text-[var(--primary)]"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Configure GitHub OAuth"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Create a GitHub OAuth App to enable sign-in"})]})]}),W&&o.jsxs("div",{className:"flex items-center justify-between gap-4 glass-heavy bg-green-500/5 rounded-[2rem] p-6 shadow-2xl shadow-green-500/5 transition-all hover:shadow-green-500/10",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-2xl bg-green-500/20 flex items-center justify-center shadow-inner",children:o.jsx(Lh,{className:"h-6 w-6 text-green-500 shrink-0"})}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-green-600 dark:text-green-400",children:"GitHub Configured"}),o.jsx("p",{className:"text-[var(--muted-foreground)] font-medium",children:"You're all set! Skip to admin creation."})]})]}),o.jsxs(dt,{onClick:()=>s(2),variant:"black",size:"sm",className:"shrink-0 gap-1.5",children:["Skip ",o.jsx(ga,{className:"h-3.5 w-3.5"})]})]}),o.jsxs("div",{className:"space-y-6 glass-heavy rounded-[2rem] p-6 shadow-xl",children:[o.jsxs("h3",{className:"font-black uppercase tracking-widest text-[10px] flex items-center gap-4 px-1 text-[var(--muted-foreground)]",children:[o.jsx("span",{className:"h-7 w-7 rounded-full field-recessed flex items-center justify-center text-[var(--primary)] text-xs font-black shadow-sm",children:"1"}),"Step One: Create GitHub OAuth App"]}),o.jsxs("div",{className:"space-y-4 ml-9 text-sm",children:[o.jsxs("p",{className:"text-[var(--muted-foreground)] leading-relaxed",children:["Go to"," ",o.jsxs("a",{href:"https://github.com/settings/developers",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--primary)] hover:underline inline-flex items-center gap-1 font-bold",children:["GitHub Developer Settings",o.jsx(Ox,{className:"h-3 w-3"})]})," ","and click ",o.jsx("strong",{className:"text-[var(--foreground)]",children:'"New OAuth App"'})]}),o.jsxs("div",{className:"space-y-1 field-recessed p-1 shadow-inner overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Application name"}),o.jsx("code",{className:"text-xs font-bold text-[var(--foreground)] px-2 opacity-80",children:"profClaw Task Manager"})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Homepage URL"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("code",{className:"text-[11px] font-bold opacity-70",children:window.location.origin}),o.jsx("button",{onClick:()=>L(window.location.origin,"homepage"),className:"p-2 glass hover:bg-primary/20 rounded-xl transition-all active:scale-90",children:m==="homepage"?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-50"})})]})]}),o.jsxs("div",{className:"flex items-center justify-between p-3 hover:bg-white/5 dark:hover:bg-black/20 rounded-xl transition-colors",children:[o.jsx("span",{className:"text-[var(--muted-foreground)] font-black uppercase tracking-widest text-[9px]",children:"Callback URL"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("code",{className:"text-[11px] font-bold opacity-70 max-w-[200px] truncate",children:ve}),o.jsx("button",{onClick:()=>L(ve,"callback"),className:"p-2 glass hover:bg-primary/20 rounded-xl transition-all active:scale-90",children:m==="callback"?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-50"})})]})]})]}),o.jsxs("p",{className:"text-[var(--muted-foreground)]",children:["Click ",o.jsx("strong",{children:'"Register application"'})," then copy the Client ID and generate a Client Secret."]})]})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("h3",{className:"font-black uppercase tracking-widest text-[10px] flex items-center gap-4 px-1 text-[var(--muted-foreground)]",children:[o.jsx("span",{className:"h-7 w-7 rounded-full glass-heavy shadow-inner flex items-center justify-center text-[var(--primary)] text-xs font-black",children:"2"}),"Step Two: Enter your credentials"]}),o.jsxs("div",{className:"space-y-4 ml-9",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"clientId",className:"premium-label",children:"Client ID"}),o.jsx(aa,{id:"clientId",placeholder:"20 character hex string",value:p,onChange:F=>{x(F.target.value),oe(null)},className:de(J&&"shadow-xl shadow-red-500/20")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"clientSecret",className:"premium-label",children:"Client Secret"}),o.jsxs("div",{className:"relative",children:[o.jsx(aa,{id:"clientSecret",type:i?"text":"password",placeholder:"40 character hex string",value:g,onChange:F=>{w(F.target.value),oe(null)},className:de(J&&"shadow-xl shadow-red-500/20")}),o.jsx("button",{type:"button",onClick:()=>c(!i),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--primary)] transition-colors p-1",children:i?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]}),J&&o.jsxs("div",{className:"flex items-start gap-4 glass-heavy bg-destructive/5 rounded-2xl p-5 shadow-inner",children:[o.jsx(to,{className:"h-6 w-6 text-red-500 shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-red-600 dark:text-red-400",children:"Configuration Error"}),o.jsx("p",{className:"font-bold text-red-500/80 mt-1",children:J}),ae&&o.jsx("p",{className:"text-[var(--muted-foreground)] mt-2 font-medium opacity-70",children:ae})]})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-8 mt-4 border-t border-white/5 dark:border-white/5",children:[o.jsxs(dt,{variant:"ghost",onClick:()=>s(0),className:"gap-2",children:[o.jsx(_1,{className:"h-4 w-4"})," Back"]}),o.jsx(dt,{variant:"black",onClick:()=>ge.mutate({clientId:p,clientSecret:g}),disabled:!p||!g||ge.isPending,className:"gap-2",children:ge.isPending?o.jsx(Pa,{className:"h-4 w-4 animate-spin"}):o.jsxs(o.Fragment,{children:["Save & Continue ",o.jsx(ga,{className:"h-4 w-4"})]})})]})]});case 2:return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-[var(--primary)]/10 flex items-center justify-center",children:o.jsx(lu,{className:"h-6 w-6 text-[var(--primary)]"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Create Admin Account"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Set up your administrator account"})]})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminName",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Full Name"}),o.jsx(aa,{id:"adminName",placeholder:"John Doe",value:R,onChange:F=>M(F.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminEmail",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Email"}),o.jsx(aa,{id:"adminEmail",type:"email",placeholder:"admin@profclaw.ai",value:S,onChange:F=>N(F.target.value)})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(ya,{htmlFor:"adminPassword",className:"text-[10px] font-black uppercase tracking-widest text-[var(--muted-foreground)] px-1",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx(aa,{id:"adminPassword",type:u?"text":"password",placeholder:"••••••••",value:j,onChange:F=>A(F.target.value)}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-4 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--primary)] transition-colors",children:u?o.jsx(Jr,{className:"h-5 w-5"}):o.jsx(Wr,{className:"h-5 w-5"})})]}),j.length>0&&o.jsxs("div",{className:"space-y-2 mt-3",children:[o.jsx("div",{className:"h-1.5 bg-[var(--muted)] rounded-full overflow-hidden",children:o.jsx("div",{className:de("h-full transition-all duration-300 rounded-full",ks.filter(F=>F.test(j)).length<2&&"bg-red-500",ks.filter(F=>F.test(j)).length===2&&"bg-yellow-500",ks.filter(F=>F.test(j)).length===3&&"bg-green-500"),style:{width:`${ks.filter(F=>F.test(j)).length/ks.length*100}%`}})}),o.jsx("div",{className:"grid grid-cols-1 gap-1",children:ks.map((F,ce)=>{const T=F.test(j);return o.jsxs("div",{className:de("flex items-center gap-2 text-xs transition-all",T?"text-green-600":"text-[var(--muted-foreground)]"),children:[o.jsx("div",{className:de("h-4 w-4 rounded-full flex items-center justify-center transition-all",T?"bg-green-500/20":"bg-[var(--muted)]"),children:o.jsx(Bt,{className:de("h-2.5 w-2.5",T?"opacity-100":"opacity-0")})}),F.label]},ce)})})]})]})]}),o.jsxs("div",{className:"flex items-center justify-between pt-8 mt-4 border-t border-white/5 dark:border-white/5",children:[o.jsxs(dt,{variant:"ghost",onClick:()=>s(1),className:"gap-2",children:[o.jsx(_1,{className:"h-4 w-4"})," Back"]}),o.jsx(dt,{variant:"black",onClick:()=>pe.mutate({email:S,password:j,name:R}),disabled:!S||!j||!R||!ks.every(F=>F.test(j))||pe.isPending,className:"gap-2",children:pe.isPending?o.jsx(Pa,{className:"h-4 w-4 animate-spin"}):o.jsxs(o.Fragment,{children:["Create Account ",o.jsx(ga,{className:"h-4 w-4"})]})})]})]});case 3:return o.jsx("div",{className:"space-y-6 py-4",children:_.length>0&&!H?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-12 w-12 rounded-xl bg-amber-500/10 flex items-center justify-center",children:o.jsx(pE,{className:"h-6 w-6 text-amber-500"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold tracking-tight",children:"Save Your Recovery Codes"}),o.jsx("p",{className:"text-sm text-[var(--muted-foreground)]",children:"Store these codes in a safe place"})]})]}),o.jsxs("div",{className:"flex items-start gap-4 glass-heavy bg-amber-500/5 rounded-[2rem] p-6 shadow-xl",children:[o.jsx(to,{className:"h-7 w-7 text-amber-500 shrink-0 mt-0.5"}),o.jsxs("div",{className:"text-sm",children:[o.jsx("p",{className:"font-black uppercase tracking-widest text-[11px] text-amber-600 dark:text-amber-400",children:"Single Opportunity - Read Carefuly"}),o.jsx("p",{className:"font-bold text-amber-500/80 mt-1",children:"These codes will only be shown once!"}),o.jsx("p",{className:"text-[var(--muted-foreground)] mt-3 font-medium opacity-70 leading-relaxed text-xs",children:"If you lose your password, you'll need these codes to recover your account. Save them in a secure password manager or write them down."})]})]}),o.jsx("div",{className:"glass-heavy rounded-[2rem] p-6 shadow-inner",children:o.jsx("div",{className:"grid grid-cols-2 gap-3",children:_.map((F,ce)=>o.jsxs("div",{className:"flex items-center justify-between glass-heavy rounded-xl px-4 py-3 shadow-sm hover:shadow-md transition-all group",children:[o.jsx("span",{className:"font-black text-[13px] tracking-widest opacity-80",children:F}),o.jsx("button",{onClick:()=>L(F,`code-${ce}`),className:"p-1.5 glass hover:bg-primary/20 rounded-lg transition-all active:scale-90",children:m===`code-${ce}`?o.jsx(Bt,{className:"h-3.5 w-3.5 text-green-500"}):o.jsx(Li,{className:"h-3.5 w-3.5 opacity-30 group-hover:opacity-100 transition-opacity"})})]},ce))})}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[o.jsxs(dt,{variant:"outline",className:"flex-1 gap-2",onClick:()=>L(_.join(`
|
|
60
60
|
`),"all-codes"),children:[m==="all-codes"?o.jsx(Bt,{className:"h-4 w-4 text-green-500"}):o.jsx(Li,{className:"h-4 w-4"}),"Copy All Codes"]}),o.jsxs(dt,{variant:"outline",className:"flex-1 gap-2",onClick:()=>{const F=new Blob([`profClaw Recovery Codes
|
|
61
61
|
`,`=====================
|
|
62
62
|
`,`Account: ${S}
|
|
@@ -64,4 +64,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${a.do
|
|
|
64
64
|
`,_.join(`
|
|
65
65
|
`),`
|
|
66
66
|
|
|
67
|
-
Generated: ${new Date().toISOString()}`],{type:"text/plain"}),ce=URL.createObjectURL(F),T=document.createElement("a");T.href=ce,T.download="profclaw-recovery-codes.txt",T.click(),URL.revokeObjectURL(ce),Dt.success("Recovery codes downloaded")},children:[o.jsx(aE,{className:"h-4 w-4"}),"Download"]})]}),o.jsxs(dt,{variant:"black",onClick:()=>P(!0),className:"w-full gap-2 mt-2",children:["I've Saved My Recovery Codes ",o.jsx(ga,{className:"h-4 w-4"})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"mx-auto w-20 h-20 rounded-2xl bg-green-500/10 flex items-center justify-center",children:o.jsx(Lh,{className:"h-10 w-10 text-green-500"})}),o.jsxs("div",{className:"space-y-2 mt-6",children:[o.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Setup Complete!"}),o.jsx("p",{className:"text-[var(--muted-foreground)] max-w-sm mx-auto",children:"profClaw is ready to use. You can now sign in and start managing your tasks."})]})]}),o.jsxs("div",{className:"space-y-4 glass-heavy rounded-[2rem] p-8 text-left shadow-inner",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"GitHub OAuth Active"})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"Admin Identity Secure"})]}),_.length>0&&o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"Recovery Vault Sealed"})]})]}),o.jsxs(dt,{variant:"black",onClick:()=>e("/"),className:"w-full gap-2",children:["Go to Dashboard ",o.jsx(ga,{className:"h-4 w-4"})]})]})});default:return null}};return o.jsxs("div",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-4",children:[o.jsx("div",{className:"fixed inset-0 bg-gradient-to-br from-[var(--primary)]/5 via-transparent to-pink-500/5 pointer-events-none"}),o.jsxs("div",{className:"w-full max-w-xl relative z-10",children:[o.jsx("div",{className:"flex justify-center mb-10",children:o.jsx("div",{className:"p-6 rounded-[2.5rem] glass-heavy shadow-2xl transition-transform hover:scale-110",children:o.jsx(Ba,{className:"h-14 w-14 text-[var(--primary)]"})})}),o.jsx("div",{className:"flex items-center justify-center gap-1 mb-6",children:vy.map((F,ce)=>o.jsxs("div",{className:"flex items-center",children:[o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("div",{className:de("flex items-center justify-center w-12 h-12 rounded-[1.25rem] transition-all duration-500 border-none shadow-xl",ce<a?"bg-primary text-white shadow-primary/30 scale-90 opacity-50":ce===a?"glass-heavy text-primary scale-110 ring-4 ring-primary/10 shadow-primary/20":"glass opacity-30 text-[var(--muted-foreground)]"),children:ce<a?o.jsx(Bt,{className:"h-6 w-6"}):o.jsx("span",{className:"text-sm font-black",children:ce+1})}),o.jsx("span",{className:de("text-[9px] mt-3 font-black uppercase tracking-[0.15em] transition-all duration-500",ce===a?"text-[var(--primary)] scale-105":"text-[var(--muted-foreground)] opacity-40"),children:F.title})]}),ce<vy.length-1&&o.jsx("div",{className:de("w-12 h-0.5 mx-2 mb-7 rounded-full transition-all duration-700",ce<a?"bg-primary":"bg-[var(--border)]/10")})]},F.id))}),o.jsxs("div",{className:"glass-heavy rounded-[3rem] p-10 shadow-float overflow-hidden relative",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-transparent pointer-events-none"}),o.jsx("div",{className:"relative z-10",children:G()})]}),o.jsxs("p",{className:"text-center text-xs text-[var(--muted-foreground)] mt-6",children:["Already have an account?"," ",o.jsx("button",{onClick:()=>e("/login"),className:"text-[var(--primary)] hover:underline font-medium",children:"Sign in"})]})]})]})}function IR(){return o.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none -z-10",children:[o.jsx("div",{className:"absolute inset-0 bg-[var(--background)]"}),o.jsx("div",{className:"absolute inset-0",style:{background:["radial-gradient(ellipse 90% 70% at 20% 20%, oklch(from #e11d48 l c h / 0.07) 0%, transparent 60%)","radial-gradient(ellipse 80% 60% at 80% 30%, oklch(from #ea580c l c h / 0.05) 0%, transparent 55%)","radial-gradient(ellipse 70% 50% at 50% 80%, oklch(from #fb923c l c h / 0.04) 0%, transparent 50%)","radial-gradient(ellipse 120% 40% at 50% 100%, oklch(from #e11d48 l c h / 0.06) 0%, transparent 40%)"].join(", ")}}),o.jsx("div",{className:"absolute w-[600px] h-[600px] rounded-full opacity-[0.04]",style:{top:"10%",right:"-5%",background:"radial-gradient(circle, #f43f5e 0%, transparent 70%)",animation:"liquid-mesh-drift 30s infinite linear"}}),o.jsxs("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[280px] opacity-[0.08]",style:{animation:"wave-drift-1 25s linear infinite"},viewBox:"0 0 2400 280",preserveAspectRatio:"none",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"wave1-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:"#e11d48"}),o.jsx("stop",{offset:"50%",stopColor:"#f43f5e"}),o.jsx("stop",{offset:"100%",stopColor:"#e11d48"})]})}),o.jsx("path",{d:"M0,160 C200,80 400,220 600,140 C800,60 1000,200 1200,160 C1400,120 1600,220 1800,100 C2000,20 2200,200 2400,160 L2400,280 L0,280 Z",fill:"url(#wave1-grad)"})]}),o.jsxs("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[200px] opacity-[0.06]",style:{animation:"wave-drift-2 18s linear infinite"},viewBox:"0 0 2400 200",preserveAspectRatio:"none",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"wave2-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:"#ea580c"}),o.jsx("stop",{offset:"50%",stopColor:"#fb923c"}),o.jsx("stop",{offset:"100%",stopColor:"#ea580c"})]})}),o.jsx("path",{d:"M0,110 C150,160 350,50 600,120 C850,180 1050,70 1200,110 C1350,150 1550,50 1800,100 C2050,150 2250,60 2400,110 L2400,200 L0,200 Z",fill:"url(#wave2-grad)"})]}),o.jsx("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[130px] opacity-[0.04]",style:{animation:"wave-drift-3 12s linear infinite"},viewBox:"0 0 2400 130",preserveAspectRatio:"none",children:o.jsx("path",{d:"M0,70 C300,100 500,30 800,80 C1100,120 1300,40 1600,70 C1900,90 2100,30 2400,70 L2400,130 L0,130 Z",fill:"#fb923c"})})]})}function YR({className:e}){return o.jsx("svg",{viewBox:"0 0 46 32",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Anthropic",children:o.jsx("path",{d:"M32.73 0h-6.945L38.45 32h6.945L32.73 0ZM13.27 0 0 32h7.082l2.79-7.103h13.25l2.79 7.103h7.082L19.727 0h-6.458Zm-.636 18.747 4.323-11.138 4.323 11.138h-8.646Z"})})}function KR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"OpenAI",children:o.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"})})}function QR({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Google",children:[o.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),o.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),o.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),o.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function XR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"OpenRouter",children:o.jsx("path",{d:"M16.778 1.844v1.919q-.569-.026-1.138-.032-.708-.008-1.415.037c-1.93.126-4.023.728-6.149 2.237-2.911 2.066-2.731 1.95-4.14 2.75-.396.223-1.342.574-2.185.798-.841.225-1.753.333-1.751.333v4.229s.768.108 1.61.333c.842.224 1.789.575 2.185.799 1.41.798 1.228.683 4.14 2.75 2.126 1.509 4.22 2.11 6.148 2.236.88.058 1.716.041 2.555.005v1.918l7.222-4.168-7.222-4.17v2.176c-.86.038-1.611.065-2.278.021-1.364-.09-2.417-.357-3.979-1.465-2.244-1.593-2.866-2.027-3.68-2.508.889-.518 1.449-.906 3.822-2.59 1.56-1.109 2.614-1.377 3.978-1.466.667-.044 1.418-.017 2.278.02v2.176L24 6.014Z"})})}function ZR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Ollama",children:o.jsx("path",{d:"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z"})})}function JR({className:e}){return o.jsx("svg",{viewBox:"0 0 16 16",className:de("h-6 w-6",e),"aria-label":"Azure",children:o.jsx("path",{fill:"#00ABEC",d:"M3.65 14.2H16L9.35 2.68 7.33 8.24l3.88 4.63-7.56 1.33zM8.82 1.8L4.07 5.79 0 12.84h3.67v.01L8.82 1.8z"})})}function WR({className:e}){return o.jsx("svg",{viewBox:"0 0 210 305",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Groq",children:o.jsx("path",{d:"M105.3 0C47.7-.5.5 45.8 0 103.4c-.5 57.6 45.8 104.8 103.4 105.3h36.2v-39.1h-34.3c-36 .4-65.6-28.4-66-64.5-.4-36.1 28.4-65.6 64.5-66h1.5c36 0 65.2 29.2 65.4 65.2v96.1c0 35.7-29.1 64.8-64.7 65.2-17.1-.1-33.4-7-45.4-19.1l-27.7 27.7c19.2 19.3 45.2 30.3 72.4 30.5h1.4c56.9-.8 102.6-47 102.9-103.9v-99.1C208.2 45.2 161.9.1 105.3 0Z"})})}function eT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"xAI",children:o.jsx("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})})}function tT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Perplexity",children:o.jsx("path",{d:"M22.3977 7.0896h-2.3106V.0676l-7.5094 6.3542V.1577h-1.1554v6.1966L4.4904 0v7.0896H1.6023v10.3976h2.8882V24l6.932-6.3591v6.2005h1.1554v-6.0469l6.9318 6.1807v-6.4879h2.8882V7.0896zm-3.4657-4.531v4.531h-5.355l5.355-4.531zm-13.2862.0676 4.8691 4.4634H5.6458V2.6262zM2.7576 16.332V8.245h7.8476l-6.1149 6.1147v1.9723H2.7576zm2.8882 5.0404v-3.8852h.0001v-2.6488l5.7763-5.7764v7.0111l-5.7764 5.2993zm12.7086.0248-5.7766-5.1509V9.0618l5.7766 5.7766v6.5588zm2.8882-5.0652h-1.733v-1.9723L13.3948 8.245h7.8478v8.087z"})})}function nT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Mistral",children:[o.jsx("rect",{x:"1",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"9.5",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"18",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"1",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"5.5",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"13",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"18",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"1",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"9.5",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"18",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"1",y:"16",width:"5",height:"5",fill:"currentColor"}),o.jsx("rect",{x:"18",y:"16",width:"5",height:"5",fill:"currentColor"})]})}function aT({className:e}){return o.jsxs("svg",{viewBox:"0 0 75 75",className:de("h-6 w-6",e),"aria-label":"Cohere",children:[o.jsx("path",{d:"M24.3 44.7c2 0 6-.1 11.6-2.4 6.5-2.7 19.3-7.5 28.6-12.5 6.5-3.5 9.3-8.1 9.3-14.3C73.8 7 66.9 0 58.3 0h-36C10 0 0 10 0 22.3s9.4 22.4 24.3 22.4z",fill:"#39594d",fillRule:"evenodd",clipRule:"evenodd"}),o.jsx("path",{d:"M30.4 60c0-6 3.6-11.5 9.2-13.8l11.3-4.7C62.4 36.8 75 45.2 75 57.6 75 67.2 67.2 75 57.6 75H45.3c-8.2 0-14.9-6.7-14.9-15z",fill:"#d18ee2",fillRule:"evenodd",clipRule:"evenodd"}),o.jsx("path",{d:"M12.9 47.6C5.8 47.6 0 53.4 0 60.5v1.7C0 69.2 5.8 75 12.9 75c7.1 0 12.9-5.8 12.9-12.9v-1.7c-.1-7-5.8-12.8-12.9-12.8z",fill:"#ff7759"})]})}function rT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"DeepSeek",children:o.jsx("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 0 1-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 0 0-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 0 1-.465.137 9.597 9.597 0 0 0-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 0 0 1.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 0 1 1.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 0 1 .415-.287.302.302 0 0 1 .2.288.306.306 0 0 1-.31.307.303.303 0 0 1-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 0 1-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 0 1 .016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 0 1-.254-.078.253.253 0 0 1-.114-.358c.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}function sT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Together AI",children:[o.jsx("path",{d:"M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z",opacity:".2"}),o.jsx("circle",{cx:"6.615",cy:"6.615",r:"4.615"})]})}function iT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:de("h-6 w-6",e),"aria-label":"Cerebras",children:[o.jsx("path",{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"}),o.jsx("path",{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"})]})}function lT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:de("h-6 w-6",e),"aria-label":"Fireworks",children:o.jsx("path",{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"})})}function oT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"GitHub Copilot",children:o.jsx("path",{d:"M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"})})}function dM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"AWS Bedrock",children:o.jsx("path",{d:"M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18l7.12 3.56L12 11.3 4.88 7.74 12 4.18zM4 8.96l7 3.5v7.58l-7-3.5V8.96zm9 11.08V12.46l7-3.5v7.58l-7 3.5z"})})}function fM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Zhipu AI",children:o.jsx("path",{d:"M4 4h16v3.2H9.6L20 17.6V20H4v-3.2h10.4L4 6.4V4z"})})}function hM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Moonshot AI",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.49 5-1.35-1.59-1.34-2.6-3.34-2.6-5.58 0-3.87 3.01-7.02 6.8-7.26A9.96 9.96 0 0 0 12 2z"})})}function mM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Qwen",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 17c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm2-4l3 3-1.41 1.41L12 15.83l-1.59 1.58L9 16l3-3z"})})}function pM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Replicate",children:o.jsx("path",{d:"M.672 0v24H4.77V8.295h13.236V4.2H4.77V0zm18.46 8.295v4.098H5.896v3.762h13.236v4.058H5.896V24h18.108V8.295z"})})}function vM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"GitHub Models",children:o.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}function gM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Volcengine",children:o.jsx("path",{d:"M12 2L3 7.5v9L12 22l9-5.5v-9L12 2zm0 2.5l6.5 4v7.5L12 19.5 5.5 16V8.5L12 4.5z"})})}function yM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Qianfan",children:o.jsx("path",{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})}function xM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Minimax",children:o.jsx("path",{d:"M2 4h4v16H2V4zm5 0h3l3 8 3-8h3v16h-4V11l-2 5h-2l-2-5v9H7V4z"})})}function bM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"HuggingFace",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-3l-2 1v-5l2 1V7.5l4 2v1l2-1v5l-2-1v3l-4-2z"})})}function wM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"NVIDIA NIM",children:o.jsx("path",{d:"M4 3h2.5l7 12V3H16v18h-2.5L6.5 9v12H4V3zm11 0h5v2h-3v5h3v2h-3v7h-2V3z"})})}function SM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Venice AI",children:o.jsx("path",{d:"M2 14c1.5 0 2.5-1 4-1s2.5 1 4 1 2.5-1 4-1 2.5 1 4 1v2c-1.5 0-2.5-1-4-1s-2.5 1-4 1-2.5-1-4-1-2.5 1-4 1v-2zm2-7l2 3h2L5 6l6 8h2L7 5h3l4 9h2l-5-11H4v1l.2-.7L4 7z"})})}function jM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Kilocode",children:o.jsx("path",{d:"M8 3L4 12l4 9H6L2 12l4-9h2zm8 0h2l4 9-4 9h-2l4-9-4-9zm-4 4l-2 5 2 5h-2l-2-5 2-5h2z"})})}function EM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Vercel AI",children:o.jsx("path",{d:"M24 22.525H0L12.508 1.375z"})})}function NM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Cloudflare AI",children:o.jsx("path",{fill:"#F38020",d:"M16.5 14.5c.2-.7.1-1.3-.2-1.8-.3-.4-.8-.7-1.4-.8l-7.3-.1c-.1 0-.1 0-.2-.1 0-.1 0-.1.1-.2.2-.4.7-.7 1.2-.7h.1c.4-1.8 1.9-3.1 3.8-3.1 1.5 0 2.8.8 3.5 2 .2 0 .4-.1.6-.1 1.4 0 2.5 1.1 2.5 2.5 0 .2 0 .3-.1.5h.2c1.1 0 2 .9 2 2s-.9 2-2 2H8c-1.4 0-2.5-1.1-2.5-2.5 0-1.3 1-2.4 2.3-2.5l8.7.9z"})})}function CM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"IBM Watsonx",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.93 0 3.68.79 4.95 2.05L5.05 16.95A6.973 6.973 0 0 1 5 15c0-3.87 3.13-7 7-7zm0 14c-1.93 0-3.68-.79-4.95-2.05l11.9-11.9C18.21 6.32 19 8.07 19 10c0 3.87-3.13 7-7 7z"})})}function AM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"BytePlus",children:o.jsx("path",{d:"M4 3h7.5c2.5 0 4 1.2 4 3.2 0 1.3-.7 2.3-1.8 2.8 1.4.4 2.3 1.6 2.3 3.1C16 14.5 14.3 16 11.5 16H4V3zm3 2.5v3h3.5c1 0 1.5-.6 1.5-1.5S11.5 5.5 10.5 5.5H7zm0 5.5v3.5h4c1.1 0 1.7-.7 1.7-1.75S12.1 11 11 11H7zm9 3l2 2-2 2h2l2-2-2-2h-2z"})})}function RM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Xiaomi",children:o.jsx("path",{d:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm2 4v8h2V8H6zm4 0v8h2v-5l3 5h2V8h-2v5l-3-5h-2z"})})}function TM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"ModelStudio",children:o.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})}function MM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Telegram",children:o.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})})}function kM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Discord",children:o.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function OM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"WhatsApp",children:o.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}function _M({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Slack",children:[o.jsx("path",{fill:"#E01E5A",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"}),o.jsx("path",{fill:"#36C5F0",d:"M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"}),o.jsx("path",{fill:"#2EB67D",d:"M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"}),o.jsx("path",{fill:"#ECB22E",d:"M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})]})}function DM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Matrix",children:o.jsx("path",{d:"M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.434-.24.927-.36 1.484-.36.544 0 1.032.104 1.468.313.436.209.765.61.989 1.204.308-.507.703-.895 1.185-1.164.483-.27 1.017-.404 1.598-.404.435 0 .842.06 1.218.18.375.121.693.31.952.57.259.259.46.588.601.987.142.399.214.87.214 1.413v6.163h-2.214v-5.269c0-.318-.012-.616-.036-.894-.023-.278-.09-.524-.197-.739a1.11 1.11 0 0 0-.432-.499c-.196-.125-.463-.187-.799-.187-.339 0-.616.073-.831.22-.216.148-.383.34-.497.581a2.37 2.37 0 0 0-.233.762c-.036.284-.054.571-.054.862v5.163h-2.212v-5.269c0-.291-.007-.574-.024-.851-.014-.277-.07-.524-.167-.743-.094-.219-.244-.394-.451-.527-.206-.134-.5-.201-.882-.201-.115 0-.259.03-.432.088-.174.058-.343.17-.508.337-.166.166-.31.406-.432.717-.122.312-.183.725-.183 1.24v5.009h-2.212V7.81zm17.042 14.94V.55h1.648V0H24v24h-2.635v-.55z"})})}function LM({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Google Chat",children:[o.jsx("path",{fill:"#00AC47",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10z",opacity:"0.2"}),o.jsx("path",{fill:"#00AC47",d:"M12.7 15.3H8.3c-.7 0-1.3-.6-1.3-1.3V9.6L3.1 6.4c-.2-.1-.1-.4.1-.4h13.5c.7 0 1.3.6 1.3 1.3V14c0 .7-.6 1.3-1.3 1.3z"}),o.jsx("path",{fill:"#00832D",d:"M12.7 15.3h4c.7 0 1.3-.6 1.3-1.3V7.3c0-.7-.6-1.3-1.3-1.3h-4v9.3z"}),o.jsx("path",{fill:"#2684FC",d:"M7 15.3V9.6l-3.9-3.2c-.2-.1-.1-.4.1-.4H7v9.3z"}),o.jsx("path",{fill:"#0066DA",d:"M12.7 6h-5.7v3.6l5.7 4.5V6z"})]})}function zM({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Microsoft Teams",children:[o.jsx("path",{d:"M20.625 8.5h-3.75c-.345 0-.625.28-.625.625v6.25c0 .69.56 1.25 1.25 1.25h5c.69 0 1.25-.56 1.25-1.25v-4.375c0-1.38-1.12-2.5-2.5-2.5z",fill:"#5059C9",opacity:"0.7"}),o.jsx("circle",{cx:"19.5",cy:"5.5",r:"2",fill:"#5059C9",opacity:"0.7"}),o.jsx("circle",{cx:"14",cy:"4.5",r:"2.5",fill:"#7B83EB"}),o.jsx("path",{d:"M17.5 8.5H9.125C8.504 8.5 8 9.004 8 9.625V17c0 2.21 1.79 4 4 4s4-1.79 4-4v-1h1.5c.828 0 1.5-.672 1.5-1.5v-4.5c0-.828-.672-1.5-1.5-1.5z",fill:"#7B83EB"}),o.jsx("path",{d:"M13.5 8.5H8v8.5c0 2.21 1.79 4 4 4 .53 0 1.036-.104 1.5-.293V9.625c0-.621-.504-1.125-1.125-1.125H13.5z",fill:"#4B53BC"})]})}const wh=8,Gl=[{id:"anthropic",name:"Anthropic",desc:"Claude",color:"#cc785c",Logo:YR,keyPlaceholder:"sk-ant-...",keyUrl:"https://console.anthropic.com/"},{id:"openai",name:"OpenAI",desc:"GPT & o-series",color:"#10a37f",Logo:KR,keyPlaceholder:"sk-...",keyUrl:"https://platform.openai.com/api-keys"},{id:"google",name:"Google",desc:"Gemini",color:"#4285F4",Logo:QR,keyPlaceholder:"AIza...",keyUrl:"https://aistudio.google.com/apikey"},{id:"groq",name:"Groq",desc:"Ultra-fast",color:"#f55036",Logo:WR,keyPlaceholder:"gsk_...",keyUrl:"https://console.groq.com/keys"},{id:"openrouter",name:"OpenRouter",desc:"Multi-provider",color:"#6366f1",Logo:XR,keyPlaceholder:"sk-or-...",keyUrl:"https://openrouter.ai/keys"},{id:"xai",name:"xAI",desc:"Grok",color:"#1d9bf0",Logo:eT,keyPlaceholder:"xai-...",keyUrl:"https://console.x.ai/"},{id:"deepseek",name:"DeepSeek",desc:"R1 & V3",color:"#4d6bfe",Logo:rT,keyPlaceholder:"sk-...",keyUrl:"https://platform.deepseek.com/api_keys"},{id:"ollama",name:"Ollama",desc:"Local models",color:"#808080",Logo:ZR,needsUrl:!0,keyUrl:"https://ollama.com/"},{id:"mistral",name:"Mistral",desc:"Mixtral",color:"#ee792f",Logo:nT,keyUrl:"https://console.mistral.ai/api-keys"},{id:"azure",name:"Azure",desc:"Azure OpenAI",color:"#00abec",Logo:JR,keyUrl:"https://portal.azure.com/"},{id:"perplexity",name:"Perplexity",desc:"Online LLMs",color:"#20808d",Logo:tT,keyPlaceholder:"pplx-...",keyUrl:"https://www.perplexity.ai/settings/api"},{id:"together",name:"Together",desc:"Open-source",color:"#6366f1",Logo:sT,keyUrl:"https://api.together.xyz/settings/api-keys"},{id:"cohere",name:"Cohere",desc:"Command",color:"#39594d",Logo:aT,keyUrl:"https://dashboard.cohere.com/api-keys"},{id:"fireworks",name:"Fireworks",desc:"Fast inference",color:"#ff6b35",Logo:lT,keyPlaceholder:"fw_...",keyUrl:"https://fireworks.ai/api-keys"},{id:"cerebras",name:"Cerebras",desc:"Wafer-scale",color:"#f15a29",Logo:iT,keyPlaceholder:"csk-...",keyUrl:"https://cloud.cerebras.ai/"},{id:"copilot",name:"Copilot",desc:"GitHub proxy",color:"#6e40c9",Logo:oT,keyUrl:"https://github.com/settings/copilot"}];function cT({data:e,onUpdate:a,path:s,onPathChange:i}){const{resolvedTheme:c}=lo(),u=c==="light"?"/brand/profclaw-wordmark-light.svg":"/brand/profclaw-wordmark-dark.svg";return o.jsx("div",{style:{animation:"oobe-fade-in 0.5s ease-out"},children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center",children:[o.jsxs("div",{className:"space-y-4 text-center md:text-left",children:[o.jsx("img",{src:u,alt:"profClaw",className:"h-20 mx-auto md:mx-0 drop-shadow-lg"}),o.jsx("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:"Welcome to profClaw"}),o.jsxs("p",{className:"text-[var(--muted-foreground)] text-[15px] leading-relaxed",children:["Your AI agent engine, running locally on your machine.",o.jsx("br",{}),o.jsx("span",{className:"text-[var(--muted-foreground)]/70",children:"Private. Fast. Yours."})]})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-2.5",children:[o.jsx("label",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"What should we call you?"}),o.jsx("input",{type:"text",className:"field-lg w-full text-base",placeholder:"Your name",value:e.name,onChange:f=>a({name:f.target.value}),autoFocus:!0})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("label",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Setup experience"}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("button",{type:"button",onClick:()=>i("quick"),className:`group relative p-5 rounded-2xl text-left transition-all duration-300 ${s==="quick"?"glass-heavy brand-ring shadow-elevated":"glass hover:shadow-elevated hover:translate-y-[-2px]"}`,children:[o.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center mb-3 ${s==="quick"?"bg-gradient-to-br from-[#f43f5e]/20 to-[#ea580c]/10":"bg-[var(--muted)]/50"}`,children:o.jsx(vm,{className:`h-4 w-4 ${s==="quick"?"text-[#f43f5e]":"text-[var(--muted-foreground)]"}`})}),o.jsx("div",{className:"font-semibold text-sm",children:"Quick Setup"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1 leading-relaxed",children:"2 steps. Name + AI key."})]}),o.jsxs("button",{type:"button",onClick:()=>i("guided"),className:`group relative p-5 rounded-2xl text-left transition-all duration-300 ${s==="guided"?"glass-heavy brand-ring shadow-elevated":"glass hover:shadow-elevated hover:translate-y-[-2px]"}`,children:[o.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center mb-3 ${s==="guided"?"bg-gradient-to-br from-[#f43f5e]/20 to-[#ea580c]/10":"bg-[var(--muted)]/50"}`,children:o.jsx(Z8,{className:`h-4 w-4 ${s==="guided"?"text-[#f43f5e]":"text-[var(--muted-foreground)]"}`})}),o.jsx("div",{className:"font-semibold text-sm",children:"Guided Setup"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1 leading-relaxed",children:"5 steps. GitHub, security."})]})]})]})]})]})})}function uT({data:e,onUpdate:a,onSkip:s,name:i}){const[c,u]=y.useState(!1),[f,m]=y.useState(null),[v,p]=y.useState(!1),[x,g]=y.useState(!1),w=e.aiProvider?.provider||"anthropic",S=e.aiProvider?.apiKey||"",N=e.aiProvider?.ollamaBaseUrl||"http://localhost:11434",j=Gl.find(U=>U.id===w),A=U=>{a({aiProvider:{provider:U,apiKey:"",ollamaBaseUrl:"http://localhost:11434"}}),m(null),Gl.findIndex(P=>P.id===U)>=wh&&g(!0)},R=U=>{a({aiProvider:{...e.aiProvider,provider:w,apiKey:U}}),m(null)},M=U=>{a({aiProvider:{provider:"ollama",ollamaBaseUrl:U}}),m(null)},_=async()=>{u(!0),m(null);try{const H=await(await fetch("/api/oobe/validate-ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:w,apiKey:S,ollamaBaseUrl:N})})).json();m({valid:H.valid,message:H.valid?H.message:H.error})}catch{m({valid:!1,message:"Connection failed"})}finally{u(!1)}};return o.jsxs("div",{style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1 mb-6",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["Nice to meet you, ",i||"friend","!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"Now let's pick an AI provider to power your agents. You can always change this later."})]}),o.jsxs("div",{className:"grid md:grid-cols-[1fr,1fr] gap-6 items-start",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"grid grid-cols-4 gap-2",children:(x?Gl:Gl.slice(0,wh)).map(U=>o.jsxs("button",{type:"button",onClick:()=>A(U.id),className:`flex flex-col items-center gap-1.5 p-3 rounded-xl text-center transition-all duration-200 ${w===U.id?"glass-heavy":"glass hover:shadow-soft hover:translate-y-[-1px]"}`,style:w===U.id?{boxShadow:`0 0 0 2px ${U.color}, 0 4px 16px ${U.color}25`}:void 0,children:[o.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:w===U.id?`${U.color}18`:"oklch(from var(--foreground) l c h / 0.05)"},children:o.jsx(U.Logo,{className:"h-[18px] w-[18px]",style:w===U.id?{color:U.color}:void 0})}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-xs leading-tight",children:U.name}),o.jsx("div",{className:"text-[10px] text-[var(--muted-foreground)] leading-tight",children:U.desc})]})]},U.id))}),o.jsx("button",{type:"button",onClick:()=>g(!x),className:"w-full text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors py-1.5",children:x?"Show less":`+${Gl.length-wh} more providers`})]}),o.jsxs("div",{className:"space-y-4 glass rounded-2xl p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[j&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:`${j.color}18`},children:o.jsx(j.Logo,{className:"h-4 w-4",style:{color:j.color}})}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-sm",children:j?.name}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)]",children:j?.desc})]})]}),j?.keyUrl&&o.jsxs("a",{href:j.keyUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Get key ",o.jsx(Ox,{className:"h-3 w-3"})]})]}),j?.needsUrl?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Ollama URL"}),o.jsx("input",{type:"text",className:"field-lg w-full",placeholder:"http://localhost:11434",value:N,onChange:U=>M(U.target.value)})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"API Key"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:v?"text":"password",className:"field-lg w-full pr-10",placeholder:j?.keyPlaceholder||"Enter API key...",value:S,onChange:U=>R(U.target.value)}),o.jsx("button",{type:"button",onClick:()=>p(!v),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:v?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-[var(--muted-foreground)]",children:"Your key doesn't leave your device."})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{type:"button",onClick:_,disabled:c||!j?.needsUrl&&!S,className:"btn-brand-outline flex-1 py-2.5 px-4 text-sm font-medium disabled:opacity-40",children:c?o.jsxs("span",{className:"flex items-center justify-center gap-2",children:[o.jsx(Pa,{className:"h-4 w-4 animate-spin"})," Testing..."]}):"Test Connection"}),o.jsx("button",{type:"button",onClick:s,className:"btn-ghost py-2.5 px-4 text-sm text-[var(--muted-foreground)]",children:"Skip for now"})]}),f&&o.jsxs("div",{className:`flex items-start gap-2 p-3 rounded-xl text-sm ${f.valid?"bg-[hsl(var(--success)/0.1)] text-[hsl(var(--success))]":"bg-[hsl(var(--destructive)/0.1)] text-[hsl(var(--destructive))]"}`,children:[f.valid?o.jsx(Bt,{className:"h-4 w-4 mt-0.5 shrink-0"}):o.jsx(Us,{className:"h-4 w-4 mt-0.5 shrink-0"}),o.jsx("span",{children:f.message})]})]})]})]})}function dT({data:e,onUpdate:a,name:s}){const i=e.github?.clientId||"",c=e.github?.clientSecret||"",[u,f]=y.useState(!1);return o.jsxs("div",{className:"space-y-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading",children:["Connect GitHub, ",s||"friend","?"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"Optional. Enables GitHub login and repository access for your agents."})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Client ID"}),o.jsx("input",{type:"text",className:"field-lg w-full",placeholder:"Your GitHub OAuth App Client ID",value:i,onChange:m=>a({github:{clientId:m.target.value,clientSecret:c}})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Client Secret"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:u?"text":"password",className:"field-lg w-full pr-10",placeholder:"Your GitHub OAuth App Client Secret",value:c,onChange:m=>a({github:{clientId:i,clientSecret:m.target.value}})}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:u?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]})]}),o.jsx("p",{className:"text-xs text-[var(--muted-foreground)] text-center",children:"You can skip this and configure it later in Settings."})]})}function fT({data:e,onUpdate:a,name:s}){const[i,c]=y.useState(!1),[u,f]=y.useState(!1),m=e.multiUser?.email||"",v=e.multiUser?.password||"";return o.jsxs("div",{className:"space-y-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["Almost there, ",s||"friend","!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"By default, profClaw runs in single-user local mode - no login required. Want to share it?"})]}),o.jsx("button",{type:"button",onClick:()=>{c(!i),i&&a({multiUser:void 0})},className:`w-full p-4 rounded-2xl text-left transition-all duration-300 ${i?"glass-heavy brand-ring":"glass hover:shadow-soft"}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-sm",children:"Enable Multi-User Auth"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Require login with email and password"})]}),o.jsx("div",{className:`w-10 h-6 rounded-full transition-colors duration-200 flex items-center ${i?"bg-[#e11d48] justify-end":"bg-[var(--muted)] justify-start"}`,children:o.jsx("div",{className:"w-5 h-5 rounded-full bg-white mx-0.5 shadow-sm"})})]})}),i&&o.jsxs("div",{className:"space-y-4",style:{animation:"oobe-fade-in 0.3s ease-out"},children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Email"}),o.jsx("input",{type:"email",className:"field-lg w-full",placeholder:"admin@example.com",value:m,onChange:p=>a({multiUser:{email:p.target.value,password:v}})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:u?"text":"password",className:"field-lg w-full pr-10",placeholder:"Min 8 characters",value:v,onChange:p=>a({multiUser:{email:m,password:p.target.value}})}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:u?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]})]})]})}function hT({name:e}){return o.jsxs("div",{className:"space-y-8 text-center py-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"relative mx-auto w-20 h-20",children:[o.jsx("div",{className:"absolute inset-0 rounded-full",style:{animation:"oobe-check 0.6s ease-out 0.1s both",background:"linear-gradient(135deg, oklch(from #e11d48 l c h / 0.08), oklch(from #ea580c l c h / 0.05))",boxShadow:"0 0 40px oklch(from #e11d48 l c h / 0.15)"}}),o.jsx("div",{className:"absolute inset-2 rounded-full flex items-center justify-center",style:{animation:"oobe-check 0.6s ease-out 0.3s both",background:"linear-gradient(135deg, oklch(from #e11d48 l c h / 0.2), oklch(from #ea580c l c h / 0.12))"},children:o.jsx(Bt,{className:"h-8 w-8 text-[#f43f5e]",strokeWidth:3})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["You're all set, ",e,"!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-[15px] max-w-sm mx-auto leading-relaxed",children:"profClaw is configured and ready to go. Your AI agents are standing by."})]}),o.jsxs("div",{className:"flex items-center justify-center gap-6 text-xs text-[var(--muted-foreground)]",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Local-first"]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Private"]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Ready"]})]})]})}function mT(){const{theme:e,setTheme:a}=lo(),s=[{id:"light",icon:ou,label:"Light"},{id:"dark",icon:Kl,label:"Dark"},{id:"midnight",icon:sE,label:"Midnight"}];return o.jsx("div",{className:"flex items-center gap-0.5 p-1 rounded-full glass",children:s.map(({id:i,icon:c,label:u})=>o.jsx("button",{type:"button",onClick:()=>a(i),title:u,className:`p-1.5 rounded-full transition-all duration-200 ${e===i?"bg-[var(--foreground)] text-[var(--background)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:o.jsx(c,{className:"h-3.5 w-3.5"})},i))})}const pT={welcome:"Profile","ai-provider":"AI Provider",github:"GitHub",security:"Security",complete:"Done"};function vT({steps:e,current:a}){return o.jsx("div",{className:"flex items-center gap-1",children:e.map((s,i)=>{const c=i===a,u=i<a,f=i===e.length-1;return o.jsxs("div",{className:"flex items-center",children:[o.jsxs("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-300 ${c?"bg-gradient-to-r from-[#e11d48]/15 to-[#ea580c]/10":u?"opacity-60":"opacity-30"}`,children:[o.jsx("div",{className:`flex items-center justify-center rounded-full transition-all duration-300 ${c?"w-5 h-5 brand-dot":u?"w-5 h-5 bg-[#e11d48]/40":"w-5 h-5 border-2 border-[var(--muted-foreground)]/20"}`,children:u?o.jsx(Bt,{className:"h-3 w-3 text-white",strokeWidth:3}):o.jsx("span",{className:`text-[10px] font-bold ${c?"text-white":"text-[var(--muted-foreground)]/50"}`,children:i+1})}),o.jsx("span",{className:`text-xs font-medium transition-all duration-300 ${c?"text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:pT[s]||s})]}),!f&&o.jsx("div",{className:`w-6 h-px mx-0.5 transition-colors duration-300 ${u?"bg-[#e11d48]/30":"bg-[var(--muted-foreground)]/10"}`})]},s)})})}function gT(){const[e,a]=y.useState("quick"),[s,i]=y.useState(0),[c,u]=y.useState({name:""}),[f,m]=y.useState(!1),[v,p]=y.useState(null),x=y.useCallback(P=>{u(E=>({...E,...P})),p(null)},[]),g=e==="quick"?["welcome","ai-provider","complete"]:["welcome","ai-provider","github","security","complete"],w=g.length,S=g[s],N=s===w-2,j=S==="complete",A=()=>{switch(S){case"welcome":return c.name.trim().length>0;case"ai-provider":return!c.aiProvider||c.aiProvider.provider==="ollama"?!0:!!c.aiProvider.apiKey;case"github":return!0;case"security":return c.multiUser?c.multiUser.email.includes("@")&&c.multiUser.password.length>=8:!0;default:return!0}},R=async()=>{m(!0),p(null);try{const P=await fetch("/api/oobe/setup",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({name:c.name.trim(),avatarUrl:c.avatarUrl,aiProvider:c.aiProvider})});if(!P.ok){const E=await P.json();throw new Error(E.error||"Setup failed")}if(c.github?.clientId&&c.github?.clientSecret&&await fetch("/api/setup/github-oauth",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({clientId:c.github.clientId,clientSecret:c.github.clientSecret})}),c.multiUser?.email&&c.multiUser?.password){const E=await fetch("/api/oobe/enable-multiuser",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:c.multiUser.email,password:c.multiUser.password})});if(!E.ok){const z=await E.json();throw new Error(z.error||"Failed to enable multi-user")}}i(w-1)}catch(P){p(P instanceof Error?P.message:"Setup failed")}finally{m(!1)}},M=async()=>{N?await R():i(P=>Math.min(P+1,w-1))},_=async()=>{u(P=>({...P,aiProvider:void 0})),N?await R():i(P=>P+1)},U=()=>{i(P=>Math.max(P-1,0))},H=()=>{window.location.href="/"};return o.jsxs("div",{className:"min-h-screen flex items-center justify-center p-6 relative overflow-hidden",children:[o.jsx(IR,{}),o.jsxs("div",{className:"relative z-10 w-full max-w-5xl min-h-[70vh] flex flex-col rounded-[3rem]",style:{animation:"oobe-scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1)",background:"color-mix(in srgb, hsl(var(--card)), transparent 12%)",backdropFilter:"blur(60px) saturate(200%)",WebkitBackdropFilter:"blur(60px) saturate(200%)",border:"none",boxShadow:["0 0 0 1px oklch(1 0 0 / 0.06) inset","0 1px 1px 0 oklch(1 0 0 / 0.1) inset","0 24px 80px -12px oklch(0 0 0 / 0.25)","0 8px 32px -8px oklch(from #e11d48 l c h / 0.08)"].join(", ")},children:[o.jsxs("div",{className:"flex items-center justify-between px-8 py-5 rounded-t-[3rem]",style:{borderBottom:"1px solid oklch(1 0 0 / 0.06)"},children:[o.jsx("div",{className:"w-24"}),j?o.jsx("div",{}):o.jsx(vT,{steps:g,current:s}),o.jsx("div",{className:"w-24 flex justify-end",children:o.jsx(mT,{})})]}),o.jsxs("div",{className:"flex-1 flex flex-col justify-center px-12 py-8 w-full",children:[S==="welcome"&&o.jsx(cT,{data:c,onUpdate:x,path:e,onPathChange:a}),S==="ai-provider"&&o.jsx(uT,{data:c,onUpdate:x,onSkip:_,name:c.name.trim()}),S==="github"&&o.jsx(dT,{data:c,onUpdate:x,name:c.name.trim()}),S==="security"&&o.jsx(fT,{data:c,onUpdate:x,name:c.name.trim()}),S==="complete"&&o.jsx(hT,{name:c.name})]}),v&&o.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-xl bg-[hsl(var(--destructive)/0.1)] text-[hsl(var(--destructive))] text-sm max-w-lg mx-auto w-full px-12",children:[o.jsx(Us,{className:"h-4 w-4 shrink-0"}),o.jsx("span",{children:v})]}),o.jsxs("div",{className:"flex items-center justify-between px-12 py-6 rounded-b-[3rem]",style:{borderTop:"1px solid oklch(1 0 0 / 0.06)"},children:[s>0&&!j?o.jsxs("button",{type:"button",onClick:U,className:"btn-ghost py-2.5 px-4 text-sm flex items-center gap-1",children:[o.jsx(Rx,{className:"h-4 w-4"})," Back"]}):o.jsx("div",{className:"w-24"}),j?o.jsxs("button",{type:"button",onClick:H,className:"btn-brand py-2.5 px-8 text-sm flex items-center gap-2",children:["Go to Dashboard ",o.jsx(su,{className:"h-4 w-4"})]}):o.jsx("button",{type:"button",onClick:M,disabled:!A()||f,className:"btn-brand py-2.5 px-8 text-sm flex items-center gap-2 disabled:opacity-40",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Pa,{className:"h-4 w-4 animate-spin"})," Setting up..."]}):N?o.jsxs(o.Fragment,{children:["Complete Setup ",o.jsx(Bt,{className:"h-4 w-4"})]}):o.jsxs(o.Fragment,{children:["Continue ",o.jsx(su,{className:"h-4 w-4"})]})})]})]})]})}const Vb=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("premium-card rounded-2xl transition-all duration-300",e),...a}));Vb.displayName="Card";const yT=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("flex flex-col space-y-1.5 p-6",e),...a}));yT.displayName="CardHeader";const xT=y.forwardRef(({className:e,...a},s)=>o.jsx("h3",{ref:s,className:de("text-2xl font-semibold leading-none tracking-tight",e),...a}));xT.displayName="CardTitle";const bT=y.forwardRef(({className:e,...a},s)=>o.jsx("p",{ref:s,className:de("text-sm text-[var(--muted-foreground)]",e),...a}));bT.displayName="CardDescription";const wT=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("p-6 pt-0",e),...a}));wT.displayName="CardContent";const ST=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("flex items-center p-6 pt-0",e),...a}));ST.displayName="CardFooter";const jT=[{icon:Zr,title:"AI-Powered Task Routing",description:"Automatically route tasks to the right AI agent based on complexity and requirements."},{icon:vm,title:"Multi-Agent Orchestration",description:"Coordinate OpenClaw, Claude Code, and other agents for complex workflows."},{icon:lu,title:"Secure & Auditable",description:"Full audit trail of all AI actions with approval workflows for sensitive operations."}];function ET(){const e=oa(),{refetch:a}=br(),[s,i]=y.useState(!1),c=hr({mutationFn:async()=>{const f=await fetch("/api/users/me/complete-onboarding",{method:"POST",credentials:"include"});if(!f.ok)throw new Error("Failed to complete onboarding");return f.json()},onSuccess:async()=>{await a(),Dt.success("Welcome to profClaw!"),e("/")},onError:()=>{Dt.error("Something went wrong. Please try again."),i(!1)}}),u=()=>{i(!0),c.mutate()};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5 flex items-center justify-center p-4",children:o.jsxs(Vb,{className:"max-w-2xl w-full p-8 shadow-xl border-border/50",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"flex justify-center mb-6",children:o.jsx("div",{className:"h-16 w-16 rounded-2xl bg-gradient-to-br from-primary to-primary/60 flex items-center justify-center shadow-lg",children:o.jsx(Ba,{className:"h-10 w-10 text-primary-foreground"})})}),o.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Welcome to profClaw"}),o.jsx("p",{className:"text-muted-foreground text-lg",children:"Your AI agent orchestration platform is ready. Here's what you can do:"})]}),o.jsx("div",{className:"space-y-4 mb-8",children:jT.map((f,m)=>o.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-muted/30 border border-border/50",children:[o.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:o.jsx(f.icon,{className:"h-5 w-5 text-primary"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold mb-1",children:f.title}),o.jsx("p",{className:"text-sm text-muted-foreground",children:f.description})]})]},m))}),o.jsxs("div",{className:"space-y-4",children:[o.jsx(dt,{size:"lg",onClick:u,disabled:s,className:"w-full rounded-xl h-12 text-base",children:s?o.jsxs(o.Fragment,{children:[o.jsx(Pa,{className:"h-5 w-5 mr-2 animate-spin"}),"Setting up your workspace..."]}):o.jsxs(o.Fragment,{children:["Get Started",o.jsx(ga,{className:"h-5 w-5 ml-2"})]})}),o.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"You can always revisit settings to configure integrations and preferences."})]}),o.jsx("div",{className:"mt-8 pt-6 border-t border-border",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[o.jsx(Lh,{className:"h-4 w-4 text-green-500"}),o.jsx("span",{children:"Your account is ready"})]})})]})})}const NT=y.lazy(()=>vt(()=>import("./AnalyticsDashboard-C-mjuGHT.js"),__vite__mapDeps([11,12,13,14,15,16])).then(e=>({default:e.AnalyticsDashboard}))),CT=y.lazy(()=>vt(()=>import("./TaskList-CyJq3ANE.js"),__vite__mapDeps([17,12,18,19,20,21,22,23,24,25])).then(e=>({default:e.TaskList}))),AT=y.lazy(()=>vt(()=>import("./TaskDetail-zarC1fOt.js"),__vite__mapDeps([26,27,28,29,23,30,31])).then(e=>({default:e.TaskDetail}))),RT=y.lazy(()=>vt(()=>import("./SummaryList-BvS5Idnu.js"),__vite__mapDeps([32,12,18,19,3])).then(e=>({default:e.SummaryList}))),TT=y.lazy(()=>vt(()=>import("./SummaryDetail-CwLAfHgJ.js"),__vite__mapDeps([33,12,34,35,3,36,37])).then(e=>({default:e.SummaryDetail}))),MT=y.lazy(()=>vt(()=>import("./AgentList-CqyaYrcq.js"),__vite__mapDeps([38,27,3,39])).then(e=>({default:e.AgentList}))),gy=y.lazy(()=>vt(()=>import("./Settings-CgPqzUvj.js"),__vite__mapDeps([40,41,18,19,21,42,43,44,45,8,9,46,47,3,48,49,4,12,50,20,35,51,52,10,24,16,39,22,36,5,6,23,29,53,54,55])).then(e=>({default:e.Settings}))),kT=y.lazy(()=>vt(()=>import("./CostsDashboard-CDBBcGkg.js"),__vite__mapDeps([56,34,15,13,14])).then(e=>({default:e.CostsDashboard}))),OT=y.lazy(()=>vt(()=>import("./index-a4Fxq0Hb.js"),__vite__mapDeps([57,12,34,27,36])).then(e=>({default:e.WebhookStatus}))),_T=y.lazy(()=>vt(()=>import("./index-DHGvP9mp.js"),__vite__mapDeps([58,12,34,10,19,4])).then(e=>({default:e.DLQDashboard}))),DT=y.lazy(()=>vt(()=>import("./index-Z4-RtZcs.js"),__vite__mapDeps([59,12,22,18,19,60,10,54,15])).then(e=>({default:e.GatewayDashboard}))),LT=y.lazy(()=>vt(()=>import("./TicketList-Scj4pMWa.js"),__vite__mapDeps([61,12,18,19,62,63,22,21,64,28,8,65,66,36,67,51,37,23,44,24])).then(e=>({default:e.TicketList}))),zT=y.lazy(()=>vt(()=>import("./TicketDetail-DmqWKj2W.js"),__vite__mapDeps([68,12,22,18,19,21,50,62,44,64,28,36,49,69,4,16,52,6,31,8,5,67,23,30,37,51])).then(e=>({default:e.TicketDetail}))),UT=y.lazy(()=>vt(()=>import("./TicketBoard-BlWr3-iH.js"),__vite__mapDeps([70,71,2,51,67,63,22,12,21,18,19,64,28,8,65,66,36,37,23])).then(e=>({default:e.TicketBoard}))),PT=y.lazy(()=>vt(()=>import("./ChatView-DxxQy6pl.js"),__vite__mapDeps([72,18,19,53,12,8,3,1,2,31,42,43,44,45,9,46,47,4,73,51,37,35,74,16,22,5,50,66,21,10,39,55])).then(e=>({default:e.ChatView}))),BT=y.lazy(()=>vt(()=>import("./ProjectList-D85TN0i0.js"),__vite__mapDeps([75,21,73,37,76,45,9,47,60,41,18,19,12,20,53,44,36,25,49,77,4])).then(e=>({default:e.ProjectList}))),HT=y.lazy(()=>vt(()=>import("./ProjectDetail-DlYUcOss.js"),__vite__mapDeps([78,76,45,9,47,37,73,21,22,62,30,13,15,71,2,74,67,25,51,24,43,23,7,10,79])).then(e=>({default:e.ProjectDetail}))),$T=y.lazy(()=>vt(()=>import("./index-DeI8lKRR.js"),__vite__mapDeps([80,50,6,9,47,77,10,69,49,31,23,4,44,48,21,43,36,65,16,46,35,30,37,15,24])).then(e=>({default:e.CronDashboard}))),qT=y.lazy(()=>vt(()=>import("./ActivityView-DIPQSJ_d.js"),__vite__mapDeps([81,12,34,18,19,4])).then(e=>({default:e.ActivityView}))),GT=y.lazy(()=>vt(()=>import("./UserManagement-BH7uG7dw.js"),__vite__mapDeps([82,50,10,25,55,4])).then(e=>({default:e.UserManagement}))),FT=y.lazy(()=>vt(()=>import("./InviteCodeManagement-DTm-IPTm.js"),__vite__mapDeps([83,50,47,25,4,10])).then(e=>({default:e.InviteCodeManagement}))),VT=y.lazy(()=>vt(()=>import("./index-Ca3vk7Gq.js"),[]).then(e=>({default:e.PrivacyPolicy}))),IT=y.lazy(()=>vt(()=>import("./index-Ca3vk7Gq.js"),[]).then(e=>({default:e.TermsOfService})));function pt({children:e}){return o.jsx(y.Suspense,{fallback:o.jsx(FR,{}),children:e})}const YT=uj([{path:"/login",element:o.jsx(vh,{children:o.jsx(rN,{})})},{path:"/signup",element:o.jsx(vh,{children:o.jsx(sN,{})})},{path:"/access-key",element:o.jsx(vh,{children:o.jsx(iN,{})})},{path:"/oobe",element:o.jsx(gT,{})},{path:"/setup",element:o.jsx(VR,{})},{path:"/privacy",element:o.jsx(pt,{children:o.jsx(VT,{})})},{path:"/terms",element:o.jsx(pt,{children:o.jsx(IT,{})})},{path:"/onboarding",element:o.jsx(St,{children:o.jsx(pt,{children:o.jsx(ET,{})})})},{path:"/",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(PT,{})})})})},{path:"/tasks",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(CT,{})})})})},{path:"/tasks/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(AT,{})})})})},{path:"/summaries",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(RT,{})})})})},{path:"/summaries/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(TT,{})})})})},{path:"/agents",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(MT,{})})})})},{path:"/costs",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(kT,{})})})})},{path:"/settings",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(gy,{})})})})},{path:"/settings/:section",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(gy,{})})})})},{path:"/webhooks",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(OT,{})})})})},{path:"/failed",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(_T,{})})})})},{path:"/gateway",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(DT,{})})})})},{path:"/tickets",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(LT,{})})})})},{path:"/tickets/board",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(UT,{})})})})},{path:"/tickets/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(zT,{})})})})},{path:"/chat",element:o.jsx(mr,{to:"/",replace:!0})},{path:"/analytics",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(NT,{})})})})},{path:"/projects",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(BT,{})})})})},{path:"/projects/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(HT,{})})})})},{path:"/cron",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx($T,{})})})})},{path:"/activity",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(qT,{})})})})},{path:"/admin/users",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(GT,{})})})})},{path:"/admin/invite-codes",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(FT,{})})})})}]);function KT(){return o.jsx(jj,{router:YT})}function QT(){return o.jsx(R3,{position:"bottom-right",expand:!1,richColors:!1,closeButton:!0,duration:4e3,toastOptions:{className:"toast-glass",style:{padding:"12px 16px"}}})}const XT=[{title:"Navigation",shortcuts:[{keys:["Cmd","K"],description:"Open command palette"},{keys:["G","H"],description:"Go to Dashboard"},{keys:["G","T"],description:"Go to Tasks"},{keys:["G","S"],description:"Go to Summaries"},{keys:["G","A"],description:"Go to Agents"},{keys:["G","C"],description:"Go to Costs"}]},{title:"Actions",shortcuts:[{keys:["Cmd","N"],description:"Create new task"},{keys:["Cmd","/"],description:"Focus search"},{keys:["Cmd","Shift","T"],description:"Toggle theme"},{keys:["Cmd","Shift","V"],description:"Toggle Talk Mode"}]},{title:"General",shortcuts:[{keys:["?"],description:"Show keyboard shortcuts"},{keys:["Esc"],description:"Close modal / Cancel"},{keys:["Enter"],description:"Confirm / Submit"}]},{title:"Lists & Navigation",shortcuts:[{keys:["J"],description:"Next item"},{keys:["K"],description:"Previous item"},{keys:["Enter"],description:"Open selected item"}]}];function ZT(){const[e,a]=y.useState(!1);return y.useEffect(()=>{const s=i=>{if(i.key==="?"&&!i.metaKey&&!i.ctrlKey){const c=i.target;if(c.tagName==="INPUT"||c.tagName==="TEXTAREA"||c.isContentEditable)return;i.preventDefault(),a(!0)}i.key==="Escape"&&e&&a(!1)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e]),e?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 animate-in fade-in duration-200",onClick:()=>a(!1)}),o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"glass-heavy rounded-[28px] w-full max-w-2xl max-h-[80vh] overflow-hidden border border-white/10 shadow-2xl animate-in zoom-in-95 fade-in duration-200",onClick:s=>s.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:o.jsx(gE,{className:"h-5 w-5 text-blue-400"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold",children:"Keyboard Shortcuts"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Press ? anytime to show this"})]})]}),o.jsx("button",{onClick:()=>a(!1),className:"p-2 hover:bg-white/5 rounded-xl transition-colors",children:o.jsx(cu,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"p-6 overflow-y-auto max-h-[calc(80vh-100px)]",children:o.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:XT.map(s=>o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mb-3",children:s.title}),o.jsx("div",{className:"space-y-2",children:s.shortcuts.map((i,c)=>o.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-white/5 transition-colors",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:i.description}),o.jsx("div",{className:"flex items-center gap-1",children:i.keys.map((u,f)=>o.jsxs("span",{children:[o.jsx("kbd",{className:de("px-2 py-1 text-[11px] font-bold rounded-lg","bg-white/5 border border-white/10","shadow-[0_2px_0_0_rgba(255,255,255,0.05)]"),children:u==="Cmd"?"⌘":u}),f<i.keys.length-1&&o.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"+"})]},f))})]},c))})]},s.title))})}),o.jsx("div",{className:"p-4 border-t border-white/5 bg-white/[0.02]",children:o.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["Press ",o.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-bold rounded bg-white/5 border border-white/10",children:"Esc"})," to close"]})})]})})]}):null}class JT extends y.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,s){console.error("[ErrorBoundary] Uncaught error:",a,s.componentStack)}handleReload=()=>{window.location.reload()};handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?o.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-6",children:o.jsx("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-8 shadow-lg",children:o.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[o.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10",children:o.jsx(to,{className:"h-6 w-6 text-destructive"})}),o.jsx("h2",{className:"text-lg font-semibold",children:"Something went wrong"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"An unexpected error occurred. You can try reloading the page or resetting the app state."}),this.state.error&&o.jsx("pre",{className:"mt-2 max-h-32 w-full overflow-auto rounded-md bg-muted p-3 text-left text-xs text-muted-foreground",children:this.state.error.message}),o.jsxs("div",{className:"mt-4 flex gap-3",children:[o.jsx("button",{type:"button",onClick:this.handleReset,className:"inline-flex items-center gap-2 rounded-md border border-border bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-muted",children:"Try again"}),o.jsxs("button",{type:"button",onClick:this.handleReload,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:[o.jsx(LE,{className:"h-4 w-4"}),"Reload"]})]})]})})}):this.props.children}}function WT(){return o.jsx(JT,{children:o.jsxs(NA,{children:[o.jsx(KT,{}),o.jsx(QT,{}),o.jsx(DR,{}),o.jsx(ZT,{})]})})}l4.createRoot(document.getElementById("root")).render(o.jsx(y.StrictMode,{children:o.jsx(WT,{})}));export{eo as $,ga as A,fm as B,V8 as C,_u as D,nM as E,dE as F,_1 as G,UE as H,aa as I,Ox as J,Lx as K,Pa as L,M8 as M,_x as N,Bt as O,_E as P,Li as Q,LE as R,Zr as S,VE as T,to as U,qs as V,ou as W,cu as X,Kl as Y,vm as Z,lu as _,pm as a,TM as a$,Jr as a0,Wr as a1,CE as a2,aE as a3,gE as a4,Ax as a5,MM as a6,kM as a7,OM as a8,_M as a9,TE as aA,YR as aB,KR as aC,JR as aD,QR as aE,eT as aF,WR as aG,rT as aH,XR as aI,ZR as aJ,ru as aK,nT as aL,aT as aM,tT as aN,sT as aO,iT as aP,lT as aQ,pM as aR,vM as aS,fM as aT,hM as aU,mM as aV,dM as aW,oT as aX,gM as aY,AM as aZ,yM as a_,DM as aa,LM as ab,zM as ac,zx as ad,D8 as ae,mm as af,lo as ag,Gb as ah,pE as ai,ZE as aj,Lh as ak,ux as al,bT as am,KE as an,ym as ao,Ht as ap,ra as aq,qe as ar,ss as as,an as at,es as au,Vi as av,Oa as aw,Ba as ax,hm as ay,kE as az,Vb as b,xM as b0,RM as b1,bM as b2,wM as b3,SM as b4,jM as b5,EM as b6,NM as b7,CM as b8,KC as b9,uM as bA,oM as bB,cM as bC,YA as bD,KA as bE,lM as bF,Hx as bG,vr as bH,Ej as bI,tE as bJ,sM as bK,iM as bL,h8 as bM,la as bN,Mx as bO,eM as bP,$x as ba,x7 as bb,b7 as bc,p2 as bd,Rx as be,t7 as bf,n7 as bg,Tm as bh,s2 as bi,xm as bj,a7 as bk,aM as bl,r7 as bm,he as bn,Ql as bo,yy as bp,Kh as bq,bu as br,xu as bs,w2 as bt,Mm as bu,no as bv,Fx as bw,bm as bx,IA as by,QA as bz,ke as c,yT as d,xT as e,wT as f,Tx as g,Ft as h,de as i,o as j,dt as k,su as l,zi as m,oo as n,hr as o,ya as p,gj as q,y as r,oa as s,Dt as t,pr as u,Us as v,iu as w,Du as x,Lu as y,un as z};
|
|
67
|
+
Generated: ${new Date().toISOString()}`],{type:"text/plain"}),ce=URL.createObjectURL(F),T=document.createElement("a");T.href=ce,T.download="profclaw-recovery-codes.txt",T.click(),URL.revokeObjectURL(ce),Dt.success("Recovery codes downloaded")},children:[o.jsx(aE,{className:"h-4 w-4"}),"Download"]})]}),o.jsxs(dt,{variant:"black",onClick:()=>P(!0),className:"w-full gap-2 mt-2",children:["I've Saved My Recovery Codes ",o.jsx(ga,{className:"h-4 w-4"})]})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"mx-auto w-20 h-20 rounded-2xl bg-green-500/10 flex items-center justify-center",children:o.jsx(Lh,{className:"h-10 w-10 text-green-500"})}),o.jsxs("div",{className:"space-y-2 mt-6",children:[o.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Setup Complete!"}),o.jsx("p",{className:"text-[var(--muted-foreground)] max-w-sm mx-auto",children:"profClaw is ready to use. You can now sign in and start managing your tasks."})]})]}),o.jsxs("div",{className:"space-y-4 glass-heavy rounded-[2rem] p-8 text-left shadow-inner",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"GitHub OAuth Active"})]}),o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"Admin Identity Secure"})]}),_.length>0&&o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("div",{className:"h-8 w-8 rounded-full glass-heavy flex items-center justify-center shadow-inner",children:o.jsx(Bt,{className:"h-4 w-4 text-green-500"})}),o.jsx("span",{className:"text-[11px] font-black uppercase tracking-[0.2em] text-[var(--muted-foreground)]",children:"Recovery Vault Sealed"})]})]}),o.jsxs(dt,{variant:"black",onClick:()=>e("/"),className:"w-full gap-2",children:["Go to Dashboard ",o.jsx(ga,{className:"h-4 w-4"})]})]})});default:return null}};return o.jsxs("div",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-4",children:[o.jsx("div",{className:"fixed inset-0 bg-gradient-to-br from-[var(--primary)]/5 via-transparent to-pink-500/5 pointer-events-none"}),o.jsxs("div",{className:"w-full max-w-xl relative z-10",children:[o.jsx("div",{className:"flex justify-center mb-10",children:o.jsx("div",{className:"p-6 rounded-[2.5rem] glass-heavy shadow-2xl transition-transform hover:scale-110",children:o.jsx(Ba,{className:"h-14 w-14 text-[var(--primary)]"})})}),o.jsx("div",{className:"flex items-center justify-center gap-1 mb-6",children:vy.map((F,ce)=>o.jsxs("div",{className:"flex items-center",children:[o.jsxs("div",{className:"flex flex-col items-center",children:[o.jsx("div",{className:de("flex items-center justify-center w-12 h-12 rounded-[1.25rem] transition-all duration-500 border-none shadow-xl",ce<a?"bg-primary text-white shadow-primary/30 scale-90 opacity-50":ce===a?"glass-heavy text-primary scale-110 ring-4 ring-primary/10 shadow-primary/20":"glass opacity-30 text-[var(--muted-foreground)]"),children:ce<a?o.jsx(Bt,{className:"h-6 w-6"}):o.jsx("span",{className:"text-sm font-black",children:ce+1})}),o.jsx("span",{className:de("text-[9px] mt-3 font-black uppercase tracking-[0.15em] transition-all duration-500",ce===a?"text-[var(--primary)] scale-105":"text-[var(--muted-foreground)] opacity-40"),children:F.title})]}),ce<vy.length-1&&o.jsx("div",{className:de("w-12 h-0.5 mx-2 mb-7 rounded-full transition-all duration-700",ce<a?"bg-primary":"bg-[var(--border)]/10")})]},F.id))}),o.jsxs("div",{className:"glass-heavy rounded-[3rem] p-10 shadow-float overflow-hidden relative",children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-transparent pointer-events-none"}),o.jsx("div",{className:"relative z-10",children:G()})]}),o.jsxs("p",{className:"text-center text-xs text-[var(--muted-foreground)] mt-6",children:["Already have an account?"," ",o.jsx("button",{onClick:()=>e("/login"),className:"text-[var(--primary)] hover:underline font-medium",children:"Sign in"})]})]})]})}function IR(){return o.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none -z-10",children:[o.jsx("div",{className:"absolute inset-0 bg-[var(--background)]"}),o.jsx("div",{className:"absolute inset-0",style:{background:["radial-gradient(ellipse 90% 70% at 20% 20%, oklch(from #e11d48 l c h / 0.07) 0%, transparent 60%)","radial-gradient(ellipse 80% 60% at 80% 30%, oklch(from #ea580c l c h / 0.05) 0%, transparent 55%)","radial-gradient(ellipse 70% 50% at 50% 80%, oklch(from #fb923c l c h / 0.04) 0%, transparent 50%)","radial-gradient(ellipse 120% 40% at 50% 100%, oklch(from #e11d48 l c h / 0.06) 0%, transparent 40%)"].join(", ")}}),o.jsx("div",{className:"absolute w-[600px] h-[600px] rounded-full opacity-[0.04]",style:{top:"10%",right:"-5%",background:"radial-gradient(circle, #f43f5e 0%, transparent 70%)",animation:"liquid-mesh-drift 30s infinite linear"}}),o.jsxs("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[280px] opacity-[0.08]",style:{animation:"wave-drift-1 25s linear infinite"},viewBox:"0 0 2400 280",preserveAspectRatio:"none",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"wave1-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:"#e11d48"}),o.jsx("stop",{offset:"50%",stopColor:"#f43f5e"}),o.jsx("stop",{offset:"100%",stopColor:"#e11d48"})]})}),o.jsx("path",{d:"M0,160 C200,80 400,220 600,140 C800,60 1000,200 1200,160 C1400,120 1600,220 1800,100 C2000,20 2200,200 2400,160 L2400,280 L0,280 Z",fill:"url(#wave1-grad)"})]}),o.jsxs("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[200px] opacity-[0.06]",style:{animation:"wave-drift-2 18s linear infinite"},viewBox:"0 0 2400 200",preserveAspectRatio:"none",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"wave2-grad",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[o.jsx("stop",{offset:"0%",stopColor:"#ea580c"}),o.jsx("stop",{offset:"50%",stopColor:"#fb923c"}),o.jsx("stop",{offset:"100%",stopColor:"#ea580c"})]})}),o.jsx("path",{d:"M0,110 C150,160 350,50 600,120 C850,180 1050,70 1200,110 C1350,150 1550,50 1800,100 C2050,150 2250,60 2400,110 L2400,200 L0,200 Z",fill:"url(#wave2-grad)"})]}),o.jsx("svg",{className:"absolute bottom-0 left-0 w-[200%] h-[130px] opacity-[0.04]",style:{animation:"wave-drift-3 12s linear infinite"},viewBox:"0 0 2400 130",preserveAspectRatio:"none",children:o.jsx("path",{d:"M0,70 C300,100 500,30 800,80 C1100,120 1300,40 1600,70 C1900,90 2100,30 2400,70 L2400,130 L0,130 Z",fill:"#fb923c"})})]})}function YR({className:e}){return o.jsx("svg",{viewBox:"0 0 46 32",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Anthropic",children:o.jsx("path",{d:"M32.73 0h-6.945L38.45 32h6.945L32.73 0ZM13.27 0 0 32h7.082l2.79-7.103h13.25l2.79 7.103h7.082L19.727 0h-6.458Zm-.636 18.747 4.323-11.138 4.323 11.138h-8.646Z"})})}function KR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"OpenAI",children:o.jsx("path",{d:"M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.677l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365 2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"})})}function QR({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Google",children:[o.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),o.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),o.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),o.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function XR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"OpenRouter",children:o.jsx("path",{d:"M16.778 1.844v1.919q-.569-.026-1.138-.032-.708-.008-1.415.037c-1.93.126-4.023.728-6.149 2.237-2.911 2.066-2.731 1.95-4.14 2.75-.396.223-1.342.574-2.185.798-.841.225-1.753.333-1.751.333v4.229s.768.108 1.61.333c.842.224 1.789.575 2.185.799 1.41.798 1.228.683 4.14 2.75 2.126 1.509 4.22 2.11 6.148 2.236.88.058 1.716.041 2.555.005v1.918l7.222-4.168-7.222-4.17v2.176c-.86.038-1.611.065-2.278.021-1.364-.09-2.417-.357-3.979-1.465-2.244-1.593-2.866-2.027-3.68-2.508.889-.518 1.449-.906 3.822-2.59 1.56-1.109 2.614-1.377 3.978-1.466.667-.044 1.418-.017 2.278.02v2.176L24 6.014Z"})})}function ZR({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Ollama",children:o.jsx("path",{d:"M16.361 10.26a.894.894 0 0 0-.558.47l-.072.148.001.207c0 .193.004.217.059.353.076.193.152.312.291.448.24.238.51.3.872.205a.86.86 0 0 0 .517-.436.752.752 0 0 0 .08-.498c-.064-.453-.33-.782-.724-.897a1.06 1.06 0 0 0-.466 0zm-9.203.005c-.305.096-.533.32-.65.639a1.187 1.187 0 0 0-.06.52c.057.309.31.59.598.667.362.095.632.033.872-.205.14-.136.215-.255.291-.448.055-.136.059-.16.059-.353l.001-.207-.072-.148a.894.894 0 0 0-.565-.472 1.02 1.02 0 0 0-.474.007Zm4.184 2c-.131.071-.223.25-.195.383.031.143.157.288.353.407.105.063.112.072.117.136.004.038-.01.146-.029.243-.02.094-.036.194-.036.222.002.074.07.195.143.253.064.052.076.054.255.059.164.005.198.001.264-.03.169-.082.212-.234.15-.525-.052-.243-.042-.28.087-.355.137-.08.281-.219.324-.314a.365.365 0 0 0-.175-.48.394.394 0 0 0-.181-.033c-.126 0-.207.03-.355.124l-.085.053-.053-.032c-.219-.13-.259-.145-.391-.143a.396.396 0 0 0-.193.032zm.39-2.195c-.373.036-.475.05-.654.086-.291.06-.68.195-.951.328-.94.46-1.589 1.226-1.787 2.114-.04.176-.045.234-.045.53 0 .294.005.357.043.524.264 1.16 1.332 2.017 2.714 2.173.3.033 1.596.033 1.896 0 1.11-.125 2.064-.727 2.493-1.571.114-.226.169-.372.22-.602.039-.167.044-.23.044-.523 0-.297-.005-.355-.045-.531-.288-1.29-1.539-2.304-3.072-2.497a6.873 6.873 0 0 0-.855-.031zm.645.937a3.283 3.283 0 0 1 1.44.514c.223.148.537.458.671.662.166.251.26.508.303.82.02.143.01.251-.043.482-.08.345-.332.705-.672.957a3.115 3.115 0 0 1-.689.348c-.382.122-.632.144-1.525.138-.582-.006-.686-.01-.853-.042-.57-.107-1.022-.334-1.35-.68-.264-.28-.385-.535-.45-.946-.03-.192.025-.509.137-.776.136-.326.488-.73.836-.963.403-.269.934-.46 1.422-.512.187-.02.586-.02.773-.002zm-5.503-11a1.653 1.653 0 0 0-.683.298C5.617.74 5.173 1.666 4.985 2.819c-.07.436-.119 1.04-.119 1.503 0 .544.064 1.24.155 1.721.02.107.031.202.023.208a8.12 8.12 0 0 1-.187.152 5.324 5.324 0 0 0-.949 1.02 5.49 5.49 0 0 0-.94 2.339 6.625 6.625 0 0 0-.023 1.357c.091.78.325 1.438.727 2.04l.13.195-.037.064c-.269.452-.498 1.105-.605 1.732-.084.496-.095.629-.095 1.294 0 .67.009.803.088 1.266.095.555.288 1.143.503 1.534.071.128.243.393.264.407.007.003-.014.067-.046.141a7.405 7.405 0 0 0-.548 1.873c-.062.417-.071.552-.071.991 0 .56.031.832.148 1.279L3.42 24h1.478l-.05-.091c-.297-.552-.325-1.575-.068-2.597.117-.472.25-.819.498-1.296l.148-.29v-.177c0-.165-.003-.184-.057-.293a.915.915 0 0 0-.194-.25 1.74 1.74 0 0 1-.385-.543c-.424-.92-.506-2.286-.208-3.451.124-.486.329-.918.544-1.154a.787.787 0 0 0 .223-.531c0-.195-.07-.355-.224-.522a3.136 3.136 0 0 1-.817-1.729c-.14-.96.114-2.005.69-2.834.563-.814 1.353-1.336 2.237-1.475.199-.033.57-.028.776.01.226.04.367.028.512-.041.179-.085.268-.19.374-.431.093-.215.165-.333.36-.576.234-.29.46-.489.822-.729.413-.27.884-.467 1.352-.561.17-.035.25-.04.569-.04.319 0 .398.005.569.04a4.07 4.07 0 0 1 1.914.997c.117.109.398.457.488.602.034.057.095.177.132.267.105.241.195.346.374.43.14.068.286.082.503.045.343-.058.607-.053.943.016 1.144.23 2.14 1.173 2.581 2.437.385 1.108.276 2.267-.296 3.153-.097.15-.193.27-.333.419-.301.322-.301.722-.001 1.053.493.539.801 1.866.708 3.036-.062.772-.26 1.463-.533 1.854a2.096 2.096 0 0 1-.224.258.916.916 0 0 0-.194.25c-.054.109-.057.128-.057.293v.178l.148.29c.248.476.38.823.498 1.295.253 1.008.231 2.01-.059 2.581a.845.845 0 0 0-.044.098c0 .006.329.009.732.009h.73l.02-.074.036-.134c.019-.076.057-.3.088-.516.029-.217.029-1.016 0-1.258-.11-.875-.295-1.57-.597-2.226-.032-.074-.053-.138-.046-.141.008-.005.057-.074.108-.152.376-.569.607-1.284.724-2.228.031-.26.031-1.378 0-1.628-.083-.645-.182-1.082-.348-1.525a6.083 6.083 0 0 0-.329-.7l-.038-.064.131-.194c.402-.604.636-1.262.727-2.04a6.625 6.625 0 0 0-.024-1.358 5.512 5.512 0 0 0-.939-2.339 5.325 5.325 0 0 0-.95-1.02 8.097 8.097 0 0 1-.186-.152.692.692 0 0 1 .023-.208c.208-1.087.201-2.443-.017-3.503-.19-.924-.535-1.658-.98-2.082-.354-.338-.716-.482-1.15-.455-.996.059-1.8 1.205-2.116 3.01a6.805 6.805 0 0 0-.097.726c0 .036-.007.066-.015.066a.96.96 0 0 1-.149-.078A4.857 4.857 0 0 0 12 3.03c-.832 0-1.687.243-2.456.698a.958.958 0 0 1-.148.078c-.008 0-.015-.03-.015-.066a6.71 6.71 0 0 0-.097-.725C8.997 1.392 8.337.319 7.46.048a2.096 2.096 0 0 0-.585-.041Zm.293 1.402c.248.197.523.759.682 1.388.03.113.06.244.069.292.007.047.026.152.041.233.067.365.098.76.102 1.24l.002.475-.12.175-.118.178h-.278c-.324 0-.646.041-.954.124l-.238.06c-.033.007-.038-.003-.057-.144a8.438 8.438 0 0 1 .016-2.323c.124-.788.413-1.501.696-1.711.067-.05.079-.049.157.013zm9.825-.012c.17.126.358.46.498.888.28.854.36 2.028.212 3.145-.019.14-.024.151-.057.144l-.238-.06a3.693 3.693 0 0 0-.954-.124h-.278l-.119-.178-.119-.175.002-.474c.004-.669.066-1.19.214-1.772.157-.623.434-1.185.68-1.382.078-.062.09-.063.159-.012z"})})}function JR({className:e}){return o.jsx("svg",{viewBox:"0 0 16 16",className:de("h-6 w-6",e),"aria-label":"Azure",children:o.jsx("path",{fill:"#00ABEC",d:"M3.65 14.2H16L9.35 2.68 7.33 8.24l3.88 4.63-7.56 1.33zM8.82 1.8L4.07 5.79 0 12.84h3.67v.01L8.82 1.8z"})})}function WR({className:e}){return o.jsx("svg",{viewBox:"0 0 210 305",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Groq",children:o.jsx("path",{d:"M105.3 0C47.7-.5.5 45.8 0 103.4c-.5 57.6 45.8 104.8 103.4 105.3h36.2v-39.1h-34.3c-36 .4-65.6-28.4-66-64.5-.4-36.1 28.4-65.6 64.5-66h1.5c36 0 65.2 29.2 65.4 65.2v96.1c0 35.7-29.1 64.8-64.7 65.2-17.1-.1-33.4-7-45.4-19.1l-27.7 27.7c19.2 19.3 45.2 30.3 72.4 30.5h1.4c56.9-.8 102.6-47 102.9-103.9v-99.1C208.2 45.2 161.9.1 105.3 0Z"})})}function eT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"xAI",children:o.jsx("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})})}function tT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Perplexity",children:o.jsx("path",{d:"M22.3977 7.0896h-2.3106V.0676l-7.5094 6.3542V.1577h-1.1554v6.1966L4.4904 0v7.0896H1.6023v10.3976h2.8882V24l6.932-6.3591v6.2005h1.1554v-6.0469l6.9318 6.1807v-6.4879h2.8882V7.0896zm-3.4657-4.531v4.531h-5.355l5.355-4.531zm-13.2862.0676 4.8691 4.4634H5.6458V2.6262zM2.7576 16.332V8.245h7.8476l-6.1149 6.1147v1.9723H2.7576zm2.8882 5.0404v-3.8852h.0001v-2.6488l5.7763-5.7764v7.0111l-5.7764 5.2993zm12.7086.0248-5.7766-5.1509V9.0618l5.7766 5.7766v6.5588zm2.8882-5.0652h-1.733v-1.9723L13.3948 8.245h7.8478v8.087z"})})}function nT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Mistral",children:[o.jsx("rect",{x:"1",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"9.5",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"18",y:"3",width:"5",height:"5",fill:"#F7D046"}),o.jsx("rect",{x:"1",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"5.5",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"13",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"18",y:"8",width:"5",height:"5",fill:"#F2A73B"}),o.jsx("rect",{x:"1",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"9.5",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"18",y:"13",width:"5",height:"5",fill:"#EE792F"}),o.jsx("rect",{x:"1",y:"16",width:"5",height:"5",fill:"currentColor"}),o.jsx("rect",{x:"18",y:"16",width:"5",height:"5",fill:"currentColor"})]})}function aT({className:e}){return o.jsxs("svg",{viewBox:"0 0 75 75",className:de("h-6 w-6",e),"aria-label":"Cohere",children:[o.jsx("path",{d:"M24.3 44.7c2 0 6-.1 11.6-2.4 6.5-2.7 19.3-7.5 28.6-12.5 6.5-3.5 9.3-8.1 9.3-14.3C73.8 7 66.9 0 58.3 0h-36C10 0 0 10 0 22.3s9.4 22.4 24.3 22.4z",fill:"#39594d",fillRule:"evenodd",clipRule:"evenodd"}),o.jsx("path",{d:"M30.4 60c0-6 3.6-11.5 9.2-13.8l11.3-4.7C62.4 36.8 75 45.2 75 57.6 75 67.2 67.2 75 57.6 75H45.3c-8.2 0-14.9-6.7-14.9-15z",fill:"#d18ee2",fillRule:"evenodd",clipRule:"evenodd"}),o.jsx("path",{d:"M12.9 47.6C5.8 47.6 0 53.4 0 60.5v1.7C0 69.2 5.8 75 12.9 75c7.1 0 12.9-5.8 12.9-12.9v-1.7c-.1-7-5.8-12.8-12.9-12.8z",fill:"#ff7759"})]})}function rT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"DeepSeek",children:o.jsx("path",{fill:"#4D6BFE",d:"M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 0 1-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 0 0-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 0 1-.465.137 9.597 9.597 0 0 0-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 0 0 1.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 0 1 1.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 0 1 .415-.287.302.302 0 0 1 .2.288.306.306 0 0 1-.31.307.303.303 0 0 1-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 0 1-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 0 1 .016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 0 1-.254-.078.253.253 0 0 1-.114-.358c.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"})})}function sT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Together AI",children:[o.jsx("path",{d:"M17.385 11.23a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm0 10.77a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23zm-10.77 0a4.615 4.615 0 100-9.23 4.615 4.615 0 000 9.23z",opacity:".2"}),o.jsx("circle",{cx:"6.615",cy:"6.615",r:"4.615"})]})}function iT({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:de("h-6 w-6",e),"aria-label":"Cerebras",children:[o.jsx("path",{d:"M14.121 2.701a9.299 9.299 0 000 18.598V22.7c-5.91 0-10.7-4.791-10.7-10.701S8.21 1.299 14.12 1.299V2.7zm4.752 3.677A7.353 7.353 0 109.42 17.643l-.901 1.074a8.754 8.754 0 01-1.08-12.334 8.755 8.755 0 0112.335-1.08l-.901 1.075zm-2.255.844a5.407 5.407 0 00-5.048 9.563l-.656 1.24a6.81 6.81 0 016.358-12.043l-.654 1.24zM14.12 8.539a3.46 3.46 0 100 6.922v1.402a4.863 4.863 0 010-9.726v1.402z"}),o.jsx("path",{d:"M15.407 10.836a2.24 2.24 0 00-.51-.409 1.084 1.084 0 00-.544-.152c-.255 0-.483.047-.684.14a1.58 1.58 0 00-.84.912c-.074.203-.11.416-.11.631 0 .218.036.43.11.631a1.594 1.594 0 00.84.913c.2.093.43.14.684.14.216 0 .417-.046.602-.135.188-.09.35-.225.475-.392l.928 1.006c-.14.14-.3.261-.482.363a3.367 3.367 0 01-1.083.38c-.17.026-.317.04-.44.04a3.315 3.315 0 01-1.182-.21 2.825 2.825 0 01-.961-.597 2.816 2.816 0 01-.644-.929 2.987 2.987 0 01-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315 3.315 0 011.182-.21c.355 0 .712.068 1.072.204.361.138.685.36.944.649l-.962.97z"})]})}function lT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",className:de("h-6 w-6",e),"aria-label":"Fireworks",children:o.jsx("path",{d:"M14.8 5l-2.801 6.795L9.195 5H7.397l3.072 7.428a1.64 1.64 0 003.038.002L16.598 5H14.8zm1.196 10.352l5.124-5.244-.699-1.669-5.596 5.739a1.664 1.664 0 00-.343 1.807 1.642 1.642 0 001.516 1.012L16 17l8-.02-.699-1.669-7.303.041h-.002zM2.88 10.104l.699-1.669 5.596 5.739c.468.479.603 1.189.343 1.807a1.643 1.643 0 01-1.516 1.012l-8-.018-.002.002.699-1.669 7.303.042-5.122-5.246z"})})}function oT({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"GitHub Copilot",children:o.jsx("path",{d:"M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"})})}function dM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"AWS Bedrock",children:o.jsx("path",{d:"M12 2L2 7v10l10 5 10-5V7L12 2zm0 2.18l7.12 3.56L12 11.3 4.88 7.74 12 4.18zM4 8.96l7 3.5v7.58l-7-3.5V8.96zm9 11.08V12.46l7-3.5v7.58l-7 3.5z"})})}function fM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Zhipu AI",children:o.jsx("path",{d:"M4 4h16v3.2H9.6L20 17.6V20H4v-3.2h10.4L4 6.4V4z"})})}function hM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Moonshot AI",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.49 5-1.35-1.59-1.34-2.6-3.34-2.6-5.58 0-3.87 3.01-7.02 6.8-7.26A9.96 9.96 0 0 0 12 2z"})})}function mM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Qwen",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 17c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm2-4l3 3-1.41 1.41L12 15.83l-1.59 1.58L9 16l3-3z"})})}function pM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Replicate",children:o.jsx("path",{d:"M.672 0v24H4.77V8.295h13.236V4.2H4.77V0zm18.46 8.295v4.098H5.896v3.762h13.236v4.058H5.896V24h18.108V8.295z"})})}function vM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"GitHub Models",children:o.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}function gM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Volcengine",children:o.jsx("path",{d:"M12 2L3 7.5v9L12 22l9-5.5v-9L12 2zm0 2.5l6.5 4v7.5L12 19.5 5.5 16V8.5L12 4.5z"})})}function yM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Qianfan",children:o.jsx("path",{d:"M19.35 10.04A7.49 7.49 0 0 0 12 4C9.11 4 6.6 5.64 5.35 8.04A5.994 5.994 0 0 0 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"})})}function xM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Minimax",children:o.jsx("path",{d:"M2 4h4v16H2V4zm5 0h3l3 8 3-8h3v16h-4V11l-2 5h-2l-2-5v9H7V4z"})})}function bM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"HuggingFace",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-3l-2 1v-5l2 1V7.5l4 2v1l2-1v5l-2-1v3l-4-2z"})})}function wM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"NVIDIA NIM",children:o.jsx("path",{d:"M4 3h2.5l7 12V3H16v18h-2.5L6.5 9v12H4V3zm11 0h5v2h-3v5h3v2h-3v7h-2V3z"})})}function SM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Venice AI",children:o.jsx("path",{d:"M2 14c1.5 0 2.5-1 4-1s2.5 1 4 1 2.5-1 4-1 2.5 1 4 1v2c-1.5 0-2.5-1-4-1s-2.5 1-4 1-2.5-1-4-1-2.5 1-4 1v-2zm2-7l2 3h2L5 6l6 8h2L7 5h3l4 9h2l-5-11H4v1l.2-.7L4 7z"})})}function jM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Kilocode",children:o.jsx("path",{d:"M8 3L4 12l4 9H6L2 12l4-9h2zm8 0h2l4 9-4 9h-2l4-9-4-9zm-4 4l-2 5 2 5h-2l-2-5 2-5h2z"})})}function EM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Vercel AI",children:o.jsx("path",{d:"M24 22.525H0L12.508 1.375z"})})}function NM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Cloudflare AI",children:o.jsx("path",{fill:"#F38020",d:"M16.5 14.5c.2-.7.1-1.3-.2-1.8-.3-.4-.8-.7-1.4-.8l-7.3-.1c-.1 0-.1 0-.2-.1 0-.1 0-.1.1-.2.2-.4.7-.7 1.2-.7h.1c.4-1.8 1.9-3.1 3.8-3.1 1.5 0 2.8.8 3.5 2 .2 0 .4-.1.6-.1 1.4 0 2.5 1.1 2.5 2.5 0 .2 0 .3-.1.5h.2c1.1 0 2 .9 2 2s-.9 2-2 2H8c-1.4 0-2.5-1.1-2.5-2.5 0-1.3 1-2.4 2.3-2.5l8.7.9z"})})}function CM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"IBM Watsonx",children:o.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.93 0 3.68.79 4.95 2.05L5.05 16.95A6.973 6.973 0 0 1 5 15c0-3.87 3.13-7 7-7zm0 14c-1.93 0-3.68-.79-4.95-2.05l11.9-11.9C18.21 6.32 19 8.07 19 10c0 3.87-3.13 7-7 7z"})})}function AM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"BytePlus",children:o.jsx("path",{d:"M4 3h7.5c2.5 0 4 1.2 4 3.2 0 1.3-.7 2.3-1.8 2.8 1.4.4 2.3 1.6 2.3 3.1C16 14.5 14.3 16 11.5 16H4V3zm3 2.5v3h3.5c1 0 1.5-.6 1.5-1.5S11.5 5.5 10.5 5.5H7zm0 5.5v3.5h4c1.1 0 1.7-.7 1.7-1.75S12.1 11 11 11H7zm9 3l2 2-2 2h2l2-2-2-2h-2z"})})}function RM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Xiaomi",children:o.jsx("path",{d:"M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2zm2 4v8h2V8H6zm4 0v8h2v-5l3 5h2V8h-2v5l-3-5h-2z"})})}function TM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"ModelStudio",children:o.jsx("path",{d:"M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"})})}function MM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Telegram",children:o.jsx("path",{d:"M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"})})}function kM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Discord",children:o.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}function OM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"WhatsApp",children:o.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})}function _M({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Slack",children:[o.jsx("path",{fill:"#E01E5A",d:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313z"}),o.jsx("path",{fill:"#36C5F0",d:"M8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312z"}),o.jsx("path",{fill:"#2EB67D",d:"M18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312z"}),o.jsx("path",{fill:"#ECB22E",d:"M15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"})]})}function DM({className:e}){return o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Matrix",children:o.jsx("path",{d:"M.632.55v22.9H2.28V24H0V0h2.28v.55zm7.043 7.26v1.157h.033c.309-.443.683-.784 1.117-1.024.434-.24.927-.36 1.484-.36.544 0 1.032.104 1.468.313.436.209.765.61.989 1.204.308-.507.703-.895 1.185-1.164.483-.27 1.017-.404 1.598-.404.435 0 .842.06 1.218.18.375.121.693.31.952.57.259.259.46.588.601.987.142.399.214.87.214 1.413v6.163h-2.214v-5.269c0-.318-.012-.616-.036-.894-.023-.278-.09-.524-.197-.739a1.11 1.11 0 0 0-.432-.499c-.196-.125-.463-.187-.799-.187-.339 0-.616.073-.831.22-.216.148-.383.34-.497.581a2.37 2.37 0 0 0-.233.762c-.036.284-.054.571-.054.862v5.163h-2.212v-5.269c0-.291-.007-.574-.024-.851-.014-.277-.07-.524-.167-.743-.094-.219-.244-.394-.451-.527-.206-.134-.5-.201-.882-.201-.115 0-.259.03-.432.088-.174.058-.343.17-.508.337-.166.166-.31.406-.432.717-.122.312-.183.725-.183 1.24v5.009h-2.212V7.81zm17.042 14.94V.55h1.648V0H24v24h-2.635v-.55z"})})}function LM({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",className:de("h-6 w-6",e),"aria-label":"Google Chat",children:[o.jsx("path",{fill:"#00AC47",d:"M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10z",opacity:"0.2"}),o.jsx("path",{fill:"#00AC47",d:"M12.7 15.3H8.3c-.7 0-1.3-.6-1.3-1.3V9.6L3.1 6.4c-.2-.1-.1-.4.1-.4h13.5c.7 0 1.3.6 1.3 1.3V14c0 .7-.6 1.3-1.3 1.3z"}),o.jsx("path",{fill:"#00832D",d:"M12.7 15.3h4c.7 0 1.3-.6 1.3-1.3V7.3c0-.7-.6-1.3-1.3-1.3h-4v9.3z"}),o.jsx("path",{fill:"#2684FC",d:"M7 15.3V9.6l-3.9-3.2c-.2-.1-.1-.4.1-.4H7v9.3z"}),o.jsx("path",{fill:"#0066DA",d:"M12.7 6h-5.7v3.6l5.7 4.5V6z"})]})}function zM({className:e}){return o.jsxs("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:de("h-6 w-6",e),"aria-label":"Microsoft Teams",children:[o.jsx("path",{d:"M20.625 8.5h-3.75c-.345 0-.625.28-.625.625v6.25c0 .69.56 1.25 1.25 1.25h5c.69 0 1.25-.56 1.25-1.25v-4.375c0-1.38-1.12-2.5-2.5-2.5z",fill:"#5059C9",opacity:"0.7"}),o.jsx("circle",{cx:"19.5",cy:"5.5",r:"2",fill:"#5059C9",opacity:"0.7"}),o.jsx("circle",{cx:"14",cy:"4.5",r:"2.5",fill:"#7B83EB"}),o.jsx("path",{d:"M17.5 8.5H9.125C8.504 8.5 8 9.004 8 9.625V17c0 2.21 1.79 4 4 4s4-1.79 4-4v-1h1.5c.828 0 1.5-.672 1.5-1.5v-4.5c0-.828-.672-1.5-1.5-1.5z",fill:"#7B83EB"}),o.jsx("path",{d:"M13.5 8.5H8v8.5c0 2.21 1.79 4 4 4 .53 0 1.036-.104 1.5-.293V9.625c0-.621-.504-1.125-1.125-1.125H13.5z",fill:"#4B53BC"})]})}const wh=8,Gl=[{id:"anthropic",name:"Anthropic",desc:"Claude",color:"#cc785c",Logo:YR,keyPlaceholder:"sk-ant-...",keyUrl:"https://console.anthropic.com/"},{id:"openai",name:"OpenAI",desc:"GPT & o-series",color:"#10a37f",Logo:KR,keyPlaceholder:"sk-...",keyUrl:"https://platform.openai.com/api-keys"},{id:"google",name:"Google",desc:"Gemini",color:"#4285F4",Logo:QR,keyPlaceholder:"AIza...",keyUrl:"https://aistudio.google.com/apikey"},{id:"groq",name:"Groq",desc:"Ultra-fast",color:"#f55036",Logo:WR,keyPlaceholder:"gsk_...",keyUrl:"https://console.groq.com/keys"},{id:"openrouter",name:"OpenRouter",desc:"Multi-provider",color:"#6366f1",Logo:XR,keyPlaceholder:"sk-or-...",keyUrl:"https://openrouter.ai/keys"},{id:"xai",name:"xAI",desc:"Grok",color:"#1d9bf0",Logo:eT,keyPlaceholder:"xai-...",keyUrl:"https://console.x.ai/"},{id:"deepseek",name:"DeepSeek",desc:"R1 & V3",color:"#4d6bfe",Logo:rT,keyPlaceholder:"sk-...",keyUrl:"https://platform.deepseek.com/api_keys"},{id:"ollama",name:"Ollama",desc:"Local models",color:"#808080",Logo:ZR,needsUrl:!0,keyUrl:"https://ollama.com/"},{id:"mistral",name:"Mistral",desc:"Mixtral",color:"#ee792f",Logo:nT,keyUrl:"https://console.mistral.ai/api-keys"},{id:"azure",name:"Azure",desc:"Azure OpenAI",color:"#00abec",Logo:JR,keyUrl:"https://portal.azure.com/"},{id:"perplexity",name:"Perplexity",desc:"Online LLMs",color:"#20808d",Logo:tT,keyPlaceholder:"pplx-...",keyUrl:"https://www.perplexity.ai/settings/api"},{id:"together",name:"Together",desc:"Open-source",color:"#6366f1",Logo:sT,keyUrl:"https://api.together.xyz/settings/api-keys"},{id:"cohere",name:"Cohere",desc:"Command",color:"#39594d",Logo:aT,keyUrl:"https://dashboard.cohere.com/api-keys"},{id:"fireworks",name:"Fireworks",desc:"Fast inference",color:"#ff6b35",Logo:lT,keyPlaceholder:"fw_...",keyUrl:"https://fireworks.ai/api-keys"},{id:"cerebras",name:"Cerebras",desc:"Wafer-scale",color:"#f15a29",Logo:iT,keyPlaceholder:"csk-...",keyUrl:"https://cloud.cerebras.ai/"},{id:"copilot",name:"Copilot",desc:"GitHub proxy",color:"#6e40c9",Logo:oT,keyUrl:"https://github.com/settings/copilot"}];function cT({data:e,onUpdate:a,path:s,onPathChange:i}){const{resolvedTheme:c}=lo(),u=c==="light"?"/brand/profclaw-wordmark-light.svg":"/brand/profclaw-wordmark-dark.svg";return o.jsx("div",{style:{animation:"oobe-fade-in 0.5s ease-out"},children:o.jsxs("div",{className:"grid md:grid-cols-2 gap-10 items-center",children:[o.jsxs("div",{className:"space-y-4 text-center md:text-left",children:[o.jsx("img",{src:u,alt:"profClaw",className:"h-20 mx-auto md:mx-0 drop-shadow-lg"}),o.jsx("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:"Welcome to profClaw"}),o.jsxs("p",{className:"text-[var(--muted-foreground)] text-[15px] leading-relaxed",children:["Your AI agent engine, running locally on your machine.",o.jsx("br",{}),o.jsx("span",{className:"text-[var(--muted-foreground)]/70",children:"Private. Fast. Yours."})]})]}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-2.5",children:[o.jsx("label",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"What should we call you?"}),o.jsx("input",{type:"text",className:"field-lg w-full text-base",placeholder:"Your name",value:e.name,onChange:f=>a({name:f.target.value}),autoFocus:!0})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("label",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--muted-foreground)]",children:"Setup experience"}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("button",{type:"button",onClick:()=>i("quick"),className:`group relative p-5 rounded-2xl text-left transition-all duration-300 ${s==="quick"?"glass-heavy brand-ring shadow-elevated":"glass hover:shadow-elevated hover:translate-y-[-2px]"}`,children:[o.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center mb-3 ${s==="quick"?"bg-gradient-to-br from-[#f43f5e]/20 to-[#ea580c]/10":"bg-[var(--muted)]/50"}`,children:o.jsx(vm,{className:`h-4 w-4 ${s==="quick"?"text-[#f43f5e]":"text-[var(--muted-foreground)]"}`})}),o.jsx("div",{className:"font-semibold text-sm",children:"Quick Setup"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1 leading-relaxed",children:"2 steps. Name + AI key."})]}),o.jsxs("button",{type:"button",onClick:()=>i("guided"),className:`group relative p-5 rounded-2xl text-left transition-all duration-300 ${s==="guided"?"glass-heavy brand-ring shadow-elevated":"glass hover:shadow-elevated hover:translate-y-[-2px]"}`,children:[o.jsx("div",{className:`w-8 h-8 rounded-xl flex items-center justify-center mb-3 ${s==="guided"?"bg-gradient-to-br from-[#f43f5e]/20 to-[#ea580c]/10":"bg-[var(--muted)]/50"}`,children:o.jsx(Z8,{className:`h-4 w-4 ${s==="guided"?"text-[#f43f5e]":"text-[var(--muted-foreground)]"}`})}),o.jsx("div",{className:"font-semibold text-sm",children:"Guided Setup"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1 leading-relaxed",children:"5 steps. GitHub, security."})]})]})]})]})]})})}function uT({data:e,onUpdate:a,onSkip:s,name:i}){const[c,u]=y.useState(!1),[f,m]=y.useState(null),[v,p]=y.useState(!1),[x,g]=y.useState(!1),w=e.aiProvider?.provider||"anthropic",S=e.aiProvider?.apiKey||"",N=e.aiProvider?.ollamaBaseUrl||"http://localhost:11434",j=Gl.find(U=>U.id===w),A=U=>{a({aiProvider:{provider:U,apiKey:"",ollamaBaseUrl:"http://localhost:11434"}}),m(null),Gl.findIndex(P=>P.id===U)>=wh&&g(!0)},R=U=>{a({aiProvider:{...e.aiProvider,provider:w,apiKey:U}}),m(null)},M=U=>{a({aiProvider:{provider:"ollama",ollamaBaseUrl:U}}),m(null)},_=async()=>{u(!0),m(null);try{const H=await(await fetch("/api/oobe/validate-ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:w,apiKey:S,ollamaBaseUrl:N})})).json();m({valid:H.valid,message:H.valid?H.message:H.error})}catch{m({valid:!1,message:"Connection failed"})}finally{u(!1)}};return o.jsxs("div",{style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1 mb-6",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["Nice to meet you, ",i||"friend","!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"Now let's pick an AI provider to power your agents. You can always change this later."})]}),o.jsxs("div",{className:"grid md:grid-cols-[1fr,1fr] gap-6 items-start",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"grid grid-cols-4 gap-2",children:(x?Gl:Gl.slice(0,wh)).map(U=>o.jsxs("button",{type:"button",onClick:()=>A(U.id),className:`flex flex-col items-center gap-1.5 p-3 rounded-xl text-center transition-all duration-200 ${w===U.id?"glass-heavy":"glass hover:shadow-soft hover:translate-y-[-1px]"}`,style:w===U.id?{boxShadow:`0 0 0 2px ${U.color}, 0 4px 16px ${U.color}25`}:void 0,children:[o.jsx("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center",style:{background:w===U.id?`${U.color}18`:"oklch(from var(--foreground) l c h / 0.05)"},children:o.jsx(U.Logo,{className:"h-[18px] w-[18px]",style:w===U.id?{color:U.color}:void 0})}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-xs leading-tight",children:U.name}),o.jsx("div",{className:"text-[10px] text-[var(--muted-foreground)] leading-tight",children:U.desc})]})]},U.id))}),o.jsx("button",{type:"button",onClick:()=>g(!x),className:"w-full text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors py-1.5",children:x?"Show less":`+${Gl.length-wh} more providers`})]}),o.jsxs("div",{className:"space-y-4 glass rounded-2xl p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[j&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:`${j.color}18`},children:o.jsx(j.Logo,{className:"h-4 w-4",style:{color:j.color}})}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-sm",children:j?.name}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)]",children:j?.desc})]})]}),j?.keyUrl&&o.jsxs("a",{href:j.keyUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-xs text-[var(--muted-foreground)] hover:text-[var(--foreground)] transition-colors",children:["Get key ",o.jsx(Ox,{className:"h-3 w-3"})]})]}),j?.needsUrl?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Ollama URL"}),o.jsx("input",{type:"text",className:"field-lg w-full",placeholder:"http://localhost:11434",value:N,onChange:U=>M(U.target.value)})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"API Key"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:v?"text":"password",className:"field-lg w-full pr-10",placeholder:j?.keyPlaceholder||"Enter API key...",value:S,onChange:U=>R(U.target.value)}),o.jsx("button",{type:"button",onClick:()=>p(!v),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:v?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]}),o.jsx("p",{className:"text-xs text-[var(--muted-foreground)]",children:"Your key doesn't leave your device."})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{type:"button",onClick:_,disabled:c||!j?.needsUrl&&!S,className:"btn-brand-outline flex-1 py-2.5 px-4 text-sm font-medium disabled:opacity-40",children:c?o.jsxs("span",{className:"flex items-center justify-center gap-2",children:[o.jsx(Pa,{className:"h-4 w-4 animate-spin"})," Testing..."]}):"Test Connection"}),o.jsx("button",{type:"button",onClick:s,className:"btn-ghost py-2.5 px-4 text-sm text-[var(--muted-foreground)]",children:"Skip for now"})]}),f&&o.jsxs("div",{className:`flex items-start gap-2 p-3 rounded-xl text-sm ${f.valid?"bg-[hsl(var(--success)/0.1)] text-[hsl(var(--success))]":"bg-[hsl(var(--destructive)/0.1)] text-[hsl(var(--destructive))]"}`,children:[f.valid?o.jsx(Bt,{className:"h-4 w-4 mt-0.5 shrink-0"}):o.jsx(Us,{className:"h-4 w-4 mt-0.5 shrink-0"}),o.jsx("span",{children:f.message})]})]})]})]})}function dT({data:e,onUpdate:a,name:s}){const i=e.github?.clientId||"",c=e.github?.clientSecret||"",[u,f]=y.useState(!1);return o.jsxs("div",{className:"space-y-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading",children:["Connect GitHub, ",s||"friend","?"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"Optional. Enables GitHub login and repository access for your agents."})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Client ID"}),o.jsx("input",{type:"text",className:"field-lg w-full",placeholder:"Your GitHub OAuth App Client ID",value:i,onChange:m=>a({github:{clientId:m.target.value,clientSecret:c}})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Client Secret"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:u?"text":"password",className:"field-lg w-full pr-10",placeholder:"Your GitHub OAuth App Client Secret",value:c,onChange:m=>a({github:{clientId:i,clientSecret:m.target.value}})}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:u?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]})]}),o.jsx("p",{className:"text-xs text-[var(--muted-foreground)] text-center",children:"You can skip this and configure it later in Settings."})]})}function fT({data:e,onUpdate:a,name:s}){const[i,c]=y.useState(!1),[u,f]=y.useState(!1),m=e.multiUser?.email||"",v=e.multiUser?.password||"";return o.jsxs("div",{className:"space-y-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["Almost there, ",s||"friend","!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-sm",children:"By default, profClaw runs in single-user local mode - no login required. Want to share it?"})]}),o.jsx("button",{type:"button",onClick:()=>{c(!i),i&&a({multiUser:void 0})},className:`w-full p-4 rounded-2xl text-left transition-all duration-300 ${i?"glass-heavy brand-ring":"glass hover:shadow-soft"}`,children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold text-sm",children:"Enable Multi-User Auth"}),o.jsx("div",{className:"text-xs text-[var(--muted-foreground)] mt-1",children:"Require login with email and password"})]}),o.jsx("div",{className:`w-10 h-6 rounded-full transition-colors duration-200 flex items-center ${i?"bg-[#e11d48] justify-end":"bg-[var(--muted)] justify-start"}`,children:o.jsx("div",{className:"w-5 h-5 rounded-full bg-white mx-0.5 shadow-sm"})})]})}),i&&o.jsxs("div",{className:"space-y-4",style:{animation:"oobe-fade-in 0.3s ease-out"},children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Email"}),o.jsx("input",{type:"email",className:"field-lg w-full",placeholder:"admin@example.com",value:m,onChange:p=>a({multiUser:{email:p.target.value,password:v}})})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Password"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:u?"text":"password",className:"field-lg w-full pr-10",placeholder:"Min 8 characters",value:v,onChange:p=>a({multiUser:{email:m,password:p.target.value}})}),o.jsx("button",{type:"button",onClick:()=>f(!u),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[var(--muted-foreground)] hover:text-[var(--foreground)]",children:u?o.jsx(Jr,{className:"h-4 w-4"}):o.jsx(Wr,{className:"h-4 w-4"})})]})]})]})]})}function hT({name:e}){return o.jsxs("div",{className:"space-y-8 text-center py-6 max-w-lg mx-auto",style:{animation:"oobe-fade-in 0.5s ease-out"},children:[o.jsxs("div",{className:"relative mx-auto w-20 h-20",children:[o.jsx("div",{className:"absolute inset-0 rounded-full",style:{animation:"oobe-check 0.6s ease-out 0.1s both",background:"linear-gradient(135deg, oklch(from #e11d48 l c h / 0.08), oklch(from #ea580c l c h / 0.05))",boxShadow:"0 0 40px oklch(from #e11d48 l c h / 0.15)"}}),o.jsx("div",{className:"absolute inset-2 rounded-full flex items-center justify-center",style:{animation:"oobe-check 0.6s ease-out 0.3s both",background:"linear-gradient(135deg, oklch(from #e11d48 l c h / 0.2), oklch(from #ea580c l c h / 0.12))"},children:o.jsx(Bt,{className:"h-8 w-8 text-[#f43f5e]",strokeWidth:3})})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("h2",{className:"text-2xl font-bold tracking-tight font-heading heading-brand-glow",children:["You're all set, ",e,"!"]}),o.jsx("p",{className:"text-[var(--muted-foreground)] text-[15px] max-w-sm mx-auto leading-relaxed",children:"profClaw is configured and ready to go. Your AI agents are standing by."})]}),o.jsxs("div",{className:"flex items-center justify-center gap-6 text-xs text-[var(--muted-foreground)]",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Local-first"]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Private"]}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[hsl(var(--success))]"}),"Ready"]})]})]})}function mT(){const{theme:e,setTheme:a}=lo(),s=[{id:"light",icon:ou,label:"Light"},{id:"dark",icon:Kl,label:"Dark"},{id:"midnight",icon:sE,label:"Midnight"}];return o.jsx("div",{className:"flex items-center gap-0.5 p-1 rounded-full glass",children:s.map(({id:i,icon:c,label:u})=>o.jsx("button",{type:"button",onClick:()=>a(i),title:u,className:`p-1.5 rounded-full transition-all duration-200 ${e===i?"bg-[var(--foreground)] text-[var(--background)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"}`,children:o.jsx(c,{className:"h-3.5 w-3.5"})},i))})}const pT={welcome:"Profile","ai-provider":"AI Provider",github:"GitHub",security:"Security",complete:"Done"};function vT({steps:e,current:a}){return o.jsx("div",{className:"flex items-center gap-1",children:e.map((s,i)=>{const c=i===a,u=i<a,f=i===e.length-1;return o.jsxs("div",{className:"flex items-center",children:[o.jsxs("div",{className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full transition-all duration-300 ${c?"bg-gradient-to-r from-[#e11d48]/15 to-[#ea580c]/10":u?"opacity-60":"opacity-30"}`,children:[o.jsx("div",{className:`flex items-center justify-center rounded-full transition-all duration-300 ${c?"w-5 h-5 brand-dot":u?"w-5 h-5 bg-[#e11d48]/40":"w-5 h-5 border-2 border-[var(--muted-foreground)]/20"}`,children:u?o.jsx(Bt,{className:"h-3 w-3 text-white",strokeWidth:3}):o.jsx("span",{className:`text-[10px] font-bold ${c?"text-white":"text-[var(--muted-foreground)]/50"}`,children:i+1})}),o.jsx("span",{className:`text-xs font-medium transition-all duration-300 ${c?"text-[var(--foreground)]":"text-[var(--muted-foreground)]"}`,children:pT[s]||s})]}),!f&&o.jsx("div",{className:`w-6 h-px mx-0.5 transition-colors duration-300 ${u?"bg-[#e11d48]/30":"bg-[var(--muted-foreground)]/10"}`})]},s)})})}function gT(){const[e,a]=y.useState("quick"),[s,i]=y.useState(0),[c,u]=y.useState({name:""}),[f,m]=y.useState(!1),[v,p]=y.useState(null),x=y.useCallback(P=>{u(E=>({...E,...P})),p(null)},[]),g=e==="quick"?["welcome","ai-provider","complete"]:["welcome","ai-provider","github","security","complete"],w=g.length,S=g[s],N=s===w-2,j=S==="complete",A=()=>{switch(S){case"welcome":return c.name.trim().length>0;case"ai-provider":return!c.aiProvider||c.aiProvider.provider==="ollama"?!0:!!c.aiProvider.apiKey;case"github":return!0;case"security":return c.multiUser?c.multiUser.email.includes("@")&&c.multiUser.password.length>=8:!0;default:return!0}},R=async()=>{m(!0),p(null);try{const P=await fetch("/api/oobe/setup",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({name:c.name.trim(),avatarUrl:c.avatarUrl,aiProvider:c.aiProvider})});if(!P.ok){const E=await P.json();throw new Error(E.error||"Setup failed")}if(c.github?.clientId&&c.github?.clientSecret&&await fetch("/api/setup/github-oauth",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({clientId:c.github.clientId,clientSecret:c.github.clientSecret})}),c.multiUser?.email&&c.multiUser?.password){const E=await fetch("/api/oobe/enable-multiuser",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:c.multiUser.email,password:c.multiUser.password})});if(!E.ok){const z=await E.json();throw new Error(z.error||"Failed to enable multi-user")}}i(w-1)}catch(P){p(P instanceof Error?P.message:"Setup failed")}finally{m(!1)}},M=async()=>{N?await R():i(P=>Math.min(P+1,w-1))},_=async()=>{u(P=>({...P,aiProvider:void 0})),N?await R():i(P=>P+1)},U=()=>{i(P=>Math.max(P-1,0))},H=()=>{window.location.href="/"};return o.jsxs("div",{className:"min-h-screen flex items-center justify-center p-6 relative overflow-hidden",children:[o.jsx(IR,{}),o.jsxs("div",{className:"relative z-10 w-full max-w-5xl min-h-[70vh] flex flex-col rounded-[3rem]",style:{animation:"oobe-scale-in 0.6s cubic-bezier(0.16, 1, 0.3, 1)",background:"color-mix(in srgb, hsl(var(--card)), transparent 12%)",backdropFilter:"blur(60px) saturate(200%)",WebkitBackdropFilter:"blur(60px) saturate(200%)",border:"none",boxShadow:["0 0 0 1px oklch(1 0 0 / 0.06) inset","0 1px 1px 0 oklch(1 0 0 / 0.1) inset","0 24px 80px -12px oklch(0 0 0 / 0.25)","0 8px 32px -8px oklch(from #e11d48 l c h / 0.08)"].join(", ")},children:[o.jsxs("div",{className:"flex items-center justify-between px-8 py-5 rounded-t-[3rem]",style:{borderBottom:"1px solid oklch(1 0 0 / 0.06)"},children:[o.jsx("div",{className:"w-24"}),j?o.jsx("div",{}):o.jsx(vT,{steps:g,current:s}),o.jsx("div",{className:"w-24 flex justify-end",children:o.jsx(mT,{})})]}),o.jsxs("div",{className:"flex-1 flex flex-col justify-center px-12 py-8 w-full",children:[S==="welcome"&&o.jsx(cT,{data:c,onUpdate:x,path:e,onPathChange:a}),S==="ai-provider"&&o.jsx(uT,{data:c,onUpdate:x,onSkip:_,name:c.name.trim()}),S==="github"&&o.jsx(dT,{data:c,onUpdate:x,name:c.name.trim()}),S==="security"&&o.jsx(fT,{data:c,onUpdate:x,name:c.name.trim()}),S==="complete"&&o.jsx(hT,{name:c.name})]}),v&&o.jsxs("div",{className:"flex items-center gap-2 p-3 rounded-xl bg-[hsl(var(--destructive)/0.1)] text-[hsl(var(--destructive))] text-sm max-w-lg mx-auto w-full px-12",children:[o.jsx(Us,{className:"h-4 w-4 shrink-0"}),o.jsx("span",{children:v})]}),o.jsxs("div",{className:"flex items-center justify-between px-12 py-6 rounded-b-[3rem]",style:{borderTop:"1px solid oklch(1 0 0 / 0.06)"},children:[s>0&&!j?o.jsxs("button",{type:"button",onClick:U,className:"btn-ghost py-2.5 px-4 text-sm flex items-center gap-1",children:[o.jsx(Rx,{className:"h-4 w-4"})," Back"]}):o.jsx("div",{className:"w-24"}),j?o.jsxs("button",{type:"button",onClick:H,className:"btn-brand py-2.5 px-8 text-sm flex items-center gap-2",children:["Go to Dashboard ",o.jsx(su,{className:"h-4 w-4"})]}):o.jsx("button",{type:"button",onClick:M,disabled:!A()||f,className:"btn-brand py-2.5 px-8 text-sm flex items-center gap-2 disabled:opacity-40",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Pa,{className:"h-4 w-4 animate-spin"})," Setting up..."]}):N?o.jsxs(o.Fragment,{children:["Complete Setup ",o.jsx(Bt,{className:"h-4 w-4"})]}):o.jsxs(o.Fragment,{children:["Continue ",o.jsx(su,{className:"h-4 w-4"})]})})]})]})]})}const Vb=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("premium-card rounded-2xl transition-all duration-300",e),...a}));Vb.displayName="Card";const yT=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("flex flex-col space-y-1.5 p-6",e),...a}));yT.displayName="CardHeader";const xT=y.forwardRef(({className:e,...a},s)=>o.jsx("h3",{ref:s,className:de("text-2xl font-semibold leading-none tracking-tight",e),...a}));xT.displayName="CardTitle";const bT=y.forwardRef(({className:e,...a},s)=>o.jsx("p",{ref:s,className:de("text-sm text-[var(--muted-foreground)]",e),...a}));bT.displayName="CardDescription";const wT=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("p-6 pt-0",e),...a}));wT.displayName="CardContent";const ST=y.forwardRef(({className:e,...a},s)=>o.jsx("div",{ref:s,className:de("flex items-center p-6 pt-0",e),...a}));ST.displayName="CardFooter";const jT=[{icon:Zr,title:"AI-Powered Task Routing",description:"Automatically route tasks to the right AI agent based on complexity and requirements."},{icon:vm,title:"Multi-Agent Orchestration",description:"Coordinate OpenClaw, Claude Code, and other agents for complex workflows."},{icon:lu,title:"Secure & Auditable",description:"Full audit trail of all AI actions with approval workflows for sensitive operations."}];function ET(){const e=oa(),{refetch:a}=br(),[s,i]=y.useState(!1),c=hr({mutationFn:async()=>{const f=await fetch("/api/users/me/complete-onboarding",{method:"POST",credentials:"include"});if(!f.ok)throw new Error("Failed to complete onboarding");return f.json()},onSuccess:async()=>{await a(),Dt.success("Welcome to profClaw!"),e("/")},onError:()=>{Dt.error("Something went wrong. Please try again."),i(!1)}}),u=()=>{i(!0),c.mutate()};return o.jsx("div",{className:"min-h-screen bg-gradient-to-br from-background via-background to-primary/5 flex items-center justify-center p-4",children:o.jsxs(Vb,{className:"max-w-2xl w-full p-8 shadow-xl border-border/50",children:[o.jsxs("div",{className:"text-center mb-8",children:[o.jsx("div",{className:"flex justify-center mb-6",children:o.jsx("div",{className:"h-16 w-16 rounded-2xl bg-gradient-to-br from-primary to-primary/60 flex items-center justify-center shadow-lg",children:o.jsx(Ba,{className:"h-10 w-10 text-primary-foreground"})})}),o.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Welcome to profClaw"}),o.jsx("p",{className:"text-muted-foreground text-lg",children:"Your AI agent orchestration platform is ready. Here's what you can do:"})]}),o.jsx("div",{className:"space-y-4 mb-8",children:jT.map((f,m)=>o.jsxs("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-muted/30 border border-border/50",children:[o.jsx("div",{className:"h-10 w-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:o.jsx(f.icon,{className:"h-5 w-5 text-primary"})}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold mb-1",children:f.title}),o.jsx("p",{className:"text-sm text-muted-foreground",children:f.description})]})]},m))}),o.jsxs("div",{className:"space-y-4",children:[o.jsx(dt,{size:"lg",onClick:u,disabled:s,className:"w-full rounded-xl h-12 text-base",children:s?o.jsxs(o.Fragment,{children:[o.jsx(Pa,{className:"h-5 w-5 mr-2 animate-spin"}),"Setting up your workspace..."]}):o.jsxs(o.Fragment,{children:["Get Started",o.jsx(ga,{className:"h-5 w-5 ml-2"})]})}),o.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"You can always revisit settings to configure integrations and preferences."})]}),o.jsx("div",{className:"mt-8 pt-6 border-t border-border",children:o.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[o.jsx(Lh,{className:"h-4 w-4 text-green-500"}),o.jsx("span",{children:"Your account is ready"})]})})]})})}const NT=y.lazy(()=>vt(()=>import("./AnalyticsDashboard-C9R97dXE.js"),__vite__mapDeps([11,12,13,14,15,16])).then(e=>({default:e.AnalyticsDashboard}))),CT=y.lazy(()=>vt(()=>import("./TaskList-DL7brQKd.js"),__vite__mapDeps([17,12,18,19,20,21,22,23,24,25])).then(e=>({default:e.TaskList}))),AT=y.lazy(()=>vt(()=>import("./TaskDetail-CV6CzbOS.js"),__vite__mapDeps([26,27,28,29,23,30,31])).then(e=>({default:e.TaskDetail}))),RT=y.lazy(()=>vt(()=>import("./SummaryList-B6kXiTxL.js"),__vite__mapDeps([32,12,18,19,3])).then(e=>({default:e.SummaryList}))),TT=y.lazy(()=>vt(()=>import("./SummaryDetail-DV3AmONk.js"),__vite__mapDeps([33,12,34,35,3,36,37])).then(e=>({default:e.SummaryDetail}))),MT=y.lazy(()=>vt(()=>import("./AgentList-QVHeldPi.js"),__vite__mapDeps([38,27,3,39])).then(e=>({default:e.AgentList}))),gy=y.lazy(()=>vt(()=>import("./Settings-1kaf7VHE.js"),__vite__mapDeps([40,41,18,19,21,42,43,44,45,8,9,46,47,3,48,49,4,12,50,20,35,51,52,10,24,16,39,22,36,5,6,23,29,53,54,55])).then(e=>({default:e.Settings}))),kT=y.lazy(()=>vt(()=>import("./CostsDashboard-O4DCLy1i.js"),__vite__mapDeps([56,34,15,13,14])).then(e=>({default:e.CostsDashboard}))),OT=y.lazy(()=>vt(()=>import("./index-nS3EErDg.js"),__vite__mapDeps([57,12,34,27,36])).then(e=>({default:e.WebhookStatus}))),_T=y.lazy(()=>vt(()=>import("./index-BUmnwPQr.js"),__vite__mapDeps([58,12,34,10,19,4])).then(e=>({default:e.DLQDashboard}))),DT=y.lazy(()=>vt(()=>import("./index-BfF5G4Cw.js"),__vite__mapDeps([59,12,22,18,19,60,10,54,15])).then(e=>({default:e.GatewayDashboard}))),LT=y.lazy(()=>vt(()=>import("./TicketList-CsDAyQCL.js"),__vite__mapDeps([61,12,18,19,62,63,22,21,64,28,8,65,66,36,67,51,37,23,44,24])).then(e=>({default:e.TicketList}))),zT=y.lazy(()=>vt(()=>import("./TicketDetail-hnnYclpD.js"),__vite__mapDeps([68,12,22,18,19,21,50,62,44,64,28,36,49,69,4,16,52,6,31,8,5,67,23,30,37,51])).then(e=>({default:e.TicketDetail}))),UT=y.lazy(()=>vt(()=>import("./TicketBoard-CrkkFj7C.js"),__vite__mapDeps([70,71,2,51,67,63,22,12,21,18,19,64,28,8,65,66,36,37,23])).then(e=>({default:e.TicketBoard}))),PT=y.lazy(()=>vt(()=>import("./ChatView-qjZErlrp.js"),__vite__mapDeps([72,18,19,53,12,8,3,1,2,31,42,43,44,45,9,46,47,4,73,51,37,35,74,16,22,5,50,66,21,10,39,55])).then(e=>({default:e.ChatView}))),BT=y.lazy(()=>vt(()=>import("./ProjectList-BvUfVB6c.js"),__vite__mapDeps([75,21,73,37,76,45,9,47,60,41,18,19,12,20,53,44,36,25,49,77,4])).then(e=>({default:e.ProjectList}))),HT=y.lazy(()=>vt(()=>import("./ProjectDetail--gPfvATB.js"),__vite__mapDeps([78,76,45,9,47,37,73,21,22,62,30,13,15,71,2,74,67,25,51,24,43,23,7,10,79])).then(e=>({default:e.ProjectDetail}))),$T=y.lazy(()=>vt(()=>import("./index-C8N375c2.js"),__vite__mapDeps([80,50,6,9,47,77,10,69,49,31,23,4,44,48,21,43,36,65,16,46,35,30,37,15,24])).then(e=>({default:e.CronDashboard}))),qT=y.lazy(()=>vt(()=>import("./ActivityView-BeshZXmE.js"),__vite__mapDeps([81,12,34,18,19,4])).then(e=>({default:e.ActivityView}))),GT=y.lazy(()=>vt(()=>import("./UserManagement-BGFQyTSr.js"),__vite__mapDeps([82,50,10,25,55,4])).then(e=>({default:e.UserManagement}))),FT=y.lazy(()=>vt(()=>import("./InviteCodeManagement-LEoGqYeA.js"),__vite__mapDeps([83,50,47,25,4,10])).then(e=>({default:e.InviteCodeManagement}))),VT=y.lazy(()=>vt(()=>import("./index-CzMM3QOk.js"),[]).then(e=>({default:e.PrivacyPolicy}))),IT=y.lazy(()=>vt(()=>import("./index-CzMM3QOk.js"),[]).then(e=>({default:e.TermsOfService})));function pt({children:e}){return o.jsx(y.Suspense,{fallback:o.jsx(FR,{}),children:e})}const YT=uj([{path:"/login",element:o.jsx(vh,{children:o.jsx(rN,{})})},{path:"/signup",element:o.jsx(vh,{children:o.jsx(sN,{})})},{path:"/access-key",element:o.jsx(vh,{children:o.jsx(iN,{})})},{path:"/oobe",element:o.jsx(gT,{})},{path:"/setup",element:o.jsx(VR,{})},{path:"/privacy",element:o.jsx(pt,{children:o.jsx(VT,{})})},{path:"/terms",element:o.jsx(pt,{children:o.jsx(IT,{})})},{path:"/onboarding",element:o.jsx(St,{children:o.jsx(pt,{children:o.jsx(ET,{})})})},{path:"/",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(PT,{})})})})},{path:"/tasks",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(CT,{})})})})},{path:"/tasks/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(AT,{})})})})},{path:"/summaries",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(RT,{})})})})},{path:"/summaries/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(TT,{})})})})},{path:"/agents",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(MT,{})})})})},{path:"/costs",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(kT,{})})})})},{path:"/settings",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(gy,{})})})})},{path:"/settings/:section",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(gy,{})})})})},{path:"/webhooks",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(OT,{})})})})},{path:"/failed",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(_T,{})})})})},{path:"/gateway",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(DT,{})})})})},{path:"/tickets",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(LT,{})})})})},{path:"/tickets/board",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(UT,{})})})})},{path:"/tickets/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(zT,{})})})})},{path:"/chat",element:o.jsx(mr,{to:"/",replace:!0})},{path:"/analytics",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(NT,{})})})})},{path:"/projects",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(BT,{})})})})},{path:"/projects/:id",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(HT,{})})})})},{path:"/cron",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx($T,{})})})})},{path:"/activity",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(qT,{})})})})},{path:"/admin/users",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(GT,{})})})})},{path:"/admin/invite-codes",element:o.jsx(St,{children:o.jsx(At,{children:o.jsx(pt,{children:o.jsx(FT,{})})})})}]);function KT(){return o.jsx(jj,{router:YT})}function QT(){return o.jsx(R3,{position:"bottom-right",expand:!1,richColors:!1,closeButton:!0,duration:4e3,toastOptions:{className:"toast-glass",style:{padding:"12px 16px"}}})}const XT=[{title:"Navigation",shortcuts:[{keys:["Cmd","K"],description:"Open command palette"},{keys:["G","H"],description:"Go to Dashboard"},{keys:["G","T"],description:"Go to Tasks"},{keys:["G","S"],description:"Go to Summaries"},{keys:["G","A"],description:"Go to Agents"},{keys:["G","C"],description:"Go to Costs"}]},{title:"Actions",shortcuts:[{keys:["Cmd","N"],description:"Create new task"},{keys:["Cmd","/"],description:"Focus search"},{keys:["Cmd","Shift","T"],description:"Toggle theme"},{keys:["Cmd","Shift","V"],description:"Toggle Talk Mode"}]},{title:"General",shortcuts:[{keys:["?"],description:"Show keyboard shortcuts"},{keys:["Esc"],description:"Close modal / Cancel"},{keys:["Enter"],description:"Confirm / Submit"}]},{title:"Lists & Navigation",shortcuts:[{keys:["J"],description:"Next item"},{keys:["K"],description:"Previous item"},{keys:["Enter"],description:"Open selected item"}]}];function ZT(){const[e,a]=y.useState(!1);return y.useEffect(()=>{const s=i=>{if(i.key==="?"&&!i.metaKey&&!i.ctrlKey){const c=i.target;if(c.tagName==="INPUT"||c.tagName==="TEXTAREA"||c.isContentEditable)return;i.preventDefault(),a(!0)}i.key==="Escape"&&e&&a(!1)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e]),e?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 animate-in fade-in duration-200",onClick:()=>a(!1)}),o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:o.jsxs("div",{className:"glass-heavy rounded-[28px] w-full max-w-2xl max-h-[80vh] overflow-hidden border border-white/10 shadow-2xl animate-in zoom-in-95 fade-in duration-200",onClick:s=>s.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:o.jsx(gE,{className:"h-5 w-5 text-blue-400"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-xl font-bold",children:"Keyboard Shortcuts"}),o.jsx("p",{className:"text-xs text-muted-foreground",children:"Press ? anytime to show this"})]})]}),o.jsx("button",{onClick:()=>a(!1),className:"p-2 hover:bg-white/5 rounded-xl transition-colors",children:o.jsx(cu,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"p-6 overflow-y-auto max-h-[calc(80vh-100px)]",children:o.jsx("div",{className:"grid gap-6 md:grid-cols-2",children:XT.map(s=>o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mb-3",children:s.title}),o.jsx("div",{className:"space-y-2",children:s.shortcuts.map((i,c)=>o.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg hover:bg-white/5 transition-colors",children:[o.jsx("span",{className:"text-sm text-muted-foreground",children:i.description}),o.jsx("div",{className:"flex items-center gap-1",children:i.keys.map((u,f)=>o.jsxs("span",{children:[o.jsx("kbd",{className:de("px-2 py-1 text-[11px] font-bold rounded-lg","bg-white/5 border border-white/10","shadow-[0_2px_0_0_rgba(255,255,255,0.05)]"),children:u==="Cmd"?"⌘":u}),f<i.keys.length-1&&o.jsx("span",{className:"text-muted-foreground/40 mx-0.5",children:"+"})]},f))})]},c))})]},s.title))})}),o.jsx("div",{className:"p-4 border-t border-white/5 bg-white/[0.02]",children:o.jsxs("p",{className:"text-center text-xs text-muted-foreground",children:["Press ",o.jsx("kbd",{className:"px-1.5 py-0.5 text-[10px] font-bold rounded bg-white/5 border border-white/10",children:"Esc"})," to close"]})})]})})]}):null}class JT extends y.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,s){console.error("[ErrorBoundary] Uncaught error:",a,s.componentStack)}handleReload=()=>{window.location.reload()};handleReset=()=>{this.setState({hasError:!1,error:null})};render(){return this.state.hasError?o.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background p-6",children:o.jsx("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-8 shadow-lg",children:o.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[o.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-destructive/10",children:o.jsx(to,{className:"h-6 w-6 text-destructive"})}),o.jsx("h2",{className:"text-lg font-semibold",children:"Something went wrong"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"An unexpected error occurred. You can try reloading the page or resetting the app state."}),this.state.error&&o.jsx("pre",{className:"mt-2 max-h-32 w-full overflow-auto rounded-md bg-muted p-3 text-left text-xs text-muted-foreground",children:this.state.error.message}),o.jsxs("div",{className:"mt-4 flex gap-3",children:[o.jsx("button",{type:"button",onClick:this.handleReset,className:"inline-flex items-center gap-2 rounded-md border border-border bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-muted",children:"Try again"}),o.jsxs("button",{type:"button",onClick:this.handleReload,className:"inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",children:[o.jsx(LE,{className:"h-4 w-4"}),"Reload"]})]})]})})}):this.props.children}}function WT(){return o.jsx(JT,{children:o.jsxs(NA,{children:[o.jsx(KT,{}),o.jsx(QT,{}),o.jsx(DR,{}),o.jsx(ZT,{})]})})}l4.createRoot(document.getElementById("root")).render(o.jsx(y.StrictMode,{children:o.jsx(WT,{})}));export{eo as $,ga as A,fm as B,V8 as C,_u as D,nM as E,dE as F,_1 as G,UE as H,aa as I,Ox as J,Lx as K,Pa as L,M8 as M,_x as N,Bt as O,_E as P,Li as Q,LE as R,Zr as S,VE as T,to as U,qs as V,ou as W,cu as X,Kl as Y,vm as Z,lu as _,pm as a,TM as a$,Jr as a0,Wr as a1,CE as a2,aE as a3,gE as a4,Ax as a5,MM as a6,kM as a7,OM as a8,_M as a9,TE as aA,YR as aB,KR as aC,JR as aD,QR as aE,eT as aF,WR as aG,rT as aH,XR as aI,ZR as aJ,ru as aK,nT as aL,aT as aM,tT as aN,sT as aO,iT as aP,lT as aQ,pM as aR,vM as aS,fM as aT,hM as aU,mM as aV,dM as aW,oT as aX,gM as aY,AM as aZ,yM as a_,DM as aa,LM as ab,zM as ac,zx as ad,D8 as ae,mm as af,lo as ag,Gb as ah,pE as ai,ZE as aj,Lh as ak,ux as al,bT as am,KE as an,ym as ao,Ht as ap,ra as aq,qe as ar,ss as as,an as at,es as au,Vi as av,Oa as aw,Ba as ax,hm as ay,kE as az,Vb as b,xM as b0,RM as b1,bM as b2,wM as b3,SM as b4,jM as b5,EM as b6,NM as b7,CM as b8,KC as b9,uM as bA,oM as bB,cM as bC,YA as bD,KA as bE,lM as bF,Hx as bG,vr as bH,Ej as bI,tE as bJ,sM as bK,iM as bL,h8 as bM,la as bN,Mx as bO,eM as bP,$x as ba,x7 as bb,b7 as bc,p2 as bd,Rx as be,t7 as bf,n7 as bg,Tm as bh,s2 as bi,xm as bj,a7 as bk,aM as bl,r7 as bm,he as bn,Ql as bo,yy as bp,Kh as bq,bu as br,xu as bs,w2 as bt,Mm as bu,no as bv,Fx as bw,bm as bx,IA as by,QA as bz,ke as c,yT as d,xT as e,wT as f,Tx as g,Ft as h,de as i,o as j,dt as k,su as l,zi as m,oo as n,hr as o,ya as p,gj as q,y as r,oa as s,Dt as t,pr as u,Us as v,iu as w,Du as x,Lu as y,un as z};
|