sqlbot 0.0.1 → 0.0.12
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(chat)/ai-providers/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/ai-providers/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/chart/[chartId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/chart/[chartId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/chat/[threadId]/page.js +2 -2
- package/.next/standalone/.next/server/app/(chat)/chat/[threadId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/chat/[threadId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/connections/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/connections/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/knowledge-base/page.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/knowledge-base/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/knowledge-base/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/page.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(chat)/query-editor/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(chat)/query-editor/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/ai-providers.html +1 -1
- package/.next/standalone/.next/server/app/ai-providers.rsc +4 -4
- package/.next/standalone/.next/server/app/ai-providers.segments/!KGNoYXQp/ai-providers/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/ai-providers.segments/!KGNoYXQp/ai-providers.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/ai-providers.segments/!KGNoYXQp.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/ai-providers.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/ai-providers.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/ai-providers.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/health/route.js +1 -1
- package/.next/standalone/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/knowledge/auto-generate/route.js +1 -1
- package/.next/standalone/.next/server/app/api/knowledge/auto-generate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/knowledge/generate/route.js +1 -1
- package/.next/standalone/.next/server/app/api/knowledge/generate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/trpc/[trpc]/route.js +3 -3
- package/.next/standalone/.next/server/app/api/trpc/[trpc]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/connections.html +1 -1
- package/.next/standalone/.next/server/app/connections.rsc +4 -4
- package/.next/standalone/.next/server/app/connections.segments/!KGNoYXQp/connections/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/connections.segments/!KGNoYXQp/connections.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/connections.segments/!KGNoYXQp.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/connections.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/connections.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/connections.segments/_tree.segment.rsc +3 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1f49434f._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__51b79d66._.js → [root-of-the-server]__3a1fb665._.js} +6 -6
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__73947e32._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__747722f0._.js +85 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ca89cb1f._.js +85 -0
- package/.next/standalone/.next/server/chunks/_26ec1867._.js +30 -14
- package/.next/standalone/.next/server/chunks/_430c5305._.js +30 -14
- package/.next/standalone/.next/server/chunks/_44fa1f03._.js +1 -1
- package/.next/standalone/.next/server/chunks/_75b542e9._.js +3 -3
- package/.next/standalone/.next/server/chunks/_82e2d86b._.js +11 -11
- package/.next/standalone/.next/server/chunks/_c49f2a1f._.js +30 -14
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__d8a3f2e3._.js → [root-of-the-server]__1ad22765._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__2534236b._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__77c3448a._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__85abb029._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__d2e81be0._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_0ffd2d5e._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_119ae296._.js +31 -15
- package/.next/standalone/.next/server/chunks/ssr/_37f7f89d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_673cb560._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_6c7220e5._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_6ed755aa._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_776a746c._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_7f407fdd._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_837c4081._.js → _90b65f35._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_96c3d546._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_a4dce1b3._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_b427a73f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_bb34a863._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_d017f4d9._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_deb2246d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_e83447a6._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/src_components_connections_connections-page_tsx_a8fa3df0._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_components_knowledge-base_knowledge-base-page_tsx_10bf7f9a._.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/static/chunks/00ce465d0a58e73b.js +1 -0
- package/.next/standalone/.next/static/chunks/0492dc04de204ef8.js +5 -0
- package/.next/standalone/.next/static/chunks/17906a765ba90602.js +1 -0
- package/.next/standalone/.next/static/chunks/18344611f9149409.js +5 -0
- package/.next/standalone/.next/static/chunks/22f0970a7da31999.js +1 -0
- package/.next/standalone/.next/static/chunks/32afcb8f324728fe.js +1 -0
- package/.next/standalone/.next/static/chunks/3aa118eb200a16a6.js +1 -0
- package/.next/standalone/.next/static/chunks/3bb45a8246c87c9c.js +1 -0
- package/.next/standalone/.next/static/chunks/3bd88f74116ecf0b.js +1 -0
- package/.next/standalone/.next/static/chunks/69a71249fe4c8d17.js +1 -0
- package/.next/standalone/.next/static/chunks/{842e82429bd01d96.js → 69f389e018a048b0.js} +1 -1
- package/.next/standalone/.next/static/chunks/83fd475d7bb1bc7e.js +1 -0
- package/.next/standalone/.next/static/chunks/84ba0322d6b6eb00.js +5 -0
- package/.next/standalone/.next/static/chunks/89e492a83a4b53e3.js +1 -0
- package/.next/{static/chunks/785e4ee9877d7d8d.js → standalone/.next/static/chunks/924ad79523394fd9.js} +2 -2
- package/.next/standalone/.next/static/chunks/a561d8ef36eb9e96.js +1 -0
- package/.next/standalone/.next/static/chunks/b2ecf63a14401981.js +1 -0
- package/.next/standalone/.next/static/chunks/cd6330f0a950e8c0.js +1 -0
- package/.next/standalone/.next/static/chunks/cdee4d388d00a056.js +6 -0
- package/.next/standalone/.next/static/chunks/d241d710d5ec3fd7.js +1 -0
- package/.next/standalone/.next/static/chunks/e443aaa7b1ed4b4e.js +5 -0
- package/.next/standalone/.next/static/chunks/effc0fba41d927bf.js +1 -0
- package/.next/standalone/.next/static/chunks/f0df418fe5859df9.css +1 -0
- package/.next/standalone/.next/static/chunks/f55ea47136cf1b22.js +1 -0
- package/.next/standalone/.next/static/chunks/f60f82508902e71a.js +1 -0
- package/.next/standalone/.next/static/chunks/fe778cfc22734c9c.js +5 -0
- package/.next/standalone/README.md +3 -2
- package/.next/standalone/package.json +4 -2
- package/.next/static/chunks/00ce465d0a58e73b.js +1 -0
- package/.next/static/chunks/0492dc04de204ef8.js +5 -0
- package/.next/static/chunks/17906a765ba90602.js +1 -0
- package/.next/static/chunks/18344611f9149409.js +5 -0
- package/.next/static/chunks/22f0970a7da31999.js +1 -0
- package/.next/static/chunks/32afcb8f324728fe.js +1 -0
- package/.next/static/chunks/3aa118eb200a16a6.js +1 -0
- package/.next/static/chunks/3bb45a8246c87c9c.js +1 -0
- package/.next/static/chunks/3bd88f74116ecf0b.js +1 -0
- package/.next/static/chunks/69a71249fe4c8d17.js +1 -0
- package/.next/static/chunks/{842e82429bd01d96.js → 69f389e018a048b0.js} +1 -1
- package/.next/static/chunks/83fd475d7bb1bc7e.js +1 -0
- package/.next/static/chunks/84ba0322d6b6eb00.js +5 -0
- package/.next/static/chunks/89e492a83a4b53e3.js +1 -0
- package/.next/{standalone/.next/static/chunks/785e4ee9877d7d8d.js → static/chunks/924ad79523394fd9.js} +2 -2
- package/.next/static/chunks/a561d8ef36eb9e96.js +1 -0
- package/.next/static/chunks/b2ecf63a14401981.js +1 -0
- package/.next/static/chunks/cd6330f0a950e8c0.js +1 -0
- package/.next/static/chunks/cdee4d388d00a056.js +6 -0
- package/.next/static/chunks/d241d710d5ec3fd7.js +1 -0
- package/.next/static/chunks/e443aaa7b1ed4b4e.js +5 -0
- package/.next/static/chunks/effc0fba41d927bf.js +1 -0
- package/.next/static/chunks/f0df418fe5859df9.css +1 -0
- package/.next/static/chunks/f55ea47136cf1b22.js +1 -0
- package/.next/static/chunks/f60f82508902e71a.js +1 -0
- package/.next/static/chunks/fe778cfc22734c9c.js +5 -0
- package/README.md +3 -2
- package/package.json +4 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__26852352._.js +0 -85
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5dc46bc4._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8992d6da._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e474c328._.js +0 -85
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0e727499._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__4451526a._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_96a4d2a6._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_9cae1942._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_b48f2654._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_d57a9966._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/_d9ccac15._.js +0 -3
- package/.next/standalone/.next/static/chunks/000ce5d236847e14.js +0 -1
- package/.next/standalone/.next/static/chunks/0c86eeaca8703623.js +0 -1
- package/.next/standalone/.next/static/chunks/0f0b044da5064d31.js +0 -1
- package/.next/standalone/.next/static/chunks/13aa9092c4478e88.js +0 -1
- package/.next/standalone/.next/static/chunks/25acbecde2c21b0b.js +0 -1
- package/.next/standalone/.next/static/chunks/27f1f589cc35ce7f.js +0 -5
- package/.next/standalone/.next/static/chunks/3799f4ad1dc31445.css +0 -1
- package/.next/standalone/.next/static/chunks/37c455518a8623aa.js +0 -5
- package/.next/standalone/.next/static/chunks/395473ba68358e71.js +0 -1
- package/.next/standalone/.next/static/chunks/5781382bb8e8910c.js +0 -6
- package/.next/standalone/.next/static/chunks/6a3fee7f033793da.js +0 -1
- package/.next/standalone/.next/static/chunks/6af4eb4b1f798375.js +0 -5
- package/.next/standalone/.next/static/chunks/7c8dab1a077d98e9.js +0 -1
- package/.next/standalone/.next/static/chunks/893da8072a275b7b.js +0 -1
- package/.next/standalone/.next/static/chunks/941ffb527c8ad269.js +0 -1
- package/.next/standalone/.next/static/chunks/b40d536f5d92bc07.js +0 -1
- package/.next/standalone/.next/static/chunks/b55f2944bf45b9ec.js +0 -1
- package/.next/standalone/.next/static/chunks/b90a78e2d36034ff.js +0 -1
- package/.next/standalone/.next/static/chunks/d3d6e96c79ecf7ff.js +0 -1
- package/.next/standalone/.next/static/chunks/d44ccaf98a04c9f5.js +0 -1
- package/.next/standalone/.next/static/chunks/d58f11c82ac60f13.js +0 -1
- package/.next/standalone/.next/static/chunks/d6b31c9a193c5bed.js +0 -5
- package/.next/standalone/.next/static/chunks/ed49341bf575ec20.js +0 -1
- package/.next/standalone/.next/static/chunks/fc28f22597652237.js +0 -5
- package/.next/static/chunks/000ce5d236847e14.js +0 -1
- package/.next/static/chunks/0c86eeaca8703623.js +0 -1
- package/.next/static/chunks/0f0b044da5064d31.js +0 -1
- package/.next/static/chunks/13aa9092c4478e88.js +0 -1
- package/.next/static/chunks/25acbecde2c21b0b.js +0 -1
- package/.next/static/chunks/27f1f589cc35ce7f.js +0 -5
- package/.next/static/chunks/3799f4ad1dc31445.css +0 -1
- package/.next/static/chunks/37c455518a8623aa.js +0 -5
- package/.next/static/chunks/395473ba68358e71.js +0 -1
- package/.next/static/chunks/5781382bb8e8910c.js +0 -6
- package/.next/static/chunks/6a3fee7f033793da.js +0 -1
- package/.next/static/chunks/6af4eb4b1f798375.js +0 -5
- package/.next/static/chunks/7c8dab1a077d98e9.js +0 -1
- package/.next/static/chunks/893da8072a275b7b.js +0 -1
- package/.next/static/chunks/941ffb527c8ad269.js +0 -1
- package/.next/static/chunks/b40d536f5d92bc07.js +0 -1
- package/.next/static/chunks/b55f2944bf45b9ec.js +0 -1
- package/.next/static/chunks/b90a78e2d36034ff.js +0 -1
- package/.next/static/chunks/d3d6e96c79ecf7ff.js +0 -1
- package/.next/static/chunks/d44ccaf98a04c9f5.js +0 -1
- package/.next/static/chunks/d58f11c82ac60f13.js +0 -1
- package/.next/static/chunks/d6b31c9a193c5bed.js +0 -5
- package/.next/static/chunks/ed49341bf575ec20.js +0 -1
- package/.next/static/chunks/fc28f22597652237.js +0 -5
- /package/.next/standalone/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_ssgManifest.js +0 -0
- /package/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_buildManifest.js +0 -0
- /package/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{H1e0tcZUy-dcOaNBJh3iW → zCAPedmpW7JHLJhWpOgp0}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[935736,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(101880),e=a.i(823292),f=a.i(238246),g=a.i(50944),h=a.i(699570),i=a.i(400210),j=a.i(915618),k=a.i(808406),l=a.i(953722);function m({onAddConnection:a}){let c=(0,g.useRouter)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("header",{className:"border-b border-border/40 bg-background/80 backdrop-blur sticky top-0 z-10",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto flex items-center gap-4 px-4 sm:px-6 py-4",children:[(0,b.jsxs)(h.Button,{variant:"ghost",size:"sm",onClick:()=>c.push("/"),className:"gap-1.5",children:[(0,b.jsx)(i.ArrowLeft,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Back to Chat"})]}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsx)("h1",{className:"text-sm font-semibold",children:"CLAY"})]})}),(0,b.jsx)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-5 sm:py-8",children:(0,b.jsxs)("div",{className:"space-y-3 sm:space-y-0 sm:flex sm:items-start sm:justify-between sm:gap-4 mb-6 sm:mb-8",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Connections"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1 hidden sm:block",children:"Manage your database connections. Supports PostgreSQL, Redshift, MySQL, SQLite, and CSV imports."})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 shrink-0",children:(0,b.jsxs)(f.default,{href:"/ai-providers",children:[(0,b.jsx)(k.Sparkles,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"AI Providers"})]})}),(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 shrink-0",children:(0,b.jsxs)(f.default,{href:"/knowledge-base",children:[(0,b.jsx)(l.BookOpen,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Knowledge Base"})]})}),(0,b.jsxs)(h.Button,{onClick:a,size:"sm",className:"gap-1.5 shrink-0",children:[(0,b.jsx)(j.Plus,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"sm:hidden",children:"Add"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Add Connection"})]})]})]})})]})}var n=a.i(591119),o=a.i(220494),p=a.i(596221),q=a.i(786304),r=a.i(167453),s=a.i(785607),t=a.i(883706);let u=(0,t.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),v=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=(0,t.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var x=a.i(136398),y=a.i(699464),z=a.i(781560),A=a.i(368114),B=a.i(624722),C=a.i(111805);let D={redshift:5439,postgresql:5432,mysql:3306,sqlite:0,csv:0},E={name:"",type:"postgresql",host:"",port:"5432",user:"",password:"",database:"",ssl:!0,filePath:""},F={redshift:{color:"text-orange-400 bg-orange-400/10 border-orange-400/20",label:"Amazon Redshift",icon:o.Database},postgresql:{color:"text-blue-400 bg-blue-400/10 border-blue-400/20",label:"PostgreSQL",icon:o.Database},mysql:{color:"text-cyan-400 bg-cyan-400/10 border-cyan-400/20",label:"MySQL",icon:o.Database},sqlite:{color:"text-violet-400 bg-violet-400/10 border-violet-400/20",label:"SQLite",icon:C.HardDrive},csv:{color:"text-green-400 bg-green-400/10 border-green-400/20",label:"CSV (SQLite)",icon:B.FileSpreadsheet}},G={color:"text-muted-foreground",label:"",icon:o.Database};function H({connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:f,onEdit:g,onDelete:i,onImportCsv:j}){var k,l,m;let o=(k=a.type,F[k]?.icon??G.icon);return(0,b.jsxs)(n.Card,{className:(0,A.cn)("transition-all relative overflow-hidden min-w-0",c&&"ring-1 ring-primary/50 border-primary/30"),children:[(0,b.jsx)(n.CardHeader,{className:"p-4 sm:p-6 pb-2 sm:pb-3",children:(0,b.jsxs)("div",{className:"flex items-center gap-2.5 sm:gap-3",children:[(0,b.jsx)("div",{className:(0,A.cn)("rounded-lg p-1.5 sm:p-2 border shrink-0",(l=a.type,F[l]?.color??G.color)),children:(0,b.jsx)(o,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(n.CardTitle,{className:"text-sm sm:text-base truncate",children:a.name}),c&&(0,b.jsxs)(q.Badge,{variant:"default",className:"text-[10px] gap-1 shrink-0",children:[(0,b.jsx)(r.CheckCircle2,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Active"})]})]}),(0,b.jsx)(n.CardDescription,{className:"text-xs mt-0.5",children:(m=a.type,F[m]?.label??m)})]}),(0,b.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>g(a.id),className:"h-7 w-7 p-0",children:(0,b.jsx)(y.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>i(a.id,a.name),className:"h-7 w-7 p-0 text-destructive hover:text-destructive",children:(0,b.jsx)(z.Trash2,{className:"h-3.5 w-3.5"})})]})]})}),(0,b.jsxs)(n.CardContent,{className:"p-4 sm:p-6 pt-0 sm:pt-0 min-w-0 overflow-hidden",children:[(0,b.jsx)(I,{connection:a}),(0,b.jsx)(M,{connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:f,onImportCsv:j})]})]})}function I({connection:a}){return(0,b.jsx)("div",{className:"space-y-1 text-xs text-muted-foreground mb-3 sm:mb-4 min-w-0 overflow-hidden",children:"sqlite"===a.type?(0,b.jsx)(J,{label:"File",value:a.filePath||a.database||"—"}):"csv"===a.type?(0,b.jsx)(K,{csvFiles:a.csvFiles}):(0,b.jsx)(L,{connection:a})})}function J({label:a,value:c}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)("span",{className:"text-muted-foreground/60 w-12 sm:w-14 shrink-0",children:a}),(0,b.jsx)("span",{className:"font-mono truncate min-w-0 flex-1",children:c})]})}function K({csvFiles:a}){return a?.length?(0,b.jsx)(b.Fragment,{children:a.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(x.Table2,{className:"h-3 w-3 shrink-0 text-green-400/60"}),(0,b.jsx)("span",{className:"font-mono truncate min-w-0",title:a.tableName,children:a.tableName}),(0,b.jsx)("span",{className:"text-muted-foreground/40 shrink-0 text-[10px]",children:null!=a.rowCount&&`${a.rowCount} rows`})]},a.tableName))}):(0,b.jsx)("div",{className:"text-muted-foreground/50 italic",children:"No CSV files imported yet"})}function L({connection:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(J,{label:"Host",value:`${a.host}:${a.port}`}),(0,b.jsx)(J,{label:"DB",value:a.database}),(0,b.jsx)(J,{label:"User",value:a.user}),a.ssl&&(0,b.jsxs)("div",{className:"flex items-center gap-1 text-green-500/70 mt-1",children:[(0,b.jsx)(v,{className:"h-3 w-3"}),(0,b.jsx)("span",{children:"SSL enabled"})]})]})}function M({connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:g,onImportCsv:i}){return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[!c&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>e(a.id),className:"text-xs gap-1 h-7 px-2",children:[(0,b.jsx)(s.Plug,{className:"h-3 w-3"}),"Active"]}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>g(a.id),disabled:d,className:"text-xs gap-1 h-7 px-2",children:[d?(0,b.jsx)(p.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(u,{className:"h-3 w-3"}),"Test"]}),"csv"===a.type&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>i(a.id),className:"text-xs gap-1 h-7 px-2 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(w,{className:"h-3 w-3"}),"CSV"]}),(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"text-xs gap-1 h-7 px-2",children:(0,b.jsxs)(f.default,{href:`/knowledge-base?connectionId=${a.id}`,children:[(0,b.jsx)(l.BookOpen,{className:"h-3 w-3"}),"KB"]})})]})}function N({connections:a,activeConnectionId:c,isLoading:d,isTestPending:e,onAdd:f,onSetActive:g,onTestExisting:h,onEdit:i,onDelete:j,onImportCsv:k}){return d?(0,b.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,b.jsx)(p.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===a.length?(0,b.jsx)(O,{onAdd:f}):(0,b.jsx)("div",{className:"grid gap-3 sm:gap-4 md:grid-cols-2 min-w-0",children:a.map(a=>(0,b.jsx)(H,{connection:a,isActive:a.id===c,isTestPending:e,onSetActive:g,onTestExisting:h,onEdit:i,onDelete:j,onImportCsv:k},a.id))})}function O({onAdd:a}){return(0,b.jsx)(n.Card,{className:"border-dashed",children:(0,b.jsxs)(n.CardContent,{className:"flex flex-col items-center justify-center py-10 sm:py-16 px-4",children:[(0,b.jsx)("div",{className:"rounded-full bg-muted p-4 mb-4",children:(0,b.jsx)(o.Database,{className:"h-8 w-8 text-muted-foreground"})}),(0,b.jsx)("h3",{className:"text-base sm:text-lg font-semibold mb-1",children:"No connections yet"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-6 text-center max-w-sm",children:"Add a database connection to start querying your data with AI."}),(0,b.jsxs)(h.Button,{onClick:a,className:"gap-1.5",children:[(0,b.jsx)(j.Plus,{className:"h-4 w-4"}),"Add Your First Connection"]})]})})}var P=a.i(866718),Q=a.i(870430),R=a.i(814574),S=a.i(580701),T=a.i(862722),U=a.i(104720),V=a.i(633508);function W(a,b=6){let c=[],d=[],e="",f=!1,g=0;for(;g<a.length&&c.length<b;){let b=a[g];f?'"'===b?g+1<a.length&&'"'===a[g+1]?(e+='"',g+=2):(f=!1,g++):(e+=b,g++):'"'===b?(f=!0,g++):","===b?(d.push(e.trim()),e="",g++):"\r"===b||"\n"===b?(d.push(e.trim()),e="",d.some(a=>""!==a)&&c.push(d),d=[],"\r"===b&&g+1<a.length&&"\n"===a[g+1]?g+=2:g++):(e+=b,g++)}return(e||d.length>0)&&(d.push(e.trim()),d.some(a=>""!==a)&&c.push(d)),c}function X(a){return a>1048576?`${(a/1048576).toFixed(1)} MB`:`${(a/1024).toFixed(1)} KB`}function Y(a){return a.replace(/\.csv$/i,"").replace(/[^\w\s]/g,"").replace(/\s+/g,"_").toLowerCase().slice(0,64)||"imported_data"}function Z({formHook:a,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e}){let{dialogOpen:f,setDialogOpen:g,editingId:i,form:j,setForm:k,isLocalType:l,testingConnection:m,testResult:n,pendingCsvFiles:o,pendingCsvFileRef:q,isFormValid:r,isSaving:s,handleTypeChange:t,handleTestConnection:v,handleSave:w,handlePendingCsvFileSelect:x,removePendingCsvFile:y,updatePendingTableName:z}=a;return(0,b.jsx)(R.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(R.DialogContent,{className:(0,A.cn)("sm:max-w-lg max-h-[85vh] flex! flex-col! p-4 sm:p-6","csv"===j.type&&"sm:max-w-xl"),children:[(0,b.jsxs)(R.DialogHeader,{className:"shrink-0",children:[(0,b.jsx)(R.DialogTitle,{children:i?"Edit Connection":"Add Connection"}),(0,b.jsx)(R.DialogDescription,{children:i?"Update your database connection details.":"Configure a new database connection."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0 -mx-4 sm:-mx-6 px-4 sm:px-6",children:[(0,b.jsx)($,{form:j,setForm:k}),(0,b.jsx)(_,{form:j,editingId:i,onTypeChange:t}),"sqlite"===j.type&&(0,b.jsx)(aa,{form:j,setForm:k}),"csv"===j.type&&!i&&(0,b.jsx)(ac,{pendingCsvFiles:o,pendingCsvFileRef:q,onFileSelect:x,onRemove:y,onUpdateTableName:z}),"csv"===j.type&&i&&(0,b.jsx)(ad,{editingId:i,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e,onCloseDialog:()=>g(!1)}),!l&&(0,b.jsx)(ab,{form:j,setForm:k}),n&&(0,b.jsx)(ae,{testResult:n})]}),(0,b.jsxs)(R.DialogFooter,{className:"gap-2 sm:gap-0 shrink-0",children:["csv"!==j.type&&(0,b.jsxs)(h.Button,{variant:"outline",onClick:v,disabled:!r||m,className:"gap-1.5",children:[m?(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(u,{className:"h-4 w-4"}),"Test Connection"]}),(0,b.jsxs)(h.Button,{onClick:w,disabled:!r||s,className:"gap-1.5",children:[s&&(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}),i?"Update":"csv"===j.type&&o.length>0?`Save & Import ${o.length} File${o.length>1?"s":""}`:"Save"]})]})]})})}function $({form:a,setForm:c}){let d="csv"===a.type?"e.g. Sales Data CSVs":"sqlite"===a.type?"e.g. Local SQLite DB":"e.g. Production Redshift";return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-name",children:"Connection Name"}),(0,b.jsx)(P.Input,{id:"conn-name",placeholder:d,value:a.name,onChange:a=>c(b=>({...b,name:a.target.value}))})]})}function _({form:a,editingId:c,onTypeChange:d}){return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{children:"Database Type"}),(0,b.jsxs)(S.Select,{value:a.type,onValueChange:a=>d(a),disabled:!!c,children:[(0,b.jsx)(S.SelectTrigger,{children:(0,b.jsx)(S.SelectValue,{})}),(0,b.jsxs)(S.SelectContent,{children:[(0,b.jsx)(S.SelectItem,{value:"postgresql",children:"PostgreSQL"}),(0,b.jsx)(S.SelectItem,{value:"redshift",children:"Amazon Redshift"}),(0,b.jsx)(S.SelectItem,{value:"mysql",children:"MySQL"}),(0,b.jsx)(S.SelectItem,{value:"sqlite",children:"SQLite"}),(0,b.jsx)(S.SelectItem,{value:"csv",children:"CSV Import"})]})]})]})}function aa({form:a,setForm:c}){return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-filepath",children:"Database File Path"}),(0,b.jsx)(P.Input,{id:"conn-filepath",placeholder:"/path/to/your/database.db",value:a.filePath,onChange:a=>c(b=>({...b,filePath:a.target.value}))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Full path to the SQLite database file on your local machine"})]})}function ab({form:a,setForm:c}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-host",children:"Host"}),(0,b.jsx)(P.Input,{id:"conn-host",placeholder:"localhost",value:a.host,onChange:a=>c(b=>({...b,host:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-port",children:"Port"}),(0,b.jsx)(P.Input,{id:"conn-port",placeholder:String(D[a.type]),value:a.port,onChange:a=>c(b=>({...b,port:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-database",children:"Database"}),(0,b.jsx)(P.Input,{id:"conn-database",placeholder:"my_database",value:a.database,onChange:a=>c(b=>({...b,database:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-user",children:"Username"}),(0,b.jsx)(P.Input,{id:"conn-user",placeholder:"postgres",value:a.user,onChange:a=>c(b=>({...b,user:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-password",children:"Password"}),(0,b.jsx)(P.Input,{id:"conn-password",type:"password",placeholder:"••••••••",value:a.password,onChange:a=>c(b=>({...b,password:a.target.value}))})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",id:"conn-ssl",checked:a.ssl,onChange:a=>c(b=>({...b,ssl:a.target.checked})),className:"rounded border-border"}),(0,b.jsx)(Q.Label,{htmlFor:"conn-ssl",className:"text-sm font-normal cursor-pointer",children:"Use SSL"})]})]})}function ac({pendingCsvFiles:a,pendingCsvFileRef:c,onFileSelect:d,onRemove:e,onUpdateTableName:f}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"CSV Files"}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),className:"text-xs gap-1 h-7 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(j.Plus,{className:"h-3 w-3"}),"Add CSV"]}),(0,b.jsx)("input",{ref:c,type:"file",accept:".csv",onChange:d,className:"hidden"})]}),0===a.length?(0,b.jsxs)("div",{onClick:()=>c.current?.click(),className:"rounded-lg border-2 border-dashed p-6 text-center cursor-pointer transition-colors hover:border-green-400/40 hover:bg-green-400/5",children:[(0,b.jsx)(w,{className:"h-6 w-6 text-muted-foreground/40 mx-auto mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Click to add CSV files — each file becomes a queryable table"})]}):(0,b.jsx)("div",{className:"rounded-lg border divide-y",children:a.map((a,c)=>(0,b.jsxs)("div",{className:"px-3 py-2.5 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(U.FileText,{className:"h-4 w-4 shrink-0 text-green-400/70"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-sm font-medium truncate",children:a.fileName}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[X(a.fileSize),a.previewRows.length>0&&(0,b.jsxs)(b.Fragment,{children:[" · ",a.previewRows[0]?.length||0," columns"]})]})]}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>e(c),className:"h-7 w-7 p-0 text-destructive hover:text-destructive shrink-0",children:(0,b.jsx)(V.X,{className:"h-3 w-3"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(Q.Label,{className:"text-[11px] text-muted-foreground shrink-0 w-16",children:"Table name"}),(0,b.jsx)(P.Input,{value:a.tableName,onChange:a=>f(c,a.target.value),className:"h-7 text-xs font-mono"})]})]},c))})]})}function ad({editingId:a,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e,onCloseDialog:f}){let g=c.find(b=>b.id===a),i=g?.csvFiles||[];return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"Imported CSV Files"}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>{f(),d(a)},className:"text-xs gap-1 h-7 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(w,{className:"h-3 w-3"}),"Import CSV"]})]}),0===i.length?(0,b.jsxs)("div",{className:"rounded-lg border border-dashed p-4 text-center",children:[(0,b.jsx)(B.FileSpreadsheet,{className:"h-6 w-6 text-muted-foreground/40 mx-auto mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"No CSV files imported yet"})]}):(0,b.jsx)("div",{className:"rounded-lg border divide-y max-h-64 overflow-y-auto",children:i.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[(0,b.jsx)(x.Table2,{className:"h-4 w-4 shrink-0 text-green-400/70"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 overflow-hidden",children:[(0,b.jsx)("p",{className:"text-xs font-medium font-mono truncate",title:c.tableName,children:c.tableName}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground truncate",title:c.fileName,children:[c.fileName,null!=c.rowCount&&` \xb7 ${c.rowCount} rows`]})]}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>e(a,c.tableName),className:"h-7 w-7 p-0 shrink-0 text-destructive hover:text-destructive",children:(0,b.jsx)(z.Trash2,{className:"h-3.5 w-3.5"})})]},c.tableName))})]})}function ae({testResult:a}){return(0,b.jsx)("div",{className:(0,A.cn)("rounded-lg p-3 text-sm flex items-center gap-2",a.success?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-destructive/10 text-destructive border border-destructive/20"),children:a.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.CheckCircle2,{className:"h-4 w-4 shrink-0"}),(0,b.jsxs)("span",{children:["Connected successfully (",a.latencyMs,"ms)"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(T.XCircle,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.error})]})})}function af({previewRows:a,totalLineCount:c}){if(a.length<=1)return null;let d=a[0],e=a.slice(1,6);return(0,b.jsxs)("div",{className:"rounded-lg border overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-auto max-h-48",children:(0,b.jsxs)("table",{className:"text-xs",children:[(0,b.jsx)("thead",{className:"sticky top-0",children:(0,b.jsx)("tr",{className:"bg-muted/80 border-b",children:d.map((a,c)=>(0,b.jsx)("th",{className:"px-2.5 py-1.5 text-left font-semibold text-foreground whitespace-nowrap text-[11px]",children:a.length>24?a.slice(0,22)+"…":a||`col_${c+1}`},c))})}),(0,b.jsx)("tbody",{children:e.map((a,c)=>(0,b.jsx)("tr",{className:"border-b last:border-0 hover:bg-muted/30",children:d.map((c,d)=>(0,b.jsx)("td",{className:"px-2.5 py-1 text-muted-foreground font-mono text-[11px] whitespace-nowrap max-w-[180px] truncate",children:(a[d]??"").length>30?(a[d]??"").slice(0,28)+"…":a[d]??""},d))},c))})]})}),c&&c>6&&(0,b.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground/60 bg-muted/30 border-t text-center",children:["Showing first ",Math.min(a.length-1,5)," rows · full file will be imported"]})]})}function ag({csvImport:a}){let{dialogOpen:c,setDialogOpen:d,tableName:e,setTableName:f,fileName:g,fileSize:i,content:j,previewRows:k,importing:l,fileRef:m,isImportValid:n,handleFileSelect:o,handleImport:q}=a;return(0,b.jsx)(R.Dialog,{open:c,onOpenChange:d,children:(0,b.jsxs)(R.DialogContent,{className:"sm:max-w-xl max-h-[85vh] flex! flex-col! overflow-hidden p-4 sm:p-6",children:[(0,b.jsxs)(R.DialogHeader,{className:"shrink-0",children:[(0,b.jsxs)(R.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(B.FileSpreadsheet,{className:"h-5 w-5 text-green-400"}),"Import CSV File"]}),(0,b.jsx)(R.DialogDescription,{children:"Each imported CSV becomes a queryable SQL table."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0",children:[(0,b.jsx)(ah,{fileRef:m,fileName:g,fileSize:i,previewRows:k,onFileSelect:o}),g&&(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(Q.Label,{htmlFor:"csv-table",className:"text-xs",children:"Table Name"}),(0,b.jsx)(P.Input,{id:"csv-table",placeholder:"e.g. sales_data",value:e,onChange:a=>f(a.target.value),className:"h-9"}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["SQL table name — you'll query it as"," ",(0,b.jsxs)("code",{className:"bg-muted px-1 rounded",children:["SELECT * FROM ",e||"table_name"]})]})]}),k.length>1&&(0,b.jsxs)("div",{className:"space-y-1.5 min-w-0",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"Preview"}),(0,b.jsx)(af,{previewRows:k,totalLineCount:j.split("\n").length})]})]}),(0,b.jsxs)(R.DialogFooter,{className:"shrink-0",children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),(0,b.jsxs)(h.Button,{onClick:q,disabled:!n||l,className:"gap-1.5",children:[l?(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(w,{className:"h-4 w-4"}),l?"Importing...":"Import"]})]})]})})}function ah({fileRef:a,fileName:c,fileSize:d,previewRows:e,onFileSelect:f}){return(0,b.jsxs)("div",{onClick:()=>a.current?.click(),className:(0,A.cn)("border-2 border-dashed rounded-lg px-4 py-3 cursor-pointer transition-colors","hover:border-primary/50 hover:bg-primary/5",c?"border-green-400/30 bg-green-400/5":"border-border"),children:[(0,b.jsx)("input",{ref:a,type:"file",accept:".csv",onChange:f,className:"hidden"}),c?(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(U.FileText,{className:"h-5 w-5 text-green-400 shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-sm font-medium truncate",children:c}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[d>0&&X(d),e.length>1&&(0,b.jsxs)(b.Fragment,{children:[" · ",e[0]?.length||0," columns detected"]})]})]}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:"Change file"})]}):(0,b.jsxs)("div",{className:"flex items-center gap-3 justify-center py-2",children:[(0,b.jsx)(w,{className:"h-5 w-5 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Click to select a CSV file"})]})]})}function ai(){let{data:a,isLoading:f}=d.api.connection.list.useQuery(),g=d.api.connection.delete.useMutation(),h=d.api.connection.setActive.useMutation(),i=d.api.connection.testExisting.useMutation(),j=d.api.connection.removeCsvTable.useMutation(),k=d.api.useUtils(),l=a?.connections||[],n=a?.activeConnectionId,o=(0,c.useCallback)(()=>{k.connection.list.invalidate()},[k]),p=function({onSaved:a}){let[b,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(E),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)([]),q=(0,c.useRef)(null),r=d.api.connection.add.useMutation(),s=d.api.connection.update.useMutation(),t=d.api.connection.test.useMutation(),u=d.api.connection.importCsv.useMutation(),v=d.api.useUtils(),w="sqlite"===i.type||"csv"===i.type,x=(0,c.useCallback)(()=>{h(null),j(E),n(null),p([]),f(!0)},[]),y=(0,c.useCallback)(async a=>{h(a),n(null);let b=await v.connection.get.fetch({id:a});if(b.connection){let a=b.connection;j({name:a.name,type:a.type,host:a.host||"",port:String(a.port||0),user:a.user||"",password:a.password||"",database:a.database||"",ssl:a.ssl||!1,filePath:a.filePath||""})}f(!0)},[v]),z=(0,c.useCallback)(a=>{j(b=>({...b,type:a,..."sqlite"===a||"csv"===a?{host:"",port:"0",user:"",password:"",database:"",ssl:!1}:{port:String(D[a]),filePath:""}})),"csv"!==a&&p([])},[]),A=(0,c.useCallback)(async()=>{l(!0),n(null);try{let a=await t.mutateAsync({name:i.name||"Test",type:i.type,host:i.host||"",port:parseInt(i.port)||D[i.type],user:i.user||"",password:i.password||"",database:i.database||"",ssl:i.ssl,filePath:i.filePath||void 0});n(a)}catch(a){n({success:!1,error:a.message||"Connection test failed"})}finally{l(!1)}},[i,t]),B=(0,c.useCallback)(async()=>{try{let b={name:i.name,type:i.type,host:i.host||"",port:parseInt(i.port)||D[i.type],user:i.user||"",password:i.password||"",database:i.database||"",ssl:i.ssl,filePath:i.filePath||void 0};if(g)await s.mutateAsync({id:g,data:b}),e.toast.success("Connection updated");else{let a=await r.mutateAsync(b);if("csv"===i.type&&o.length>0&&a.connection){let b=a.connection.id,c=0;for(let a of o)try{await u.mutateAsync({connectionId:b,csvContent:a.content,tableName:a.tableName,fileName:a.fileName}),c++}catch(b){e.toast.error(`Failed to import ${a.fileName}: ${b.message}`)}e.toast.success(c>0?`Connection created with ${c} CSV file(s) imported`:"Connection added")}else e.toast.success("Connection added");p([])}f(!1),a()}catch(a){e.toast.error(a.message||"Failed to save connection")}},[i,g,r,s,u,o,a]),C=(0,c.useCallback)(a=>{let b=a.target.files?.[0];if(!b)return;let c=Y(b.name),d=new FileReader;d.onload=a=>{let d=a.target?.result||"",e=W(d,4);p(a=>[...a,{fileName:b.name,tableName:c,content:d,fileSize:b.size,previewRows:e}])},d.readAsText(b),q.current&&(q.current.value="")},[]),F=(0,c.useCallback)(a=>{p(b=>b.filter((b,c)=>c!==a))},[]),G=(0,c.useCallback)((a,b)=>{p(c=>c.map((c,d)=>d===a?{...c,tableName:b}:c))},[]),H=!!i.name.trim()&&("sqlite"===i.type?!!i.filePath?.trim():"csv"===i.type?!!g||o.length>0:!!(i.host.trim()&&i.port.trim()&&i.user.trim()&&i.password.trim()&&i.database.trim()));return{dialogOpen:b,setDialogOpen:f,editingId:g,form:i,setForm:j,isLocalType:w,testingConnection:k,testResult:m,pendingCsvFiles:o,pendingCsvFileRef:q,isFormValid:H,isSaving:r.isPending||s.isPending,openAddDialog:x,openEditDialog:y,handleTypeChange:z,handleTestConnection:A,handleSave:B,handlePendingCsvFileSelect:C,removePendingCsvFile:F,updatePendingTableName:G}}({onSaved:o}),q=function({onImported:a}){let[b,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(0),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)(!1),u=(0,c.useRef)(null),v=d.api.connection.importCsv.useMutation(),w=(0,c.useCallback)(a=>{h(a),j(""),l(""),n(""),p(0),r([]),f(!0),u.current&&(u.current.value="")},[]),x=(0,c.useCallback)(a=>{let b=a.target.files?.[0];if(!b)return;l(b.name),p(b.size),j(Y(b.name));let c=new FileReader;c.onload=a=>{let b=a.target?.result||"";n(b),r(W(b,6))},c.readAsText(b)},[]),y=(0,c.useCallback)(async()=>{if(g&&m&&i){t(!0);try{let b=await v.mutateAsync({connectionId:g,csvContent:m,tableName:i,fileName:k});e.toast.success(`Imported ${b.rowCount} rows into table "${b.tableName}"`),f(!1),a()}catch(a){e.toast.error(a.message||"Failed to import CSV")}finally{t(!1)}}},[g,m,i,k,v,a]),z=!!(m&&i.trim());return{dialogOpen:b,setDialogOpen:f,tableName:i,setTableName:j,fileName:k,fileSize:o,content:m,previewRows:q,importing:s,fileRef:u,isImportValid:z,openDialog:w,handleFileSelect:x,handleImport:y}}({onImported:o}),r=(0,c.useCallback)(async(a,b)=>{if(confirm(`Delete connection "${b}"? This cannot be undone.`))try{await g.mutateAsync({id:a}),e.toast.success("Connection deleted"),o()}catch(a){e.toast.error(a.message||"Failed to delete connection")}},[g,o]),s=(0,c.useCallback)(async a=>{try{await h.mutateAsync({id:a}),o(),e.toast.success("Active connection updated")}catch(a){e.toast.error(a.message||"Failed to set active connection")}},[h,o]),t=(0,c.useCallback)(async a=>{try{let b=await i.mutateAsync({id:a});b.success?e.toast.success(`Connection successful (${b.latencyMs}ms)`):e.toast.error(`Connection failed: ${b.error}`)}catch(a){e.toast.error(a.message||"Test failed")}},[i]),u=(0,c.useCallback)(async(a,b)=>{if(confirm(`Remove table "${b}"? This will delete the imported data.`))try{await j.mutateAsync({connectionId:a,tableName:b}),e.toast.success(`Table "${b}" removed`),o()}catch(a){e.toast.error(a.message||"Failed to remove table")}},[j,o]);return(0,b.jsxs)("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[(0,b.jsx)(m,{onAddConnection:p.openAddDialog}),(0,b.jsx)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 -mt-4 sm:-mt-8 pb-8 sm:pb-12",children:(0,b.jsx)(N,{connections:l,activeConnectionId:n,isLoading:f,isTestPending:i.isPending,onAdd:p.openAddDialog,onSetActive:s,onTestExisting:t,onEdit:p.openEditDialog,onDelete:r,onImportCsv:q.openDialog})}),(0,b.jsx)(Z,{formHook:p,connections:l,onOpenCsvImport:q.openDialog,onRemoveCsvTable:u}),(0,b.jsx)(ag,{csvImport:q})]})}a.s(["ConnectionsPage",()=>ai],935736)}];
|
|
1
|
+
module.exports=[935736,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(101880),e=a.i(823292),f=a.i(238246),g=a.i(50944),h=a.i(699570),i=a.i(400210),j=a.i(915618),k=a.i(808406),l=a.i(953722);function m({onAddConnection:a}){let c=(0,g.useRouter)();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("header",{className:"border-b border-border/40 bg-background/80 backdrop-blur sticky top-0 z-10",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto flex items-center gap-4 px-4 sm:px-6 py-4",children:[(0,b.jsxs)(h.Button,{variant:"ghost",size:"sm",onClick:()=>c.push("/"),className:"gap-1.5",children:[(0,b.jsx)(i.ArrowLeft,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Back to Chat"})]}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsx)("h1",{className:"text-sm font-semibold uppercase tracking-wider",children:"SQLBOT"})]})}),(0,b.jsx)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-5 sm:py-8",children:(0,b.jsxs)("div",{className:"space-y-3 sm:space-y-0 sm:flex sm:items-start sm:justify-between sm:gap-4 mb-6 sm:mb-8",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h2",{className:"text-xl sm:text-2xl font-bold tracking-tight",children:"Connections"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1 hidden sm:block",children:"Manage your database connections. Supports PostgreSQL, Redshift, MySQL, SQLite, and CSV imports."})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 shrink-0",children:(0,b.jsxs)(f.default,{href:"/ai-providers",children:[(0,b.jsx)(k.Sparkles,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"AI Providers"})]})}),(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 shrink-0",children:(0,b.jsxs)(f.default,{href:"/knowledge-base",children:[(0,b.jsx)(l.BookOpen,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Knowledge Base"})]})}),(0,b.jsxs)(h.Button,{onClick:a,size:"sm",className:"gap-1.5 shrink-0",children:[(0,b.jsx)(j.Plus,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"sm:hidden",children:"Add"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Add Connection"})]})]})]})})]})}var n=a.i(591119),o=a.i(220494),p=a.i(596221),q=a.i(786304),r=a.i(167453),s=a.i(785607),t=a.i(883706);let u=(0,t.default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),v=(0,t.default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),w=(0,t.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);var x=a.i(136398),y=a.i(699464),z=a.i(781560),A=a.i(368114),B=a.i(624722),C=a.i(111805);let D={redshift:5439,postgresql:5432,mysql:3306,sqlite:0,csv:0},E={name:"",type:"postgresql",host:"",port:"5432",user:"",password:"",database:"",ssl:!0,filePath:""},F={redshift:{color:"text-orange-400 bg-orange-400/10 border-orange-400/20",label:"Amazon Redshift",icon:o.Database},postgresql:{color:"text-blue-400 bg-blue-400/10 border-blue-400/20",label:"PostgreSQL",icon:o.Database},mysql:{color:"text-cyan-400 bg-cyan-400/10 border-cyan-400/20",label:"MySQL",icon:o.Database},sqlite:{color:"text-violet-400 bg-violet-400/10 border-violet-400/20",label:"SQLite",icon:C.HardDrive},csv:{color:"text-green-400 bg-green-400/10 border-green-400/20",label:"CSV (SQLite)",icon:B.FileSpreadsheet}},G={color:"text-muted-foreground",label:"",icon:o.Database};function H({connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:f,onEdit:g,onDelete:i,onImportCsv:j}){var k,l,m;let o=(k=a.type,F[k]?.icon??G.icon);return(0,b.jsxs)(n.Card,{className:(0,A.cn)("transition-all relative overflow-hidden min-w-0",c&&"ring-1 ring-primary/50 border-primary/30"),children:[(0,b.jsx)(n.CardHeader,{className:"p-4 sm:p-6 pb-2 sm:pb-3",children:(0,b.jsxs)("div",{className:"flex items-center gap-2.5 sm:gap-3",children:[(0,b.jsx)("div",{className:(0,A.cn)("rounded-lg p-1.5 sm:p-2 border shrink-0",(l=a.type,F[l]?.color??G.color)),children:(0,b.jsx)(o,{className:"h-4 w-4"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(n.CardTitle,{className:"text-sm sm:text-base truncate",children:a.name}),c&&(0,b.jsxs)(q.Badge,{variant:"default",className:"text-[10px] gap-1 shrink-0",children:[(0,b.jsx)(r.CheckCircle2,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Active"})]})]}),(0,b.jsx)(n.CardDescription,{className:"text-xs mt-0.5",children:(m=a.type,F[m]?.label??m)})]}),(0,b.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>g(a.id),className:"h-7 w-7 p-0",children:(0,b.jsx)(y.Pencil,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>i(a.id,a.name),className:"h-7 w-7 p-0 text-destructive hover:text-destructive",children:(0,b.jsx)(z.Trash2,{className:"h-3.5 w-3.5"})})]})]})}),(0,b.jsxs)(n.CardContent,{className:"p-4 sm:p-6 pt-0 sm:pt-0 min-w-0 overflow-hidden",children:[(0,b.jsx)(I,{connection:a}),(0,b.jsx)(M,{connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:f,onImportCsv:j})]})]})}function I({connection:a}){return(0,b.jsx)("div",{className:"space-y-1 text-xs text-muted-foreground mb-3 sm:mb-4 min-w-0 overflow-hidden",children:"sqlite"===a.type?(0,b.jsx)(J,{label:"File",value:a.filePath||a.database||"—"}):"csv"===a.type?(0,b.jsx)(K,{csvFiles:a.csvFiles}):(0,b.jsx)(L,{connection:a})})}function J({label:a,value:c}){return(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)("span",{className:"text-muted-foreground/60 w-12 sm:w-14 shrink-0",children:a}),(0,b.jsx)("span",{className:"font-mono truncate min-w-0 flex-1",children:c})]})}function K({csvFiles:a}){return a?.length?(0,b.jsx)(b.Fragment,{children:a.map(a=>(0,b.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,b.jsx)(x.Table2,{className:"h-3 w-3 shrink-0 text-green-400/60"}),(0,b.jsx)("span",{className:"font-mono truncate min-w-0",title:a.tableName,children:a.tableName}),(0,b.jsx)("span",{className:"text-muted-foreground/40 shrink-0 text-[10px]",children:null!=a.rowCount&&`${a.rowCount} rows`})]},a.tableName))}):(0,b.jsx)("div",{className:"text-muted-foreground/50 italic",children:"No CSV files imported yet"})}function L({connection:a}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(J,{label:"Host",value:`${a.host}:${a.port}`}),(0,b.jsx)(J,{label:"DB",value:a.database}),(0,b.jsx)(J,{label:"User",value:a.user}),a.ssl&&(0,b.jsxs)("div",{className:"flex items-center gap-1 text-green-500/70 mt-1",children:[(0,b.jsx)(v,{className:"h-3 w-3"}),(0,b.jsx)("span",{children:"SSL enabled"})]})]})}function M({connection:a,isActive:c,isTestPending:d,onSetActive:e,onTestExisting:g,onImportCsv:i}){return(0,b.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[!c&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>e(a.id),className:"text-xs gap-1 h-7 px-2",children:[(0,b.jsx)(s.Plug,{className:"h-3 w-3"}),"Active"]}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>g(a.id),disabled:d,className:"text-xs gap-1 h-7 px-2",children:[d?(0,b.jsx)(p.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(u,{className:"h-3 w-3"}),"Test"]}),"csv"===a.type&&(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>i(a.id),className:"text-xs gap-1 h-7 px-2 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(w,{className:"h-3 w-3"}),"CSV"]}),(0,b.jsx)(h.Button,{asChild:!0,variant:"outline",size:"sm",className:"text-xs gap-1 h-7 px-2",children:(0,b.jsxs)(f.default,{href:`/knowledge-base?connectionId=${a.id}`,children:[(0,b.jsx)(l.BookOpen,{className:"h-3 w-3"}),"KB"]})})]})}function N({connections:a,activeConnectionId:c,isLoading:d,isTestPending:e,onAdd:f,onSetActive:g,onTestExisting:h,onEdit:i,onDelete:j,onImportCsv:k}){return d?(0,b.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,b.jsx)(p.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===a.length?(0,b.jsx)(O,{onAdd:f}):(0,b.jsx)("div",{className:"grid gap-3 sm:gap-4 md:grid-cols-2 min-w-0",children:a.map(a=>(0,b.jsx)(H,{connection:a,isActive:a.id===c,isTestPending:e,onSetActive:g,onTestExisting:h,onEdit:i,onDelete:j,onImportCsv:k},a.id))})}function O({onAdd:a}){return(0,b.jsx)(n.Card,{className:"border-dashed",children:(0,b.jsxs)(n.CardContent,{className:"flex flex-col items-center justify-center py-10 sm:py-16 px-4",children:[(0,b.jsx)("div",{className:"rounded-full bg-muted p-4 mb-4",children:(0,b.jsx)(o.Database,{className:"h-8 w-8 text-muted-foreground"})}),(0,b.jsx)("h3",{className:"text-base sm:text-lg font-semibold mb-1",children:"No connections yet"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-6 text-center max-w-sm",children:"Add a database connection to start querying your data with AI."}),(0,b.jsxs)(h.Button,{onClick:a,className:"gap-1.5",children:[(0,b.jsx)(j.Plus,{className:"h-4 w-4"}),"Add Your First Connection"]})]})})}var P=a.i(866718),Q=a.i(870430),R=a.i(814574),S=a.i(580701),T=a.i(862722),U=a.i(104720),V=a.i(633508);function W(a,b=6){let c=[],d=[],e="",f=!1,g=0;for(;g<a.length&&c.length<b;){let b=a[g];f?'"'===b?g+1<a.length&&'"'===a[g+1]?(e+='"',g+=2):(f=!1,g++):(e+=b,g++):'"'===b?(f=!0,g++):","===b?(d.push(e.trim()),e="",g++):"\r"===b||"\n"===b?(d.push(e.trim()),e="",d.some(a=>""!==a)&&c.push(d),d=[],"\r"===b&&g+1<a.length&&"\n"===a[g+1]?g+=2:g++):(e+=b,g++)}return(e||d.length>0)&&(d.push(e.trim()),d.some(a=>""!==a)&&c.push(d)),c}function X(a){return a>1048576?`${(a/1048576).toFixed(1)} MB`:`${(a/1024).toFixed(1)} KB`}function Y(a){return a.replace(/\.csv$/i,"").replace(/[^\w\s]/g,"").replace(/\s+/g,"_").toLowerCase().slice(0,64)||"imported_data"}function Z({formHook:a,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e}){let{dialogOpen:f,setDialogOpen:g,editingId:i,form:j,setForm:k,isLocalType:l,testingConnection:m,testResult:n,pendingCsvFiles:o,pendingCsvFileRef:q,isFormValid:r,isSaving:s,handleTypeChange:t,handleTestConnection:v,handleSave:w,handlePendingCsvFileSelect:x,removePendingCsvFile:y,updatePendingTableName:z}=a;return(0,b.jsx)(R.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(R.DialogContent,{className:(0,A.cn)("sm:max-w-lg max-h-[85vh] flex! flex-col! p-4 sm:p-6","csv"===j.type&&"sm:max-w-xl"),children:[(0,b.jsxs)(R.DialogHeader,{className:"shrink-0",children:[(0,b.jsx)(R.DialogTitle,{children:i?"Edit Connection":"Add Connection"}),(0,b.jsx)(R.DialogDescription,{children:i?"Update your database connection details.":"Configure a new database connection."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0 -mx-4 sm:-mx-6 px-4 sm:px-6",children:[(0,b.jsx)($,{form:j,setForm:k}),(0,b.jsx)(_,{form:j,editingId:i,onTypeChange:t}),"sqlite"===j.type&&(0,b.jsx)(aa,{form:j,setForm:k}),"csv"===j.type&&!i&&(0,b.jsx)(ac,{pendingCsvFiles:o,pendingCsvFileRef:q,onFileSelect:x,onRemove:y,onUpdateTableName:z}),"csv"===j.type&&i&&(0,b.jsx)(ad,{editingId:i,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e,onCloseDialog:()=>g(!1)}),!l&&(0,b.jsx)(ab,{form:j,setForm:k}),n&&(0,b.jsx)(ae,{testResult:n})]}),(0,b.jsxs)(R.DialogFooter,{className:"gap-2 sm:gap-0 shrink-0",children:["csv"!==j.type&&(0,b.jsxs)(h.Button,{variant:"outline",onClick:v,disabled:!r||m,className:"gap-1.5",children:[m?(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(u,{className:"h-4 w-4"}),"Test Connection"]}),(0,b.jsxs)(h.Button,{onClick:w,disabled:!r||s,className:"gap-1.5",children:[s&&(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}),i?"Update":"csv"===j.type&&o.length>0?`Save & Import ${o.length} File${o.length>1?"s":""}`:"Save"]})]})]})})}function $({form:a,setForm:c}){let d="csv"===a.type?"e.g. Sales Data CSVs":"sqlite"===a.type?"e.g. Local SQLite DB":"e.g. Production Redshift";return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-name",children:"Connection Name"}),(0,b.jsx)(P.Input,{id:"conn-name",placeholder:d,value:a.name,onChange:a=>c(b=>({...b,name:a.target.value}))})]})}function _({form:a,editingId:c,onTypeChange:d}){return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{children:"Database Type"}),(0,b.jsxs)(S.Select,{value:a.type,onValueChange:a=>d(a),disabled:!!c,children:[(0,b.jsx)(S.SelectTrigger,{children:(0,b.jsx)(S.SelectValue,{})}),(0,b.jsxs)(S.SelectContent,{children:[(0,b.jsx)(S.SelectItem,{value:"postgresql",children:"PostgreSQL"}),(0,b.jsx)(S.SelectItem,{value:"redshift",children:"Amazon Redshift"}),(0,b.jsx)(S.SelectItem,{value:"mysql",children:"MySQL"}),(0,b.jsx)(S.SelectItem,{value:"sqlite",children:"SQLite"}),(0,b.jsx)(S.SelectItem,{value:"csv",children:"CSV Import"})]})]})]})}function aa({form:a,setForm:c}){return(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-filepath",children:"Database File Path"}),(0,b.jsx)(P.Input,{id:"conn-filepath",placeholder:"/path/to/your/database.db",value:a.filePath,onChange:a=>c(b=>({...b,filePath:a.target.value}))}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Full path to the SQLite database file on your local machine"})]})}function ab({form:a,setForm:c}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-host",children:"Host"}),(0,b.jsx)(P.Input,{id:"conn-host",placeholder:"localhost",value:a.host,onChange:a=>c(b=>({...b,host:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-port",children:"Port"}),(0,b.jsx)(P.Input,{id:"conn-port",placeholder:String(D[a.type]),value:a.port,onChange:a=>c(b=>({...b,port:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-database",children:"Database"}),(0,b.jsx)(P.Input,{id:"conn-database",placeholder:"my_database",value:a.database,onChange:a=>c(b=>({...b,database:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-user",children:"Username"}),(0,b.jsx)(P.Input,{id:"conn-user",placeholder:"postgres",value:a.user,onChange:a=>c(b=>({...b,user:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(Q.Label,{htmlFor:"conn-password",children:"Password"}),(0,b.jsx)(P.Input,{id:"conn-password",type:"password",placeholder:"••••••••",value:a.password,onChange:a=>c(b=>({...b,password:a.target.value}))})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("input",{type:"checkbox",id:"conn-ssl",checked:a.ssl,onChange:a=>c(b=>({...b,ssl:a.target.checked})),className:"rounded border-border"}),(0,b.jsx)(Q.Label,{htmlFor:"conn-ssl",className:"text-sm font-normal cursor-pointer",children:"Use SSL"})]})]})}function ac({pendingCsvFiles:a,pendingCsvFileRef:c,onFileSelect:d,onRemove:e,onUpdateTableName:f}){return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"CSV Files"}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>c.current?.click(),className:"text-xs gap-1 h-7 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(j.Plus,{className:"h-3 w-3"}),"Add CSV"]}),(0,b.jsx)("input",{ref:c,type:"file",accept:".csv",onChange:d,className:"hidden"})]}),0===a.length?(0,b.jsxs)("div",{onClick:()=>c.current?.click(),className:"rounded-lg border-2 border-dashed p-6 text-center cursor-pointer transition-colors hover:border-green-400/40 hover:bg-green-400/5",children:[(0,b.jsx)(w,{className:"h-6 w-6 text-muted-foreground/40 mx-auto mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"Click to add CSV files — each file becomes a queryable table"})]}):(0,b.jsx)("div",{className:"rounded-lg border divide-y",children:a.map((a,c)=>(0,b.jsxs)("div",{className:"px-3 py-2.5 space-y-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(U.FileText,{className:"h-4 w-4 shrink-0 text-green-400/70"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-sm font-medium truncate",children:a.fileName}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:[X(a.fileSize),a.previewRows.length>0&&(0,b.jsxs)(b.Fragment,{children:[" · ",a.previewRows[0]?.length||0," columns"]})]})]}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>e(c),className:"h-7 w-7 p-0 text-destructive hover:text-destructive shrink-0",children:(0,b.jsx)(V.X,{className:"h-3 w-3"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(Q.Label,{className:"text-[11px] text-muted-foreground shrink-0 w-16",children:"Table name"}),(0,b.jsx)(P.Input,{value:a.tableName,onChange:a=>f(c,a.target.value),className:"h-7 text-xs font-mono"})]})]},c))})]})}function ad({editingId:a,connections:c,onOpenCsvImport:d,onRemoveCsvTable:e,onCloseDialog:f}){let g=c.find(b=>b.id===a),i=g?.csvFiles||[];return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"Imported CSV Files"}),(0,b.jsxs)(h.Button,{variant:"outline",size:"sm",onClick:()=>{f(),d(a)},className:"text-xs gap-1 h-7 text-green-400 border-green-400/30 hover:bg-green-400/10",children:[(0,b.jsx)(w,{className:"h-3 w-3"}),"Import CSV"]})]}),0===i.length?(0,b.jsxs)("div",{className:"rounded-lg border border-dashed p-4 text-center",children:[(0,b.jsx)(B.FileSpreadsheet,{className:"h-6 w-6 text-muted-foreground/40 mx-auto mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"No CSV files imported yet"})]}):(0,b.jsx)("div",{className:"rounded-lg border divide-y max-h-64 overflow-y-auto",children:i.map(c=>(0,b.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[(0,b.jsx)(x.Table2,{className:"h-4 w-4 shrink-0 text-green-400/70"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0 overflow-hidden",children:[(0,b.jsx)("p",{className:"text-xs font-medium font-mono truncate",title:c.tableName,children:c.tableName}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground truncate",title:c.fileName,children:[c.fileName,null!=c.rowCount&&` \xb7 ${c.rowCount} rows`]})]}),(0,b.jsx)(h.Button,{variant:"ghost",size:"sm",onClick:()=>e(a,c.tableName),className:"h-7 w-7 p-0 shrink-0 text-destructive hover:text-destructive",children:(0,b.jsx)(z.Trash2,{className:"h-3.5 w-3.5"})})]},c.tableName))})]})}function ae({testResult:a}){return(0,b.jsx)("div",{className:(0,A.cn)("rounded-lg p-3 text-sm flex items-center gap-2",a.success?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-destructive/10 text-destructive border border-destructive/20"),children:a.success?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(r.CheckCircle2,{className:"h-4 w-4 shrink-0"}),(0,b.jsxs)("span",{children:["Connected successfully (",a.latencyMs,"ms)"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(T.XCircle,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"truncate",children:a.error})]})})}function af({previewRows:a,totalLineCount:c}){if(a.length<=1)return null;let d=a[0],e=a.slice(1,6);return(0,b.jsxs)("div",{className:"rounded-lg border overflow-hidden",children:[(0,b.jsx)("div",{className:"overflow-auto max-h-48",children:(0,b.jsxs)("table",{className:"text-xs",children:[(0,b.jsx)("thead",{className:"sticky top-0",children:(0,b.jsx)("tr",{className:"bg-muted/80 border-b",children:d.map((a,c)=>(0,b.jsx)("th",{className:"px-2.5 py-1.5 text-left font-semibold text-foreground whitespace-nowrap text-[11px]",children:a.length>24?a.slice(0,22)+"…":a||`col_${c+1}`},c))})}),(0,b.jsx)("tbody",{children:e.map((a,c)=>(0,b.jsx)("tr",{className:"border-b last:border-0 hover:bg-muted/30",children:d.map((c,d)=>(0,b.jsx)("td",{className:"px-2.5 py-1 text-muted-foreground font-mono text-[11px] whitespace-nowrap max-w-[180px] truncate",children:(a[d]??"").length>30?(a[d]??"").slice(0,28)+"…":a[d]??""},d))},c))})]})}),c&&c>6&&(0,b.jsxs)("div",{className:"px-3 py-1 text-[10px] text-muted-foreground/60 bg-muted/30 border-t text-center",children:["Showing first ",Math.min(a.length-1,5)," rows · full file will be imported"]})]})}function ag({csvImport:a}){let{dialogOpen:c,setDialogOpen:d,tableName:e,setTableName:f,fileName:g,fileSize:i,content:j,previewRows:k,importing:l,fileRef:m,isImportValid:n,handleFileSelect:o,handleImport:q}=a;return(0,b.jsx)(R.Dialog,{open:c,onOpenChange:d,children:(0,b.jsxs)(R.DialogContent,{className:"sm:max-w-xl max-h-[85vh] flex! flex-col! overflow-hidden p-4 sm:p-6",children:[(0,b.jsxs)(R.DialogHeader,{className:"shrink-0",children:[(0,b.jsxs)(R.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)(B.FileSpreadsheet,{className:"h-5 w-5 text-green-400"}),"Import CSV File"]}),(0,b.jsx)(R.DialogDescription,{children:"Each imported CSV becomes a queryable SQL table."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0",children:[(0,b.jsx)(ah,{fileRef:m,fileName:g,fileSize:i,previewRows:k,onFileSelect:o}),g&&(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(Q.Label,{htmlFor:"csv-table",className:"text-xs",children:"Table Name"}),(0,b.jsx)(P.Input,{id:"csv-table",placeholder:"e.g. sales_data",value:e,onChange:a=>f(a.target.value),className:"h-9"}),(0,b.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["SQL table name — you'll query it as"," ",(0,b.jsxs)("code",{className:"bg-muted px-1 rounded",children:["SELECT * FROM ",e||"table_name"]})]})]}),k.length>1&&(0,b.jsxs)("div",{className:"space-y-1.5 min-w-0",children:[(0,b.jsx)(Q.Label,{className:"text-xs",children:"Preview"}),(0,b.jsx)(af,{previewRows:k,totalLineCount:j.split("\n").length})]})]}),(0,b.jsxs)(R.DialogFooter,{className:"shrink-0",children:[(0,b.jsx)(h.Button,{variant:"outline",onClick:()=>d(!1),children:"Cancel"}),(0,b.jsxs)(h.Button,{onClick:q,disabled:!n||l,className:"gap-1.5",children:[l?(0,b.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}):(0,b.jsx)(w,{className:"h-4 w-4"}),l?"Importing...":"Import"]})]})]})})}function ah({fileRef:a,fileName:c,fileSize:d,previewRows:e,onFileSelect:f}){return(0,b.jsxs)("div",{onClick:()=>a.current?.click(),className:(0,A.cn)("border-2 border-dashed rounded-lg px-4 py-3 cursor-pointer transition-colors","hover:border-primary/50 hover:bg-primary/5",c?"border-green-400/30 bg-green-400/5":"border-border"),children:[(0,b.jsx)("input",{ref:a,type:"file",accept:".csv",onChange:f,className:"hidden"}),c?(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(U.FileText,{className:"h-5 w-5 text-green-400 shrink-0"}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:"text-sm font-medium truncate",children:c}),(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[d>0&&X(d),e.length>1&&(0,b.jsxs)(b.Fragment,{children:[" · ",e[0]?.length||0," columns detected"]})]})]}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground shrink-0",children:"Change file"})]}):(0,b.jsxs)("div",{className:"flex items-center gap-3 justify-center py-2",children:[(0,b.jsx)(w,{className:"h-5 w-5 text-muted-foreground"}),(0,b.jsx)("span",{className:"text-sm text-muted-foreground",children:"Click to select a CSV file"})]})]})}function ai(){let{data:a,isLoading:f}=d.api.connection.list.useQuery(),g=d.api.connection.delete.useMutation(),h=d.api.connection.setActive.useMutation(),i=d.api.connection.testExisting.useMutation(),j=d.api.connection.removeCsvTable.useMutation(),k=d.api.useUtils(),l=a?.connections||[],n=a?.activeConnectionId,o=(0,c.useCallback)(()=>{k.connection.list.invalidate()},[k]),p=function({onSaved:a}){let[b,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(E),[k,l]=(0,c.useState)(!1),[m,n]=(0,c.useState)(null),[o,p]=(0,c.useState)([]),q=(0,c.useRef)(null),r=d.api.connection.add.useMutation(),s=d.api.connection.update.useMutation(),t=d.api.connection.test.useMutation(),u=d.api.connection.importCsv.useMutation(),v=d.api.useUtils(),w="sqlite"===i.type||"csv"===i.type,x=(0,c.useCallback)(()=>{h(null),j(E),n(null),p([]),f(!0)},[]),y=(0,c.useCallback)(async a=>{h(a),n(null);let b=await v.connection.get.fetch({id:a});if(b.connection){let a=b.connection;j({name:a.name,type:a.type,host:a.host||"",port:String(a.port||0),user:a.user||"",password:a.password||"",database:a.database||"",ssl:a.ssl||!1,filePath:a.filePath||""})}f(!0)},[v]),z=(0,c.useCallback)(a=>{j(b=>({...b,type:a,..."sqlite"===a||"csv"===a?{host:"",port:"0",user:"",password:"",database:"",ssl:!1}:{port:String(D[a]),filePath:""}})),"csv"!==a&&p([])},[]),A=(0,c.useCallback)(async()=>{l(!0),n(null);try{let a=await t.mutateAsync({name:i.name||"Test",type:i.type,host:i.host||"",port:parseInt(i.port)||D[i.type],user:i.user||"",password:i.password||"",database:i.database||"",ssl:i.ssl,filePath:i.filePath||void 0});n(a)}catch(a){n({success:!1,error:a.message||"Connection test failed"})}finally{l(!1)}},[i,t]),B=(0,c.useCallback)(async()=>{try{let b={name:i.name,type:i.type,host:i.host||"",port:parseInt(i.port)||D[i.type],user:i.user||"",password:i.password||"",database:i.database||"",ssl:i.ssl,filePath:i.filePath||void 0};if(g)await s.mutateAsync({id:g,data:b}),e.toast.success("Connection updated");else{let a=await r.mutateAsync(b);if("csv"===i.type&&o.length>0&&a.connection){let b=a.connection.id,c=0;for(let a of o)try{await u.mutateAsync({connectionId:b,csvContent:a.content,tableName:a.tableName,fileName:a.fileName}),c++}catch(b){e.toast.error(`Failed to import ${a.fileName}: ${b.message}`)}e.toast.success(c>0?`Connection created with ${c} CSV file(s) imported`:"Connection added")}else e.toast.success("Connection added");p([])}f(!1),a()}catch(a){e.toast.error(a.message||"Failed to save connection")}},[i,g,r,s,u,o,a]),C=(0,c.useCallback)(a=>{let b=a.target.files?.[0];if(!b)return;let c=Y(b.name),d=new FileReader;d.onload=a=>{let d=a.target?.result||"",e=W(d,4);p(a=>[...a,{fileName:b.name,tableName:c,content:d,fileSize:b.size,previewRows:e}])},d.readAsText(b),q.current&&(q.current.value="")},[]),F=(0,c.useCallback)(a=>{p(b=>b.filter((b,c)=>c!==a))},[]),G=(0,c.useCallback)((a,b)=>{p(c=>c.map((c,d)=>d===a?{...c,tableName:b}:c))},[]),H=!!i.name.trim()&&("sqlite"===i.type?!!i.filePath?.trim():"csv"===i.type?!!g||o.length>0:!!(i.host.trim()&&i.port.trim()&&i.user.trim()&&i.password.trim()&&i.database.trim()));return{dialogOpen:b,setDialogOpen:f,editingId:g,form:i,setForm:j,isLocalType:w,testingConnection:k,testResult:m,pendingCsvFiles:o,pendingCsvFileRef:q,isFormValid:H,isSaving:r.isPending||s.isPending,openAddDialog:x,openEditDialog:y,handleTypeChange:z,handleTestConnection:A,handleSave:B,handlePendingCsvFileSelect:C,removePendingCsvFile:F,updatePendingTableName:G}}({onSaved:o}),q=function({onImported:a}){let[b,f]=(0,c.useState)(!1),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(""),[m,n]=(0,c.useState)(""),[o,p]=(0,c.useState)(0),[q,r]=(0,c.useState)([]),[s,t]=(0,c.useState)(!1),u=(0,c.useRef)(null),v=d.api.connection.importCsv.useMutation(),w=(0,c.useCallback)(a=>{h(a),j(""),l(""),n(""),p(0),r([]),f(!0),u.current&&(u.current.value="")},[]),x=(0,c.useCallback)(a=>{let b=a.target.files?.[0];if(!b)return;l(b.name),p(b.size),j(Y(b.name));let c=new FileReader;c.onload=a=>{let b=a.target?.result||"";n(b),r(W(b,6))},c.readAsText(b)},[]),y=(0,c.useCallback)(async()=>{if(g&&m&&i){t(!0);try{let b=await v.mutateAsync({connectionId:g,csvContent:m,tableName:i,fileName:k});e.toast.success(`Imported ${b.rowCount} rows into table "${b.tableName}"`),f(!1),a()}catch(a){e.toast.error(a.message||"Failed to import CSV")}finally{t(!1)}}},[g,m,i,k,v,a]),z=!!(m&&i.trim());return{dialogOpen:b,setDialogOpen:f,tableName:i,setTableName:j,fileName:k,fileSize:o,content:m,previewRows:q,importing:s,fileRef:u,isImportValid:z,openDialog:w,handleFileSelect:x,handleImport:y}}({onImported:o}),r=(0,c.useCallback)(async(a,b)=>{if(confirm(`Delete connection "${b}"? This cannot be undone.`))try{await g.mutateAsync({id:a}),e.toast.success("Connection deleted"),o()}catch(a){e.toast.error(a.message||"Failed to delete connection")}},[g,o]),s=(0,c.useCallback)(async a=>{try{await h.mutateAsync({id:a}),o(),e.toast.success("Active connection updated")}catch(a){e.toast.error(a.message||"Failed to set active connection")}},[h,o]),t=(0,c.useCallback)(async a=>{try{let b=await i.mutateAsync({id:a});b.success?e.toast.success(`Connection successful (${b.latencyMs}ms)`):e.toast.error(`Connection failed: ${b.error}`)}catch(a){e.toast.error(a.message||"Test failed")}},[i]),u=(0,c.useCallback)(async(a,b)=>{if(confirm(`Remove table "${b}"? This will delete the imported data.`))try{await j.mutateAsync({connectionId:a,tableName:b}),e.toast.success(`Table "${b}" removed`),o()}catch(a){e.toast.error(a.message||"Failed to remove table")}},[j,o]);return(0,b.jsxs)("div",{className:"min-h-screen bg-background overflow-x-hidden",children:[(0,b.jsx)(m,{onAddConnection:p.openAddDialog}),(0,b.jsx)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 -mt-4 sm:-mt-8 pb-8 sm:pb-12",children:(0,b.jsx)(N,{connections:l,activeConnectionId:n,isLoading:f,isTestPending:i.isPending,onAdd:p.openAddDialog,onSetActive:s,onTestExisting:t,onEdit:p.openEditDialog,onDelete:r,onImportCsv:q.openDialog})}),(0,b.jsx)(Z,{formHook:p,connections:l,onOpenCsvImport:q.openDialog,onRemoveCsvTable:u}),(0,b.jsx)(ag,{csvImport:q})]})}a.s(["ConnectionsPage",()=>ai],935736)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_components_connections_connections-page_tsx_a8fa3df0._.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[845158,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944),e=a.i(833039);a.i(397133);var f=a.i(906118);let g=new WeakMap;var h=a.i(101880),i=a.i(823292),j=a.i(699570),k=a.i(591119),l=a.i(220494),m=a.i(915618);let n=(0,f.atom)({connections:[],activeConnectionId:null});var o=a.i(238246),p=a.i(870430),q=a.i(580701),r=a.i(400210),s=a.i(953722),t=a.i(669520),u=a.i(596221),v=a.i(883706);let w=(0,v.default)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),x=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var y=a.i(808406);let z=(0,v.default)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]);function A({selectedConnectionId:a,entryCount:c,isRegenerating:f,onConnectionChange:g,onAddEntry:h,onGenerateFromText:i,onAutoGenerate:k,onRegenerateEmbeddings:v}){let A=(0,d.useRouter)(),{connections:B}=(0,e.useAtomValue)(n);return(0,b.jsx)("header",{className:"border-b border-border/40 bg-background/80 backdrop-blur sticky top-0 z-10",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-4 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)(j.Button,{variant:"ghost",size:"sm",onClick:()=>A.push("/"),className:"gap-1.5",children:[(0,b.jsx)(r.ArrowLeft,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Back to Chat"})]}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsx)("h1",{className:"text-sm font-semibold",children:"CLAY"})]}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xl sm:text-2xl font-bold tracking-tight flex items-center gap-2",children:[(0,b.jsx)(s.BookOpen,{className:"h-5 w-5 sm:h-6 sm:w-6"}),"Knowledge Base"]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Add context about your database to help AI write better queries."})]}),B.length>0&&(0,b.jsxs)("div",{className:"flex items-center gap-2 flex-wrap shrink-0",children:[(0,b.jsx)(j.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 text-xs",children:(0,b.jsxs)(o.default,{href:"/connections",children:[(0,b.jsx)(z,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Connections"})]})}),(0,b.jsx)(j.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 text-xs",children:(0,b.jsxs)(o.default,{href:"/ai-providers",children:[(0,b.jsx)(y.Sparkles,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"AI Providers"})]})}),(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:k,disabled:!a,className:"gap-1.5 text-xs",children:[(0,b.jsx)(x,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Auto"})," Generate"]}),(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:i,disabled:!a,className:"gap-1.5 text-xs",children:[(0,b.jsx)(w,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"From"})," Text"]}),c>0&&(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:v,disabled:!a||f,className:"gap-1.5 text-xs",title:"Regenerate vector embeddings for semantic search",children:[f?(0,b.jsx)(u.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,b.jsx)(t.RefreshCw,{className:"h-3.5 w-3.5"}),"Rebuild"]}),(0,b.jsxs)(j.Button,{size:"sm",onClick:h,disabled:!a,className:"gap-1.5",children:[(0,b.jsx)(m.Plus,{className:"h-4 w-4"}),"Add"]})]})]}),B.length>0&&(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(p.Label,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Connection:"}),(0,b.jsxs)(q.Select,{value:a,onValueChange:g,children:[(0,b.jsx)(q.SelectTrigger,{className:"w-full sm:w-[280px]",children:(0,b.jsx)(q.SelectValue,{placeholder:"Select a connection"})}),(0,b.jsx)(q.SelectContent,{children:B.map(a=>(0,b.jsx)(q.SelectItem,{value:a.id,children:(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)(l.Database,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.name,(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.type,")"]})]})},a.id))})]})]})]})})}var B=a.i(866718),C=a.i(786304),D=a.i(875083),E=a.i(587532),F=a.i(546842),G=a.i(781560);function H({searchQuery:a,onSearchChange:c,activeTab:d,onTabChange:e,totalCount:f,humanCount:g,aiCount:h,onClear:i,isClearing:k}){let l="human"===d?g:"ai"===d?h:f;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(E.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,b.jsx)(B.Input,{placeholder:"Search knowledge base...",value:a,onChange:a=>c(a.target.value),className:"pl-9"})]}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[(0,b.jsx)(D.Tabs,{value:d,onValueChange:e,children:(0,b.jsxs)(D.TabsList,{className:"w-full sm:w-auto",children:[(0,b.jsxs)(D.TabsTrigger,{value:"all",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:["All",(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:f})]}),(0,b.jsxs)(D.TabsTrigger,{value:"human",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:[(0,b.jsx)(F.User,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden xs:inline",children:"Human"}),(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:g})]}),(0,b.jsxs)(D.TabsTrigger,{value:"ai",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:[(0,b.jsx)(y.Sparkles,{className:"h-3.5 w-3.5"}),"AI",(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:h})]})]})}),l>0&&(0,b.jsxs)(j.Button,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10 gap-1.5 h-8 text-xs self-end sm:self-auto",onClick:i,disabled:k,children:[(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"}),"human"===d?"Clear Human":"ai"===d?"Clear AI":"Clear All"]})]})]})}let I=(0,v.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var J=a.i(111989),J=J,K=a.i(699464),L=a.i(368114);function M({entry:a,onEdit:c,onDelete:d}){let e="ai_generated"===a.source;return(0,b.jsxs)(k.Card,{className:"transition-all hover:border-border/80 group",children:[(0,b.jsx)(k.CardHeader,{className:"p-4 sm:p-6 pb-2 sm:pb-2",children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-2 sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,b.jsxs)(C.Badge,{variant:"outline",className:(0,L.cn)("text-[10px] gap-1 shrink-0","ai_generated"===a.source?"text-purple-400 bg-purple-400/10 border-purple-400/20":"text-zinc-400 bg-zinc-400/10 border-zinc-400/20"),children:[e?(0,b.jsx)(y.Sparkles,{className:"h-3 w-3"}):(0,b.jsx)(F.User,{className:"h-3 w-3"}),e?"AI":"Human"]})}),(0,b.jsx)(k.CardTitle,{className:"text-sm font-medium wrap-break-word",children:a.title})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(j.Button,{variant:"ghost",size:"sm",onClick:()=>c(a),className:"h-7 w-7 p-0",children:(0,b.jsx)(K.Pencil,{className:"h-3 w-3"})}),(0,b.jsx)(j.Button,{variant:"ghost",size:"sm",onClick:()=>d(a.pubId,a.title),className:"h-7 w-7 p-0 text-destructive hover:text-destructive",children:(0,b.jsx)(G.Trash2,{className:"h-3 w-3"})})]})]})}),(0,b.jsxs)(k.CardContent,{className:"p-4 sm:p-6 pt-0 sm:pt-0",children:[(0,b.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground whitespace-pre-wrap line-clamp-3 sm:line-clamp-4",children:a.content}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground/60 mt-2",children:new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]})}function N({entries:a,isLoading:d,searchQuery:e,onEdit:f,onDelete:g,onAddFirst:h}){let[i,l]=(0,c.useState)(1),n=Math.max(1,Math.ceil(a.length/10));(0,c.useEffect)(()=>{l(1)},[a.length,e]),(0,c.useEffect)(()=>{i>n&&l(n)},[i,n]);let o=(0,c.useMemo)(()=>{let b=(i-1)*10;return a.slice(b,b+10)},[a,i]);return d?(0,b.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,b.jsx)(u.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===a.length?(0,b.jsx)(k.Card,{className:"border-dashed",children:(0,b.jsxs)(k.CardContent,{className:"flex flex-col items-center justify-center py-16",children:[(0,b.jsx)("div",{className:"rounded-full bg-muted p-4 mb-4",children:(0,b.jsx)(s.BookOpen,{className:"h-8 w-8 text-muted-foreground"})}),(0,b.jsx)("h3",{className:"text-lg font-semibold mb-1",children:e?"No results found":"No knowledge entries yet"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-6 text-center max-w-sm",children:e?"Try a different search query.":"Add knowledge about your database to help AI understand your schema, business logic, and conventions."}),!e&&(0,b.jsxs)(j.Button,{onClick:h,className:"gap-1.5",children:[(0,b.jsx)(m.Plus,{className:"h-4 w-4"}),"Add First Entry"]})]})}):(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"space-y-3",children:o.map(a=>(0,b.jsx)(M,{entry:a,onEdit:f,onDelete:g},a.pubId))}),n>1&&(0,b.jsx)(O,{currentPage:i,totalPages:n,totalEntries:a.length,onPageChange:l})]})}function O({currentPage:a,totalPages:d,totalEntries:e,onPageChange:f}){let g=(0,c.useMemo)(()=>(function(a,b){if(b<=7)return Array.from({length:b},(a,b)=>b+1);let c=[],d=Math.max(2,a-1),e=Math.min(b-1,a+1);c.push(1),d>2&&c.push("...");for(let a=d;a<=e;a++)c.push(a);return e<b-1&&c.push("..."),c.push(b),c})(a,d),[a,d]),h=(a-1)*10+1,i=Math.min(10*a,e);return(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[h,"–",i," of ",e]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(j.Button,{variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:1===a,onClick:()=>f(a-1),children:(0,b.jsx)(I,{className:"h-4 w-4"})}),g.map((c,d)=>"..."===c?(0,b.jsx)("span",{className:"px-1 text-xs text-muted-foreground select-none",children:"..."},`ellipsis-${d}`):(0,b.jsx)(j.Button,{variant:c===a?"default":"outline",size:"sm",className:(0,L.cn)("h-8 w-8 p-0 text-xs",c===a&&"pointer-events-none"),onClick:()=>f(c),children:c},c)),(0,b.jsx)(j.Button,{variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:a===d,onClick:()=>f(a+1),children:(0,b.jsx)(J.default,{className:"h-4 w-4"})})]})]})}var P=a.i(429246),Q=a.i(814574);function R({open:a,onOpenChange:c,editingPubId:d,form:e,onFormChange:f,isFormValid:g,isSaving:h,onSave:i}){return(0,b.jsx)(Q.Dialog,{open:a,onOpenChange:c,children:(0,b.jsxs)(Q.DialogContent,{className:"sm:max-w-lg max-h-[85vh] flex! flex-col! p-4 sm:p-6",children:[(0,b.jsxs)(Q.DialogHeader,{className:"shrink-0",children:[(0,b.jsx)(Q.DialogTitle,{children:d?"Edit Knowledge Entry":"Add Knowledge Entry"}),(0,b.jsx)(Q.DialogDescription,{children:d?"Update this knowledge entry.":"Add context about your database to improve AI query accuracy."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(p.Label,{htmlFor:"kb-title",children:"Title"}),(0,b.jsx)(B.Input,{id:"kb-title",placeholder:"e.g. User status enum values, Revenue calculation logic",value:e.title,onChange:a=>f(b=>({...b,title:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(p.Label,{htmlFor:"kb-content",children:"Content"}),(0,b.jsx)(P.Textarea,{id:"kb-content",placeholder:`Describe the knowledge here. For example:
|
|
1
|
+
module.exports=[845158,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(50944),e=a.i(833039);a.i(397133);var f=a.i(906118);let g=new WeakMap;var h=a.i(101880),i=a.i(823292),j=a.i(699570),k=a.i(591119),l=a.i(220494),m=a.i(915618);let n=(0,f.atom)({connections:[],activeConnectionId:null});var o=a.i(238246),p=a.i(870430),q=a.i(580701),r=a.i(400210),s=a.i(953722),t=a.i(669520),u=a.i(596221),v=a.i(883706);let w=(0,v.default)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),x=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);var y=a.i(808406);let z=(0,v.default)("cable",[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]);function A({selectedConnectionId:a,entryCount:c,isRegenerating:f,onConnectionChange:g,onAddEntry:h,onGenerateFromText:i,onAutoGenerate:k,onRegenerateEmbeddings:v}){let A=(0,d.useRouter)(),{connections:B}=(0,e.useAtomValue)(n);return(0,b.jsx)("header",{className:"border-b border-border/40 bg-background/80 backdrop-blur sticky top-0 z-10",children:(0,b.jsxs)("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-4 space-y-4",children:[(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsxs)(j.Button,{variant:"ghost",size:"sm",onClick:()=>A.push("/"),className:"gap-1.5",children:[(0,b.jsx)(r.ArrowLeft,{className:"h-4 w-4"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Back to Chat"})]}),(0,b.jsx)("div",{className:"flex-1"}),(0,b.jsx)("h1",{className:"text-sm font-semibold uppercase tracking-wider",children:"SQLBOT"})]}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsxs)("h2",{className:"text-xl sm:text-2xl font-bold tracking-tight flex items-center gap-2",children:[(0,b.jsx)(s.BookOpen,{className:"h-5 w-5 sm:h-6 sm:w-6"}),"Knowledge Base"]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Add context about your database to help AI write better queries."})]}),B.length>0&&(0,b.jsxs)("div",{className:"flex items-center gap-2 flex-wrap shrink-0",children:[(0,b.jsx)(j.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 text-xs",children:(0,b.jsxs)(o.default,{href:"/connections",children:[(0,b.jsx)(z,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Connections"})]})}),(0,b.jsx)(j.Button,{asChild:!0,variant:"outline",size:"sm",className:"gap-1.5 text-xs",children:(0,b.jsxs)(o.default,{href:"/ai-providers",children:[(0,b.jsx)(y.Sparkles,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"AI Providers"})]})}),(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:k,disabled:!a,className:"gap-1.5 text-xs",children:[(0,b.jsx)(x,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"Auto"})," Generate"]}),(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:i,disabled:!a,className:"gap-1.5 text-xs",children:[(0,b.jsx)(w,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:"From"})," Text"]}),c>0&&(0,b.jsxs)(j.Button,{variant:"outline",size:"sm",onClick:v,disabled:!a||f,className:"gap-1.5 text-xs",title:"Regenerate vector embeddings for semantic search",children:[f?(0,b.jsx)(u.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,b.jsx)(t.RefreshCw,{className:"h-3.5 w-3.5"}),"Rebuild"]}),(0,b.jsxs)(j.Button,{size:"sm",onClick:h,disabled:!a,className:"gap-1.5",children:[(0,b.jsx)(m.Plus,{className:"h-4 w-4"}),"Add"]})]})]}),B.length>0&&(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(p.Label,{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Connection:"}),(0,b.jsxs)(q.Select,{value:a,onValueChange:g,children:[(0,b.jsx)(q.SelectTrigger,{className:"w-full sm:w-[280px]",children:(0,b.jsx)(q.SelectValue,{placeholder:"Select a connection"})}),(0,b.jsx)(q.SelectContent,{children:B.map(a=>(0,b.jsx)(q.SelectItem,{value:a.id,children:(0,b.jsxs)("span",{className:"flex items-center gap-2",children:[(0,b.jsx)(l.Database,{className:"h-3.5 w-3.5 text-muted-foreground"}),a.name,(0,b.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.type,")"]})]})},a.id))})]})]})]})})}var B=a.i(866718),C=a.i(786304),D=a.i(875083),E=a.i(587532),F=a.i(546842),G=a.i(781560);function H({searchQuery:a,onSearchChange:c,activeTab:d,onTabChange:e,totalCount:f,humanCount:g,aiCount:h,onClear:i,isClearing:k}){let l="human"===d?g:"ai"===d?h:f;return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(E.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,b.jsx)(B.Input,{placeholder:"Search knowledge base...",value:a,onChange:a=>c(a.target.value),className:"pl-9"})]}),(0,b.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[(0,b.jsx)(D.Tabs,{value:d,onValueChange:e,children:(0,b.jsxs)(D.TabsList,{className:"w-full sm:w-auto",children:[(0,b.jsxs)(D.TabsTrigger,{value:"all",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:["All",(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:f})]}),(0,b.jsxs)(D.TabsTrigger,{value:"human",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:[(0,b.jsx)(F.User,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{className:"hidden xs:inline",children:"Human"}),(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:g})]}),(0,b.jsxs)(D.TabsTrigger,{value:"ai",className:"gap-1 sm:gap-1.5 flex-1 sm:flex-initial text-xs sm:text-sm",children:[(0,b.jsx)(y.Sparkles,{className:"h-3.5 w-3.5"}),"AI",(0,b.jsx)(C.Badge,{variant:"secondary",className:"text-[10px] px-1.5 h-4",children:h})]})]})}),l>0&&(0,b.jsxs)(j.Button,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive hover:bg-destructive/10 gap-1.5 h-8 text-xs self-end sm:self-auto",onClick:i,disabled:k,children:[(0,b.jsx)(G.Trash2,{className:"h-3.5 w-3.5"}),"human"===d?"Clear Human":"ai"===d?"Clear AI":"Clear All"]})]})]})}let I=(0,v.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var J=a.i(111989),J=J,K=a.i(699464),L=a.i(368114);function M({entry:a,onEdit:c,onDelete:d}){let e="ai_generated"===a.source;return(0,b.jsxs)(k.Card,{className:"transition-all hover:border-border/80 group",children:[(0,b.jsx)(k.CardHeader,{className:"p-4 sm:p-6 pb-2 sm:pb-2",children:(0,b.jsxs)("div",{className:"flex items-start justify-between gap-2 sm:gap-3",children:[(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("div",{className:"flex items-center gap-2 mb-1",children:(0,b.jsxs)(C.Badge,{variant:"outline",className:(0,L.cn)("text-[10px] gap-1 shrink-0","ai_generated"===a.source?"text-purple-400 bg-purple-400/10 border-purple-400/20":"text-zinc-400 bg-zinc-400/10 border-zinc-400/20"),children:[e?(0,b.jsx)(y.Sparkles,{className:"h-3 w-3"}):(0,b.jsx)(F.User,{className:"h-3 w-3"}),e?"AI":"Human"]})}),(0,b.jsx)(k.CardTitle,{className:"text-sm font-medium wrap-break-word",children:a.title})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 shrink-0 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",children:[(0,b.jsx)(j.Button,{variant:"ghost",size:"sm",onClick:()=>c(a),className:"h-7 w-7 p-0",children:(0,b.jsx)(K.Pencil,{className:"h-3 w-3"})}),(0,b.jsx)(j.Button,{variant:"ghost",size:"sm",onClick:()=>d(a.pubId,a.title),className:"h-7 w-7 p-0 text-destructive hover:text-destructive",children:(0,b.jsx)(G.Trash2,{className:"h-3 w-3"})})]})]})}),(0,b.jsxs)(k.CardContent,{className:"p-4 sm:p-6 pt-0 sm:pt-0",children:[(0,b.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground whitespace-pre-wrap line-clamp-3 sm:line-clamp-4",children:a.content}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground/60 mt-2",children:new Date(a.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})})]})]})}function N({entries:a,isLoading:d,searchQuery:e,onEdit:f,onDelete:g,onAddFirst:h}){let[i,l]=(0,c.useState)(1),n=Math.max(1,Math.ceil(a.length/10));(0,c.useEffect)(()=>{l(1)},[a.length,e]),(0,c.useEffect)(()=>{i>n&&l(n)},[i,n]);let o=(0,c.useMemo)(()=>{let b=(i-1)*10;return a.slice(b,b+10)},[a,i]);return d?(0,b.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,b.jsx)(u.Loader2,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):0===a.length?(0,b.jsx)(k.Card,{className:"border-dashed",children:(0,b.jsxs)(k.CardContent,{className:"flex flex-col items-center justify-center py-16",children:[(0,b.jsx)("div",{className:"rounded-full bg-muted p-4 mb-4",children:(0,b.jsx)(s.BookOpen,{className:"h-8 w-8 text-muted-foreground"})}),(0,b.jsx)("h3",{className:"text-lg font-semibold mb-1",children:e?"No results found":"No knowledge entries yet"}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-6 text-center max-w-sm",children:e?"Try a different search query.":"Add knowledge about your database to help AI understand your schema, business logic, and conventions."}),!e&&(0,b.jsxs)(j.Button,{onClick:h,className:"gap-1.5",children:[(0,b.jsx)(m.Plus,{className:"h-4 w-4"}),"Add First Entry"]})]})}):(0,b.jsxs)("div",{className:"space-y-4",children:[(0,b.jsx)("div",{className:"space-y-3",children:o.map(a=>(0,b.jsx)(M,{entry:a,onEdit:f,onDelete:g},a.pubId))}),n>1&&(0,b.jsx)(O,{currentPage:i,totalPages:n,totalEntries:a.length,onPageChange:l})]})}function O({currentPage:a,totalPages:d,totalEntries:e,onPageChange:f}){let g=(0,c.useMemo)(()=>(function(a,b){if(b<=7)return Array.from({length:b},(a,b)=>b+1);let c=[],d=Math.max(2,a-1),e=Math.min(b-1,a+1);c.push(1),d>2&&c.push("...");for(let a=d;a<=e;a++)c.push(a);return e<b-1&&c.push("..."),c.push(b),c})(a,d),[a,d]),h=(a-1)*10+1,i=Math.min(10*a,e);return(0,b.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,b.jsxs)("p",{className:"text-xs text-muted-foreground",children:[h,"–",i," of ",e]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(j.Button,{variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:1===a,onClick:()=>f(a-1),children:(0,b.jsx)(I,{className:"h-4 w-4"})}),g.map((c,d)=>"..."===c?(0,b.jsx)("span",{className:"px-1 text-xs text-muted-foreground select-none",children:"..."},`ellipsis-${d}`):(0,b.jsx)(j.Button,{variant:c===a?"default":"outline",size:"sm",className:(0,L.cn)("h-8 w-8 p-0 text-xs",c===a&&"pointer-events-none"),onClick:()=>f(c),children:c},c)),(0,b.jsx)(j.Button,{variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:a===d,onClick:()=>f(a+1),children:(0,b.jsx)(J.default,{className:"h-4 w-4"})})]})]})}var P=a.i(429246),Q=a.i(814574);function R({open:a,onOpenChange:c,editingPubId:d,form:e,onFormChange:f,isFormValid:g,isSaving:h,onSave:i}){return(0,b.jsx)(Q.Dialog,{open:a,onOpenChange:c,children:(0,b.jsxs)(Q.DialogContent,{className:"sm:max-w-lg max-h-[85vh] flex! flex-col! p-4 sm:p-6",children:[(0,b.jsxs)(Q.DialogHeader,{className:"shrink-0",children:[(0,b.jsx)(Q.DialogTitle,{children:d?"Edit Knowledge Entry":"Add Knowledge Entry"}),(0,b.jsx)(Q.DialogDescription,{children:d?"Update this knowledge entry.":"Add context about your database to improve AI query accuracy."})]}),(0,b.jsxs)("div",{className:"space-y-4 py-2 overflow-y-auto flex-1 min-h-0",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(p.Label,{htmlFor:"kb-title",children:"Title"}),(0,b.jsx)(B.Input,{id:"kb-title",placeholder:"e.g. User status enum values, Revenue calculation logic",value:e.title,onChange:a=>f(b=>({...b,title:a.target.value}))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(p.Label,{htmlFor:"kb-content",children:"Content"}),(0,b.jsx)(P.Textarea,{id:"kb-content",placeholder:`Describe the knowledge here. For example:
|
|
2
2
|
|
|
3
3
|
- Column descriptions and their meanings
|
|
4
4
|
- Business logic and rules
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--H1e0tcZUy_dcOaNBJh3iW--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/2473c16c0c2f6b5f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/3799f4ad1dc31445.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/124bc670aadbcaaa.js"/><script src="/_next/static/chunks/e49035715a3b468c.js" async=""></script><script src="/_next/static/chunks/8b181cdae656a3a3.js" async=""></script><script src="/_next/static/chunks/ee4ef5db2df5a4d4.js" async=""></script><script src="/_next/static/chunks/3d40e553ae400c39.js" async=""></script><script src="/_next/static/chunks/turbopack-e0f8f63596dbdf82.js" async=""></script><script src="/_next/static/chunks/8d7447b91a6a2b1d.js" async=""></script><script src="/_next/static/chunks/44306e436a72cf18.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/d80b3790a119a285.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>CLAY</title><meta name="description" content="Ask questions about your database in natural language"/><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased"><div hidden=""><!--$--><!--/$--></div><style>#nprogress{pointer-events:none}#nprogress .bar{background:var(--primary);position:fixed;z-index:1600;top: 0;left:0;width:100%;height:3px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px var(--primary),0 0 5px var(--primary);opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1600;top: 15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:var(--primary);border-left-color:var(--primary);border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}</style><noscript><div class="fixed top-0 left-0 w-full bg-orange-500 text-foreground p-4 text-center z-1000">JavaScript is disabled in your browser. Please enable JavaScript to use all features of this application.</div></noscript><!--$--><!--/$--><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/124bc670aadbcaaa.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[818421,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"default\"]\n4:I[12985,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"NuqsAdapter\"]\n5:I[289062,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"JotaiProvider\"]\n6:I[874998,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"TRPCProvider\"]\n7:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n8:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n9:I[846696,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"Toaster\"]\na:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"OutletBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"ViewportBoundary\"]\nf:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"MetadataBoundary\"]\n11:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n:HL[\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"style\"]\n:HL[\"/_next/static/chunks/3799f4ad1dc31445.css\",\"style\"]\n3:[\"$\",\"div\",null,{\"className\":\"fixed top-0 left-0 w-full bg-orange-500 text-foreground p-4 text-center z-1000\",\"children\":\"JavaScript is disabled in your browser. Please enable JavaScript to use all features of this application.\"}]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"H1e0tcZUy-dcOaNBJh3iW\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/3799f4ad1dc31445.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/44306e436a72cf18.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"showSpinner\":false,\"color\":\"var(--primary)\"}],[\"$\",\"noscript\",null,{\"children\":\"$3\"}],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}],[\"$\",\"$L9\",null,{\"richColors\":true,\"position\":\"top-center\"}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$La\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@c\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Ld\",null,{\"children\":\"$@e\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"12:I[27201,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"IconMark\"]\n10:[[\"$\",\"title\",\"0\",{\"children\":\"CLAY\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Ask questions about your database in natural language\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L12\",\"3\",{}]]\nc:null\n"])</script></body></html>
|
|
1
|
+
<!DOCTYPE html><!--zCAPedmpW7JHLJhWpOgp0--><html lang="en" class="dark"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/2473c16c0c2f6b5f.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/f0df418fe5859df9.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/124bc670aadbcaaa.js"/><script src="/_next/static/chunks/e49035715a3b468c.js" async=""></script><script src="/_next/static/chunks/8b181cdae656a3a3.js" async=""></script><script src="/_next/static/chunks/ee4ef5db2df5a4d4.js" async=""></script><script src="/_next/static/chunks/3d40e553ae400c39.js" async=""></script><script src="/_next/static/chunks/turbopack-e0f8f63596dbdf82.js" async=""></script><script src="/_next/static/chunks/8d7447b91a6a2b1d.js" async=""></script><script src="/_next/static/chunks/44306e436a72cf18.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/d80b3790a119a285.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>SQLBOT</title><meta name="description" content="Ask questions about your database in natural language"/><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased"><div hidden=""><!--$--><!--/$--></div><style>#nprogress{pointer-events:none}#nprogress .bar{background:var(--primary);position:fixed;z-index:1600;top: 0;left:0;width:100%;height:3px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px var(--primary),0 0 5px var(--primary);opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1600;top: 15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:var(--primary);border-left-color:var(--primary);border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}</style><noscript><div class="fixed top-0 left-0 w-full bg-orange-500 text-foreground p-4 text-center z-1000">JavaScript is disabled in your browser. Please enable JavaScript to use all features of this application.</div></noscript><!--$--><!--/$--><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><script src="/_next/static/chunks/124bc670aadbcaaa.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[818421,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"default\"]\n4:I[12985,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"NuqsAdapter\"]\n5:I[289062,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"JotaiProvider\"]\n6:I[874998,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"TRPCProvider\"]\n7:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n8:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n9:I[846696,[\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"/_next/static/chunks/44306e436a72cf18.js\"],\"Toaster\"]\na:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"OutletBoundary\"]\nb:\"$Sreact.suspense\"\nd:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"ViewportBoundary\"]\nf:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"MetadataBoundary\"]\n11:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n:HL[\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"style\"]\n:HL[\"/_next/static/chunks/f0df418fe5859df9.css\",\"style\"]\n3:[\"$\",\"div\",null,{\"className\":\"fixed top-0 left-0 w-full bg-orange-500 text-foreground p-4 text-center z-1000\",\"children\":\"JavaScript is disabled in your browser. Please enable JavaScript to use all features of this application.\"}]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"zCAPedmpW7JHLJhWpOgp0\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/2473c16c0c2f6b5f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/f0df418fe5859df9.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/8d7447b91a6a2b1d.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/44306e436a72cf18.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"dark\",\"children\":[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"showSpinner\":false,\"color\":\"var(--primary)\"}],[\"$\",\"noscript\",null,{\"children\":\"$3\"}],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]}],[\"$\",\"$L9\",null,{\"richColors\":true,\"position\":\"top-center\"}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L7\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L8\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:props:children:2:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$La\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@c\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Ld\",null,{\"children\":\"$@e\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$b\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@10\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$11\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"12:I[27201,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"IconMark\"]\n10:[[\"$\",\"title\",\"0\",{\"children\":\"SQLBOT\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Ask questions about your database in natural language\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$L12\",\"3\",{}]]\nc:null\n"])</script></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/124bc670aadbcaaa.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--zCAPedmpW7JHLJhWpOgp0--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/124bc670aadbcaaa.js"/><script src="/_next/static/chunks/e49035715a3b468c.js" async=""></script><script src="/_next/static/chunks/8b181cdae656a3a3.js" async=""></script><script src="/_next/static/chunks/ee4ef5db2df5a4d4.js" async=""></script><script src="/_next/static/chunks/3d40e553ae400c39.js" async=""></script><script src="/_next/static/chunks/turbopack-e0f8f63596dbdf82.js" async=""></script><script src="/_next/static/chunks/d96012bcfc98706a.js" async=""></script><script src="/_next/static/chunks/d80b3790a119a285.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><link rel="icon" href="/favicon.ico?favicon.0b3bf435.ico" sizes="256x256" type="image/x-icon"/><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/124bc670aadbcaaa.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[339756,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n3:I[837457,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n4:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"ViewportBoundary\"]\n9:I[897367,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"MetadataBoundary\"]\nb:I[168027,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"zCAPedmpW7JHLJhWpOgp0\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$@8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@a\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"c:I[27201,[\"/_next/static/chunks/d96012bcfc98706a.js\",\"/_next/static/chunks/d80b3790a119a285.js\"],\"IconMark\"]\na:[[\"$\",\"link\",\"0\",{\"rel\":\"icon\",\"href\":\"/favicon.ico?favicon.0b3bf435.ico\",\"sizes\":\"256x256\",\"type\":\"image/x-icon\"}],[\"$\",\"$Lc\",\"1\",{}]]\n6:null\n"])</script></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,991918,820783,e=>{"use strict";let t,r,n;var o=e.i(271645);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){return t=>{let r=!1,n=e.map(e=>{let n=i(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():i(e[t],null)}}}}function a(...e){return o.useCallback(l(...e),e)}e.s(["composeRefs",()=>l,"useComposedRefs",()=>a],820783);var s=e.i(843476),c=Symbol.for("react.lazy"),d=o[" use ".trim().toString()];function u(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===c&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=((n=o.forwardRef((e,t)=>{let{children:r,...n}=e;if(u(r)&&"function"==typeof d&&(r=d(r._payload)),o.isValidElement(r)){var i;let e,a,s=(i=r,(a=(e=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.ref:(a=(e=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?i.props.ref:i.props.ref||i.ref),c=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==o.Fragment&&(c.ref=t?l(t,s):s),o.cloneElement(r,c)}return o.Children.count(r)>1?o.Children.only(null):null})).displayName="Slot.SlotClone",t=n,(r=o.forwardRef((e,r)=>{let{children:n,...i}=e;u(n)&&"function"==typeof d&&(n=d(n._payload));let l=o.Children.toArray(n),a=l.find(m);if(a){let e=a.props.children,n=l.map(t=>t!==a?t:o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null);return(0,s.jsx)(t,{...i,ref:r,children:o.isValidElement(e)?o.cloneElement(e,void 0,n):null})}return(0,s.jsx)(t,{...i,ref:r,children:n})})).displayName="Slot.Slot",r),p=Symbol("radix.slottable");function m(e){return o.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===p}e.s(["Slot",()=>f],991918)},207670,e=>{"use strict";function t(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=function e(t){var r,n,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(o&&(o+=" "),o+=n)}else for(n in t)t[n]&&(o&&(o+=" "),o+=n);return o}(e))&&(n&&(n+=" "),n+=t);return n}e.s(["clsx",()=>t])},225913,e=>{"use strict";var t=e.i(207670);let r=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,n=t.clsx;e.s(["cva",0,(e,t)=>o=>{var i;if((null==t?void 0:t.variants)==null)return n(e,null==o?void 0:o.class,null==o?void 0:o.className);let{variants:l,defaultVariants:a}=t,s=Object.keys(l).map(e=>{let t=null==o?void 0:o[e],n=null==a?void 0:a[e];if(null===t)return null;let i=r(t)||r(n);return l[e][i]}),c=o&&Object.entries(o).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return n(e,s,null==t||null==(i=t.compoundVariants)?void 0:i.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...c}[t]):({...a,...c})[t]===r})?[...e,r,n]:e},[]),null==o?void 0:o.class,null==o?void 0:o.className)}])},975157,919056,e=>{"use strict";var t=e.i(207670);let r=(e,t)=>{if(0===e.length)return t.classGroupId;let n=e[0],o=t.nextPart.get(n),i=o?r(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;let l=e.join("-");return t.validators.find(({validator:e})=>e(l))?.classGroupId},n=/^\[(.+)\]$/,o=(e,t,r,n)=>{e.forEach(e=>{if("string"==typeof e){(""===e?t:i(t,e)).classGroupId=r;return}"function"==typeof e?l(e)?o(e(n),t,r,n):t.validators.push({validator:e,classGroupId:r}):Object.entries(e).forEach(([e,l])=>{o(l,i(t,e),r,n)})})},i=(e,t)=>{let r=e;return t.split("-").forEach(e=>{r.nextPart.has(e)||r.nextPart.set(e,{nextPart:new Map,validators:[]}),r=r.nextPart.get(e)}),r},l=e=>e.isThemeGetter,a=/\s+/;function s(){let e,t,r=0,n="";for(;r<arguments.length;)(e=arguments[r++])&&(t=c(e))&&(n&&(n+=" "),n+=t);return n}let c=e=>{let t;if("string"==typeof e)return e;let r="";for(let n=0;n<e.length;n++)e[n]&&(t=c(e[n]))&&(r&&(r+=" "),r+=t);return r},d=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},u=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f=/^\((?:(\w[\w-]*):)?(.+)\)$/i,p=/^\d+\/\d+$/,m=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,g=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,y=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,v=e=>p.test(e),w=e=>!!e&&!Number.isNaN(Number(e)),x=e=>!!e&&Number.isInteger(Number(e)),k=e=>e.endsWith("%")&&w(e.slice(0,-1)),E=e=>m.test(e),C=()=>!0,R=e=>g.test(e)&&!h.test(e),S=()=>!1,P=e=>b.test(e),A=e=>y.test(e),z=e=>!L(e)&&!$(e),O=e=>V(e,X,S),L=e=>u.test(e),N=e=>V(e,q,R),T=e=>V(e,Z,w),j=e=>V(e,G,S),D=e=>V(e,Y,A),M=e=>V(e,J,P),$=e=>f.test(e),W=e=>U(e,q),_=e=>U(e,K),I=e=>U(e,G),F=e=>U(e,X),H=e=>U(e,Y),B=e=>U(e,J,!0),V=(e,t,r)=>{let n=u.exec(e);return!!n&&(n[1]?t(n[1]):r(n[2]))},U=(e,t,r=!1)=>{let n=f.exec(e);return!!n&&(n[1]?t(n[1]):r)},G=e=>"position"===e||"percentage"===e,Y=e=>"image"===e||"url"===e,X=e=>"length"===e||"size"===e||"bg-size"===e,q=e=>"length"===e,Z=e=>"number"===e,K=e=>"family-name"===e,J=e=>"shadow"===e,Q=function(e,...t){let i,l,c,d=function(a){var s;let f;return l=(i={cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,r=new Map,n=new Map,o=(o,i)=>{r.set(o,i),++t>e&&(t=0,n=r,r=new Map)};return{get(e){let t=r.get(e);return void 0!==t?t:void 0!==(t=n.get(e))?(o(e,t),t):void 0},set(e,t){r.has(e)?r.set(e,t):o(e,t)}}})((s=t.reduce((e,t)=>t(e),e())).cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:r}=e,n=e=>{let t,r,n=[],o=0,i=0,l=0;for(let t=0;t<e.length;t++){let a=e[t];if(0===o&&0===i){if(":"===a){n.push(e.slice(l,t)),l=t+1;continue}if("/"===a){r=t;continue}}"["===a?o++:"]"===a?o--:"("===a?i++:")"===a&&i--}let a=0===n.length?e:e.substring(l),s=(t=a).endsWith("!")?t.substring(0,t.length-1):t.startsWith("!")?t.substring(1):t;return{modifiers:n,hasImportantModifier:s!==a,baseClassName:s,maybePostfixModifierPosition:r&&r>l?r-l:void 0}};if(t){let e=t+":",r=n;n=t=>t.startsWith(e)?r(t.substring(e.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:t,maybePostfixModifierPosition:void 0}}if(r){let e=n;n=t=>r({className:t,parseClassName:e})}return n})(s),sortModifiers:(f=Object.fromEntries(s.orderSensitiveModifiers.map(e=>[e,!0])),e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(e=>{"["===e[0]||f[e]?(t.push(...r.sort(),e),r=[]):r.push(e)}),t.push(...r.sort()),t}),...(e=>{let t=(e=>{let{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(let e in r)o(r[e],n,e,t);return n})(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:e=>{let o=e.split("-");return""===o[0]&&1!==o.length&&o.shift(),r(o,t)||(e=>{if(n.test(e)){let t=n.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}})(e)},getConflictingClassGroupIds:(e,t)=>{let r=i[e]||[];return t&&l[e]?[...r,...l[e]]:r}}})(s)}).cache.get,c=i.cache.set,d=u,u(a)};function u(e){let t=l(e);if(t)return t;let r=((e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,l=[],s=e.trim().split(a),c="";for(let e=s.length-1;e>=0;e-=1){let t=s[e],{isExternal:a,modifiers:d,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:p}=r(t);if(a){c=t+(c.length>0?" "+c:c);continue}let m=!!p,g=n(m?f.substring(0,p):f);if(!g){if(!m||!(g=n(f))){c=t+(c.length>0?" "+c:c);continue}m=!1}let h=i(d).join(":"),b=u?h+"!":h,y=b+g;if(l.includes(y))continue;l.push(y);let v=o(g,m);for(let e=0;e<v.length;++e){let t=v[e];l.push(b+t)}c=t+(c.length>0?" "+c:c)}return c})(e,i);return c(e,r),r}return function(){return d(s.apply(null,arguments))}}(()=>{let e=d("color"),t=d("font"),r=d("text"),n=d("font-weight"),o=d("tracking"),i=d("leading"),l=d("breakpoint"),a=d("container"),s=d("spacing"),c=d("radius"),u=d("shadow"),f=d("inset-shadow"),p=d("text-shadow"),m=d("drop-shadow"),g=d("blur"),h=d("perspective"),b=d("aspect"),y=d("ease"),R=d("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...P(),$,L],V=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],G=()=>[$,L,s],Y=()=>[v,"full","auto",...G()],X=()=>[x,"none","subgrid",$,L],q=()=>["auto",{span:["full",x,$,L]},x,$,L],Z=()=>[x,"auto",$,L],K=()=>["auto","min","max","fr",$,L],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...G()],et=()=>[v,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],er=()=>[e,$,L],en=()=>[...P(),I,j,{position:[$,L]}],eo=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ei=()=>["auto","cover","contain",F,O,{size:[$,L]}],el=()=>[k,W,N],ea=()=>["","none","full",c,$,L],es=()=>["",w,W,N],ec=()=>["solid","dashed","dotted","double"],ed=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eu=()=>[w,k,I,j],ef=()=>["","none",g,$,L],ep=()=>["none",w,$,L],em=()=>["none",w,$,L],eg=()=>[w,$,L],eh=()=>[v,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[E],breakpoint:[E],color:[C],container:[E],"drop-shadow":[E],ease:["in","out","in-out"],font:[z],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[E],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[E],shadow:[E],spacing:["px",w],text:[E],"text-shadow":[E],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",v,L,$,b]}],container:["container"],columns:[{columns:[w,L,$,a]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[x,"auto",$,L]}],basis:[{basis:[v,"full","auto",a,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[w,v,"auto","initial","none",L]}],grow:[{grow:["",w,$,L]}],shrink:[{shrink:["",w,$,L]}],order:[{order:[x,"first","last","none",$,L]}],"grid-cols":[{"grid-cols":X()}],"col-start-end":[{col:q()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":X()}],"row-start-end":[{row:q()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:et()}],w:[{w:[a,"screen",...et()]}],"min-w":[{"min-w":[a,"screen","none",...et()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[l]},...et()]}],h:[{h:["screen","lh",...et()]}],"min-h":[{"min-h":["screen","lh","none",...et()]}],"max-h":[{"max-h":["screen","lh",...et()]}],"font-size":[{text:["base",r,W,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,$,T]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",k,L]}],"font-family":[{font:[_,L,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,$,L]}],"line-clamp":[{"line-clamp":[w,"none",$,T]}],leading:[{leading:[i,...G()]}],"list-image":[{"list-image":["none",$,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:er()}],"text-color":[{text:er()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ec(),"wavy"]}],"text-decoration-thickness":[{decoration:[w,"from-font","auto",$,N]}],"text-decoration-color":[{decoration:er()}],"underline-offset":[{"underline-offset":[w,"auto",$,L]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,L]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,L]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:en()}],"bg-repeat":[{bg:eo()}],"bg-size":[{bg:ei()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},x,$,L],radial:["",$,L],conic:[x,$,L]},H,D]}],"bg-color":[{bg:er()}],"gradient-from-pos":[{from:el()}],"gradient-via-pos":[{via:el()}],"gradient-to-pos":[{to:el()}],"gradient-from":[{from:er()}],"gradient-via":[{via:er()}],"gradient-to":[{to:er()}],rounded:[{rounded:ea()}],"rounded-s":[{"rounded-s":ea()}],"rounded-e":[{"rounded-e":ea()}],"rounded-t":[{"rounded-t":ea()}],"rounded-r":[{"rounded-r":ea()}],"rounded-b":[{"rounded-b":ea()}],"rounded-l":[{"rounded-l":ea()}],"rounded-ss":[{"rounded-ss":ea()}],"rounded-se":[{"rounded-se":ea()}],"rounded-ee":[{"rounded-ee":ea()}],"rounded-es":[{"rounded-es":ea()}],"rounded-tl":[{"rounded-tl":ea()}],"rounded-tr":[{"rounded-tr":ea()}],"rounded-br":[{"rounded-br":ea()}],"rounded-bl":[{"rounded-bl":ea()}],"border-w":[{border:es()}],"border-w-x":[{"border-x":es()}],"border-w-y":[{"border-y":es()}],"border-w-s":[{"border-s":es()}],"border-w-e":[{"border-e":es()}],"border-w-t":[{"border-t":es()}],"border-w-r":[{"border-r":es()}],"border-w-b":[{"border-b":es()}],"border-w-l":[{"border-l":es()}],"divide-x":[{"divide-x":es()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":es()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ec(),"hidden","none"]}],"divide-style":[{divide:[...ec(),"hidden","none"]}],"border-color":[{border:er()}],"border-color-x":[{"border-x":er()}],"border-color-y":[{"border-y":er()}],"border-color-s":[{"border-s":er()}],"border-color-e":[{"border-e":er()}],"border-color-t":[{"border-t":er()}],"border-color-r":[{"border-r":er()}],"border-color-b":[{"border-b":er()}],"border-color-l":[{"border-l":er()}],"divide-color":[{divide:er()}],"outline-style":[{outline:[...ec(),"none","hidden"]}],"outline-offset":[{"outline-offset":[w,$,L]}],"outline-w":[{outline:["",w,W,N]}],"outline-color":[{outline:er()}],shadow:[{shadow:["","none",u,B,M]}],"shadow-color":[{shadow:er()}],"inset-shadow":[{"inset-shadow":["none",f,B,M]}],"inset-shadow-color":[{"inset-shadow":er()}],"ring-w":[{ring:es()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:er()}],"ring-offset-w":[{"ring-offset":[w,N]}],"ring-offset-color":[{"ring-offset":er()}],"inset-ring-w":[{"inset-ring":es()}],"inset-ring-color":[{"inset-ring":er()}],"text-shadow":[{"text-shadow":["none",p,B,M]}],"text-shadow-color":[{"text-shadow":er()}],opacity:[{opacity:[w,$,L]}],"mix-blend":[{"mix-blend":[...ed(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ed()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[w]}],"mask-image-linear-from-pos":[{"mask-linear-from":eu()}],"mask-image-linear-to-pos":[{"mask-linear-to":eu()}],"mask-image-linear-from-color":[{"mask-linear-from":er()}],"mask-image-linear-to-color":[{"mask-linear-to":er()}],"mask-image-t-from-pos":[{"mask-t-from":eu()}],"mask-image-t-to-pos":[{"mask-t-to":eu()}],"mask-image-t-from-color":[{"mask-t-from":er()}],"mask-image-t-to-color":[{"mask-t-to":er()}],"mask-image-r-from-pos":[{"mask-r-from":eu()}],"mask-image-r-to-pos":[{"mask-r-to":eu()}],"mask-image-r-from-color":[{"mask-r-from":er()}],"mask-image-r-to-color":[{"mask-r-to":er()}],"mask-image-b-from-pos":[{"mask-b-from":eu()}],"mask-image-b-to-pos":[{"mask-b-to":eu()}],"mask-image-b-from-color":[{"mask-b-from":er()}],"mask-image-b-to-color":[{"mask-b-to":er()}],"mask-image-l-from-pos":[{"mask-l-from":eu()}],"mask-image-l-to-pos":[{"mask-l-to":eu()}],"mask-image-l-from-color":[{"mask-l-from":er()}],"mask-image-l-to-color":[{"mask-l-to":er()}],"mask-image-x-from-pos":[{"mask-x-from":eu()}],"mask-image-x-to-pos":[{"mask-x-to":eu()}],"mask-image-x-from-color":[{"mask-x-from":er()}],"mask-image-x-to-color":[{"mask-x-to":er()}],"mask-image-y-from-pos":[{"mask-y-from":eu()}],"mask-image-y-to-pos":[{"mask-y-to":eu()}],"mask-image-y-from-color":[{"mask-y-from":er()}],"mask-image-y-to-color":[{"mask-y-to":er()}],"mask-image-radial":[{"mask-radial":[$,L]}],"mask-image-radial-from-pos":[{"mask-radial-from":eu()}],"mask-image-radial-to-pos":[{"mask-radial-to":eu()}],"mask-image-radial-from-color":[{"mask-radial-from":er()}],"mask-image-radial-to-color":[{"mask-radial-to":er()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[w]}],"mask-image-conic-from-pos":[{"mask-conic-from":eu()}],"mask-image-conic-to-pos":[{"mask-conic-to":eu()}],"mask-image-conic-from-color":[{"mask-conic-from":er()}],"mask-image-conic-to-color":[{"mask-conic-to":er()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:en()}],"mask-repeat":[{mask:eo()}],"mask-size":[{mask:ei()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,L]}],filter:[{filter:["","none",$,L]}],blur:[{blur:ef()}],brightness:[{brightness:[w,$,L]}],contrast:[{contrast:[w,$,L]}],"drop-shadow":[{"drop-shadow":["","none",m,B,M]}],"drop-shadow-color":[{"drop-shadow":er()}],grayscale:[{grayscale:["",w,$,L]}],"hue-rotate":[{"hue-rotate":[w,$,L]}],invert:[{invert:["",w,$,L]}],saturate:[{saturate:[w,$,L]}],sepia:[{sepia:["",w,$,L]}],"backdrop-filter":[{"backdrop-filter":["","none",$,L]}],"backdrop-blur":[{"backdrop-blur":ef()}],"backdrop-brightness":[{"backdrop-brightness":[w,$,L]}],"backdrop-contrast":[{"backdrop-contrast":[w,$,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",w,$,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w,$,L]}],"backdrop-invert":[{"backdrop-invert":["",w,$,L]}],"backdrop-opacity":[{"backdrop-opacity":[w,$,L]}],"backdrop-saturate":[{"backdrop-saturate":[w,$,L]}],"backdrop-sepia":[{"backdrop-sepia":["",w,$,L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[w,"initial",$,L]}],ease:[{ease:["linear","initial",y,$,L]}],delay:[{delay:[w,$,L]}],animate:[{animate:["none",R,$,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,$,L]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ep()}],"rotate-x":[{"rotate-x":ep()}],"rotate-y":[{"rotate-y":ep()}],"rotate-z":[{"rotate-z":ep()}],scale:[{scale:em()}],"scale-x":[{"scale-x":em()}],"scale-y":[{"scale-y":em()}],"scale-z":[{"scale-z":em()}],"scale-3d":["scale-3d"],skew:[{skew:eg()}],"skew-x":[{"skew-x":eg()}],"skew-y":[{"skew-y":eg()}],transform:[{transform:[$,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:eh()}],"translate-x":[{"translate-x":eh()}],"translate-y":[{"translate-y":eh()}],"translate-z":[{"translate-z":eh()}],"translate-none":["translate-none"],accent:[{accent:er()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:er()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$,L]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$,L]}],fill:[{fill:["none",...er()]}],"stroke-w":[{stroke:[w,W,N,T]}],stroke:[{stroke:["none",...er()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ee(...e){return Q((0,t.clsx)(e))}e.s(["twMerge",()=>Q],919056),e.s(["cn",()=>ee],975157)},519455,e=>{"use strict";var t=e.i(843476),r=e.i(500932),n=e.i(991918),o=e.i(225913),i=e.i(975157);let l=(0,o.cva)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:ring-ring/30 focus-visible:ring-2 aria-invalid:ring-destructive/30 aria-invalid:ring-2 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/30 shadow-sm",outline:"bg-elevated hover:bg-muted/50 shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-sm",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-lg gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-lg px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function a(e){let o,a,s,c,d,u,f,p=(0,r.c)(14);p[0]!==e?({className:o,variant:d,size:s,asChild:c,...a}=e,p[0]=e,p[1]=o,p[2]=a,p[3]=s,p[4]=c,p[5]=d):(o=p[1],a=p[2],s=p[3],c=p[4],d=p[5]);let m=void 0!==c&&c?n.Slot:"button";return p[6]!==o||p[7]!==s||p[8]!==d?(u=(0,i.cn)(l({variant:d,size:s,className:o})),p[6]=o,p[7]=s,p[8]=d,p[9]=u):u=p[9],p[10]!==m||p[11]!==a||p[12]!==u?(f=(0,t.jsx)(m,{"data-slot":"button",className:u,...a}),p[10]=m,p[11]=a,p[12]=u,p[13]=f):f=p[13],f}e.s(["Button",()=>a])},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:s,iconNode:c,...d},u)=>(0,t.createElement)("svg",{ref:u,...o,width:r,height:r,stroke:e,strokeWidth:l?24*Number(i)/Number(r):i,className:n("lucide",a),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(s)?s:[s]])),l=(e,o)=>{let l=(0,t.forwardRef)(({className:l,...a},s)=>(0,t.createElement)(i,{ref:s,iconNode:o,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,l),...a}));return l.displayName=r(e),l};e.s(["default",()=>l],475254)},981140,e=>{"use strict";function t(e,r,{checkForDefaultPrevented:n=!0}={}){return function(t){if(e?.(t),!1===n||!t.defaultPrevented)return r?.(t)}}"undefined"!=typeof window&&window.document&&window.document.createElement,e.s(["composeEventHandlers",()=>t])},30030,e=>{"use strict";var t=e.i(271645),r=e.i(843476);function n(e,n){let o=t.createContext(n),i=e=>{let{children:n,...i}=e,l=t.useMemo(()=>i,Object.values(i));return(0,r.jsx)(o.Provider,{value:l,children:n})};return i.displayName=e+"Provider",[i,function(r){let i=t.useContext(o);if(i)return i;if(void 0!==n)return n;throw Error(`\`${r}\` must be used within \`${e}\``)}]}function o(e,n=[]){let i=[],l=()=>{let r=i.map(e=>t.createContext(e));return function(n){let o=n?.[e]||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return l.scopeName=e,[function(n,o){let l=t.createContext(o),a=i.length;i=[...i,o];let s=n=>{let{scope:o,children:i,...s}=n,c=o?.[e]?.[a]||l,d=t.useMemo(()=>s,Object.values(s));return(0,r.jsx)(c.Provider,{value:d,children:i})};return s.displayName=n+"Provider",[s,function(r,i){let s=i?.[e]?.[a]||l,c=t.useContext(s);if(c)return c;if(void 0!==o)return o;throw Error(`\`${r}\` must be used within \`${n}\``)}]},function(...e){let r=e[0];if(1===e.length)return r;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let o=n.reduce((t,{useScope:r,scopeName:n})=>{let o=r(e)[`__scope${n}`];return{...t,...o}},{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}(l,...n)]}e.s(["createContext",()=>n,"createContextScope",()=>o])},248425,e=>{"use strict";var t=e.i(271645),r=e.i(174080),n=e.i(820783),o=e.i(843476),i=Symbol("radix.slottable");function l(e){return t.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===i}var a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var i,a;let s,c,d,u=(a=i=`Primitive.${r}`,(s=t.forwardRef((e,r)=>{let{children:o,...i}=e;if(t.isValidElement(o)){var l;let e,a,s=(l=o,(a=(e=Object.getOwnPropertyDescriptor(l.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.ref:(a=(e=Object.getOwnPropertyDescriptor(l,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning)?l.props.ref:l.props.ref||l.ref),c=function(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{let t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(i,o.props);return o.type!==t.Fragment&&(c.ref=r?(0,n.composeRefs)(r,s):s),t.cloneElement(o,c)}return t.Children.count(o)>1?t.Children.only(null):null})).displayName=`${a}.SlotClone`,c=s,(d=t.forwardRef((e,r)=>{let{children:n,...i}=e,a=t.Children.toArray(n),s=a.find(l);if(s){let e=s.props.children,n=a.map(r=>r!==s?r:t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null);return(0,o.jsx)(c,{...i,ref:r,children:t.isValidElement(e)?t.cloneElement(e,void 0,n):null})}return(0,o.jsx)(c,{...i,ref:r,children:n})})).displayName=`${i}.Slot`,d),f=t.forwardRef((e,t)=>{let{asChild:n,...i}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(n?u:r,{...i,ref:t})});return f.displayName=`Primitive.${r}`,{...e,[r]:f}},{});function s(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}e.s(["Primitive",()=>a,"dispatchDiscreteCustomEvent",()=>s],248425)},30207,e=>{"use strict";var t=e.i(271645);function r(e){let r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>r.current?.(...e),[])}e.s(["useCallbackRef",()=>r])},726330,e=>{"use strict";var t,r=e.i(271645),n=e.i(981140),o=e.i(248425),i=e.i(820783),l=e.i(30207),a=e.i(843476),s="dismissableLayer.update",c=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d=r.forwardRef((e,d)=>{let{disableOutsidePointerEvents:p=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:b,onDismiss:y,...v}=e,w=r.useContext(c),[x,k]=r.useState(null),E=x?.ownerDocument??globalThis?.document,[,C]=r.useState({}),R=(0,i.useComposedRefs)(d,e=>k(e)),S=Array.from(w.layers),[P]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(P),z=x?S.indexOf(x):-1,O=w.layersWithOutsidePointerEventsDisabled.size>0,L=z>=A,N=function(e,t=globalThis?.document){let n=(0,l.useCallbackRef)(e),o=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let r=function(){f("dismissableLayer.pointerDownOutside",n,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,r=[...w.branches].some(e=>e.contains(t));L&&!r&&(g?.(e),b?.(e),e.defaultPrevented||y?.())},E),T=function(e,t=globalThis?.document){let n=(0,l.useCallbackRef)(e),o=r.useRef(!1);return r.useEffect(()=>{let e=e=>{e.target&&!o.current&&f("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;![...w.branches].some(e=>e.contains(t))&&(h?.(e),b?.(e),e.defaultPrevented||y?.())},E);return!function(e,t=globalThis?.document){let n=(0,l.useCallbackRef)(e);r.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{z===w.layers.size-1&&(m?.(e),!e.defaultPrevented&&y&&(e.preventDefault(),y()))},E),r.useEffect(()=>{if(x)return p&&(0===w.layersWithOutsidePointerEventsDisabled.size&&(t=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(x)),w.layers.add(x),u(),()=>{p&&1===w.layersWithOutsidePointerEventsDisabled.size&&(E.body.style.pointerEvents=t)}},[x,E,p,w]),r.useEffect(()=>()=>{x&&(w.layers.delete(x),w.layersWithOutsidePointerEventsDisabled.delete(x),u())},[x,w]),r.useEffect(()=>{let e=()=>C({});return document.addEventListener(s,e),()=>document.removeEventListener(s,e)},[]),(0,a.jsx)(o.Primitive.div,{...v,ref:R,style:{pointerEvents:O?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,n.composeEventHandlers)(e.onFocusCapture,T.onFocusCapture),onBlurCapture:(0,n.composeEventHandlers)(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:(0,n.composeEventHandlers)(e.onPointerDownCapture,N.onPointerDownCapture)})});function u(){let e=new CustomEvent(s);document.dispatchEvent(e)}function f(e,t,r,{discrete:n}){let i=r.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?(0,o.dispatchDiscreteCustomEvent)(i,l):i.dispatchEvent(l)}d.displayName="DismissableLayer",r.forwardRef((e,t)=>{let n=r.useContext(c),l=r.useRef(null),s=(0,i.useComposedRefs)(t,l);return r.useEffect(()=>{let e=l.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,a.jsx)(o.Primitive.div,{...e,ref:s})}).displayName="DismissableLayerBranch",e.s(["DismissableLayer",()=>d],726330)},934620,e=>{"use strict";var t=e.i(271645),r=globalThis?.document?t.useLayoutEffect:()=>{};e.s(["useLayoutEffect",()=>r])},610772,e=>{"use strict";var t=e.i(271645),r=e.i(934620),n=t[" useId ".trim().toString()]||(()=>void 0),o=0;function i(e){let[i,l]=t.useState(n());return(0,r.useLayoutEffect)(()=>{e||l(e=>e??String(o++))},[e]),e||(i?`radix-${i}`:"")}e.s(["useId",()=>i])},853660,e=>{"use strict";var t=e.i(271645);let r=["top","right","bottom","left"],n=Math.min,o=Math.max,i=Math.round,l=Math.floor,a=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},c={start:"end",end:"start"};function d(e,t){return"function"==typeof e?e(t):e}function u(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function m(e){return"y"===e?"height":"width"}let g=new Set(["top","bottom"]);function h(e){return g.has(u(e))?"y":"x"}function b(e){return e.replace(/start|end/g,e=>c[e])}let y=["left","right"],v=["right","left"],w=["top","bottom"],x=["bottom","top"];function k(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function E(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function R(e,t,r){let n,{reference:o,floating:i}=e,l=h(t),a=p(h(t)),s=m(a),c=u(t),d="y"===l,g=o.x+o.width/2-i.width/2,b=o.y+o.height/2-i.height/2,y=o[s]/2-i[s]/2;switch(c){case"top":n={x:g,y:o.y-i.height};break;case"bottom":n={x:g,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:b};break;case"left":n={x:o.x-i.width,y:b};break;default:n={x:o.x,y:o.y}}switch(f(t)){case"start":n[a]-=y*(r&&d?-1:1);break;case"end":n[a]+=y*(r&&d?-1:1)}return n}let S=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,a=i.filter(Boolean),s=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=R(c,n,s),f=n,p={},m=0;for(let r=0;r<a.length;r++){let{name:i,fn:g}=a[r],{x:h,y:b,data:y,reset:v}=await g({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=h?h:d,u=null!=b?b:u,p={...p,[i]:{...p[i],...y}},v&&m<=50&&(m++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(c=!0===v.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:d,y:u}=R(c,f,s)),r=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}};async function P(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=d(t,e),g=E(m),h=a[p?"floating"===f?"reference":"floating":f],b=C(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(h)))||r?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),y="floating"===f?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,v=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await (null==i.isElement?void 0:i.isElement(v))&&await (null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:s}):y);return{top:(b.top-x.top+g.top)/w.y,bottom:(x.bottom-b.bottom+g.bottom)/w.y,left:(b.left-x.left+g.left)/w.x,right:(x.right-b.right+g.right)/w.x}}function A(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function z(e){return r.some(t=>e[t]>=0)}let O=new Set(["left","top"]);async function L(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),l=u(r),a=f(r),s="y"===h(r),c=O.has(l)?-1:1,p=i&&s?-1:1,m=d(t,e),{mainAxis:g,crossAxis:b,alignmentAxis:y}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return a&&"number"==typeof y&&(b="end"===a?-1*y:y),s?{x:b*p,y:g*c}:{x:g*c,y:b*p}}function N(){return"undefined"!=typeof window}function T(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function j(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function D(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!N()&&(e instanceof Node||e instanceof j(e).Node)}function $(e){return!!N()&&(e instanceof Element||e instanceof j(e).Element)}function W(e){return!!N()&&(e instanceof HTMLElement||e instanceof j(e).HTMLElement)}function _(e){return!!N()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof j(e).ShadowRoot)}let I=new Set(["inline","contents"]);function F(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!I.has(o)}let H=new Set(["table","td","th"]),B=[":popover-open",":modal"];function V(e){return B.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let U=["transform","translate","scale","rotate","perspective"],G=["transform","translate","scale","rotate","perspective","filter"],Y=["paint","layout","strict","content"];function X(e){let t=q(),r=$(e)?J(e):e;return U.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||G.some(e=>(r.willChange||"").includes(e))||Y.some(e=>(r.contain||"").includes(e))}function q(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let Z=new Set(["html","body","#document"]);function K(e){return Z.has(T(e))}function J(e){return j(e).getComputedStyle(e)}function Q(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ee(e){if("html"===T(e))return e;let t=e.assignedSlot||e.parentNode||_(e)&&e.host||D(e);return _(t)?t.host:t}function et(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=ee(t);return K(r)?t.ownerDocument?t.ownerDocument.body:t.body:W(r)&&F(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),l=j(o);if(i){let e=er(l);return t.concat(l,l.visualViewport||[],F(o)?o:[],e&&r?et(e):[])}return t.concat(o,et(o,[],r))}function er(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function en(e){let t=J(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=W(e),l=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=i(r)!==l||i(n)!==a;return s&&(r=l,n=a),{width:r,height:n,$:s}}function eo(e){return $(e)?e:e.contextElement}function ei(e){let t=eo(e);if(!W(t))return a(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:l}=en(t),s=(l?i(r.width):r.width)/n,c=(l?i(r.height):r.height)/o;return s&&Number.isFinite(s)||(s=1),c&&Number.isFinite(c)||(c=1),{x:s,y:c}}let el=a(0);function ea(e){let t=j(e);return q()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:el}function es(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),l=eo(e),s=a(1);t&&(n?$(n)&&(s=ei(n)):s=ei(e));let c=(void 0===(o=r)&&(o=!1),n&&(!o||n===j(l))&&o)?ea(l):a(0),d=(i.left+c.x)/s.x,u=(i.top+c.y)/s.y,f=i.width/s.x,p=i.height/s.y;if(l){let e=j(l),t=n&&$(n)?j(n):n,r=e,o=er(r);for(;o&&n&&t!==r;){let e=ei(o),t=o.getBoundingClientRect(),n=J(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;d*=e.x,u*=e.y,f*=e.x,p*=e.y,d+=i,u+=l,o=er(r=j(o))}}return C({width:f,height:p,x:d,y:u})}function ec(e,t){let r=Q(e).scrollLeft;return t?t.left+r:es(D(e)).left+r}function ed(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-ec(e,r),y:r.top+t.scrollTop}}let eu=new Set(["absolute","fixed"]);function ef(e,t,r){var n;let i;if("viewport"===t)i=function(e,t){let r=j(e),n=D(e),o=r.visualViewport,i=n.clientWidth,l=n.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;let e=q();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}let c=ec(n);if(c<=0){let e=n.ownerDocument,t=e.body,r=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,l=Math.abs(n.clientWidth-t.clientWidth-o);l<=25&&(i-=l)}else c<=25&&(i+=c);return{width:i,height:l,x:a,y:s}}(e,r);else if("document"===t){let t,r,l,a,s,c,d;n=D(e),t=D(n),r=Q(n),l=n.ownerDocument.body,a=o(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=o(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight),c=-r.scrollLeft+ec(n),d=-r.scrollTop,"rtl"===J(l).direction&&(c+=o(t.clientWidth,l.clientWidth)-a),i={width:a,height:s,x:c,y:d}}else if($(t)){let e,n,o,l,s,c;n=(e=es(t,!0,"fixed"===r)).top+t.clientTop,o=e.left+t.clientLeft,l=W(t)?ei(t):a(1),s=t.clientWidth*l.x,c=t.clientHeight*l.y,i={width:s,height:c,x:o*l.x,y:n*l.y}}else{let r=ea(e);i={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return C(i)}function ep(e){return"static"===J(e).position}function em(e,t){if(!W(e)||"fixed"===J(e).position)return null;if(t)return t(e);let r=e.offsetParent;return D(e)===r&&(r=r.ownerDocument.body),r}function eg(e,t){var r;let n=j(e);if(V(e))return n;if(!W(e)){let t=ee(e);for(;t&&!K(t);){if($(t)&&!ep(t))return t;t=ee(t)}return n}let o=em(e,t);for(;o&&(r=o,H.has(T(r)))&&ep(o);)o=em(o,t);return o&&K(o)&&ep(o)&&!X(o)?n:o||function(e){let t=ee(e);for(;W(t)&&!K(t);){if(X(t))return t;if(V(t))break;t=ee(t)}return null}(e)||n}let eh=async function(e){let t=this.getOffsetParent||eg,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=W(t),o=D(t),i="fixed"===r,l=es(e,!0,i,t),s={scrollLeft:0,scrollTop:0},c=a(0);if(n||!n&&!i)if(("body"!==T(t)||F(o))&&(s=Q(t)),n){let e=es(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&(c.x=ec(o));i&&!n&&o&&(c.x=ec(o));let d=!o||n||i?a(0):ed(o,s);return{x:l.left+s.scrollLeft-c.x-d.x,y:l.top+s.scrollTop-c.y-d.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},eb={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,l=D(n),s=!!t&&V(t.floating);if(n===l||s&&i)return r;let c={scrollLeft:0,scrollTop:0},d=a(1),u=a(0),f=W(n);if((f||!f&&!i)&&(("body"!==T(n)||F(l))&&(c=Q(n)),W(n))){let e=es(n);d=ei(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}let p=!l||f||i?a(0):ed(l,c);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-c.scrollLeft*d.x+u.x+p.x,y:r.y*d.y-c.scrollTop*d.y+u.y+p.y}},getDocumentElement:D,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:i,strategy:l}=e,a=[..."clippingAncestors"===r?V(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=et(e,[],!1).filter(e=>$(e)&&"body"!==T(e)),o=null,i="fixed"===J(e).position,l=i?ee(e):e;for(;$(l)&&!K(l);){let t=J(l),r=X(l);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&!!o&&eu.has(o.position)||F(l)&&!r&&function e(t,r){let n=ee(t);return!(n===r||!$(n)||K(n))&&("fixed"===J(n).position||e(n,r))}(e,l))?n=n.filter(e=>e!==l):o=t,l=ee(l)}return t.set(e,n),n}(t,this._c):[].concat(r),i],s=a[0],c=a.reduce((e,r)=>{let i=ef(t,r,l);return e.top=o(i.top,e.top),e.right=n(i.right,e.right),e.bottom=n(i.bottom,e.bottom),e.left=o(i.left,e.left),e},ef(t,s,l));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:eg,getElementRects:eh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=en(e);return{width:t,height:r}},getScale:ei,isElement:$,isRTL:function(e){return"rtl"===J(e).direction}};function ey(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ev=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:i,placement:l,rects:a,platform:s,elements:c,middlewareData:u}=t,{element:g,padding:b=0}=d(e,t)||{};if(null==g)return{};let y=E(b),v={x:r,y:i},w=p(h(l)),x=m(w),k=await s.getDimensions(g),C="y"===w,R=C?"clientHeight":"clientWidth",S=a.reference[x]+a.reference[w]-v[w]-a.floating[x],P=v[w]-a.reference[w],A=await (null==s.getOffsetParent?void 0:s.getOffsetParent(g)),z=A?A[R]:0;z&&await (null==s.isElement?void 0:s.isElement(A))||(z=c.floating[R]||a.floating[x]);let O=z/2-k[x]/2-1,L=n(y[C?"top":"left"],O),N=n(y[C?"bottom":"right"],O),T=z-k[x]-N,j=z/2-k[x]/2+(S/2-P/2),D=o(L,n(j,T)),M=!u.arrow&&null!=f(l)&&j!==D&&a.reference[x]/2-(j<L?L:N)-k[x]/2<0,$=M?j<L?j-L:j-T:0;return{[w]:v[w]+$,data:{[w]:D,centerOffset:j-D-$,...M&&{alignmentOffset:$}},reset:M}}});var ew=e.i(174080),ex="undefined"!=typeof document?t.useLayoutEffect:function(){};function ek(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!ek(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ek(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function eE(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eC(e,t){let r=eE(e);return Math.round(t*r)/r}function eR(e){let r=t.useRef(e);return ex(()=>{r.current=e}),r}var eS=e.i(248425),eP=e.i(843476),eA=t.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...i}=e;return(0,eP.jsx)(eS.Primitive.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,eP.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eA.displayName="Arrow";var ez=e.i(820783),eO=e.i(30030),eL=e.i(30207),eN=e.i(934620),eT="Popper",[ej,eD]=(0,eO.createContextScope)(eT),[eM,e$]=ej(eT),eW=e=>{let{__scopePopper:r,children:n}=e,[o,i]=t.useState(null);return(0,eP.jsx)(eM,{scope:r,anchor:o,onAnchorChange:i,children:n})};eW.displayName=eT;var e_="PopperAnchor",eI=t.forwardRef((e,r)=>{let{__scopePopper:n,virtualRef:o,...i}=e,l=e$(e_,n),a=t.useRef(null),s=(0,ez.useComposedRefs)(r,a),c=t.useRef(null);return t.useEffect(()=>{let e=c.current;c.current=o?.current||a.current,e!==c.current&&l.onAnchorChange(c.current)}),o?null:(0,eP.jsx)(eS.Primitive.div,{...i,ref:s})});eI.displayName=e_;var eF="PopperContent",[eH,eB]=ej(eF),eV=t.forwardRef((e,r)=>{var i,a,s,c,g,E,C,R,N,T,j,M,$,W,_,I,F,H,B,V,U;let{__scopePopper:G,side:Y="bottom",sideOffset:X=0,align:q="center",alignOffset:Z=0,arrowPadding:K=0,avoidCollisions:J=!0,collisionBoundary:Q=[],collisionPadding:ee=0,sticky:er="partial",hideWhenDetached:en=!1,updatePositionStrategy:ei="optimized",onPlaced:el,...ea}=e,ec=e$(eF,G),[ed,eu]=t.useState(null),ef=(0,ez.useComposedRefs)(r,e=>eu(e)),[ep,em]=t.useState(null),eg=function(e){let[r,n]=t.useState(void 0);return(0,eN.useLayoutEffect)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),r}(ep),eh=eg?.width??0,eA=eg?.height??0,eO="number"==typeof ee?ee:{top:0,right:0,bottom:0,left:0,...ee},eT=Array.isArray(Q)?Q:[Q],ej=eT.length>0,eD={padding:eO,boundary:eT.filter(eX),altBoundary:ej},{refs:eM,floatingStyles:eW,placement:e_,isPositioned:eI,middlewareData:eB}=function(e){void 0===e&&(e={});let{placement:r="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:s=!0,whileElementsMounted:c,open:d}=e,[u,f]=t.useState({x:0,y:0,strategy:n,placement:r,middlewareData:{},isPositioned:!1}),[p,m]=t.useState(o);ek(p,o)||m(o);let[g,h]=t.useState(null),[b,y]=t.useState(null),v=t.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),w=t.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),x=l||g,k=a||b,E=t.useRef(null),C=t.useRef(null),R=t.useRef(u),P=null!=c,A=eR(c),z=eR(i),O=eR(d),L=t.useCallback(()=>{var e,t;let o,i,l;if(!E.current||!C.current)return;let a={placement:r,strategy:n,middleware:p};z.current&&(a.platform=z.current),(e=E.current,t=C.current,o=new Map,l={...(i={platform:eb,...a}).platform,_c:o},S(e,t,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==O.current};N.current&&!ek(R.current,t)&&(R.current=t,ew.flushSync(()=>{f(t)}))})},[p,r,n,z,O]);ex(()=>{!1===d&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[d]);let N=t.useRef(!1);ex(()=>(N.current=!0,()=>{N.current=!1}),[]),ex(()=>{if(x&&(E.current=x),k&&(C.current=k),x&&k){if(A.current)return A.current(x,k,L);L()}},[x,k,L,A,P]);let T=t.useMemo(()=>({reference:E,floating:C,setReference:v,setFloating:w}),[v,w]),j=t.useMemo(()=>({reference:x,floating:k}),[x,k]),D=t.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=eC(j.floating,u.x),r=eC(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...eE(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return t.useMemo(()=>({...u,update:L,refs:T,elements:j,floatingStyles:D}),[u,L,T,j,D])}({strategy:"fixed",placement:Y+("center"!==q?"-"+q:""),whileElementsMounted:(...e)=>(function(e,t,r,i){let a;void 0===i&&(i={});let{ancestorScroll:s=!0,ancestorResize:c=!0,elementResize:d="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:f=!1}=i,p=eo(e),m=s||c?[...p?et(p):[],...et(t)]:[];m.forEach(e=>{s&&e.addEventListener("scroll",r,{passive:!0}),c&&e.addEventListener("resize",r)});let g=p&&u?function(e,t){let r,i=null,a=D(e);function s(){var e;clearTimeout(r),null==(e=i)||e.disconnect(),i=null}return!function c(d,u){void 0===d&&(d=!1),void 0===u&&(u=1),s();let f=e.getBoundingClientRect(),{left:p,top:m,width:g,height:h}=f;if(d||t(),!g||!h)return;let b={rootMargin:-l(m)+"px "+-l(a.clientWidth-(p+g))+"px "+-l(a.clientHeight-(m+h))+"px "+-l(p)+"px",threshold:o(0,n(1,u))||1},y=!0;function v(t){let n=t[0].intersectionRatio;if(n!==u){if(!y)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}1!==n||ey(f,e.getBoundingClientRect())||c(),y=!1}try{i=new IntersectionObserver(v,{...b,root:a.ownerDocument})}catch(e){i=new IntersectionObserver(v,b)}i.observe(e)}(!0),s}(p,r):null,h=-1,b=null;d&&(b=new ResizeObserver(e=>{let[n]=e;n&&n.target===p&&b&&(b.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=b)||e.observe(t)})),r()}),p&&!f&&b.observe(p),b.observe(t));let y=f?es(e):null;return f&&function t(){let n=es(e);y&&!ey(y,n)&&r(),y=n,a=requestAnimationFrame(t)}(),r(),()=>{var e;m.forEach(e=>{s&&e.removeEventListener("scroll",r),c&&e.removeEventListener("resize",r)}),null==g||g(),null==(e=b)||e.disconnect(),b=null,f&&cancelAnimationFrame(a)}})(...e,{animationFrame:"always"===ei}),elements:{reference:ec.anchor},middleware:[{...{name:"offset",options:s=i={mainAxis:X+eA,alignmentAxis:Z},async fn(e){var t,r;let{x:n,y:o,placement:i,middlewareData:l}=e,a=await L(e,s);return i===(null==(t=l.offset)?void 0:t.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:n+a.x,y:o+a.y,data:{...a,placement:i}}}},options:[i,a]},J&&{...{name:"shift",options:N=C={mainAxis:!0,crossAxis:!1,limiter:"partial"===er?{...(void 0===(E=c)&&(E={}),{options:E,fn(e){let{x:t,y:r,placement:n,rects:o,middlewareData:i}=e,{offset:l=0,mainAxis:a=!0,crossAxis:s=!0}=d(E,e),c={x:t,y:r},f=h(n),m=p(f),g=c[m],b=c[f],y=d(l,e),v="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(a){let e="y"===m?"height":"width",t=o.reference[m]-o.floating[e]+v.mainAxis,r=o.reference[m]+o.reference[e]-v.mainAxis;g<t?g=t:g>r&&(g=r)}if(s){var w,x;let e="y"===m?"width":"height",t=O.has(u(n)),r=o.reference[f]-o.floating[e]+(t&&(null==(w=i.offset)?void 0:w[f])||0)+(t?0:v.crossAxis),l=o.reference[f]+o.reference[e]+(t?0:(null==(x=i.offset)?void 0:x[f])||0)-(t?v.crossAxis:0);b<r?b=r:b>l&&(b=l)}return{[m]:g,[f]:b}}}),options:[c,g]}:void 0,...eD},async fn(e){let{x:t,y:r,placement:i}=e,{mainAxis:l=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...c}=d(N,e),f={x:t,y:r},m=await P(e,c),g=h(u(i)),b=p(g),y=f[b],v=f[g];if(l){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",r=y+m[e],i=y-m[t];y=o(r,n(y,i))}if(a){let e="y"===g?"top":"left",t="y"===g?"bottom":"right",r=v+m[e],i=v-m[t];v=o(r,n(v,i))}let w=s.fn({...e,[b]:y,[g]:v});return{...w,data:{x:w.x-t,y:w.y-r,enabled:{[b]:l,[g]:a}}}}},options:[C,R]},J&&{...{name:"flip",options:M=T={...eD},async fn(e){var t,r,n,o,i,l,a,s;let c,g,E,{placement:C,middlewareData:R,rects:S,initialPlacement:A,platform:z,elements:O}=e,{mainAxis:L=!0,crossAxis:N=!0,fallbackPlacements:T,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:D="none",flipAlignment:$=!0,...W}=d(M,e);if(null!=(t=R.arrow)&&t.alignmentOffset)return{};let _=u(C),I=h(A),F=u(A)===A,H=await (null==z.isRTL?void 0:z.isRTL(O.floating)),B=T||(F||!$?[k(A)]:(c=k(A),[b(A),c,b(c)])),V="none"!==D;!T&&V&&B.push(...(g=f(A),E=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?v:y;return t?y:v;case"left":case"right":return t?w:x;default:return[]}}(u(A),"start"===D,H),g&&(E=E.map(e=>e+"-"+g),$&&(E=E.concat(E.map(b)))),E));let U=[A,...B],G=await P(e,W),Y=[],X=(null==(r=R.flip)?void 0:r.overflows)||[];if(L&&Y.push(G[_]),N){let e,t,r,n,o=(l=C,a=S,void 0===(s=H)&&(s=!1),e=f(l),r=m(t=p(h(l))),n="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[r]>a.floating[r]&&(n=k(n)),[n,k(n)]);Y.push(G[o[0]],G[o[1]])}if(X=[...X,{placement:C,overflows:Y}],!Y.every(e=>e<=0)){let e=((null==(n=R.flip)?void 0:n.index)||0)+1,t=U[e];if(t&&("alignment"!==N||I===h(t)||X.every(e=>h(e.placement)!==I||e.overflows[0]>0)))return{data:{index:e,overflows:X},reset:{placement:t}};let r=null==(o=X.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(j){case"bestFit":{let e=null==(i=X.filter(e=>{if(V){let t=h(e.placement);return t===I||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(r=e);break}case"initialPlacement":r=A}if(C!==r)return{reset:{placement:r}}}return{}}},options:[T,j]},{...{name:"size",options:_=$={...eD,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:i}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)}},async fn(e){var t,r;let i,l,{placement:a,rects:s,platform:c,elements:p}=e,{apply:m=()=>{},...g}=d(_,e),b=await P(e,g),y=u(a),v=f(a),w="y"===h(a),{width:x,height:k}=s.floating;"top"===y||"bottom"===y?(i=y,l=v===(await (null==c.isRTL?void 0:c.isRTL(p.floating))?"start":"end")?"left":"right"):(l=y,i="end"===v?"top":"bottom");let E=k-b.top-b.bottom,C=x-b.left-b.right,R=n(k-b[i],E),S=n(x-b[l],C),A=!e.middlewareData.shift,z=R,O=S;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(O=C),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(z=E),A&&!v){let e=o(b.left,0),t=o(b.right,0),r=o(b.top,0),n=o(b.bottom,0);w?O=x-2*(0!==e||0!==t?e+t:o(b.left,b.right)):z=k-2*(0!==r||0!==n?r+n:o(b.top,b.bottom))}await m({...e,availableWidth:O,availableHeight:z});let L=await c.getDimensions(p.floating);return x!==L.width||k!==L.height?{reset:{rects:!0}}:{}}},options:[$,W]},ep&&{...{name:"arrow",options:H=I={element:ep,padding:K},fn(e){let{element:t,padding:r}="function"==typeof H?H(e):H;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ev({element:t.current,padding:r}).fn(e):{}:t?ev({element:t,padding:r}).fn(e):{}}},options:[I,F]},eq({arrowWidth:eh,arrowHeight:eA}),en&&{...{name:"hide",options:U=B={strategy:"referenceHidden",...eD},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=d(U,e);switch(r){case"referenceHidden":{let r=A(await P(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:z(r)}}}case"escaped":{let r=A(await P(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:z(r)}}}default:return{}}}},options:[B,V]}]}),[eV,eU]=eZ(e_),eG=(0,eL.useCallbackRef)(el);(0,eN.useLayoutEffect)(()=>{eI&&eG?.()},[eI,eG]);let eY=eB.arrow?.x,eK=eB.arrow?.y,eJ=eB.arrow?.centerOffset!==0,[eQ,e0]=t.useState();return(0,eN.useLayoutEffect)(()=>{ed&&e0(window.getComputedStyle(ed).zIndex)},[ed]),(0,eP.jsx)("div",{ref:eM.setFloating,"data-radix-popper-content-wrapper":"",style:{...eW,transform:eI?eW.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eQ,"--radix-popper-transform-origin":[eB.transformOrigin?.x,eB.transformOrigin?.y].join(" "),...eB.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eP.jsx)(eH,{scope:G,placedSide:eV,onArrowChange:em,arrowX:eY,arrowY:eK,shouldHideArrow:eJ,children:(0,eP.jsx)(eS.Primitive.div,{"data-side":eV,"data-align":eU,...ea,ref:ef,style:{...ea.style,animation:eI?void 0:"none"}})})})});eV.displayName=eF;var eU="PopperArrow",eG={top:"bottom",right:"left",bottom:"top",left:"right"},eY=t.forwardRef(function(e,t){let{__scopePopper:r,...n}=e,o=eB(eU,r),i=eG[o.placedSide];return(0,eP.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eP.jsx)(eA,{...n,ref:t,style:{...n.style,display:"block"}})})});function eX(e){return null!==e}eY.displayName=eU;var eq=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[s,c]=eZ(r),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+l/2,f=(o.arrow?.y??0)+a/2,p="",m="";return"bottom"===s?(p=i?d:`${u}px`,m=`${-a}px`):"top"===s?(p=i?d:`${u}px`,m=`${n.floating.height+a}px`):"right"===s?(p=`${-a}px`,m=i?d:`${f}px`):"left"===s&&(p=`${n.floating.width+a}px`,m=i?d:`${f}px`),{data:{x:p,y:m}}}});function eZ(e){let[t,r="center"]=e.split("-");return[t,r]}e.s(["Anchor",()=>eI,"Arrow",()=>eY,"Content",()=>eV,"Root",()=>eW,"createPopperScope",()=>eD],853660)},774606,e=>{"use strict";var t=e.i(271645),r=e.i(174080),n=e.i(248425),o=e.i(934620),i=e.i(843476),l=t.forwardRef((e,l)=>{let{container:a,...s}=e,[c,d]=t.useState(!1);(0,o.useLayoutEffect)(()=>d(!0),[]);let u=a||c&&globalThis?.document?.body;return u?r.default.createPortal((0,i.jsx)(n.Primitive.div,{...s,ref:l}),u):null});l.displayName="Portal",e.s(["Portal",()=>l])},369340,e=>{"use strict";var t=e.i(271645),r=e.i(934620);t[" useEffectEvent ".trim().toString()],t[" useInsertionEffect ".trim().toString()];var n=t[" useInsertionEffect ".trim().toString()]||r.useLayoutEffect;function o({prop:e,defaultProp:r,onChange:o=()=>{},caller:i}){let[l,a,s]=function({defaultProp:e,onChange:r}){let[o,i]=t.useState(e),l=t.useRef(o),a=t.useRef(r);return n(()=>{a.current=r},[r]),t.useEffect(()=>{l.current!==o&&(a.current?.(o),l.current=o)},[o,l]),[o,i,a]}({defaultProp:r,onChange:o}),c=void 0!==e,d=c?e:l;{let r=t.useRef(void 0!==e);t.useEffect(()=>{let e=r.current;if(e!==c){let t=c?"controlled":"uncontrolled";console.warn(`${i} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=c},[c,i])}return[d,t.useCallback(t=>{if(c){let r="function"==typeof t?t(e):t;r!==e&&s.current?.(r)}else a(t)},[c,e,a,s])]}Symbol("RADIX:SYNC_STATE"),e.s(["useControllableState",()=>o],369340)},959411,e=>{"use strict";var t=e.i(271645),r=e.i(248425),n=e.i(843476),o=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),i=t.forwardRef((e,t)=>(0,n.jsx)(r.Primitive.span,{...e,ref:t,style:{...o,...e.style}}));i.displayName="VisuallyHidden",e.s(["Root",()=>i,"VISUALLY_HIDDEN_STYLES",()=>o])},296626,e=>{"use strict";var t=e.i(271645),r=e.i(820783),n=e.i(934620),o=e=>{var o;let l,a,{present:s,children:c}=e,d=function(e){var r,o;let[l,a]=t.useState(),s=t.useRef(null),c=t.useRef(e),d=t.useRef("none"),[u,f]=(r=e?"mounted":"unmounted",o={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>o[e][t]??e,r));return t.useEffect(()=>{let e=i(s.current);d.current="mounted"===u?e:"none"},[u]),(0,n.useLayoutEffect)(()=>{let t=s.current,r=c.current;if(r!==e){let n=d.current,o=i(t);e?f("MOUNT"):"none"===o||t?.display==="none"?f("UNMOUNT"):r&&n!==o?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,n.useLayoutEffect)(()=>{if(l){let e,t=l.ownerDocument.defaultView??window,r=r=>{let n=i(s.current).includes(CSS.escape(r.animationName));if(r.target===l&&n&&(f("ANIMATION_END"),!c.current)){let r=l.style.animationFillMode;l.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===l.style.animationFillMode&&(l.style.animationFillMode=r)})}},n=e=>{e.target===l&&(d.current=i(s.current))};return l.addEventListener("animationstart",n),l.addEventListener("animationcancel",r),l.addEventListener("animationend",r),()=>{t.clearTimeout(e),l.removeEventListener("animationstart",n),l.removeEventListener("animationcancel",r),l.removeEventListener("animationend",r)}}f("ANIMATION_END")},[l,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:t.useCallback(e=>{s.current=e?getComputedStyle(e):null,a(e)},[])}}(s),u="function"==typeof c?c({present:d.isPresent}):t.Children.only(c),f=(0,r.useComposedRefs)(d.ref,(o=u,(a=(l=Object.getOwnPropertyDescriptor(o.props,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?o.ref:(a=(l=Object.getOwnPropertyDescriptor(o,"ref")?.get)&&"isReactWarning"in l&&l.isReactWarning)?o.props.ref:o.props.ref||o.ref));return"function"==typeof c||d.isPresent?t.cloneElement(u,{ref:f}):null};function i(e){return e?.animationName||"none"}o.displayName="Presence",e.s(["Presence",()=>o])}]);
|