@lunora/studio 1.0.0-alpha.341 → 1.0.0-alpha.343

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.
Files changed (131) hide show
  1. package/dist/index.d.mts +5 -4
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.mjs +1 -1
  4. package/dist/mount.mjs +1 -1
  5. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
  6. package/dist/packem_chunks/AuditPanel.mjs +1 -1
  7. package/dist/packem_chunks/ExportImportPanel.mjs +8 -6
  8. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
  9. package/dist/packem_chunks/HealthPanel.mjs +1 -1
  10. package/dist/packem_chunks/InsightsPanel.mjs +1 -1
  11. package/dist/packem_chunks/LogsPanel.mjs +1 -1
  12. package/dist/packem_chunks/MailPanel.mjs +1 -1
  13. package/dist/packem_chunks/MetricsPanel.mjs +1 -1
  14. package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
  15. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
  16. package/dist/packem_chunks/SettingsPanel.mjs +1 -1
  17. package/dist/packem_chunks/SqlEditorPanel.mjs +1 -1
  18. package/dist/packem_chunks/TableEditor.mjs +1 -1
  19. package/dist/packem_chunks/agents-panel.mjs +1 -1
  20. package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
  21. package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
  22. package/dist/packem_chunks/auth-config-panel.mjs +1 -1
  23. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -1
  24. package/dist/packem_chunks/containers-panel.mjs +1 -1
  25. package/dist/packem_chunks/dashboards-panel.mjs +1 -1
  26. package/dist/packem_chunks/evals-panel.mjs +1 -1
  27. package/dist/packem_chunks/fanout-panel.mjs +1 -1
  28. package/dist/packem_chunks/flags-panel.mjs +1 -1
  29. package/dist/packem_chunks/issues-panel.mjs +1 -1
  30. package/dist/packem_chunks/kv-browser.mjs +1 -1
  31. package/dist/packem_chunks/migrations-route.mjs +1 -1
  32. package/dist/packem_chunks/organizations-panel.mjs +1 -1
  33. package/dist/packem_chunks/payments-panel.mjs +1 -1
  34. package/dist/packem_chunks/permissions-panel.mjs +1 -1
  35. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
  36. package/dist/packem_chunks/queues-panel.mjs +1 -1
  37. package/dist/packem_chunks/reactors-panel.mjs +1 -1
  38. package/dist/packem_chunks/rls-panel.mjs +1 -1
  39. package/dist/packem_chunks/schedule-panel.mjs +1 -1
  40. package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
  41. package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
  42. package/dist/packem_chunks/sync-client-panel.mjs +1 -1
  43. package/dist/packem_chunks/traces-panel.mjs +1 -1
  44. package/dist/packem_chunks/users-panel.mjs +1 -1
  45. package/dist/packem_chunks/workflows-panel.mjs +1 -1
  46. package/dist/packem_shared/{DataBrowser-DxlLv5x1.mjs → DataBrowser-BsJLr7Sh.mjs} +2 -2
  47. package/dist/packem_shared/{GlobalDataBrowser-TFTQpSVj.mjs → GlobalDataBrowser-CPfjubP_.mjs} +1 -1
  48. package/dist/packem_shared/{HomePanel-BVz2sDQ4.mjs → HomePanel-C8sb1fFJ.mjs} +1 -1
  49. package/dist/packem_shared/{MigrationsPanel-fUyhbt0w.mjs → MigrationsPanel-Dzjf42y8.mjs} +1 -1
  50. package/dist/packem_shared/{ScheduledJobs-zSeU_6cN.mjs → ScheduledJobs-BJ1uZW1U.mjs} +1 -1
  51. package/dist/packem_shared/{Studio-CNqMkRmB.mjs → Studio-CL3-IiIi.mjs} +1 -1
  52. package/dist/packem_shared/{StudioApp-CUxEVr__.mjs → StudioApp-ClaUkjR_.mjs} +1 -1
  53. package/dist/packem_shared/{advisor-view-CXiPdw4B.mjs → advisor-view-B8oIluyS.mjs} +1 -1
  54. package/dist/packem_shared/{error-alert-D-ftqyo-.mjs → error-alert-CNQjdAhi.mjs} +1 -1
  55. package/dist/packem_shared/{home-panel-CF-MfsnH.mjs → home-panel-BJXZsAaD.mjs} +1 -1
  56. package/dist/packem_shared/{recording-client-CFBkH4uZ.mjs → recording-client-neIRrUNz.mjs} +1 -1
  57. package/dist/packem_shared/{studio-BcHsk7mT.mjs → studio-BSiyNdXi.mjs} +1 -1
  58. package/dist/packem_shared/{table-list-sidebar-DwqtHSHU.mjs → table-list-sidebar-B7IOSxLN.mjs} +1 -1
  59. package/dist/packem_shared/{use-admin-query-I1uILsUP.mjs → use-admin-query-CLStXJ7v.mjs} +1 -1
  60. package/dist/packem_shared/{use-auth-config-DQ8tNyBh.mjs → use-auth-config-DtZeS_qf.mjs} +1 -1
  61. package/dist/packem_shared/{use-sql-assistant-DetnUyFf.mjs → use-sql-assistant-DxNeNdCs.mjs} +1 -1
  62. package/dist/standalone/{chunk-M3QKMHAP.js → chunk-35Q6XYRL.js} +1 -1
  63. package/dist/standalone/{chunk-OLIKYC3C.js → chunk-3BCMZMOX.js} +1 -1
  64. package/dist/standalone/{chunk-VJ7RCBJ7.js → chunk-3BF2QRJM.js} +1 -1
  65. package/dist/standalone/{chunk-VNMKNORK.js → chunk-3F3742NV.js} +1 -1
  66. package/dist/standalone/{chunk-ENIA26XP.js → chunk-4RLRI34N.js} +1 -1
  67. package/dist/standalone/{chunk-7GVT36VI.js → chunk-5CW7W7LQ.js} +1 -1
  68. package/dist/standalone/{chunk-43GV7LQK.js → chunk-5DKOUMFY.js} +1 -1
  69. package/dist/standalone/{chunk-O2FW4VRL.js → chunk-5QTTNVDW.js} +1 -1
  70. package/dist/standalone/{chunk-K3UAOIR7.js → chunk-5X7LJ6UT.js} +1 -1
  71. package/dist/standalone/{chunk-VENSZ6LF.js → chunk-66MXYZBW.js} +1 -1
  72. package/dist/standalone/{chunk-R3ADWOYR.js → chunk-6ZRYMZEX.js} +1 -1
  73. package/dist/standalone/{chunk-UVL7N5IL.js → chunk-A4WUN5R3.js} +1 -1
  74. package/dist/standalone/{chunk-KF7Y5S5O.js → chunk-ATVJ7XYZ.js} +1 -1
  75. package/dist/standalone/{chunk-HPYJUVCC.js → chunk-BEODZ54J.js} +1 -1
  76. package/dist/standalone/{chunk-HCFJBY65.js → chunk-CUIPEXIW.js} +1 -1
  77. package/dist/standalone/{chunk-VVCXVAA7.js → chunk-D6CNULEI.js} +1 -1
  78. package/dist/standalone/{chunk-UIIKW4II.js → chunk-DD7J6RMR.js} +1 -1
  79. package/dist/standalone/{chunk-DHGPCQ2F.js → chunk-DFVQBXUZ.js} +1 -1
  80. package/dist/standalone/{chunk-4NOMAGEO.js → chunk-DNIDQC3K.js} +1 -1
  81. package/dist/standalone/{chunk-LHG2JVIM.js → chunk-DQAXICZV.js} +1 -1
  82. package/dist/standalone/{chunk-BFQMOALO.js → chunk-E57JT34T.js} +1 -1
  83. package/dist/standalone/{chunk-SU6QNITV.js → chunk-EJSTZM7A.js} +1 -1
  84. package/dist/standalone/{chunk-BTG6YDYM.js → chunk-EUTV2OGD.js} +1 -1
  85. package/dist/standalone/{chunk-5SLTDY4C.js → chunk-EYTZURBK.js} +1 -1
  86. package/dist/standalone/{chunk-DBZ4TBP5.js → chunk-FMSWGAHK.js} +1 -1
  87. package/dist/standalone/{chunk-ICRKYAYO.js → chunk-FR2MJIZG.js} +1 -1
  88. package/dist/standalone/{chunk-3FYMEXVB.js → chunk-G5P5DUVD.js} +1 -1
  89. package/dist/standalone/{chunk-GC4XRCRZ.js → chunk-GTEER76O.js} +1 -1
  90. package/dist/standalone/{chunk-NCBLHBRW.js → chunk-GWCMBJ2U.js} +1 -1
  91. package/dist/standalone/{chunk-GYBCO7NN.js → chunk-GXRBCKNP.js} +1 -1
  92. package/dist/standalone/{chunk-HGHIVU76.js → chunk-HMDY25GJ.js} +1 -1
  93. package/dist/standalone/{chunk-G2F22AMT.js → chunk-HXC2I6YI.js} +1 -1
  94. package/dist/standalone/{chunk-RB3WPSY5.js → chunk-IC2NNXPZ.js} +1 -1
  95. package/dist/standalone/{chunk-YZ72ZAGX.js → chunk-IDX6KQRG.js} +1 -1
  96. package/dist/standalone/chunk-ITFHDBLD.js +8 -0
  97. package/dist/standalone/{chunk-HH52IEFY.js → chunk-J5CU2YKR.js} +1 -1
  98. package/dist/standalone/{chunk-XBQ66PGW.js → chunk-JAPCIIQC.js} +1 -1
  99. package/dist/standalone/{chunk-SC6P4M3S.js → chunk-KLQVRXER.js} +1 -1
  100. package/dist/standalone/{chunk-ZKV2XC5B.js → chunk-L7OWZOME.js} +1 -1
  101. package/dist/standalone/{chunk-BTQ72TPT.js → chunk-N36IWCKG.js} +1 -1
  102. package/dist/standalone/{chunk-VXJJSPX3.js → chunk-N66HNAEX.js} +1 -1
  103. package/dist/standalone/{chunk-UJQNKTYE.js → chunk-NJ3YQOVN.js} +1 -1
  104. package/dist/standalone/{chunk-FUL4ROKH.js → chunk-NQZMPZNU.js} +1 -1
  105. package/dist/standalone/{chunk-GWVYDOBH.js → chunk-PYOM5J3N.js} +1 -1
  106. package/dist/standalone/{chunk-IRSSZXC3.js → chunk-QMJTL4SW.js} +1 -1
  107. package/dist/standalone/{chunk-E5DXYVPB.js → chunk-QNAKWBFW.js} +1 -1
  108. package/dist/standalone/{chunk-T6IV7OKH.js → chunk-RGCYH5VO.js} +1 -1
  109. package/dist/standalone/{chunk-NCCORPSU.js → chunk-RGDSRUIX.js} +1 -1
  110. package/dist/standalone/{chunk-KCFO2BVI.js → chunk-S3KIA2QB.js} +1 -1
  111. package/dist/standalone/{chunk-6XKL22OG.js → chunk-S7XJPD6Z.js} +2 -2
  112. package/dist/standalone/chunk-SFMWHWJG.js +1 -0
  113. package/dist/standalone/{chunk-ZJQIGWLG.js → chunk-SMZHXNCR.js} +1 -1
  114. package/dist/standalone/{chunk-JR4ROUBB.js → chunk-SPLVBIFP.js} +1 -1
  115. package/dist/standalone/{chunk-5Y5UTG4N.js → chunk-SQ4ZU5YB.js} +1 -1
  116. package/dist/standalone/{chunk-DBHZXRL6.js → chunk-SRNH27XV.js} +1 -1
  117. package/dist/standalone/{chunk-WVYIBXUH.js → chunk-TFLKMZK5.js} +1 -1
  118. package/dist/standalone/{chunk-DEFCA7GG.js → chunk-UFJSJEBS.js} +2 -2
  119. package/dist/standalone/{chunk-ZPNTFCVI.js → chunk-UMPQDFU6.js} +1 -1
  120. package/dist/standalone/{chunk-GOFZ4Y74.js → chunk-VVHORMP3.js} +1 -1
  121. package/dist/standalone/{chunk-OI5HX3ZO.js → chunk-WXMYNIXK.js} +1 -1
  122. package/dist/standalone/{chunk-2SNK7KHX.js → chunk-WZ2CXW4B.js} +1 -1
  123. package/dist/standalone/{chunk-WUI2PUY6.js → chunk-XUS6E3C7.js} +1 -1
  124. package/dist/standalone/{chunk-EE227HDE.js → chunk-YNJEO3WB.js} +1 -1
  125. package/dist/standalone/{chunk-APEQELK3.js → chunk-YR5YXUZT.js} +1 -1
  126. package/dist/standalone/{chunk-FCXFQF2W.js → chunk-YYEQLN53.js} +1 -1
  127. package/dist/standalone/{chunk-ITT6MM23.js → chunk-ZUB5DMJT.js} +1 -1
  128. package/dist/standalone/studio.js +1 -1
  129. package/package.json +5 -5
  130. package/dist/standalone/chunk-3N5PRV3V.js +0 -1
  131. package/dist/standalone/chunk-6ZSIPBTC.js +0 -6
