db-player 0.0.0-stage → 0.4.1
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/README.md +56 -2
- package/bin/db-player.mjs +149 -0
- package/dist/client/assets/EmptyState-B_8ZzjRf.js +2 -0
- package/dist/client/assets/c._connectionId-BAPOAiu0.js +1 -0
- package/dist/client/assets/index-Cre7NCFa.js +136 -0
- package/dist/client/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/client/assets/routes-_dAU0q9L.js +1 -0
- package/dist/client/assets/styles-D3kk8PAA.css +1669 -0
- package/dist/client/assets/t._tabId-DJ7LAi8J.js +1 -0
- package/dist/server/assets/EmptyState-D1iyQsG1.js +366 -0
- package/dist/server/assets/_tanstack-start-manifest_v-AE6zwk_Q.js +38 -0
- package/dist/server/assets/c._connectionId-BXPGBd-R.js +19 -0
- package/dist/server/assets/createServerRpc-F6SI7pt8.js +11 -0
- package/dist/server/assets/empty-plugin-adapters-BiGySXWX.js +4 -0
- package/dist/server/assets/fns-DNn8Qat1.js +321 -0
- package/dist/server/assets/layout-pJu_-O4s.js +36 -0
- package/dist/server/assets/router-C6umP2o0.js +4061 -0
- package/dist/server/assets/routes-Ce6MPKxr.js +24 -0
- package/dist/server/assets/start-Bai9AeXo.js +3 -0
- package/dist/server/assets/store-Bb9KDsJx.js +827 -0
- package/dist/server/assets/t._tabId-Cf1urQNG.js +4 -0
- package/dist/server/assets/theme-EhZN9QoB.js +32 -0
- package/dist/server/server.js +7788 -0
- package/package.json +73 -3
package/README.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# db-player
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Browse and edit MySQL and ClickHouse databases locally.
|
|
4
|
+
|
|
5
|
+
## Run it
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npx db-player@latest
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
This downloads the newest release, starts it on http://127.0.0.1:3700 and opens your browser. It needs Node 22.13 or newer.
|
|
12
|
+
|
|
13
|
+
| Flag | Default | Meaning |
|
|
14
|
+
| ------------------ | ---------------------------------------------------- | ------------------------------------- |
|
|
15
|
+
| `-p`, `--port <n>` | `$PORT` or `3700` | Port to listen on |
|
|
16
|
+
| `--host <addr>` | `127.0.0.1` | Address to bind. Keep it on loopback. |
|
|
17
|
+
| `--data <file>` | `$DB_PLAYER_DATA` or `~/.db-player/db-player.sqlite` | SQLite store for connections and tabs |
|
|
18
|
+
| `--no-open` | | Do not open the browser |
|
|
19
|
+
| `-v`, `--version` | | Print the version |
|
|
20
|
+
|
|
21
|
+
Connections, saved passwords and the MCP token live in the `--data` file, so back it up and keep it private. db-player prints a line when a newer version exists. Set `DB_PLAYER_NO_UPDATE_CHECK=1` to turn that off.
|
|
22
|
+
|
|
23
|
+
## Develop
|
|
24
|
+
|
|
25
|
+
- `pnpm install`, then `vp dev` serves the app on http://localhost:3700
|
|
26
|
+
- Connections and folders live in `./data/db-player.sqlite` (gitignored). Passwords stay on the server.
|
|
27
|
+
- `vp check`, `vp build`, `pnpm typecheck` verify the project. See `dev/README.md` for the docker databases and the e2e script.
|
|
28
|
+
|
|
29
|
+
## Tabs
|
|
30
|
+
|
|
31
|
+
Tables and SQL editors open in tabs, each bound to its own connection, so several databases stay open at once. Open tabs, their order, the active tab and SQL drafts live in the server store and come back after a reload. The URL of the active tab is `/t/<tabId>`; the old `/c/<connection>/...` URLs open or focus the matching tab.
|
|
32
|
+
|
|
33
|
+
| Shortcut | Action |
|
|
34
|
+
| ------------------ | ----------------------------------------- |
|
|
35
|
+
| `Alt+T` | New SQL tab for the Explorer's connection |
|
|
36
|
+
| `Alt+W` | Close the active tab |
|
|
37
|
+
| `Alt+]` / `Alt+[` | Next / previous tab |
|
|
38
|
+
| `Alt+1` to `Alt+9` | Jump to that tab |
|
|
39
|
+
|
|
40
|
+
A SQL tab has its own database picker; its queries and autocomplete use that database.
|
|
41
|
+
|
|
42
|
+
## Connect an agent (MCP)
|
|
43
|
+
|
|
44
|
+
db-player serves its saved connections to AI agents over MCP at `<origin>/mcp` (Streamable HTTP). Open Settings, copy the command under "Agent access (MCP)" and run it, for example:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
claude mcp add --transport http db-player http://localhost:3700/mcp --header "Authorization: Bearer <token>"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Every request needs `Authorization: Bearer <token>`, localhost included. The token is generated on first use and stored in the SQLite store. "Regenerate token" in Settings replaces it and cuts off existing clients.
|
|
51
|
+
|
|
52
|
+
Two tools:
|
|
53
|
+
|
|
54
|
+
- `list_connections` returns each connection's id, name, kind, folder and default database. Hosts, ports, users and passwords are never returned.
|
|
55
|
+
- `run_query` takes `connection` (id or exact name), optional `database` and `sql`. It returns column names and types, then up to 200 rows as tab-separated text, with a note when more rows exist. Cells over 500 characters are cut.
|
|
56
|
+
|
|
57
|
+
MCP is read-only. A query must be one statement starting with SELECT, WITH, SHOW, DESCRIBE, DESC or EXPLAIN, and the database enforces it as well: ClickHouse runs it with `readonly = 2`, and MySQL runs it in a read-only session and transaction that is always rolled back. The pre-check also rejects `INTO OUTFILE/DUMPFILE`, `SET` and executable comments. The database layer does not stop everything the pre-check does, for example MySQL still lets a `FILE`-privileged user write files, so point production connections at a database user with read-only grants (`SELECT` only, no `FILE`, no `SUPER`). The editor and table view in the app can still write; only MCP is restricted.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawn } from 'node:child_process'
|
|
3
|
+
import { readFileSync } from 'node:fs'
|
|
4
|
+
import { homedir } from 'node:os'
|
|
5
|
+
import { join, resolve } from 'node:path'
|
|
6
|
+
import { parseArgs } from 'node:util'
|
|
7
|
+
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
8
|
+
|
|
9
|
+
const root = fileURLToPath(new URL('..', import.meta.url))
|
|
10
|
+
const { name, version } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
11
|
+
|
|
12
|
+
const HELP = `Usage: db-player [options]
|
|
13
|
+
|
|
14
|
+
Browse and edit MySQL and ClickHouse databases locally.
|
|
15
|
+
|
|
16
|
+
Options:
|
|
17
|
+
-p, --port <n> Port to listen on (default: $PORT or 3700)
|
|
18
|
+
--host <addr> Address to bind (default: 127.0.0.1)
|
|
19
|
+
--data <file> SQLite store for connections and tabs
|
|
20
|
+
(default: $DB_PLAYER_DATA or ~/.db-player/db-player.sqlite)
|
|
21
|
+
--no-open Do not open the browser
|
|
22
|
+
-v, --version Print the version
|
|
23
|
+
-h, --help Print this help`
|
|
24
|
+
|
|
25
|
+
let args
|
|
26
|
+
try {
|
|
27
|
+
args = parseArgs({
|
|
28
|
+
options: {
|
|
29
|
+
port: { type: 'string', short: 'p' },
|
|
30
|
+
host: { type: 'string' },
|
|
31
|
+
data: { type: 'string' },
|
|
32
|
+
'no-open': { type: 'boolean' },
|
|
33
|
+
version: { type: 'boolean', short: 'v' },
|
|
34
|
+
help: { type: 'boolean', short: 'h' },
|
|
35
|
+
},
|
|
36
|
+
allowPositionals: false,
|
|
37
|
+
}).values
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(`${error.message}\n\n${HELP}`)
|
|
40
|
+
process.exit(1)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (args.help) {
|
|
44
|
+
console.log(HELP)
|
|
45
|
+
process.exit(0)
|
|
46
|
+
}
|
|
47
|
+
if (args.version) {
|
|
48
|
+
console.log(version)
|
|
49
|
+
process.exit(0)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const [major, minor] = process.versions.node.split('.').map(Number)
|
|
53
|
+
if (major < 22 || (major === 22 && minor < 13)) {
|
|
54
|
+
console.error(`db-player needs Node 22.13 or newer. You are running ${process.version}.`)
|
|
55
|
+
process.exit(1)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const rawPort = args.port ?? process.env.PORT ?? '3700'
|
|
59
|
+
const port = /^\d+$/.test(rawPort) ? Number(rawPort) : NaN
|
|
60
|
+
if (!Number.isInteger(port) || port > 65535) {
|
|
61
|
+
console.error(`Invalid port: ${rawPort}`)
|
|
62
|
+
process.exit(1)
|
|
63
|
+
}
|
|
64
|
+
const host = args.host ?? '127.0.0.1'
|
|
65
|
+
const dataFile = resolve(
|
|
66
|
+
args.data ?? process.env.DB_PLAYER_DATA ?? join(homedir(), '.db-player', 'db-player.sqlite'),
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
process.env.NODE_ENV = 'production'
|
|
70
|
+
process.env.DB_PLAYER_DATA = dataFile
|
|
71
|
+
|
|
72
|
+
const { serve } = await import('srvx')
|
|
73
|
+
const { staticMiddleware } = await import('srvx/static')
|
|
74
|
+
const app = (await import(pathToFileURL(join(root, 'dist/server/server.js')).href)).default
|
|
75
|
+
|
|
76
|
+
const server = serve({
|
|
77
|
+
fetch: app.fetch,
|
|
78
|
+
middleware: [staticMiddleware({ dir: join(root, 'dist/client') })],
|
|
79
|
+
port,
|
|
80
|
+
hostname: host,
|
|
81
|
+
silent: true,
|
|
82
|
+
gracefulShutdown: false,
|
|
83
|
+
manual: true,
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
await server.serve()
|
|
88
|
+
} catch (error) {
|
|
89
|
+
if (error.code === 'EADDRINUSE') {
|
|
90
|
+
console.error(`Port ${port} is in use. Try --port ${port + 1}.`)
|
|
91
|
+
} else {
|
|
92
|
+
console.error(`Could not start db-player: ${error.message}`)
|
|
93
|
+
}
|
|
94
|
+
process.exit(1)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const url = server.url?.replace(/\/$/, '') ?? `http://${host}:${port}`
|
|
98
|
+
console.log(`db-player ${version} running at ${url}`)
|
|
99
|
+
console.log(`Data: ${dataFile}`)
|
|
100
|
+
|
|
101
|
+
if (!args['no-open']) openBrowser(url)
|
|
102
|
+
if (!process.env.DB_PLAYER_NO_UPDATE_CHECK) void checkForUpdate()
|
|
103
|
+
|
|
104
|
+
let closing = false
|
|
105
|
+
for (const signal of ['SIGINT', 'SIGTERM']) {
|
|
106
|
+
process.on(signal, () => {
|
|
107
|
+
if (closing) process.exit(1)
|
|
108
|
+
closing = true
|
|
109
|
+
const force = setTimeout(() => process.exit(0), 2000)
|
|
110
|
+
force.unref()
|
|
111
|
+
void server.close(true).finally(() => process.exit(0))
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function openBrowser(target) {
|
|
116
|
+
const [command, commandArgs] =
|
|
117
|
+
process.platform === 'darwin'
|
|
118
|
+
? ['open', [target]]
|
|
119
|
+
: process.platform === 'win32'
|
|
120
|
+
? ['cmd', ['/c', 'start', '', target]]
|
|
121
|
+
: ['xdg-open', [target]]
|
|
122
|
+
try {
|
|
123
|
+
const child = spawn(command, commandArgs, { detached: true, stdio: 'ignore' })
|
|
124
|
+
child.on('error', () => {})
|
|
125
|
+
child.unref()
|
|
126
|
+
} catch {}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function checkForUpdate() {
|
|
130
|
+
try {
|
|
131
|
+
const res = await fetch(`https://registry.npmjs.org/${name}/latest`, {
|
|
132
|
+
signal: AbortSignal.timeout(1500),
|
|
133
|
+
})
|
|
134
|
+
if (!res.ok) return
|
|
135
|
+
const latest = (await res.json()).version
|
|
136
|
+
if (typeof latest === 'string' && isNewer(latest, version)) {
|
|
137
|
+
console.log(`db-player ${latest} is available. Run npx db-player@latest`)
|
|
138
|
+
}
|
|
139
|
+
} catch {}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function isNewer(a, b) {
|
|
143
|
+
const pa = a.split('-')[0].split('.').map(Number)
|
|
144
|
+
const pb = b.split('-')[0].split('.').map(Number)
|
|
145
|
+
for (let i = 0; i < 3; i++) {
|
|
146
|
+
if ((pa[i] ?? 0) !== (pb[i] ?? 0)) return (pa[i] ?? 0) > (pb[i] ?? 0)
|
|
147
|
+
}
|
|
148
|
+
return false
|
|
149
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var ee=Array.isArray;function te(){}var C={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function re(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ie(e,t){return re(e.type,t,e.props)}function ae(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function w(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?w(``+e.key):t.toString(36)}function ce(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(te,te):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function T(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,T(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,ee(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),T(o,r,i,``,function(e){return e})):o!=null&&(ae(o)&&(o=ie(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ee(e))for(var u=0;u<e.length;u++)a=e[u],s=l+se(a,u),c+=T(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+se(a,u++),c+=T(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return T(ce(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function E(e,t,n){if(e==null)return e;var r=[],i=0;return T(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function le(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ue=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function de(e){var t=C.T,n={};n.types=t===null?null:t.types,C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(te,ue)}catch(e){ue(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}}function fe(e){var t=C.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else de(fe.bind(null,e))}var D={map:E,forEach:function(e,t,n){E(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return E(e,function(){t++}),t},toArray:function(e){return E(e,function(e){return e})||[]},only:function(e){if(!ae(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=D,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.addTransitionType=fe,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ne.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return re(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ne.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return re(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ae,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:le}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=de,e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.3.1`})),r=t(((e,t)=>{t.exports=n()})),i=`__TSS_CONTEXT`,a=Symbol.for(`TSS_SERVER_FUNCTION`),o=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),s=`x-tss-raw`,c=`application/x-tss-framed`;`${c}`;var l=()=>window.__TSS_START_OPTIONS__;function u(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function d(e){return e?.isNotFound===!0}function f(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function p(e){return e instanceof Response&&!!e.options}function m(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return f(e)}function h(){throw Error(`Invariant failed`)}function g(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function _(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function v(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=_(r):Array.isArray(t)?t.push(_(r)):n[e]=[t,_(r)]}return n}var y=Symbol.asyncIterator,b=Symbol.hasInstance,x=Symbol.isConcatSpreadable,S=Symbol.iterator,ee=Symbol.match,te=Symbol.matchAll,C=Symbol.replace,ne=Symbol.search,re=Symbol.species,ie=Symbol.split,ae=Symbol.toPrimitive,w=Symbol.toStringTag,oe=Symbol.unscopables,se={0:`Instant`,1:`Duration`,2:`PlainDate`,3:`PlainDateTime`,4:`PlainMonthDay`,5:`PlainTime`,6:`PlainYearMonth`,7:`ZonedDateTime`},ce={0:y,1:b,2:x,3:S,4:ee,5:te,6:C,7:ne,8:re,9:ie,10:ae,11:w,12:oe};function T(){let e={};for(let t=0;t<=12;t++)e[ce[t]]=t;return e}var E=T(),le={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},ue={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function de(){let e={};for(let t=0;t<=6;t++)e[t]=ue[t].name;return e}var fe=de();function D(e,t,n,r,i,a,o,s,c,l,u,d){return r===void 0&&i===void 0&&a===void 0&&o===void 0&&s===void 0&&c===void 0&&l===void 0&&u===void 0&&d===void 0?{t:e,i:t,s:n}:{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function O(e){return D(2,void 0,e)}var pe=O(2),me=O(3),he=O(1),ge=O(0),_e=O(4),ve=O(5),ye=O(6),be=O(7),xe=64,Se=/["\\\n\r\b\t\f<\u2028\u2029]/,Ce=/[\x00-\x07\x0b\x0e-\x1f\ud800-\udfff]/,we=/</g,Te=/\u2028/g,Ee=/\u2029/g;function De(e){switch(e){case 34:return`\\"`;case 92:return`\\\\`;case 10:return`\\n`;case 13:return`\\r`;case 8:return`\\b`;case 9:return`\\t`;case 12:return`\\f`;case 60:return`\\x3C`;case 8232:return`\\u2028`;case 8233:return`\\u2029`;default:return}}function k(e){let t=``+e;if(!Se.test(t))return t;if(t.length>=xe&&!Ce.test(t)){let e=JSON.stringify(t).slice(1,-1);return e.includes(`<`)&&(e=e.replace(we,`\\x3C`)),e.includes(`\u2028`)&&(e=e.replace(Te,`\\u2028`)),e.includes(`\u2029`)&&(e=e.replace(Ee,`\\u2029`)),e}let n=``,r=0,i;for(let e=0,a=t.length;e<a;e++)i=De(t.charCodeAt(e)),i&&(n+=t.slice(r,e)+i,r=e+1);return n+t.slice(r)}var Oe=/^(?:[^"\\\x00-\x1f]|\\["\\nrbtf])*$/,ke=/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g;function A(e){if(typeof e!=`string`)return e.replace(ke,A);let t=e.indexOf(`\\`);if(t===-1)return e;if(Oe.test(e))return JSON.parse(`"`+e+`"`);let n=``,r=0,i=e.length-1;for(;t!==-1&&t<i;){let i,a=2;switch(e.charCodeAt(t+1)){case 92:i=`\\`;break;case 34:i=`"`;break;case 110:i=`
|
|
2
|
+
`;break;case 114:i=`\r`;break;case 98:i=`\b`;break;case 116:i=` `;break;case 102:i=`\f`;break;case 120:e.startsWith(`3C`,t+2)&&(i=`<`,a=4);break;case 117:e.startsWith(`2028`,t+2)?(i=`\u2028`,a=6):e.startsWith(`2029`,t+2)&&(i=`\u2029`,a=6)}i?(n+=e.slice(r,t)+i,r=t+a,t=e.indexOf(`\\`,r)):t=e.indexOf(`\\`,t+1)}return n+e.slice(r)}var Ae={parsing:1,serialization:2,deserialization:3};function je(e){return`Seroval Error (step: ${Ae[e]})`}var Me=class extends Error{constructor(e,t){super(je(e)),this.cause=t}},Ne=class extends Me{constructor(e){super(`parsing`,e)}},Pe=class extends Me{constructor(e){super(`deserialization`,e)}};function j(e){return`Seroval Error (specific: ${e})`}var M=class extends Error{constructor(e){super(j(1)),this.value=e}},Fe=class extends Error{constructor(e){super(j(2))}},Ie=class extends Error{constructor(e){super(j(3))}},Le=class extends Error{constructor(e){super(j(4))}},Re=class extends Error{constructor(e){super(j(6))}},ze=class extends Error{constructor(e){super(j(7))}},N=class extends Error{constructor(e){super(j(8))}},Be=class extends Error{constructor(e){super(j(9))}},Ve=class extends Error{constructor(e){super(j(10))}};function He(e){for(let t=1;t<=6;t++)if(e instanceof ue[t])return t;return 0}function Ue(e,t){let n=Object.create(null),r=fe[He(e)];e.name===r?e.constructor.name!==r&&(n.name=e.constructor.name):n.name=e.name;for(let r of Object.getOwnPropertyNames(e))r!==`name`&&r!==`message`&&(r!==`stack`||t&4)&&(n[r]=e[r]);return n}function We(e){return Object.isExtensible(e)?0:Object.isFrozen(e)?3:Object.isSealed(e)?2:1}function Ge(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new ze(e)}}var Ke;function qe(e){return Ke||=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get,Ke.call(e)}var Je,Ye;function Xe(e,t){return Object.getOwnPropertyDescriptor(e,t).get}function Ze(e,t){return{buffer:Xe(e,`buffer`),byteOffset:Xe(e,`byteOffset`),byteLength:Xe(e,`byteLength`),length:Xe(e,t)}}function Qe(e,t){let n;return n=t?Ye??=Ze(DataView.prototype,`byteLength`):Je??=Ze(Object.getPrototypeOf(Int8Array.prototype),`length`),{buffer:n.buffer.call(e),byteOffset:n.byteOffset.call(e),byteLength:n.byteLength.call(e),length:n.length.call(e)}}function $e(e){switch(e){case 1/0:return ve;case-1/0:return ye}return e===e?Object.is(e,-0)?_e:D(0,void 0,e):be}function et(e){return D(1,void 0,k(e))}function tt(e){return D(3,void 0,``+e)}function nt(e){return D(4,e)}var rt=Date.prototype.getTime,it=Date.prototype.toISOString;function at(e,t){let n=rt.call(t);return D(5,e,n===n?it.call(t):``)}function ot(e,t,n,r){return D(36,e,n.prototype.toString.call(r),t)}var st=Object.getOwnPropertyDescriptor(RegExp.prototype,`source`).get,ct=Object.getOwnPropertyDescriptor(RegExp.prototype,`flags`).get;function lt(e,t){return D(6,e,void 0,k(st.call(t)),ct.call(t))}function ut(e,t){return D(17,e,E[t])}function dt(e,t){return D(18,e,k(t))}function ft(e,t,n){return D(25,e,n,k(t))}function pt(e,t,n){return D(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,We(t))}function mt(e,t){return D(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t)}var ht=1e6;function gt(e,t,n,r,i){let a=e===20,o=r.length;if(o>ht)throw new M(n);return D(e,t,void 0,a?void 0:qe(n),void 0,void 0,void 0,void 0,i,r.byteOffset,void 0,o)}function _t(e,t,n,r){return D(e,t,He(n),void 0,k(n.message),r)}function vt(e,t){return D(7,e,void 0,void 0,void 0,void 0,void 0,t)}function yt(e,t,n){return D(e,void 0,void 0,void 0,void 0,void 0,void 0,[t,n])}function bt(e,t,n,r){return D(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,r)}function xt(e,t,n){return D(e,t,void 0,void 0,void 0,void 0,void 0,void 0,n)}function St(e,t,n,r){return D(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var Ct=Symbol(`LiveStream`);function wt(e){return e!=null&&e[Ct]===!0}var Tt=class{constructor(e,t){this.value=e,this.replacement=t}},Et=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},Dt=e=>t=>()=>{let n=0,r={[e](){return r},next(){if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r},Ot=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c={finalize(e=0,t=s.length){for(;e<t;e++)s[e].s({done:!0,value:void 0})}};n.on({next(e){let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw(e){let t=s.shift();t&&t.f(e),c.finalize(),i=o.length,a=!0,o.push(e)},return(e){let t=s.shift();t&&t.s({done:!0,value:e}),c.finalize(),i=o.length,o.push(e)}});let l={[e](){return l},next(){if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l},kt=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer},At=class{constructor(e,t,n){this.v=e,this.t=t,this.d=n}};function jt(e){return e instanceof At}function Mt(e,t,n){return new At(e,t,n)}function Nt(e){let t=[],n=-1,r=-1,i=e[S]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,r=n,t.push(e);break}return Mt(t,n,r)}var Pt=Dt(S);function Ft(e){return Pt(e)}var It={},Lt={},Rt={0:{},1:{},2:{},3:{},4:{},5:{}},zt=class{constructor(e){this.buffer=[],this.listeners=[],this.alive=!0,this.success=!1,this.count=0,this.live=e}flush(e,t){this.live>1||this.buffer.push(e);for(let n=0;n<this.count;n++)this.listeners[n]?.[t](e)}replay(e){for(let t=0,n=this.buffer.length;t<n;t++){let r=this.buffer[t];!this.alive&&t===n-1?e[this.success?`return`:`throw`](r):e.next(r)}}on(e){if(this.live>1)throw Error(`Stream consumed`);let t=this.alive,n=0;if(t){for(;n<this.count&&this.listeners[n];n++);n===this.count&&this.count++,this.listeners[n]=e}return this.replay(e),this.live&&(this.live=2,this.buffer.length=0),()=>{if(this.alive&&t){for(t=!1,this.listeners[n]=void 0;this.count>0&&!this.listeners[this.count-1];)this.count--;this.listeners.length=this.count}}}endedEvents(){if(!(this.alive||this.live>1))return{values:this.buffer.slice(),success:this.success}}next(e){this.alive&&this.flush(e,`next`)}throw(e){this.alive&&(this.flush(e,`throw`),this.alive=!1,this.success=!1,this.listeners.length=0)}return(e){this.alive&&(this.flush(e,`return`),this.alive=!1,this.success=!0,this.listeners.length=0)}};function Bt(e){return e instanceof zt||wt(e)}function Vt(){return new zt}var Ht=Ot(y,Et);function Ut(e){return Ht(e)}async function Wt(e){try{return[1,await e]}catch(e){return[0,e]}}function Gt(e){let t=new Uint8Array(e);if(typeof t.toBase64==`function`)return t.toBase64();let n=``;for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);return btoa(n)}var Kt=512;function qt(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):Gt(e)}function Jt(e){if(e.length<Kt||typeof Buffer>`u`)return kt(e);let t=atob(e),n=new ArrayBuffer(t.length);return Buffer.from(n).write(t,`latin1`),n}function P(e){return e}function Yt(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Yt(e,r.extends))}}var Xt=new WeakMap;function Zt(e,t,n){for(let r=0,i=t.length;r<i;r++){let i=t[r];if(i===e[n]){if(n++,i.extends&&(n=Zt(e,i.extends,n),n===-1))return-1}else{let t=e.indexOf(i);if(t===-1||t>=n)return-1}}return n}function Qt(e){if(e){let t=Xt.get(e);if(t&&Zt(t,e,0)===t.length)return t;let n=new Set;Yt(n,e);let r=[...n];return Xt.set(e,r),r}}function $t(e){if(e){for(let t=0,n=e.length;t<n;t++)if(e[t].skipPlainObjects){let t=e.filter(e=>!e.skipPlainObjects);return t.length?t:void 0}}return e}var en=new Map,tn=new Map;function nn(e){return tn.has(e)}function rn(e){return en.get(e)}function an(e){if(nn(e))return tn.get(e);throw new Re(e)}function on(e){return{plugins:e.plugins,plainObjectPlugins:$t(e.plugins),marked:new Set,features:127^(e.disabledFeatures??0),refs:e.refs??new Map,depthLimit:e.depthLimit||1e3,compactArrayBufferViews:e.compactArrayBufferViews??!1}}function sn(e,t,n){return n===Object&&Object.getPrototypeOf(t)===Object.prototype?e.plainObjectPlugins:e.plugins}function cn(e,t){e.marked.add(t)}function ln(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function un(e,t){let n=e.refs.get(t);return n==null?ln(e,t):(cn(e,n),nt(n))}function dn(e,t){let n=un(e,t);if(typeof n!=`number`)return n;let r=rn(t);return r===void 0?n:dt(n,r)}function F(e,t){let n=dn(e,t);if(typeof n!=`number`)return n;if(t in E)return ut(n,t);throw new M(t)}function I(e,t){let n=un(e,Rt[t]);return typeof n==`number`?D(26,n,t):n}function fn(e){let t=un(e,It);return typeof t==`number`?D(27,t,void 0,void 0,void 0,void 0,void 0,void 0,F(e,S)):t}function pn(e){let t=un(e,Lt);return typeof t==`number`?D(29,t,void 0,void 0,void 0,void 0,void 0,[I(e,1),F(e,y)]):t}function mn(e){switch(e){case Temporal.Instant:return 0;case Temporal.Duration:return 1;case Temporal.PlainDate:return 2;case Temporal.PlainDateTime:return 3;case Temporal.PlainMonthDay:return 4;case Temporal.PlainTime:return 5;case Temporal.PlainYearMonth:return 6;case Temporal.ZonedDateTime:return 7;default:return}}function hn(e){let t=Object.getPrototypeOf(e);if(t===null)return;if(t===Object.prototype)return Object;let n=t.constructor;return typeof n!=`function`||n===Object||n.prototype===t?n:t}function gn(e,t,n){switch(t){case Object:return 1;case void 0:return 2;case Date:return 3;case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return 4;case Number:case Boolean:case String:case BigInt:return 6;case ArrayBuffer:return 7;case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return 8;case DataView:return 10;case Map:return 11;case Set:return 12}return t===Promise||e instanceof Promise?13:n&32&&t===RegExp?14:n&16&&(t===BigInt64Array||t===BigUint64Array)?9:n&1&&typeof AggregateError<`u`&&(t===AggregateError||e instanceof AggregateError)?5:n&64&&typeof Temporal<`u`&&mn(t)!=null?15:e instanceof Error?4:S in e||y in e?16:0}function _n(e,t,n,r){return D(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,We(t))}function vn(e){return I(e,0)}function yn(e,t,n,r){return D(8,e,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,t)}function bn(e,t){return e.compactArrayBufferViews?{buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,byteOffset:0,byteLength:t.byteLength,length:t.length}:t}function xn(e,t,n){return D(19,t,qt(n),void 0,void 0,void 0,void 0,void 0,I(e,5))}function Sn(e){return{base:on(e)}}async function Cn(e,t,n){let r=n.length,i=Array(r);for(let a=0,o;a<r;a++)a in n?(o=L(e,t,n[a]),i[a]=o instanceof Promise?await o:o):i[a]=0;return i}async function wn(e,t,n,r){return pt(n,r,await Cn(e,t,r))}async function Tn(e,t,n){let r=Object.keys(n),i=r.length,a=Array(i),o=Array(i);for(let s=0,c,l;s<i;s++)c=r[s],a[s]=k(c),l=L(e,t,n[c]),o[s]=l instanceof Promise?await l:l;return S in n&&(a.push(F(e.base,S)),o.push(yt(28,fn(e.base),await R(e,t,Nt(n))))),y in n&&(a.push(F(e.base,y)),o.push(yt(30,pn(e.base),await In(e,t,n)))),w in n&&(a.push(F(e.base,w)),o.push(et(n[w]))),x in n&&(a.push(F(e.base,x)),o.push(n[x]?pe:me)),{k:a,v:o}}async function En(e,t,n,r,i){return _n(n,r,i,await Tn(e,t,r))}async function Dn(e,t,n,r){let i=L(e,t,r.valueOf());return mt(n,i instanceof Promise?await i:i)}async function On(e,t,n,r,i){let a=bn(e.base,Qe(i,n===20));return gt(n,r,i,a,await R(e,t,a.buffer))}async function kn(e,t,n,r,i){let a=Ue(i,e.base.features);return _t(n,r,i,a?await Tn(e,t,a):void 0)}async function An(e,t,n,r){let i=vn(e.base),a=Array(r.size),o=Array(r.size),s,c=0;for(let[n,i]of r.entries())s=L(e,t,n),a[c]=s instanceof Promise?await s:s,s=L(e,t,i),o[c]=s instanceof Promise?await s:s,c++;return yn(n,i,a,o)}async function jn(e,t,n,r){let i=Array(r.size),a,o=0;for(let n of r.keys())a=L(e,t,n),i[o++]=a instanceof Promise?await a:a;return vt(n,i)}async function Mn(e,t,n,r,i){if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return ft(n,o.tag,await o.parse.async(r,{parse:n=>R(e,t,n),parseStreamSource(n){if(t>=e.base.depthLimit)throw new Ve(e.base.depthLimit);return In(e,t+1,n)}},{id:n}))}}async function Nn(e,t,n,r){let[i,a]=await Wt(r);return D(12,n,i,void 0,void 0,void 0,void 0,void 0,await R(e,t,a))}function Pn(e,t,n,r,i){let a=[],o=0,s=!1,c=!1,l=e=>{if(!c){c=!0;try{f(e)}catch{}i(e)}},u=n=>(u,d)=>{if(c)return;cn(this.base,t);let p=a.push(void 0)-1;o++,n!==32&&(s=!0),R(this,e,u).then(e=>{if(!c&&(a[p]=xt(n,t,e),o--,d?.(),s&&o===0)){c=!0;try{f()}catch(e){i(e);return}r(a)}},l)},d={next:u(32),throw:u(33),return:u(34)},f=wt(n)?n.pump(d):n.on(d)}async function Fn(e,t,n,r){return bt(n,I(e.base,4),await new Promise(Pn.bind(e,t,n,r)))}async function In(e,t,n){let r=ln(e.base,{}),i=I(e.base,4),a=n[y](),o=[];for(;;){let n;cn(e.base,r);try{n=await a.next()}catch(n){o.push(xt(33,r,await R(e,t,n)));break}let i;try{i=await R(e,t,n.value)}catch(e){throw Promise.resolve().then(()=>a.return?.()).catch(()=>{}),e}if(o.push(xt(n.done?34:32,r,i)),n.done)break}return bt(r,i,o)}async function Ln(e,t,n,r){let i=r.v.length,a=Array(i);for(let n=0,o;n<i;n++)o=L(e,t,r.v[n]),a[n]=o instanceof Promise?await o:o;return St(n,a,r.t,r.d)}async function Rn(e,t,n,r){if(Array.isArray(r))return wn(e,t,n,r);if(Bt(r))return Fn(e,t,n,r);if(jt(r))return Ln(e,t,n,r);let i=hn(r);if(i===Tt)return R(e,t,r.replacement);let a=await Mn(e,t,n,r,sn(e.base,r,i));if(a)return a;if(i===Object)return En(e,t,n,r,!1);switch(gn(r,i,e.base.features)){case 2:return En(e,t,n,r,!0);case 3:return at(n,r);case 4:return kn(e,t,13,n,r);case 5:return kn(e,t,14,n,r);case 6:return Dn(e,t,n,r);case 7:return xn(e.base,n,r);case 8:return On(e,t,15,n,r);case 9:return On(e,t,16,n,r);case 10:return On(e,t,20,n,r);case 11:return An(e,t,n,r);case 12:return jn(e,t,n,r);case 13:return Nn(e,t,n,r);case 14:return lt(n,r);case 15:return ot(n,mn(i),i,r);case 16:return En(e,t,n,r,!!i);default:throw new M(r)}}async function zn(e,t,n){let r=dn(e.base,n);if(typeof r!=`number`)return r;let i=await Mn(e,t,r,n,e.base.plugins);if(i)return i;throw new M(n)}function L(e,t,n){if(t>=e.base.depthLimit)throw new Ve(e.base.depthLimit);switch(typeof n){case`boolean`:return n?pe:me;case`undefined`:return he;case`string`:return et(n);case`number`:return $e(n);case`bigint`:return tt(n);case`object`:if(n){let r=dn(e.base,n);return typeof r==`number`?Rn(e,t+1,r,n):r}return ge;case`symbol`:return F(e.base,n);case`function`:return zn(e,t,n);default:throw new M(n)}}async function R(e,t,n){return await L(e,t,n)}async function Bn(e,t){try{return await R(e,0,t)}catch(e){throw e instanceof Ne?e:new Ne(e)}}function Vn(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function Hn(e){switch(e){case y:case x:case w:case S:return!0;default:return!1}}var Un=1e6,Wn=1e4,Gn=2e4;function Kn(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var qn=1e3,Jn=32,Yn=/\\[pP]\{/g;function Xn(e){let t=e.maxBase64Length??Un;if(!Number.isSafeInteger(t)||t<0)throw RangeError(`maxBase64Length must be a non-negative safe integer`);let n=e.refs??new Map;return`types`in n||Object.assign(n,{types:new Map}),{plugins:e.plugins,refs:n,features:e.features??127^(e.disabledFeatures??0),depthLimit:e.depthLimit||qn,maxBase64Length:t,regexpPropertyEscapes:Jn}}function Zn(e){return{base:Xn(e),marked:void 0}}function Qn(e,t){let n={t:4,i:t};if(t<0||!Number.isInteger(t))throw new N(n);if(e.refs.has(t))throw new Be(n)}function $n(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&`then`in e&&typeof e.then==`function`}var er=()=>{};function z(e,t,n){Qn(e.base,t),n instanceof Promise&&n.catch(er);let r=e.marked;return(!r||r.has(t))&&e.base.refs.set(t,n),n}function tr(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new N(e)}function nr(e,t){return z(e,t.i,an(A(t.s)))}function B(e,t){if(!Array.isArray(t))throw new N(e)}function rr(e,t,n){let r=n.a;B(n,r);let i=r.length,a=z(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=V(e,t,o));return Kn(a,n.o),a}function ir(e,t,n){Vn(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function ar(e,t,n,r,i){if(typeof r==`string`)ir(n,A(r),V(e,t,i));else{let a=V(e,t,r);switch(typeof a){case`string`:ir(n,a,V(e,t,i));break;case`symbol`:Hn(a)&&(n[a]=V(e,t,i));break;default:throw new N(r)}}}function or(e,t,n){e.base.refs.types.set(t,n)}function sr(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new N(t)}function cr(e,t,n,r){let i=n.k;B(n,i),B(n,n.v);let a=i.length;if(a>0)for(let o=0,s=n.v;o<a;o++)ar(e,t,r,i[o],s[o]);return r}function lr(e,t,n){let r=z(e,n.i,n.t===10?{}:Object.create(null));return cr(e,t,n.p,r),Kn(r,n.o),r}function ur(e,t){return z(e,t.i,new Date(t.s))}function dr(e,t){if(!(e.base.features&64))throw new Fe(t);let n=Temporal[tr(t,se,t.c)];return z(e,t.i,n.from(t.s))}function fr(e,t){if(e.base.features&32){let n=A(t.c);if(n.length>Gn)throw new N(t);if(/[uv]/.test(String(t.m))){let r=n.match(Yn);if(r&&(e.base.regexpPropertyEscapes-=r.length,e.base.regexpPropertyEscapes<0))throw new N(t)}return z(e,t.i,new RegExp(n,t.m))}throw new Fe(t)}function pr(e,t,n){let r=z(e,n.i,new Set);B(n,n.a);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(V(e,t,a[i]));return r}function mr(e,t,n){let r=z(e,n.i,new Map);B(n,n.e.k),B(n,n.e.v);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(V(e,t,a[i]),V(e,t,o[i]));return r}function hr(e,t){if(typeof t.s!=`string`)throw new N(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=Jt(A(t.s));return z(e,t.i,n)}function gr(e,t,n,r){let i=V(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new N(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new N(n);return z(e,n.i,r?new r(i,a,n.l):new DataView(i,a,n.l))}function _r(e,t,n,r){if(n.p){let i=cr(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function vr(e,t,n){return _r(e,t,n,z(e,n.i,AggregateError([],A(n.m))))}function yr(e,t,n){let r=tr(n,ue,n.s);return _r(e,t,n,z(e,n.i,new r(A(n.m))))}function br(e,t,n){let r=Et(),i=z(e,n.i,r.p),a=V(e,t,n.f);if($n(a))throw new N(n.f);return n.s?r.s(a):r.f(a),i}function xr(e,t,n){return z(e,n.i,Object(V(e,t,n.f)))}function Sr(e,t,n){let r=e.base.plugins;if(r){let i=A(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return z(e,n.i,o.deserialize(n.s,{deserialize:n=>V(e,t,n)},{id:n.i}))}}throw new Ie(n.c)}function Cr(e,t){let n=z(e,t.i,z(e,t.s,Et()).p);return or(e,t.s,22),e.base.pending?.add(t.s),n}function wr(e,t,n){let r=e.base.refs.get(n.i);if(r){sr(e,n,n.i,22);let i=V(e,t,n.a[1]);if($n(i))throw new N(n.a[1]);n.t===23?r.s(i):r.f(i),e.base.pending?.delete(n.i)}else throw new Le(`Promise`)}function Tr(e,t,n){V(e,t,n.a[0]);let r=V(e,t,n.a[1]);if(!jt(r))throw new N(n.a[1]);return Ft(r)}function Er(e,t,n){V(e,t,n.a[0]);let r=V(e,t,n.a[1]);if(!Bt(r))throw new N(n.a[1]);return Ut(r)}function Dr(e,t,n){let r=z(e,n.i,new zt(n.l===1?1:void 0));or(e,n.i,31),e.base.pending?.add(n.i);let i=n.a;B(n,i);let a=i.length;if(a)for(let n=0;n<a;n++)V(e,t,i[n]);return r}function Or(e,t,n,r){let i=e.base.refs.get(n.i);if(i)sr(e,n,n.i,31),i[r](V(e,t,n.f)),r!==`next`&&e.base.pending?.delete(n.i);else throw new Le(`Stream`)}function kr(e,t,n){V(e,t,n.f)}function Ar(e,t,n){V(e,t,n.a[1])}function jr(e,t){return Number.isInteger(e)&&e>=-1&&e<t}function Mr(e,t,n){B(n,n.a);let r=n.a.length;if(!(jr(n.s,r)&&jr(n.l,r)))throw new N(n);let i=z(e,n.i,Mt([],n.s,n.l));or(e,n.i,35);for(let a=0;a<r;a++)i.v[a]=V(e,t,n.a[a]);return i}function V(e,t,n){if(t>e.base.depthLimit)throw new Ve(e.base.depthLimit);switch(t+=1,n.t){case 2:return tr(n,le,n.s);case 0:return Number(n.s);case 1:return A(String(n.s));case 3:if(String(n.s).length>Wn)throw new N(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return nr(e,n);case 9:return rr(e,t,n);case 10:case 11:return lr(e,t,n);case 5:return ur(e,n);case 6:return fr(e,n);case 7:return pr(e,t,n);case 8:return mr(e,t,n);case 19:return hr(e,n);case 16:case 15:return gr(e,t,n,Ge(n.c));case 20:return gr(e,t,n);case 14:return vr(e,t,n);case 13:return yr(e,t,n);case 12:return br(e,t,n);case 17:return tr(n,ce,n.s);case 21:return xr(e,t,n);case 25:return Sr(e,t,n);case 22:return Cr(e,n);case 23:case 24:return wr(e,t,n);case 28:return Tr(e,t,n);case 30:return Er(e,t,n);case 31:return Dr(e,t,n);case 32:return Or(e,t,n,`next`);case 33:return Or(e,t,n,`throw`);case 34:return Or(e,t,n,`return`);case 27:return kr(e,t,n);case 29:return Ar(e,t,n);case 35:return Mr(e,t,n);case 36:return dr(e,n);default:throw new Fe(n)}}function Nr(e,t){e.base.regexpPropertyEscapes=Jn;try{return V(e,0,t)}catch(e){throw new Pe(e)}}function Pr(e){return Zn({maxBase64Length:e.maxBase64Length,plugins:Qt(e.plugins),refs:e.refs,features:e.features,disabledFeatures:e.disabledFeatures,depthLimit:e.depthLimit})}function Fr(e,t){return Nr(Pr(t),e)}async function Ir(e,t={}){let n=Qt(t.plugins),r=Sn({compactArrayBufferViews:t.compactArrayBufferViews,depthLimit:t.depthLimit,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await Bn(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function Lr(e){return P({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n){return{v:n.parse(e.toSerializable(t))}},async async(t,n){return{v:await n.parse(e.toSerializable(t))}},stream(t,n){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t.v))}})}function Rr(e){if(Array.isArray(e))return e.flatMap(e=>Rr(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function zr(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function Br(...e){return e.reduce((e,t)=>{let n=zr(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?Rr(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var Vr=P({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),Hr=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function Ur(e){let t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(``))}var Wr=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function Gr(e){try{return`t`+Wr.decode(e)}catch{return`b`+Ur(e)}}function Kr(e,t,n){n?.throwIfAborted();let r=Vt(),i=e.getReader(),a=!0,o=()=>{a=!1,n?.removeEventListener(`abort`,c),i.releaseLock()},s=e=>a?(i.cancel(e).catch(()=>{}),o(),!0):!1,c=()=>{s(n.reason)&&r.throw(n.reason)};return n?.addEventListener(`abort`,c),(async()=>{try{for(;a;){let{done:e,value:n}=await i.read();if(!a)return;if(e){o(),r.return(void 0);return}r.next(t(n))}}catch(e){s(e)&&r.throw(e)}})(),[r,s]}function qr(e){return P({tag:`tss/RawStream`,test:e=>e instanceof Hr,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=Kr(t.stream,t.hint===`text`?Gr:Ur,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var Jr=qr(),Yr=new WeakSet;function Xr(e){if(Yr.has(e))throw Error(`Expected a value used by one plugin value only.`);return Yr.add(e),e}var H={},Zr=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),Qr=P({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===H},parse:{sync(){return H},async async(){return await Promise.resolve(H)},stream(){return H}},serialize(){return Zr.toString()},deserialize(){return H}});function $r(e){return{[Symbol.asyncIterator](){let t=e.getReader(),n=!0,r=!1,i=()=>{try{t.releaseLock()}catch{}};return{async next(){if(!n)return{done:!0,value:void 0};r=!0;let e;try{e=await t.read()}catch(e){if(r=!1,i(),!n)return{done:!0,value:void 0};throw n=!1,e}return r=!1,!n||e.done?(n=!1,i(),{done:!0,value:void 0}):e},return(e){if(n){n=!1;try{t.cancel(e).catch(()=>{})}catch{}r||i()}return Promise.resolve({done:!0,value:void 0})}}}}}var ei=P({tag:`seroval/plugins/web/ReadableStream`,extends:[Qr],skipPlainObjects:!0,test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{async async(e,t){return{factory:await t.parse(H),stream:await t.parseStreamSource($r(e))}},stream(e,t){return{factory:t.parse(H),stream:t.parseStreamSource($r(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){let n=t.deserialize(e.stream);if(!Bt(n))throw Error(`Expected a stream source.`);return Zr(Xr(n))}});function ti(e){return[Vr,e?qr(e):Jr,ei]}[...ti()];function ni(e){return P({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function ri(e){return[...(l()?.serializationAdapters)?.map(Lr)??[],...e]}function ii(e){return ri(ti(e))}var ai=new TextDecoder,U=new Uint8Array,oi=new ByteLengthQueuingStrategy({highWaterMark:0});function si(e){let t=e.getReader(),n=new Map,r=0,i,a,o=()=>{i?.(),i=void 0},s=(e,t)=>{let n=e[1];e[1]=!1,n&&(t===1?n.close():n.error(t[0]))},c=new ReadableStream({start(e){a=e},pull:o,cancel(e){let i=[e===void 0?Error(`Framed response cancelled`):e];r=i,o(),t.cancel(e).catch(()=>{});for(let e of n.values())s(e,i)}});function l(e){let t=n.get(e);if(t)return t;if(n.size>=1024)throw Error(`Too many raw streams`);let i,a=[new ReadableStream({start(e){i=e},cancel(){a[1]!==!1&&(a[1]=null)}},oi),i];return n.set(e,a),r!==0&&s(a,r),a}function u(e){if(e===0||e>>>0!==e)throw RangeError(`Invalid raw stream ID`);return l(e)[0]}return(async()=>{let e=U,o=0;async function c(){for(;o===e.byteLength;){e=U,o=0;let n=await t.read();if(r!==0||n.done)return!1;e=n.value}return!0}async function u(t,n){if(t===0)return U;if(!await c()){if(n)return;throw Error(`Incomplete frame`)}if(e.byteLength-o>=t){let n=e.subarray(o,o+t);return o+=t,o===e.byteLength&&(e=U,o=0),n}let r=new Uint8Array(t),i=0;for(;i<t;){if(!await c())throw Error(`Incomplete frame`);let n=Math.min(t-i,e.byteLength-o);r.set(e.subarray(o,o+n),i),o+=n,i+=n}return o===e.byteLength&&(e=U,o=0),r}try{for(;r===0;){let e=await u(9,!0);if(r!==0)return;if(!e){for(let e of n.values())if(e[1])throw Error(`Incomplete raw stream`);r=1,a.close();return}let t=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,c=(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0;if(e=U,t>3||t===0!=(o===0)||c>16777216||t===2&&c!==0)throw Error(`Invalid frame`);let d=t===0?void 0:l(o);if(d?.[1]===!1)throw Error(`Raw stream already ended`);let f=await u(c);if(r!==0)return;if(!d){let e=ai.decode(f);for(f=U,a.enqueue(e);r===0&&a.desiredSize<=0;)await new Promise(e=>{i=e})}else if(t===1){let e=d[1];if(e){if(-e.desiredSize>134217728){e.error(Error(`Raw stream ${o} has too many unread bytes`)),d[1]=null,f=U;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=U,e.enqueue(t)}}else s(d,t===2?1:[Error(ai.decode(f))])}}catch(e){if(r===0){let i=[e];r=i,t.cancel(e).catch(()=>{}),a.error(e);for(let e of n.values())s(e,i)}}finally{e=U,t.releaseLock()}})(),[c,u]}var ci;function li(e,t,n){try{return Fr(e,t)}catch(e){throw di(n),e}}async function ui(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function di(e){for(let t of e)t.catch(()=>{});e.length=0}var fi=Object.prototype.hasOwnProperty;function pi(e){for(let t in e)if(fi.call(e,t))return!0;return!1}async function mi(e,t,n){ci||=ii();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData,o=new Headers(r.headers);if(o.set(`x-tsr-serverFn`,`true`),a||o.set(`accept`,`${c}, application/x-ndjson, application/json`),r.method===`GET`){if(a)throw Error(`FormData is not supported with GET requests`);let t=await hi(r);if(t!==void 0){let n=g({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await _i(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),vi(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function hi(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&pi(e.context)&&((t??={}).context=e.context),t?gi(t,e.signal):void 0}async function gi(e,t){t?.throwIfAborted();let n;try{n=await Ir(e,{plugins:t?ii(t):ci})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function _i(e){if(e.data instanceof FormData){let t;return e.context&&pi(e.context)&&(t=await gi(e.context,e.signal)),t!==void 0&&e.data.set(i,t),e.data}return hi(e)}async function vi(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw e}let n=t.headers.get(s);if(n===`true`)return t;if(n===`thrown`)throw t;let r=t.headers.get(`content-type`);if(r||h(),t.headers.get(`x-tss-serialized`)){let e;if(r.includes(`application/x-tss-framed`)){let n=/;\s*v=(\d+)/.exec(r)?.[1];if(n&&+n!=1)throw Error(`Unsupported framed protocol version ${n}`);if(!t.body)throw Error(`No response body for framed response`);let[i,a]=si(t.body);e=await yi(i,[ni(a),...ci])}else if(r.includes(`application/json`)){let n=await t.json(),r=[];e=li(n,{plugins:ci},r),await ui(r)}return e||h(),e}if(r.includes(`application/json`)){let e=await t.json(),n=m(e);if(n)throw n;if(d(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function yi(e,t){let n=e.getReader(),r={refs:new Map,plugins:t},i=e=>{n.cancel(e).catch(()=>{})},a,o=[];try{let e=await n.read();if(e.done)throw Error(`Stream ended before first object`);a=li(JSON.parse(e.value),r,o)}catch(e){throw i(e),n.releaseLock(),e}return(async()=>{let e=[];try{for(;;){let t=await n.read();if(t.done)return;li(JSON.parse(t.value),r,e),di(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await ui(o),a}function W(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=l()?.serverFns?.fetch;return mi(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[a]:!0})}var bi=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),xi=t(((e,t)=>{t.exports=bi()})),G=e(r(),1),K=xi(),Si=G.createContext(void 0),Ci=e=>{let t=G.useContext(Si);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},wi=({client:e,children:t})=>(G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,K.jsx)(Si.Provider,{value:e,children:t})),Ti={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},q=new class{#e=Ti;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Ei(e){setTimeout(e,0)}var Di=typeof window>`u`||`Deno`in globalThis;function J(){}function Oi(e,t){return typeof e==`function`?e(t):e}function ki(e){return typeof e==`number`&&e>=0&&e!==1/0}function Ai(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Y(e,t){return typeof e==`function`?e(t):e}function ji(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ni(o,t.options))return!1}else if(!Fi(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Mi(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Pi(t.options.mutationKey)!==Pi(a))return!1}else if(!Fi(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ni(e,t){return(t?.queryKeyHashFn||Pi)(e)}function Pi(e){return JSON.stringify(e,(e,t)=>Bi(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Fi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Fi(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Fi(e[r],t[r]))return!1;return!0}return!1}var Ii=Object.prototype.hasOwnProperty;function Li(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=zi(e)&&zi(t);if(!r&&!(Bi(e)&&Bi(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Ii.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Li(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ri(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!Ii.call(t,n)||e[n]!==t[n])return!1;return!0}function zi(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bi(e){if(!Vi(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Vi(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Vi(e){return Object.prototype.toString.call(e)===`[object Object]`}function Hi(e){return new Promise(t=>{q.setTimeout(t,e)})}function Ui(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Li(e,t)}function Wi(e){return e}function Gi(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Ki(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var qi=Symbol();function Ji(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===qi?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Yi(e,t){return typeof e==`function`?e(...t):!!e}var Xi=Symbol();function Zi(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[Xi]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var Qi=()=>Di,$i=()=>Qi(),ea=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ta=new class extends ea{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},na=Ei;function ra(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=na,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var ia=ra(),aa=new class extends ea{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function oa(e){return Math.min(1e3*2**e,3e4)}function sa(e){return(e??`online`)!==`online`||aa.isOnline()}var ca=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function la(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(J);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new ca(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ta.isFocused()&&(e.networkMode===`always`||aa.isOnline())&&e.canRun(),p=()=>sa(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??($i()?0:3),a=e.retryDelay??oa,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Hi(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var ua=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ki(this.gcTime)&&(this.#e=q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??($i()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(q.clearTimeout(this.#e),this.#e=void 0)}};function da(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{Zi(e,()=>t.signal,()=>n=!0,l[Xi])},d=Ji(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?Ki:Gi;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?pa:fa,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:fa(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function fa(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function pa(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var ma=class extends ua{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=_a(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=_a(this.options);e.data!==void 0&&(this.setState(ga(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ui(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Y(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qi||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>Y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Ai(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[Xi]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Ji(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?da(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=la({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof ca&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof ca){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ha(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ga(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),ia.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ha(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sa(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ga(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function _a(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var va=class extends ea{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ba(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xa(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xa(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Y(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ri(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Sa(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Y(this.options.enabled,this.#t)!==Y(t.enabled,this.#t)||Y(this.options.staleTime,this.#t)!==Y(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Y(this.options.enabled,this.#t)!==Y(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ri(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(J)),t}#h(e){return!$i()&&Y(this.options.enabled,this.#t)!==!1&&ki(e)}#g(){this.#b();let e=Y(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Ai(this.#r.dataUpdatedAt,e)+1;this.#u=q.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Y(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=q.setInterval(()=>{(this.options.refetchIntervalInBackground||ta.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(q.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(q.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ba(e,t),o=i&&Sa(e,n,t,r);(a||o)&&(l={...l,...ha(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ui(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ui(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Ca(e,t),refetch:this.refetch,isEnabled:Y(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Ri(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();ia.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function ya(e,t){return Y(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Y(t.retryOnMount,e)!==!1)}function ba(e,t){return ya(e,t)||e.state.data!==void 0&&xa(e,t,t.refetchOnMount)}function xa(e,t,n){if(Y(t.enabled,e)!==!1&&Y(t.staleTime,e)!==`static`){let r=Y(n,e);return r===`always`||r!==!1&&Ca(e,t)}return!1}function Sa(e,t,n,r){return(e!==t||Y(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ca(e,n)}function Ca(e,t){return Y(t.enabled,e)!==!1&&e.isStaleByTime(Y(t.staleTime,e))}var wa=G.createContext(!1),Ta=()=>G.useContext(wa);wa.Provider;function Ea(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Da=G.createContext(Ea()),Oa=()=>G.useContext(Da),ka=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Yi(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Aa=e=>{G.useEffect(()=>{e.clearReset()},[e])},ja=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Yi(n,[e.error,r])),Ma=(e,t)=>t.state.data===void 0,Na=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Pa=(e,t)=>e?.suspense&&t.isPending,Fa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ia(e,t,n){let r=Ta(),i=Oa(),a=Ci(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Na(o),ka(o,i,s),Aa(i);let[l]=G.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);G.useEffect(()=>{l.setOptions(o)},[o,l]);let d=!r&&c;if(G.useSyncExternalStore(G.useCallback(e=>{let t=d?l.subscribe(ia.batchCalls(e)):J;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Pa(o,u))throw Fa(o,l,i);if(ja({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function La(e,t){return Ia(e,va,t)}function X(e){return e}var Ra=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),za=t(((e,t)=>{t.exports=Ra()})),Ba=t((e=>{var t=r(),n=za();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Va=t(((e,t)=>{t.exports=Ba()})),Ha=Va();function Ua(e,t){return e===t}function Wa(e,t=e=>e,n){let r=n?.compare??Ua,i=(0,G.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,G.useCallback)(()=>e.get(),[e]);return(0,Ha.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Ga=t((e=>{var t=r().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),Ka=t(((e,t)=>{t.exports=Ga()}));function qa(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Ja(e,t){let n=Object.create(null);if(e){let t=Object.keys(e);for(let r=0;r<t.length;r++){let i=t[r];qa(i)&&(n[i]=e[i])}}if(t&&typeof t==`object`){let e=Object.keys(t);for(let r=0;r<e.length;r++){let i=e[r];qa(i)&&(n[i]=t[i])}}return n}function Ya(e){return e?Ja(e,void 0):Object.create(null)}var Xa=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},Z=(e,t)=>{let n=t||e||{};return n.method===void 0&&(n.method=`GET`),Object.assign(e=>Z(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.forEach(e=>{o in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=Z(void 0,{...n,middleware:t});return r[o]=!0,r},validator:e=>Z(void 0,{...n,validator:e}),handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],no(i)];return t.method=n.method,Object.assign(async e=>{let n=await $a(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:Ya()});if(`error`in n)throw m(n.error)??n.error;return n.result},{...t,method:n.method,__executeServer:void 0})}})};function Za(e,t){return e===void 0&&t===void 0?void 0:Ja(e,t)}function Qa(e,t){return e||t?Br(e,t):void 0}async function $a(e,t,n){let r=eo((l()?.functionMiddleware||[]).concat(e),void 0,t===`server`?new Set(Xa({throwIfNotFound:!1})?.executedRequestMiddlewares):void 0),i=0,a=async(e,n)=>{let o=e;n!==void 0&&(o={...e,...n},o.context=Ja(e.context,n.context),o.sendContext=Za(e.sendContext,n.sendContext),o.headers=Qa(e.headers,n.headers),o._callSiteFetch=e._callSiteFetch,o.fetch=e._callSiteFetch??n.fetch??e.fetch,o.result=n.result===void 0?n instanceof Response?n:e.result:n.result);let s=o;for(;i<r.length;){let e=r[i++].options,n=e.validator;n&&t===`server`&&(o.data=await to(n,o.data));let c=t===`client`?e.client:e.server;if(c){if(s=await c({...o,next:(e={})=>a(o,e)}),s instanceof Response){if(p(s))throw s;s={...o,result:s}}else if(!s)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);break}}if(`error`in s)throw s.error;return s},o={...n,headers:n.headers||(t===`client`?{}:void 0),sendContext:n.sendContext,context:n.context||Ya(),_callSiteFetch:n.fetch};o.sendContext!==void 0&&(o.sendContext||={});try{return await a(o)}catch(e){return{...o,error:e}}}function eo(e,t=100,n=new Set){let r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function to(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function no(e){return{"~types":void 0,options:{validator:e.validator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:void 0}}}var ro=Z({method:`GET`}).handler(W(`634f3409d91d2b2ec5ba00788a94c382eb93cab66cf6b49891f7eead0fbb9182`)),io=Z({method:`POST`}).handler(W(`03eb98b874238c23634e5fc9e71f5d53314d0ab69c11829b7971701ebc508f72`)),ao=Z({method:`POST`}).handler(W(`2050f94e262efc7c529cf12274981cb5c05e860ad2bf60da8966046a5f457d2e`)),oo=Z({method:`POST`}).handler(W(`16fd5781384c1f93d3afdf5b6a541a6117b15f2c5e18a8aefcd0bdf28ca55b0b`)),so=Z({method:`GET`}).handler(W(`0949098bce5c7148161de9d6ddbe7e4973798cc05d21e8e027e36bf87753c40a`)),co=Z({method:`POST`}).handler(W(`6fca880e9b4ef5d91a80c82901ca8b3fd8b5181cf1c883bac1c6a121e27c335d`)),lo=Z({method:`POST`}).handler(W(`75a494c070a10bd81ac73b9aed1ccdf3e7290a2b43d95b085c215e2674fab8cb`)),uo=Z({method:`POST`}).handler(W(`aeb0522b74187ad0ec040a2192c6e74f06adc37a7df8416a9012382092419df0`)),fo=Z({method:`POST`}).handler(W(`1633b2cf6898640ebba8cf9722be336f9eda371d1776565097b385499a216fbc`)),po=Z({method:`POST`}).handler(W(`9f324d4386ecc476a85f82b62ef478bb98d03e493f4a41fd28f7327a8d629c46`)),mo=Z({method:`GET`}).handler(W(`645566f0ce3185abc28e6295e49d3c4d224c46ede42adb9ecce3041358adc0af`)),ho=Z({method:`GET`}).handler(W(`b52b98b8308d4af0a9f0539a42b0292dd0544fa3e361300b97b9d6f315367d97`)),go=Z({method:`GET`}).handler(W(`3310d4286a458f34d73b536ba3f9b7423fe6e47933aa6849139c4a91fc0cc6be`)),_o=Z({method:`GET`}).handler(W(`33e77cff9e2aa8226829c8c4d45df747e5675f4f1d1b3bd618b8299f6ffdad20`)),vo=Z({method:`GET`}).handler(W(`314ac6ccbab55bcac95ef2d0be89f321218bf82b3a63194327359a75cfc9f6a6`)),yo=Z({method:`POST`}).handler(W(`10262f6e87bb981e71a85fd9ee035f2aa633f6ecd9c6a3aa681da12504cba0b8`)),bo=Z({method:`POST`}).handler(W(`a6ecdf5ad31d541d6843eebdc610e599ae824562f80c2aba4b022de845e31e94`)),xo=Z({method:`POST`}).handler(W(`d778a31432c784b4573380b5641deec6bbc78d24b6d112a0252a213b7212f677`)),So=Z({method:`POST`}).handler(W(`8d02b91de7eb27632a3aa6b913e7c76fb3a93976ce8084a630289b46737c2d8b`)),Co=Z({method:`GET`}).handler(W(`c758a636ba19f09a8e00934cec93c4a0066ab3960ddd267a4604c55e6b263345`)),wo=Z({method:`POST`}).handler(W(`1499e5ed0049948e758a130ee221a6318fc746dcc9a5e5ab4561e566afd8f2de`)),To=Z({method:`POST`}).handler(W(`98f22935ca1cf21c2abfa7394b822c97bacfce9fa95af9b648e5968dd3a5802f`)),Eo=Z({method:`POST`}).handler(W(`4ca277bc1c50513ef9773dae2477d6941ecc41cd1e8e29efb63e4a2bac8fbc85`)),Do=Z({method:`POST`}).handler(W(`92749f267c42bd41f2b6cd3986b502a3fa07706b44d38fc532c3568e4b2020d9`)),Oo=Z({method:`POST`}).handler(W(`5114ad2b791ceff1aead3f5c5d57e592af17191f9c18019060c78308cf52c957`)),ko=Z({method:`POST`}).handler(W(`c1a24e094a4e8fc2be3638cfd66bcf27a0bdaf537ff39d3db1560964f6a759cb`)),Ao=Z({method:`GET`}).handler(W(`4505d15ff5746b14927bd920d419c7b8e76becd66b26b7287ec40c6c44f09cb0`)),jo=Z({method:`POST`}).handler(W(`a06ef376b93fd52a19824c2859014e953683838c588fc94a1189a10abafe027e`)),Mo=()=>X({queryKey:[`folders`],queryFn:()=>ro(),staleTime:1/0}),No=()=>X({queryKey:[`connections`],queryFn:()=>so(),staleTime:1/0}),Po={staleTime:1/0,gcTime:36e5};function Fo(e,t){let n=e,r=t;return n&&r.revision<n.revision?n:Li(n,r)}var Io=()=>X({queryKey:[`workspace`],queryFn:()=>Co(),staleTime:1/0,structuralSharing:Fo}),Lo=e=>X({queryKey:[`databases`,e],queryFn:()=>mo({data:{connectionId:e}}),retry:!1,...Po}),Ro=(e,t)=>X({queryKey:[`tables`,e,t],queryFn:()=>go({data:{connectionId:e,database:t}}),retry:!1,...Po}),zo=(e,t,n)=>X({queryKey:[`schema`,e,t,n],queryFn:()=>_o({data:{connectionId:e,database:t,table:n}}),retry:!1,...Po}),Bo=e=>X({queryKey:[`rows`,e.connectionId,e.database,e.table,e],queryFn:()=>vo({data:e}),retry:!1,...Po}),Vo=e=>X({queryKey:[`sqlSchema`,e],queryFn:()=>ho({data:{connectionId:e}}),staleTime:6e5,retry:!1}),Ho=()=>X({queryKey:[`mcp-token`],queryFn:()=>Ao(),staleTime:1/0,retry:!1}),Q=Ka();function $(e){let t=(0,Q.c)(4),{children:n,size:r}=e,i=r===void 0?14:r,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={flexShrink:0},t[0]=a):a=t[0];let o;return t[1]!==n||t[2]!==i?(o=(0,K.jsx)(`svg`,{width:i,height:i,viewBox:`0 0 16 16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,style:a,children:n}),t[1]=n,t[2]=i,t[3]=o):o=t[3],o}var Uo=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`m6 3.5 4.5 4.5L6 12.5`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},Wo=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M10 3.5 5.5 8l4.5 4.5`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},Go=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M8 13V3.5M4 7l4-4 4 4`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},Ko=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M8 3v9.5M4 9l4 4 4-4`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},qo=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M8 3v10M3 8h10`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},Jo=e=>{let t=(0,Q.c)(5),n,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`circle`,{cx:`3.5`,cy:`8`,r:`.6`}),r=(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`.6`}),i=(0,K.jsx)(`circle`,{cx:`12.5`,cy:`8`,r:`.6`}),t[0]=n,t[1]=r,t[2]=i):(n=t[0],r=t[1],i=t[2]);let a;return t[3]===e?a=t[4]:(a=(0,K.jsxs)($,{...e,children:[n,r,i]}),t[3]=e,t[4]=a),a},Yo=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`ellipse`,{cx:`8`,cy:`4`,rx:`5`,ry:`2`}),r=(0,K.jsx)(`path`,{d:`M3 4v8c0 1.1 2.2 2 5 2s5-.9 5-2V4M3 8c0 1.1 2.2 2 5 2s5-.9 5-2`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},Xo=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`rect`,{x:`2.5`,y:`3`,width:`11`,height:`10`,rx:`1`}),r=(0,K.jsx)(`path`,{d:`M2.5 6.5h11M6.5 3v10`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},Zo=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`m3 5 3 3-3 3M8 12h5`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},Qo=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M13 8a5 5 0 1 1-1.5-3.5M13 3v2.5h-2.5`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},$o=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M3 4.5h10M6.5 4.5V3h3v1.5M4.5 4.5l.5 8.5h6l.5-8.5`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},es=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M5 3.5v9l7-4.5z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},ts=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`rect`,{x:`2`,y:`3`,width:`12`,height:`10`,rx:`1.5`}),r=(0,K.jsx)(`path`,{d:`M6 3v10`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},ns=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`2`}),r=(0,K.jsx)(`path`,{d:`M8 1.8v1.6M8 12.6v1.6M1.8 8h1.6M12.6 8h1.6M3.6 3.6l1.1 1.1M11.3 11.3l1.1 1.1M3.6 12.4l1.1-1.1M11.3 4.7l1.1-1.1`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},rs=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`circle`,{cx:`5.5`,cy:`10.5`,r:`2.5`}),r=(0,K.jsx)(`path`,{d:`m7.3 8.7 5.2-5.2M10.5 5.5l1.5 1.5`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},is=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M2 4.5A1.5 1.5 0 0 1 3.5 3h2.8l1.4 1.5h4.8A1.5 1.5 0 0 1 14 6v5.5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 11.5z`}),r=(0,K.jsx)(`path`,{d:`M8 7v3M6.5 8.5h3`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},as=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`m4 4 8 8M12 4l-8 8`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r},os=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`1.5`}),r=(0,K.jsx)(`path`,{d:`M10.5 5.5v-1A1.5 1.5 0 0 0 9 3H4.5A1.5 1.5 0 0 0 3 4.5V9a1.5 1.5 0 0 0 1.5 1.5h1`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},ss=e=>{let t=(0,Q.c)(4),n,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M1.5 8S4 3.5 8 3.5 14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z`}),r=(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.8`}),t[0]=n,t[1]=r):(n=t[0],r=t[1]);let i;return t[2]===e?i=t[3]:(i=(0,K.jsxs)($,{...e,children:[n,r]}),t[2]=e,t[3]=i),i},cs=e=>{let t=(0,Q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsx)(`path`,{d:`M2.5 2.5l11 11M6.4 4a6.3 6.3 0 0 1 1.6-.5c4 0 6.5 4.5 6.5 4.5a11 11 0 0 1-2 2.5M4 5.3A11 11 0 0 0 1.5 8S4 12.5 8 12.5c.8 0 1.5-.2 2.1-.4M6.6 6.6a1.8 1.8 0 0 0 2.8 2.2`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=(0,K.jsx)($,{...e,children:n}),t[1]=e,t[2]=r),r};function ls(e){let t=(0,Q.c)(16),{icon:n,title:r,hint:i,danger:a,action:o}=e,s;t[0]!==a||t[1]!==n?(s=n?(0,K.jsx)(`div`,{...{0:{className:`x78zum5 x6s0dn4 xl56j7k x100vrsf x1vqgdyp x1kj4sgy x1tviuuy x14fh20 xr11lhz xmkeg23 x1y0btm7 xpa2s8g`},1:{className:`x78zum5 x6s0dn4 xl56j7k x100vrsf x1vqgdyp x1kj4sgy x14fh20 xr11lhz xmkeg23 x1y0btm7 xpa2s8g xb0vdwp`}}[!!a|0],children:n}):null,t[0]=a,t[1]=n,t[2]=s):s=t[2];let c;t[3]===r?c=t[4]:(c=(0,K.jsx)(`div`,{className:`x19u1y1h x1s688f`,children:r}),t[3]=r,t[4]=c);let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l={0:{className:`xqtwvag x1tviuuy x1lr1uin x1evy7pa x13faqbe`},1:{className:`xqtwvag x1lr1uin x1evy7pa x13faqbe xb0vdwp`}},t[5]=l):l=t[5];let u=l[!!a|0],d;t[6]!==i||t[7]!==u?(d=(0,K.jsx)(`div`,{...u,children:i}),t[6]=i,t[7]=u,t[8]=d):d=t[8];let f;t[9]===o?f=t[10]:(f=o?(0,K.jsx)(`div`,{className:`xw7zv1a`,children:o}):null,t[9]=o,t[10]=f);let p;return t[11]!==s||t[12]!==c||t[13]!==d||t[14]!==f?(p=(0,K.jsxs)(`div`,{className:`x98rzlu x78zum5 xdt5ytf x6s0dn4 xl56j7k x1mbf7id xlcnwv1 x2b8uid`,children:[s,c,d,f]}),t[11]=s,t[12]=c,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}export{Va as $,Io as A,h as At,jo as B,Lo as C,qi as Ct,zo as D,W as Dt,Bo as E,xi as Et,oo as F,a as Ft,po as G,So as H,xo as I,r as It,yo as J,lo as K,bo as L,co as M,f as Mt,io as N,d as Nt,Vo as O,v as Ot,fo as P,u as Pt,Wa as Q,uo as R,No as S,Yi as St,Ho as T,Ci as Tt,Do as U,Eo as V,ko as W,Z as X,Oo as Y,Ka as Z,Qo as _,ji as _t,Uo as a,ma as at,Zo as b,Y as bt,Yo as c,aa as ct,cs as d,ea as dt,za as et,is as f,Oi as ft,qo as g,Mi as gt,es as h,Wi as ht,Wo as i,va as it,To as j,p as jt,Ro as k,g as kt,Jo as l,ia as lt,ts as m,Ni as mt,Ko as n,Ia as nt,as as o,ua as ot,rs as p,Pi as pt,ao as q,Go as r,Ma as rt,os as s,la as st,ls as t,La as tt,ss as u,ta as ut,ns as v,J as vt,Mo as w,wi as wt,$o as x,Ri as xt,Xo as y,Fi as yt,wo as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e,S as t,Z as n,t as r,tt as i,y as a}from"./EmptyState-B_8ZzjRf.js";import{t as o}from"./index-Cre7NCFa.js";var s=n(),c=e();function l(){let e=(0,s.c)(2),{connectionId:n}=o.useParams();if(!i(t()).data?.find(e=>e.id===n)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,c.jsx)(r,{title:`Connection not found`,hint:`It may have been deleted.`}),e[0]=t):t=e[0],t}let l;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,c.jsx)(r,{icon:(0,c.jsx)(a,{size:16}),title:`Select a table`,hint:`Pick a table in the explorer to open it in a tab, or start a SQL tab.`}),e[1]=l):l=e[1],l}export{l as component};
|