@@ -1,4 +1,4 @@
1
- import{a}from"./chunk-I26MS5PJ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",T=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},DELIVERY_FENCED:{status:409,title:"Delivery authorization changed",hint:"The operation may have committed. Retry with the same transport key; a committed result from an older authority epoch returns DELIVERY_RECEIPT_FENCED. Do not automatically retry with a new transport key."},DELIVERY_RECEIPT_FENCED:{status:409,title:"Committed receipt authorization changed",hint:"The operation committed, but its stored result belongs to an older authority epoch. Do not automatically retry with a new transport ID. Recover through the application's durable operation key under current authorization."},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},RUN_KIND_FORBIDDEN:{status:500,title:"Function kind may not be composed from a query"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},MIGRATION_DRIFT:{hint:["An applied SQL migration is never re-run, so the runner stopped before applying anything.","","- **Its text changed after it ran:** revert the edit and put the change in a new migration. If the edit is inert (a comment, whitespace, line endings), record the new hash with the `UPDATE` the message prints.","- **Tracking rows predate versions and match no migration:** set each row's `version` with the `UPDATE` the message prints, so the runner can tell what already ran."],status:409,title:"Migration drift"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},SHARD_TIMEOUT:{status:504,title:"Shard timeout"},SHARD_HTTP_ERROR:{status:502,title:"Shard HTTP error"},SUBSCRIPTION_PERSIST_FAILED:{status:500,title:"Subscription persist failed"},TOO_MANY_SUBSCRIPTIONS:{status:429,title:"Too many subscriptions"},LIVE_CONTROL_SUPERSEDED:{status:409,title:"A later live control call already applied"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},OFFLINE_NOT_QUEUED:{hint:"A mutation sent with `onlineOnly: true` found its connection down or reconnecting (the shard had connected before), or, on a shard that has never connected, its request failed on the wire. It was refused instead of queued. Nothing was persisted or replayed; issue the call again once the connection is back. See [keeping a write off the queue](/docs/concepts/offline-first#keeping-a-write-off-the-queue).",status:503,title:"Offline, write not queued"},IDENTITY_MISMATCH:{hint:["A write queued offline was replayed on a session that now belongs to someone else (a sign-out, or another user's sign-in, while it waited), so the worker refused it rather than commit it as them.","","`@lunora/client` re-resolves the session on this refusal and settles the write itself. If every replay is refused while the same user stays signed in, your worker's `resolveIdentity` returns a different `userId` than better-auth's `user.id`, or the RPC request carries no session cookie."],status:409,title:"Session changed since the write was queued"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},JURISDICTION_MOVE:{hint:["The schema declares `.jurisdiction(...)` and the project has DO-backed auth (`.auth({ namespace })`). Pinning the auth object to the jurisdiction resolves it to a new, empty one: every user, account and session stays in the unpinned object until copied across. Voice sessions are pinned without an acknowledgement: they store nothing, and their transcripts are rows in the already-pinned shards.","",'Acknowledge with `.jurisdiction("eu", { pinAuth: true })` and deploy, then copy the auth tables across with the `__lunora_admin__:copyAuthToJurisdiction` admin op and, once the counts check out, purge the unpinned copy with `__lunora_admin__:purgeUnpinnedAuth` (see [Pinning auth and voice](/docs/concepts/data-residency#pinning-auth-and-voice)). For D1-mode auth the acknowledgement changes nothing.'],status:422,title:"Unacknowledged jurisdiction move"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},X402_FACILITATOR_ERROR:{internal:!0,status:502,title:"Payment facilitator error"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},PRIVACY_COVERAGE:{status:500,title:"Privacy coverage check failed"},PRIVACY_REQUEST_OPEN:{status:409,title:"A privacy request is already open"},PRIVACY_SESSION_NOT_FRESH:{status:403,title:"Recent sign-in required"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` in the `EmailGateConfig` you hand `assertEmailAllowed` / `classifyEmail` / `emailGateMiddleware` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_QUERY_ERROR:{status:502,title:"Analytics SQL query error"},BROWSER_RUN_ERROR:{status:502,title:"Browser Run API error"},BROWSER_TOO_MANY_REDIRECTS:{status:502,title:"Too many redirects"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},CONFIG_INVALID:{internal:!0,status:500,title:"Payment configuration invalid"},CURRENCY_MISMATCH:{status:400,title:"Currency mismatch"},PROVIDER_ERROR:{status:502,title:"Payment provider error"},WEBHOOK_EVENT_ID_MISSING:{status:400,title:"Webhook event id missing"},WEBHOOK_SIGNATURE_INVALID:{status:400,title:"Webhook signature invalid"},WEBHOOK_TIMESTAMP_INVALID:{status:400,title:"Webhook timestamp outside tolerance"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_MIGRATOR_UNSUPPORTED:{hint:["better-auth migrates only through its Kysely adapter, so `ensureMigrated` / `compileMigrationsSql` need the raw D1 binding as `database` \u2014 a custom adapter (`lunoraD1Adapter`, `lunoraAuthAdapter`, `lunoraDoAdapter`) cannot be migrated through, and neither can an absent `database`.","","Build a SECOND, migration-only instance over the raw binding \u2014 `createMigrationAuth({ ...options, database: env.DB })` (from `@lunora/auth/migrate`) \u2014 and hand that one to `ensureMigrated`. Keep the adapter on the instance that serves requests: the adapter exists to dodge a dev-runner hang in `$context`, which the migration instance never resolves.","","To compile the SQL off-platform (`compileMigrationsSql`), diff against an empty local database \u2014 `new DatabaseSync(':memory:')` from `node:sqlite` \u2014 rather than passing no `database` at all."],status:500,title:"Auth migrator cannot drive the configured database"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},AUTH_CIMD_FETCH_NOT_PUBLIC:{hint:'Add "global_fetch_strictly_public" to "compatibility_flags" in wrangler.jsonc, so CIMD metadata fetches cannot reach private addresses. `lunora doctor` reports it as `cimd-fetch-not-strictly-public`.',status:500,title:"CIMD transport needs the global_fetch_strictly_public flag"},AUTH_MCP_RESOURCE_AMBIGUOUS:{hint:'Use `mcp` from "@lunora/auth/plugins" (not `@better-auth/mcp`) and pass the plugin object as is: it records its `resource`, which the worker needs to serve the protected-resource metadata when the provider names several resources.',status:500,title:"MCP resource cannot be told apart from the provider's other resources"},AUTH_MCP_RESOURCE_INVALID:{hint:"Pass `resource` to `requireMcpAuth` (and `mcp()`) as the absolute URL of the MCP route, e.g. `https://app.example.com/mcp`: issued tokens are audience-bound to it.",status:500,title:"MCP resource missing or not an absolute URL"},MCP_STEP_UP_MISCONFIGURED:{hint:"Give `createAuthedMcpFetchHandler`'s `stepUp` a non-empty `scope` (such as `lunora:write`) and a `challenge` (`createInsufficientScopeError` from `@lunora/auth/plugins`), or leave `stepUp` out.",status:500,title:"MCP step-up misconfigured"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_SHARD_FAILED:{hint:["One or more shards failed to export, so the snapshot would have been short. Nothing is written when this fires \u2014 a partial export must never be mistaken for a complete one.","","The message names each failed shard key and its error. Re-run the export once those shards are reachable; a shard that fails repeatedly is usually over the per-request memory budget, which `backupTables` narrows."],status:502,title:"Export failed on one or more shards"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},ID_COLLISION:{hint:["The imported row carries an `_id` that is already held by a DIFFERENT table in this shard. Ids are per-table, so inserting it would leave two tables claiming one id and make a later lookup resolve to whichever one it reached first.","","This is reported per row rather than aborting the import: the remaining rows still apply. Re-mint the id on the source side, or import that table into a shard that does not already hold it."],status:409,title:"Document id already belongs to another table"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},AI_UNKNOWN_IMAGE_MODEL:{status:400,title:"Unknown image model"},RAG_DIMENSION_MISMATCH:{hint:["A stored vector and the query embedding have different widths, so they cannot be compared.","","This is what changing a RAG index's `embeddingModel` (or a provider's `dimensions` option) without reindexing looks like. Either put the previous model back, or reindex the namespace under the new one \u2014 bump `embeddingModelVersion` so the index rebuilds instead of mixing widths."],status:409,title:"Embedding dimension mismatch"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},AUTH_MOVE_NOT_CONFIGURED:{hint:"The copy needs DO-backed auth (`.auth({ namespace })`) pinned with `.jurisdiction(\u2026, { pinAuth: true })`, and the auth object's `internalSecret` set.",status:400,title:"Auth jurisdiction move not configured"},AUTH_MOVE_TARGET_NOT_EMPTY:{hint:"The pinned auth object holds users the copy did not write (someone signed up there), so copying into it would merge two user bases. Pass `force: true` to copy anyway: a copied row that collides with one of the pinned object's rows is left out and counted under `conflicts`.",status:409,title:"Pinned auth object is not empty"},AUTH_MOVE_CONFLICT:{hint:"A copied row has the same key or unique value (such as an email) as a row the pinned auth object holds on its own, or the pinned object changed a row the source changed too. Nothing from that page was written. Pass `force: true` to keep the pinned object's rows and count the collisions under `conflicts`.",status:409,title:"Auth copy conflict"},AUTH_MOVE_SOURCE_CHANGED:{hint:"The un-pinned auth object changed after the copy read it (an update, a delete, or a new row), for example during a gradual rollout or a rollback. Run the copy again: it reconciles the changed tables. Then purge.",status:409,title:"Un-pinned auth object changed since the copy"},AUTH_MOVE_SOURCE_PURGED:{hint:"The un-pinned auth object was already purged. Its tables may exist again (a rollback served requests there), but they hold only rows written since, so the copy refuses rather than read them as deletions and remove the pinned object's users. Nothing is left to copy.",status:409,title:"Un-pinned auth object already purged"},AUTH_MOVE_INCOMPLETE:{hint:"Run `__lunora_admin__:copyAuthToJurisdiction` until it answers `done: true`, check the per-table counts, then purge.",status:409,title:"Auth copy not finished"},AUTH_MOVE_FAILED:{hint:"The message names the step, the table and the class of the SQLite error; the auth object's log has the full error. The copy resumes where it stopped once the cause is fixed.",status:500,title:"Auth jurisdiction move failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_ROOM_NAME:{status:500,title:"Duplicate room name"},ROOM_NAME_NOT_LITERAL:{status:500,title:"Room name is not a string literal"},DUPLICATE_SOCKET_PATH:{status:500,title:"Duplicate socket route path"},SOCKET_AUTH_NOT_LITERAL:{status:500,title:"Socket route auth is not a literal boolean"},SOCKET_PATH_INVALID:{status:500,title:"Socket route path is not a plain URL path"},SOCKET_PATH_NOT_LITERAL:{status:500,title:"Socket route path is not a string literal"},LIVE_STREAM_DUPLICATE:{status:500,title:"Duplicate live stream id or export name"},LIVE_STREAM_NOT_EXPORTED:{status:500,title:"Live stream is not a named export"},LIVE_STREAM_NOT_LITERAL:{status:500,title:"Live stream declaration is not a literal"},LIVE_TOPIC_INVALID:{status:500,title:"Live topic name or key field is not allowed"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CASCADE_LIMIT:{status:400,title:"Cascade limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},DISPATCH_UNAUTHENTICATED:{hint:"The scheduler could not authenticate to the worker. Check that `LUNORA_SCHEDULER_SECRET` matches on both sides, or that `LUNORA_ADMIN_TOKEN` is set and current.",status:403,title:"Dispatch caller not authenticated"},DISPATCH_IN_PROGRESS:{hint:"A dispatch with this idempotency id is still running on the shard. Retry it; once the first attempt settles the same id is served from the replay cache.",status:409,title:"Dispatch already in progress"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},FORBIDDEN_TOPIC:{status:403,title:"Live topic publish forbidden"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},INVALID_SCHEDULE_ID:{status:400,title:"Invalid schedule id"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SEARCH_INDEX_BUILDING:{status:503,title:"Search index is still building"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_MEMORY_TABLE:{status:400,title:"Shape over a memory table is unsupported"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},SHAPE_RELATION_PREDICATE:{status:400,title:"Shape filtered by a relation is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},WIRE_DECODE_FAILED:{status:502,title:"Could not decode a server frame"},WIRE_ENCODE_FAILED:{status:500,title:"Could not encode a return value"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_TIMELINE_FORKED:{status:409,title:"CDC timeline forked"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},LIVE_CONNECTION_LIMIT:{status:503,title:"Live connection limit reached"},LIVE_CONNECTION_NOT_FOUND:{status:404,title:"Live connection not found"},LIVE_STREAMS_UNSUPPORTED:{status:501,title:"Live streams are not served by this worker"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_ID_IN_USE:{status:409,title:"Stream id already in use"},STREAM_IDLE:{status:504,title:"Stream went idle"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},SUBSCRIPTION_RESULT_TOO_LARGE:{status:413,title:"Subscription result too large"},TOKEN_EXPIRED:{hint:["The caller's credential verified but its expiry has passed. The worker refuses an HTTP call with this code before it runs; a shard drops a socket with close code `4001` and the same code.","","It is a refusal of the credential, not of the call: `@lunora/client` holds a queued write, fires `onTokenExpired`, and re-sends it after `setAuthToken`. The held write survives the refresh only if you pass the same `subject` (the user id) with the new token, `setAuthToken(freshToken, user.id)`; without one a refresh reads as a user switch and the write is rejected `OFFLINE_IDENTITY_CHANGED`. Under a cookie session there is no token to replace: renew the cookie and the write is re-sent on a backoff. The worker can only tell expired from anonymous if your `resolveIdentity` returns the identity with its past `exp` (or `expiresAtMs`), or throws a `LunoraError` with this code. Returning `null` runs the call anonymous."],status:401,title:"Authentication token expired"},TOO_MANY_LIVE_TOPICS:{status:429,title:"Too many live topics"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},TOO_MANY_WHISPER_TOPICS:{hint:"Reuse a stable set of whisper topic names, or reconnect \u2014 the per-socket verdict memo is in-memory, so a new connection starts empty. Leaving a topic does not free its entry.",status:429,title:"Too many whisper topics"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_CALLBACK:{status:500,title:"HTTP stream callback threw"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{hint:["The `fetch` implementation resolved with a response that exposes neither a `body` stream nor a `text()` read \u2014 a broken `fetch` substitute, not a runtime limitation.","A response with no `body` stream that can still be read as text (React Native's `whatwg-fetch` polyfill) is buffered through `text()` instead and never raises this code. Check the `fetch` override passed to the client or the `httpStream` call."],status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"},LOCAL_DEPENDENCY_MISSING:{hint:["The command Lunora tried to run is not on your PATH, so nothing ran.","","Install it (or put it on PATH) and retry \u2014 `wrangler` ships as a dependency of a Lunora app, so `pnpm install` usually fixes that one; `git` and `docker` are installed separately."],status:500,title:"Required local tool not found"}},c=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
1
+ import{a}from"./chunk-I26MS5PJ.js";var r="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/",n="https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/",T=/string or blob too big/iu,l={BAD_REQUEST:{status:400,title:"Bad request"},UNAUTHORIZED:{status:401,title:"Unauthorized"},FORBIDDEN:{status:403,title:"Forbidden"},NOT_FOUND:{status:404,title:"Not found"},DELIVERY_FENCED:{status:409,title:"Delivery authorization changed",hint:"The operation may have committed. Retry with the same transport key; a committed result from an older authority epoch returns DELIVERY_RECEIPT_FENCED. Do not automatically retry with a new transport key."},DELIVERY_RECEIPT_FENCED:{status:409,title:"Committed receipt authorization changed",hint:"The operation committed, but its stored result belongs to an older authority epoch. Do not automatically retry with a new transport ID. Recover through the application's durable operation key under current authorization."},CONFLICT:{hint:["Another write changed this row while your mutation was running (optimistic concurrency conflict).","","Re-read the row and retry the mutation with the fresh value. Lunora serializes a DO's mutations, so a persistent conflict usually means the handler conflicts **with itself** (e.g. a trigger or cascade touching the same row) \u2014 split that work rather than adding a retry loop."],status:409,title:"Conflict"},NOT_UNIQUE:{hint:["`.unique()` matched more than one document \u2014 it expects the query to identify at most one row.","","- If several matches are legitimate, use `.first()` (take one) or `.collect()` (take all) instead.","- Otherwise tighten the query (e.g. filter on a unique/indexed field) so it can only match one row."],status:400,title:"Query matched more than one document"},VALIDATION_ERROR:{status:400,title:"Validation failed"},TOO_MANY_REQUESTS:{status:429,title:"Too many requests"},UNPROCESSABLE:{status:422,title:"Unprocessable"},NOT_IMPLEMENTED:{status:501,title:"Not implemented"},FUNCTION_NOT_FOUND:{status:404,title:"Function not found"},METHOD_NOT_ALLOWED:{status:405,title:"Method not allowed"},PAYLOAD_TOO_LARGE:{status:413,title:"Payload too large"},INTERNAL:{internal:!0,status:500,title:"Internal error"},INTERNAL_SERVER_ERROR:{internal:!0,status:500,title:"Internal error"},RPC_FAILED:{internal:!0,status:500,title:"Internal error"},COUNT_RLS_UNSUPPORTED:{status:422,title:"count() is unsupported under an RLS policy"},MASK_UNSUPPORTED:{status:422,title:"Aggregation over a masked column is unsupported"},RELATION_PREDICATE_UNSUPPORTED:{status:422,title:"Relation predicate is unsupported in a write policy"},RLS_REQUIRED:{hint:["This table is secure-by-default: it has no `.public()` marker and no RLS policy resolved for the caller, so the read fails closed.","","Add a read policy with `.rls(...)`, or mark the table `.public()` if it is intentionally world-readable."],status:403,title:"RLS policy required"},RUN_DEPTH_EXCEEDED:{internal:!0,status:500,title:"Run depth exceeded"},RUN_KIND_FORBIDDEN:{status:500,title:"Function kind may not be composed from a query"},TRANSACTION_LIMIT_EXCEEDED:{hint:["A single mutation may only read and write a bounded amount before it is stopped.","","Narrow the read with an index (`.withIndex(...)`) instead of scanning the table, or split the write across several mutations \u2014 for a large backfill use `defineMigration` + `lunora migrate up`, which batches and checkpoints for you.","","The ceilings are deliberately conservative \u2014 they exist to stop one request taking down the whole shard. A deployment that genuinely needs bigger transactions can raise them by overriding the `transactionLimits()` seam on its generated shard class."],status:413,title:"Transaction limit exceeded"},MIGRATION_NOT_FOUND:{status:404,title:"Data migration not found"},MIGRATION_DRIFT:{hint:["An applied SQL migration is never re-run, so the runner stopped before applying anything.","","- **Its text changed after it ran:** revert the edit and put the change in a new migration. If the edit is inert (a comment, whitespace, line endings), record the new hash with the `UPDATE` the message prints.","- **Tracking rows predate versions and match no migration:** set each row's `version` with the `UPDATE` the message prints, so the runner can tell what already ran."],status:409,title:"Migration drift"},UNKNOWN_TABLE:{status:404,title:"Unknown table"},GLOBAL_TABLE_NOT_EDITABLE:{status:400,title:"Global table is not editable"},SHARD_ERROR:{status:503,title:"Shard error"},SHARD_UNAVAILABLE:{status:503,title:"Shard unavailable"},SHARD_TIMEOUT:{status:504,title:"Shard timeout"},SHARD_HTTP_ERROR:{status:502,title:"Shard HTTP error"},SUBSCRIPTION_PERSIST_FAILED:{status:500,title:"Subscription persist failed"},TOO_MANY_SUBSCRIPTIONS:{status:429,title:"Too many subscriptions"},LIVE_CONTROL_SUPERSEDED:{status:409,title:"A later live control call already applied"},OFFLINE_IDENTITY_CHANGED:{status:409,title:"Offline identity changed"},OFFLINE_NOT_QUEUED:{hint:"A mutation sent with `onlineOnly: true` found its connection down or reconnecting (the shard had connected before), or, on a shard that has never connected, its request failed on the wire. It was refused instead of queued. Nothing was persisted or replayed; issue the call again once the connection is back. See [keeping a write off the queue](/docs/concepts/offline-first#keeping-a-write-off-the-queue).",status:503,title:"Offline, write not queued"},IDENTITY_MISMATCH:{hint:["A write queued offline was replayed on a session that now belongs to someone else (a sign-out, or another user's sign-in, while it waited), so the worker refused it rather than commit it as them.","","`@lunora/client` re-resolves the session on this refusal and settles the write itself. If every replay is refused while the same user stays signed in, your worker's `resolveIdentity` returns a different `userId` than better-auth's `user.id`, or the RPC request carries no session cookie."],status:409,title:"Session changed since the write was queued"},CODEGEN_DIAGNOSTIC:{status:500,title:"Codegen diagnostic"},JURISDICTION_MOVE:{hint:["The schema declares `.jurisdiction(...)` and the project has DO-backed auth (`.auth({ namespace })`). Pinning the auth object to the jurisdiction resolves it to a new, empty one: every user, account and session stays in the unpinned object until copied across. Voice sessions are pinned without an acknowledgement: they store nothing, and their transcripts are rows in the already-pinned shards.","",'Acknowledge with `.jurisdiction("eu", { pinAuth: true })` and deploy, then copy the auth tables across with the `__lunora_admin__:copyAuthToJurisdiction` admin op and, once the counts check out, purge the unpinned copy with `__lunora_admin__:purgeUnpinnedAuth` (see [Pinning auth and voice](/docs/concepts/data-residency#pinning-auth-and-voice)). For D1-mode auth the acknowledgement changes nothing.'],status:422,title:"Unacknowledged jurisdiction move"},SCHEMA_SNAPSHOT_PARSE:{status:500,title:"Schema snapshot parse error"},ENV_INVALID:{internal:!0,status:500,title:"Invalid environment"},X402_FACILITATOR_ERROR:{internal:!0,status:502,title:"Payment facilitator error"},AUTH_HEADERS_MISSING:{internal:!0,status:500,title:"Auth headers missing"},PRIVACY_COVERAGE:{status:500,title:"Privacy coverage check failed"},PRIVACY_REQUEST_OPEN:{status:409,title:"A privacy request is already open"},PRIVACY_SESSION_NOT_FRESH:{status:403,title:"Recent sign-in required"},EMAIL_DOMAIN_BLOCKED:{hint:["This address's domain is on the disposable/throwaway blocklist (or your configured deny-list).","","Sign up with a permanent mailbox. To tune the policy, pass `blockDisposable` / `allowDomains` / `denyDomains` in the `EmailGateConfig` you hand `assertEmailAllowed` / `classifyEmail` / `emailGateMiddleware` (`@lunora/auth/email-guard`)."],status:400,title:"Email domain not allowed"},EMAIL_UNDELIVERABLE:{hint:["The address's domain publishes no MX (or fallback A/AAAA) records, so it can't receive mail.","","Check for a typo in the domain. MX verification is opt-in (`mx: true`) and needs DNS \u2014 leave it off on the edge path if DNS is unavailable."],status:400,title:"Email domain cannot receive mail"},ANALYTICS_SQL_QUERY_ERROR:{status:502,title:"Analytics SQL query error"},BROWSER_RUN_ERROR:{status:502,title:"Browser Run API error"},BROWSER_TOO_MANY_REDIRECTS:{status:502,title:"Too many redirects"},R2_SQL_ERROR:{status:502,title:"R2 SQL API error"},WORKFLOWS_REST_ERROR:{status:502,title:"Cloudflare Workflows REST API error"},CONFIG_INVALID:{internal:!0,status:500,title:"Payment configuration invalid"},CURRENCY_MISMATCH:{status:400,title:"Currency mismatch"},PROVIDER_ERROR:{status:502,title:"Payment provider error"},WEBHOOK_EVENT_ID_MISSING:{status:400,title:"Webhook event id missing"},WEBHOOK_SIGNATURE_INVALID:{status:400,title:"Webhook signature invalid"},WEBHOOK_TIMESTAMP_INVALID:{status:400,title:"Webhook timestamp outside tolerance"},ADMIN_FORBIDDEN:{status:403,title:"Admin access forbidden"},ADMIN_TOKEN_NOT_CONFIGURED:{status:400,title:"Admin token not configured"},AUTH_MIGRATOR_UNSUPPORTED:{hint:["better-auth migrates only through its Kysely adapter, so `ensureMigrated` / `compileMigrationsSql` need the raw D1 binding as `database` \u2014 a custom adapter (`lunoraD1Adapter`, `lunoraAuthAdapter`, `lunoraDoAdapter`) cannot be migrated through, and neither can an absent `database`.","","Build a SECOND, migration-only instance over the raw binding \u2014 `createMigrationAuth({ ...options, database: env.DB })` (from `@lunora/auth/migrate`) \u2014 and hand that one to `ensureMigrated`. Keep the adapter on the instance that serves requests: the adapter exists to dodge a dev-runner hang in `$context`, which the migration instance never resolves.","","To compile the SQL off-platform (`compileMigrationsSql`), diff against an empty local database \u2014 `new DatabaseSync(':memory:')` from `node:sqlite` \u2014 rather than passing no `database` at all."],status:500,title:"Auth migrator cannot drive the configured database"},AUTH_NOT_CONFIGURED:{status:400,title:"Auth admin not configured"},AUTH_OP_NOT_SUPPORTED:{status:400,title:"Auth admin operation not supported"},AUTH_CIMD_FETCH_NOT_PUBLIC:{hint:'Add "global_fetch_strictly_public" to "compatibility_flags" in wrangler.jsonc, so CIMD metadata fetches cannot reach private addresses. `lunora doctor` reports it as `cimd-fetch-not-strictly-public`.',status:500,title:"CIMD transport needs the global_fetch_strictly_public flag"},AUTH_MCP_RESOURCE_AMBIGUOUS:{hint:'Use `mcp` from "@lunora/auth/plugins" (not `@better-auth/mcp`) and pass the plugin object as is: it records its `resource`, which the worker needs to serve the protected-resource metadata when the provider names several resources.',status:500,title:"MCP resource cannot be told apart from the provider's other resources"},AUTH_MCP_RESOURCE_INVALID:{hint:"Pass `resource` to `requireMcpAuth` (and `mcp()`) as the absolute URL of the MCP route, e.g. `https://app.example.com/mcp`: issued tokens are audience-bound to it.",status:500,title:"MCP resource missing or not an absolute URL"},MCP_STEP_UP_MISCONFIGURED:{hint:"Give `createAuthedMcpFetchHandler`'s `stepUp` a non-empty `scope` (such as `lunora:write`) and a `challenge` (`createInsufficientScopeError` from `@lunora/auth/plugins`), or leave `stepUp` out.",status:500,title:"MCP step-up misconfigured"},BACKUP_NOT_CONFIGURED:{status:500,title:"Scheduled backup not configured"},BACKUP_RETENTION_NOT_CONFIGURED:{hint:["`lunora backup prune` removes snapshots past the retention window, and this worker has no window: set `backupRetain` (how many to keep) and `backupCron` (which decides whose snapshots retention owns) on `createWorker`.","","Nothing was deleted. A default is deliberately not invented here \u2014 retention deleting on its own is exactly what this command exists to replace."],status:400,title:"Backup retention window not configured"},BACKUP_TOO_LARGE:{hint:["The scheduled backup is assembled inside the Worker isolate, so it caps the snapshot it will build. Nothing was written.","","The cap is on the NDJSON, not on peak memory: the export fan-out resolves every shard's rows before the first row is encoded, so a snapshot under the cap can still exhaust the isolate. It is set well below the isolate's limit for that reason.","","Narrow the snapshot with `backupTables`, or take this backup off-platform with `lunora backup create --bucket`, which runs on a machine rather than in an isolate. Backing up more often does not help \u2014 every run is a full snapshot."],status:507,title:"Backup too large to assemble in a Worker"},CRON_JOBS_NOT_CONFIGURED:{status:400,title:"Cron jobs not configured"},CRON_JOB_NOT_FOUND:{status:404,title:"Cron job not found"},EXPORT_SHARD_FAILED:{hint:["One or more shards failed to export, so the snapshot would have been short. Nothing is written when this fires \u2014 a partial export must never be mistaken for a complete one.","","The message names each failed shard key and its error. Re-run the export once those shards are reachable; a shard that fails repeatedly is usually over the per-request memory budget, which `backupTables` narrows."],status:502,title:"Export failed on one or more shards"},EXPORT_TAP_NOT_CONFIGURED:{status:400,title:"Export tap not configured"},FUNCTIONS_NOT_CONFIGURED:{status:400,title:"Functions registry not configured"},GLOBALS_NOT_CONFIGURED:{status:400,title:"Global-table introspector not configured"},ID_COLLISION:{hint:["The imported row carries an `_id` that is already held by a DIFFERENT table in this shard. Ids are per-table, so inserting it would leave two tables claiming one id and make a later lookup resolve to whichever one it reached first.","","This is reported per row rather than aborting the import: the remaining rows still apply. Re-mint the id on the source side, or import that table into a shard that does not already hold it."],status:409,title:"Document id already belongs to another table"},KV_NOT_CONFIGURED:{status:400,title:"KV introspector not configured"},MIGRATION_ID_REQUIRED:{status:400,title:"Migration id required"},PITR_UNAVAILABLE:{status:409,title:"Point-in-time recovery unavailable"},SCHEDULER_NOT_CONFIGURED:{status:400,title:"Scheduler not configured"},STORAGE_CHECKSUM_MISMATCH:{hint:["The upload body did not match the declared `expectedSize` or `expectedSha256`, so nothing was written \u2014 this check fails closed.","","Re-read the bytes from the source export and retry the transfer. A persistent mismatch means the source blob is corrupt or truncated; fix the export rather than bypassing the check."],status:400,title:"Storage checksum mismatch"},STORAGE_DELETE_NOT_CONFIGURED:{status:400,title:"Storage delete not configured"},STORAGE_DOWNLOAD_NOT_CONFIGURED:{hint:["`GET /_lunora/admin/storage/object` needs a `storageDownload` function on the worker. The generated app worker wires it up; a hand-written `createWorker({ ... })` has to pass `(key, opts) => pick(opts?.bucket).download(key)` \u2014 forwarding `opts.bucket` to the right bucket, and wrapping rather than passing `createStorage(...).download` itself, whose second parameter is a byte range.","","Without it a bucket-backed `lunora backup restore --bucket` cannot read the snapshot. The object is still readable out of band with `wrangler r2 object get`."],status:400,title:"Storage download not configured"},STORAGE_NOT_CONFIGURED:{status:400,title:"Storage not configured"},STORAGE_OBJECT_NOT_FOUND:{status:404,title:"Storage object not found"},STORAGE_UPLOAD_NOT_CONFIGURED:{status:400,title:"Storage upload not configured"},STORAGE_URL_NOT_CONFIGURED:{status:400,title:"Storage signed URL not configured"},AI_UNKNOWN_IMAGE_MODEL:{status:400,title:"Unknown image model"},RAG_DIMENSION_MISMATCH:{hint:["A stored vector and the query embedding have different widths, so they cannot be compared.","","This is what changing a RAG index's `embeddingModel` (or a provider's `dimensions` option) without reindexing looks like. Either put the previous model back, or reindex the namespace under the new one \u2014 bump `embeddingModelVersion` so the index rebuilds instead of mixing widths."],status:409,title:"Embedding dimension mismatch"},VECTORS_NOT_CONFIGURED:{status:400,title:"Vector index introspector not configured"},VECTOR_QUERY_UNSUPPORTED:{status:400,title:"Vector index querying not enabled"},WORKFLOWS_NOT_CONFIGURED:{status:501,title:"Workflows not configured"},AUTH_AUDIT_NOT_CONFIGURED:{status:400,title:"Auth audit reader not configured"},AUTH_AUDIT_READ_FAILED:{internal:!0,status:500,title:"Auth audit read failed"},AUTH_MOVE_NOT_CONFIGURED:{hint:"The copy needs DO-backed auth (`.auth({ namespace })`) pinned with `.jurisdiction(\u2026, { pinAuth: true })`, and the auth object's `internalSecret` set.",status:400,title:"Auth jurisdiction move not configured"},AUTH_MOVE_TARGET_NOT_EMPTY:{hint:"The pinned auth object holds users the copy did not write (someone signed up there), so copying into it would merge two user bases. Pass `force: true` to copy anyway: a copied row that collides with one of the pinned object's rows is left out and counted under `conflicts`.",status:409,title:"Pinned auth object is not empty"},AUTH_MOVE_CONFLICT:{hint:"A copied row has the same key or unique value (such as an email) as a row the pinned auth object holds on its own, or the pinned object changed a row the source changed too. Nothing from that page was written. Pass `force: true` to keep the pinned object's rows and count the collisions under `conflicts`.",status:409,title:"Auth copy conflict"},AUTH_MOVE_SOURCE_CHANGED:{hint:"The un-pinned auth object changed after the copy read it (an update, a delete, or a new row), for example during a gradual rollout or a rollback. Run the copy again: it reconciles the changed tables. Then purge.",status:409,title:"Un-pinned auth object changed since the copy"},AUTH_MOVE_SOURCE_PURGED:{hint:"The un-pinned auth object was already purged. Its tables may exist again (a rollback served requests there), but they hold only rows written since, so the copy refuses rather than read them as deletions and remove the pinned object's users. Nothing is left to copy.",status:409,title:"Un-pinned auth object already purged"},AUTH_MOVE_INCOMPLETE:{hint:"Run `__lunora_admin__:copyAuthToJurisdiction` until it answers `done: true`, check the per-table counts, then purge.",status:409,title:"Auth copy not finished"},AUTH_MOVE_FAILED:{hint:"The message names the step, the table and the class of the SQLite error; the auth object's log has the full error. The copy resumes where it stopped once the cause is fixed.",status:500,title:"Auth jurisdiction move failed"},CRON_EXPR_INVALID:{status:500,title:"Invalid cron expression"},CRON_EXPR_NOT_STATIC:{status:500,title:"Cron expression is not statically analyzable"},CRON_JOB_FAILED:{internal:!0,status:500,title:"Cron job failed"},CRON_NAME_NOT_STATIC:{status:500,title:"Cron job name is not statically analyzable"},CRON_NON_STATIC_FN:{status:500,title:"Cron function reference is not statically analyzable"},CRON_NON_STATIC_VALUE:{status:500,title:"Cron value is not statically analyzable"},CRON_SCHEDULE_INVALID:{status:500,title:"Invalid cron schedule"},CRON_SCHEDULE_NOT_STATIC:{status:500,title:"Cron schedule is not statically analyzable"},DUPLICATE_CRON_NAME:{status:500,title:"Duplicate cron job name"},DUPLICATE_AGENT_CLASS:{status:500,title:"Duplicate agent generated class name"},DUPLICATE_AGENT_NAME:{status:500,title:"Duplicate agent name"},DUPLICATE_MIGRATION_ID:{status:500,title:"Duplicate migration id"},DUPLICATE_QUEUE_BINDING:{status:500,title:"Duplicate queue binding"},DUPLICATE_QUEUE_NAME:{status:500,title:"Duplicate queue name"},DUPLICATE_ROOM_NAME:{status:500,title:"Duplicate room name"},ROOM_NAME_NOT_LITERAL:{status:500,title:"Room name is not a string literal"},DUPLICATE_SOCKET_PATH:{status:500,title:"Duplicate socket route path"},SOCKET_AUTH_NOT_LITERAL:{status:500,title:"Socket route auth is not a literal boolean"},SOCKET_PATH_INVALID:{status:500,title:"Socket route path is not a plain URL path"},SOCKET_PATH_NOT_LITERAL:{status:500,title:"Socket route path is not a string literal"},LIVE_STREAM_DUPLICATE:{status:500,title:"Duplicate live stream id or export name"},LIVE_STREAM_NOT_EXPORTED:{status:500,title:"Live stream is not a named export"},LIVE_STREAM_NOT_LITERAL:{status:500,title:"Live stream declaration is not a literal"},LIVE_TOPIC_INVALID:{status:500,title:"Live topic name or key field is not allowed"},DUPLICATE_WORKFLOW_CLASS:{status:500,title:"Duplicate workflow generated class name"},MIGRATION_ID_NOT_STATIC:{status:500,title:"Migration id is not statically analyzable"},NAMESPACE_COLLISION:{status:500,title:"Function namespace collision"},BAD_ROW:{status:400,title:"Malformed import row"},BAD_SUBSCRIPTION_ARGS:{status:400,title:"Invalid subscription arguments"},BATCH_LIMIT_EXCEEDED:{status:400,title:"Batch limit exceeded"},CASCADE_LIMIT:{status:400,title:"Cascade limit exceeded"},CROSS_SHARD_RANK_UNSUPPORTED:{status:400,title:"Cross-shard rank() is unsupported"},DISPATCH_UNAUTHENTICATED:{hint:"The scheduler could not authenticate to the worker. Check that `LUNORA_SCHEDULER_SECRET` matches on both sides, or that `LUNORA_ADMIN_TOKEN` is set and current.",status:403,title:"Dispatch caller not authenticated"},DISPATCH_IN_PROGRESS:{hint:"A dispatch with this idempotency id is still running on the shard. Retry it; once the first attempt settles the same id is served from the replay cache.",status:409,title:"Dispatch already in progress"},FORBIDDEN_FANOUT:{status:403,title:"Fan-out forbidden"},GLOBAL_SEARCH_SCORES_UNSUPPORTED:{status:400,title:"collectWithScores() is unsupported on a global table"},FORBIDDEN_ORIGIN:{status:403,title:"Origin forbidden"},FORBIDDEN_SHARD:{status:403,title:"Shard access forbidden"},FORBIDDEN_TOPIC:{status:403,title:"Live topic publish forbidden"},GLOBAL_DRY_RUN_UNSUPPORTED:{status:400,title:"Global table dry run not supported"},GLOBAL_NOT_CONFIGURED:{status:400,title:"Global table import not configured"},INVALID_INPUT:{status:400,title:"Invalid input"},INVALID_SCHEDULE_ID:{status:400,title:"Invalid schedule id"},RATE_LIMITED:{status:429,title:"Rate limited"},REPLICA_NOT_READY:{status:421,title:"Replica not caught up"},REPLICA_READ_ONLY:{status:421,title:"Replica is read-only"},SEARCH_INDEX_BUILDING:{status:503,title:"Search index is still building"},SERVICE_UNAVAILABLE:{status:503,title:"Service unavailable"},SHAPE_MEMORY_TABLE:{status:400,title:"Shape over a memory table is unsupported"},SHAPE_CROSS_SHARD_JOIN:{status:400,title:"Shape cross-shard join is unsupported"},SHAPE_RELATION_PREDICATE:{status:400,title:"Shape filtered by a relation is unsupported"},UNAUTHENTICATED:{status:401,title:"Unauthenticated"},WIRE_DECODE_FAILED:{status:502,title:"Could not decode a server frame"},WIRE_ENCODE_FAILED:{status:500,title:"Could not encode a return value"},UNKNOWN_COLUMN:{status:404,title:"Unknown column"},CDC_LOG_TRIMMED:{status:409,title:"CDC log trimmed"},CDC_TIMELINE_FORKED:{status:409,title:"CDC timeline forked"},CDC_PAYLOAD_COMPACTED:{status:409,title:"CDC payloads compacted"},EXPIRED:{status:404,title:"Session expired"},LIVE_CONNECTION_LIMIT:{status:503,title:"Live connection limit reached"},LIVE_CONNECTION_NOT_FOUND:{status:404,title:"Live connection not found"},LIVE_STREAMS_UNSUPPORTED:{status:501,title:"Live streams are not served by this worker"},NESTED_TRANSACTION:{internal:!0,status:500,title:"Nested transaction"},OUT_OF_ORDER:{status:409,title:"Out-of-order mutation"},SHAPE_GLOBAL_TOO_LARGE:{status:413,title:"Global shape too large"},SHAPE_NOT_FOUND:{status:404,title:"Shape not found"},SHAPE_REQUIRES_CDC:{status:409,title:"Shape requires change-data-capture"},SQL_UNAVAILABLE:{internal:!0,status:500,title:"SQL storage unavailable"},STREAM_ID_IN_USE:{status:409,title:"Stream id already in use"},STREAM_IDLE:{status:504,title:"Stream went idle"},STREAM_INTERRUPTED:{status:503,title:"Durable stream interrupted"},STREAM_TOO_LONG:{status:507,title:"Durable stream exceeded its chunk ceiling"},SUBSCRIPTION_RESULT_TOO_LARGE:{status:413,title:"Subscription result too large"},TOKEN_EXPIRED:{hint:["The caller's credential verified but its expiry has passed. The worker refuses an HTTP call with this code before it runs; a shard drops a socket with close code `4001` and the same code.","","It is a refusal of the credential, not of the call: `@lunora/client` holds a queued write, fires `onTokenExpired`, and re-sends it after `setAuthToken`. The held write survives the refresh only if you pass the same `subject` (the user id) with the new token, `setAuthToken(freshToken, user.id)`; without one a refresh reads as a user switch and the write is rejected `OFFLINE_IDENTITY_CHANGED`. Under a cookie session there is no token to replace: renew the cookie and the write is re-sent on a backoff. The worker can only tell expired from anonymous if your `resolveIdentity` returns the identity with its past `exp` (or `expiresAtMs`), or throws a `LunoraError` with this code. Returning `null` runs the call anonymous."],status:401,title:"Authentication token expired"},TOO_MANY_LIVE_TOPICS:{status:429,title:"Too many live topics"},TOO_MANY_STREAMS:{status:429,title:"Too many streams"},TOO_MANY_WHISPER_TOPICS:{hint:"Reuse a stable set of whisper topic names, or reconnect \u2014 the per-socket verdict memo is in-memory, so a new connection starts empty. Leaving a topic does not free its entry.",status:429,title:"Too many whisper topics"},UNKNOWN_ADMIN_OP:{status:404,title:"Unknown admin operation"},SOCKET_TAG_BUDGET_EXCEEDED:{status:400,title:"Socket tag budget exceeded"},RELAY_CANNOT_SEED:{status:500,title:"Relay cannot seed"},RELAY_MISCONFIGURED:{status:500,title:"Relay misconfigured"},RELAY_SEED_FAILED:{status:502,title:"Relay seed failed"},RELAY_SHAPE_UNROUTABLE:{status:500,title:"Relay shape unroutable"},MISCONFIGURED:{internal:!0,status:500,title:"Worker misconfigured"},LUNORA_RUNTIME_UNAVAILABLE:{status:500,title:"Lunora runtime unavailable"},INTERNAL_ERROR:{internal:!0,status:500,title:"Internal error"},BROWSER_TIMEOUT:{status:504,title:"Browser operation timed out"},CLIENT_CLOSED:{status:400,title:"Client is closed"},HTTP_STREAM_BAD_CHUNK:{status:502,title:"Malformed HTTP stream chunk"},HTTP_STREAM_CALLBACK:{status:500,title:"HTTP stream callback threw"},HTTP_STREAM_INTERRUPTED:{status:502,title:"HTTP stream interrupted"},HTTP_STREAM_MISSING_PARAM:{status:400,title:"HTTP stream missing path parameter"},HTTP_STREAM_NO_BODY:{hint:["The `fetch` implementation resolved with a response that exposes neither a `body` stream nor a `text()` read \u2014 a broken `fetch` substitute, not a runtime limitation.","A response with no `body` stream that can still be read as text (React Native's `whatwg-fetch` polyfill) is buffered through `text()` instead and never raises this code. Check the `fetch` override passed to the client or the `httpStream` call."],status:502,title:"HTTP stream response has no body"},HTTP_STREAM_STATUS:{status:502,title:"HTTP stream request failed"},HTTP_STREAM_TRANSPORT:{status:502,title:"HTTP stream transport error"},STREAM_BACKPRESSURE:{status:429,title:"Stream backpressure"},STREAM_DISCONNECTED:{status:503,title:"Stream disconnected"},STREAM_QUEUE_OVERFLOW:{status:429,title:"Stream queue overflow"},UNKNOWN_MUTATION_FN:{status:404,title:"Unknown mutation function"},LOCAL_DEPENDENCY_MISSING:{hint:["The command Lunora tried to run is not on your PATH, so nothing ran.","","Install it (or put it on PATH) and retry \u2014 `wrangler` ships as a dependency of a Lunora app, so `pnpm install` usually fixes that one; `git` and `docker` are installed separately."],status:500,title:"Required local tool not found"}},c=a(e=>Object.hasOwn(l,e)?l[e]:void 0,"h");var m=[{body:["A single row exceeded the storage engine's per-row ceiling \u2014 2 MB on a Durable Object's SQLite, and 2,000,000 bytes on D1.","","The limit is on the STORED bytes, which are UTF-8: a document of multi-byte text (CJK, emoji) costs up to 3x its character count. `v.bytes()` and `v.bigint()` columns cost more again on a shard-local table, where the row stores both a SQL-comparable projection and the original.","","Keep the large payload out of the row and store a reference to it:","","```ts","const key = `uploads/${crypto.randomUUID()}`;","await ctx.storage.uploads.put(key, bytes);",'await ctx.db.insert("documents", { storageKey: key, title });',"```","","R2 has no practical object-size ceiling, and the row stays small enough to read, index, and replicate."].join(`
2
2
  `),header:"Row too large for the storage engine",id:"lunora-row-too-big",test:a(e=>T.test(e),"test")},{body:["Lunora codegen couldn't find a schema to generate from.","","Create `lunora/schema.ts` exporting a `defineSchema(...)` call:","","```ts",'import { defineSchema, defineTable, v } from "@lunora/server";',"","export default defineSchema({"," messages: defineTable({ body: v.string() }),","});","```","","Or run `lunora init` to scaffold Lunora (a sample `lunora/schema.ts` included) into your app."].join(`
3
3
  `),header:"No Lunora schema found",id:"lunora-schema-missing",test:a(e=>e.includes("defineSchema() not found")||e.includes("schema.ts not found at"),"test")},{body:["`defineSchema(...)` must be called with an **inline object literal** mapping table names to `defineTable(...)`:","","```ts","export default defineSchema({"," todos: defineTable({ title: v.string(), done: v.boolean() }),","});","```","","Codegen reads the schema statically, so it can't follow a variable or a spread \u2014 pass the object literal directly."].join(`
4
4
  `),header:"`defineSchema()` needs an inline object literal",id:"lunora-schema-not-object-literal",test:a(e=>e.includes("defineSchema() expects an object literal"),"test")},{body:["This table name collides with a built-in `ctx.db` member, so the generated client can't expose it.","","Rename the table to anything that isn't a `ctx.db` member (the error names the one it hit) \u2014 e.g. `userAccounts` instead of `insert`, or `pageViews` instead of `count`."].join(`
@@ -1,4 +1,4 @@
1
- import{c as wh,e as pi,f as mi,j as Sh}from"./chunk-AUGKHAMQ.js";import{a as bh,b as Ah}from"./chunk-WJRYEML4.js";import{b as JE}from"./chunk-SJQERRSZ.js";import{a as xh}from"./chunk-7Y3SY37W.js";import{d as rl}from"./chunk-M3QKMHAP.js";import{a as i,b as X,c as XE,d as M,e as z,f as ZE,g as QE,h as re,i as Xr}from"./chunk-I26MS5PJ.js";var Oh=X(Ph=>{function eI(e,t,{signal:r,edges:n}={}){let a,o=null,l=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),u=i(()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},"invoke"),c=i(()=>{s&&u(),m()},"onTimerEnd"),f=null,d=i(()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,c()},t)},"schedule"),p=i(()=>{f!==null&&(clearTimeout(f),f=null)},"cancelTimer"),m=i(()=>{p(),a=void 0,o=null},"cancel"),h=i(()=>{u()},"flush"),v=i(function(...g){if(r?.aborted)return;a=this,o=g;let y=f==null;d(),l&&y&&u()},"debounced");return v.schedule=d,v.cancel=m,v.flush=h,r?.addEventListener("abort",m,{once:!0}),v}i(eI,"debounce");Ph.debounce=eI});var Ih=X(Eh=>{var tI=Oh();function rI(e,t=0,r={}){typeof r!="object"&&(r={});let{leading:n=!1,trailing:a=!0,maxWait:o}=r,l=Array(2);n&&(l[0]="leading"),a&&(l[1]="trailing");let s,u=null,c=tI.debounce(function(...p){s=e.apply(this,p),u=null},t,{edges:l}),f=i(function(...p){return o!=null&&(u===null&&(u=Date.now()),Date.now()-u>=o)?(s=e.apply(this,p),u=Date.now(),c.cancel(),c.schedule(),s):(c.apply(this,p),s)},"debounced"),d=i(()=>(c.flush(),s),"flush");return f.cancel=c.cancel,f.flush=d,f}i(rI,"debounce");Eh.debounce=rI});var kh=X(Ch=>{var nI=Ih();function iI(e,t=0,r={}){let{leading:n=!0,trailing:a=!0}=r;return nI.debounce(e,t,{leading:n,maxWait:t,trailing:a})}i(iI,"throttle");Ch.throttle=iI});var Th=X((m$,_h)=>{_h.exports=kh().throttle});var Rh=X(Dh=>{function aI(e){return e==="__proto__"}i(aI,"isUnsafeProperty");Dh.isUnsafeProperty=aI});var tf=X(Mh=>{function oI(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}i(oI,"isDeepKey");Mh.isDeepKey=oI});var nl=X(Nh=>{function lI(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}i(lI,"toKey");Nh.toKey=lI});var Bh=X(Lh=>{function jh(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(jh).join(",");let t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}i(jh,"toString");Lh.toString=jh});var il=X(zh=>{var sI=nl(),uI=Bh();function cI(e){if(Array.isArray(e))return e.map(sI.toKey);if(typeof e=="symbol")return[e];e=uI.toString(e);let t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",l=!1;for(e.charCodeAt(0)===46&&(t.push(""),n++);n<r;){let s=e[n];o?s==="\\"&&n+1<r?(n++,a+=e[n]):s===o?o="":a+=s:l?s==='"'||s==="'"?o=s:s==="]"?(l=!1,t.push(a),a=""):a+=s:s==="["?(l=!0,a&&(t.push(a),a="")):s==="."?a&&(t.push(a),a=""):a+=s,n++}return a&&t.push(a),t}i(cI,"toPath");zh.toPath=cI});var al=X(Wh=>{var rf=Rh(),fI=tf(),dI=nl(),pI=il();function Fh(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(rf.isUnsafeProperty(t))return r;let n=e[t];return n===void 0?fI.isDeepKey(t)?Fh(e,pI.toPath(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=dI.toKey(t));let n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return mI(e,t,r);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),rf.isUnsafeProperty(t))return r;let n=e[t];return n===void 0?r:n}}}i(Fh,"get");function mI(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||rf.isUnsafeProperty(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}i(mI,"getWithPath");Wh.get=Fh});var _a=X((I$,Vh)=>{Vh.exports=al().get});var Jh=X(Qh=>{function NI(e,t=1){let r=[],n=Math.floor(t),a=i((o,l)=>{for(let s=0;s<o.length;s++){let u=o[s];Array.isArray(u)&&l<n?a(u,l+1):r.push(u)}},"recursive");return a(e,0),r}i(NI,"flatten");Qh.flatten=NI});var Da=X(ev=>{function jI(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}i(jI,"isEqualsSameValueZero");ev.isEqualsSameValueZero=jI});var sl=X(()=>{Da()});var rv=X(tv=>{function LI(e){return Number.isSafeInteger(e)&&e>=0}i(LI,"isLength");tv.isLength=LI});var lf=X(nv=>{var BI=rv();function zI(e){return e!=null&&typeof e!="function"&&BI.isLength(e.length)}i(zI,"isArrayLike");nv.isArrayLike=zI});var sf=X(iv=>{function FI(e){return e!==null&&(typeof e=="object"||typeof e=="function")}i(FI,"isObject");iv.isObject=FI});var uf=X(av=>{var WI=/^(?:0|[1-9]\d*)$/;function VI(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return WI.test(e)}}i(VI,"isIndex");av.isIndex=VI});var cf=X(ov=>{var qI=Da();sl();var $I=lf(),KI=sf(),UI=uf();function HI(e,t,r){return KI.isObject(r)&&(typeof t=="number"&&$I.isArrayLike(r)&&UI.isIndex(t)&&t<r.length||typeof t=="string"&&t in r)?qI.isEqualsSameValueZero(r[t],e):!1}i(HI,"isIterateeCall");ov.isIterateeCall=HI});var uv=X(sv=>{function lv(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}i(lv,"getPriority");var YI=i((e,t,r)=>{if(e!==t){let n=lv(e),a=lv(t);if(n===a&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0},"compareValues");sv.compareValues=YI});var ff=X(cv=>{function GI(e){return typeof e=="symbol"||e instanceof Symbol}i(GI,"isSymbol");cv.isSymbol=GI});var dv=X(fv=>{var XI=ff(),ZI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QI=/^\w*$/;function JI(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||XI.isSymbol(e)?!0:typeof e=="string"&&(QI.test(e)||!ZI.test(e))||t!=null&&Object.hasOwn(t,e)}i(JI,"isKey");fv.isKey=JI});var mv=X(pv=>{var e1=il(),t1=uv(),r1=dv();function n1(e,t,r,n){if(e==null)return[];r=n?void 0:r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(s=>String(s));let a=i((s,u)=>{let c=s;for(let f=0;f<u.length&&c!=null;++f)c=c[u[f]];return c},"getValueByNestedPath"),o=i((s,u)=>u==null||s==null?u:typeof s=="object"&&"key"in s?Object.hasOwn(u,s.key)?u[s.key]:a(u,s.path):typeof s=="function"?s(u):Array.isArray(s)?a(u,s):typeof u=="object"?u[s]:u,"getValueByCriterion"),l=t.map(s=>(Array.isArray(s)&&s.length===1&&(s=s[0]),s==null||typeof s=="function"||Array.isArray(s)||r1.isKey(s)?s:{key:s,path:e1.toPath(s)}));return e.map(s=>({original:s,criteria:l.map(u=>o(u,s))})).slice().sort((s,u)=>{for(let c=0;c<l.length;c++){let f=t1.compareValues(s.criteria[c],u.criteria[c],r[c]);if(f!==0)return f}return 0}).map(s=>s.original)}i(n1,"orderBy");pv.orderBy=n1});var yv=X(vv=>{var i1=Jh(),hv=cf(),a1=mv();function o1(e,...t){let r=t.length;return r>1&&hv.isIterateeCall(e,t[0],t[1])?t=[]:r>2&&hv.isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),a1.orderBy(e,i1.flatten(t),["asc"])}i(o1,"sortBy");vv.sortBy=o1});var Ra=X((xK,gv)=>{gv.exports=yv().sortBy});var _v=X(kv=>{function j1(e,t){let r=new Map;for(let n=0;n<e.length;n++){let a=e[n],o=t(a,n,e);r.has(o)||r.set(o,a)}return Array.from(r.values())}i(j1,"uniqBy");kv.uniqBy=j1});var Dv=X(Tv=>{function L1(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}i(L1,"ary");Tv.ary=L1});var pf=X(Rv=>{function B1(e){return e}i(B1,"identity");Rv.identity=B1});var Nv=X(Mv=>{var z1=al();function F1(e){return function(t){return z1.get(t,e)}}i(F1,"property");Mv.property=F1});var mf=X(jv=>{function W1(e){return e==null||typeof e!="object"&&typeof e!="function"}i(W1,"isPrimitive");jv.isPrimitive=W1});var Bv=X(Lv=>{function V1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}i(V1,"isTypedArray");Lv.isTypedArray=V1});var hf=X(zv=>{function q1(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}i(q1,"getSymbols");zv.getSymbols=q1});var ja=X(Fv=>{function $1(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}i($1,"getTag");Fv.getTag=$1});var fl=X(Oe=>{var K1="[object RegExp]",U1="[object String]",H1="[object Number]",Y1="[object Boolean]",G1="[object Arguments]",X1="[object Symbol]",Z1="[object Date]",Q1="[object Map]",J1="[object Set]",eC="[object Array]",tC="[object Function]",rC="[object ArrayBuffer]",nC="[object Object]",iC="[object Error]",aC="[object DataView]",oC="[object Uint8Array]",lC="[object Uint8ClampedArray]",sC="[object Uint16Array]",uC="[object Uint32Array]",cC="[object BigUint64Array]",fC="[object Int8Array]",dC="[object Int16Array]",pC="[object Int32Array]",mC="[object BigInt64Array]",hC="[object Float32Array]",vC="[object Float64Array]";Oe.argumentsTag=G1;Oe.arrayBufferTag=rC;Oe.arrayTag=eC;Oe.bigInt64ArrayTag=mC;Oe.bigUint64ArrayTag=cC;Oe.booleanTag=Y1;Oe.dataViewTag=aC;Oe.dateTag=Z1;Oe.errorTag=iC;Oe.float32ArrayTag=hC;Oe.float64ArrayTag=vC;Oe.functionTag=tC;Oe.int16ArrayTag=dC;Oe.int32ArrayTag=pC;Oe.int8ArrayTag=fC;Oe.mapTag=Q1;Oe.numberTag=H1;Oe.objectTag=nC;Oe.regexpTag=K1;Oe.setTag=J1;Oe.stringTag=U1;Oe.symbolTag=X1;Oe.uint16ArrayTag=sC;Oe.uint32ArrayTag=uC;Oe.uint8ArrayTag=oC;Oe.uint8ClampedArrayTag=lC});var Vv=X(Wv=>{var yC=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();Wv.globalThis_=yC});var vf=X($v=>{var qv=Vv();function gC(e){return typeof qv.globalThis_.Buffer<"u"&&qv.globalThis_.Buffer.isBuffer(e)}i(gC,"isBuffer");$v.isBuffer=gC});var yf=X(dl=>{var xC=mf(),bC=Bv(),AC=hf(),wC=ja(),Le=fl(),SC=vf();function PC(e,t){return xn(e,void 0,e,new Map,t)}i(PC,"cloneDeepWith");function xn(e,t,r,n=new Map,a=void 0){let o=a?.(e,t,r,n);if(o!==void 0)return o;if(xC.isPrimitive(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let l=new Array(e.length);n.set(e,l);for(let s=0;s<e.length;s++)l[s]=xn(e[s],s,r,n,a);return Object.hasOwn(e,"index")&&(l.index=e.index),Object.hasOwn(e,"input")&&(l.input=e.input),l}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,l}if(e instanceof Map){let l=new Map;n.set(e,l);for(let[s,u]of e)l.set(s,xn(u,s,r,n,a));return l}if(e instanceof Set){let l=new Set;n.set(e,l);for(let s of e)l.add(xn(s,void 0,r,n,a));return l}if(SC.isBuffer(e))return e.subarray();if(bC.isTypedArray(e)){let l=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,l);for(let s=0;s<e.length;s++)l[s]=xn(e[s],s,r,n,a);return l}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let l=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof File<"u"&&e instanceof File){let l=new File([e],e.name,{type:e.type});return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof Blob<"u"&&e instanceof Blob){let l=new Blob([e],{type:e.type});return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof Error){let l=structuredClone(e);return n.set(e,l),l.message=e.message,l.name=e.name,l.stack=e.stack,l.cause=e.cause,l.constructor=e.constructor,Ir(l,e,r,n,a),l}if(e instanceof Boolean){let l=new Boolean(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof Number){let l=new Number(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof String){let l=new String(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof e=="object"&&OC(e)){let l=Object.create(Object.getPrototypeOf(e));return n.set(e,l),Ir(l,e,r,n,a),l}return e}i(xn,"cloneDeepWithImpl");function Ir(e,t,r=e,n,a){let o=[...Object.keys(t),...AC.getSymbols(t)];for(let l=0;l<o.length;l++){let s=o[l],u=Object.getOwnPropertyDescriptor(e,s);(u==null||u.writable)&&(e[s]=xn(t[s],s,r,n,a))}}i(Ir,"copyProperties");function OC(e){switch(wC.getTag(e)){case Le.argumentsTag:case Le.arrayTag:case Le.arrayBufferTag:case Le.dataViewTag:case Le.booleanTag:case Le.dateTag:case Le.float32ArrayTag:case Le.float64ArrayTag:case Le.int8ArrayTag:case Le.int16ArrayTag:case Le.int32ArrayTag:case Le.mapTag:case Le.numberTag:case Le.objectTag:case Le.regexpTag:case Le.setTag:case Le.stringTag:case Le.symbolTag:case Le.uint8ArrayTag:case Le.uint8ClampedArrayTag:case Le.uint16ArrayTag:case Le.uint32ArrayTag:return!0;default:return!1}}i(OC,"isCloneableObject");dl.cloneDeepWith=PC;dl.cloneDeepWithImpl=xn;dl.copyProperties=Ir});var Uv=X(Kv=>{var EC=yf();function IC(e){return EC.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}i(IC,"cloneDeep");Kv.cloneDeep=IC});var Qv=X(Zv=>{var Hv=mf(),Yv=Da();sl();var CC=sf();function Gv(e,t,r){return typeof r!="function"?Gv(e,t,()=>{}):gf(e,t,i(function n(a,o,l,s,u,c){let f=r(a,o,l,s,u,c);return f!==void 0?!!f:gf(a,o,n,c)},"doesMatch"),new Map)}i(Gv,"isMatchWith");function gf(e,t,r,n){if(t===e)return!0;switch(typeof t){case"object":return kC(e,t,r,n);case"function":return Object.keys(t).length>0?gf(e,{...t},r,n):Yv.isEqualsSameValueZero(e,t);default:return CC.isObject(e)?typeof t=="string"?t==="":!0:Yv.isEqualsSameValueZero(e,t)}}i(gf,"isMatchWithInternal");function kC(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return Xv(e,t,r,n);if(t instanceof Map)return _C(e,t,r,n);if(t instanceof Set)return TC(e,t,r,n);let a=Object.keys(t);if(e==null||Hv.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let o=0;o<a.length;o++){let l=a[o];if(!Hv.isPrimitive(e)&&!(l in e)||t[l]===void 0&&e[l]!==void 0||t[l]===null&&e[l]!==null||!r(e[l],t[l],l,e,t,n))return!1}return!0}finally{n?.delete(t)}}i(kC,"isObjectMatch");function _C(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[a,o]of t.entries())if(r(e.get(a),o,a,e,t,n)===!1)return!1;return!0}i(_C,"isMapMatch");function Xv(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let a=new Set;for(let o=0;o<t.length;o++){let l=t[o],s=!1;for(let u=0;u<e.length;u++){if(a.has(u))continue;let c=e[u],f=!1;if(r(c,l,o,e,t,n)&&(f=!0),f){a.add(u),s=!0;break}}if(!s)return!1}return!0}i(Xv,"isArrayMatch");function TC(e,t,r,n){return t.size===0?!0:e instanceof Set?Xv([...e],[...t],r,n):!1}i(TC,"isSetMatch");Zv.isMatchWith=Gv});var xf=X(Jv=>{var DC=Qv();function RC(e,t){return DC.isMatchWith(e,t,()=>{})}i(RC,"isMatch");Jv.isMatch=RC});var ty=X(ey=>{var MC=Uv(),NC=xf();function jC(e){return e=MC.cloneDeep(e),t=>NC.isMatch(t,e)}i(jC,"matches");ey.matches=jC});var ny=X(ry=>{var LC=ja(),pl=fl(),ml=yf();function BC(e,t){return ml.cloneDeepWith(e,(r,n,a,o)=>{let l=t?.(r,n,a,o);if(l!==void 0)return l;if(typeof e=="object"){if(LC.getTag(e)==="[object Object]"&&typeof e.constructor!="function"){let s={};return o.set(e,s),ml.copyProperties(s,e,a,o),s}switch(Object.prototype.toString.call(e)){case pl.numberTag:case pl.stringTag:case pl.booleanTag:{let s=new e.constructor(e?.valueOf());return ml.copyProperties(s,e),s}case pl.argumentsTag:{let s={};return ml.copyProperties(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}i(BC,"cloneDeepWith");ry.cloneDeepWith=BC});var ay=X(iy=>{var zC=ny();function FC(e){return zC.cloneDeepWith(e)}i(FC,"cloneDeep");iy.cloneDeep=FC});var ly=X(oy=>{var WC=ja();function VC(e){return e!==null&&typeof e=="object"&&WC.getTag(e)==="[object Arguments]"}i(VC,"isArguments");oy.isArguments=VC});var uy=X(sy=>{var qC=tf(),$C=il(),KC=uf(),UC=ly();function HC(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&qC.isDeepKey(t)&&e?.[t]==null?r=$C.toPath(t):r=[t],r.length===0)return!1;let n=e;for(let a=0;a<r.length;a++){let o=r[a];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||UC.isArguments(n))&&KC.isIndex(o)&&o<n.length))return!1;n=n[o]}return!0}i(HC,"has");sy.has=HC});var fy=X(cy=>{var YC=nl(),GC=al(),XC=xf(),ZC=ay(),QC=uy();function JC(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=YC.toKey(e);break}return t=ZC.cloneDeep(t),function(r){let n=GC.get(r,e);return n===void 0?QC.has(r,e):t===void 0?n===void 0:XC.isMatch(n,t)}}i(JC,"matchesProperty");cy.matchesProperty=JC});var py=X(dy=>{var ek=pf(),tk=Nv(),rk=ty(),nk=fy();function ik(e){if(e==null)return ek.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?nk.matchesProperty(e[0],e[1]):rk.matches(e);case"string":case"symbol":case"number":return tk.property(e)}}i(ik,"iteratee");dy.iteratee=ik});var hy=X(my=>{function ak(e){return typeof e=="object"&&e!==null}i(ak,"isObjectLike");my.isObjectLike=ak});var yy=X(vy=>{var ok=lf(),lk=hy();function sk(e){return lk.isObjectLike(e)&&ok.isArrayLike(e)}i(sk,"isArrayLikeObject");vy.isArrayLikeObject=sk});var xy=X(gy=>{var uk=_v(),ck=Dv(),fk=pf(),dk=py(),pk=yy();function mk(e,t=fk.identity){return pk.isArrayLikeObject(e)?uk.uniqBy(Array.from(e),ck.ary(dk.iteratee(t),1)):[]}i(mk,"uniqBy");gy.uniqBy=mk});var Ay=X((TU,by)=>{by.exports=xy().uniqBy});var xb=X(gb=>{var uD=ff();function cD(e){return uD.isSymbol(e)?NaN:Number(e)}i(cD,"toNumber");gb.toNumber=cD});var Ab=X(bb=>{var fD=xb();function dD(e){return e?(e=fD.toNumber(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}i(dD,"toFinite");bb.toFinite=dD});var Sb=X(wb=>{var yd=Ab(),pD=cf();function mD(e,t,r){r&&typeof r!="number"&&pD.isIterateeCall(e,t,r)&&(t=r=void 0),e=yd.toFinite(e),t===void 0?(t=e,e=0):t=yd.toFinite(t),r=r===void 0?e<t?1:-1:yd.toFinite(r);let n=Math.max(Math.ceil((t-e)/(r||1)),0),a=new Array(n);for(let o=0;o<n;o++)a[o]=e,e+=r;return a}i(mD,"range");wb.range=mD});var Ob=X((TX,Pb)=>{Pb.exports=Sb().range});var bd=X((Tb,Cs)=>{(function(e){"use strict";var t=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},n=!0,a="[DecimalError] ",o=a+"Invalid argument: ",l=a+"Exponent out of range: ",s=Math.floor,u=Math.pow,c=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f,d=1e7,p=7,m=9007199254740991,h=s(m/p),v={};v.absoluteValue=v.abs=function(){var b=new this.constructor(this);return b.s&&(b.s=1),b},v.comparedTo=v.cmp=function(b){var S,k,O,I,C=this;if(b=new C.constructor(b),C.s!==b.s)return C.s||-b.s;if(C.e!==b.e)return C.e>b.e^C.s<0?1:-1;for(O=C.d.length,I=b.d.length,S=0,k=O<I?O:I;S<k;++S)if(C.d[S]!==b.d[S])return C.d[S]>b.d[S]^C.s<0?1:-1;return O===I?0:O>I^C.s<0?1:-1},v.decimalPlaces=v.dp=function(){var b=this,S=b.d.length-1,k=(S-b.e)*p;if(S=b.d[S],S)for(;S%10==0;S/=10)k--;return k<0?0:k},v.dividedBy=v.div=function(b){return A(this,new this.constructor(b))},v.dividedToIntegerBy=v.idiv=function(b){var S=this,k=S.constructor;return R(A(S,new k(b),0,1),k.precision)},v.equals=v.eq=function(b){return!this.cmp(b)},v.exponent=function(){return E(this)},v.greaterThan=v.gt=function(b){return this.cmp(b)>0},v.greaterThanOrEqualTo=v.gte=function(b){return this.cmp(b)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return this.s===0},v.lessThan=v.lt=function(b){return this.cmp(b)<0},v.lessThanOrEqualTo=v.lte=function(b){return this.cmp(b)<1},v.logarithm=v.log=function(b){var S,k=this,O=k.constructor,I=O.precision,C=I+5;if(b===void 0)b=new O(10);else if(b=new O(b),b.s<1||b.eq(f))throw Error(a+"NaN");if(k.s<1)throw Error(a+(k.s?"NaN":"-Infinity"));return k.eq(f)?new O(0):(n=!1,S=A(D(k,C),D(b,C),C),n=!0,R(S,I))},v.minus=v.sub=function(b){var S=this;return b=new S.constructor(b),S.s==b.s?V(S,b):g(S,(b.s=-b.s,b))},v.modulo=v.mod=function(b){var S,k=this,O=k.constructor,I=O.precision;if(b=new O(b),!b.s)throw Error(a+"NaN");return k.s?(n=!1,S=A(k,b,0,1).times(b),n=!0,k.minus(S)):R(new O(k),I)},v.naturalExponential=v.exp=function(){return P(this)},v.naturalLogarithm=v.ln=function(){return D(this)},v.negated=v.neg=function(){var b=new this.constructor(this);return b.s=-b.s||0,b},v.plus=v.add=function(b){var S=this;return b=new S.constructor(b),S.s==b.s?g(S,b):V(S,(b.s=-b.s,b))},v.precision=v.sd=function(b){var S,k,O,I=this;if(b!==void 0&&b!==!!b&&b!==1&&b!==0)throw Error(o+b);if(S=E(I)+1,O=I.d.length-1,k=O*p+1,O=I.d[O],O){for(;O%10==0;O/=10)k--;for(O=I.d[0];O>=10;O/=10)k++}return b&&S>k?S:k},v.squareRoot=v.sqrt=function(){var b,S,k,O,I,C,j,N=this,W=N.constructor;if(N.s<1){if(!N.s)return new W(0);throw Error(a+"NaN")}for(b=E(N),n=!1,I=Math.sqrt(+N),I==0||I==1/0?(S=w(N.d),(S.length+b)%2==0&&(S+="0"),I=Math.sqrt(S),b=s((b+1)/2)-(b<0||b%2),I==1/0?S="5e"+b:(S=I.toExponential(),S=S.slice(0,S.indexOf("e")+1)+b),O=new W(S)):O=new W(I.toString()),k=W.precision,I=j=k+3;;)if(C=O,O=C.plus(A(N,C,j+2)).times(.5),w(C.d).slice(0,j)===(S=w(O.d)).slice(0,j)){if(S=S.slice(j-3,j+1),I==j&&S=="4999"){if(R(C,k+1,0),C.times(C).eq(N)){O=C;break}}else if(S!="9999")break;j+=4}return n=!0,R(O,k)},v.times=v.mul=function(b){var S,k,O,I,C,j,N,W,Y,U=this,G=U.constructor,Re=U.d,F=(b=new G(b)).d;if(!U.s||!b.s)return new G(0);for(b.s*=U.s,k=U.e+b.e,W=Re.length,Y=F.length,W<Y&&(C=Re,Re=F,F=C,j=W,W=Y,Y=j),C=[],j=W+Y,O=j;O--;)C.push(0);for(O=Y;--O>=0;){for(S=0,I=W+O;I>O;)N=C[I]+F[O]*Re[I-O-1]+S,C[I--]=N%d|0,S=N/d|0;C[I]=(C[I]+S)%d|0}for(;!C[--j];)C.pop();return S?++k:C.shift(),b.d=C,b.e=k,n?R(b,G.precision):b},v.toDecimalPlaces=v.todp=function(b,S){var k=this,O=k.constructor;return k=new O(k),b===void 0?k:(y(b,0,t),S===void 0?S=O.rounding:y(S,0,8),R(k,b+E(k)+1,S))},v.toExponential=function(b,S){var k,O=this,I=O.constructor;return b===void 0?k=B(O,!0):(y(b,0,t),S===void 0?S=I.rounding:y(S,0,8),O=R(new I(O),b+1,S),k=B(O,!0,b+1)),k},v.toFixed=function(b,S){var k,O,I=this,C=I.constructor;return b===void 0?B(I):(y(b,0,t),S===void 0?S=C.rounding:y(S,0,8),O=R(new C(I),b+E(I)+1,S),k=B(O.abs(),!1,b+E(O)+1),I.isneg()&&!I.isZero()?"-"+k:k)},v.toInteger=v.toint=function(){var b=this,S=b.constructor;return R(new S(b),E(b)+1,S.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(b){var S,k,O,I,C,j,N=this,W=N.constructor,Y=12,U=+(b=new W(b));if(!b.s)return new W(f);if(N=new W(N),!N.s){if(b.s<1)throw Error(a+"Infinity");return N}if(N.eq(f))return N;if(O=W.precision,b.eq(f))return R(N,O);if(S=b.e,k=b.d.length-1,j=S>=k,C=N.s,j){if((k=U<0?-U:U)<=m){for(I=new W(f),S=Math.ceil(O/p+4),n=!1;k%2&&(I=I.times(N),Q(I.d,S)),k=s(k/2),k!==0;)N=N.times(N),Q(N.d,S);return n=!0,b.s<0?new W(f).div(I):R(I,O)}}else if(C<0)throw Error(a+"NaN");return C=C<0&&b.d[Math.max(S,k)]&1?-1:1,N.s=1,n=!1,I=b.times(D(N,O+Y)),n=!0,I=P(I),I.s=C,I},v.toPrecision=function(b,S){var k,O,I=this,C=I.constructor;return b===void 0?(k=E(I),O=B(I,k<=C.toExpNeg||k>=C.toExpPos)):(y(b,1,t),S===void 0?S=C.rounding:y(S,0,8),I=R(new C(I),b,S),k=E(I),O=B(I,b<=k||k<=C.toExpNeg,b)),O},v.toSignificantDigits=v.tosd=function(b,S){var k=this,O=k.constructor;return b===void 0?(b=O.precision,S=O.rounding):(y(b,1,t),S===void 0?S=O.rounding:y(S,0,8)),R(new O(k),b,S)},v.toString=v.valueOf=v.val=v.toJSON=function(){var b=this,S=E(b),k=b.constructor;return B(b,S<=k.toExpNeg||S>=k.toExpPos)};function g(b,S){var k,O,I,C,j,N,W,Y,U=b.constructor,G=U.precision;if(!b.s||!S.s)return S.s||(S=new U(b)),n?R(S,G):S;if(W=b.d,Y=S.d,j=b.e,I=S.e,W=W.slice(),C=j-I,C){for(C<0?(O=W,C=-C,N=Y.length):(O=Y,I=j,N=W.length),j=Math.ceil(G/p),N=j>N?j+1:N+1,C>N&&(C=N,O.length=1),O.reverse();C--;)O.push(0);O.reverse()}for(N=W.length,C=Y.length,N-C<0&&(C=N,O=Y,Y=W,W=O),k=0;C;)k=(W[--C]=W[C]+Y[C]+k)/d|0,W[C]%=d;for(k&&(W.unshift(k),++I),N=W.length;W[--N]==0;)W.pop();return S.d=W,S.e=I,n?R(S,G):S}i(g,"add");function y(b,S,k){if(b!==~~b||b<S||b>k)throw Error(o+b)}i(y,"checkInt32");function w(b){var S,k,O,I=b.length-1,C="",j=b[0];if(I>0){for(C+=j,S=1;S<I;S++)O=b[S]+"",k=p-O.length,k&&(C+=_(k)),C+=O;j=b[S],O=j+"",k=p-O.length,k&&(C+=_(k))}else if(j===0)return"0";for(;j%10===0;)j/=10;return C+j}i(w,"digitsToString");var A=(function(){function b(O,I){var C,j=0,N=O.length;for(O=O.slice();N--;)C=O[N]*I+j,O[N]=C%d|0,j=C/d|0;return j&&O.unshift(j),O}i(b,"multiplyInteger");function S(O,I,C,j){var N,W;if(C!=j)W=C>j?1:-1;else for(N=W=0;N<C;N++)if(O[N]!=I[N]){W=O[N]>I[N]?1:-1;break}return W}i(S,"compare");function k(O,I,C){for(var j=0;C--;)O[C]-=j,j=O[C]<I[C]?1:0,O[C]=j*d+O[C]-I[C];for(;!O[0]&&O.length>1;)O.shift()}return i(k,"subtract"),function(O,I,C,j){var N,W,Y,U,G,Re,F,ne,H,L,qe,ue,te,rt,Ft,di,ar,el,tl=O.constructor,GE=O.s==I.s?1:-1,hr=O.d,Ye=I.d;if(!O.s)return new tl(O);if(!I.s)throw Error(a+"Division by zero");for(W=O.e-I.e,ar=Ye.length,Ft=hr.length,F=new tl(GE),ne=F.d=[],Y=0;Ye[Y]==(hr[Y]||0);)++Y;if(Ye[Y]>(hr[Y]||0)&&--W,C==null?ue=C=tl.precision:j?ue=C+(E(O)-E(I))+1:ue=C,ue<0)return new tl(0);if(ue=ue/p+2|0,Y=0,ar==1)for(U=0,Ye=Ye[0],ue++;(Y<Ft||U)&&ue--;Y++)te=U*d+(hr[Y]||0),ne[Y]=te/Ye|0,U=te%Ye|0;else{for(U=d/(Ye[0]+1)|0,U>1&&(Ye=b(Ye,U),hr=b(hr,U),ar=Ye.length,Ft=hr.length),rt=ar,H=hr.slice(0,ar),L=H.length;L<ar;)H[L++]=0;el=Ye.slice(),el.unshift(0),di=Ye[0],Ye[1]>=d/2&&++di;do U=0,N=S(Ye,H,ar,L),N<0?(qe=H[0],ar!=L&&(qe=qe*d+(H[1]||0)),U=qe/di|0,U>1?(U>=d&&(U=d-1),G=b(Ye,U),Re=G.length,L=H.length,N=S(G,H,Re,L),N==1&&(U--,k(G,ar<Re?el:Ye,Re))):(U==0&&(N=U=1),G=Ye.slice()),Re=G.length,Re<L&&G.unshift(0),k(H,G,L),N==-1&&(L=H.length,N=S(Ye,H,ar,L),N<1&&(U++,k(H,ar<L?el:Ye,L))),L=H.length):N===0&&(U++,H=[0]),ne[Y++]=U,N&&H[0]?H[L++]=hr[rt]||0:(H=[hr[rt]],L=1);while((rt++<Ft||H[0]!==void 0)&&ue--)}return ne[0]||ne.shift(),F.e=W,R(F,j?C+E(F)+1:C)}})();function P(b,S){var k,O,I,C,j,N,W=0,Y=0,U=b.constructor,G=U.precision;if(E(b)>16)throw Error(l+E(b));if(!b.s)return new U(f);for(S==null?(n=!1,N=G):N=S,j=new U(.03125);b.abs().gte(.1);)b=b.times(j),Y+=5;for(O=Math.log(u(2,Y))/Math.LN10*2+5|0,N+=O,k=I=C=new U(f),U.precision=N;;){if(I=R(I.times(b),N),k=k.times(++W),j=C.plus(A(I,k,N)),w(j.d).slice(0,N)===w(C.d).slice(0,N)){for(;Y--;)C=R(C.times(C),N);return U.precision=G,S==null?(n=!0,R(C,G)):C}C=j}}i(P,"exp");function E(b){for(var S=b.e*p,k=b.d[0];k>=10;k/=10)S++;return S}i(E,"getBase10Exponent");function x(b,S,k){if(S>b.LN10.sd())throw n=!0,k&&(b.precision=k),Error(a+"LN10 precision limit exceeded");return R(new b(b.LN10),S)}i(x,"getLn10");function _(b){for(var S="";b--;)S+="0";return S}i(_,"getZeroString");function D(b,S){var k,O,I,C,j,N,W,Y,U,G=1,Re=10,F=b,ne=F.d,H=F.constructor,L=H.precision;if(F.s<1)throw Error(a+(F.s?"NaN":"-Infinity"));if(F.eq(f))return new H(0);if(S==null?(n=!1,Y=L):Y=S,F.eq(10))return S==null&&(n=!0),x(H,Y);if(Y+=Re,H.precision=Y,k=w(ne),O=k.charAt(0),C=E(F),Math.abs(C)<15e14){for(;O<7&&O!=1||O==1&&k.charAt(1)>3;)F=F.times(b),k=w(F.d),O=k.charAt(0),G++;C=E(F),O>1?(F=new H("0."+k),C++):F=new H(O+"."+k.slice(1))}else return W=x(H,Y+2,L).times(C+""),F=D(new H(O+"."+k.slice(1)),Y-Re).plus(W),H.precision=L,S==null?(n=!0,R(F,L)):F;for(N=j=F=A(F.minus(f),F.plus(f),Y),U=R(F.times(F),Y),I=3;;){if(j=R(j.times(U),Y),W=N.plus(A(j,new H(I),Y)),w(W.d).slice(0,Y)===w(N.d).slice(0,Y))return N=N.times(2),C!==0&&(N=N.plus(x(H,Y+2,L).times(C+""))),N=A(N,new H(G),Y),H.precision=L,S==null?(n=!0,R(N,L)):N;N=W,I+=2}}i(D,"ln");function $(b,S){var k,O,I;for((k=S.indexOf("."))>-1&&(S=S.replace(".","")),(O=S.search(/e/i))>0?(k<0&&(k=O),k+=+S.slice(O+1),S=S.substring(0,O)):k<0&&(k=S.length),O=0;S.charCodeAt(O)===48;)++O;for(I=S.length;S.charCodeAt(I-1)===48;)--I;if(S=S.slice(O,I),S){if(I-=O,k=k-O-1,b.e=s(k/p),b.d=[],O=(k+1)%p,k<0&&(O+=p),O<I){for(O&&b.d.push(+S.slice(0,O)),I-=p;O<I;)b.d.push(+S.slice(O,O+=p));S=S.slice(O),O=p-S.length}else O-=I;for(;O--;)S+="0";if(b.d.push(+S),n&&(b.e>h||b.e<-h))throw Error(l+k)}else b.s=0,b.e=0,b.d=[0];return b}i($,"parseDecimal");function R(b,S,k){var O,I,C,j,N,W,Y,U,G=b.d;for(j=1,C=G[0];C>=10;C/=10)j++;if(O=S-j,O<0)O+=p,I=S,Y=G[U=0];else{if(U=Math.ceil((O+1)/p),C=G.length,U>=C)return b;for(Y=C=G[U],j=1;C>=10;C/=10)j++;O%=p,I=O-p+j}if(k!==void 0&&(C=u(10,j-I-1),N=Y/C%10|0,W=S<0||G[U+1]!==void 0||Y%C,W=k<4?(N||W)&&(k==0||k==(b.s<0?3:2)):N>5||N==5&&(k==4||W||k==6&&(O>0?I>0?Y/u(10,j-I):0:G[U-1])%10&1||k==(b.s<0?8:7))),S<1||!G[0])return W?(C=E(b),G.length=1,S=S-C-1,G[0]=u(10,(p-S%p)%p),b.e=s(-S/p)||0):(G.length=1,G[0]=b.e=b.s=0),b;if(O==0?(G.length=U,C=1,U--):(G.length=U+1,C=u(10,p-O),G[U]=I>0?(Y/u(10,j-I)%u(10,I)|0)*C:0),W)for(;;)if(U==0){(G[0]+=C)==d&&(G[0]=1,++b.e);break}else{if(G[U]+=C,G[U]!=d)break;G[U--]=0,C=1}for(O=G.length;G[--O]===0;)G.pop();if(n&&(b.e>h||b.e<-h))throw Error(l+E(b));return b}i(R,"round");function V(b,S){var k,O,I,C,j,N,W,Y,U,G,Re=b.constructor,F=Re.precision;if(!b.s||!S.s)return S.s?S.s=-S.s:S=new Re(b),n?R(S,F):S;if(W=b.d,G=S.d,O=S.e,Y=b.e,W=W.slice(),j=Y-O,j){for(U=j<0,U?(k=W,j=-j,N=G.length):(k=G,O=Y,N=W.length),I=Math.max(Math.ceil(F/p),N)+2,j>I&&(j=I,k.length=1),k.reverse(),I=j;I--;)k.push(0);k.reverse()}else{for(I=W.length,N=G.length,U=I<N,U&&(N=I),I=0;I<N;I++)if(W[I]!=G[I]){U=W[I]<G[I];break}j=0}for(U&&(k=W,W=G,G=k,S.s=-S.s),N=W.length,I=G.length-N;I>0;--I)W[N++]=0;for(I=G.length;I>j;){if(W[--I]<G[I]){for(C=I;C&&W[--C]===0;)W[C]=d-1;--W[C],W[I]+=d}W[I]-=G[I]}for(;W[--N]===0;)W.pop();for(;W[0]===0;W.shift())--O;return W[0]?(S.d=W,S.e=O,n?R(S,F):S):new Re(0)}i(V,"subtract");function B(b,S,k){var O,I=E(b),C=w(b.d),j=C.length;return S?(k&&(O=k-j)>0?C=C.charAt(0)+"."+C.slice(1)+_(O):j>1&&(C=C.charAt(0)+"."+C.slice(1)),C=C+(I<0?"e":"e+")+I):I<0?(C="0."+_(-I-1)+C,k&&(O=k-j)>0&&(C+=_(O))):I>=j?(C+=_(I+1-j),k&&(O=k-I-1)>0&&(C=C+"."+_(O))):((O=I+1)<j&&(C=C.slice(0,O)+"."+C.slice(O)),k&&(O=k-j)>0&&(I+1===j&&(C+="."),C+=_(O))),b.s<0?"-"+C:C}i(B,"toString");function Q(b,S){if(b.length>S)return b.length=S,!0}i(Q,"truncate");function Z(b){var S,k,O;function I(C){var j=this;if(!(j instanceof I))return new I(C);if(j.constructor=I,C instanceof I){j.s=C.s,j.e=C.e,j.d=(C=C.d)?C.slice():C;return}if(typeof C=="number"){if(C*0!==0)throw Error(o+C);if(C>0)j.s=1;else if(C<0)C=-C,j.s=-1;else{j.s=0,j.e=0,j.d=[0];return}if(C===~~C&&C<1e7){j.e=0,j.d=[C];return}return $(j,C.toString())}else if(typeof C!="string")throw Error(o+C);if(C.charCodeAt(0)===45?(C=C.slice(1),j.s=-1):j.s=1,c.test(C))$(j,C);else throw Error(o+C)}if(i(I,"Decimal"),I.prototype=v,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.clone=Z,I.config=I.set=J,b===void 0&&(b={}),b)for(O=["precision","rounding","toExpNeg","toExpPos","LN10"],S=0;S<O.length;)b.hasOwnProperty(k=O[S++])||(b[k]=this[k]);return I.config(b),I}i(Z,"clone");function J(b){if(!b||typeof b!="object")throw Error(a+"Object expected");var S,k,O,I=["precision",1,t,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(S=0;S<I.length;S+=3)if((O=b[k=I[S]])!==void 0)if(s(O)===O&&O>=I[S+1]&&O<=I[S+2])this[k]=O;else throw Error(o+k+": "+O);if((O=b[k="LN10"])!==void 0)if(O==Math.LN10)this[k]=new this(O);else throw Error(o+k+": "+O);return this}i(J,"config"),r=Z(r),r.default=r.Decimal=r,f=new r(1),typeof define=="function"&&define.amd?define(function(){return r}):typeof Cs<"u"&&Cs.exports?Cs.exports=r:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),e.Decimal=r)})(Tb)});var aw=X((bee,um)=>{"use strict";var Fj=Object.prototype.hasOwnProperty,St="~";function Io(){}i(Io,"Events");Object.create&&(Io.prototype=Object.create(null),new Io().__proto__||(St=!1));function Wj(e,t,r){this.fn=e,this.context=t,this.once=r||!1}i(Wj,"EE");function iw(e,t,r,n,a){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new Wj(r,n||e,a),l=St?St+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}i(iw,"addListener");function Hu(e,t){--e._eventsCount===0?e._events=new Io:delete e._events[t]}i(Hu,"clearEvent");function mt(){this._events=new Io,this._eventsCount=0}i(mt,"EventEmitter");mt.prototype.eventNames=i(function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)Fj.call(r,n)&&t.push(St?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t},"eventNames");mt.prototype.listeners=i(function(t){var r=St?St+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,o=n.length,l=new Array(o);a<o;a++)l[a]=n[a].fn;return l},"listeners");mt.prototype.listenerCount=i(function(t){var r=St?St+t:t,n=this._events[r];return n?n.fn?1:n.length:0},"listenerCount");mt.prototype.emit=i(function(t,r,n,a,o,l){var s=St?St+t:t;if(!this._events[s])return!1;var u=this._events[s],c=arguments.length,f,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,a),!0;case 5:return u.fn.call(u.context,r,n,a,o),!0;case 6:return u.fn.call(u.context,r,n,a,o,l),!0}for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];u.fn.apply(u.context,f)}else{var p=u.length,m;for(d=0;d<p;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,r);break;case 3:u[d].fn.call(u[d].context,r,n);break;case 4:u[d].fn.call(u[d].context,r,n,a);break;default:if(!f)for(m=1,f=new Array(c-1);m<c;m++)f[m-1]=arguments[m];u[d].fn.apply(u[d].context,f)}}return!0},"emit");mt.prototype.on=i(function(t,r,n){return iw(this,t,r,n,!1)},"on");mt.prototype.once=i(function(t,r,n){return iw(this,t,r,n,!0)},"once");mt.prototype.removeListener=i(function(t,r,n,a){var o=St?St+t:t;if(!this._events[o])return this;if(!r)return Hu(this,o),this;var l=this._events[o];if(l.fn)l.fn===r&&(!a||l.once)&&(!n||l.context===n)&&Hu(this,o);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==r||a&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[o]=u.length===1?u[0]:u:Hu(this,o)}return this},"removeListener");mt.prototype.removeAllListeners=i(function(t){var r;return t?(r=St?St+t:t,this._events[r]&&Hu(this,r)):(this._events=new Io,this._eventsCount=0),this},"removeAllListeners");mt.prototype.off=mt.prototype.removeListener;mt.prototype.addListener=mt.prototype.on;mt.prefixed=St;mt.EventEmitter=mt;typeof um<"u"&&(um.exports=mt)});var Bw=X(Lw=>{function IL(){}i(IL,"noop");Lw.noop=IL});var Fw=X(zw=>{function CL(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}i(CL,"isPlainObject");zw.isPlainObject=CL});var Uw=X(Kw=>{var Ww=hf(),Vw=ja(),Ce=fl(),qw=vf(),$w=Fw(),kL=Da();sl();function _L(e,t,r){return _o(e,t,void 0,void 0,void 0,void 0,r)}i(_L,"isEqualWith");function _o(e,t,r,n,a,o,l){let s=l(e,t,r,n,a,o);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return To(e,t,o,l)}return To(e,t,o,l)}i(_o,"isEqualWithImpl");function To(e,t,r,n){if(Object.is(e,t))return!0;let a=Vw.getTag(e),o=Vw.getTag(t);if(a==="[object Arguments]"&&(a=Ce.objectTag),o==="[object Arguments]"&&(o=Ce.objectTag),a!==o)return!1;switch(a){case Ce.stringTag:return e.toString()===t.toString();case Ce.numberTag:{let u=e.valueOf(),c=t.valueOf();return kL.isEqualsSameValueZero(u,c)}case Ce.booleanTag:case Ce.dateTag:case Ce.symbolTag:return Object.is(e.valueOf(),t.valueOf());case Ce.regexpTag:return e.source===t.source&&e.flags===t.flags;case Ce.functionTag:return e===t}r=r??new Map;let l=r.get(e),s=r.get(t);if(l!=null&&s!=null)return l===t;r.set(e,t),r.set(t,e);try{switch(a){case Ce.mapTag:if(e.size!==t.size)return!1;for(let[u,c]of e.entries())if(!t.has(u)||!_o(c,t.get(u),u,e,t,r,n))return!1;return!0;case Ce.setTag:{if(e.size!==t.size)return!1;let u=Array.from(e.values()),c=Array.from(t.values());for(let f=0;f<u.length;f++){let d=u[f],p=c.findIndex(m=>_o(d,m,void 0,e,t,r,n));if(p===-1)return!1;c.splice(p,1)}return!0}case Ce.arrayTag:case Ce.uint8ArrayTag:case Ce.uint8ClampedArrayTag:case Ce.uint16ArrayTag:case Ce.uint32ArrayTag:case Ce.bigUint64ArrayTag:case Ce.int8ArrayTag:case Ce.int16ArrayTag:case Ce.int32ArrayTag:case Ce.bigInt64ArrayTag:case Ce.float32ArrayTag:case Ce.float64ArrayTag:if(qw.isBuffer(e)!==qw.isBuffer(t)||e.length!==t.length)return!1;for(let u=0;u<e.length;u++)if(!_o(e[u],t[u],u,e,t,r,n))return!1;return!0;case Ce.arrayBufferTag:return e.byteLength!==t.byteLength?!1:To(new Uint8Array(e),new Uint8Array(t),r,n);case Ce.dataViewTag:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:To(new Uint8Array(e),new Uint8Array(t),r,n);case Ce.errorTag:return e.name===t.name&&e.message===t.message;case Ce.objectTag:{if(!(To(e.constructor,t.constructor,r,n)||$w.isPlainObject(e)&&$w.isPlainObject(t)))return!1;let u=[...Object.keys(e),...Ww.getSymbols(e)],c=[...Object.keys(t),...Ww.getSymbols(t)];if(u.length!==c.length)return!1;for(let f=0;f<u.length;f++){let d=u[f],p=e[d];if(!Object.hasOwn(t,d))return!1;let m=t[d];if(!_o(p,m,d,e,t,r,n))return!1}return!0}default:return!1}}finally{r.delete(e),r.delete(t)}}i(To,"areObjectsEqual");Kw.isEqualWith=_L});var Yw=X(Hw=>{var TL=Bw(),DL=Uw();function RL(e,t){return DL.isEqualWith(e,t,TL.noop)}i(RL,"isEqual");Hw.isEqual=RL});var Xw=X((Vte,Gw)=>{Gw.exports=Yw().isEqual});var KS=X(Pe=>{"use strict";var bm=Symbol.for("react.element"),Am=Symbol.for("react.portal"),uc=Symbol.for("react.fragment"),cc=Symbol.for("react.strict_mode"),fc=Symbol.for("react.profiler"),dc=Symbol.for("react.provider"),pc=Symbol.for("react.context"),bB=Symbol.for("react.server_context"),mc=Symbol.for("react.forward_ref"),hc=Symbol.for("react.suspense"),vc=Symbol.for("react.suspense_list"),yc=Symbol.for("react.memo"),gc=Symbol.for("react.lazy"),AB=Symbol.for("react.offscreen"),$S;$S=Symbol.for("react.module.reference");function Jt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bm:switch(e=e.type,e){case uc:case fc:case cc:case hc:case vc:return e;default:switch(e=e&&e.$$typeof,e){case bB:case pc:case mc:case gc:case yc:case dc:return e;default:return t}}case Am:return t}}}i(Jt,"v");Pe.ContextConsumer=pc;Pe.ContextProvider=dc;Pe.Element=bm;Pe.ForwardRef=mc;Pe.Fragment=uc;Pe.Lazy=gc;Pe.Memo=yc;Pe.Portal=Am;Pe.Profiler=fc;Pe.StrictMode=cc;Pe.Suspense=hc;Pe.SuspenseList=vc;Pe.isAsyncMode=function(){return!1};Pe.isConcurrentMode=function(){return!1};Pe.isContextConsumer=function(e){return Jt(e)===pc};Pe.isContextProvider=function(e){return Jt(e)===dc};Pe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bm};Pe.isForwardRef=function(e){return Jt(e)===mc};Pe.isFragment=function(e){return Jt(e)===uc};Pe.isLazy=function(e){return Jt(e)===gc};Pe.isMemo=function(e){return Jt(e)===yc};Pe.isPortal=function(e){return Jt(e)===Am};Pe.isProfiler=function(e){return Jt(e)===fc};Pe.isStrictMode=function(e){return Jt(e)===cc};Pe.isSuspense=function(e){return Jt(e)===hc};Pe.isSuspenseList=function(e){return Jt(e)===vc};Pe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===uc||e===fc||e===cc||e===hc||e===vc||e===AB||typeof e=="object"&&e!==null&&(e.$$typeof===gc||e.$$typeof===yc||e.$$typeof===dc||e.$$typeof===pc||e.$$typeof===mc||e.$$typeof===$S||e.getModuleId!==void 0)};Pe.typeOf=Jt});var HS=X((Vne,US)=>{"use strict";US.exports=KS()});var KP=X($P=>{"use strict";var $o=z();function Cz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(Cz,"is");var kz=typeof Object.is=="function"?Object.is:Cz,_z=$o.useSyncExternalStore,Tz=$o.useRef,Dz=$o.useEffect,Rz=$o.useMemo,Mz=$o.useDebugValue;$P.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var o=Tz(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=Rz(function(){function u(m){if(!c){if(c=!0,f=m,m=n(m),a!==void 0&&l.hasValue){var h=l.value;if(a(h,m))return d=h}return d=m}if(h=d,kz(f,m))return h;var v=n(m);return a!==void 0&&a(h,v)?(f=m,h):(f=m,d=v)}i(u,"memoizedSelector");var c=!1,f,d,p=r===void 0?null:r;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,r,n,a]);var s=_z(e,o[0],o[1]);return Dz(function(){l.hasValue=!0,l.value=s},[s]),Mz(s),s}});var HP=X((Yae,UP)=>{"use strict";UP.exports=KP()});var gn=M(z()),Ge=M(z()),Gh=M(Th());var qh=M(_a());var hI=4;function Wt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hI,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}i(Wt,"round");function Ze(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((a,o,l)=>{var s=r[l-1];return typeof s=="string"?a+s+o:s!==void 0?a+Wt(s)+o:a+o},"")}i(Ze,"roundTemplateLiteral");var je=i(e=>e===0?0:e>0?1:-1,"mathSign"),nt=i(e=>typeof e=="number"&&e!=+e,"isNan"),Or=i(e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,"isPercent"),q=i(e=>(typeof e=="number"||e instanceof Number)&&!nt(e),"isNumber"),it=i(e=>q(e)||typeof e=="string","isNumOrStr"),vI=0,Er=i(e=>{var t=++vI;return"".concat(e||"").concat(t)},"uniqueId"),lt=i(function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&typeof t!="string")return n;var o;if(Or(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return nt(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},"getPercentValue"),nf=i(e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1},"hasDuplicate");function we(e,t,r){return q(e)&&q(t)?Wt(e+r*(t-e)):t}i(we,"interpolate");function ol(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):(0,qh.default)(n,t))===r)}i(ol,"findEntryInArray");var ce=i(e=>e===null||typeof e>"u","isNullish"),hi=i(e=>ce(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),"upperFirst");function Qe(e){return e!=null}i(Qe,"isNotNil");function xt(){}i(xt,"noop");var yI=!0,vi=i(function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(yI&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>a[l++]))}},"warn");var or={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},af=i((e,t,r)=>{var n=r.width,a=n===void 0?or.width:n,o=r.height,l=o===void 0?or.height:o,s=r.aspect,u=r.maxHeight,c=Or(a)?e:Number(a),f=Or(l)?t:Number(l);return s&&s>0&&(c?f=c/s:f&&(c=f*s),u&&f!=null&&f>u&&(f=u)),{calculatedWidth:c,calculatedHeight:f}},"calculateChartDimensions"),gI={width:0,height:0,overflow:"visible"},xI={width:0,overflowX:"visible"},bI={height:0,overflowY:"visible"},AI={},$h=i(e=>{var t=e.width,r=e.height,n=Or(t),a=Or(r);return n&&a?gI:n?xI:a?bI:AI},"getInnerDivStyle");function Kh(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=or.width,o=or.height):a===void 0?a=n&&n>0?void 0:or.width:o===void 0&&(o=n&&n>0?void 0:or.height),{width:a,height:o}}i(Kh,"getDefaultWidthAndHeight");function ee(e){return Number.isFinite(e)}i(ee,"isWellBehavedNumber");function Ot(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}i(Ot,"isPositiveNumber");var wI=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(null,arguments)}i(ll,"_extends");function Uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}i(Uh,"ownKeys");function Hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(r),!0).forEach(function(n){SI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Hh,"_objectSpread");function SI(e,t,r){return(t=PI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(SI,"_defineProperty");function PI(e){var t=OI(e,"string");return typeof t=="symbol"?t:t+""}i(PI,"_toPropertyKey");function OI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(OI,"_toPrimitive");function EI(e,t){return _I(e)||kI(e,t)||CI(e,t)||II()}i(EI,"_slicedToArray");function II(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{c as wh,e as pi,f as mi,j as Sh}from"./chunk-AUGKHAMQ.js";import{a as bh,b as Ah}from"./chunk-WJRYEML4.js";import{b as JE}from"./chunk-SJQERRSZ.js";import{a as xh}from"./chunk-7Y3SY37W.js";import{d as rl}from"./chunk-35Q6XYRL.js";import{a as i,b as X,c as XE,d as M,e as z,f as ZE,g as QE,h as re,i as Xr}from"./chunk-I26MS5PJ.js";var Oh=X(Ph=>{function eI(e,t,{signal:r,edges:n}={}){let a,o=null,l=n!=null&&n.includes("leading"),s=n==null||n.includes("trailing"),u=i(()=>{o!==null&&(e.apply(a,o),a=void 0,o=null)},"invoke"),c=i(()=>{s&&u(),m()},"onTimerEnd"),f=null,d=i(()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,c()},t)},"schedule"),p=i(()=>{f!==null&&(clearTimeout(f),f=null)},"cancelTimer"),m=i(()=>{p(),a=void 0,o=null},"cancel"),h=i(()=>{u()},"flush"),v=i(function(...g){if(r?.aborted)return;a=this,o=g;let y=f==null;d(),l&&y&&u()},"debounced");return v.schedule=d,v.cancel=m,v.flush=h,r?.addEventListener("abort",m,{once:!0}),v}i(eI,"debounce");Ph.debounce=eI});var Ih=X(Eh=>{var tI=Oh();function rI(e,t=0,r={}){typeof r!="object"&&(r={});let{leading:n=!1,trailing:a=!0,maxWait:o}=r,l=Array(2);n&&(l[0]="leading"),a&&(l[1]="trailing");let s,u=null,c=tI.debounce(function(...p){s=e.apply(this,p),u=null},t,{edges:l}),f=i(function(...p){return o!=null&&(u===null&&(u=Date.now()),Date.now()-u>=o)?(s=e.apply(this,p),u=Date.now(),c.cancel(),c.schedule(),s):(c.apply(this,p),s)},"debounced"),d=i(()=>(c.flush(),s),"flush");return f.cancel=c.cancel,f.flush=d,f}i(rI,"debounce");Eh.debounce=rI});var kh=X(Ch=>{var nI=Ih();function iI(e,t=0,r={}){let{leading:n=!0,trailing:a=!0}=r;return nI.debounce(e,t,{leading:n,maxWait:t,trailing:a})}i(iI,"throttle");Ch.throttle=iI});var Th=X((m$,_h)=>{_h.exports=kh().throttle});var Rh=X(Dh=>{function aI(e){return e==="__proto__"}i(aI,"isUnsafeProperty");Dh.isUnsafeProperty=aI});var tf=X(Mh=>{function oI(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}i(oI,"isDeepKey");Mh.isDeepKey=oI});var nl=X(Nh=>{function lI(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}i(lI,"toKey");Nh.toKey=lI});var Bh=X(Lh=>{function jh(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(jh).join(",");let t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}i(jh,"toString");Lh.toString=jh});var il=X(zh=>{var sI=nl(),uI=Bh();function cI(e){if(Array.isArray(e))return e.map(sI.toKey);if(typeof e=="symbol")return[e];e=uI.toString(e);let t=[],r=e.length;if(r===0)return t;let n=0,a="",o="",l=!1;for(e.charCodeAt(0)===46&&(t.push(""),n++);n<r;){let s=e[n];o?s==="\\"&&n+1<r?(n++,a+=e[n]):s===o?o="":a+=s:l?s==='"'||s==="'"?o=s:s==="]"?(l=!1,t.push(a),a=""):a+=s:s==="["?(l=!0,a&&(t.push(a),a="")):s==="."?a&&(t.push(a),a=""):a+=s,n++}return a&&t.push(a),t}i(cI,"toPath");zh.toPath=cI});var al=X(Wh=>{var rf=Rh(),fI=tf(),dI=nl(),pI=il();function Fh(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(rf.isUnsafeProperty(t))return r;let n=e[t];return n===void 0?fI.isDeepKey(t)?Fh(e,pI.toPath(t),r):r:n}case"number":case"symbol":{typeof t=="number"&&(t=dI.toKey(t));let n=e[t];return n===void 0?r:n}default:{if(Array.isArray(t))return mI(e,t,r);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),rf.isUnsafeProperty(t))return r;let n=e[t];return n===void 0?r:n}}}i(Fh,"get");function mI(e,t,r){if(t.length===0)return r;let n=e;for(let a=0;a<t.length;a++){if(n==null||rf.isUnsafeProperty(t[a]))return r;n=n[t[a]]}return n===void 0?r:n}i(mI,"getWithPath");Wh.get=Fh});var _a=X((I$,Vh)=>{Vh.exports=al().get});var Jh=X(Qh=>{function NI(e,t=1){let r=[],n=Math.floor(t),a=i((o,l)=>{for(let s=0;s<o.length;s++){let u=o[s];Array.isArray(u)&&l<n?a(u,l+1):r.push(u)}},"recursive");return a(e,0),r}i(NI,"flatten");Qh.flatten=NI});var Da=X(ev=>{function jI(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}i(jI,"isEqualsSameValueZero");ev.isEqualsSameValueZero=jI});var sl=X(()=>{Da()});var rv=X(tv=>{function LI(e){return Number.isSafeInteger(e)&&e>=0}i(LI,"isLength");tv.isLength=LI});var lf=X(nv=>{var BI=rv();function zI(e){return e!=null&&typeof e!="function"&&BI.isLength(e.length)}i(zI,"isArrayLike");nv.isArrayLike=zI});var sf=X(iv=>{function FI(e){return e!==null&&(typeof e=="object"||typeof e=="function")}i(FI,"isObject");iv.isObject=FI});var uf=X(av=>{var WI=/^(?:0|[1-9]\d*)$/;function VI(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return WI.test(e)}}i(VI,"isIndex");av.isIndex=VI});var cf=X(ov=>{var qI=Da();sl();var $I=lf(),KI=sf(),UI=uf();function HI(e,t,r){return KI.isObject(r)&&(typeof t=="number"&&$I.isArrayLike(r)&&UI.isIndex(t)&&t<r.length||typeof t=="string"&&t in r)?qI.isEqualsSameValueZero(r[t],e):!1}i(HI,"isIterateeCall");ov.isIterateeCall=HI});var uv=X(sv=>{function lv(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}i(lv,"getPriority");var YI=i((e,t,r)=>{if(e!==t){let n=lv(e),a=lv(t);if(n===a&&n===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?a-n:n-a}return 0},"compareValues");sv.compareValues=YI});var ff=X(cv=>{function GI(e){return typeof e=="symbol"||e instanceof Symbol}i(GI,"isSymbol");cv.isSymbol=GI});var dv=X(fv=>{var XI=ff(),ZI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QI=/^\w*$/;function JI(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||XI.isSymbol(e)?!0:typeof e=="string"&&(QI.test(e)||!ZI.test(e))||t!=null&&Object.hasOwn(t,e)}i(JI,"isKey");fv.isKey=JI});var mv=X(pv=>{var e1=il(),t1=uv(),r1=dv();function n1(e,t,r,n){if(e==null)return[];r=n?void 0:r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(s=>String(s));let a=i((s,u)=>{let c=s;for(let f=0;f<u.length&&c!=null;++f)c=c[u[f]];return c},"getValueByNestedPath"),o=i((s,u)=>u==null||s==null?u:typeof s=="object"&&"key"in s?Object.hasOwn(u,s.key)?u[s.key]:a(u,s.path):typeof s=="function"?s(u):Array.isArray(s)?a(u,s):typeof u=="object"?u[s]:u,"getValueByCriterion"),l=t.map(s=>(Array.isArray(s)&&s.length===1&&(s=s[0]),s==null||typeof s=="function"||Array.isArray(s)||r1.isKey(s)?s:{key:s,path:e1.toPath(s)}));return e.map(s=>({original:s,criteria:l.map(u=>o(u,s))})).slice().sort((s,u)=>{for(let c=0;c<l.length;c++){let f=t1.compareValues(s.criteria[c],u.criteria[c],r[c]);if(f!==0)return f}return 0}).map(s=>s.original)}i(n1,"orderBy");pv.orderBy=n1});var yv=X(vv=>{var i1=Jh(),hv=cf(),a1=mv();function o1(e,...t){let r=t.length;return r>1&&hv.isIterateeCall(e,t[0],t[1])?t=[]:r>2&&hv.isIterateeCall(t[0],t[1],t[2])&&(t=[t[0]]),a1.orderBy(e,i1.flatten(t),["asc"])}i(o1,"sortBy");vv.sortBy=o1});var Ra=X((xK,gv)=>{gv.exports=yv().sortBy});var _v=X(kv=>{function j1(e,t){let r=new Map;for(let n=0;n<e.length;n++){let a=e[n],o=t(a,n,e);r.has(o)||r.set(o,a)}return Array.from(r.values())}i(j1,"uniqBy");kv.uniqBy=j1});var Dv=X(Tv=>{function L1(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}i(L1,"ary");Tv.ary=L1});var pf=X(Rv=>{function B1(e){return e}i(B1,"identity");Rv.identity=B1});var Nv=X(Mv=>{var z1=al();function F1(e){return function(t){return z1.get(t,e)}}i(F1,"property");Mv.property=F1});var mf=X(jv=>{function W1(e){return e==null||typeof e!="object"&&typeof e!="function"}i(W1,"isPrimitive");jv.isPrimitive=W1});var Bv=X(Lv=>{function V1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}i(V1,"isTypedArray");Lv.isTypedArray=V1});var hf=X(zv=>{function q1(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}i(q1,"getSymbols");zv.getSymbols=q1});var ja=X(Fv=>{function $1(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}i($1,"getTag");Fv.getTag=$1});var fl=X(Oe=>{var K1="[object RegExp]",U1="[object String]",H1="[object Number]",Y1="[object Boolean]",G1="[object Arguments]",X1="[object Symbol]",Z1="[object Date]",Q1="[object Map]",J1="[object Set]",eC="[object Array]",tC="[object Function]",rC="[object ArrayBuffer]",nC="[object Object]",iC="[object Error]",aC="[object DataView]",oC="[object Uint8Array]",lC="[object Uint8ClampedArray]",sC="[object Uint16Array]",uC="[object Uint32Array]",cC="[object BigUint64Array]",fC="[object Int8Array]",dC="[object Int16Array]",pC="[object Int32Array]",mC="[object BigInt64Array]",hC="[object Float32Array]",vC="[object Float64Array]";Oe.argumentsTag=G1;Oe.arrayBufferTag=rC;Oe.arrayTag=eC;Oe.bigInt64ArrayTag=mC;Oe.bigUint64ArrayTag=cC;Oe.booleanTag=Y1;Oe.dataViewTag=aC;Oe.dateTag=Z1;Oe.errorTag=iC;Oe.float32ArrayTag=hC;Oe.float64ArrayTag=vC;Oe.functionTag=tC;Oe.int16ArrayTag=dC;Oe.int32ArrayTag=pC;Oe.int8ArrayTag=fC;Oe.mapTag=Q1;Oe.numberTag=H1;Oe.objectTag=nC;Oe.regexpTag=K1;Oe.setTag=J1;Oe.stringTag=U1;Oe.symbolTag=X1;Oe.uint16ArrayTag=sC;Oe.uint32ArrayTag=uC;Oe.uint8ArrayTag=oC;Oe.uint8ClampedArrayTag=lC});var Vv=X(Wv=>{var yC=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();Wv.globalThis_=yC});var vf=X($v=>{var qv=Vv();function gC(e){return typeof qv.globalThis_.Buffer<"u"&&qv.globalThis_.Buffer.isBuffer(e)}i(gC,"isBuffer");$v.isBuffer=gC});var yf=X(dl=>{var xC=mf(),bC=Bv(),AC=hf(),wC=ja(),Le=fl(),SC=vf();function PC(e,t){return xn(e,void 0,e,new Map,t)}i(PC,"cloneDeepWith");function xn(e,t,r,n=new Map,a=void 0){let o=a?.(e,t,r,n);if(o!==void 0)return o;if(xC.isPrimitive(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let l=new Array(e.length);n.set(e,l);for(let s=0;s<e.length;s++)l[s]=xn(e[s],s,r,n,a);return Object.hasOwn(e,"index")&&(l.index=e.index),Object.hasOwn(e,"input")&&(l.input=e.input),l}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let l=new RegExp(e.source,e.flags);return l.lastIndex=e.lastIndex,l}if(e instanceof Map){let l=new Map;n.set(e,l);for(let[s,u]of e)l.set(s,xn(u,s,r,n,a));return l}if(e instanceof Set){let l=new Set;n.set(e,l);for(let s of e)l.add(xn(s,void 0,r,n,a));return l}if(SC.isBuffer(e))return e.subarray();if(bC.isTypedArray(e)){let l=new(Object.getPrototypeOf(e)).constructor(e.length);n.set(e,l);for(let s=0;s<e.length;s++)l[s]=xn(e[s],s,r,n,a);return l}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let l=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof File<"u"&&e instanceof File){let l=new File([e],e.name,{type:e.type});return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof Blob<"u"&&e instanceof Blob){let l=new Blob([e],{type:e.type});return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof Error){let l=structuredClone(e);return n.set(e,l),l.message=e.message,l.name=e.name,l.stack=e.stack,l.cause=e.cause,l.constructor=e.constructor,Ir(l,e,r,n,a),l}if(e instanceof Boolean){let l=new Boolean(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof Number){let l=new Number(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(e instanceof String){let l=new String(e.valueOf());return n.set(e,l),Ir(l,e,r,n,a),l}if(typeof e=="object"&&OC(e)){let l=Object.create(Object.getPrototypeOf(e));return n.set(e,l),Ir(l,e,r,n,a),l}return e}i(xn,"cloneDeepWithImpl");function Ir(e,t,r=e,n,a){let o=[...Object.keys(t),...AC.getSymbols(t)];for(let l=0;l<o.length;l++){let s=o[l],u=Object.getOwnPropertyDescriptor(e,s);(u==null||u.writable)&&(e[s]=xn(t[s],s,r,n,a))}}i(Ir,"copyProperties");function OC(e){switch(wC.getTag(e)){case Le.argumentsTag:case Le.arrayTag:case Le.arrayBufferTag:case Le.dataViewTag:case Le.booleanTag:case Le.dateTag:case Le.float32ArrayTag:case Le.float64ArrayTag:case Le.int8ArrayTag:case Le.int16ArrayTag:case Le.int32ArrayTag:case Le.mapTag:case Le.numberTag:case Le.objectTag:case Le.regexpTag:case Le.setTag:case Le.stringTag:case Le.symbolTag:case Le.uint8ArrayTag:case Le.uint8ClampedArrayTag:case Le.uint16ArrayTag:case Le.uint32ArrayTag:return!0;default:return!1}}i(OC,"isCloneableObject");dl.cloneDeepWith=PC;dl.cloneDeepWithImpl=xn;dl.copyProperties=Ir});var Uv=X(Kv=>{var EC=yf();function IC(e){return EC.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}i(IC,"cloneDeep");Kv.cloneDeep=IC});var Qv=X(Zv=>{var Hv=mf(),Yv=Da();sl();var CC=sf();function Gv(e,t,r){return typeof r!="function"?Gv(e,t,()=>{}):gf(e,t,i(function n(a,o,l,s,u,c){let f=r(a,o,l,s,u,c);return f!==void 0?!!f:gf(a,o,n,c)},"doesMatch"),new Map)}i(Gv,"isMatchWith");function gf(e,t,r,n){if(t===e)return!0;switch(typeof t){case"object":return kC(e,t,r,n);case"function":return Object.keys(t).length>0?gf(e,{...t},r,n):Yv.isEqualsSameValueZero(e,t);default:return CC.isObject(e)?typeof t=="string"?t==="":!0:Yv.isEqualsSameValueZero(e,t)}}i(gf,"isMatchWithInternal");function kC(e,t,r,n){if(t==null)return!0;if(Array.isArray(t))return Xv(e,t,r,n);if(t instanceof Map)return _C(e,t,r,n);if(t instanceof Set)return TC(e,t,r,n);let a=Object.keys(t);if(e==null||Hv.isPrimitive(e))return a.length===0;if(a.length===0)return!0;if(n?.has(t))return n.get(t)===e;n?.set(t,e);try{for(let o=0;o<a.length;o++){let l=a[o];if(!Hv.isPrimitive(e)&&!(l in e)||t[l]===void 0&&e[l]!==void 0||t[l]===null&&e[l]!==null||!r(e[l],t[l],l,e,t,n))return!1}return!0}finally{n?.delete(t)}}i(kC,"isObjectMatch");function _C(e,t,r,n){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[a,o]of t.entries())if(r(e.get(a),o,a,e,t,n)===!1)return!1;return!0}i(_C,"isMapMatch");function Xv(e,t,r,n){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let a=new Set;for(let o=0;o<t.length;o++){let l=t[o],s=!1;for(let u=0;u<e.length;u++){if(a.has(u))continue;let c=e[u],f=!1;if(r(c,l,o,e,t,n)&&(f=!0),f){a.add(u),s=!0;break}}if(!s)return!1}return!0}i(Xv,"isArrayMatch");function TC(e,t,r,n){return t.size===0?!0:e instanceof Set?Xv([...e],[...t],r,n):!1}i(TC,"isSetMatch");Zv.isMatchWith=Gv});var xf=X(Jv=>{var DC=Qv();function RC(e,t){return DC.isMatchWith(e,t,()=>{})}i(RC,"isMatch");Jv.isMatch=RC});var ty=X(ey=>{var MC=Uv(),NC=xf();function jC(e){return e=MC.cloneDeep(e),t=>NC.isMatch(t,e)}i(jC,"matches");ey.matches=jC});var ny=X(ry=>{var LC=ja(),pl=fl(),ml=yf();function BC(e,t){return ml.cloneDeepWith(e,(r,n,a,o)=>{let l=t?.(r,n,a,o);if(l!==void 0)return l;if(typeof e=="object"){if(LC.getTag(e)==="[object Object]"&&typeof e.constructor!="function"){let s={};return o.set(e,s),ml.copyProperties(s,e,a,o),s}switch(Object.prototype.toString.call(e)){case pl.numberTag:case pl.stringTag:case pl.booleanTag:{let s=new e.constructor(e?.valueOf());return ml.copyProperties(s,e),s}case pl.argumentsTag:{let s={};return ml.copyProperties(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}i(BC,"cloneDeepWith");ry.cloneDeepWith=BC});var ay=X(iy=>{var zC=ny();function FC(e){return zC.cloneDeepWith(e)}i(FC,"cloneDeep");iy.cloneDeep=FC});var ly=X(oy=>{var WC=ja();function VC(e){return e!==null&&typeof e=="object"&&WC.getTag(e)==="[object Arguments]"}i(VC,"isArguments");oy.isArguments=VC});var uy=X(sy=>{var qC=tf(),$C=il(),KC=uf(),UC=ly();function HC(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&qC.isDeepKey(t)&&e?.[t]==null?r=$C.toPath(t):r=[t],r.length===0)return!1;let n=e;for(let a=0;a<r.length;a++){let o=r[a];if((n==null||!Object.hasOwn(n,o))&&!((Array.isArray(n)||UC.isArguments(n))&&KC.isIndex(o)&&o<n.length))return!1;n=n[o]}return!0}i(HC,"has");sy.has=HC});var fy=X(cy=>{var YC=nl(),GC=al(),XC=xf(),ZC=ay(),QC=uy();function JC(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=YC.toKey(e);break}return t=ZC.cloneDeep(t),function(r){let n=GC.get(r,e);return n===void 0?QC.has(r,e):t===void 0?n===void 0:XC.isMatch(n,t)}}i(JC,"matchesProperty");cy.matchesProperty=JC});var py=X(dy=>{var ek=pf(),tk=Nv(),rk=ty(),nk=fy();function ik(e){if(e==null)return ek.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?nk.matchesProperty(e[0],e[1]):rk.matches(e);case"string":case"symbol":case"number":return tk.property(e)}}i(ik,"iteratee");dy.iteratee=ik});var hy=X(my=>{function ak(e){return typeof e=="object"&&e!==null}i(ak,"isObjectLike");my.isObjectLike=ak});var yy=X(vy=>{var ok=lf(),lk=hy();function sk(e){return lk.isObjectLike(e)&&ok.isArrayLike(e)}i(sk,"isArrayLikeObject");vy.isArrayLikeObject=sk});var xy=X(gy=>{var uk=_v(),ck=Dv(),fk=pf(),dk=py(),pk=yy();function mk(e,t=fk.identity){return pk.isArrayLikeObject(e)?uk.uniqBy(Array.from(e),ck.ary(dk.iteratee(t),1)):[]}i(mk,"uniqBy");gy.uniqBy=mk});var Ay=X((TU,by)=>{by.exports=xy().uniqBy});var xb=X(gb=>{var uD=ff();function cD(e){return uD.isSymbol(e)?NaN:Number(e)}i(cD,"toNumber");gb.toNumber=cD});var Ab=X(bb=>{var fD=xb();function dD(e){return e?(e=fD.toNumber(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}i(dD,"toFinite");bb.toFinite=dD});var Sb=X(wb=>{var yd=Ab(),pD=cf();function mD(e,t,r){r&&typeof r!="number"&&pD.isIterateeCall(e,t,r)&&(t=r=void 0),e=yd.toFinite(e),t===void 0?(t=e,e=0):t=yd.toFinite(t),r=r===void 0?e<t?1:-1:yd.toFinite(r);let n=Math.max(Math.ceil((t-e)/(r||1)),0),a=new Array(n);for(let o=0;o<n;o++)a[o]=e,e+=r;return a}i(mD,"range");wb.range=mD});var Ob=X((TX,Pb)=>{Pb.exports=Sb().range});var bd=X((Tb,Cs)=>{(function(e){"use strict";var t=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},n=!0,a="[DecimalError] ",o=a+"Invalid argument: ",l=a+"Exponent out of range: ",s=Math.floor,u=Math.pow,c=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,f,d=1e7,p=7,m=9007199254740991,h=s(m/p),v={};v.absoluteValue=v.abs=function(){var b=new this.constructor(this);return b.s&&(b.s=1),b},v.comparedTo=v.cmp=function(b){var S,k,O,I,C=this;if(b=new C.constructor(b),C.s!==b.s)return C.s||-b.s;if(C.e!==b.e)return C.e>b.e^C.s<0?1:-1;for(O=C.d.length,I=b.d.length,S=0,k=O<I?O:I;S<k;++S)if(C.d[S]!==b.d[S])return C.d[S]>b.d[S]^C.s<0?1:-1;return O===I?0:O>I^C.s<0?1:-1},v.decimalPlaces=v.dp=function(){var b=this,S=b.d.length-1,k=(S-b.e)*p;if(S=b.d[S],S)for(;S%10==0;S/=10)k--;return k<0?0:k},v.dividedBy=v.div=function(b){return A(this,new this.constructor(b))},v.dividedToIntegerBy=v.idiv=function(b){var S=this,k=S.constructor;return R(A(S,new k(b),0,1),k.precision)},v.equals=v.eq=function(b){return!this.cmp(b)},v.exponent=function(){return E(this)},v.greaterThan=v.gt=function(b){return this.cmp(b)>0},v.greaterThanOrEqualTo=v.gte=function(b){return this.cmp(b)>=0},v.isInteger=v.isint=function(){return this.e>this.d.length-2},v.isNegative=v.isneg=function(){return this.s<0},v.isPositive=v.ispos=function(){return this.s>0},v.isZero=function(){return this.s===0},v.lessThan=v.lt=function(b){return this.cmp(b)<0},v.lessThanOrEqualTo=v.lte=function(b){return this.cmp(b)<1},v.logarithm=v.log=function(b){var S,k=this,O=k.constructor,I=O.precision,C=I+5;if(b===void 0)b=new O(10);else if(b=new O(b),b.s<1||b.eq(f))throw Error(a+"NaN");if(k.s<1)throw Error(a+(k.s?"NaN":"-Infinity"));return k.eq(f)?new O(0):(n=!1,S=A(D(k,C),D(b,C),C),n=!0,R(S,I))},v.minus=v.sub=function(b){var S=this;return b=new S.constructor(b),S.s==b.s?V(S,b):g(S,(b.s=-b.s,b))},v.modulo=v.mod=function(b){var S,k=this,O=k.constructor,I=O.precision;if(b=new O(b),!b.s)throw Error(a+"NaN");return k.s?(n=!1,S=A(k,b,0,1).times(b),n=!0,k.minus(S)):R(new O(k),I)},v.naturalExponential=v.exp=function(){return P(this)},v.naturalLogarithm=v.ln=function(){return D(this)},v.negated=v.neg=function(){var b=new this.constructor(this);return b.s=-b.s||0,b},v.plus=v.add=function(b){var S=this;return b=new S.constructor(b),S.s==b.s?g(S,b):V(S,(b.s=-b.s,b))},v.precision=v.sd=function(b){var S,k,O,I=this;if(b!==void 0&&b!==!!b&&b!==1&&b!==0)throw Error(o+b);if(S=E(I)+1,O=I.d.length-1,k=O*p+1,O=I.d[O],O){for(;O%10==0;O/=10)k--;for(O=I.d[0];O>=10;O/=10)k++}return b&&S>k?S:k},v.squareRoot=v.sqrt=function(){var b,S,k,O,I,C,j,N=this,W=N.constructor;if(N.s<1){if(!N.s)return new W(0);throw Error(a+"NaN")}for(b=E(N),n=!1,I=Math.sqrt(+N),I==0||I==1/0?(S=w(N.d),(S.length+b)%2==0&&(S+="0"),I=Math.sqrt(S),b=s((b+1)/2)-(b<0||b%2),I==1/0?S="5e"+b:(S=I.toExponential(),S=S.slice(0,S.indexOf("e")+1)+b),O=new W(S)):O=new W(I.toString()),k=W.precision,I=j=k+3;;)if(C=O,O=C.plus(A(N,C,j+2)).times(.5),w(C.d).slice(0,j)===(S=w(O.d)).slice(0,j)){if(S=S.slice(j-3,j+1),I==j&&S=="4999"){if(R(C,k+1,0),C.times(C).eq(N)){O=C;break}}else if(S!="9999")break;j+=4}return n=!0,R(O,k)},v.times=v.mul=function(b){var S,k,O,I,C,j,N,W,Y,U=this,G=U.constructor,Re=U.d,F=(b=new G(b)).d;if(!U.s||!b.s)return new G(0);for(b.s*=U.s,k=U.e+b.e,W=Re.length,Y=F.length,W<Y&&(C=Re,Re=F,F=C,j=W,W=Y,Y=j),C=[],j=W+Y,O=j;O--;)C.push(0);for(O=Y;--O>=0;){for(S=0,I=W+O;I>O;)N=C[I]+F[O]*Re[I-O-1]+S,C[I--]=N%d|0,S=N/d|0;C[I]=(C[I]+S)%d|0}for(;!C[--j];)C.pop();return S?++k:C.shift(),b.d=C,b.e=k,n?R(b,G.precision):b},v.toDecimalPlaces=v.todp=function(b,S){var k=this,O=k.constructor;return k=new O(k),b===void 0?k:(y(b,0,t),S===void 0?S=O.rounding:y(S,0,8),R(k,b+E(k)+1,S))},v.toExponential=function(b,S){var k,O=this,I=O.constructor;return b===void 0?k=B(O,!0):(y(b,0,t),S===void 0?S=I.rounding:y(S,0,8),O=R(new I(O),b+1,S),k=B(O,!0,b+1)),k},v.toFixed=function(b,S){var k,O,I=this,C=I.constructor;return b===void 0?B(I):(y(b,0,t),S===void 0?S=C.rounding:y(S,0,8),O=R(new C(I),b+E(I)+1,S),k=B(O.abs(),!1,b+E(O)+1),I.isneg()&&!I.isZero()?"-"+k:k)},v.toInteger=v.toint=function(){var b=this,S=b.constructor;return R(new S(b),E(b)+1,S.rounding)},v.toNumber=function(){return+this},v.toPower=v.pow=function(b){var S,k,O,I,C,j,N=this,W=N.constructor,Y=12,U=+(b=new W(b));if(!b.s)return new W(f);if(N=new W(N),!N.s){if(b.s<1)throw Error(a+"Infinity");return N}if(N.eq(f))return N;if(O=W.precision,b.eq(f))return R(N,O);if(S=b.e,k=b.d.length-1,j=S>=k,C=N.s,j){if((k=U<0?-U:U)<=m){for(I=new W(f),S=Math.ceil(O/p+4),n=!1;k%2&&(I=I.times(N),Q(I.d,S)),k=s(k/2),k!==0;)N=N.times(N),Q(N.d,S);return n=!0,b.s<0?new W(f).div(I):R(I,O)}}else if(C<0)throw Error(a+"NaN");return C=C<0&&b.d[Math.max(S,k)]&1?-1:1,N.s=1,n=!1,I=b.times(D(N,O+Y)),n=!0,I=P(I),I.s=C,I},v.toPrecision=function(b,S){var k,O,I=this,C=I.constructor;return b===void 0?(k=E(I),O=B(I,k<=C.toExpNeg||k>=C.toExpPos)):(y(b,1,t),S===void 0?S=C.rounding:y(S,0,8),I=R(new C(I),b,S),k=E(I),O=B(I,b<=k||k<=C.toExpNeg,b)),O},v.toSignificantDigits=v.tosd=function(b,S){var k=this,O=k.constructor;return b===void 0?(b=O.precision,S=O.rounding):(y(b,1,t),S===void 0?S=O.rounding:y(S,0,8)),R(new O(k),b,S)},v.toString=v.valueOf=v.val=v.toJSON=function(){var b=this,S=E(b),k=b.constructor;return B(b,S<=k.toExpNeg||S>=k.toExpPos)};function g(b,S){var k,O,I,C,j,N,W,Y,U=b.constructor,G=U.precision;if(!b.s||!S.s)return S.s||(S=new U(b)),n?R(S,G):S;if(W=b.d,Y=S.d,j=b.e,I=S.e,W=W.slice(),C=j-I,C){for(C<0?(O=W,C=-C,N=Y.length):(O=Y,I=j,N=W.length),j=Math.ceil(G/p),N=j>N?j+1:N+1,C>N&&(C=N,O.length=1),O.reverse();C--;)O.push(0);O.reverse()}for(N=W.length,C=Y.length,N-C<0&&(C=N,O=Y,Y=W,W=O),k=0;C;)k=(W[--C]=W[C]+Y[C]+k)/d|0,W[C]%=d;for(k&&(W.unshift(k),++I),N=W.length;W[--N]==0;)W.pop();return S.d=W,S.e=I,n?R(S,G):S}i(g,"add");function y(b,S,k){if(b!==~~b||b<S||b>k)throw Error(o+b)}i(y,"checkInt32");function w(b){var S,k,O,I=b.length-1,C="",j=b[0];if(I>0){for(C+=j,S=1;S<I;S++)O=b[S]+"",k=p-O.length,k&&(C+=_(k)),C+=O;j=b[S],O=j+"",k=p-O.length,k&&(C+=_(k))}else if(j===0)return"0";for(;j%10===0;)j/=10;return C+j}i(w,"digitsToString");var A=(function(){function b(O,I){var C,j=0,N=O.length;for(O=O.slice();N--;)C=O[N]*I+j,O[N]=C%d|0,j=C/d|0;return j&&O.unshift(j),O}i(b,"multiplyInteger");function S(O,I,C,j){var N,W;if(C!=j)W=C>j?1:-1;else for(N=W=0;N<C;N++)if(O[N]!=I[N]){W=O[N]>I[N]?1:-1;break}return W}i(S,"compare");function k(O,I,C){for(var j=0;C--;)O[C]-=j,j=O[C]<I[C]?1:0,O[C]=j*d+O[C]-I[C];for(;!O[0]&&O.length>1;)O.shift()}return i(k,"subtract"),function(O,I,C,j){var N,W,Y,U,G,Re,F,ne,H,L,qe,ue,te,rt,Ft,di,ar,el,tl=O.constructor,GE=O.s==I.s?1:-1,hr=O.d,Ye=I.d;if(!O.s)return new tl(O);if(!I.s)throw Error(a+"Division by zero");for(W=O.e-I.e,ar=Ye.length,Ft=hr.length,F=new tl(GE),ne=F.d=[],Y=0;Ye[Y]==(hr[Y]||0);)++Y;if(Ye[Y]>(hr[Y]||0)&&--W,C==null?ue=C=tl.precision:j?ue=C+(E(O)-E(I))+1:ue=C,ue<0)return new tl(0);if(ue=ue/p+2|0,Y=0,ar==1)for(U=0,Ye=Ye[0],ue++;(Y<Ft||U)&&ue--;Y++)te=U*d+(hr[Y]||0),ne[Y]=te/Ye|0,U=te%Ye|0;else{for(U=d/(Ye[0]+1)|0,U>1&&(Ye=b(Ye,U),hr=b(hr,U),ar=Ye.length,Ft=hr.length),rt=ar,H=hr.slice(0,ar),L=H.length;L<ar;)H[L++]=0;el=Ye.slice(),el.unshift(0),di=Ye[0],Ye[1]>=d/2&&++di;do U=0,N=S(Ye,H,ar,L),N<0?(qe=H[0],ar!=L&&(qe=qe*d+(H[1]||0)),U=qe/di|0,U>1?(U>=d&&(U=d-1),G=b(Ye,U),Re=G.length,L=H.length,N=S(G,H,Re,L),N==1&&(U--,k(G,ar<Re?el:Ye,Re))):(U==0&&(N=U=1),G=Ye.slice()),Re=G.length,Re<L&&G.unshift(0),k(H,G,L),N==-1&&(L=H.length,N=S(Ye,H,ar,L),N<1&&(U++,k(H,ar<L?el:Ye,L))),L=H.length):N===0&&(U++,H=[0]),ne[Y++]=U,N&&H[0]?H[L++]=hr[rt]||0:(H=[hr[rt]],L=1);while((rt++<Ft||H[0]!==void 0)&&ue--)}return ne[0]||ne.shift(),F.e=W,R(F,j?C+E(F)+1:C)}})();function P(b,S){var k,O,I,C,j,N,W=0,Y=0,U=b.constructor,G=U.precision;if(E(b)>16)throw Error(l+E(b));if(!b.s)return new U(f);for(S==null?(n=!1,N=G):N=S,j=new U(.03125);b.abs().gte(.1);)b=b.times(j),Y+=5;for(O=Math.log(u(2,Y))/Math.LN10*2+5|0,N+=O,k=I=C=new U(f),U.precision=N;;){if(I=R(I.times(b),N),k=k.times(++W),j=C.plus(A(I,k,N)),w(j.d).slice(0,N)===w(C.d).slice(0,N)){for(;Y--;)C=R(C.times(C),N);return U.precision=G,S==null?(n=!0,R(C,G)):C}C=j}}i(P,"exp");function E(b){for(var S=b.e*p,k=b.d[0];k>=10;k/=10)S++;return S}i(E,"getBase10Exponent");function x(b,S,k){if(S>b.LN10.sd())throw n=!0,k&&(b.precision=k),Error(a+"LN10 precision limit exceeded");return R(new b(b.LN10),S)}i(x,"getLn10");function _(b){for(var S="";b--;)S+="0";return S}i(_,"getZeroString");function D(b,S){var k,O,I,C,j,N,W,Y,U,G=1,Re=10,F=b,ne=F.d,H=F.constructor,L=H.precision;if(F.s<1)throw Error(a+(F.s?"NaN":"-Infinity"));if(F.eq(f))return new H(0);if(S==null?(n=!1,Y=L):Y=S,F.eq(10))return S==null&&(n=!0),x(H,Y);if(Y+=Re,H.precision=Y,k=w(ne),O=k.charAt(0),C=E(F),Math.abs(C)<15e14){for(;O<7&&O!=1||O==1&&k.charAt(1)>3;)F=F.times(b),k=w(F.d),O=k.charAt(0),G++;C=E(F),O>1?(F=new H("0."+k),C++):F=new H(O+"."+k.slice(1))}else return W=x(H,Y+2,L).times(C+""),F=D(new H(O+"."+k.slice(1)),Y-Re).plus(W),H.precision=L,S==null?(n=!0,R(F,L)):F;for(N=j=F=A(F.minus(f),F.plus(f),Y),U=R(F.times(F),Y),I=3;;){if(j=R(j.times(U),Y),W=N.plus(A(j,new H(I),Y)),w(W.d).slice(0,Y)===w(N.d).slice(0,Y))return N=N.times(2),C!==0&&(N=N.plus(x(H,Y+2,L).times(C+""))),N=A(N,new H(G),Y),H.precision=L,S==null?(n=!0,R(N,L)):N;N=W,I+=2}}i(D,"ln");function $(b,S){var k,O,I;for((k=S.indexOf("."))>-1&&(S=S.replace(".","")),(O=S.search(/e/i))>0?(k<0&&(k=O),k+=+S.slice(O+1),S=S.substring(0,O)):k<0&&(k=S.length),O=0;S.charCodeAt(O)===48;)++O;for(I=S.length;S.charCodeAt(I-1)===48;)--I;if(S=S.slice(O,I),S){if(I-=O,k=k-O-1,b.e=s(k/p),b.d=[],O=(k+1)%p,k<0&&(O+=p),O<I){for(O&&b.d.push(+S.slice(0,O)),I-=p;O<I;)b.d.push(+S.slice(O,O+=p));S=S.slice(O),O=p-S.length}else O-=I;for(;O--;)S+="0";if(b.d.push(+S),n&&(b.e>h||b.e<-h))throw Error(l+k)}else b.s=0,b.e=0,b.d=[0];return b}i($,"parseDecimal");function R(b,S,k){var O,I,C,j,N,W,Y,U,G=b.d;for(j=1,C=G[0];C>=10;C/=10)j++;if(O=S-j,O<0)O+=p,I=S,Y=G[U=0];else{if(U=Math.ceil((O+1)/p),C=G.length,U>=C)return b;for(Y=C=G[U],j=1;C>=10;C/=10)j++;O%=p,I=O-p+j}if(k!==void 0&&(C=u(10,j-I-1),N=Y/C%10|0,W=S<0||G[U+1]!==void 0||Y%C,W=k<4?(N||W)&&(k==0||k==(b.s<0?3:2)):N>5||N==5&&(k==4||W||k==6&&(O>0?I>0?Y/u(10,j-I):0:G[U-1])%10&1||k==(b.s<0?8:7))),S<1||!G[0])return W?(C=E(b),G.length=1,S=S-C-1,G[0]=u(10,(p-S%p)%p),b.e=s(-S/p)||0):(G.length=1,G[0]=b.e=b.s=0),b;if(O==0?(G.length=U,C=1,U--):(G.length=U+1,C=u(10,p-O),G[U]=I>0?(Y/u(10,j-I)%u(10,I)|0)*C:0),W)for(;;)if(U==0){(G[0]+=C)==d&&(G[0]=1,++b.e);break}else{if(G[U]+=C,G[U]!=d)break;G[U--]=0,C=1}for(O=G.length;G[--O]===0;)G.pop();if(n&&(b.e>h||b.e<-h))throw Error(l+E(b));return b}i(R,"round");function V(b,S){var k,O,I,C,j,N,W,Y,U,G,Re=b.constructor,F=Re.precision;if(!b.s||!S.s)return S.s?S.s=-S.s:S=new Re(b),n?R(S,F):S;if(W=b.d,G=S.d,O=S.e,Y=b.e,W=W.slice(),j=Y-O,j){for(U=j<0,U?(k=W,j=-j,N=G.length):(k=G,O=Y,N=W.length),I=Math.max(Math.ceil(F/p),N)+2,j>I&&(j=I,k.length=1),k.reverse(),I=j;I--;)k.push(0);k.reverse()}else{for(I=W.length,N=G.length,U=I<N,U&&(N=I),I=0;I<N;I++)if(W[I]!=G[I]){U=W[I]<G[I];break}j=0}for(U&&(k=W,W=G,G=k,S.s=-S.s),N=W.length,I=G.length-N;I>0;--I)W[N++]=0;for(I=G.length;I>j;){if(W[--I]<G[I]){for(C=I;C&&W[--C]===0;)W[C]=d-1;--W[C],W[I]+=d}W[I]-=G[I]}for(;W[--N]===0;)W.pop();for(;W[0]===0;W.shift())--O;return W[0]?(S.d=W,S.e=O,n?R(S,F):S):new Re(0)}i(V,"subtract");function B(b,S,k){var O,I=E(b),C=w(b.d),j=C.length;return S?(k&&(O=k-j)>0?C=C.charAt(0)+"."+C.slice(1)+_(O):j>1&&(C=C.charAt(0)+"."+C.slice(1)),C=C+(I<0?"e":"e+")+I):I<0?(C="0."+_(-I-1)+C,k&&(O=k-j)>0&&(C+=_(O))):I>=j?(C+=_(I+1-j),k&&(O=k-I-1)>0&&(C=C+"."+_(O))):((O=I+1)<j&&(C=C.slice(0,O)+"."+C.slice(O)),k&&(O=k-j)>0&&(I+1===j&&(C+="."),C+=_(O))),b.s<0?"-"+C:C}i(B,"toString");function Q(b,S){if(b.length>S)return b.length=S,!0}i(Q,"truncate");function Z(b){var S,k,O;function I(C){var j=this;if(!(j instanceof I))return new I(C);if(j.constructor=I,C instanceof I){j.s=C.s,j.e=C.e,j.d=(C=C.d)?C.slice():C;return}if(typeof C=="number"){if(C*0!==0)throw Error(o+C);if(C>0)j.s=1;else if(C<0)C=-C,j.s=-1;else{j.s=0,j.e=0,j.d=[0];return}if(C===~~C&&C<1e7){j.e=0,j.d=[C];return}return $(j,C.toString())}else if(typeof C!="string")throw Error(o+C);if(C.charCodeAt(0)===45?(C=C.slice(1),j.s=-1):j.s=1,c.test(C))$(j,C);else throw Error(o+C)}if(i(I,"Decimal"),I.prototype=v,I.ROUND_UP=0,I.ROUND_DOWN=1,I.ROUND_CEIL=2,I.ROUND_FLOOR=3,I.ROUND_HALF_UP=4,I.ROUND_HALF_DOWN=5,I.ROUND_HALF_EVEN=6,I.ROUND_HALF_CEIL=7,I.ROUND_HALF_FLOOR=8,I.clone=Z,I.config=I.set=J,b===void 0&&(b={}),b)for(O=["precision","rounding","toExpNeg","toExpPos","LN10"],S=0;S<O.length;)b.hasOwnProperty(k=O[S++])||(b[k]=this[k]);return I.config(b),I}i(Z,"clone");function J(b){if(!b||typeof b!="object")throw Error(a+"Object expected");var S,k,O,I=["precision",1,t,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(S=0;S<I.length;S+=3)if((O=b[k=I[S]])!==void 0)if(s(O)===O&&O>=I[S+1]&&O<=I[S+2])this[k]=O;else throw Error(o+k+": "+O);if((O=b[k="LN10"])!==void 0)if(O==Math.LN10)this[k]=new this(O);else throw Error(o+k+": "+O);return this}i(J,"config"),r=Z(r),r.default=r.Decimal=r,f=new r(1),typeof define=="function"&&define.amd?define(function(){return r}):typeof Cs<"u"&&Cs.exports?Cs.exports=r:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),e.Decimal=r)})(Tb)});var aw=X((bee,um)=>{"use strict";var Fj=Object.prototype.hasOwnProperty,St="~";function Io(){}i(Io,"Events");Object.create&&(Io.prototype=Object.create(null),new Io().__proto__||(St=!1));function Wj(e,t,r){this.fn=e,this.context=t,this.once=r||!1}i(Wj,"EE");function iw(e,t,r,n,a){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new Wj(r,n||e,a),l=St?St+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],o]:e._events[l].push(o):(e._events[l]=o,e._eventsCount++),e}i(iw,"addListener");function Hu(e,t){--e._eventsCount===0?e._events=new Io:delete e._events[t]}i(Hu,"clearEvent");function mt(){this._events=new Io,this._eventsCount=0}i(mt,"EventEmitter");mt.prototype.eventNames=i(function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)Fj.call(r,n)&&t.push(St?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t},"eventNames");mt.prototype.listeners=i(function(t){var r=St?St+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,o=n.length,l=new Array(o);a<o;a++)l[a]=n[a].fn;return l},"listeners");mt.prototype.listenerCount=i(function(t){var r=St?St+t:t,n=this._events[r];return n?n.fn?1:n.length:0},"listenerCount");mt.prototype.emit=i(function(t,r,n,a,o,l){var s=St?St+t:t;if(!this._events[s])return!1;var u=this._events[s],c=arguments.length,f,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,r),!0;case 3:return u.fn.call(u.context,r,n),!0;case 4:return u.fn.call(u.context,r,n,a),!0;case 5:return u.fn.call(u.context,r,n,a,o),!0;case 6:return u.fn.call(u.context,r,n,a,o,l),!0}for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];u.fn.apply(u.context,f)}else{var p=u.length,m;for(d=0;d<p;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,r);break;case 3:u[d].fn.call(u[d].context,r,n);break;case 4:u[d].fn.call(u[d].context,r,n,a);break;default:if(!f)for(m=1,f=new Array(c-1);m<c;m++)f[m-1]=arguments[m];u[d].fn.apply(u[d].context,f)}}return!0},"emit");mt.prototype.on=i(function(t,r,n){return iw(this,t,r,n,!1)},"on");mt.prototype.once=i(function(t,r,n){return iw(this,t,r,n,!0)},"once");mt.prototype.removeListener=i(function(t,r,n,a){var o=St?St+t:t;if(!this._events[o])return this;if(!r)return Hu(this,o),this;var l=this._events[o];if(l.fn)l.fn===r&&(!a||l.once)&&(!n||l.context===n)&&Hu(this,o);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==r||a&&!l[s].once||n&&l[s].context!==n)&&u.push(l[s]);u.length?this._events[o]=u.length===1?u[0]:u:Hu(this,o)}return this},"removeListener");mt.prototype.removeAllListeners=i(function(t){var r;return t?(r=St?St+t:t,this._events[r]&&Hu(this,r)):(this._events=new Io,this._eventsCount=0),this},"removeAllListeners");mt.prototype.off=mt.prototype.removeListener;mt.prototype.addListener=mt.prototype.on;mt.prefixed=St;mt.EventEmitter=mt;typeof um<"u"&&(um.exports=mt)});var Bw=X(Lw=>{function IL(){}i(IL,"noop");Lw.noop=IL});var Fw=X(zw=>{function CL(e){if(!e||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}i(CL,"isPlainObject");zw.isPlainObject=CL});var Uw=X(Kw=>{var Ww=hf(),Vw=ja(),Ce=fl(),qw=vf(),$w=Fw(),kL=Da();sl();function _L(e,t,r){return _o(e,t,void 0,void 0,void 0,void 0,r)}i(_L,"isEqualWith");function _o(e,t,r,n,a,o,l){let s=l(e,t,r,n,a,o);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return To(e,t,o,l)}return To(e,t,o,l)}i(_o,"isEqualWithImpl");function To(e,t,r,n){if(Object.is(e,t))return!0;let a=Vw.getTag(e),o=Vw.getTag(t);if(a==="[object Arguments]"&&(a=Ce.objectTag),o==="[object Arguments]"&&(o=Ce.objectTag),a!==o)return!1;switch(a){case Ce.stringTag:return e.toString()===t.toString();case Ce.numberTag:{let u=e.valueOf(),c=t.valueOf();return kL.isEqualsSameValueZero(u,c)}case Ce.booleanTag:case Ce.dateTag:case Ce.symbolTag:return Object.is(e.valueOf(),t.valueOf());case Ce.regexpTag:return e.source===t.source&&e.flags===t.flags;case Ce.functionTag:return e===t}r=r??new Map;let l=r.get(e),s=r.get(t);if(l!=null&&s!=null)return l===t;r.set(e,t),r.set(t,e);try{switch(a){case Ce.mapTag:if(e.size!==t.size)return!1;for(let[u,c]of e.entries())if(!t.has(u)||!_o(c,t.get(u),u,e,t,r,n))return!1;return!0;case Ce.setTag:{if(e.size!==t.size)return!1;let u=Array.from(e.values()),c=Array.from(t.values());for(let f=0;f<u.length;f++){let d=u[f],p=c.findIndex(m=>_o(d,m,void 0,e,t,r,n));if(p===-1)return!1;c.splice(p,1)}return!0}case Ce.arrayTag:case Ce.uint8ArrayTag:case Ce.uint8ClampedArrayTag:case Ce.uint16ArrayTag:case Ce.uint32ArrayTag:case Ce.bigUint64ArrayTag:case Ce.int8ArrayTag:case Ce.int16ArrayTag:case Ce.int32ArrayTag:case Ce.bigInt64ArrayTag:case Ce.float32ArrayTag:case Ce.float64ArrayTag:if(qw.isBuffer(e)!==qw.isBuffer(t)||e.length!==t.length)return!1;for(let u=0;u<e.length;u++)if(!_o(e[u],t[u],u,e,t,r,n))return!1;return!0;case Ce.arrayBufferTag:return e.byteLength!==t.byteLength?!1:To(new Uint8Array(e),new Uint8Array(t),r,n);case Ce.dataViewTag:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:To(new Uint8Array(e),new Uint8Array(t),r,n);case Ce.errorTag:return e.name===t.name&&e.message===t.message;case Ce.objectTag:{if(!(To(e.constructor,t.constructor,r,n)||$w.isPlainObject(e)&&$w.isPlainObject(t)))return!1;let u=[...Object.keys(e),...Ww.getSymbols(e)],c=[...Object.keys(t),...Ww.getSymbols(t)];if(u.length!==c.length)return!1;for(let f=0;f<u.length;f++){let d=u[f],p=e[d];if(!Object.hasOwn(t,d))return!1;let m=t[d];if(!_o(p,m,d,e,t,r,n))return!1}return!0}default:return!1}}finally{r.delete(e),r.delete(t)}}i(To,"areObjectsEqual");Kw.isEqualWith=_L});var Yw=X(Hw=>{var TL=Bw(),DL=Uw();function RL(e,t){return DL.isEqualWith(e,t,TL.noop)}i(RL,"isEqual");Hw.isEqual=RL});var Xw=X((Vte,Gw)=>{Gw.exports=Yw().isEqual});var KS=X(Pe=>{"use strict";var bm=Symbol.for("react.element"),Am=Symbol.for("react.portal"),uc=Symbol.for("react.fragment"),cc=Symbol.for("react.strict_mode"),fc=Symbol.for("react.profiler"),dc=Symbol.for("react.provider"),pc=Symbol.for("react.context"),bB=Symbol.for("react.server_context"),mc=Symbol.for("react.forward_ref"),hc=Symbol.for("react.suspense"),vc=Symbol.for("react.suspense_list"),yc=Symbol.for("react.memo"),gc=Symbol.for("react.lazy"),AB=Symbol.for("react.offscreen"),$S;$S=Symbol.for("react.module.reference");function Jt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bm:switch(e=e.type,e){case uc:case fc:case cc:case hc:case vc:return e;default:switch(e=e&&e.$$typeof,e){case bB:case pc:case mc:case gc:case yc:case dc:return e;default:return t}}case Am:return t}}}i(Jt,"v");Pe.ContextConsumer=pc;Pe.ContextProvider=dc;Pe.Element=bm;Pe.ForwardRef=mc;Pe.Fragment=uc;Pe.Lazy=gc;Pe.Memo=yc;Pe.Portal=Am;Pe.Profiler=fc;Pe.StrictMode=cc;Pe.Suspense=hc;Pe.SuspenseList=vc;Pe.isAsyncMode=function(){return!1};Pe.isConcurrentMode=function(){return!1};Pe.isContextConsumer=function(e){return Jt(e)===pc};Pe.isContextProvider=function(e){return Jt(e)===dc};Pe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bm};Pe.isForwardRef=function(e){return Jt(e)===mc};Pe.isFragment=function(e){return Jt(e)===uc};Pe.isLazy=function(e){return Jt(e)===gc};Pe.isMemo=function(e){return Jt(e)===yc};Pe.isPortal=function(e){return Jt(e)===Am};Pe.isProfiler=function(e){return Jt(e)===fc};Pe.isStrictMode=function(e){return Jt(e)===cc};Pe.isSuspense=function(e){return Jt(e)===hc};Pe.isSuspenseList=function(e){return Jt(e)===vc};Pe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===uc||e===fc||e===cc||e===hc||e===vc||e===AB||typeof e=="object"&&e!==null&&(e.$$typeof===gc||e.$$typeof===yc||e.$$typeof===dc||e.$$typeof===pc||e.$$typeof===mc||e.$$typeof===$S||e.getModuleId!==void 0)};Pe.typeOf=Jt});var HS=X((Vne,US)=>{"use strict";US.exports=KS()});var KP=X($P=>{"use strict";var $o=z();function Cz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(Cz,"is");var kz=typeof Object.is=="function"?Object.is:Cz,_z=$o.useSyncExternalStore,Tz=$o.useRef,Dz=$o.useEffect,Rz=$o.useMemo,Mz=$o.useDebugValue;$P.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var o=Tz(null);if(o.current===null){var l={hasValue:!1,value:null};o.current=l}else l=o.current;o=Rz(function(){function u(m){if(!c){if(c=!0,f=m,m=n(m),a!==void 0&&l.hasValue){var h=l.value;if(a(h,m))return d=h}return d=m}if(h=d,kz(f,m))return h;var v=n(m);return a!==void 0&&a(h,v)?(f=m,h):(f=m,d=v)}i(u,"memoizedSelector");var c=!1,f,d,p=r===void 0?null:r;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,r,n,a]);var s=_z(e,o[0],o[1]);return Dz(function(){l.hasValue=!0,l.value=s},[s]),Mz(s),s}});var HP=X((Yae,UP)=>{"use strict";UP.exports=KP()});var gn=M(z()),Ge=M(z()),Gh=M(Th());var qh=M(_a());var hI=4;function Wt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:hI,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}i(Wt,"round");function Ze(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((a,o,l)=>{var s=r[l-1];return typeof s=="string"?a+s+o:s!==void 0?a+Wt(s)+o:a+o},"")}i(Ze,"roundTemplateLiteral");var je=i(e=>e===0?0:e>0?1:-1,"mathSign"),nt=i(e=>typeof e=="number"&&e!=+e,"isNan"),Or=i(e=>typeof e=="string"&&e.length>1&&e.indexOf("%")===e.length-1,"isPercent"),q=i(e=>(typeof e=="number"||e instanceof Number)&&!nt(e),"isNumber"),it=i(e=>q(e)||typeof e=="string","isNumOrStr"),vI=0,Er=i(e=>{var t=++vI;return"".concat(e||"").concat(t)},"uniqueId"),lt=i(function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!q(t)&&typeof t!="string")return n;var o;if(Or(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return nt(o)&&(o=n),a&&r!=null&&o>r&&(o=r),o},"getPercentValue"),nf=i(e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1},"hasDuplicate");function we(e,t,r){return q(e)&&q(t)?Wt(e+r*(t-e)):t}i(we,"interpolate");function ol(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):(0,qh.default)(n,t))===r)}i(ol,"findEntryInArray");var ce=i(e=>e===null||typeof e>"u","isNullish"),hi=i(e=>ce(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),"upperFirst");function Qe(e){return e!=null}i(Qe,"isNotNil");function xt(){}i(xt,"noop");var yI=!0,vi=i(function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),o=2;o<n;o++)a[o-2]=arguments[o];if(yI&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>a[l++]))}},"warn");var or={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},af=i((e,t,r)=>{var n=r.width,a=n===void 0?or.width:n,o=r.height,l=o===void 0?or.height:o,s=r.aspect,u=r.maxHeight,c=Or(a)?e:Number(a),f=Or(l)?t:Number(l);return s&&s>0&&(c?f=c/s:f&&(c=f*s),u&&f!=null&&f>u&&(f=u)),{calculatedWidth:c,calculatedHeight:f}},"calculateChartDimensions"),gI={width:0,height:0,overflow:"visible"},xI={width:0,overflowX:"visible"},bI={height:0,overflowY:"visible"},AI={},$h=i(e=>{var t=e.width,r=e.height,n=Or(t),a=Or(r);return n&&a?gI:n?xI:a?bI:AI},"getInnerDivStyle");function Kh(e){var t=e.width,r=e.height,n=e.aspect,a=t,o=r;return a===void 0&&o===void 0?(a=or.width,o=or.height):a===void 0?a=n&&n>0?void 0:or.width:o===void 0&&(o=n&&n>0?void 0:or.height),{width:a,height:o}}i(Kh,"getDefaultWidthAndHeight");function ee(e){return Number.isFinite(e)}i(ee,"isWellBehavedNumber");function Ot(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}i(Ot,"isPositiveNumber");var wI=["aspect","initialDimension","width","height","minWidth","minHeight","maxHeight","children","debounce","id","className","onResize","style"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ll.apply(null,arguments)}i(ll,"_extends");function Uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}i(Uh,"ownKeys");function Hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(r),!0).forEach(function(n){SI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Hh,"_objectSpread");function SI(e,t,r){return(t=PI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(SI,"_defineProperty");function PI(e){var t=OI(e,"string");return typeof t=="symbol"?t:t+""}i(PI,"_toPropertyKey");function OI(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(OI,"_toPrimitive");function EI(e,t){return _I(e)||kI(e,t)||CI(e,t)||II()}i(EI,"_slicedToArray");function II(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(II,"_nonIterableRest");function CI(e,t){if(e){if(typeof e=="string")return Yh(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yh(e,t):void 0}}i(CI,"_unsupportedIterableToArray");function Yh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}i(Yh,"_arrayLikeToArray");function kI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,o,l,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(f){c=!0,a=f}finally{try{if(!u&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw a}}return s}}i(kI,"_iterableToArrayLimit");function _I(e){if(Array.isArray(e))return e}i(_I,"_arrayWithHoles");function TI(e,t){if(e==null)return{};var r,n,a=DI(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}i(TI,"_objectWithoutProperties");function DI(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}i(DI,"_objectWithoutPropertiesLoose");var Xh=(0,Ge.createContext)(or.initialDimension);function RI(e){return Ot(e.width)&&Ot(e.height)}i(RI,"isAcceptableSize");function Zh(e){var t=e.children,r=e.width,n=e.height,a=(0,Ge.useMemo)(()=>({width:r,height:n}),[r,n]);return RI(a)?gn.createElement(Xh.Provider,{value:a},t):null}i(Zh,"ResponsiveContainerContextProvider");var Ta=i(()=>(0,Ge.useContext)(Xh),"useResponsiveContainerContext"),MI=(0,Ge.forwardRef)((e,t)=>{var r=e.aspect,n=e.initialDimension,a=n===void 0?or.initialDimension:n,o=e.width,l=e.height,s=e.minWidth,u=s===void 0?or.minWidth:s,c=e.minHeight,f=e.maxHeight,d=e.children,p=e.debounce,m=p===void 0?or.debounce:p,h=e.id,v=e.className,g=e.onResize,y=e.style,w=y===void 0?{}:y,A=TI(e,wI),P=(0,Ge.useRef)(null),E=(0,Ge.useRef)();E.current=g,(0,Ge.useImperativeHandle)(t,()=>P.current);var x=(0,Ge.useState)({containerWidth:a.width,containerHeight:a.height}),_=EI(x,2),D=_[0],$=_[1],R=(0,Ge.useCallback)((b,S)=>{$(k=>{var O=Math.round(b),I=Math.round(S);return k.containerWidth===O&&k.containerHeight===I?k:{containerWidth:O,containerHeight:I}})},[]);(0,Ge.useEffect)(()=>{if(P.current==null||typeof ResizeObserver>"u")return xt;var b=i(C=>{var j,N=C[0];if(N!=null){var W=N.contentRect,Y=W.width,U=W.height;R(Y,U),(j=E.current)===null||j===void 0||j.call(E,Y,U)}},"callback");m>0&&(b=(0,Gh.default)(b,m,{trailing:!0,leading:!1}));var S=new ResizeObserver(b),k=P.current.getBoundingClientRect(),O=k.width,I=k.height;return R(O,I),S.observe(P.current),()=>{S.disconnect()}},[R,m]);var V=D.containerWidth,B=D.containerHeight;vi(!r||r>0,"The aspect(%s) must be greater than zero.",r);var Q=af(V,B,{width:o,height:l,aspect:r,maxHeight:f}),Z=Q.calculatedWidth,J=Q.calculatedHeight;return vi(V<0||B<0||Z!=null&&Z>0||J!=null&&J>0,`The width(%s) and height(%s) of chart should be greater than 0,
3
3
  please check the style of container, or the props width(%s) and height(%s),
4
4
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
@@ -1 +1 @@
1
- import{a as He}from"./chunk-CGQMJYCW.js";import{a as Se}from"./chunk-37WYCOQ2.js";import{a as Ge}from"./chunk-5SLTDY4C.js";import{a as qe}from"./chunk-LXCVA5SP.js";import{i as Ue}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as $e}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as Ze}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as je}from"./chunk-4ZEL6BYL.js";import{l as Ke}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{d as Pe,f as Fe,g as me,h as Ce,i as Oe,q as Re}from"./chunk-74IYYDDI.js";import{a as s,d as Me,e as ot,f as at,g as lt}from"./chunk-I26MS5PJ.js";var De=Me(at(),1);var m=Me(ot(),1);var r=Me(lt(),1);var ze=Fe(je.getPitrBookmark),st=Fe(je.pitrRestore),nt=/^\d+$/u,Je=s(ie=>{let e=ie.trim(),h=nt.test(e)?Number(e):Date.parse(e),l=new Date(h);return Number.isNaN(l.getTime())?void 0:{epochMs:h,iso:l.toISOString()}},"De"),it=s(ie=>{let e=(0,De.c)(9),{text:h}=ie,l=Pe();if(h.trim()==="")return null;let t,o,p;if(e[0]!==l||e[1]!==h){let y=Je(h);t="font-mono text-xs text-muted-foreground",o="pitr-time-resolved",p=y===void 0?l("Not a time \u2014 use epoch-ms or ISO 8601."):l("Resolves to {instant} (a date-time without an offset is read in this browser's time zone; a bare date is UTC)",{instant:y.iso}),e[0]=l,e[1]=h,e[2]=t,e[3]=o,e[4]=p}else t=e[2],o=e[3],p=e[4];let N;return e[5]!==t||e[6]!==o||e[7]!==p?(N=(0,r.jsx)("p",{className:t,"data-testid":o,children:p}),e[5]=t,e[6]=o,e[7]=p,e[8]=N):N=e[8],N},"lt"),vt=s(ie=>{let e=(0,De.c)(140),{initialShardKey:h}=ie,l=Ke(),t=Pe(),o=h??"",p=He(o),[N,y]=(0,m.useState)(null),[f,Qe]=(0,m.useState)(""),[ce,Ee]=(0,m.useState)(null),[c,We]=(0,m.useState)(""),[b,Xe]=(0,m.useState)(!1),[i,Ye]=(0,m.useState)(null),[ue,w]=(0,m.useState)(null),[de,I]=(0,m.useState)(!1),[C,Ve]=(0,m.useState)(!1),pe;e[0]!==l||e[1]!==o?(pe=s(async a=>{I(!0),w(null);let d;try{d={current:(await l.query(ze,{},me(o))).current,error:null,unavailable:!1}}catch(n){let g=n;d={current:null,error:Ce(g),unavailable:Oe(g)==="PITR_UNAVAILABLE"}}a?.aborted!==!0&&(d.error===null?y(d.current):w(d.error),Ve(d.unavailable),I(!1))},"fe"),e[0]=l,e[1]=o,e[2]=pe):pe=e[2];let x=pe,he,fe;e[3]!==x?(he=s(()=>{let a=new AbortController;return Re(x(a.signal)),()=>{a.abort()}},"ue"),fe=[x],e[3]=x,e[4]=he,e[5]=fe):(he=e[4],fe=e[5]),(0,m.useEffect)(he,fe);let be;e[6]!==l||e[7]!==o?(be=s(async()=>{let a=await l.query(ze,{},me(o));y(a.current)},"he"),e[6]=l,e[7]=o,e[8]=be):be=e[8],Ge(be,!C);let xe;e[9]===Symbol.for("react.memo_cache_sentinel")?(xe=s(a=>{Qe(a.target.value)},"be"),e[9]=xe):xe=e[9];let et=xe,ke;e[10]===Symbol.for("react.memo_cache_sentinel")?(ke=s(a=>{We(a.target.value)},"xe"),e[10]=ke):ke=e[10];let tt=ke,Ne;e[11]===Symbol.for("react.memo_cache_sentinel")?(Ne=s(a=>{Xe(a.target.checked)},"ke"),e[11]=Ne):Ne=e[11];let rt=Ne,ve,R,u,k,v,ge;if(e[12]!==c||e[13]!==l||e[14]!==ce||e[15]!==x||e[16]!==o||e[17]!==p||e[18]!==t||e[19]!==f){u=Je(f),R=s(()=>{if(u===void 0)return;let d=o;Re((async()=>{I(!0),w(null);let n;try{n={result:await l.query(ze,{time:u.epochMs},me(d))}}catch(g){n={error:Ce(g)}}p.current===d&&("result"in n?(Ee(n.result.forTime===void 0?null:{bookmark:n.result.forTime,shard:d}),y(n.result.current)):(Ee(null),w(n.error)),I(!1))})())},"C"),v=ce?.shard===o?ce.bookmark:null;let a;e[26]!==l||e[27]!==x||e[28]!==o?(a=s(d=>{Re((async()=>{I(!0),w(null);try{let n=await l.mutation(st,d,me(o));Ye(n),await x()}catch(n){let g=n;w(Ce(g)),Oe(g)==="PITR_UNAVAILABLE"&&Ve(!0)}I(!1)})())},"o"),e[26]=l,e[27]=x,e[28]=o,e[29]=a):a=e[29],k=a,ve=c.trim()!==""||u!==void 0,ge=t("Restore {shard} to {target}?",{shard:o===""?t("root"):o,target:c.trim()===""?u?.iso??"":t("the given bookmark")}),e[12]=c,e[13]=l,e[14]=ce,e[15]=x,e[16]=o,e[17]=p,e[18]=t,e[19]=f,e[20]=ve,e[21]=R,e[22]=u,e[23]=k,e[24]=v,e[25]=ge}else ve=e[20],R=e[21],u=e[22],k=e[23],v=e[24],ge=e[25];let Te=ge,ye;e[30]!==c||e[31]!==u?.epochMs||e[32]!==b||e[33]!==k?(ye=s(()=>{let a=b?{restart:!0}:{};c.trim()===""?a.time=u?.epochMs:a.bookmark=c.trim(),k(a)},"Ne"),e[30]=c,e[31]=u?.epochMs,e[32]=b,e[33]=k,e[34]=ye):ye=e[34];let Be=ye,we;e[35]!==b||e[36]!==i||e[37]!==k?(we=s(()=>{i!==null&&k(b?{bookmark:i.undoBookmark,restart:!0}:{bookmark:i.undoBookmark})},"ye"),e[35]=b,e[36]=i,e[37]=k,e[38]=we):we=e[38];let Ae=we,S;e[39]!==t?(S=t("Shard"),e[39]=t,e[40]=S):S=e[40];let T;e[41]!==o||e[42]!==t?(T=o===""?t("root"):o,e[41]=o,e[42]=t,e[43]=T):T=e[43];let B;e[44]!==T?(B=(0,r.jsx)("span",{className:"font-mono",children:T}),e[44]=T,e[45]=B):B=e[45];let A;e[46]!==S||e[47]!==B?(A=(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:[S,": ",B]})}),e[46]=S,e[47]=B,e[48]=A):A=e[48];let _;e[49]!==t?(_=t("In-place recovery to any moment in the last 30 days. For older or portable recovery, use the snapshot backup tier."),e[49]=t,e[50]=_):_=e[50];let L;e[51]!==_?(L=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"pitr-note",children:_}),e[51]=_,e[52]=L):L=e[52];let M;e[53]!==ue?(M=ue!==null&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"pitr-error",role:"alert",children:ue}),e[53]=ue,e[54]=M):M=e[54];let P;e[55]!==t?(P=t("Current bookmark"),e[55]=t,e[56]=P):P=e[56];let U;e[57]!==P?(U=(0,r.jsx)("h3",{className:"mb-2 text-sm font-semibold",children:P}),e[57]=P,e[58]=U):U=e[58];let F;e[59]!==N?(F=N??(0,r.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),e[59]=N,e[60]=F):F=e[60];let O;e[61]!==F?(O=(0,r.jsx)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-current",children:F}),e[61]=F,e[62]=O):O=e[62];let j;e[63]!==U||e[64]!==O?(j=(0,r.jsxs)("section",{className:"rounded-xl border border-border bg-card p-3 shadow-xs",children:[U,O]}),e[63]=U,e[64]=O,e[65]=j):j=e[65];let q;e[66]!==t?(q=t("Restore"),e[66]=t,e[67]=q):q=e[67];let z;e[68]!==q?(z=(0,r.jsx)("h3",{className:"text-sm font-semibold",children:q}),e[68]=q,e[69]=z):z=e[69];let D;e[70]!==t?(D=t("Time (ISO or epoch-ms, last 30 days)"),e[70]=t,e[71]=D):D=e[71];let E;e[72]!==D?(E=(0,r.jsx)(Se,{htmlFor:"pitr-time",children:D}),e[72]=D,e[73]=E):E=e[73];let V;e[74]!==f?(V=(0,r.jsx)(Ue,{"data-testid":"pitr-time",id:"pitr-time",onChange:et,placeholder:"2026-06-01T00:00:00.000Z",value:f}),e[74]=f,e[75]=V):V=e[75];let _e=de||C||u===void 0,K;e[76]!==t?(K=t("Preview"),e[76]=t,e[77]=K):K=e[77];let Z;e[78]!==R||e[79]!==_e||e[80]!==K?(Z=(0,r.jsx)($e,{"data-testid":"pitr-preview",disabled:_e,onClick:R,size:"sm",type:"button",variant:"outline",children:K}),e[78]=R,e[79]=_e,e[80]=K,e[81]=Z):Z=e[81];let $;e[82]!==V||e[83]!==Z?($=(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[V,Z]}),e[82]=V,e[83]=Z,e[84]=$):$=e[84];let G;e[85]!==f?(G=(0,r.jsx)(it,{text:f}),e[85]=f,e[86]=G):G=e[86];let H;e[87]!==v||e[88]!==t?(H=v!==null&&(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-preview-bookmark",children:[t("Bookmark for that time"),": ",v]}),e[87]=v,e[88]=t,e[89]=H):H=e[89];let J;e[90]!==E||e[91]!==$||e[92]!==G||e[93]!==H?(J=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[E,$,G,H]}),e[90]=E,e[91]=$,e[92]=G,e[93]=H,e[94]=J):J=e[94];let Q;e[95]!==t?(Q=t("Or an explicit bookmark (wins over time)"),e[95]=t,e[96]=Q):Q=e[96];let W;e[97]!==Q?(W=(0,r.jsx)(Se,{htmlFor:"pitr-bookmark",children:Q}),e[97]=Q,e[98]=W):W=e[98];let X;e[99]!==t?(X=t("bookmark string"),e[99]=t,e[100]=X):X=e[100];let Y;e[101]!==c||e[102]!==X?(Y=(0,r.jsx)(Ue,{"data-testid":"pitr-bookmark",id:"pitr-bookmark",onChange:tt,placeholder:X,value:c}),e[101]=c,e[102]=X,e[103]=Y):Y=e[103];let ee;e[104]!==W||e[105]!==Y?(ee=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[W,Y]}),e[104]=W,e[105]=Y,e[106]=ee):ee=e[106];let te;e[107]!==b?(te=(0,r.jsx)("input",{checked:b,className:"size-4 accent-primary","data-testid":"pitr-restart",id:"pitr-restart",onChange:rt,type:"checkbox"}),e[107]=b,e[108]=te):te=e[108];let re;e[109]!==t?(re=t("Restart the shard now so recovery applies immediately"),e[109]=t,e[110]=re):re=e[110];let oe;e[111]!==te||e[112]!==re?(oe=(0,r.jsxs)(Se,{className:"flex items-center gap-2 text-xs font-normal text-muted-foreground",htmlFor:"pitr-restart",children:[te,re]}),e[111]=te,e[112]=re,e[113]=oe):oe=e[113];let Le=de||C||!ve,ae;e[114]!==t?(ae=t("Restore"),e[114]=t,e[115]=ae):ae=e[115];let le;e[116]!==Te||e[117]!==Be||e[118]!==Le||e[119]!==ae?(le=(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:Te,disabled:Le,onConfirm:Be,testId:"pitr-restore",children:ae})}),e[116]=Te,e[117]=Be,e[118]=Le,e[119]=ae,e[120]=le):le=e[120];let se;e[121]!==z||e[122]!==J||e[123]!==ee||e[124]!==oe||e[125]!==le?(se=(0,r.jsxs)("section",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3 shadow-xs",children:[z,J,ee,oe,le]}),e[121]=z,e[122]=J,e[123]=ee,e[124]=oe,e[125]=le,e[126]=se):se=e[126];let ne;e[127]!==de||e[128]!==Ae||e[129]!==i||e[130]!==t||e[131]!==C?(ne=i!==null&&(0,r.jsxs)("section",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs","data-testid":"pitr-result",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:t("Restore armed")}),(0,r.jsx)(Ze,{variant:i.restarted?"destructive":"secondary",children:i.restarted?t("restarted now"):t("on next restart")})]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground",children:[t("Restored to"),": ",i.restoredTo]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-undo-bookmark",children:[t("Undo bookmark"),": ",i.undoBookmark]}),(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:t("Confirm undo"),disabled:de||C,onConfirm:Ae,testId:"pitr-undo",children:t("Undo restore")})})]}),e[127]=de,e[128]=Ae,e[129]=i,e[130]=t,e[131]=C,e[132]=ne):ne=e[132];let Ie;return e[133]!==A||e[134]!==L||e[135]!==M||e[136]!==j||e[137]!==se||e[138]!==ne?(Ie=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-pitr",children:[A,L,M,j,se,ne]}),e[133]=A,e[134]=L,e[135]=M,e[136]=j,e[137]=se,e[138]=ne,e[139]=Ie):Ie=e[139],Ie},"Nt");export{vt as PitrPanel};
1
+ import{a as He}from"./chunk-CGQMJYCW.js";import{a as Se}from"./chunk-37WYCOQ2.js";import{a as Ge}from"./chunk-EYTZURBK.js";import{a as qe}from"./chunk-LXCVA5SP.js";import{i as Ue}from"./chunk-E4PXACVL.js";import"./chunk-MVWZMWPD.js";import"./chunk-7Y3SY37W.js";import{a as $e}from"./chunk-7G4Z6Q7X.js";import"./chunk-3YXASVTP.js";import"./chunk-AUAECCXB.js";import{b as Ze}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{a as je}from"./chunk-4ZEL6BYL.js";import{l as Ke}from"./chunk-RGDSRUIX.js";import"./chunk-QAQDMS6R.js";import"./chunk-35Q6XYRL.js";import{d as Pe,f as Fe,g as me,h as Ce,i as Oe,q as Re}from"./chunk-74IYYDDI.js";import{a as s,d as Me,e as ot,f as at,g as lt}from"./chunk-I26MS5PJ.js";var De=Me(at(),1);var m=Me(ot(),1);var r=Me(lt(),1);var ze=Fe(je.getPitrBookmark),st=Fe(je.pitrRestore),nt=/^\d+$/u,Je=s(ie=>{let e=ie.trim(),h=nt.test(e)?Number(e):Date.parse(e),l=new Date(h);return Number.isNaN(l.getTime())?void 0:{epochMs:h,iso:l.toISOString()}},"De"),it=s(ie=>{let e=(0,De.c)(9),{text:h}=ie,l=Pe();if(h.trim()==="")return null;let t,o,p;if(e[0]!==l||e[1]!==h){let y=Je(h);t="font-mono text-xs text-muted-foreground",o="pitr-time-resolved",p=y===void 0?l("Not a time \u2014 use epoch-ms or ISO 8601."):l("Resolves to {instant} (a date-time without an offset is read in this browser's time zone; a bare date is UTC)",{instant:y.iso}),e[0]=l,e[1]=h,e[2]=t,e[3]=o,e[4]=p}else t=e[2],o=e[3],p=e[4];let N;return e[5]!==t||e[6]!==o||e[7]!==p?(N=(0,r.jsx)("p",{className:t,"data-testid":o,children:p}),e[5]=t,e[6]=o,e[7]=p,e[8]=N):N=e[8],N},"lt"),vt=s(ie=>{let e=(0,De.c)(140),{initialShardKey:h}=ie,l=Ke(),t=Pe(),o=h??"",p=He(o),[N,y]=(0,m.useState)(null),[f,Qe]=(0,m.useState)(""),[ce,Ee]=(0,m.useState)(null),[c,We]=(0,m.useState)(""),[b,Xe]=(0,m.useState)(!1),[i,Ye]=(0,m.useState)(null),[ue,w]=(0,m.useState)(null),[de,I]=(0,m.useState)(!1),[C,Ve]=(0,m.useState)(!1),pe;e[0]!==l||e[1]!==o?(pe=s(async a=>{I(!0),w(null);let d;try{d={current:(await l.query(ze,{},me(o))).current,error:null,unavailable:!1}}catch(n){let g=n;d={current:null,error:Ce(g),unavailable:Oe(g)==="PITR_UNAVAILABLE"}}a?.aborted!==!0&&(d.error===null?y(d.current):w(d.error),Ve(d.unavailable),I(!1))},"fe"),e[0]=l,e[1]=o,e[2]=pe):pe=e[2];let x=pe,he,fe;e[3]!==x?(he=s(()=>{let a=new AbortController;return Re(x(a.signal)),()=>{a.abort()}},"ue"),fe=[x],e[3]=x,e[4]=he,e[5]=fe):(he=e[4],fe=e[5]),(0,m.useEffect)(he,fe);let be;e[6]!==l||e[7]!==o?(be=s(async()=>{let a=await l.query(ze,{},me(o));y(a.current)},"he"),e[6]=l,e[7]=o,e[8]=be):be=e[8],Ge(be,!C);let xe;e[9]===Symbol.for("react.memo_cache_sentinel")?(xe=s(a=>{Qe(a.target.value)},"be"),e[9]=xe):xe=e[9];let et=xe,ke;e[10]===Symbol.for("react.memo_cache_sentinel")?(ke=s(a=>{We(a.target.value)},"xe"),e[10]=ke):ke=e[10];let tt=ke,Ne;e[11]===Symbol.for("react.memo_cache_sentinel")?(Ne=s(a=>{Xe(a.target.checked)},"ke"),e[11]=Ne):Ne=e[11];let rt=Ne,ve,R,u,k,v,ge;if(e[12]!==c||e[13]!==l||e[14]!==ce||e[15]!==x||e[16]!==o||e[17]!==p||e[18]!==t||e[19]!==f){u=Je(f),R=s(()=>{if(u===void 0)return;let d=o;Re((async()=>{I(!0),w(null);let n;try{n={result:await l.query(ze,{time:u.epochMs},me(d))}}catch(g){n={error:Ce(g)}}p.current===d&&("result"in n?(Ee(n.result.forTime===void 0?null:{bookmark:n.result.forTime,shard:d}),y(n.result.current)):(Ee(null),w(n.error)),I(!1))})())},"C"),v=ce?.shard===o?ce.bookmark:null;let a;e[26]!==l||e[27]!==x||e[28]!==o?(a=s(d=>{Re((async()=>{I(!0),w(null);try{let n=await l.mutation(st,d,me(o));Ye(n),await x()}catch(n){let g=n;w(Ce(g)),Oe(g)==="PITR_UNAVAILABLE"&&Ve(!0)}I(!1)})())},"o"),e[26]=l,e[27]=x,e[28]=o,e[29]=a):a=e[29],k=a,ve=c.trim()!==""||u!==void 0,ge=t("Restore {shard} to {target}?",{shard:o===""?t("root"):o,target:c.trim()===""?u?.iso??"":t("the given bookmark")}),e[12]=c,e[13]=l,e[14]=ce,e[15]=x,e[16]=o,e[17]=p,e[18]=t,e[19]=f,e[20]=ve,e[21]=R,e[22]=u,e[23]=k,e[24]=v,e[25]=ge}else ve=e[20],R=e[21],u=e[22],k=e[23],v=e[24],ge=e[25];let Te=ge,ye;e[30]!==c||e[31]!==u?.epochMs||e[32]!==b||e[33]!==k?(ye=s(()=>{let a=b?{restart:!0}:{};c.trim()===""?a.time=u?.epochMs:a.bookmark=c.trim(),k(a)},"Ne"),e[30]=c,e[31]=u?.epochMs,e[32]=b,e[33]=k,e[34]=ye):ye=e[34];let Be=ye,we;e[35]!==b||e[36]!==i||e[37]!==k?(we=s(()=>{i!==null&&k(b?{bookmark:i.undoBookmark,restart:!0}:{bookmark:i.undoBookmark})},"ye"),e[35]=b,e[36]=i,e[37]=k,e[38]=we):we=e[38];let Ae=we,S;e[39]!==t?(S=t("Shard"),e[39]=t,e[40]=S):S=e[40];let T;e[41]!==o||e[42]!==t?(T=o===""?t("root"):o,e[41]=o,e[42]=t,e[43]=T):T=e[43];let B;e[44]!==T?(B=(0,r.jsx)("span",{className:"font-mono",children:T}),e[44]=T,e[45]=B):B=e[45];let A;e[46]!==S||e[47]!==B?(A=(0,r.jsx)("div",{className:"flex flex-wrap items-center gap-3",children:(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:[S,": ",B]})}),e[46]=S,e[47]=B,e[48]=A):A=e[48];let _;e[49]!==t?(_=t("In-place recovery to any moment in the last 30 days. For older or portable recovery, use the snapshot backup tier."),e[49]=t,e[50]=_):_=e[50];let L;e[51]!==_?(L=(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"pitr-note",children:_}),e[51]=_,e[52]=L):L=e[52];let M;e[53]!==ue?(M=ue!==null&&(0,r.jsx)("p",{className:"text-sm text-destructive","data-testid":"pitr-error",role:"alert",children:ue}),e[53]=ue,e[54]=M):M=e[54];let P;e[55]!==t?(P=t("Current bookmark"),e[55]=t,e[56]=P):P=e[56];let U;e[57]!==P?(U=(0,r.jsx)("h3",{className:"mb-2 text-sm font-semibold",children:P}),e[57]=P,e[58]=U):U=e[58];let F;e[59]!==N?(F=N??(0,r.jsx)("span",{className:"text-muted-foreground",children:"\u2014"}),e[59]=N,e[60]=F):F=e[60];let O;e[61]!==F?(O=(0,r.jsx)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-current",children:F}),e[61]=F,e[62]=O):O=e[62];let j;e[63]!==U||e[64]!==O?(j=(0,r.jsxs)("section",{className:"rounded-xl border border-border bg-card p-3 shadow-xs",children:[U,O]}),e[63]=U,e[64]=O,e[65]=j):j=e[65];let q;e[66]!==t?(q=t("Restore"),e[66]=t,e[67]=q):q=e[67];let z;e[68]!==q?(z=(0,r.jsx)("h3",{className:"text-sm font-semibold",children:q}),e[68]=q,e[69]=z):z=e[69];let D;e[70]!==t?(D=t("Time (ISO or epoch-ms, last 30 days)"),e[70]=t,e[71]=D):D=e[71];let E;e[72]!==D?(E=(0,r.jsx)(Se,{htmlFor:"pitr-time",children:D}),e[72]=D,e[73]=E):E=e[73];let V;e[74]!==f?(V=(0,r.jsx)(Ue,{"data-testid":"pitr-time",id:"pitr-time",onChange:et,placeholder:"2026-06-01T00:00:00.000Z",value:f}),e[74]=f,e[75]=V):V=e[75];let _e=de||C||u===void 0,K;e[76]!==t?(K=t("Preview"),e[76]=t,e[77]=K):K=e[77];let Z;e[78]!==R||e[79]!==_e||e[80]!==K?(Z=(0,r.jsx)($e,{"data-testid":"pitr-preview",disabled:_e,onClick:R,size:"sm",type:"button",variant:"outline",children:K}),e[78]=R,e[79]=_e,e[80]=K,e[81]=Z):Z=e[81];let $;e[82]!==V||e[83]!==Z?($=(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[V,Z]}),e[82]=V,e[83]=Z,e[84]=$):$=e[84];let G;e[85]!==f?(G=(0,r.jsx)(it,{text:f}),e[85]=f,e[86]=G):G=e[86];let H;e[87]!==v||e[88]!==t?(H=v!==null&&(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-preview-bookmark",children:[t("Bookmark for that time"),": ",v]}),e[87]=v,e[88]=t,e[89]=H):H=e[89];let J;e[90]!==E||e[91]!==$||e[92]!==G||e[93]!==H?(J=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[E,$,G,H]}),e[90]=E,e[91]=$,e[92]=G,e[93]=H,e[94]=J):J=e[94];let Q;e[95]!==t?(Q=t("Or an explicit bookmark (wins over time)"),e[95]=t,e[96]=Q):Q=e[96];let W;e[97]!==Q?(W=(0,r.jsx)(Se,{htmlFor:"pitr-bookmark",children:Q}),e[97]=Q,e[98]=W):W=e[98];let X;e[99]!==t?(X=t("bookmark string"),e[99]=t,e[100]=X):X=e[100];let Y;e[101]!==c||e[102]!==X?(Y=(0,r.jsx)(Ue,{"data-testid":"pitr-bookmark",id:"pitr-bookmark",onChange:tt,placeholder:X,value:c}),e[101]=c,e[102]=X,e[103]=Y):Y=e[103];let ee;e[104]!==W||e[105]!==Y?(ee=(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[W,Y]}),e[104]=W,e[105]=Y,e[106]=ee):ee=e[106];let te;e[107]!==b?(te=(0,r.jsx)("input",{checked:b,className:"size-4 accent-primary","data-testid":"pitr-restart",id:"pitr-restart",onChange:rt,type:"checkbox"}),e[107]=b,e[108]=te):te=e[108];let re;e[109]!==t?(re=t("Restart the shard now so recovery applies immediately"),e[109]=t,e[110]=re):re=e[110];let oe;e[111]!==te||e[112]!==re?(oe=(0,r.jsxs)(Se,{className:"flex items-center gap-2 text-xs font-normal text-muted-foreground",htmlFor:"pitr-restart",children:[te,re]}),e[111]=te,e[112]=re,e[113]=oe):oe=e[113];let Le=de||C||!ve,ae;e[114]!==t?(ae=t("Restore"),e[114]=t,e[115]=ae):ae=e[115];let le;e[116]!==Te||e[117]!==Be||e[118]!==Le||e[119]!==ae?(le=(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:Te,disabled:Le,onConfirm:Be,testId:"pitr-restore",children:ae})}),e[116]=Te,e[117]=Be,e[118]=Le,e[119]=ae,e[120]=le):le=e[120];let se;e[121]!==z||e[122]!==J||e[123]!==ee||e[124]!==oe||e[125]!==le?(se=(0,r.jsxs)("section",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-3 shadow-xs",children:[z,J,ee,oe,le]}),e[121]=z,e[122]=J,e[123]=ee,e[124]=oe,e[125]=le,e[126]=se):se=e[126];let ne;e[127]!==de||e[128]!==Ae||e[129]!==i||e[130]!==t||e[131]!==C?(ne=i!==null&&(0,r.jsxs)("section",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs","data-testid":"pitr-result",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold",children:t("Restore armed")}),(0,r.jsx)(Ze,{variant:i.restarted?"destructive":"secondary",children:i.restarted?t("restarted now"):t("on next restart")})]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground",children:[t("Restored to"),": ",i.restoredTo]}),(0,r.jsxs)("p",{className:"font-mono text-xs break-all text-muted-foreground","data-testid":"pitr-undo-bookmark",children:[t("Undo bookmark"),": ",i.undoBookmark]}),(0,r.jsx)("div",{children:(0,r.jsx)(qe,{confirmLabel:t("Confirm undo"),disabled:de||C,onConfirm:Ae,testId:"pitr-undo",children:t("Undo restore")})})]}),e[127]=de,e[128]=Ae,e[129]=i,e[130]=t,e[131]=C,e[132]=ne):ne=e[132];let Ie;return e[133]!==A||e[134]!==L||e[135]!==M||e[136]!==j||e[137]!==se||e[138]!==ne?(Ie=(0,r.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-pitr",children:[A,L,M,j,se,ne]}),e[133]=A,e[134]=L,e[135]=M,e[136]=j,e[137]=se,e[138]=ne,e[139]=Ie):Ie=e[139],Ie},"Nt");export{vt as PitrPanel};
@@ -1 +1 @@
1
- import{b as me}from"./chunk-2I4NHEKA.js";import{a as $}from"./chunk-NCBLHBRW.js";import{a as ue}from"./chunk-EWMBX5N2.js";import"./chunk-OLIKYC3C.js";import"./chunk-AUGKHAMQ.js";import"./chunk-WJRYEML4.js";import{a as de}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import{b as P}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import"./chunk-55UGUCQ6.js";import{a as A}from"./chunk-4ZEL6BYL.js";import{c as ce}from"./chunk-DHGPCQ2F.js";import{l as ne,m as oe}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as C}from"./chunk-2IKDEUCX.js";import{d as D,f as I,g as Q,h as W,q as _,u as ie}from"./chunk-74IYYDDI.js";import{a as f,d as T,e as qe,f as ae,g as le,i as M}from"./chunk-I26MS5PJ.js";var Y=T(ae(),1);var h=T(qe(),1);var fe=T(ae(),1);var B=T(le(),1);var Me={connected:"bg-success",connecting:"bg-warning",idle:"bg-muted-foreground",offline:"bg-destructive",polling:"bg-warning"},he=f(()=>{let t=(0,fe.c)(18),e=D(),a=oe(),s;e:switch(a){case"connected":{let n;t[0]!==e?(n=e("Connected"),t[0]=e,t[1]=n):n=t[1],s=n;break e}case"connecting":{let n;t[2]!==e?(n=e("Connecting\u2026"),t[2]=e,t[3]=n):n=t[3],s=n;break e}case"idle":{let n;t[4]!==e?(n=e("Idle"),t[4]=e,t[5]=n):n=t[5],s=n;break e}case"offline":{let n;t[6]!==e?(n=e("Offline"),t[6]=e,t[7]=n):n=t[7],s=n;break e}case"polling":{let n;t[8]!==e?(n=e("Polling"),t[8]=e,t[9]=n):n=t[9],s=n;break e}default:s=a}let l=Me[a],c;t[10]!==l?(c=M("size-2 rounded-full",l),t[10]=l,t[11]=c):c=t[11];let i;t[12]!==c?(i=(0,B.jsx)("span",{"aria-hidden":"true",className:c}),t[12]=c,t[13]=i):i=t[13];let o;return t[14]!==a||t[15]!==i||t[16]!==s?(o=(0,B.jsxs)("span",{"aria-live":"polite",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground","data-status":a,"data-testid":"dash-connection",role:"status",children:[i,s]}),t[14]=a,t[15]=i,t[16]=s,t[17]=o):o=t[17],o},"T");var r=T(le(),1);var Ae={crit:"destructive",ok:"secondary",warn:"default"},U=f((t,e)=>e===0?"\u2014":`${(t/e*100).toFixed(1)}%`,"P"),X=f((t,e,a)=>Number.isNaN(t)?"ok":t>=a?"crit":t>=e?"warn":"ok","z"),xe=.01,ve=.05,je=f(t=>{let e=(0,Y.c)(36),{errorCount:a,logsError:s,topErrors:l,worstFunctions:c}=t,i=D(),o;e[0]!==i?(o=i("Functions by error rate"),e[0]=i,e[1]=o):o=e[1];let n;e[2]!==o?(n=(0,r.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[2]=o,e[3]=n):n=e[3];let m;e[4]!==i||e[5]!==c?(m=c.length===0?(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-functions-empty",children:i("No function activity yet.")}):(0,r.jsx)("ul",{className:"divide-y divide-border",children:c.map(w=>(0,r.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2 text-xs","data-testid":"hl-fn-row",children:[(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:w.path}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,r.jsx)("span",{className:"tabular-nums text-muted-foreground",children:i("{count} calls",{count:w.calls.toString()})}),(0,r.jsx)(P,{variant:Ae[X(w.errors/w.calls,xe,ve)],children:U(w.errors,w.calls)})]})]},w.path))}),e[4]=i,e[5]=c,e[6]=m):m=e[6];let p;e[7]!==n||e[8]!==m?(p=(0,r.jsxs)(C,{className:"gap-0 py-0","data-testid":"hl-functions",children:[n,m]}),e[7]=n,e[8]=m,e[9]=p):p=e[9];let v;e[10]!==i?(v=i("Recent errors"),e[10]=i,e[11]=v):v=e[11];let d;e[12]!==v?(d=(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:v}),e[12]=v,e[13]=d):d=e[13];let u=a>0?"destructive":"outline",g;e[14]!==a||e[15]!==u?(g=(0,r.jsx)(P,{"data-testid":"hl-error-count",variant:u,children:a}),e[14]=a,e[15]=u,e[16]=g):g=e[16];let x;e[17]!==d||e[18]!==g?(x=(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=x):x=e[19];let S;e[20]!==s?(S=s!==null&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"hl-logs-error",role:"alert",children:s}),e[20]=s,e[21]=S):S=e[21];let E;e[22]!==s||e[23]!==i||e[24]!==l.length?(E=s===null&&l.length===0&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-errors-empty",children:i("No recent errors.")}),e[22]=s,e[23]=i,e[24]=l.length,e[25]=E):E=e[25];let q;e[26]!==l?(q=l.length>0&&(0,r.jsx)("ul",{className:"divide-y divide-border",children:l.map(Ce)}),e[26]=l,e[27]=q):q=e[27];let N;e[28]!==S||e[29]!==E||e[30]!==q||e[31]!==x?(N=(0,r.jsxs)(C,{className:"gap-0 py-0",children:[x,S,E,q]}),e[28]=S,e[29]=E,e[30]=q,e[31]=x,e[32]=N):N=e[32];let k;return e[33]!==N||e[34]!==p?(k=(0,r.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[p,N]}),e[33]=N,e[34]=p,e[35]=k):k=e[35],k},"ye");function Ce(t,e){return(0,r.jsxs)("li",{className:"flex flex-col gap-0.5 px-4 py-2 text-xs","data-testid":"hl-error-row",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("time",{className:"shrink-0 text-muted-foreground",children:ie(t.timestamp)}),t.functionPath!==void 0&&(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:t.functionPath})]}),(0,r.jsx)("span",{className:"text-destructive",children:t.message})]},`${t.timestamp.toString()}-${e.toString()}`)}f(Ce,"Te");var pe={completed:0,failed:2,in_progress:1},Ie=f(t=>{let e=0,a=0,s=0,l=0,c=!1,i=[];for(let{metrics:o}of t){if(o===null){l+=1;continue}s+=1,e+=o.requests,a+=o.errors,i.push(...o.history??[]),c||=o.historyTruncated===!0}return{errors:a,failed:l,history:i,historyTruncated:c,reachable:s,requests:e}},"Ae"),Te=f(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.path);if(l===void 0){e.set(s.path,{...s});continue}l.calls+=s.calls,l.errors+=s.errors,l.totalDurationMs+=s.totalDurationMs,l.scans=(l.scans??0)+(s.scans??0),l.maxDurationMs=Math.max(l.maxDurationMs,s.maxDurationMs),l.lastCalledAt=Math.max(l.lastCalledAt,s.lastCalledAt),(s.lastErrorAt??0)>(l.lastErrorAt??0)&&(l.lastErrorAt=s.lastErrorAt,l.lastErrorMessage=s.lastErrorMessage)}return[...e.values()]},"ke"),De=f(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.id);if(l===void 0){e.set(s.id,s);continue}let c=pe[s.status]-pe[l.status];(c>0||c===0&&(s.updatedAt??0)>(l.updatedAt??0))&&e.set(s.id,s)}return[...e.values()]},"Re"),Pe=I(A.getAuthMetrics),Fe=I(A.getFunctionStats),Le=I(A.getLogs),Re=I(A.getMetrics),ze=I(A.migrationStatus),Oe=5,ge=2e3,Ke=5,_e=.1,$e=.3,Be=1,He=50,Ue=f((t,e,a)=>t>=a?"crit":t>=e?"warn":"ok","Pe"),Ge=f(t=>{let e=new Map;for(let s of t??[]){let l=e.get(s.bucketMs)??{calls:0,errors:0};l.calls+=s.calls,l.errors+=s.errors,e.set(s.bucketMs,l)}let a=[...e.entries()].toSorted((s,l)=>s[0]-l[0]);return{errors:a.map(([,s])=>s.errors),requests:a.map(([,s])=>s.calls)}},"Ge"),Ve=f(t=>{let e=0,a=0;for(let l of t)l.status==="failed"?e+=1:l.status==="in_progress"&&(a+=1);let s="ok";return e>0?s="crit":a>0&&(s="warn"),{failed:e,level:s,running:a}},"Ve"),Je=f((t,e)=>t.failed>0?e("{count} failed",{count:t.failed.toString()}):t.running>0?e("{count} running",{count:t.running.toString()}):e("OK"),"Be"),be={crit:"bg-destructive",ok:"bg-success",warn:"bg-warning"},Ne={crit:"text-destructive",ok:"text-foreground",warn:"text-warning"},Qe={crit:"bg-destructive/10 text-destructive",ok:"bg-success/10 text-success",warn:"bg-warning/10 text-warning"},We=f(t=>t.includes("crit")?"crit":t.includes("warn")?"warn":"ok","Ke"),H=f(t=>{let e=(0,Y.c)(19),{chart:a,label:s,level:l,testId:c,value:i}=t,o=be[l],n;e[0]!==o?(n=M("size-1.5 shrink-0 rounded-full",o),e[0]=o,e[1]=n):n=e[1];let m;e[2]!==n?(m=(0,r.jsx)("span",{"aria-hidden":"true",className:n}),e[2]=n,e[3]=m):m=e[3];let p;e[4]!==s||e[5]!==m?(p=(0,r.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:[m,s]}),e[4]=s,e[5]=m,e[6]=p):p=e[6];let v=Ne[l],d;e[7]!==v?(d=M("truncate text-2xl font-semibold tabular-nums",v),e[7]=v,e[8]=d):d=e[8];let u;e[9]!==d||e[10]!==c||e[11]!==i?(u=(0,r.jsx)("span",{className:d,"data-testid":c,children:i}),e[9]=d,e[10]=c,e[11]=i,e[12]=u):u=e[12];let g;e[13]!==a||e[14]!==u?(g=(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[u,a]}),e[13]=a,e[14]=u,e[15]=g):g=e[15];let x;return e[16]!==p||e[17]!==g?(x=(0,r.jsx)(C,{className:"gap-0 py-0",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[p,g]})}),e[16]=p,e[17]=g,e[18]=x):x=e[18],x},"U"),Xe=f(async(t,e,a)=>{let s=await Promise.all(a.map(d=>{let u=Q(d);return Promise.allSettled([t.query(Re,{},u),t.query(Fe,{},u),t.query(ze,{},u)])})),l=Q(e),c=typeof t.schedulerStatus=="function"?t.schedulerStatus():Promise.reject(new Error("scheduler status unavailable")),[i,o,n]=await Promise.allSettled([t.query(Le,{},l),t.query(Pe,{},l),c]),m=s.map(([d,u,g])=>({functions:u.status==="fulfilled"?u.value.functions:[],metrics:d.status==="fulfilled"?d.value:null,migrations:g.status==="fulfilled"?g.value.migrations:[]})),p=Ie(m),v=s[0]?.[0];return{auth:o.status==="fulfilled"?o.value:null,entries:i.status==="fulfilled"?i.value.entries:[],functions:Te(m.map(d=>d.functions)),logsError:i.status==="rejected"?W(i.reason):null,metricsError:p.reachable===0&&v?.status==="rejected"?W(v.reason):null,migrations:De(m.map(d=>d.migrations)),scheduler:n.status==="fulfilled"?n.value:null,totals:p}},"$e"),Ye=f(t=>{let e=t?.history??[];return{attempts:e.map(a=>a.attempts),failures:e.map(a=>a.failures)}},"ze"),xt=f(({initialShardKey:t})=>{let e=ne(),a=D(),[s,l]=(0,h.useState)([]),[c,i]=(0,h.useState)(null),[o,n]=(0,h.useState)(null),[m,p]=(0,h.useState)(null),[v,d]=(0,h.useState)([]),[u,g]=(0,h.useState)(null),[x,S]=(0,h.useState)(null),[E,q]=(0,h.useState)([]),[N]=(0,h.useState)(de),k=(0,h.useRef)(!1),w=(0,h.useRef)(0),G=(0,h.useRef)(0),j=(0,h.useRef)(null),F=t??"",L=(0,h.useCallback)(async()=>{if(k.current)return;k.current=!0;let b=w.current,y=await Xe(e,F,me(F,N));b===w.current&&(n(y.totals),p(y.metricsError),d(y.functions),q(y.migrations),l(y.entries),i(y.logsError),g(y.auth),S(y.scheduler),k.current=!1)},[e,N,F]);(0,h.useEffect)(()=>(_(L()),()=>{w.current+=1,k.current=!1,j.current!==null&&(clearTimeout(j.current),j.current=null)}),[L]);let ye=f(()=>{let b=Date.now()-G.current;if(b>=ge){G.current=Date.now(),_(L());return}j.current===null&&(j.current=setTimeout(()=>{j.current=null,G.current=Date.now(),_(L())},ge-b))},"ue"),{data:Z,liveError:we}=ce(A.getMetrics,{},{live:!0,shardKey:F});(0,h.useEffect)(()=>{Z!==void 0&&ye()},[Z]);let ee=s.filter(b=>b.level==="error"),ke=ee.slice(0,Oe),R=Ge(o?.history),te=Ye(u),Se=v.filter(b=>b.calls>0).toSorted((b,y)=>y.errors/y.calls-b.errors/b.calls||y.calls-b.calls).slice(0,Ke),V=Ve(E),Ee=o===null||o.requests===0?0:o.errors/o.requests,J=X(Ee,xe,ve),re=u===null?"ok":X(u.failureRate,_e,$e),se=x===null?"ok":Ue(x.backlog,Be,He),z=We([J,re,se,V.level]),O,K;return z==="crit"?(O=a("Critical"),K=a("One or more service levels are breached.")):z==="warn"?(O=a("Degraded"),K=a("Some service levels need attention.")):(O=a("All systems healthy"),K=a("All service levels are within target.")),(0,r.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-health",children:[(0,r.jsxs)(C,{className:"gap-0 py-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:M("flex size-10 shrink-0 items-center justify-center rounded-full",Qe[z]),children:(0,r.jsx)("span",{className:M("size-3 rounded-full",be[z])})}),(0,r.jsxs)("div",{className:"grid leading-tight",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground","data-testid":"hl-status",children:O}),(0,r.jsx)("span",{className:"text-[13px] text-muted-foreground",children:K})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Requests")}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[R.requests.length>=2&&(0,r.jsx)($,{ariaLabel:a("Requests over time"),className:"h-6 w-20 text-foreground",series:R.requests,testId:"hl-spark-requests"}),(0,r.jsx)("span",{className:"text-lg font-semibold tabular-nums text-foreground","data-testid":"hl-requests",children:(o?.requests??0).toString()})]})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Error rate")}),(0,r.jsx)("div",{className:M("text-lg font-semibold tabular-nums",Ne[J]),"data-testid":"hl-error-rate",children:o===null?"\u2014":U(o.errors,o.requests)})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(he,{}),(0,r.jsx)(ue,{message:we,prefix:"hl"})]})]})]}),m!==null&&(0,r.jsx)("div",{className:"border-t border-border bg-destructive/5 px-4 py-2 text-sm text-destructive","data-testid":"hl-metrics-error",role:"alert",children:m}),m===null&&o?.historyTruncated===!0&&(0,r.jsx)("div",{className:"border-t border-border bg-warning/5 px-4 py-2 text-sm text-muted-foreground","data-testid":"hl-history-truncated",children:a("Showing a partial request/error history \u2014 one or more shards have more data than the trend chart can display.")})]}),(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4","data-testid":"hl-slo",children:[(0,r.jsx)(H,{chart:R.errors.length>=2?(0,r.jsx)($,{ariaLabel:a("Errors over time"),className:"h-7 w-20 text-destructive",series:R.errors,testId:"hl-spark-errors"}):void 0,label:a("Error rate"),level:J,testId:"hl-slo-errorrate",value:o===null?"\u2014":U(o.errors,o.requests)}),(0,r.jsx)(H,{chart:te.failures.length>=2?(0,r.jsx)($,{ariaLabel:a("Auth failures over time"),className:"h-7 w-20 text-destructive",series:te.failures,testId:"hl-spark-auth"}):void 0,label:a("Auth failures"),level:re,testId:"hl-slo-auth",value:u===null?"\u2014":U(u.failures,u.attempts)}),(0,r.jsx)(H,{label:a("Scheduler backlog"),level:se,testId:"hl-slo-backlog",value:x===null?"\u2014":x.backlog.toString()}),(0,r.jsx)(H,{label:a("Migrations"),level:V.level,testId:"hl-slo-migrations",value:Je(V,a)})]}),(0,r.jsx)(je,{errorCount:ee.length,logsError:c,topErrors:ke,worstFunctions:Se}),(0,r.jsxs)(C,{className:"gap-0 py-0",children:[(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Shards seen")}),(0,r.jsx)(P,{"data-testid":"hl-shard-count",variant:"outline",children:N.length})]}),N.length>0&&(0,r.jsx)("ul",{className:"flex flex-wrap gap-1.5 p-4",children:N.map(b=>(0,r.jsx)("li",{"data-testid":"hl-shard",children:(0,r.jsx)(P,{variant:"secondary",children:b})},b))})]})]})},"ut");export{xt as HealthPanel};
1
+ import{b as me}from"./chunk-2I4NHEKA.js";import{a as $}from"./chunk-GWCMBJ2U.js";import{a as ue}from"./chunk-EWMBX5N2.js";import"./chunk-3BCMZMOX.js";import"./chunk-AUGKHAMQ.js";import"./chunk-WJRYEML4.js";import{a as de}from"./chunk-ZKJS6EBE.js";import"./chunk-RGMVGZV4.js";import"./chunk-SJQERRSZ.js";import"./chunk-7Y3SY37W.js";import{b as P}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import"./chunk-55UGUCQ6.js";import{a as A}from"./chunk-4ZEL6BYL.js";import{c as ce}from"./chunk-DFVQBXUZ.js";import{l as ne,m as oe}from"./chunk-RGDSRUIX.js";import"./chunk-QAQDMS6R.js";import"./chunk-35Q6XYRL.js";import{a as C}from"./chunk-2IKDEUCX.js";import{d as D,f as I,g as Q,h as W,q as _,u as ie}from"./chunk-74IYYDDI.js";import{a as f,d as T,e as qe,f as ae,g as le,i as M}from"./chunk-I26MS5PJ.js";var Y=T(ae(),1);var h=T(qe(),1);var fe=T(ae(),1);var B=T(le(),1);var Me={connected:"bg-success",connecting:"bg-warning",idle:"bg-muted-foreground",offline:"bg-destructive",polling:"bg-warning"},he=f(()=>{let t=(0,fe.c)(18),e=D(),a=oe(),s;e:switch(a){case"connected":{let n;t[0]!==e?(n=e("Connected"),t[0]=e,t[1]=n):n=t[1],s=n;break e}case"connecting":{let n;t[2]!==e?(n=e("Connecting\u2026"),t[2]=e,t[3]=n):n=t[3],s=n;break e}case"idle":{let n;t[4]!==e?(n=e("Idle"),t[4]=e,t[5]=n):n=t[5],s=n;break e}case"offline":{let n;t[6]!==e?(n=e("Offline"),t[6]=e,t[7]=n):n=t[7],s=n;break e}case"polling":{let n;t[8]!==e?(n=e("Polling"),t[8]=e,t[9]=n):n=t[9],s=n;break e}default:s=a}let l=Me[a],c;t[10]!==l?(c=M("size-2 rounded-full",l),t[10]=l,t[11]=c):c=t[11];let i;t[12]!==c?(i=(0,B.jsx)("span",{"aria-hidden":"true",className:c}),t[12]=c,t[13]=i):i=t[13];let o;return t[14]!==a||t[15]!==i||t[16]!==s?(o=(0,B.jsxs)("span",{"aria-live":"polite",className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground","data-status":a,"data-testid":"dash-connection",role:"status",children:[i,s]}),t[14]=a,t[15]=i,t[16]=s,t[17]=o):o=t[17],o},"T");var r=T(le(),1);var Ae={crit:"destructive",ok:"secondary",warn:"default"},U=f((t,e)=>e===0?"\u2014":`${(t/e*100).toFixed(1)}%`,"P"),X=f((t,e,a)=>Number.isNaN(t)?"ok":t>=a?"crit":t>=e?"warn":"ok","z"),xe=.01,ve=.05,je=f(t=>{let e=(0,Y.c)(36),{errorCount:a,logsError:s,topErrors:l,worstFunctions:c}=t,i=D(),o;e[0]!==i?(o=i("Functions by error rate"),e[0]=i,e[1]=o):o=e[1];let n;e[2]!==o?(n=(0,r.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o})}),e[2]=o,e[3]=n):n=e[3];let m;e[4]!==i||e[5]!==c?(m=c.length===0?(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-functions-empty",children:i("No function activity yet.")}):(0,r.jsx)("ul",{className:"divide-y divide-border",children:c.map(w=>(0,r.jsxs)("li",{className:"flex flex-wrap items-center justify-between gap-2 px-4 py-2 text-xs","data-testid":"hl-fn-row",children:[(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:w.path}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,r.jsx)("span",{className:"tabular-nums text-muted-foreground",children:i("{count} calls",{count:w.calls.toString()})}),(0,r.jsx)(P,{variant:Ae[X(w.errors/w.calls,xe,ve)],children:U(w.errors,w.calls)})]})]},w.path))}),e[4]=i,e[5]=c,e[6]=m):m=e[6];let p;e[7]!==n||e[8]!==m?(p=(0,r.jsxs)(C,{className:"gap-0 py-0","data-testid":"hl-functions",children:[n,m]}),e[7]=n,e[8]=m,e[9]=p):p=e[9];let v;e[10]!==i?(v=i("Recent errors"),e[10]=i,e[11]=v):v=e[11];let d;e[12]!==v?(d=(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:v}),e[12]=v,e[13]=d):d=e[13];let u=a>0?"destructive":"outline",g;e[14]!==a||e[15]!==u?(g=(0,r.jsx)(P,{"data-testid":"hl-error-count",variant:u,children:a}),e[14]=a,e[15]=u,e[16]=g):g=e[16];let x;e[17]!==d||e[18]!==g?(x=(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[d,g]}),e[17]=d,e[18]=g,e[19]=x):x=e[19];let S;e[20]!==s?(S=s!==null&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"hl-logs-error",role:"alert",children:s}),e[20]=s,e[21]=S):S=e[21];let E;e[22]!==s||e[23]!==i||e[24]!==l.length?(E=s===null&&l.length===0&&(0,r.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"hl-errors-empty",children:i("No recent errors.")}),e[22]=s,e[23]=i,e[24]=l.length,e[25]=E):E=e[25];let q;e[26]!==l?(q=l.length>0&&(0,r.jsx)("ul",{className:"divide-y divide-border",children:l.map(Ce)}),e[26]=l,e[27]=q):q=e[27];let N;e[28]!==S||e[29]!==E||e[30]!==q||e[31]!==x?(N=(0,r.jsxs)(C,{className:"gap-0 py-0",children:[x,S,E,q]}),e[28]=S,e[29]=E,e[30]=q,e[31]=x,e[32]=N):N=e[32];let k;return e[33]!==N||e[34]!==p?(k=(0,r.jsxs)("div",{className:"grid gap-3 lg:grid-cols-2",children:[p,N]}),e[33]=N,e[34]=p,e[35]=k):k=e[35],k},"ye");function Ce(t,e){return(0,r.jsxs)("li",{className:"flex flex-col gap-0.5 px-4 py-2 text-xs","data-testid":"hl-error-row",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("time",{className:"shrink-0 text-muted-foreground",children:ie(t.timestamp)}),t.functionPath!==void 0&&(0,r.jsx)("span",{className:"truncate font-mono text-foreground",children:t.functionPath})]}),(0,r.jsx)("span",{className:"text-destructive",children:t.message})]},`${t.timestamp.toString()}-${e.toString()}`)}f(Ce,"Te");var pe={completed:0,failed:2,in_progress:1},Ie=f(t=>{let e=0,a=0,s=0,l=0,c=!1,i=[];for(let{metrics:o}of t){if(o===null){l+=1;continue}s+=1,e+=o.requests,a+=o.errors,i.push(...o.history??[]),c||=o.historyTruncated===!0}return{errors:a,failed:l,history:i,historyTruncated:c,reachable:s,requests:e}},"Ae"),Te=f(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.path);if(l===void 0){e.set(s.path,{...s});continue}l.calls+=s.calls,l.errors+=s.errors,l.totalDurationMs+=s.totalDurationMs,l.scans=(l.scans??0)+(s.scans??0),l.maxDurationMs=Math.max(l.maxDurationMs,s.maxDurationMs),l.lastCalledAt=Math.max(l.lastCalledAt,s.lastCalledAt),(s.lastErrorAt??0)>(l.lastErrorAt??0)&&(l.lastErrorAt=s.lastErrorAt,l.lastErrorMessage=s.lastErrorMessage)}return[...e.values()]},"ke"),De=f(t=>{let e=new Map;for(let a of t)for(let s of a){let l=e.get(s.id);if(l===void 0){e.set(s.id,s);continue}let c=pe[s.status]-pe[l.status];(c>0||c===0&&(s.updatedAt??0)>(l.updatedAt??0))&&e.set(s.id,s)}return[...e.values()]},"Re"),Pe=I(A.getAuthMetrics),Fe=I(A.getFunctionStats),Le=I(A.getLogs),Re=I(A.getMetrics),ze=I(A.migrationStatus),Oe=5,ge=2e3,Ke=5,_e=.1,$e=.3,Be=1,He=50,Ue=f((t,e,a)=>t>=a?"crit":t>=e?"warn":"ok","Pe"),Ge=f(t=>{let e=new Map;for(let s of t??[]){let l=e.get(s.bucketMs)??{calls:0,errors:0};l.calls+=s.calls,l.errors+=s.errors,e.set(s.bucketMs,l)}let a=[...e.entries()].toSorted((s,l)=>s[0]-l[0]);return{errors:a.map(([,s])=>s.errors),requests:a.map(([,s])=>s.calls)}},"Ge"),Ve=f(t=>{let e=0,a=0;for(let l of t)l.status==="failed"?e+=1:l.status==="in_progress"&&(a+=1);let s="ok";return e>0?s="crit":a>0&&(s="warn"),{failed:e,level:s,running:a}},"Ve"),Je=f((t,e)=>t.failed>0?e("{count} failed",{count:t.failed.toString()}):t.running>0?e("{count} running",{count:t.running.toString()}):e("OK"),"Be"),be={crit:"bg-destructive",ok:"bg-success",warn:"bg-warning"},Ne={crit:"text-destructive",ok:"text-foreground",warn:"text-warning"},Qe={crit:"bg-destructive/10 text-destructive",ok:"bg-success/10 text-success",warn:"bg-warning/10 text-warning"},We=f(t=>t.includes("crit")?"crit":t.includes("warn")?"warn":"ok","Ke"),H=f(t=>{let e=(0,Y.c)(19),{chart:a,label:s,level:l,testId:c,value:i}=t,o=be[l],n;e[0]!==o?(n=M("size-1.5 shrink-0 rounded-full",o),e[0]=o,e[1]=n):n=e[1];let m;e[2]!==n?(m=(0,r.jsx)("span",{"aria-hidden":"true",className:n}),e[2]=n,e[3]=m):m=e[3];let p;e[4]!==s||e[5]!==m?(p=(0,r.jsxs)("span",{className:"flex items-center gap-1.5 font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:[m,s]}),e[4]=s,e[5]=m,e[6]=p):p=e[6];let v=Ne[l],d;e[7]!==v?(d=M("truncate text-2xl font-semibold tabular-nums",v),e[7]=v,e[8]=d):d=e[8];let u;e[9]!==d||e[10]!==c||e[11]!==i?(u=(0,r.jsx)("span",{className:d,"data-testid":c,children:i}),e[9]=d,e[10]=c,e[11]=i,e[12]=u):u=e[12];let g;e[13]!==a||e[14]!==u?(g=(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[u,a]}),e[13]=a,e[14]=u,e[15]=g):g=e[15];let x;return e[16]!==p||e[17]!==g?(x=(0,r.jsx)(C,{className:"gap-0 py-0",children:(0,r.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[p,g]})}),e[16]=p,e[17]=g,e[18]=x):x=e[18],x},"U"),Xe=f(async(t,e,a)=>{let s=await Promise.all(a.map(d=>{let u=Q(d);return Promise.allSettled([t.query(Re,{},u),t.query(Fe,{},u),t.query(ze,{},u)])})),l=Q(e),c=typeof t.schedulerStatus=="function"?t.schedulerStatus():Promise.reject(new Error("scheduler status unavailable")),[i,o,n]=await Promise.allSettled([t.query(Le,{},l),t.query(Pe,{},l),c]),m=s.map(([d,u,g])=>({functions:u.status==="fulfilled"?u.value.functions:[],metrics:d.status==="fulfilled"?d.value:null,migrations:g.status==="fulfilled"?g.value.migrations:[]})),p=Ie(m),v=s[0]?.[0];return{auth:o.status==="fulfilled"?o.value:null,entries:i.status==="fulfilled"?i.value.entries:[],functions:Te(m.map(d=>d.functions)),logsError:i.status==="rejected"?W(i.reason):null,metricsError:p.reachable===0&&v?.status==="rejected"?W(v.reason):null,migrations:De(m.map(d=>d.migrations)),scheduler:n.status==="fulfilled"?n.value:null,totals:p}},"$e"),Ye=f(t=>{let e=t?.history??[];return{attempts:e.map(a=>a.attempts),failures:e.map(a=>a.failures)}},"ze"),xt=f(({initialShardKey:t})=>{let e=ne(),a=D(),[s,l]=(0,h.useState)([]),[c,i]=(0,h.useState)(null),[o,n]=(0,h.useState)(null),[m,p]=(0,h.useState)(null),[v,d]=(0,h.useState)([]),[u,g]=(0,h.useState)(null),[x,S]=(0,h.useState)(null),[E,q]=(0,h.useState)([]),[N]=(0,h.useState)(de),k=(0,h.useRef)(!1),w=(0,h.useRef)(0),G=(0,h.useRef)(0),j=(0,h.useRef)(null),F=t??"",L=(0,h.useCallback)(async()=>{if(k.current)return;k.current=!0;let b=w.current,y=await Xe(e,F,me(F,N));b===w.current&&(n(y.totals),p(y.metricsError),d(y.functions),q(y.migrations),l(y.entries),i(y.logsError),g(y.auth),S(y.scheduler),k.current=!1)},[e,N,F]);(0,h.useEffect)(()=>(_(L()),()=>{w.current+=1,k.current=!1,j.current!==null&&(clearTimeout(j.current),j.current=null)}),[L]);let ye=f(()=>{let b=Date.now()-G.current;if(b>=ge){G.current=Date.now(),_(L());return}j.current===null&&(j.current=setTimeout(()=>{j.current=null,G.current=Date.now(),_(L())},ge-b))},"ue"),{data:Z,liveError:we}=ce(A.getMetrics,{},{live:!0,shardKey:F});(0,h.useEffect)(()=>{Z!==void 0&&ye()},[Z]);let ee=s.filter(b=>b.level==="error"),ke=ee.slice(0,Oe),R=Ge(o?.history),te=Ye(u),Se=v.filter(b=>b.calls>0).toSorted((b,y)=>y.errors/y.calls-b.errors/b.calls||y.calls-b.calls).slice(0,Ke),V=Ve(E),Ee=o===null||o.requests===0?0:o.errors/o.requests,J=X(Ee,xe,ve),re=u===null?"ok":X(u.failureRate,_e,$e),se=x===null?"ok":Ue(x.backlog,Be,He),z=We([J,re,se,V.level]),O,K;return z==="crit"?(O=a("Critical"),K=a("One or more service levels are breached.")):z==="warn"?(O=a("Degraded"),K=a("Some service levels need attention.")):(O=a("All systems healthy"),K=a("All service levels are within target.")),(0,r.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-health",children:[(0,r.jsxs)(C,{className:"gap-0 py-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:M("flex size-10 shrink-0 items-center justify-center rounded-full",Qe[z]),children:(0,r.jsx)("span",{className:M("size-3 rounded-full",be[z])})}),(0,r.jsxs)("div",{className:"grid leading-tight",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-foreground","data-testid":"hl-status",children:O}),(0,r.jsx)("span",{className:"text-[13px] text-muted-foreground",children:K})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Requests")}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[R.requests.length>=2&&(0,r.jsx)($,{ariaLabel:a("Requests over time"),className:"h-6 w-20 text-foreground",series:R.requests,testId:"hl-spark-requests"}),(0,r.jsx)("span",{className:"text-lg font-semibold tabular-nums text-foreground","data-testid":"hl-requests",children:(o?.requests??0).toString()})]})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"text-end",children:[(0,r.jsx)("div",{className:"font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:a("Error rate")}),(0,r.jsx)("div",{className:M("text-lg font-semibold tabular-nums",Ne[J]),"data-testid":"hl-error-rate",children:o===null?"\u2014":U(o.errors,o.requests)})]}),(0,r.jsx)("span",{"aria-hidden":"true",className:"h-9 w-px bg-border"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(he,{}),(0,r.jsx)(ue,{message:we,prefix:"hl"})]})]})]}),m!==null&&(0,r.jsx)("div",{className:"border-t border-border bg-destructive/5 px-4 py-2 text-sm text-destructive","data-testid":"hl-metrics-error",role:"alert",children:m}),m===null&&o?.historyTruncated===!0&&(0,r.jsx)("div",{className:"border-t border-border bg-warning/5 px-4 py-2 text-sm text-muted-foreground","data-testid":"hl-history-truncated",children:a("Showing a partial request/error history \u2014 one or more shards have more data than the trend chart can display.")})]}),(0,r.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4","data-testid":"hl-slo",children:[(0,r.jsx)(H,{chart:R.errors.length>=2?(0,r.jsx)($,{ariaLabel:a("Errors over time"),className:"h-7 w-20 text-destructive",series:R.errors,testId:"hl-spark-errors"}):void 0,label:a("Error rate"),level:J,testId:"hl-slo-errorrate",value:o===null?"\u2014":U(o.errors,o.requests)}),(0,r.jsx)(H,{chart:te.failures.length>=2?(0,r.jsx)($,{ariaLabel:a("Auth failures over time"),className:"h-7 w-20 text-destructive",series:te.failures,testId:"hl-spark-auth"}):void 0,label:a("Auth failures"),level:re,testId:"hl-slo-auth",value:u===null?"\u2014":U(u.failures,u.attempts)}),(0,r.jsx)(H,{label:a("Scheduler backlog"),level:se,testId:"hl-slo-backlog",value:x===null?"\u2014":x.backlog.toString()}),(0,r.jsx)(H,{label:a("Migrations"),level:V.level,testId:"hl-slo-migrations",value:Je(V,a)})]}),(0,r.jsx)(je,{errorCount:ee.length,logsError:c,topErrors:ke,worstFunctions:Se}),(0,r.jsxs)(C,{className:"gap-0 py-0",children:[(0,r.jsxs)("header",{className:"flex items-center justify-between gap-2 border-b border-border px-4 py-3",children:[(0,r.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:a("Shards seen")}),(0,r.jsx)(P,{"data-testid":"hl-shard-count",variant:"outline",children:N.length})]}),N.length>0&&(0,r.jsx)("ul",{className:"flex flex-wrap gap-1.5 p-4",children:N.map(b=>(0,r.jsx)("li",{"data-testid":"hl-shard",children:(0,r.jsx)(P,{variant:"secondary",children:b})},b))})]})]})},"ut");export{xt as HealthPanel};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-5SLTDY4C.js";import{b as x}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{b as z}from"./chunk-DHGPCQ2F.js";import{l as O}from"./chunk-NCCORPSU.js";import"./chunk-QAQDMS6R.js";import"./chunk-M3QKMHAP.js";import{a as _}from"./chunk-RWVIV3U7.js";import{a as q,b as B,c as E,d as S,e as i,f as s}from"./chunk-HCTJKP5J.js";import{a as A,e as L}from"./chunk-2IKDEUCX.js";import{d as W}from"./chunk-74IYYDDI.js";import{a as R,d as M,f as $,g as D}from"./chunk-I26MS5PJ.js";var I=M($(),1);var n=M(D(),1);var F=2e3,G=new Set(["open"]),ie=R(Q=>{let e=(0,I.c)(41),{read:y}=Q,t=W(),j=O(),v;e[0]!==j||e[1]!==y?(v=R(()=>Promise.resolve(y?y():j.debug()),"T"),e[0]=j,e[1]=y,e[2]=v):v=e[2];let V=v,K=y?"injected":"live",b;e[3]!==K?(b=["lunora-studio","sync-client-debug",K],e[3]=K,e[4]=b):b=e[4];let{data:c,poll:Y}=z(b,V);if(H(Y,!0,F),!c){let r;e[5]!==t?(r=t("Reading the sync client's state\u2026"),e[5]=t,e[6]=r):r=e[6];let g;e[7]!==t?(g=t("Sync client"),e[7]=t,e[8]=g):g=e[8];let T;return e[9]!==r||e[10]!==g?(T=(0,n.jsx)(A,{children:(0,n.jsx)(L,{children:(0,n.jsx)(_,{description:r,title:g})})}),e[9]=r,e[10]=g,e[11]=T):T=e[11],T}let{pendingWrites:k,shards:N,subscriptions:w}=c,l;e[12]!==t?(l=t("This Studio session's sync client"),e[12]=t,e[13]=l):l=e[13];let a;e[14]!==l?(a=(0,n.jsx)("span",{className:"text-sm font-medium",children:l}),e[14]=l,e[15]=a):a=e[15];let P=c.connectionStatus==="connected"?"default":"secondary",o;e[16]!==c.connectionStatus||e[17]!==P?(o=(0,n.jsx)(x,{variant:P,children:c.connectionStatus}),e[16]=c.connectionStatus,e[17]=P,e[18]=o):o=e[18];let d;e[19]!==k||e[20]!==t?(d=k>0?(0,n.jsx)(x,{variant:"secondary",children:t("{count} pending writes",{count:k})}):null,e[19]=k,e[20]=t,e[21]=d):d=e[21];let h;e[22]!==a||e[23]!==o||e[24]!==d?(h=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[a,o,d]}),e[22]=a,e[23]=o,e[24]=d,e[25]=h):h=e[25];let u;e[26]!==t?(u=t("Reads client.debug() for the client running in this page \u2014 not your application's client. Call client.debug() in your app to diagnose a specific stuck overlay there."),e[26]=t,e[27]=u):u=e[27];let m;e[28]!==u?(m=(0,n.jsx)("p",{className:"text-muted-foreground text-xs",children:u}),e[28]=u,e[29]=m):m=e[29];let p;e[30]!==N||e[31]!==t?(p=N.length===0?(0,n.jsx)(_,{description:t("No shard connection has been opened yet."),title:t("No shards")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Shard")}),(0,n.jsx)(i,{children:t("Socket")}),(0,n.jsx)(i,{children:t("Confirmed watermark")})]})}),(0,n.jsx)(E,{children:N.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{children:r.shardKey??t("(default)")}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:G.has(r.wsState)?"default":"secondary",children:r.wsState})}),(0,n.jsx)(s,{children:r.confirmedMutationWatermark})]},r.shardKey??"__default__"))})]}),e[30]=N,e[31]=t,e[32]=p):p=e[32];let f;e[33]!==w||e[34]!==t?(f=w.length===0?(0,n.jsx)(_,{description:t("This client holds no live queries or shapes."),title:t("No subscriptions")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Subscription")}),(0,n.jsx)(i,{children:t("Kind")}),(0,n.jsx)(i,{children:t("Acked")}),(0,n.jsx)(i,{children:t("Cursor")}),(0,n.jsx)(i,{children:t("Pending overlays")})]})}),(0,n.jsx)(E,{children:w.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{className:"font-mono text-xs",children:r.functionPath}),(0,n.jsx)(s,{children:r.kind}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:r.acked?"default":"secondary",children:r.acked?t("yes"):t("no")})}),(0,n.jsx)(s,{children:r.serverCursor??"\u2014"}),(0,n.jsx)(s,{children:r.pendingOptimisticLayers})]},r.id))})]}),e[33]=w,e[34]=t,e[35]=f):f=e[35];let C;return e[36]!==m||e[37]!==p||e[38]!==f||e[39]!==h?(C=(0,n.jsx)(A,{children:(0,n.jsxs)(L,{className:"flex flex-col gap-4",children:[h,m,p,f]})}),e[36]=m,e[37]=p,e[38]=f,e[39]=h,e[40]=C):C=e[40],C},"ie");export{ie as default};
1
+ import{a as H}from"./chunk-EYTZURBK.js";import{b as x}from"./chunk-Q6ED4KUL.js";import"./chunk-BOMPSVRC.js";import{b as z}from"./chunk-DFVQBXUZ.js";import{l as O}from"./chunk-RGDSRUIX.js";import"./chunk-QAQDMS6R.js";import"./chunk-35Q6XYRL.js";import{a as _}from"./chunk-RWVIV3U7.js";import{a as q,b as B,c as E,d as S,e as i,f as s}from"./chunk-HCTJKP5J.js";import{a as A,e as L}from"./chunk-2IKDEUCX.js";import{d as W}from"./chunk-74IYYDDI.js";import{a as R,d as M,f as $,g as D}from"./chunk-I26MS5PJ.js";var I=M($(),1);var n=M(D(),1);var F=2e3,G=new Set(["open"]),ie=R(Q=>{let e=(0,I.c)(41),{read:y}=Q,t=W(),j=O(),v;e[0]!==j||e[1]!==y?(v=R(()=>Promise.resolve(y?y():j.debug()),"T"),e[0]=j,e[1]=y,e[2]=v):v=e[2];let V=v,K=y?"injected":"live",b;e[3]!==K?(b=["lunora-studio","sync-client-debug",K],e[3]=K,e[4]=b):b=e[4];let{data:c,poll:Y}=z(b,V);if(H(Y,!0,F),!c){let r;e[5]!==t?(r=t("Reading the sync client's state\u2026"),e[5]=t,e[6]=r):r=e[6];let g;e[7]!==t?(g=t("Sync client"),e[7]=t,e[8]=g):g=e[8];let T;return e[9]!==r||e[10]!==g?(T=(0,n.jsx)(A,{children:(0,n.jsx)(L,{children:(0,n.jsx)(_,{description:r,title:g})})}),e[9]=r,e[10]=g,e[11]=T):T=e[11],T}let{pendingWrites:k,shards:N,subscriptions:w}=c,a;e[12]!==t?(a=t("This Studio session's sync client"),e[12]=t,e[13]=a):a=e[13];let l;e[14]!==a?(l=(0,n.jsx)("span",{className:"text-sm font-medium",children:a}),e[14]=a,e[15]=l):l=e[15];let P=c.connectionStatus==="connected"?"default":"secondary",o;e[16]!==c.connectionStatus||e[17]!==P?(o=(0,n.jsx)(x,{variant:P,children:c.connectionStatus}),e[16]=c.connectionStatus,e[17]=P,e[18]=o):o=e[18];let d;e[19]!==k||e[20]!==t?(d=k>0?(0,n.jsx)(x,{variant:"secondary",children:t("{count} pending writes",{count:k})}):null,e[19]=k,e[20]=t,e[21]=d):d=e[21];let h;e[22]!==l||e[23]!==o||e[24]!==d?(h=(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[l,o,d]}),e[22]=l,e[23]=o,e[24]=d,e[25]=h):h=e[25];let u;e[26]!==t?(u=t("Reads client.debug() for the client running in this page \u2014 not your application's client. Call client.debug() in your app to diagnose a specific stuck overlay there."),e[26]=t,e[27]=u):u=e[27];let m;e[28]!==u?(m=(0,n.jsx)("p",{className:"text-muted-foreground text-xs",children:u}),e[28]=u,e[29]=m):m=e[29];let p;e[30]!==N||e[31]!==t?(p=N.length===0?(0,n.jsx)(_,{description:t("No shard connection has been opened yet."),title:t("No shards")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Shard")}),(0,n.jsx)(i,{children:t("Socket")}),(0,n.jsx)(i,{children:t("Confirmed watermark")})]})}),(0,n.jsx)(E,{children:N.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{children:r.shardKey??t("(default)")}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:G.has(r.wsState)?"default":"secondary",children:r.wsState})}),(0,n.jsx)(s,{children:r.confirmedMutationWatermark})]},r.shardKey??"__default__"))})]}),e[30]=N,e[31]=t,e[32]=p):p=e[32];let f;e[33]!==w||e[34]!==t?(f=w.length===0?(0,n.jsx)(_,{description:t("This client holds no live queries or shapes."),title:t("No subscriptions")}):(0,n.jsxs)(q,{children:[(0,n.jsx)(B,{children:(0,n.jsxs)(S,{children:[(0,n.jsx)(i,{children:t("Subscription")}),(0,n.jsx)(i,{children:t("Kind")}),(0,n.jsx)(i,{children:t("Acked")}),(0,n.jsx)(i,{children:t("Cursor")}),(0,n.jsx)(i,{children:t("Pending overlays")})]})}),(0,n.jsx)(E,{children:w.map(r=>(0,n.jsxs)(S,{children:[(0,n.jsx)(s,{className:"font-mono text-xs",children:r.functionPath}),(0,n.jsx)(s,{children:r.kind}),(0,n.jsx)(s,{children:(0,n.jsx)(x,{variant:r.acked?"default":"secondary",children:r.acked?t("yes"):t("no")})}),(0,n.jsx)(s,{children:r.serverCursor??"\u2014"}),(0,n.jsx)(s,{children:r.pendingOptimisticLayers})]},r.id))})]}),e[33]=w,e[34]=t,e[35]=f):f=e[35];let C;return e[36]!==m||e[37]!==p||e[38]!==f||e[39]!==h?(C=(0,n.jsx)(A,{children:(0,n.jsxs)(L,{className:"flex flex-col gap-4",children:[h,m,p,f]})}),e[36]=m,e[37]=p,e[38]=f,e[39]=h,e[40]=C):C=e[40],C},"ie");export{ie as default};